diff --git a/profiles/latest/cognitiveservices/contentmoderator/models.go b/profiles/latest/cognitiveservices/contentmoderator/models.go index 64a370b71a96..996ac1675947 100644 --- a/profiles/latest/cognitiveservices/contentmoderator/models.go +++ b/profiles/latest/cognitiveservices/contentmoderator/models.go @@ -40,7 +40,6 @@ type APIError = original.APIError type Address = original.Address type BaseClient = original.BaseClient type Body = original.Body -type BodyModel = original.BodyModel type Candidate = original.Candidate type Classification = original.Classification type ClassificationCategory1 = original.ClassificationCategory1 @@ -69,6 +68,7 @@ type ImageAdditionalInfoItem = original.ImageAdditionalInfoItem type ImageIds = original.ImageIds type ImageList = original.ImageList type ImageModerationClient = original.ImageModerationClient +type ImageURL = original.ImageURL type Job = original.Job type JobExecutionReportDetails = original.JobExecutionReportDetails type JobID = original.JobID diff --git a/profiles/latest/cognitiveservices/luis/authoring/models.go b/profiles/latest/cognitiveservices/luis/authoring/models.go index 4b5af09df120..ec5d284fd97a 100644 --- a/profiles/latest/cognitiveservices/luis/authoring/models.go +++ b/profiles/latest/cognitiveservices/luis/authoring/models.go @@ -42,7 +42,6 @@ const ( ReadableTypePatternAnyEntityExtractor ReadableType = original.ReadableTypePatternAnyEntityExtractor ReadableTypePrebuiltEntityExtractor ReadableType = original.ReadableTypePrebuiltEntityExtractor ReadableTypeRegexEntityExtractor ReadableType = original.ReadableTypeRegexEntityExtractor - ReadableTypeRegularExpressionEntityExtractor ReadableType = original.ReadableTypeRegularExpressionEntityExtractor ) type ReadableType1 = original.ReadableType1 @@ -58,7 +57,6 @@ const ( ReadableType1PatternAnyEntityExtractor ReadableType1 = original.ReadableType1PatternAnyEntityExtractor ReadableType1PrebuiltEntityExtractor ReadableType1 = original.ReadableType1PrebuiltEntityExtractor ReadableType1RegexEntityExtractor ReadableType1 = original.ReadableType1RegexEntityExtractor - ReadableType1RegularExpressionEntityExtractor ReadableType1 = original.ReadableType1RegularExpressionEntityExtractor ) type ReadableType10 = original.ReadableType10 @@ -74,7 +72,6 @@ const ( ReadableType10PatternAnyEntityExtractor ReadableType10 = original.ReadableType10PatternAnyEntityExtractor ReadableType10PrebuiltEntityExtractor ReadableType10 = original.ReadableType10PrebuiltEntityExtractor ReadableType10RegexEntityExtractor ReadableType10 = original.ReadableType10RegexEntityExtractor - ReadableType10RegularExpressionEntityExtractor ReadableType10 = original.ReadableType10RegularExpressionEntityExtractor ) type ReadableType2 = original.ReadableType2 @@ -90,7 +87,6 @@ const ( ReadableType2PatternAnyEntityExtractor ReadableType2 = original.ReadableType2PatternAnyEntityExtractor ReadableType2PrebuiltEntityExtractor ReadableType2 = original.ReadableType2PrebuiltEntityExtractor ReadableType2RegexEntityExtractor ReadableType2 = original.ReadableType2RegexEntityExtractor - ReadableType2RegularExpressionEntityExtractor ReadableType2 = original.ReadableType2RegularExpressionEntityExtractor ) type ReadableType3 = original.ReadableType3 @@ -106,7 +102,6 @@ const ( ReadableType3PatternAnyEntityExtractor ReadableType3 = original.ReadableType3PatternAnyEntityExtractor ReadableType3PrebuiltEntityExtractor ReadableType3 = original.ReadableType3PrebuiltEntityExtractor ReadableType3RegexEntityExtractor ReadableType3 = original.ReadableType3RegexEntityExtractor - ReadableType3RegularExpressionEntityExtractor ReadableType3 = original.ReadableType3RegularExpressionEntityExtractor ) type ReadableType4 = original.ReadableType4 @@ -122,7 +117,6 @@ const ( ReadableType4PatternAnyEntityExtractor ReadableType4 = original.ReadableType4PatternAnyEntityExtractor ReadableType4PrebuiltEntityExtractor ReadableType4 = original.ReadableType4PrebuiltEntityExtractor ReadableType4RegexEntityExtractor ReadableType4 = original.ReadableType4RegexEntityExtractor - ReadableType4RegularExpressionEntityExtractor ReadableType4 = original.ReadableType4RegularExpressionEntityExtractor ) type ReadableType5 = original.ReadableType5 @@ -138,7 +132,6 @@ const ( ReadableType5PatternAnyEntityExtractor ReadableType5 = original.ReadableType5PatternAnyEntityExtractor ReadableType5PrebuiltEntityExtractor ReadableType5 = original.ReadableType5PrebuiltEntityExtractor ReadableType5RegexEntityExtractor ReadableType5 = original.ReadableType5RegexEntityExtractor - ReadableType5RegularExpressionEntityExtractor ReadableType5 = original.ReadableType5RegularExpressionEntityExtractor ) type ReadableType6 = original.ReadableType6 @@ -154,7 +147,6 @@ const ( ReadableType6PatternAnyEntityExtractor ReadableType6 = original.ReadableType6PatternAnyEntityExtractor ReadableType6PrebuiltEntityExtractor ReadableType6 = original.ReadableType6PrebuiltEntityExtractor ReadableType6RegexEntityExtractor ReadableType6 = original.ReadableType6RegexEntityExtractor - ReadableType6RegularExpressionEntityExtractor ReadableType6 = original.ReadableType6RegularExpressionEntityExtractor ) type ReadableType7 = original.ReadableType7 @@ -170,7 +162,6 @@ const ( ReadableType7PatternAnyEntityExtractor ReadableType7 = original.ReadableType7PatternAnyEntityExtractor ReadableType7PrebuiltEntityExtractor ReadableType7 = original.ReadableType7PrebuiltEntityExtractor ReadableType7RegexEntityExtractor ReadableType7 = original.ReadableType7RegexEntityExtractor - ReadableType7RegularExpressionEntityExtractor ReadableType7 = original.ReadableType7RegularExpressionEntityExtractor ) type ReadableType8 = original.ReadableType8 @@ -186,7 +177,6 @@ const ( ReadableType8PatternAnyEntityExtractor ReadableType8 = original.ReadableType8PatternAnyEntityExtractor ReadableType8PrebuiltEntityExtractor ReadableType8 = original.ReadableType8PrebuiltEntityExtractor ReadableType8RegexEntityExtractor ReadableType8 = original.ReadableType8RegexEntityExtractor - ReadableType8RegularExpressionEntityExtractor ReadableType8 = original.ReadableType8RegularExpressionEntityExtractor ) type ReadableType9 = original.ReadableType9 @@ -202,7 +192,6 @@ const ( ReadableType9PatternAnyEntityExtractor ReadableType9 = original.ReadableType9PatternAnyEntityExtractor ReadableType9PrebuiltEntityExtractor ReadableType9 = original.ReadableType9PrebuiltEntityExtractor ReadableType9RegexEntityExtractor ReadableType9 = original.ReadableType9RegexEntityExtractor - ReadableType9RegularExpressionEntityExtractor ReadableType9 = original.ReadableType9RegularExpressionEntityExtractor ) type Status = original.Status diff --git a/profiles/latest/cognitiveservices/spellcheck/models.go b/profiles/latest/cognitiveservices/spellcheck/models.go index d73ba80d8c49..7c39c44fe434 100644 --- a/profiles/latest/cognitiveservices/spellcheck/models.go +++ b/profiles/latest/cognitiveservices/spellcheck/models.go @@ -66,6 +66,13 @@ const ( UnknownToken ErrorType = original.UnknownToken ) +type Mode = original.Mode + +const ( + Proof Mode = original.Proof + Spell Mode = original.Spell +) + type Type = original.Type const ( @@ -110,6 +117,9 @@ func PossibleErrorSubCodeValues() []ErrorSubCode { func PossibleErrorTypeValues() []ErrorType { return original.PossibleErrorTypeValues() } +func PossibleModeValues() []Mode { + return original.PossibleModeValues() +} func PossibleTypeValues() []Type { return original.PossibleTypeValues() } diff --git a/profiles/latest/devspaces/mgmt/devspaces/devspacesapi/models.go b/profiles/latest/devspaces/mgmt/devspaces/devspacesapi/models.go new file mode 100644 index 000000000000..8aedc0fec96c --- /dev/null +++ b/profiles/latest/devspaces/mgmt/devspaces/devspacesapi/models.go @@ -0,0 +1,26 @@ +// +build go1.9 + +// Copyright 2019 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package devspacesapi + +import original "github.com/Azure/azure-sdk-for-go/services/devspaces/mgmt/2019-04-01/devspaces/devspacesapi" + +type ContainerHostMappingsClientAPI = original.ContainerHostMappingsClientAPI +type ControllersClientAPI = original.ControllersClientAPI +type OperationsClientAPI = original.OperationsClientAPI diff --git a/profiles/latest/devspaces/mgmt/devspaces/models.go b/profiles/latest/devspaces/mgmt/devspaces/models.go new file mode 100644 index 000000000000..3174983a226c --- /dev/null +++ b/profiles/latest/devspaces/mgmt/devspaces/models.go @@ -0,0 +1,138 @@ +// +build go1.9 + +// Copyright 2019 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package devspaces + +import ( + "context" + + original "github.com/Azure/azure-sdk-for-go/services/devspaces/mgmt/2019-04-01/devspaces" +) + +const ( + DefaultBaseURI = original.DefaultBaseURI +) + +type InstanceType = original.InstanceType + +const ( + InstanceTypeKubernetes InstanceType = original.InstanceTypeKubernetes + InstanceTypeOrchestratorSpecificConnectionDetails InstanceType = original.InstanceTypeOrchestratorSpecificConnectionDetails +) + +type ProvisioningState = original.ProvisioningState + +const ( + Canceled ProvisioningState = original.Canceled + Creating ProvisioningState = original.Creating + Deleted ProvisioningState = original.Deleted + Deleting ProvisioningState = original.Deleting + Failed ProvisioningState = original.Failed + Succeeded ProvisioningState = original.Succeeded + Updating ProvisioningState = original.Updating +) + +type SkuTier = original.SkuTier + +const ( + Standard SkuTier = original.Standard +) + +type BaseClient = original.BaseClient +type BasicOrchestratorSpecificConnectionDetails = original.BasicOrchestratorSpecificConnectionDetails +type ContainerHostMapping = original.ContainerHostMapping +type ContainerHostMappingsClient = original.ContainerHostMappingsClient +type Controller = original.Controller +type ControllerConnectionDetails = original.ControllerConnectionDetails +type ControllerConnectionDetailsList = original.ControllerConnectionDetailsList +type ControllerList = original.ControllerList +type ControllerListIterator = original.ControllerListIterator +type ControllerListPage = original.ControllerListPage +type ControllerProperties = original.ControllerProperties +type ControllerUpdateParameters = original.ControllerUpdateParameters +type ControllerUpdateParametersProperties = original.ControllerUpdateParametersProperties +type ControllersClient = original.ControllersClient +type ControllersCreateFuture = original.ControllersCreateFuture +type ControllersDeleteFuture = original.ControllersDeleteFuture +type ErrorDetails = original.ErrorDetails +type ErrorResponse = original.ErrorResponse +type KubernetesConnectionDetails = original.KubernetesConnectionDetails +type ListConnectionDetailsParameters = original.ListConnectionDetailsParameters +type OperationsClient = original.OperationsClient +type OrchestratorSpecificConnectionDetails = original.OrchestratorSpecificConnectionDetails +type Resource = original.Resource +type ResourceProviderOperationDefinition = original.ResourceProviderOperationDefinition +type ResourceProviderOperationDisplay = original.ResourceProviderOperationDisplay +type ResourceProviderOperationList = original.ResourceProviderOperationList +type ResourceProviderOperationListIterator = original.ResourceProviderOperationListIterator +type ResourceProviderOperationListPage = original.ResourceProviderOperationListPage +type Sku = original.Sku +type TrackedResource = original.TrackedResource + +func New(subscriptionID string) BaseClient { + return original.New(subscriptionID) +} +func NewContainerHostMappingsClient(subscriptionID string) ContainerHostMappingsClient { + return original.NewContainerHostMappingsClient(subscriptionID) +} +func NewContainerHostMappingsClientWithBaseURI(baseURI string, subscriptionID string) ContainerHostMappingsClient { + return original.NewContainerHostMappingsClientWithBaseURI(baseURI, subscriptionID) +} +func NewControllerListIterator(page ControllerListPage) ControllerListIterator { + return original.NewControllerListIterator(page) +} +func NewControllerListPage(getNextPage func(context.Context, ControllerList) (ControllerList, error)) ControllerListPage { + return original.NewControllerListPage(getNextPage) +} +func NewControllersClient(subscriptionID string) ControllersClient { + return original.NewControllersClient(subscriptionID) +} +func NewControllersClientWithBaseURI(baseURI string, subscriptionID string) ControllersClient { + return original.NewControllersClientWithBaseURI(baseURI, subscriptionID) +} +func NewOperationsClient(subscriptionID string) OperationsClient { + return original.NewOperationsClient(subscriptionID) +} +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) +} +func NewResourceProviderOperationListIterator(page ResourceProviderOperationListPage) ResourceProviderOperationListIterator { + return original.NewResourceProviderOperationListIterator(page) +} +func NewResourceProviderOperationListPage(getNextPage func(context.Context, ResourceProviderOperationList) (ResourceProviderOperationList, error)) ResourceProviderOperationListPage { + return original.NewResourceProviderOperationListPage(getNextPage) +} +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return original.NewWithBaseURI(baseURI, subscriptionID) +} +func PossibleInstanceTypeValues() []InstanceType { + return original.PossibleInstanceTypeValues() +} +func PossibleProvisioningStateValues() []ProvisioningState { + return original.PossibleProvisioningStateValues() +} +func PossibleSkuTierValues() []SkuTier { + return original.PossibleSkuTierValues() +} +func UserAgent() string { + return original.UserAgent() + " profiles/latest" +} +func Version() string { + return original.Version() +} diff --git a/profiles/latest/network/mgmt/network/models.go b/profiles/latest/network/mgmt/network/models.go index 215d815c6489..b5ad167875df 100644 --- a/profiles/latest/network/mgmt/network/models.go +++ b/profiles/latest/network/mgmt/network/models.go @@ -1532,6 +1532,8 @@ type ReferencedPublicIPAddress = original.ReferencedPublicIPAddress type Resource = original.Resource type ResourceNavigationLink = original.ResourceNavigationLink type ResourceNavigationLinkFormat = original.ResourceNavigationLinkFormat +type ResourceNavigationLinksClient = original.ResourceNavigationLinksClient +type ResourceNavigationLinksListResult = original.ResourceNavigationLinksListResult type RetentionPolicyParameters = original.RetentionPolicyParameters type Route = original.Route type RouteFilter = original.RouteFilter @@ -1593,6 +1595,8 @@ type SecurityRulesDeleteFuture = original.SecurityRulesDeleteFuture type SecurityRulesEvaluationResult = original.SecurityRulesEvaluationResult type ServiceAssociationLink = original.ServiceAssociationLink type ServiceAssociationLinkPropertiesFormat = original.ServiceAssociationLinkPropertiesFormat +type ServiceAssociationLinksClient = original.ServiceAssociationLinksClient +type ServiceAssociationLinksListResult = original.ServiceAssociationLinksListResult type ServiceDelegationPropertiesFormat = original.ServiceDelegationPropertiesFormat type ServiceEndpointPoliciesClient = original.ServiceEndpointPoliciesClient type ServiceEndpointPoliciesCreateOrUpdateFuture = original.ServiceEndpointPoliciesCreateOrUpdateFuture @@ -2352,6 +2356,12 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { func NewPublicIPPrefixesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPPrefixesClient { return original.NewPublicIPPrefixesClientWithBaseURI(baseURI, subscriptionID) } +func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationLinksClient { + return original.NewResourceNavigationLinksClient(subscriptionID) +} +func NewResourceNavigationLinksClientWithBaseURI(baseURI string, subscriptionID string) ResourceNavigationLinksClient { + return original.NewResourceNavigationLinksClientWithBaseURI(baseURI, subscriptionID) +} func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator { return original.NewRouteFilterListResultIterator(page) } @@ -2424,6 +2434,12 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { func NewSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) SecurityRulesClient { return original.NewSecurityRulesClientWithBaseURI(baseURI, subscriptionID) } +func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationLinksClient { + return original.NewServiceAssociationLinksClient(subscriptionID) +} +func NewServiceAssociationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServiceAssociationLinksClient { + return original.NewServiceAssociationLinksClientWithBaseURI(baseURI, subscriptionID) +} func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoliciesClient { return original.NewServiceEndpointPoliciesClient(subscriptionID) } diff --git a/profiles/latest/network/mgmt/network/networkapi/models.go b/profiles/latest/network/mgmt/network/networkapi/models.go index 7cfa83870f17..44723913e870 100644 --- a/profiles/latest/network/mgmt/network/networkapi/models.go +++ b/profiles/latest/network/mgmt/network/networkapi/models.go @@ -70,12 +70,14 @@ type PeerExpressRouteCircuitConnectionsClientAPI = original.PeerExpressRouteCirc type ProfilesClientAPI = original.ProfilesClientAPI type PublicIPAddressesClientAPI = original.PublicIPAddressesClientAPI type PublicIPPrefixesClientAPI = original.PublicIPPrefixesClientAPI +type ResourceNavigationLinksClientAPI = original.ResourceNavigationLinksClientAPI type RouteFilterRulesClientAPI = original.RouteFilterRulesClientAPI type RouteFiltersClientAPI = original.RouteFiltersClientAPI type RouteTablesClientAPI = original.RouteTablesClientAPI type RoutesClientAPI = original.RoutesClientAPI type SecurityGroupsClientAPI = original.SecurityGroupsClientAPI type SecurityRulesClientAPI = original.SecurityRulesClientAPI +type ServiceAssociationLinksClientAPI = original.ServiceAssociationLinksClientAPI type ServiceEndpointPoliciesClientAPI = original.ServiceEndpointPoliciesClientAPI type ServiceEndpointPolicyDefinitionsClientAPI = original.ServiceEndpointPolicyDefinitionsClientAPI type SubnetsClientAPI = original.SubnetsClientAPI diff --git a/profiles/preview/cognitiveservices/contentmoderator/models.go b/profiles/preview/cognitiveservices/contentmoderator/models.go index 6837e347c4a3..af7e2010d842 100644 --- a/profiles/preview/cognitiveservices/contentmoderator/models.go +++ b/profiles/preview/cognitiveservices/contentmoderator/models.go @@ -40,7 +40,6 @@ type APIError = original.APIError type Address = original.Address type BaseClient = original.BaseClient type Body = original.Body -type BodyModel = original.BodyModel type Candidate = original.Candidate type Classification = original.Classification type ClassificationCategory1 = original.ClassificationCategory1 @@ -69,6 +68,7 @@ type ImageAdditionalInfoItem = original.ImageAdditionalInfoItem type ImageIds = original.ImageIds type ImageList = original.ImageList type ImageModerationClient = original.ImageModerationClient +type ImageURL = original.ImageURL type Job = original.Job type JobExecutionReportDetails = original.JobExecutionReportDetails type JobID = original.JobID diff --git a/profiles/preview/cognitiveservices/luis/authoring/models.go b/profiles/preview/cognitiveservices/luis/authoring/models.go index fd3e667d014b..ed84134e8459 100644 --- a/profiles/preview/cognitiveservices/luis/authoring/models.go +++ b/profiles/preview/cognitiveservices/luis/authoring/models.go @@ -42,7 +42,6 @@ const ( ReadableTypePatternAnyEntityExtractor ReadableType = original.ReadableTypePatternAnyEntityExtractor ReadableTypePrebuiltEntityExtractor ReadableType = original.ReadableTypePrebuiltEntityExtractor ReadableTypeRegexEntityExtractor ReadableType = original.ReadableTypeRegexEntityExtractor - ReadableTypeRegularExpressionEntityExtractor ReadableType = original.ReadableTypeRegularExpressionEntityExtractor ) type ReadableType1 = original.ReadableType1 @@ -58,7 +57,6 @@ const ( ReadableType1PatternAnyEntityExtractor ReadableType1 = original.ReadableType1PatternAnyEntityExtractor ReadableType1PrebuiltEntityExtractor ReadableType1 = original.ReadableType1PrebuiltEntityExtractor ReadableType1RegexEntityExtractor ReadableType1 = original.ReadableType1RegexEntityExtractor - ReadableType1RegularExpressionEntityExtractor ReadableType1 = original.ReadableType1RegularExpressionEntityExtractor ) type ReadableType10 = original.ReadableType10 @@ -74,7 +72,6 @@ const ( ReadableType10PatternAnyEntityExtractor ReadableType10 = original.ReadableType10PatternAnyEntityExtractor ReadableType10PrebuiltEntityExtractor ReadableType10 = original.ReadableType10PrebuiltEntityExtractor ReadableType10RegexEntityExtractor ReadableType10 = original.ReadableType10RegexEntityExtractor - ReadableType10RegularExpressionEntityExtractor ReadableType10 = original.ReadableType10RegularExpressionEntityExtractor ) type ReadableType2 = original.ReadableType2 @@ -90,7 +87,6 @@ const ( ReadableType2PatternAnyEntityExtractor ReadableType2 = original.ReadableType2PatternAnyEntityExtractor ReadableType2PrebuiltEntityExtractor ReadableType2 = original.ReadableType2PrebuiltEntityExtractor ReadableType2RegexEntityExtractor ReadableType2 = original.ReadableType2RegexEntityExtractor - ReadableType2RegularExpressionEntityExtractor ReadableType2 = original.ReadableType2RegularExpressionEntityExtractor ) type ReadableType3 = original.ReadableType3 @@ -106,7 +102,6 @@ const ( ReadableType3PatternAnyEntityExtractor ReadableType3 = original.ReadableType3PatternAnyEntityExtractor ReadableType3PrebuiltEntityExtractor ReadableType3 = original.ReadableType3PrebuiltEntityExtractor ReadableType3RegexEntityExtractor ReadableType3 = original.ReadableType3RegexEntityExtractor - ReadableType3RegularExpressionEntityExtractor ReadableType3 = original.ReadableType3RegularExpressionEntityExtractor ) type ReadableType4 = original.ReadableType4 @@ -122,7 +117,6 @@ const ( ReadableType4PatternAnyEntityExtractor ReadableType4 = original.ReadableType4PatternAnyEntityExtractor ReadableType4PrebuiltEntityExtractor ReadableType4 = original.ReadableType4PrebuiltEntityExtractor ReadableType4RegexEntityExtractor ReadableType4 = original.ReadableType4RegexEntityExtractor - ReadableType4RegularExpressionEntityExtractor ReadableType4 = original.ReadableType4RegularExpressionEntityExtractor ) type ReadableType5 = original.ReadableType5 @@ -138,7 +132,6 @@ const ( ReadableType5PatternAnyEntityExtractor ReadableType5 = original.ReadableType5PatternAnyEntityExtractor ReadableType5PrebuiltEntityExtractor ReadableType5 = original.ReadableType5PrebuiltEntityExtractor ReadableType5RegexEntityExtractor ReadableType5 = original.ReadableType5RegexEntityExtractor - ReadableType5RegularExpressionEntityExtractor ReadableType5 = original.ReadableType5RegularExpressionEntityExtractor ) type ReadableType6 = original.ReadableType6 @@ -154,7 +147,6 @@ const ( ReadableType6PatternAnyEntityExtractor ReadableType6 = original.ReadableType6PatternAnyEntityExtractor ReadableType6PrebuiltEntityExtractor ReadableType6 = original.ReadableType6PrebuiltEntityExtractor ReadableType6RegexEntityExtractor ReadableType6 = original.ReadableType6RegexEntityExtractor - ReadableType6RegularExpressionEntityExtractor ReadableType6 = original.ReadableType6RegularExpressionEntityExtractor ) type ReadableType7 = original.ReadableType7 @@ -170,7 +162,6 @@ const ( ReadableType7PatternAnyEntityExtractor ReadableType7 = original.ReadableType7PatternAnyEntityExtractor ReadableType7PrebuiltEntityExtractor ReadableType7 = original.ReadableType7PrebuiltEntityExtractor ReadableType7RegexEntityExtractor ReadableType7 = original.ReadableType7RegexEntityExtractor - ReadableType7RegularExpressionEntityExtractor ReadableType7 = original.ReadableType7RegularExpressionEntityExtractor ) type ReadableType8 = original.ReadableType8 @@ -186,7 +177,6 @@ const ( ReadableType8PatternAnyEntityExtractor ReadableType8 = original.ReadableType8PatternAnyEntityExtractor ReadableType8PrebuiltEntityExtractor ReadableType8 = original.ReadableType8PrebuiltEntityExtractor ReadableType8RegexEntityExtractor ReadableType8 = original.ReadableType8RegexEntityExtractor - ReadableType8RegularExpressionEntityExtractor ReadableType8 = original.ReadableType8RegularExpressionEntityExtractor ) type ReadableType9 = original.ReadableType9 @@ -202,7 +192,6 @@ const ( ReadableType9PatternAnyEntityExtractor ReadableType9 = original.ReadableType9PatternAnyEntityExtractor ReadableType9PrebuiltEntityExtractor ReadableType9 = original.ReadableType9PrebuiltEntityExtractor ReadableType9RegexEntityExtractor ReadableType9 = original.ReadableType9RegexEntityExtractor - ReadableType9RegularExpressionEntityExtractor ReadableType9 = original.ReadableType9RegularExpressionEntityExtractor ) type Status = original.Status diff --git a/profiles/preview/cognitiveservices/spellcheck/models.go b/profiles/preview/cognitiveservices/spellcheck/models.go index 02fcb3544ddd..93db91561665 100644 --- a/profiles/preview/cognitiveservices/spellcheck/models.go +++ b/profiles/preview/cognitiveservices/spellcheck/models.go @@ -66,6 +66,13 @@ const ( UnknownToken ErrorType = original.UnknownToken ) +type Mode = original.Mode + +const ( + Proof Mode = original.Proof + Spell Mode = original.Spell +) + type Type = original.Type const ( @@ -110,6 +117,9 @@ func PossibleErrorSubCodeValues() []ErrorSubCode { func PossibleErrorTypeValues() []ErrorType { return original.PossibleErrorTypeValues() } +func PossibleModeValues() []Mode { + return original.PossibleModeValues() +} func PossibleTypeValues() []Type { return original.PossibleTypeValues() } diff --git a/profiles/preview/devspaces/mgmt/devspaces/devspacesapi/models.go b/profiles/preview/devspaces/mgmt/devspaces/devspacesapi/models.go new file mode 100644 index 000000000000..8aedc0fec96c --- /dev/null +++ b/profiles/preview/devspaces/mgmt/devspaces/devspacesapi/models.go @@ -0,0 +1,26 @@ +// +build go1.9 + +// Copyright 2019 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package devspacesapi + +import original "github.com/Azure/azure-sdk-for-go/services/devspaces/mgmt/2019-04-01/devspaces/devspacesapi" + +type ContainerHostMappingsClientAPI = original.ContainerHostMappingsClientAPI +type ControllersClientAPI = original.ControllersClientAPI +type OperationsClientAPI = original.OperationsClientAPI diff --git a/profiles/preview/devspaces/mgmt/devspaces/models.go b/profiles/preview/devspaces/mgmt/devspaces/models.go new file mode 100644 index 000000000000..ef5b8bb87bb2 --- /dev/null +++ b/profiles/preview/devspaces/mgmt/devspaces/models.go @@ -0,0 +1,138 @@ +// +build go1.9 + +// Copyright 2019 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package devspaces + +import ( + "context" + + original "github.com/Azure/azure-sdk-for-go/services/devspaces/mgmt/2019-04-01/devspaces" +) + +const ( + DefaultBaseURI = original.DefaultBaseURI +) + +type InstanceType = original.InstanceType + +const ( + InstanceTypeKubernetes InstanceType = original.InstanceTypeKubernetes + InstanceTypeOrchestratorSpecificConnectionDetails InstanceType = original.InstanceTypeOrchestratorSpecificConnectionDetails +) + +type ProvisioningState = original.ProvisioningState + +const ( + Canceled ProvisioningState = original.Canceled + Creating ProvisioningState = original.Creating + Deleted ProvisioningState = original.Deleted + Deleting ProvisioningState = original.Deleting + Failed ProvisioningState = original.Failed + Succeeded ProvisioningState = original.Succeeded + Updating ProvisioningState = original.Updating +) + +type SkuTier = original.SkuTier + +const ( + Standard SkuTier = original.Standard +) + +type BaseClient = original.BaseClient +type BasicOrchestratorSpecificConnectionDetails = original.BasicOrchestratorSpecificConnectionDetails +type ContainerHostMapping = original.ContainerHostMapping +type ContainerHostMappingsClient = original.ContainerHostMappingsClient +type Controller = original.Controller +type ControllerConnectionDetails = original.ControllerConnectionDetails +type ControllerConnectionDetailsList = original.ControllerConnectionDetailsList +type ControllerList = original.ControllerList +type ControllerListIterator = original.ControllerListIterator +type ControllerListPage = original.ControllerListPage +type ControllerProperties = original.ControllerProperties +type ControllerUpdateParameters = original.ControllerUpdateParameters +type ControllerUpdateParametersProperties = original.ControllerUpdateParametersProperties +type ControllersClient = original.ControllersClient +type ControllersCreateFuture = original.ControllersCreateFuture +type ControllersDeleteFuture = original.ControllersDeleteFuture +type ErrorDetails = original.ErrorDetails +type ErrorResponse = original.ErrorResponse +type KubernetesConnectionDetails = original.KubernetesConnectionDetails +type ListConnectionDetailsParameters = original.ListConnectionDetailsParameters +type OperationsClient = original.OperationsClient +type OrchestratorSpecificConnectionDetails = original.OrchestratorSpecificConnectionDetails +type Resource = original.Resource +type ResourceProviderOperationDefinition = original.ResourceProviderOperationDefinition +type ResourceProviderOperationDisplay = original.ResourceProviderOperationDisplay +type ResourceProviderOperationList = original.ResourceProviderOperationList +type ResourceProviderOperationListIterator = original.ResourceProviderOperationListIterator +type ResourceProviderOperationListPage = original.ResourceProviderOperationListPage +type Sku = original.Sku +type TrackedResource = original.TrackedResource + +func New(subscriptionID string) BaseClient { + return original.New(subscriptionID) +} +func NewContainerHostMappingsClient(subscriptionID string) ContainerHostMappingsClient { + return original.NewContainerHostMappingsClient(subscriptionID) +} +func NewContainerHostMappingsClientWithBaseURI(baseURI string, subscriptionID string) ContainerHostMappingsClient { + return original.NewContainerHostMappingsClientWithBaseURI(baseURI, subscriptionID) +} +func NewControllerListIterator(page ControllerListPage) ControllerListIterator { + return original.NewControllerListIterator(page) +} +func NewControllerListPage(getNextPage func(context.Context, ControllerList) (ControllerList, error)) ControllerListPage { + return original.NewControllerListPage(getNextPage) +} +func NewControllersClient(subscriptionID string) ControllersClient { + return original.NewControllersClient(subscriptionID) +} +func NewControllersClientWithBaseURI(baseURI string, subscriptionID string) ControllersClient { + return original.NewControllersClientWithBaseURI(baseURI, subscriptionID) +} +func NewOperationsClient(subscriptionID string) OperationsClient { + return original.NewOperationsClient(subscriptionID) +} +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) +} +func NewResourceProviderOperationListIterator(page ResourceProviderOperationListPage) ResourceProviderOperationListIterator { + return original.NewResourceProviderOperationListIterator(page) +} +func NewResourceProviderOperationListPage(getNextPage func(context.Context, ResourceProviderOperationList) (ResourceProviderOperationList, error)) ResourceProviderOperationListPage { + return original.NewResourceProviderOperationListPage(getNextPage) +} +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return original.NewWithBaseURI(baseURI, subscriptionID) +} +func PossibleInstanceTypeValues() []InstanceType { + return original.PossibleInstanceTypeValues() +} +func PossibleProvisioningStateValues() []ProvisioningState { + return original.PossibleProvisioningStateValues() +} +func PossibleSkuTierValues() []SkuTier { + return original.PossibleSkuTierValues() +} +func UserAgent() string { + return original.UserAgent() + " profiles/preview" +} +func Version() string { + return original.Version() +} diff --git a/profiles/preview/network/mgmt/network/models.go b/profiles/preview/network/mgmt/network/models.go index 1a7046b27a92..0bb739f53fa7 100644 --- a/profiles/preview/network/mgmt/network/models.go +++ b/profiles/preview/network/mgmt/network/models.go @@ -1532,6 +1532,8 @@ type ReferencedPublicIPAddress = original.ReferencedPublicIPAddress type Resource = original.Resource type ResourceNavigationLink = original.ResourceNavigationLink type ResourceNavigationLinkFormat = original.ResourceNavigationLinkFormat +type ResourceNavigationLinksClient = original.ResourceNavigationLinksClient +type ResourceNavigationLinksListResult = original.ResourceNavigationLinksListResult type RetentionPolicyParameters = original.RetentionPolicyParameters type Route = original.Route type RouteFilter = original.RouteFilter @@ -1593,6 +1595,8 @@ type SecurityRulesDeleteFuture = original.SecurityRulesDeleteFuture type SecurityRulesEvaluationResult = original.SecurityRulesEvaluationResult type ServiceAssociationLink = original.ServiceAssociationLink type ServiceAssociationLinkPropertiesFormat = original.ServiceAssociationLinkPropertiesFormat +type ServiceAssociationLinksClient = original.ServiceAssociationLinksClient +type ServiceAssociationLinksListResult = original.ServiceAssociationLinksListResult type ServiceDelegationPropertiesFormat = original.ServiceDelegationPropertiesFormat type ServiceEndpointPoliciesClient = original.ServiceEndpointPoliciesClient type ServiceEndpointPoliciesCreateOrUpdateFuture = original.ServiceEndpointPoliciesCreateOrUpdateFuture @@ -2352,6 +2356,12 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { func NewPublicIPPrefixesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPPrefixesClient { return original.NewPublicIPPrefixesClientWithBaseURI(baseURI, subscriptionID) } +func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationLinksClient { + return original.NewResourceNavigationLinksClient(subscriptionID) +} +func NewResourceNavigationLinksClientWithBaseURI(baseURI string, subscriptionID string) ResourceNavigationLinksClient { + return original.NewResourceNavigationLinksClientWithBaseURI(baseURI, subscriptionID) +} func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator { return original.NewRouteFilterListResultIterator(page) } @@ -2424,6 +2434,12 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { func NewSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) SecurityRulesClient { return original.NewSecurityRulesClientWithBaseURI(baseURI, subscriptionID) } +func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationLinksClient { + return original.NewServiceAssociationLinksClient(subscriptionID) +} +func NewServiceAssociationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServiceAssociationLinksClient { + return original.NewServiceAssociationLinksClientWithBaseURI(baseURI, subscriptionID) +} func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoliciesClient { return original.NewServiceEndpointPoliciesClient(subscriptionID) } diff --git a/profiles/preview/network/mgmt/network/networkapi/models.go b/profiles/preview/network/mgmt/network/networkapi/models.go index 7cfa83870f17..44723913e870 100644 --- a/profiles/preview/network/mgmt/network/networkapi/models.go +++ b/profiles/preview/network/mgmt/network/networkapi/models.go @@ -70,12 +70,14 @@ type PeerExpressRouteCircuitConnectionsClientAPI = original.PeerExpressRouteCirc type ProfilesClientAPI = original.ProfilesClientAPI type PublicIPAddressesClientAPI = original.PublicIPAddressesClientAPI type PublicIPPrefixesClientAPI = original.PublicIPPrefixesClientAPI +type ResourceNavigationLinksClientAPI = original.ResourceNavigationLinksClientAPI type RouteFilterRulesClientAPI = original.RouteFilterRulesClientAPI type RouteFiltersClientAPI = original.RouteFiltersClientAPI type RouteTablesClientAPI = original.RouteTablesClientAPI type RoutesClientAPI = original.RoutesClientAPI type SecurityGroupsClientAPI = original.SecurityGroupsClientAPI type SecurityRulesClientAPI = original.SecurityRulesClientAPI +type ServiceAssociationLinksClientAPI = original.ServiceAssociationLinksClientAPI type ServiceEndpointPoliciesClientAPI = original.ServiceEndpointPoliciesClientAPI type ServiceEndpointPolicyDefinitionsClientAPI = original.ServiceEndpointPolicyDefinitionsClientAPI type SubnetsClientAPI = original.SubnetsClientAPI diff --git a/profiles/preview/preview/billing/mgmt/billing/billingapi/models.go b/profiles/preview/preview/billing/mgmt/billing/billingapi/models.go index 133b14bbd6bc..fc6833b52934 100644 --- a/profiles/preview/preview/billing/mgmt/billing/billingapi/models.go +++ b/profiles/preview/preview/billing/mgmt/billing/billingapi/models.go @@ -22,6 +22,7 @@ package billingapi import original "github.com/Azure/azure-sdk-for-go/services/preview/billing/mgmt/2018-11-01-preview/billing/billingapi" type AccountsClientAPI = original.AccountsClientAPI +type AccountsValidateAddressClientAPI = original.AccountsValidateAddressClientAPI type AgreementsClientAPI = original.AgreementsClientAPI type AvailableBalancesClientAPI = original.AvailableBalancesClientAPI type DepartmentsClientAPI = original.DepartmentsClientAPI diff --git a/profiles/preview/preview/billing/mgmt/billing/models.go b/profiles/preview/preview/billing/mgmt/billing/models.go index 055b44493e6e..3f4e81c9e0ac 100644 --- a/profiles/preview/preview/billing/mgmt/billing/models.go +++ b/profiles/preview/preview/billing/mgmt/billing/models.go @@ -36,6 +36,13 @@ const ( AccountTypeOrganization AccountType = original.AccountTypeOrganization ) +type AddressValidationStatus = original.AddressValidationStatus + +const ( + Invalid AddressValidationStatus = original.Invalid + Valid AddressValidationStatus = original.Valid +) + type EligibleProductType = original.EligibleProductType const ( @@ -155,6 +162,7 @@ type Account = original.Account type AccountListResult = original.AccountListResult type AccountProperties = original.AccountProperties type AccountsClient = original.AccountsClient +type AccountsValidateAddressClient = original.AccountsValidateAddressClient type Address = original.Address type Agreement = original.Agreement type AgreementListResult = original.AgreementListResult @@ -276,6 +284,7 @@ type TransfersClient = original.TransfersClient type UpdateAutoRenewOperationSummary = original.UpdateAutoRenewOperationSummary type UpdateAutoRenewOperationSummaryProperties = original.UpdateAutoRenewOperationSummaryProperties type UpdateAutoRenewRequest = original.UpdateAutoRenewRequest +type ValidateAddressResponse = original.ValidateAddressResponse func New(subscriptionID string) BaseClient { return original.New(subscriptionID) @@ -286,6 +295,12 @@ func NewAccountsClient(subscriptionID string) AccountsClient { func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient { return original.NewAccountsClientWithBaseURI(baseURI, subscriptionID) } +func NewAccountsValidateAddressClient(subscriptionID string) AccountsValidateAddressClient { + return original.NewAccountsValidateAddressClient(subscriptionID) +} +func NewAccountsValidateAddressClientWithBaseURI(baseURI string, subscriptionID string) AccountsValidateAddressClient { + return original.NewAccountsValidateAddressClientWithBaseURI(baseURI, subscriptionID) +} func NewAgreementsClient(subscriptionID string) AgreementsClient { return original.NewAgreementsClient(subscriptionID) } @@ -454,6 +469,9 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleAccountTypeValues() []AccountType { return original.PossibleAccountTypeValues() } +func PossibleAddressValidationStatusValues() []AddressValidationStatus { + return original.PossibleAddressValidationStatusValues() +} func PossibleEligibleProductTypeValues() []EligibleProductType { return original.PossibleEligibleProductTypeValues() } diff --git a/profiles/preview/preview/hanaonazure/mgmt/hanaonazure/models.go b/profiles/preview/preview/hanaonazure/mgmt/hanaonazure/models.go index 915d48037645..e53621bc833c 100644 --- a/profiles/preview/preview/hanaonazure/mgmt/hanaonazure/models.go +++ b/profiles/preview/preview/hanaonazure/mgmt/hanaonazure/models.go @@ -75,6 +75,18 @@ const ( S960m HanaInstanceSizeNamesEnum = original.S960m ) +type HanaProvisioningStatesEnum = original.HanaProvisioningStatesEnum + +const ( + Accepted HanaProvisioningStatesEnum = original.Accepted + Creating HanaProvisioningStatesEnum = original.Creating + Deleting HanaProvisioningStatesEnum = original.Deleting + Failed HanaProvisioningStatesEnum = original.Failed + Migrating HanaProvisioningStatesEnum = original.Migrating + Succeeded HanaProvisioningStatesEnum = original.Succeeded + Updating HanaProvisioningStatesEnum = original.Updating +) + type BaseClient = original.BaseClient type Disk = original.Disk type Display = original.Display @@ -82,6 +94,7 @@ type ErrorResponse = original.ErrorResponse type HanaInstance = original.HanaInstance type HanaInstanceProperties = original.HanaInstanceProperties type HanaInstancesClient = original.HanaInstancesClient +type HanaInstancesCreateFuture = original.HanaInstancesCreateFuture type HanaInstancesEnableMonitoringFuture = original.HanaInstancesEnableMonitoringFuture type HanaInstancesListResult = original.HanaInstancesListResult type HanaInstancesListResultIterator = original.HanaInstancesListResultIterator @@ -132,6 +145,9 @@ func PossibleHanaInstancePowerStateEnumValues() []HanaInstancePowerStateEnum { func PossibleHanaInstanceSizeNamesEnumValues() []HanaInstanceSizeNamesEnum { return original.PossibleHanaInstanceSizeNamesEnumValues() } +func PossibleHanaProvisioningStatesEnumValues() []HanaProvisioningStatesEnum { + return original.PossibleHanaProvisioningStatesEnumValues() +} func UserAgent() string { return original.UserAgent() + " profiles/preview" } diff --git a/services/cognitiveservices/v1.0/contentmoderator/contentmoderatorapi/interfaces.go b/services/cognitiveservices/v1.0/contentmoderator/contentmoderatorapi/interfaces.go index c5c84d592594..6f1f9a18ad0a 100644 --- a/services/cognitiveservices/v1.0/contentmoderator/contentmoderatorapi/interfaces.go +++ b/services/cognitiveservices/v1.0/contentmoderator/contentmoderatorapi/interfaces.go @@ -28,16 +28,16 @@ import ( type ImageModerationClientAPI interface { EvaluateFileInput(ctx context.Context, imageStream io.ReadCloser, cacheImage *bool) (result contentmoderator.Evaluate, err error) EvaluateMethod(ctx context.Context, cacheImage *bool) (result contentmoderator.Evaluate, err error) - EvaluateURLInput(ctx context.Context, contentType string, imageURL contentmoderator.BodyModel, cacheImage *bool) (result contentmoderator.Evaluate, err error) + EvaluateURLInput(ctx context.Context, contentType string, imageURL contentmoderator.ImageURL, cacheImage *bool) (result contentmoderator.Evaluate, err error) FindFaces(ctx context.Context, cacheImage *bool) (result contentmoderator.FoundFaces, err error) FindFacesFileInput(ctx context.Context, imageStream io.ReadCloser, cacheImage *bool) (result contentmoderator.FoundFaces, err error) - FindFacesURLInput(ctx context.Context, contentType string, imageURL contentmoderator.BodyModel, cacheImage *bool) (result contentmoderator.FoundFaces, err error) + FindFacesURLInput(ctx context.Context, contentType string, imageURL contentmoderator.ImageURL, cacheImage *bool) (result contentmoderator.FoundFaces, err error) MatchFileInput(ctx context.Context, imageStream io.ReadCloser, listID string, cacheImage *bool) (result contentmoderator.MatchResponse, err error) MatchMethod(ctx context.Context, listID string, cacheImage *bool) (result contentmoderator.MatchResponse, err error) - MatchURLInput(ctx context.Context, contentType string, imageURL contentmoderator.BodyModel, listID string, cacheImage *bool) (result contentmoderator.MatchResponse, err error) + MatchURLInput(ctx context.Context, contentType string, imageURL contentmoderator.ImageURL, listID string, cacheImage *bool) (result contentmoderator.MatchResponse, err error) OCRFileInput(ctx context.Context, language string, imageStream io.ReadCloser, cacheImage *bool, enhanced *bool) (result contentmoderator.OCR, err error) OCRMethod(ctx context.Context, language string, cacheImage *bool, enhanced *bool) (result contentmoderator.OCR, err error) - OCRURLInput(ctx context.Context, language string, contentType string, imageURL contentmoderator.BodyModel, cacheImage *bool, enhanced *bool) (result contentmoderator.OCR, err error) + OCRURLInput(ctx context.Context, language string, contentType string, imageURL contentmoderator.ImageURL, cacheImage *bool, enhanced *bool) (result contentmoderator.OCR, err error) } var _ ImageModerationClientAPI = (*contentmoderator.ImageModerationClient)(nil) @@ -78,7 +78,7 @@ var _ ListManagementTermListsClientAPI = (*contentmoderator.ListManagementTermLi type ListManagementImageClientAPI interface { AddImage(ctx context.Context, listID string, tag *int32, label string) (result contentmoderator.Image, err error) AddImageFileInput(ctx context.Context, listID string, imageStream io.ReadCloser, tag *int32, label string) (result contentmoderator.Image, err error) - AddImageURLInput(ctx context.Context, listID string, contentType string, imageURL contentmoderator.BodyModel, tag *int32, label string) (result contentmoderator.Image, err error) + AddImageURLInput(ctx context.Context, listID string, contentType string, imageURL contentmoderator.ImageURL, tag *int32, label string) (result contentmoderator.Image, err error) DeleteAllImages(ctx context.Context, listID string) (result contentmoderator.String, err error) DeleteImage(ctx context.Context, listID string, imageID string) (result contentmoderator.String, err error) GetAllImageIds(ctx context.Context, listID string) (result contentmoderator.ImageIds, err error) diff --git a/services/cognitiveservices/v1.0/contentmoderator/imagemoderation.go b/services/cognitiveservices/v1.0/contentmoderator/imagemoderation.go index d1d97e3e62af..db3a280e6545 100644 --- a/services/cognitiveservices/v1.0/contentmoderator/imagemoderation.go +++ b/services/cognitiveservices/v1.0/contentmoderator/imagemoderation.go @@ -199,7 +199,7 @@ func (client ImageModerationClient) EvaluateMethodResponder(resp *http.Response) // contentType - the content type. // imageURL - the image url. // cacheImage - whether to retain the submitted image for future use; defaults to false if omitted. -func (client ImageModerationClient) EvaluateURLInput(ctx context.Context, contentType string, imageURL BodyModel, cacheImage *bool) (result Evaluate, err error) { +func (client ImageModerationClient) EvaluateURLInput(ctx context.Context, contentType string, imageURL ImageURL, cacheImage *bool) (result Evaluate, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ImageModerationClient.EvaluateURLInput") defer func() { @@ -232,7 +232,7 @@ func (client ImageModerationClient) EvaluateURLInput(ctx context.Context, conten } // EvaluateURLInputPreparer prepares the EvaluateURLInput request. -func (client ImageModerationClient) EvaluateURLInputPreparer(ctx context.Context, contentType string, imageURL BodyModel, cacheImage *bool) (*http.Request, error) { +func (client ImageModerationClient) EvaluateURLInputPreparer(ctx context.Context, contentType string, imageURL ImageURL, cacheImage *bool) (*http.Request, error) { urlParameters := map[string]interface{}{ "Endpoint": client.Endpoint, } @@ -429,7 +429,7 @@ func (client ImageModerationClient) FindFacesFileInputResponder(resp *http.Respo // contentType - the content type. // imageURL - the image url. // cacheImage - whether to retain the submitted image for future use; defaults to false if omitted. -func (client ImageModerationClient) FindFacesURLInput(ctx context.Context, contentType string, imageURL BodyModel, cacheImage *bool) (result FoundFaces, err error) { +func (client ImageModerationClient) FindFacesURLInput(ctx context.Context, contentType string, imageURL ImageURL, cacheImage *bool) (result FoundFaces, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ImageModerationClient.FindFacesURLInput") defer func() { @@ -462,7 +462,7 @@ func (client ImageModerationClient) FindFacesURLInput(ctx context.Context, conte } // FindFacesURLInputPreparer prepares the FindFacesURLInput request. -func (client ImageModerationClient) FindFacesURLInputPreparer(ctx context.Context, contentType string, imageURL BodyModel, cacheImage *bool) (*http.Request, error) { +func (client ImageModerationClient) FindFacesURLInputPreparer(ctx context.Context, contentType string, imageURL ImageURL, cacheImage *bool) (*http.Request, error) { urlParameters := map[string]interface{}{ "Endpoint": client.Endpoint, } @@ -689,7 +689,7 @@ func (client ImageModerationClient) MatchMethodResponder(resp *http.Response) (r // imageURL - the image url. // listID - the list Id. // cacheImage - whether to retain the submitted image for future use; defaults to false if omitted. -func (client ImageModerationClient) MatchURLInput(ctx context.Context, contentType string, imageURL BodyModel, listID string, cacheImage *bool) (result MatchResponse, err error) { +func (client ImageModerationClient) MatchURLInput(ctx context.Context, contentType string, imageURL ImageURL, listID string, cacheImage *bool) (result MatchResponse, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ImageModerationClient.MatchURLInput") defer func() { @@ -722,7 +722,7 @@ func (client ImageModerationClient) MatchURLInput(ctx context.Context, contentTy } // MatchURLInputPreparer prepares the MatchURLInput request. -func (client ImageModerationClient) MatchURLInputPreparer(ctx context.Context, contentType string, imageURL BodyModel, listID string, cacheImage *bool) (*http.Request, error) { +func (client ImageModerationClient) MatchURLInputPreparer(ctx context.Context, contentType string, imageURL ImageURL, listID string, cacheImage *bool) (*http.Request, error) { urlParameters := map[string]interface{}{ "Endpoint": client.Endpoint, } @@ -960,7 +960,7 @@ func (client ImageModerationClient) OCRMethodResponder(resp *http.Response) (res // image/tiff is not supported when enhanced is set to true // // Note: This impacts the response time. -func (client ImageModerationClient) OCRURLInput(ctx context.Context, language string, contentType string, imageURL BodyModel, cacheImage *bool, enhanced *bool) (result OCR, err error) { +func (client ImageModerationClient) OCRURLInput(ctx context.Context, language string, contentType string, imageURL ImageURL, cacheImage *bool, enhanced *bool) (result OCR, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ImageModerationClient.OCRURLInput") defer func() { @@ -993,7 +993,7 @@ func (client ImageModerationClient) OCRURLInput(ctx context.Context, language st } // OCRURLInputPreparer prepares the OCRURLInput request. -func (client ImageModerationClient) OCRURLInputPreparer(ctx context.Context, language string, contentType string, imageURL BodyModel, cacheImage *bool, enhanced *bool) (*http.Request, error) { +func (client ImageModerationClient) OCRURLInputPreparer(ctx context.Context, language string, contentType string, imageURL ImageURL, cacheImage *bool, enhanced *bool) (*http.Request, error) { urlParameters := map[string]interface{}{ "Endpoint": client.Endpoint, } diff --git a/services/cognitiveservices/v1.0/contentmoderator/listmanagementimage.go b/services/cognitiveservices/v1.0/contentmoderator/listmanagementimage.go index 3a4e805fc25e..34ad8522712e 100644 --- a/services/cognitiveservices/v1.0/contentmoderator/listmanagementimage.go +++ b/services/cognitiveservices/v1.0/contentmoderator/listmanagementimage.go @@ -219,7 +219,7 @@ func (client ListManagementImageClient) AddImageFileInputResponder(resp *http.Re // imageURL - the image url. // tag - tag for the image. // label - the image label. -func (client ListManagementImageClient) AddImageURLInput(ctx context.Context, listID string, contentType string, imageURL BodyModel, tag *int32, label string) (result Image, err error) { +func (client ListManagementImageClient) AddImageURLInput(ctx context.Context, listID string, contentType string, imageURL ImageURL, tag *int32, label string) (result Image, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ListManagementImageClient.AddImageURLInput") defer func() { @@ -252,7 +252,7 @@ func (client ListManagementImageClient) AddImageURLInput(ctx context.Context, li } // AddImageURLInputPreparer prepares the AddImageURLInput request. -func (client ListManagementImageClient) AddImageURLInputPreparer(ctx context.Context, listID string, contentType string, imageURL BodyModel, tag *int32, label string) (*http.Request, error) { +func (client ListManagementImageClient) AddImageURLInputPreparer(ctx context.Context, listID string, contentType string, imageURL ImageURL, tag *int32, label string) (*http.Request, error) { urlParameters := map[string]interface{}{ "Endpoint": client.Endpoint, } diff --git a/services/cognitiveservices/v1.0/contentmoderator/models.go b/services/cognitiveservices/v1.0/contentmoderator/models.go index 5e23899ea725..a862fc827fff 100644 --- a/services/cognitiveservices/v1.0/contentmoderator/models.go +++ b/services/cognitiveservices/v1.0/contentmoderator/models.go @@ -95,12 +95,6 @@ func (b Body) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// BodyModel ... -type BodyModel struct { - DataRepresentation *string `json:"DataRepresentation,omitempty"` - Value *string `json:"Value,omitempty"` -} - // Candidate OCR candidate text. type Candidate struct { // Text - The text found. @@ -407,6 +401,12 @@ func (il ImageList) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// ImageURL ... +type ImageURL struct { + DataRepresentation *string `json:"DataRepresentation,omitempty"` + Value *string `json:"Value,omitempty"` +} + // IPA IP Address details. type IPA struct { // SubType - Subtype of the detected IP Address. diff --git a/services/cognitiveservices/v1.0/spellcheck/client.go b/services/cognitiveservices/v1.0/spellcheck/client.go index f68cb6f0cfa1..a1c420f599c7 100644 --- a/services/cognitiveservices/v1.0/spellcheck/client.go +++ b/services/cognitiveservices/v1.0/spellcheck/client.go @@ -178,7 +178,7 @@ func NewWithoutDefaults(endpoint string) BaseClient { // checked for grammar or spelling errors. The combined length of the text string, preContextText string, and // postContextText string may not exceed 10,000 characters. You may specify this parameter in the query string // of a GET request or in the body of a POST request. -func (client BaseClient) SpellCheckerMethod(ctx context.Context, textParameter string, acceptLanguage string, pragma string, userAgent string, clientID string, clientIP string, location string, actionType ActionType, appName string, countryCode string, clientMachineName string, docID string, market string, sessionID string, setLang string, userID string, mode string, preContextText string, postContextText string) (result SpellCheck, err error) { +func (client BaseClient) SpellCheckerMethod(ctx context.Context, textParameter string, acceptLanguage string, pragma string, userAgent string, clientID string, clientIP string, location string, actionType ActionType, appName string, countryCode string, clientMachineName string, docID string, market string, sessionID string, setLang string, userID string, mode Mode, preContextText string, postContextText string) (result SpellCheck, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SpellCheckerMethod") defer func() { @@ -211,7 +211,7 @@ func (client BaseClient) SpellCheckerMethod(ctx context.Context, textParameter s } // SpellCheckerMethodPreparer prepares the SpellCheckerMethod request. -func (client BaseClient) SpellCheckerMethodPreparer(ctx context.Context, textParameter string, acceptLanguage string, pragma string, userAgent string, clientID string, clientIP string, location string, actionType ActionType, appName string, countryCode string, clientMachineName string, docID string, market string, sessionID string, setLang string, userID string, mode string, preContextText string, postContextText string) (*http.Request, error) { +func (client BaseClient) SpellCheckerMethodPreparer(ctx context.Context, textParameter string, acceptLanguage string, pragma string, userAgent string, clientID string, clientIP string, location string, actionType ActionType, appName string, countryCode string, clientMachineName string, docID string, market string, sessionID string, setLang string, userID string, mode Mode, preContextText string, postContextText string) (*http.Request, error) { urlParameters := map[string]interface{}{ "Endpoint": client.Endpoint, } diff --git a/services/cognitiveservices/v1.0/spellcheck/models.go b/services/cognitiveservices/v1.0/spellcheck/models.go index cf1a931e917c..b85fd0909c25 100644 --- a/services/cognitiveservices/v1.0/spellcheck/models.go +++ b/services/cognitiveservices/v1.0/spellcheck/models.go @@ -111,6 +111,21 @@ func PossibleErrorTypeValues() []ErrorType { return []ErrorType{RepeatedToken, UnknownToken} } +// Mode enumerates the values for mode. +type Mode string + +const ( + // Proof ... + Proof Mode = "proof" + // Spell ... + Spell Mode = "spell" +) + +// PossibleModeValues returns an array of possible values for the Mode const type. +func PossibleModeValues() []Mode { + return []Mode{Proof, Spell} +} + // Type enumerates the values for type. type Type string diff --git a/services/cognitiveservices/v1.0/spellcheck/spellcheckapi/interfaces.go b/services/cognitiveservices/v1.0/spellcheck/spellcheckapi/interfaces.go index dd74a931020d..60e24222f75c 100644 --- a/services/cognitiveservices/v1.0/spellcheck/spellcheckapi/interfaces.go +++ b/services/cognitiveservices/v1.0/spellcheck/spellcheckapi/interfaces.go @@ -24,7 +24,7 @@ import ( // BaseClientAPI contains the set of methods on the BaseClient type. type BaseClientAPI interface { - SpellCheckerMethod(ctx context.Context, textParameter string, acceptLanguage string, pragma string, userAgent string, clientID string, clientIP string, location string, actionType spellcheck.ActionType, appName string, countryCode string, clientMachineName string, docID string, market string, sessionID string, setLang string, userID string, mode string, preContextText string, postContextText string) (result spellcheck.SpellCheck, err error) + SpellCheckerMethod(ctx context.Context, textParameter string, acceptLanguage string, pragma string, userAgent string, clientID string, clientIP string, location string, actionType spellcheck.ActionType, appName string, countryCode string, clientMachineName string, docID string, market string, sessionID string, setLang string, userID string, mode spellcheck.Mode, preContextText string, postContextText string) (result spellcheck.SpellCheck, err error) } var _ BaseClientAPI = (*spellcheck.BaseClient)(nil) diff --git a/services/cognitiveservices/v2.0/luis/authoring/models.go b/services/cognitiveservices/v2.0/luis/authoring/models.go index 8e0b22ca81cd..ba0a77fc7665 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/models.go +++ b/services/cognitiveservices/v2.0/luis/authoring/models.go @@ -69,13 +69,11 @@ const ( ReadableTypePrebuiltEntityExtractor ReadableType = "Prebuilt Entity Extractor" // ReadableTypeRegexEntityExtractor ... ReadableTypeRegexEntityExtractor ReadableType = "Regex Entity Extractor" - // ReadableTypeRegularExpressionEntityExtractor ... - ReadableTypeRegularExpressionEntityExtractor ReadableType = "Regular Expression Entity Extractor" ) // PossibleReadableTypeValues returns an array of possible values for the ReadableType const type. func PossibleReadableTypeValues() []ReadableType { - return []ReadableType{ReadableTypeClosedListEntityExtractor, ReadableTypeCompositeEntityExtractor, ReadableTypeEntityExtractor, ReadableTypeHierarchicalChildEntityExtractor, ReadableTypeHierarchicalEntityExtractor, ReadableTypeIntentClassifier, ReadableTypeListEntityExtractor, ReadableTypePatternAnyEntityExtractor, ReadableTypePrebuiltEntityExtractor, ReadableTypeRegexEntityExtractor, ReadableTypeRegularExpressionEntityExtractor} + return []ReadableType{ReadableTypeClosedListEntityExtractor, ReadableTypeCompositeEntityExtractor, ReadableTypeEntityExtractor, ReadableTypeHierarchicalChildEntityExtractor, ReadableTypeHierarchicalEntityExtractor, ReadableTypeIntentClassifier, ReadableTypeListEntityExtractor, ReadableTypePatternAnyEntityExtractor, ReadableTypePrebuiltEntityExtractor, ReadableTypeRegexEntityExtractor} } // ReadableType1 enumerates the values for readable type 1. @@ -102,13 +100,11 @@ const ( ReadableType1PrebuiltEntityExtractor ReadableType1 = "Prebuilt Entity Extractor" // ReadableType1RegexEntityExtractor ... ReadableType1RegexEntityExtractor ReadableType1 = "Regex Entity Extractor" - // ReadableType1RegularExpressionEntityExtractor ... - ReadableType1RegularExpressionEntityExtractor ReadableType1 = "Regular Expression Entity Extractor" ) // PossibleReadableType1Values returns an array of possible values for the ReadableType1 const type. func PossibleReadableType1Values() []ReadableType1 { - return []ReadableType1{ReadableType1ClosedListEntityExtractor, ReadableType1CompositeEntityExtractor, ReadableType1EntityExtractor, ReadableType1HierarchicalChildEntityExtractor, ReadableType1HierarchicalEntityExtractor, ReadableType1IntentClassifier, ReadableType1ListEntityExtractor, ReadableType1PatternAnyEntityExtractor, ReadableType1PrebuiltEntityExtractor, ReadableType1RegexEntityExtractor, ReadableType1RegularExpressionEntityExtractor} + return []ReadableType1{ReadableType1ClosedListEntityExtractor, ReadableType1CompositeEntityExtractor, ReadableType1EntityExtractor, ReadableType1HierarchicalChildEntityExtractor, ReadableType1HierarchicalEntityExtractor, ReadableType1IntentClassifier, ReadableType1ListEntityExtractor, ReadableType1PatternAnyEntityExtractor, ReadableType1PrebuiltEntityExtractor, ReadableType1RegexEntityExtractor} } // ReadableType10 enumerates the values for readable type 10. @@ -135,13 +131,11 @@ const ( ReadableType10PrebuiltEntityExtractor ReadableType10 = "Prebuilt Entity Extractor" // ReadableType10RegexEntityExtractor ... ReadableType10RegexEntityExtractor ReadableType10 = "Regex Entity Extractor" - // ReadableType10RegularExpressionEntityExtractor ... - ReadableType10RegularExpressionEntityExtractor ReadableType10 = "Regular Expression Entity Extractor" ) // PossibleReadableType10Values returns an array of possible values for the ReadableType10 const type. func PossibleReadableType10Values() []ReadableType10 { - return []ReadableType10{ReadableType10ClosedListEntityExtractor, ReadableType10CompositeEntityExtractor, ReadableType10EntityExtractor, ReadableType10HierarchicalChildEntityExtractor, ReadableType10HierarchicalEntityExtractor, ReadableType10IntentClassifier, ReadableType10ListEntityExtractor, ReadableType10PatternAnyEntityExtractor, ReadableType10PrebuiltEntityExtractor, ReadableType10RegexEntityExtractor, ReadableType10RegularExpressionEntityExtractor} + return []ReadableType10{ReadableType10ClosedListEntityExtractor, ReadableType10CompositeEntityExtractor, ReadableType10EntityExtractor, ReadableType10HierarchicalChildEntityExtractor, ReadableType10HierarchicalEntityExtractor, ReadableType10IntentClassifier, ReadableType10ListEntityExtractor, ReadableType10PatternAnyEntityExtractor, ReadableType10PrebuiltEntityExtractor, ReadableType10RegexEntityExtractor} } // ReadableType2 enumerates the values for readable type 2. @@ -168,13 +162,11 @@ const ( ReadableType2PrebuiltEntityExtractor ReadableType2 = "Prebuilt Entity Extractor" // ReadableType2RegexEntityExtractor ... ReadableType2RegexEntityExtractor ReadableType2 = "Regex Entity Extractor" - // ReadableType2RegularExpressionEntityExtractor ... - ReadableType2RegularExpressionEntityExtractor ReadableType2 = "Regular Expression Entity Extractor" ) // PossibleReadableType2Values returns an array of possible values for the ReadableType2 const type. func PossibleReadableType2Values() []ReadableType2 { - return []ReadableType2{ReadableType2ClosedListEntityExtractor, ReadableType2CompositeEntityExtractor, ReadableType2EntityExtractor, ReadableType2HierarchicalChildEntityExtractor, ReadableType2HierarchicalEntityExtractor, ReadableType2IntentClassifier, ReadableType2ListEntityExtractor, ReadableType2PatternAnyEntityExtractor, ReadableType2PrebuiltEntityExtractor, ReadableType2RegexEntityExtractor, ReadableType2RegularExpressionEntityExtractor} + return []ReadableType2{ReadableType2ClosedListEntityExtractor, ReadableType2CompositeEntityExtractor, ReadableType2EntityExtractor, ReadableType2HierarchicalChildEntityExtractor, ReadableType2HierarchicalEntityExtractor, ReadableType2IntentClassifier, ReadableType2ListEntityExtractor, ReadableType2PatternAnyEntityExtractor, ReadableType2PrebuiltEntityExtractor, ReadableType2RegexEntityExtractor} } // ReadableType3 enumerates the values for readable type 3. @@ -201,13 +193,11 @@ const ( ReadableType3PrebuiltEntityExtractor ReadableType3 = "Prebuilt Entity Extractor" // ReadableType3RegexEntityExtractor ... ReadableType3RegexEntityExtractor ReadableType3 = "Regex Entity Extractor" - // ReadableType3RegularExpressionEntityExtractor ... - ReadableType3RegularExpressionEntityExtractor ReadableType3 = "Regular Expression Entity Extractor" ) // PossibleReadableType3Values returns an array of possible values for the ReadableType3 const type. func PossibleReadableType3Values() []ReadableType3 { - return []ReadableType3{ReadableType3ClosedListEntityExtractor, ReadableType3CompositeEntityExtractor, ReadableType3EntityExtractor, ReadableType3HierarchicalChildEntityExtractor, ReadableType3HierarchicalEntityExtractor, ReadableType3IntentClassifier, ReadableType3ListEntityExtractor, ReadableType3PatternAnyEntityExtractor, ReadableType3PrebuiltEntityExtractor, ReadableType3RegexEntityExtractor, ReadableType3RegularExpressionEntityExtractor} + return []ReadableType3{ReadableType3ClosedListEntityExtractor, ReadableType3CompositeEntityExtractor, ReadableType3EntityExtractor, ReadableType3HierarchicalChildEntityExtractor, ReadableType3HierarchicalEntityExtractor, ReadableType3IntentClassifier, ReadableType3ListEntityExtractor, ReadableType3PatternAnyEntityExtractor, ReadableType3PrebuiltEntityExtractor, ReadableType3RegexEntityExtractor} } // ReadableType4 enumerates the values for readable type 4. @@ -234,13 +224,11 @@ const ( ReadableType4PrebuiltEntityExtractor ReadableType4 = "Prebuilt Entity Extractor" // ReadableType4RegexEntityExtractor ... ReadableType4RegexEntityExtractor ReadableType4 = "Regex Entity Extractor" - // ReadableType4RegularExpressionEntityExtractor ... - ReadableType4RegularExpressionEntityExtractor ReadableType4 = "Regular Expression Entity Extractor" ) // PossibleReadableType4Values returns an array of possible values for the ReadableType4 const type. func PossibleReadableType4Values() []ReadableType4 { - return []ReadableType4{ReadableType4ClosedListEntityExtractor, ReadableType4CompositeEntityExtractor, ReadableType4EntityExtractor, ReadableType4HierarchicalChildEntityExtractor, ReadableType4HierarchicalEntityExtractor, ReadableType4IntentClassifier, ReadableType4ListEntityExtractor, ReadableType4PatternAnyEntityExtractor, ReadableType4PrebuiltEntityExtractor, ReadableType4RegexEntityExtractor, ReadableType4RegularExpressionEntityExtractor} + return []ReadableType4{ReadableType4ClosedListEntityExtractor, ReadableType4CompositeEntityExtractor, ReadableType4EntityExtractor, ReadableType4HierarchicalChildEntityExtractor, ReadableType4HierarchicalEntityExtractor, ReadableType4IntentClassifier, ReadableType4ListEntityExtractor, ReadableType4PatternAnyEntityExtractor, ReadableType4PrebuiltEntityExtractor, ReadableType4RegexEntityExtractor} } // ReadableType5 enumerates the values for readable type 5. @@ -267,13 +255,11 @@ const ( ReadableType5PrebuiltEntityExtractor ReadableType5 = "Prebuilt Entity Extractor" // ReadableType5RegexEntityExtractor ... ReadableType5RegexEntityExtractor ReadableType5 = "Regex Entity Extractor" - // ReadableType5RegularExpressionEntityExtractor ... - ReadableType5RegularExpressionEntityExtractor ReadableType5 = "Regular Expression Entity Extractor" ) // PossibleReadableType5Values returns an array of possible values for the ReadableType5 const type. func PossibleReadableType5Values() []ReadableType5 { - return []ReadableType5{ReadableType5ClosedListEntityExtractor, ReadableType5CompositeEntityExtractor, ReadableType5EntityExtractor, ReadableType5HierarchicalChildEntityExtractor, ReadableType5HierarchicalEntityExtractor, ReadableType5IntentClassifier, ReadableType5ListEntityExtractor, ReadableType5PatternAnyEntityExtractor, ReadableType5PrebuiltEntityExtractor, ReadableType5RegexEntityExtractor, ReadableType5RegularExpressionEntityExtractor} + return []ReadableType5{ReadableType5ClosedListEntityExtractor, ReadableType5CompositeEntityExtractor, ReadableType5EntityExtractor, ReadableType5HierarchicalChildEntityExtractor, ReadableType5HierarchicalEntityExtractor, ReadableType5IntentClassifier, ReadableType5ListEntityExtractor, ReadableType5PatternAnyEntityExtractor, ReadableType5PrebuiltEntityExtractor, ReadableType5RegexEntityExtractor} } // ReadableType6 enumerates the values for readable type 6. @@ -300,13 +286,11 @@ const ( ReadableType6PrebuiltEntityExtractor ReadableType6 = "Prebuilt Entity Extractor" // ReadableType6RegexEntityExtractor ... ReadableType6RegexEntityExtractor ReadableType6 = "Regex Entity Extractor" - // ReadableType6RegularExpressionEntityExtractor ... - ReadableType6RegularExpressionEntityExtractor ReadableType6 = "Regular Expression Entity Extractor" ) // PossibleReadableType6Values returns an array of possible values for the ReadableType6 const type. func PossibleReadableType6Values() []ReadableType6 { - return []ReadableType6{ReadableType6ClosedListEntityExtractor, ReadableType6CompositeEntityExtractor, ReadableType6EntityExtractor, ReadableType6HierarchicalChildEntityExtractor, ReadableType6HierarchicalEntityExtractor, ReadableType6IntentClassifier, ReadableType6ListEntityExtractor, ReadableType6PatternAnyEntityExtractor, ReadableType6PrebuiltEntityExtractor, ReadableType6RegexEntityExtractor, ReadableType6RegularExpressionEntityExtractor} + return []ReadableType6{ReadableType6ClosedListEntityExtractor, ReadableType6CompositeEntityExtractor, ReadableType6EntityExtractor, ReadableType6HierarchicalChildEntityExtractor, ReadableType6HierarchicalEntityExtractor, ReadableType6IntentClassifier, ReadableType6ListEntityExtractor, ReadableType6PatternAnyEntityExtractor, ReadableType6PrebuiltEntityExtractor, ReadableType6RegexEntityExtractor} } // ReadableType7 enumerates the values for readable type 7. @@ -333,13 +317,11 @@ const ( ReadableType7PrebuiltEntityExtractor ReadableType7 = "Prebuilt Entity Extractor" // ReadableType7RegexEntityExtractor ... ReadableType7RegexEntityExtractor ReadableType7 = "Regex Entity Extractor" - // ReadableType7RegularExpressionEntityExtractor ... - ReadableType7RegularExpressionEntityExtractor ReadableType7 = "Regular Expression Entity Extractor" ) // PossibleReadableType7Values returns an array of possible values for the ReadableType7 const type. func PossibleReadableType7Values() []ReadableType7 { - return []ReadableType7{ReadableType7ClosedListEntityExtractor, ReadableType7CompositeEntityExtractor, ReadableType7EntityExtractor, ReadableType7HierarchicalChildEntityExtractor, ReadableType7HierarchicalEntityExtractor, ReadableType7IntentClassifier, ReadableType7ListEntityExtractor, ReadableType7PatternAnyEntityExtractor, ReadableType7PrebuiltEntityExtractor, ReadableType7RegexEntityExtractor, ReadableType7RegularExpressionEntityExtractor} + return []ReadableType7{ReadableType7ClosedListEntityExtractor, ReadableType7CompositeEntityExtractor, ReadableType7EntityExtractor, ReadableType7HierarchicalChildEntityExtractor, ReadableType7HierarchicalEntityExtractor, ReadableType7IntentClassifier, ReadableType7ListEntityExtractor, ReadableType7PatternAnyEntityExtractor, ReadableType7PrebuiltEntityExtractor, ReadableType7RegexEntityExtractor} } // ReadableType8 enumerates the values for readable type 8. @@ -366,13 +348,11 @@ const ( ReadableType8PrebuiltEntityExtractor ReadableType8 = "Prebuilt Entity Extractor" // ReadableType8RegexEntityExtractor ... ReadableType8RegexEntityExtractor ReadableType8 = "Regex Entity Extractor" - // ReadableType8RegularExpressionEntityExtractor ... - ReadableType8RegularExpressionEntityExtractor ReadableType8 = "Regular Expression Entity Extractor" ) // PossibleReadableType8Values returns an array of possible values for the ReadableType8 const type. func PossibleReadableType8Values() []ReadableType8 { - return []ReadableType8{ReadableType8ClosedListEntityExtractor, ReadableType8CompositeEntityExtractor, ReadableType8EntityExtractor, ReadableType8HierarchicalChildEntityExtractor, ReadableType8HierarchicalEntityExtractor, ReadableType8IntentClassifier, ReadableType8ListEntityExtractor, ReadableType8PatternAnyEntityExtractor, ReadableType8PrebuiltEntityExtractor, ReadableType8RegexEntityExtractor, ReadableType8RegularExpressionEntityExtractor} + return []ReadableType8{ReadableType8ClosedListEntityExtractor, ReadableType8CompositeEntityExtractor, ReadableType8EntityExtractor, ReadableType8HierarchicalChildEntityExtractor, ReadableType8HierarchicalEntityExtractor, ReadableType8IntentClassifier, ReadableType8ListEntityExtractor, ReadableType8PatternAnyEntityExtractor, ReadableType8PrebuiltEntityExtractor, ReadableType8RegexEntityExtractor} } // ReadableType9 enumerates the values for readable type 9. @@ -399,13 +379,11 @@ const ( ReadableType9PrebuiltEntityExtractor ReadableType9 = "Prebuilt Entity Extractor" // ReadableType9RegexEntityExtractor ... ReadableType9RegexEntityExtractor ReadableType9 = "Regex Entity Extractor" - // ReadableType9RegularExpressionEntityExtractor ... - ReadableType9RegularExpressionEntityExtractor ReadableType9 = "Regular Expression Entity Extractor" ) // PossibleReadableType9Values returns an array of possible values for the ReadableType9 const type. func PossibleReadableType9Values() []ReadableType9 { - return []ReadableType9{ReadableType9ClosedListEntityExtractor, ReadableType9CompositeEntityExtractor, ReadableType9EntityExtractor, ReadableType9HierarchicalChildEntityExtractor, ReadableType9HierarchicalEntityExtractor, ReadableType9IntentClassifier, ReadableType9ListEntityExtractor, ReadableType9PatternAnyEntityExtractor, ReadableType9PrebuiltEntityExtractor, ReadableType9RegexEntityExtractor, ReadableType9RegularExpressionEntityExtractor} + return []ReadableType9{ReadableType9ClosedListEntityExtractor, ReadableType9CompositeEntityExtractor, ReadableType9EntityExtractor, ReadableType9HierarchicalChildEntityExtractor, ReadableType9HierarchicalEntityExtractor, ReadableType9IntentClassifier, ReadableType9ListEntityExtractor, ReadableType9PatternAnyEntityExtractor, ReadableType9PrebuiltEntityExtractor, ReadableType9RegexEntityExtractor} } // Status enumerates the values for status. @@ -610,7 +588,7 @@ type ClosedListEntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType4EntityExtractor', 'ReadableType4HierarchicalEntityExtractor', 'ReadableType4HierarchicalChildEntityExtractor', 'ReadableType4CompositeEntityExtractor', 'ReadableType4ListEntityExtractor', 'ReadableType4PrebuiltEntityExtractor', 'ReadableType4IntentClassifier', 'ReadableType4PatternAnyEntityExtractor', 'ReadableType4RegularExpressionEntityExtractor', 'ReadableType4ClosedListEntityExtractor', 'ReadableType4RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType4EntityExtractor', 'ReadableType4HierarchicalEntityExtractor', 'ReadableType4HierarchicalChildEntityExtractor', 'ReadableType4CompositeEntityExtractor', 'ReadableType4ListEntityExtractor', 'ReadableType4PrebuiltEntityExtractor', 'ReadableType4IntentClassifier', 'ReadableType4PatternAnyEntityExtractor', 'ReadableType4ClosedListEntityExtractor', 'ReadableType4RegexEntityExtractor' ReadableType ReadableType4 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` // SubLists - List of sublists. @@ -659,7 +637,7 @@ type CompositeEntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType3EntityExtractor', 'ReadableType3HierarchicalEntityExtractor', 'ReadableType3HierarchicalChildEntityExtractor', 'ReadableType3CompositeEntityExtractor', 'ReadableType3ListEntityExtractor', 'ReadableType3PrebuiltEntityExtractor', 'ReadableType3IntentClassifier', 'ReadableType3PatternAnyEntityExtractor', 'ReadableType3RegularExpressionEntityExtractor', 'ReadableType3ClosedListEntityExtractor', 'ReadableType3RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType3EntityExtractor', 'ReadableType3HierarchicalEntityExtractor', 'ReadableType3HierarchicalChildEntityExtractor', 'ReadableType3CompositeEntityExtractor', 'ReadableType3ListEntityExtractor', 'ReadableType3PrebuiltEntityExtractor', 'ReadableType3IntentClassifier', 'ReadableType3PatternAnyEntityExtractor', 'ReadableType3ClosedListEntityExtractor', 'ReadableType3RegexEntityExtractor' ReadableType ReadableType3 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` // Children - List of child entities. @@ -682,7 +660,7 @@ type CustomPrebuiltModel struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType7EntityExtractor', 'ReadableType7HierarchicalEntityExtractor', 'ReadableType7HierarchicalChildEntityExtractor', 'ReadableType7CompositeEntityExtractor', 'ReadableType7ListEntityExtractor', 'ReadableType7PrebuiltEntityExtractor', 'ReadableType7IntentClassifier', 'ReadableType7PatternAnyEntityExtractor', 'ReadableType7RegularExpressionEntityExtractor', 'ReadableType7ClosedListEntityExtractor', 'ReadableType7RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType7EntityExtractor', 'ReadableType7HierarchicalEntityExtractor', 'ReadableType7HierarchicalChildEntityExtractor', 'ReadableType7CompositeEntityExtractor', 'ReadableType7ListEntityExtractor', 'ReadableType7PrebuiltEntityExtractor', 'ReadableType7IntentClassifier', 'ReadableType7PatternAnyEntityExtractor', 'ReadableType7ClosedListEntityExtractor', 'ReadableType7RegexEntityExtractor' ReadableType ReadableType7 `json:"readableType,omitempty"` // CustomPrebuiltDomainName - The domain name. CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"` @@ -741,7 +719,7 @@ type EntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType8EntityExtractor', 'ReadableType8HierarchicalEntityExtractor', 'ReadableType8HierarchicalChildEntityExtractor', 'ReadableType8CompositeEntityExtractor', 'ReadableType8ListEntityExtractor', 'ReadableType8PrebuiltEntityExtractor', 'ReadableType8IntentClassifier', 'ReadableType8PatternAnyEntityExtractor', 'ReadableType8RegularExpressionEntityExtractor', 'ReadableType8ClosedListEntityExtractor', 'ReadableType8RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType8EntityExtractor', 'ReadableType8HierarchicalEntityExtractor', 'ReadableType8HierarchicalChildEntityExtractor', 'ReadableType8CompositeEntityExtractor', 'ReadableType8ListEntityExtractor', 'ReadableType8PrebuiltEntityExtractor', 'ReadableType8IntentClassifier', 'ReadableType8PatternAnyEntityExtractor', 'ReadableType8ClosedListEntityExtractor', 'ReadableType8RegexEntityExtractor' ReadableType ReadableType8 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` // CustomPrebuiltDomainName - The domain name. @@ -779,7 +757,7 @@ type EntityModelInfo struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegularExpressionEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypeRegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypeRegexEntityExtractor' ReadableType ReadableType `json:"readableType,omitempty"` } @@ -924,7 +902,7 @@ type HierarchicalChildEntity struct { autorest.Response `json:"-"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType6EntityExtractor', 'ReadableType6HierarchicalEntityExtractor', 'ReadableType6HierarchicalChildEntityExtractor', 'ReadableType6CompositeEntityExtractor', 'ReadableType6ListEntityExtractor', 'ReadableType6PrebuiltEntityExtractor', 'ReadableType6IntentClassifier', 'ReadableType6PatternAnyEntityExtractor', 'ReadableType6RegularExpressionEntityExtractor', 'ReadableType6ClosedListEntityExtractor', 'ReadableType6RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType6EntityExtractor', 'ReadableType6HierarchicalEntityExtractor', 'ReadableType6HierarchicalChildEntityExtractor', 'ReadableType6CompositeEntityExtractor', 'ReadableType6ListEntityExtractor', 'ReadableType6PrebuiltEntityExtractor', 'ReadableType6IntentClassifier', 'ReadableType6PatternAnyEntityExtractor', 'ReadableType6ClosedListEntityExtractor', 'ReadableType6RegexEntityExtractor' ReadableType ReadableType6 `json:"readableType,omitempty"` // ID - The ID (GUID) belonging to a child entity. ID *uuid.UUID `json:"id,omitempty"` @@ -951,7 +929,7 @@ type HierarchicalEntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType2EntityExtractor', 'ReadableType2HierarchicalEntityExtractor', 'ReadableType2HierarchicalChildEntityExtractor', 'ReadableType2CompositeEntityExtractor', 'ReadableType2ListEntityExtractor', 'ReadableType2PrebuiltEntityExtractor', 'ReadableType2IntentClassifier', 'ReadableType2PatternAnyEntityExtractor', 'ReadableType2RegularExpressionEntityExtractor', 'ReadableType2ClosedListEntityExtractor', 'ReadableType2RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType2EntityExtractor', 'ReadableType2HierarchicalEntityExtractor', 'ReadableType2HierarchicalChildEntityExtractor', 'ReadableType2CompositeEntityExtractor', 'ReadableType2ListEntityExtractor', 'ReadableType2PrebuiltEntityExtractor', 'ReadableType2IntentClassifier', 'ReadableType2PatternAnyEntityExtractor', 'ReadableType2ClosedListEntityExtractor', 'ReadableType2RegexEntityExtractor' ReadableType ReadableType2 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` // Children - List of child entities. @@ -999,7 +977,7 @@ type IntentClassifier struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegularExpressionEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypeRegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypeRegexEntityExtractor' ReadableType ReadableType `json:"readableType,omitempty"` } @@ -1547,7 +1525,7 @@ type ModelInfo struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegularExpressionEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypeRegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypeRegexEntityExtractor' ReadableType ReadableType `json:"readableType,omitempty"` } @@ -1559,7 +1537,7 @@ type ModelInfoResponse struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType1EntityExtractor', 'ReadableType1HierarchicalEntityExtractor', 'ReadableType1HierarchicalChildEntityExtractor', 'ReadableType1CompositeEntityExtractor', 'ReadableType1ListEntityExtractor', 'ReadableType1PrebuiltEntityExtractor', 'ReadableType1IntentClassifier', 'ReadableType1PatternAnyEntityExtractor', 'ReadableType1RegularExpressionEntityExtractor', 'ReadableType1ClosedListEntityExtractor', 'ReadableType1RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType1EntityExtractor', 'ReadableType1HierarchicalEntityExtractor', 'ReadableType1HierarchicalChildEntityExtractor', 'ReadableType1CompositeEntityExtractor', 'ReadableType1ListEntityExtractor', 'ReadableType1PrebuiltEntityExtractor', 'ReadableType1IntentClassifier', 'ReadableType1PatternAnyEntityExtractor', 'ReadableType1ClosedListEntityExtractor', 'ReadableType1RegexEntityExtractor' ReadableType ReadableType1 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` // Children - List of child entities. @@ -1633,7 +1611,7 @@ type PatternAnyEntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType10EntityExtractor', 'ReadableType10HierarchicalEntityExtractor', 'ReadableType10HierarchicalChildEntityExtractor', 'ReadableType10CompositeEntityExtractor', 'ReadableType10ListEntityExtractor', 'ReadableType10PrebuiltEntityExtractor', 'ReadableType10IntentClassifier', 'ReadableType10PatternAnyEntityExtractor', 'ReadableType10RegularExpressionEntityExtractor', 'ReadableType10ClosedListEntityExtractor', 'ReadableType10RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType10EntityExtractor', 'ReadableType10HierarchicalEntityExtractor', 'ReadableType10HierarchicalChildEntityExtractor', 'ReadableType10CompositeEntityExtractor', 'ReadableType10ListEntityExtractor', 'ReadableType10PrebuiltEntityExtractor', 'ReadableType10IntentClassifier', 'ReadableType10PatternAnyEntityExtractor', 'ReadableType10ClosedListEntityExtractor', 'ReadableType10RegexEntityExtractor' ReadableType ReadableType10 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` ExplicitList *[]ExplicitListItem `json:"explicitList,omitempty"` @@ -1842,7 +1820,7 @@ type PrebuiltEntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType5EntityExtractor', 'ReadableType5HierarchicalEntityExtractor', 'ReadableType5HierarchicalChildEntityExtractor', 'ReadableType5CompositeEntityExtractor', 'ReadableType5ListEntityExtractor', 'ReadableType5PrebuiltEntityExtractor', 'ReadableType5IntentClassifier', 'ReadableType5PatternAnyEntityExtractor', 'ReadableType5RegularExpressionEntityExtractor', 'ReadableType5ClosedListEntityExtractor', 'ReadableType5RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType5EntityExtractor', 'ReadableType5HierarchicalEntityExtractor', 'ReadableType5HierarchicalChildEntityExtractor', 'ReadableType5CompositeEntityExtractor', 'ReadableType5ListEntityExtractor', 'ReadableType5PrebuiltEntityExtractor', 'ReadableType5IntentClassifier', 'ReadableType5PatternAnyEntityExtractor', 'ReadableType5ClosedListEntityExtractor', 'ReadableType5RegexEntityExtractor' ReadableType ReadableType5 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` } @@ -1913,7 +1891,7 @@ type RegexEntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType9EntityExtractor', 'ReadableType9HierarchicalEntityExtractor', 'ReadableType9HierarchicalChildEntityExtractor', 'ReadableType9CompositeEntityExtractor', 'ReadableType9ListEntityExtractor', 'ReadableType9PrebuiltEntityExtractor', 'ReadableType9IntentClassifier', 'ReadableType9PatternAnyEntityExtractor', 'ReadableType9RegularExpressionEntityExtractor', 'ReadableType9ClosedListEntityExtractor', 'ReadableType9RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType9EntityExtractor', 'ReadableType9HierarchicalEntityExtractor', 'ReadableType9HierarchicalChildEntityExtractor', 'ReadableType9CompositeEntityExtractor', 'ReadableType9ListEntityExtractor', 'ReadableType9PrebuiltEntityExtractor', 'ReadableType9IntentClassifier', 'ReadableType9PatternAnyEntityExtractor', 'ReadableType9ClosedListEntityExtractor', 'ReadableType9RegexEntityExtractor' ReadableType ReadableType9 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` // RegexPattern - The Regular Expression entity pattern. diff --git a/services/devspaces/mgmt/2019-04-01/devspaces/client.go b/services/devspaces/mgmt/2019-04-01/devspaces/client.go new file mode 100644 index 000000000000..036d8f5c358a --- /dev/null +++ b/services/devspaces/mgmt/2019-04-01/devspaces/client.go @@ -0,0 +1,51 @@ +// Package devspaces implements the Azure ARM Devspaces service API version 2019-04-01. +// +// Dev Spaces Client +package devspaces + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the 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 Devspaces + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Devspaces. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the BaseClient client. +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/services/devspaces/mgmt/2019-04-01/devspaces/containerhostmappings.go b/services/devspaces/mgmt/2019-04-01/devspaces/containerhostmappings.go new file mode 100644 index 000000000000..e497f1441580 --- /dev/null +++ b/services/devspaces/mgmt/2019-04-01/devspaces/containerhostmappings.go @@ -0,0 +1,129 @@ +package devspaces + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ContainerHostMappingsClient is the dev Spaces Client +type ContainerHostMappingsClient struct { + BaseClient +} + +// NewContainerHostMappingsClient creates an instance of the ContainerHostMappingsClient client. +func NewContainerHostMappingsClient(subscriptionID string) ContainerHostMappingsClient { + return NewContainerHostMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewContainerHostMappingsClientWithBaseURI creates an instance of the ContainerHostMappingsClient client. +func NewContainerHostMappingsClientWithBaseURI(baseURI string, subscriptionID string) ContainerHostMappingsClient { + return ContainerHostMappingsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// GetContainerHostMapping sends the get container host mapping request. +// Parameters: +// resourceGroupName - resource group to which the resource belongs. +// location - location of the container host. +func (client ContainerHostMappingsClient) GetContainerHostMapping(ctx context.Context, containerHostMapping ContainerHostMapping, resourceGroupName string, location string) (result ContainerHostMapping, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerHostMappingsClient.GetContainerHostMapping") + defer func() { + 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}}}}); err != nil { + return result, validation.NewError("devspaces.ContainerHostMappingsClient", "GetContainerHostMapping", err.Error()) + } + + req, err := client.GetContainerHostMappingPreparer(ctx, containerHostMapping, resourceGroupName, location) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ContainerHostMappingsClient", "GetContainerHostMapping", nil, "Failure preparing request") + return + } + + resp, err := client.GetContainerHostMappingSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "devspaces.ContainerHostMappingsClient", "GetContainerHostMapping", resp, "Failure sending request") + return + } + + result, err = client.GetContainerHostMappingResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ContainerHostMappingsClient", "GetContainerHostMapping", resp, "Failure responding to request") + } + + return +} + +// GetContainerHostMappingPreparer prepares the GetContainerHostMapping request. +func (client ContainerHostMappingsClient) GetContainerHostMappingPreparer(ctx context.Context, containerHostMapping ContainerHostMapping, 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-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + containerHostMapping.MappedControllerResourceID = 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.DevSpaces/locations/{location}/checkContainerHostMapping", pathParameters), + autorest.WithJSON(containerHostMapping), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetContainerHostMappingSender sends the GetContainerHostMapping request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerHostMappingsClient) GetContainerHostMappingSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetContainerHostMappingResponder handles the response to the GetContainerHostMapping request. The method always +// closes the http.Response Body. +func (client ContainerHostMappingsClient) GetContainerHostMappingResponder(resp *http.Response) (result ContainerHostMapping, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/devspaces/mgmt/2019-04-01/devspaces/controllers.go b/services/devspaces/mgmt/2019-04-01/devspaces/controllers.go new file mode 100644 index 000000000000..87d04d59163b --- /dev/null +++ b/services/devspaces/mgmt/2019-04-01/devspaces/controllers.go @@ -0,0 +1,731 @@ +package devspaces + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ControllersClient is the dev Spaces Client +type ControllersClient struct { + BaseClient +} + +// NewControllersClient creates an instance of the ControllersClient client. +func NewControllersClient(subscriptionID string) ControllersClient { + return NewControllersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewControllersClientWithBaseURI creates an instance of the ControllersClient client. +func NewControllersClientWithBaseURI(baseURI string, subscriptionID string) ControllersClient { + return ControllersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates an Azure Dev Spaces Controller with the specified create parameters. +// Parameters: +// resourceGroupName - resource group to which the resource belongs. +// name - name of the resource. +// controller - controller create parameters. +func (client ControllersClient) Create(ctx context.Context, resourceGroupName string, name string, controller Controller) (result ControllersCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: name, + Constraints: []validation.Constraint{{Target: "name", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "name", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "name", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$`, Chain: nil}}}, + {TargetValue: controller, + Constraints: []validation.Constraint{{Target: "controller.ControllerProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "controller.ControllerProperties.TargetContainerHostResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "controller.ControllerProperties.TargetContainerHostCredentialsBase64", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "controller.Sku", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "controller.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("devspaces.ControllersClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, name, controller) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ControllersClient) CreatePreparer(ctx context.Context, resourceGroupName string, name string, controller Controller) (*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-04-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.DevSpaces/controllers/{name}", pathParameters), + autorest.WithJSON(controller), + 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 ControllersClient) CreateSender(req *http.Request) (future ControllersCreateFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + 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 ControllersClient) CreateResponder(resp *http.Response) (result Controller, 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 an existing Azure Dev Spaces Controller. +// Parameters: +// resourceGroupName - resource group to which the resource belongs. +// name - name of the resource. +func (client ControllersClient) Delete(ctx context.Context, resourceGroupName string, name string) (result ControllersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.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}}}, + {TargetValue: name, + Constraints: []validation.Constraint{{Target: "name", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "name", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "name", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("devspaces.ControllersClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ControllersClient) 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-04-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.DevSpaces/controllers/{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 ControllersClient) DeleteSender(req *http.Request) (future ControllersDeleteFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + 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 ControllersClient) 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 for an Azure Dev Spaces Controller. +// Parameters: +// resourceGroupName - resource group to which the resource belongs. +// name - name of the resource. +func (client ControllersClient) Get(ctx context.Context, resourceGroupName string, name string) (result Controller, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.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}}}, + {TargetValue: name, + Constraints: []validation.Constraint{{Target: "name", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "name", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "name", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("devspaces.ControllersClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ControllersClient) GetPreparer(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-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/controllers/{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 ControllersClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ControllersClient) GetResponder(resp *http.Response) (result Controller, 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 Dev Spaces Controllers with their properties in the subscription. +func (client ControllersClient) List(ctx context.Context) (result ControllerListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.List") + defer func() { + sc := -1 + if result.cl.Response.Response != nil { + sc = result.cl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.cl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "List", resp, "Failure sending request") + return + } + + result.cl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ControllersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DevSpaces/controllers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ControllersClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ControllersClient) ListResponder(resp *http.Response) (result ControllerList, 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 ControllersClient) listNextResults(ctx context.Context, lastResults ControllerList) (result ControllerList, err error) { + req, err := lastResults.controllerListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "devspaces.ControllersClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "devspaces.ControllersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ControllersClient) ListComplete(ctx context.Context) (result ControllerListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.List") + defer func() { + sc := -1 + 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 Azure Dev Spaces Controllers with their properties in the specified resource group +// and subscription. +// Parameters: +// resourceGroupName - resource group to which the resource belongs. +func (client ControllersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ControllerListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.cl.Response.Response != nil { + sc = result.cl.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}}}}); err != nil { + return result, validation.NewError("devspaces.ControllersClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.cl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.cl, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ControllersClient) 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-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/controllers", 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 ControllersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ControllersClient) ListByResourceGroupResponder(resp *http.Response) (result ControllerList, 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 ControllersClient) listByResourceGroupNextResults(ctx context.Context, lastResults ControllerList) (result ControllerList, err error) { + req, err := lastResults.controllerListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "devspaces.ControllersClient", "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, "devspaces.ControllersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ControllersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ControllerListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.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 +} + +// ListConnectionDetails lists connection details for the underlying container resources of an Azure Dev Spaces +// Controller. +// Parameters: +// resourceGroupName - resource group to which the resource belongs. +// name - name of the resource. +// listConnectionDetailsParameters - parameters for listing connection details of Azure Dev Spaces Controller. +func (client ControllersClient) ListConnectionDetails(ctx context.Context, resourceGroupName string, name string, listConnectionDetailsParameters ListConnectionDetailsParameters) (result ControllerConnectionDetailsList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.ListConnectionDetails") + defer func() { + 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}}}, + {TargetValue: name, + Constraints: []validation.Constraint{{Target: "name", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "name", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "name", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$`, Chain: nil}}}, + {TargetValue: listConnectionDetailsParameters, + Constraints: []validation.Constraint{{Target: "listConnectionDetailsParameters.TargetContainerHostResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("devspaces.ControllersClient", "ListConnectionDetails", err.Error()) + } + + req, err := client.ListConnectionDetailsPreparer(ctx, resourceGroupName, name, listConnectionDetailsParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "ListConnectionDetails", nil, "Failure preparing request") + return + } + + resp, err := client.ListConnectionDetailsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "ListConnectionDetails", resp, "Failure sending request") + return + } + + result, err = client.ListConnectionDetailsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "ListConnectionDetails", resp, "Failure responding to request") + } + + return +} + +// ListConnectionDetailsPreparer prepares the ListConnectionDetails request. +func (client ControllersClient) ListConnectionDetailsPreparer(ctx context.Context, resourceGroupName string, name string, listConnectionDetailsParameters ListConnectionDetailsParameters) (*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-04-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.DevSpaces/controllers/{name}/listConnectionDetails", pathParameters), + autorest.WithJSON(listConnectionDetailsParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListConnectionDetailsSender sends the ListConnectionDetails request. The method will close the +// http.Response Body if it receives an error. +func (client ControllersClient) ListConnectionDetailsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListConnectionDetailsResponder handles the response to the ListConnectionDetails request. The method always +// closes the http.Response Body. +func (client ControllersClient) ListConnectionDetailsResponder(resp *http.Response) (result ControllerConnectionDetailsList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters. +// Parameters: +// resourceGroupName - resource group to which the resource belongs. +// name - name of the resource. +// controllerUpdateParameters - parameters for updating the Azure Dev Spaces Controller. +func (client ControllersClient) Update(ctx context.Context, resourceGroupName string, name string, controllerUpdateParameters ControllerUpdateParameters) (result Controller, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.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}}}, + {TargetValue: name, + Constraints: []validation.Constraint{{Target: "name", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "name", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "name", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("devspaces.ControllersClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, name, controllerUpdateParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ControllersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, name string, controllerUpdateParameters ControllerUpdateParameters) (*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-04-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.DevSpaces/controllers/{name}", pathParameters), + autorest.WithJSON(controllerUpdateParameters), + 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 ControllersClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ControllersClient) UpdateResponder(resp *http.Response) (result Controller, 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/devspaces/mgmt/2019-04-01/devspaces/devspacesapi/interfaces.go b/services/devspaces/mgmt/2019-04-01/devspaces/devspacesapi/interfaces.go new file mode 100644 index 000000000000..0c6ca34b43e5 --- /dev/null +++ b/services/devspaces/mgmt/2019-04-01/devspaces/devspacesapi/interfaces.go @@ -0,0 +1,50 @@ +package devspacesapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by 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/devspaces/mgmt/2019-04-01/devspaces" +) + +// ContainerHostMappingsClientAPI contains the set of methods on the ContainerHostMappingsClient type. +type ContainerHostMappingsClientAPI interface { + GetContainerHostMapping(ctx context.Context, containerHostMapping devspaces.ContainerHostMapping, resourceGroupName string, location string) (result devspaces.ContainerHostMapping, err error) +} + +var _ ContainerHostMappingsClientAPI = (*devspaces.ContainerHostMappingsClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result devspaces.ResourceProviderOperationListPage, err error) +} + +var _ OperationsClientAPI = (*devspaces.OperationsClient)(nil) + +// ControllersClientAPI contains the set of methods on the ControllersClient type. +type ControllersClientAPI interface { + Create(ctx context.Context, resourceGroupName string, name string, controller devspaces.Controller) (result devspaces.ControllersCreateFuture, err error) + 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) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result devspaces.ControllerListPage, 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) +} + +var _ ControllersClientAPI = (*devspaces.ControllersClient)(nil) diff --git a/services/devspaces/mgmt/2019-04-01/devspaces/models.go b/services/devspaces/mgmt/2019-04-01/devspaces/models.go new file mode 100644 index 000000000000..9e7832a2f6aa --- /dev/null +++ b/services/devspaces/mgmt/2019-04-01/devspaces/models.go @@ -0,0 +1,858 @@ +package devspaces + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// 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/devspaces/mgmt/2019-04-01/devspaces" + +// InstanceType enumerates the values for instance type. +type InstanceType string + +const ( + // InstanceTypeKubernetes ... + InstanceTypeKubernetes InstanceType = "Kubernetes" + // InstanceTypeOrchestratorSpecificConnectionDetails ... + InstanceTypeOrchestratorSpecificConnectionDetails InstanceType = "OrchestratorSpecificConnectionDetails" +) + +// PossibleInstanceTypeValues returns an array of possible values for the InstanceType const type. +func PossibleInstanceTypeValues() []InstanceType { + return []InstanceType{InstanceTypeKubernetes, InstanceTypeOrchestratorSpecificConnectionDetails} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // Canceled ... + Canceled ProvisioningState = "Canceled" + // Creating ... + Creating ProvisioningState = "Creating" + // Deleted ... + Deleted ProvisioningState = "Deleted" + // 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, Deleted, Deleting, Failed, Succeeded, Updating} +} + +// SkuTier enumerates the values for sku tier. +type SkuTier string + +const ( + // Standard ... + Standard SkuTier = "Standard" +) + +// PossibleSkuTierValues returns an array of possible values for the SkuTier const type. +func PossibleSkuTierValues() []SkuTier { + return []SkuTier{Standard} +} + +// ContainerHostMapping container host mapping object specifying the Container host resource ID and its +// associated Controller resource. +type ContainerHostMapping struct { + autorest.Response `json:"-"` + // ContainerHostResourceID - ARM ID of the Container Host resource + ContainerHostResourceID *string `json:"containerHostResourceId,omitempty"` + // MappedControllerResourceID - READ-ONLY; ARM ID of the mapped Controller resource + MappedControllerResourceID *string `json:"mappedControllerResourceId,omitempty"` +} + +// Controller ... +type Controller struct { + autorest.Response `json:"-"` + *ControllerProperties `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + // Tags - Tags for the Azure resource. + Tags map[string]*string `json:"tags"` + // Location - Region where the Azure resource is located. + Location *string `json:"location,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. + 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"` +} + +// MarshalJSON is the custom marshaler for Controller. +func (c Controller) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if c.ControllerProperties != nil { + objectMap["properties"] = c.ControllerProperties + } + if c.Sku != nil { + objectMap["sku"] = c.Sku + } + 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 Controller struct. +func (c *Controller) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var controllerProperties ControllerProperties + err = json.Unmarshal(*v, &controllerProperties) + if err != nil { + return err + } + c.ControllerProperties = &controllerProperties + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + c.Sku = &sku + } + 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 +} + +// ControllerConnectionDetails ... +type ControllerConnectionDetails struct { + OrchestratorSpecificConnectionDetails BasicOrchestratorSpecificConnectionDetails `json:"orchestratorSpecificConnectionDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ControllerConnectionDetails struct. +func (ccd *ControllerConnectionDetails) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "orchestratorSpecificConnectionDetails": + if v != nil { + orchestratorSpecificConnectionDetails, err := unmarshalBasicOrchestratorSpecificConnectionDetails(*v) + if err != nil { + return err + } + ccd.OrchestratorSpecificConnectionDetails = orchestratorSpecificConnectionDetails + } + } + } + + return nil +} + +// ControllerConnectionDetailsList ... +type ControllerConnectionDetailsList struct { + autorest.Response `json:"-"` + // ConnectionDetailsList - List of Azure Dev Spaces Controller connection details. + ConnectionDetailsList *[]ControllerConnectionDetails `json:"connectionDetailsList,omitempty"` +} + +// ControllerList ... +type ControllerList struct { + autorest.Response `json:"-"` + // Value - List of Azure Dev Spaces Controllers. + Value *[]Controller `json:"value,omitempty"` + // NextLink - READ-ONLY; The URI that can be used to request the next page for list of Azure Dev Spaces Controllers. + NextLink *string `json:"nextLink,omitempty"` +} + +// ControllerListIterator provides access to a complete listing of Controller values. +type ControllerListIterator struct { + i int + page ControllerListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ControllerListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ControllerListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ControllerListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ControllerListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ControllerListIterator) Response() ControllerList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ControllerListIterator) Value() Controller { + if !iter.page.NotDone() { + return Controller{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ControllerListIterator type. +func NewControllerListIterator(page ControllerListPage) ControllerListIterator { + return ControllerListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (cl ControllerList) IsEmpty() bool { + return cl.Value == nil || len(*cl.Value) == 0 +} + +// controllerListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (cl ControllerList) controllerListPreparer(ctx context.Context) (*http.Request, error) { + if cl.NextLink == nil || len(to.String(cl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(cl.NextLink))) +} + +// ControllerListPage contains a page of Controller values. +type ControllerListPage struct { + fn func(context.Context, ControllerList) (ControllerList, error) + cl ControllerList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ControllerListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ControllerListPage.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.cl) + if err != nil { + return err + } + page.cl = 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 *ControllerListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ControllerListPage) NotDone() bool { + return !page.cl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ControllerListPage) Response() ControllerList { + return page.cl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ControllerListPage) Values() []Controller { + if page.cl.IsEmpty() { + return nil + } + return *page.cl.Value +} + +// Creates a new instance of the ControllerListPage type. +func NewControllerListPage(getNextPage func(context.Context, ControllerList) (ControllerList, error)) ControllerListPage { + return ControllerListPage{fn: getNextPage} +} + +// ControllerProperties ... +type ControllerProperties struct { + // ProvisioningState - READ-ONLY; Provisioning state of the Azure Dev Spaces Controller. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Updating', 'Creating', 'Deleting', 'Deleted' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // HostSuffix - READ-ONLY; DNS suffix for public endpoints running in the Azure Dev Spaces Controller. + HostSuffix *string `json:"hostSuffix,omitempty"` + // DataPlaneFqdn - READ-ONLY; DNS name for accessing DataPlane services + DataPlaneFqdn *string `json:"dataPlaneFqdn,omitempty"` + // TargetContainerHostResourceID - Resource ID of the target container host + TargetContainerHostResourceID *string `json:"targetContainerHostResourceId,omitempty"` + // TargetContainerHostCredentialsBase64 - Credentials of the target container host (base64). + TargetContainerHostCredentialsBase64 *string `json:"targetContainerHostCredentialsBase64,omitempty"` +} + +// ControllersCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ControllersCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ControllersCreateFuture) Result(client ControllersClient) (c Controller, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("devspaces.ControllersCreateFuture") + 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.CreateResponder(c.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersCreateFuture", "Result", c.Response.Response, "Failure responding to request") + } + } + return +} + +// ControllersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ControllersDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ControllersDeleteFuture) Result(client ControllersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.ControllersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("devspaces.ControllersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ControllerUpdateParameters parameters for updating an Azure Dev Spaces Controller. +type ControllerUpdateParameters struct { + // Tags - Tags for the Azure Dev Spaces Controller. + Tags map[string]*string `json:"tags"` + *ControllerUpdateParametersProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for ControllerUpdateParameters. +func (cup ControllerUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cup.Tags != nil { + objectMap["tags"] = cup.Tags + } + if cup.ControllerUpdateParametersProperties != nil { + objectMap["properties"] = cup.ControllerUpdateParametersProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ControllerUpdateParameters struct. +func (cup *ControllerUpdateParameters) UnmarshalJSON(body []byte) error { + 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 + } + cup.Tags = tags + } + case "properties": + if v != nil { + var controllerUpdateParametersProperties ControllerUpdateParametersProperties + err = json.Unmarshal(*v, &controllerUpdateParametersProperties) + if err != nil { + return err + } + cup.ControllerUpdateParametersProperties = &controllerUpdateParametersProperties + } + } + } + + return nil +} + +// ControllerUpdateParametersProperties ... +type ControllerUpdateParametersProperties struct { + // TargetContainerHostCredentialsBase64 - Credentials of the target container host (base64). + TargetContainerHostCredentialsBase64 *string `json:"targetContainerHostCredentialsBase64,omitempty"` +} + +// ErrorDetails ... +type ErrorDetails struct { + // Code - READ-ONLY; Status code for the error. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; Error message describing the error in detail. + Message *string `json:"message,omitempty"` + // Target - READ-ONLY; The target of the particular error. + Target *string `json:"target,omitempty"` +} + +// ErrorResponse error response indicates that the service is not able to process the incoming request. The +// reason is provided in the error message. +type ErrorResponse struct { + // Error - The details of the error. + Error *ErrorDetails `json:"error,omitempty"` +} + +// KubernetesConnectionDetails contains information used to connect to a Kubernetes cluster +type KubernetesConnectionDetails struct { + // KubeConfig - Gets the kubeconfig for the cluster. + KubeConfig *string `json:"kubeConfig,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeOrchestratorSpecificConnectionDetails', 'InstanceTypeKubernetes' + InstanceType InstanceType `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for KubernetesConnectionDetails. +func (kcd KubernetesConnectionDetails) MarshalJSON() ([]byte, error) { + kcd.InstanceType = InstanceTypeKubernetes + objectMap := make(map[string]interface{}) + if kcd.KubeConfig != nil { + objectMap["kubeConfig"] = kcd.KubeConfig + } + if kcd.InstanceType != "" { + objectMap["instanceType"] = kcd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsKubernetesConnectionDetails is the BasicOrchestratorSpecificConnectionDetails implementation for KubernetesConnectionDetails. +func (kcd KubernetesConnectionDetails) AsKubernetesConnectionDetails() (*KubernetesConnectionDetails, bool) { + return &kcd, true +} + +// AsOrchestratorSpecificConnectionDetails is the BasicOrchestratorSpecificConnectionDetails implementation for KubernetesConnectionDetails. +func (kcd KubernetesConnectionDetails) AsOrchestratorSpecificConnectionDetails() (*OrchestratorSpecificConnectionDetails, bool) { + return nil, false +} + +// AsBasicOrchestratorSpecificConnectionDetails is the BasicOrchestratorSpecificConnectionDetails implementation for KubernetesConnectionDetails. +func (kcd KubernetesConnectionDetails) AsBasicOrchestratorSpecificConnectionDetails() (BasicOrchestratorSpecificConnectionDetails, bool) { + return &kcd, true +} + +// ListConnectionDetailsParameters parameters for listing connection details of an Azure Dev Spaces +// Controller. +type ListConnectionDetailsParameters struct { + // TargetContainerHostResourceID - Resource ID of the target container host mapped to the Azure Dev Spaces Controller. + TargetContainerHostResourceID *string `json:"targetContainerHostResourceId,omitempty"` +} + +// BasicOrchestratorSpecificConnectionDetails base class for types that supply values used to connect to container +// orchestrators +type BasicOrchestratorSpecificConnectionDetails interface { + AsKubernetesConnectionDetails() (*KubernetesConnectionDetails, bool) + AsOrchestratorSpecificConnectionDetails() (*OrchestratorSpecificConnectionDetails, bool) +} + +// OrchestratorSpecificConnectionDetails base class for types that supply values used to connect to container +// orchestrators +type OrchestratorSpecificConnectionDetails struct { + // InstanceType - Possible values include: 'InstanceTypeOrchestratorSpecificConnectionDetails', 'InstanceTypeKubernetes' + InstanceType InstanceType `json:"instanceType,omitempty"` +} + +func unmarshalBasicOrchestratorSpecificConnectionDetails(body []byte) (BasicOrchestratorSpecificConnectionDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeKubernetes): + var kcd KubernetesConnectionDetails + err := json.Unmarshal(body, &kcd) + return kcd, err + default: + var oscd OrchestratorSpecificConnectionDetails + err := json.Unmarshal(body, &oscd) + return oscd, err + } +} +func unmarshalBasicOrchestratorSpecificConnectionDetailsArray(body []byte) ([]BasicOrchestratorSpecificConnectionDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + oscdArray := make([]BasicOrchestratorSpecificConnectionDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + oscd, err := unmarshalBasicOrchestratorSpecificConnectionDetails(*rawMessage) + if err != nil { + return nil, err + } + oscdArray[index] = oscd + } + return oscdArray, nil +} + +// MarshalJSON is the custom marshaler for OrchestratorSpecificConnectionDetails. +func (oscd OrchestratorSpecificConnectionDetails) MarshalJSON() ([]byte, error) { + oscd.InstanceType = InstanceTypeOrchestratorSpecificConnectionDetails + objectMap := make(map[string]interface{}) + if oscd.InstanceType != "" { + objectMap["instanceType"] = oscd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsKubernetesConnectionDetails is the BasicOrchestratorSpecificConnectionDetails implementation for OrchestratorSpecificConnectionDetails. +func (oscd OrchestratorSpecificConnectionDetails) AsKubernetesConnectionDetails() (*KubernetesConnectionDetails, bool) { + return nil, false +} + +// AsOrchestratorSpecificConnectionDetails is the BasicOrchestratorSpecificConnectionDetails implementation for OrchestratorSpecificConnectionDetails. +func (oscd OrchestratorSpecificConnectionDetails) AsOrchestratorSpecificConnectionDetails() (*OrchestratorSpecificConnectionDetails, bool) { + return &oscd, true +} + +// AsBasicOrchestratorSpecificConnectionDetails is the BasicOrchestratorSpecificConnectionDetails implementation for OrchestratorSpecificConnectionDetails. +func (oscd OrchestratorSpecificConnectionDetails) AsBasicOrchestratorSpecificConnectionDetails() (BasicOrchestratorSpecificConnectionDetails, bool) { + return &oscd, true +} + +// Resource an Azure resource. +type Resource struct { + // ID - READ-ONLY; Fully qualified resource Id for the resource. + 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"` +} + +// ResourceProviderOperationDefinition ... +type ResourceProviderOperationDefinition struct { + // Name - Resource provider operation name. + Name *string `json:"name,omitempty"` + Display *ResourceProviderOperationDisplay `json:"display,omitempty"` +} + +// ResourceProviderOperationDisplay ... +type ResourceProviderOperationDisplay struct { + // Provider - Name of the resource provider. + Provider *string `json:"provider,omitempty"` + // Resource - Name of the resource type. + Resource *string `json:"resource,omitempty"` + // Operation - Name of the resource provider operation. + Operation *string `json:"operation,omitempty"` + // Description - Description of the resource provider operation. + Description *string `json:"description,omitempty"` +} + +// ResourceProviderOperationList ... +type ResourceProviderOperationList struct { + autorest.Response `json:"-"` + // Value - Resource provider operations list. + Value *[]ResourceProviderOperationDefinition `json:"value,omitempty"` + // NextLink - READ-ONLY; The URI that can be used to request the next page for list of Azure operations. + NextLink *string `json:"nextLink,omitempty"` +} + +// ResourceProviderOperationListIterator provides access to a complete listing of +// ResourceProviderOperationDefinition values. +type ResourceProviderOperationListIterator struct { + i int + page ResourceProviderOperationListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ResourceProviderOperationListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceProviderOperationListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ResourceProviderOperationListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ResourceProviderOperationListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ResourceProviderOperationListIterator) Response() ResourceProviderOperationList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ResourceProviderOperationListIterator) Value() ResourceProviderOperationDefinition { + if !iter.page.NotDone() { + return ResourceProviderOperationDefinition{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ResourceProviderOperationListIterator type. +func NewResourceProviderOperationListIterator(page ResourceProviderOperationListPage) ResourceProviderOperationListIterator { + return ResourceProviderOperationListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rpol ResourceProviderOperationList) IsEmpty() bool { + return rpol.Value == nil || len(*rpol.Value) == 0 +} + +// resourceProviderOperationListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rpol ResourceProviderOperationList) resourceProviderOperationListPreparer(ctx context.Context) (*http.Request, error) { + if rpol.NextLink == nil || len(to.String(rpol.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rpol.NextLink))) +} + +// ResourceProviderOperationListPage contains a page of ResourceProviderOperationDefinition values. +type ResourceProviderOperationListPage struct { + fn func(context.Context, ResourceProviderOperationList) (ResourceProviderOperationList, error) + rpol ResourceProviderOperationList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ResourceProviderOperationListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceProviderOperationListPage.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.rpol) + if err != nil { + return err + } + page.rpol = 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 *ResourceProviderOperationListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ResourceProviderOperationListPage) NotDone() bool { + return !page.rpol.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ResourceProviderOperationListPage) Response() ResourceProviderOperationList { + return page.rpol +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ResourceProviderOperationListPage) Values() []ResourceProviderOperationDefinition { + if page.rpol.IsEmpty() { + return nil + } + return *page.rpol.Value +} + +// Creates a new instance of the ResourceProviderOperationListPage type. +func NewResourceProviderOperationListPage(getNextPage func(context.Context, ResourceProviderOperationList) (ResourceProviderOperationList, error)) ResourceProviderOperationListPage { + return ResourceProviderOperationListPage{fn: getNextPage} +} + +// Sku model representing SKU for Azure Dev Spaces Controller. +type Sku struct { + // Name - The name of the SKU for Azure Dev Spaces Controller. + Name *string `json:"name,omitempty"` + // Tier - The tier of the SKU for Azure Dev Spaces Controller. Possible values include: 'Standard' + Tier SkuTier `json:"tier,omitempty"` +} + +// TrackedResource the resource model definition for a ARM tracked top level resource. +type TrackedResource struct { + // Tags - Tags for the Azure resource. + Tags map[string]*string `json:"tags"` + // Location - Region where the Azure resource is located. + Location *string `json:"location,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. + 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"` +} + +// 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) +} diff --git a/services/devspaces/mgmt/2019-04-01/devspaces/operations.go b/services/devspaces/mgmt/2019-04-01/devspaces/operations.go new file mode 100644 index 000000000000..ec135ee17311 --- /dev/null +++ b/services/devspaces/mgmt/2019-04-01/devspaces/operations.go @@ -0,0 +1,147 @@ +package devspaces + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is 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 dev Spaces 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. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all the supported operations by the Microsoft.DevSpaces resource provider along with their description. +func (client OperationsClient) List(ctx context.Context) (result ResourceProviderOperationListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.rpol.Response.Response != nil { + sc = result.rpol.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rpol.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "devspaces.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.rpol, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.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-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.DevSpaces/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result ResourceProviderOperationList, 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 ResourceProviderOperationList) (result ResourceProviderOperationList, err error) { + req, err := lastResults.resourceProviderOperationListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "devspaces.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, "devspaces.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "devspaces.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 ResourceProviderOperationListIterator, 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/devspaces/mgmt/2019-04-01/devspaces/version.go b/services/devspaces/mgmt/2019-04-01/devspaces/version.go new file mode 100644 index 000000000000..d6d078b0c251 --- /dev/null +++ b/services/devspaces/mgmt/2019-04-01/devspaces/version.go @@ -0,0 +1,30 @@ +package devspaces + +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 + " devspaces/2019-04-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-05-01/netapp/client.go b/services/netapp/mgmt/2019-05-01/netapp/client.go index d823bb39d989..b7556c4b7e04 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/client.go +++ b/services/netapp/mgmt/2019-05-01/netapp/client.go @@ -56,8 +56,9 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { // CheckFilePathAvailability check if a file path is available. // Parameters: +// body - file path availability request. // location - the location -func (client BaseClient) CheckFilePathAvailability(ctx context.Context, location string) (result ResourceNameAvailability, err error) { +func (client BaseClient) CheckFilePathAvailability(ctx context.Context, body interface{}, location string) (result ResourceNameAvailability, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckFilePathAvailability") defer func() { @@ -68,7 +69,7 @@ func (client BaseClient) CheckFilePathAvailability(ctx context.Context, location tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CheckFilePathAvailabilityPreparer(ctx, location) + req, err := client.CheckFilePathAvailabilityPreparer(ctx, body, location) if err != nil { err = autorest.NewErrorWithError(err, "netapp.BaseClient", "CheckFilePathAvailability", nil, "Failure preparing request") return @@ -90,7 +91,7 @@ func (client BaseClient) CheckFilePathAvailability(ctx context.Context, location } // CheckFilePathAvailabilityPreparer prepares the CheckFilePathAvailability request. -func (client BaseClient) CheckFilePathAvailabilityPreparer(ctx context.Context, location string) (*http.Request, error) { +func (client BaseClient) CheckFilePathAvailabilityPreparer(ctx context.Context, body interface{}, location string) (*http.Request, error) { pathParameters := map[string]interface{}{ "location": autorest.Encode("path", location), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -102,9 +103,11 @@ func (client BaseClient) CheckFilePathAvailabilityPreparer(ctx context.Context, } 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)) } @@ -131,8 +134,9 @@ func (client BaseClient) CheckFilePathAvailabilityResponder(resp *http.Response) // CheckNameAvailability check if a resource name is available. // Parameters: +// body - name availability request. // location - the location -func (client BaseClient) CheckNameAvailability(ctx context.Context, location string) (result ResourceNameAvailability, err error) { +func (client BaseClient) CheckNameAvailability(ctx context.Context, body interface{}, location string) (result ResourceNameAvailability, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckNameAvailability") defer func() { @@ -143,7 +147,7 @@ func (client BaseClient) CheckNameAvailability(ctx context.Context, location str tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CheckNameAvailabilityPreparer(ctx, location) + req, err := client.CheckNameAvailabilityPreparer(ctx, body, location) if err != nil { err = autorest.NewErrorWithError(err, "netapp.BaseClient", "CheckNameAvailability", nil, "Failure preparing request") return @@ -165,7 +169,7 @@ func (client BaseClient) CheckNameAvailability(ctx context.Context, location str } // CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. -func (client BaseClient) CheckNameAvailabilityPreparer(ctx context.Context, location string) (*http.Request, error) { +func (client BaseClient) CheckNameAvailabilityPreparer(ctx context.Context, body interface{}, location string) (*http.Request, error) { pathParameters := map[string]interface{}{ "location": autorest.Encode("path", location), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -177,9 +181,11 @@ func (client BaseClient) CheckNameAvailabilityPreparer(ctx context.Context, loca } 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)) } diff --git a/services/netapp/mgmt/2019-05-01/netapp/netappapi/interfaces.go b/services/netapp/mgmt/2019-05-01/netapp/netappapi/interfaces.go index fc2e3b040373..1fc55ed6f478 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/netappapi/interfaces.go +++ b/services/netapp/mgmt/2019-05-01/netapp/netappapi/interfaces.go @@ -24,8 +24,8 @@ import ( // BaseClientAPI contains the set of methods on the BaseClient type. type BaseClientAPI interface { - CheckFilePathAvailability(ctx context.Context, location string) (result netapp.ResourceNameAvailability, err error) - CheckNameAvailability(ctx context.Context, location string) (result netapp.ResourceNameAvailability, err error) + CheckFilePathAvailability(ctx context.Context, body interface{}, location string) (result netapp.ResourceNameAvailability, err error) + CheckNameAvailability(ctx context.Context, body interface{}, location string) (result netapp.ResourceNameAvailability, err error) } var _ BaseClientAPI = (*netapp.BaseClient)(nil) diff --git a/services/network/mgmt/2019-02-01/network/models.go b/services/network/mgmt/2019-02-01/network/models.go index be3fc1adb04b..f84b8d5ae066 100644 --- a/services/network/mgmt/2019-02-01/network/models.go +++ b/services/network/mgmt/2019-02-01/network/models.go @@ -21567,6 +21567,15 @@ type ResourceNavigationLinkFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } +// ResourceNavigationLinksListResult response for ResourceNavigationLinks_Get operation. +type ResourceNavigationLinksListResult struct { + autorest.Response `json:"-"` + // Value - The resource navigation links in a subnet. + Value *[]ResourceNavigationLink `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + // RetentionPolicyParameters parameters that define the retention policy for flow log. type RetentionPolicyParameters struct { // Days - Number of days to retain flow log records. @@ -23730,6 +23739,15 @@ type ServiceAssociationLinkPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } +// ServiceAssociationLinksListResult response for ServiceAssociationLinks_Get operation. +type ServiceAssociationLinksListResult struct { + autorest.Response `json:"-"` + // Value - The service association links in a subnet. + Value *[]ServiceAssociationLink `json:"value,omitempty"` + // NextLink - 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) 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 0eb6fadf6152..47826a24e980 100644 --- a/services/network/mgmt/2019-02-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2019-02-01/network/networkapi/interfaces.go @@ -629,6 +629,20 @@ type SubnetsClientAPI interface { var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) +// ResourceNavigationLinksClientAPI contains the set of methods on the ResourceNavigationLinksClient type. +type ResourceNavigationLinksClientAPI interface { + Get(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 { + Get(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) diff --git a/services/network/mgmt/2019-02-01/network/resourcenavigationlinks.go b/services/network/mgmt/2019-02-01/network/resourcenavigationlinks.go new file mode 100644 index 000000000000..80b47dbc08de --- /dev/null +++ b/services/network/mgmt/2019-02-01/network/resourcenavigationlinks.go @@ -0,0 +1,120 @@ +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. +func NewResourceNavigationLinksClientWithBaseURI(baseURI string, subscriptionID string) ResourceNavigationLinksClient { + return ResourceNavigationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get 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) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result ResourceNavigationLinksListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceNavigationLinksClient.Get") + 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) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ResourceNavigationLinksClient", "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.ResourceNavigationLinksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ResourceNavigationLinksClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ResourceNavigationLinksClient) GetPreparer(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-02-01" + queryParameters := 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)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceNavigationLinksClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ResourceNavigationLinksClient) GetResponder(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-02-01/network/serviceassociationlinks.go b/services/network/mgmt/2019-02-01/network/serviceassociationlinks.go new file mode 100644 index 000000000000..cc37403a161d --- /dev/null +++ b/services/network/mgmt/2019-02-01/network/serviceassociationlinks.go @@ -0,0 +1,120 @@ +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. +func NewServiceAssociationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServiceAssociationLinksClient { + return ServiceAssociationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get 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) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result ServiceAssociationLinksListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceAssociationLinksClient.Get") + 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) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceAssociationLinksClient", "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.ServiceAssociationLinksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceAssociationLinksClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ServiceAssociationLinksClient) GetPreparer(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-02-01" + queryParameters := 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)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ServiceAssociationLinksClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServiceAssociationLinksClient) GetResponder(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/preview/billing/mgmt/2018-11-01-preview/billing/accountsvalidateaddress.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/accountsvalidateaddress.go new file mode 100644 index 000000000000..b87e8a2701c7 --- /dev/null +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/accountsvalidateaddress.go @@ -0,0 +1,117 @@ +package billing + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// AccountsValidateAddressClient is the billing client provides access to billing resources for Azure subscriptions. +type AccountsValidateAddressClient struct { + BaseClient +} + +// NewAccountsValidateAddressClient creates an instance of the AccountsValidateAddressClient client. +func NewAccountsValidateAddressClient(subscriptionID string) AccountsValidateAddressClient { + return NewAccountsValidateAddressClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAccountsValidateAddressClientWithBaseURI creates an instance of the AccountsValidateAddressClient client. +func NewAccountsValidateAddressClientWithBaseURI(baseURI string, subscriptionID string) AccountsValidateAddressClient { + return AccountsValidateAddressClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Post validates the address. +// Parameters: +// billingAccountName - billing Account Id. +func (client AccountsValidateAddressClient) Post(ctx context.Context, billingAccountName string, address Address) (result ValidateAddressResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsValidateAddressClient.Post") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PostPreparer(ctx, billingAccountName, address) + if err != nil { + err = autorest.NewErrorWithError(err, "billing.AccountsValidateAddressClient", "Post", nil, "Failure preparing request") + return + } + + resp, err := client.PostSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "billing.AccountsValidateAddressClient", "Post", resp, "Failure sending request") + return + } + + result, err = client.PostResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "billing.AccountsValidateAddressClient", "Post", resp, "Failure responding to request") + } + + return +} + +// PostPreparer prepares the Post request. +func (client AccountsValidateAddressClient) PostPreparer(ctx context.Context, billingAccountName string, address Address) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "billingAccountName": autorest.Encode("path", billingAccountName), + } + + const APIVersion = "2018-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("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/validateAddress", pathParameters), + autorest.WithJSON(address), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PostSender sends the Post request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsValidateAddressClient) PostSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// PostResponder handles the response to the Post request. The method always +// closes the http.Response Body. +func (client AccountsValidateAddressClient) PostResponder(resp *http.Response) (result ValidateAddressResponse, 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/billing/mgmt/2018-11-01-preview/billing/billingapi/interfaces.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/billingapi/interfaces.go index 9a007dfed1a1..0b134982d1ca 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 @@ -39,6 +39,13 @@ type PaymentMethodsClientAPI interface { var _ PaymentMethodsClientAPI = (*billing.PaymentMethodsClient)(nil) +// AccountsValidateAddressClientAPI contains the set of methods on the AccountsValidateAddressClient type. +type AccountsValidateAddressClientAPI interface { + Post(ctx context.Context, billingAccountName string, address billing.Address) (result billing.ValidateAddressResponse, err error) +} + +var _ AccountsValidateAddressClientAPI = (*billing.AccountsValidateAddressClient)(nil) + // AvailableBalancesClientAPI contains the set of methods on the AvailableBalancesClient type. type AvailableBalancesClientAPI interface { GetByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string) (result billing.AvailableBalance, err error) diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/models.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/models.go index 25d11d9c3472..e7e1fad0c2cb 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/models.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/models.go @@ -47,6 +47,21 @@ func PossibleAccountTypeValues() []AccountType { return []AccountType{AccountTypeEnrollment, AccountTypeOrganization} } +// AddressValidationStatus enumerates the values for address validation status. +type AddressValidationStatus string + +const ( + // Invalid ... + Invalid AddressValidationStatus = "Invalid" + // Valid ... + Valid AddressValidationStatus = "Valid" +) + +// PossibleAddressValidationStatusValues returns an array of possible values for the AddressValidationStatus const type. +func PossibleAddressValidationStatusValues() []AddressValidationStatus { + return []AddressValidationStatus{Invalid, Valid} +} + // EligibleProductType enumerates the values for eligible product type. type EligibleProductType string @@ -3658,3 +3673,14 @@ type UpdateAutoRenewRequest struct { // AutoRenew - Request parameters to update auto renew policy a product. Possible values include: 'True', 'False' AutoRenew UpdateAutoRenew `json:"autoRenew,omitempty"` } + +// ValidateAddressResponse result of the address validation +type ValidateAddressResponse struct { + autorest.Response `json:"-"` + // Status - status of the address validation. Possible values include: 'Valid', 'Invalid' + Status AddressValidationStatus `json:"status,omitempty"` + // SuggestedAddresses - list of suggested addresses. + SuggestedAddresses *[]Address `json:"suggestedAddresses,omitempty"` + // ValidationMessage - Validation error message. + ValidationMessage *string `json:"validationMessage,omitempty"` +} 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 b54b850efbdb..14461003797d 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 @@ -40,6 +40,86 @@ func NewHanaInstancesClientWithBaseURI(baseURI string, subscriptionID string) Ha return HanaInstancesClient{NewWithBaseURI(baseURI, subscriptionID)} } +// Create creates a SAP HANA instance for the specified subscription, resource group, and instance name. +// Parameters: +// resourceGroupName - name of the resource group. +// hanaInstanceName - name of the SAP HANA on Azure instance. +// hanaInstanceParameter - request body representing a HanaInstance +func (client HanaInstancesClient) Create(ctx context.Context, resourceGroupName string, hanaInstanceName string, hanaInstanceParameter HanaInstance) (result HanaInstancesCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HanaInstancesClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreatePreparer(ctx, resourceGroupName, hanaInstanceName, hanaInstanceParameter) + if err != nil { + err = autorest.NewErrorWithError(err, "hanaonazure.HanaInstancesClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "hanaonazure.HanaInstancesClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client HanaInstancesClient) CreatePreparer(ctx context.Context, resourceGroupName string, hanaInstanceName string, hanaInstanceParameter HanaInstance) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hanaInstanceName": autorest.Encode("path", hanaInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-11-03-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.HanaOnAzure/hanaInstances/{hanaInstanceName}", pathParameters), + autorest.WithJSON(hanaInstanceParameter), + 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 HanaInstancesClient) CreateSender(req *http.Request) (future HanaInstancesCreateFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + 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 HanaInstancesClient) CreateResponder(resp *http.Response) (result HanaInstance, 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 +} + // EnableMonitoring the operation to add a monitor to an SAP HANA instance. // Parameters: // resourceGroupName - name of the resource group. 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 07c1e2912968..8b7fa9be8af6 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 @@ -31,6 +31,7 @@ var _ OperationsClientAPI = (*hanaonazure.OperationsClient)(nil) // HanaInstancesClientAPI contains the set of methods on the HanaInstancesClient type. type HanaInstancesClientAPI interface { + Create(ctx context.Context, resourceGroupName string, hanaInstanceName string, hanaInstanceParameter hanaonazure.HanaInstance) (result hanaonazure.HanaInstancesCreateFuture, err error) EnableMonitoring(ctx context.Context, resourceGroupName string, hanaInstanceName string, monitoringParameter hanaonazure.MonitoringDetails) (result hanaonazure.HanaInstancesEnableMonitoringFuture, err error) Get(ctx context.Context, resourceGroupName string, hanaInstanceName string) (result hanaonazure.HanaInstance, err error) List(ctx context.Context) (result hanaonazure.HanaInstancesListResultPage, err error) diff --git a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go index b06fc5ecc9d8..88f117076916 100644 --- a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go +++ b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go @@ -125,6 +125,31 @@ func PossibleHanaInstanceSizeNamesEnumValues() []HanaInstanceSizeNamesEnum { return []HanaInstanceSizeNamesEnum{S144, S144m, S192, S192m, S192xm, S224m, S224o, S224om, S224oxm, S224oxxm, S384, S384m, S384xm, S384xxm, S576m, S576xm, S72, S72m, S768, S768m, S768xm, S96, S960m} } +// HanaProvisioningStatesEnum enumerates the values for hana provisioning states enum. +type HanaProvisioningStatesEnum string + +const ( + // Accepted ... + Accepted HanaProvisioningStatesEnum = "Accepted" + // Creating ... + Creating HanaProvisioningStatesEnum = "Creating" + // Deleting ... + Deleting HanaProvisioningStatesEnum = "Deleting" + // Failed ... + Failed HanaProvisioningStatesEnum = "Failed" + // Migrating ... + Migrating HanaProvisioningStatesEnum = "Migrating" + // Succeeded ... + Succeeded HanaProvisioningStatesEnum = "Succeeded" + // Updating ... + Updating HanaProvisioningStatesEnum = "Updating" +) + +// PossibleHanaProvisioningStatesEnumValues returns an array of possible values for the HanaProvisioningStatesEnum const type. +func PossibleHanaProvisioningStatesEnumValues() []HanaProvisioningStatesEnum { + return []HanaProvisioningStatesEnum{Accepted, Creating, Deleting, Failed, Migrating, Succeeded, Updating} +} + // Disk specifies the disk information fo the HANA instance type Disk struct { // Name - The disk name. @@ -270,6 +295,39 @@ type HanaInstanceProperties struct { ProximityPlacementGroup *string `json:"proximityPlacementGroup,omitempty"` // HwRevision - READ-ONLY; Hardware revision of a HANA instance HwRevision *string `json:"hwRevision,omitempty"` + // PartnerNodeID - READ-ONLY; ARM ID of another HanaInstance that will share a network with this HanaInstance + PartnerNodeID *string `json:"partnerNodeId,omitempty"` + // ProvisioningState - READ-ONLY; State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' + ProvisioningState HanaProvisioningStatesEnum `json:"provisioningState,omitempty"` +} + +// HanaInstancesCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type HanaInstancesCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *HanaInstancesCreateFuture) Result(client HanaInstancesClient) (hi HanaInstance, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "hanaonazure.HanaInstancesCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("hanaonazure.HanaInstancesCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if hi.Response.Response, err = future.GetResult(sender); err == nil && hi.Response.Response.StatusCode != http.StatusNoContent { + hi, err = client.CreateResponder(hi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "hanaonazure.HanaInstancesCreateFuture", "Result", hi.Response.Response, "Failure responding to request") + } + } + return } // HanaInstancesEnableMonitoringFuture an abstraction for monitoring and retrieving the results of a @@ -525,6 +583,8 @@ type OSProfile struct { OsType *string `json:"osType,omitempty"` // Version - READ-ONLY; Specifies version of operating system. Version *string `json:"version,omitempty"` + // SSHPublicKey - READ-ONLY; Specifies the SSH public key used to access the operating system. + SSHPublicKey *string `json:"sshPublicKey,omitempty"` } // Resource the resource model definition. diff --git a/services/preview/security/mgmt/v1.0/security/regulatorycomplianceassessments.go b/services/preview/security/mgmt/v1.0/security/regulatorycomplianceassessments.go index a03511f202bb..0e1e97a825ee 100644 --- a/services/preview/security/mgmt/v1.0/security/regulatorycomplianceassessments.go +++ b/services/preview/security/mgmt/v1.0/security/regulatorycomplianceassessments.go @@ -45,12 +45,10 @@ func NewRegulatoryComplianceAssessmentsClientWithBaseURI(baseURI string, subscri // Get supported regulatory compliance details and state for selected assessment // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object // regulatoryComplianceControlName - name of the regulatory compliance control object // regulatoryComplianceAssessmentName - name of the regulatory compliance assessment object -func (client RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (result RegulatoryComplianceAssessment, err error) { +func (client RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (result RegulatoryComplianceAssessment, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceAssessmentsClient.Get") defer func() { @@ -63,15 +61,11 @@ func (client RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, res } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceAssessmentsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName, regulatoryComplianceControlName, regulatoryComplianceAssessmentName) + req, err := client.GetPreparer(ctx, regulatoryComplianceStandardName, regulatoryComplianceControlName, regulatoryComplianceAssessmentName) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceAssessmentsClient", "Get", nil, "Failure preparing request") return @@ -93,12 +87,11 @@ func (client RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, res } // GetPreparer prepares the Get request. -func (client RegulatoryComplianceAssessmentsClient) GetPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (*http.Request, error) { +func (client RegulatoryComplianceAssessmentsClient) GetPreparer(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceAssessmentName": autorest.Encode("path", regulatoryComplianceAssessmentName), "regulatoryComplianceControlName": autorest.Encode("path", regulatoryComplianceControlName), "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -110,7 +103,7 @@ func (client RegulatoryComplianceAssessmentsClient) GetPreparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -137,12 +130,10 @@ func (client RegulatoryComplianceAssessmentsClient) GetResponder(resp *http.Resp // List details and state of assessments mapped to selected regulatory compliance control // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object // regulatoryComplianceControlName - name of the regulatory compliance control object // filter - oData filter. Optional. -func (client RegulatoryComplianceAssessmentsClient) List(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result RegulatoryComplianceAssessmentListPage, err error) { +func (client RegulatoryComplianceAssessmentsClient) List(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result RegulatoryComplianceAssessmentListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceAssessmentsClient.List") defer func() { @@ -155,16 +146,12 @@ func (client RegulatoryComplianceAssessmentsClient) List(ctx context.Context, re } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceAssessmentsClient", "List", err.Error()) } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName, regulatoryComplianceControlName, filter) + req, err := client.ListPreparer(ctx, regulatoryComplianceStandardName, regulatoryComplianceControlName, filter) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceAssessmentsClient", "List", nil, "Failure preparing request") return @@ -186,11 +173,10 @@ func (client RegulatoryComplianceAssessmentsClient) List(ctx context.Context, re } // ListPreparer prepares the List request. -func (client RegulatoryComplianceAssessmentsClient) ListPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (*http.Request, error) { +func (client RegulatoryComplianceAssessmentsClient) ListPreparer(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceControlName": autorest.Encode("path", regulatoryComplianceControlName), "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -205,7 +191,7 @@ func (client RegulatoryComplianceAssessmentsClient) ListPreparer(ctx context.Con preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -252,7 +238,7 @@ func (client RegulatoryComplianceAssessmentsClient) listNextResults(ctx context. } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegulatoryComplianceAssessmentsClient) ListComplete(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result RegulatoryComplianceAssessmentListIterator, err error) { +func (client RegulatoryComplianceAssessmentsClient) ListComplete(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result RegulatoryComplianceAssessmentListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceAssessmentsClient.List") defer func() { @@ -263,6 +249,6 @@ func (client RegulatoryComplianceAssessmentsClient) ListComplete(ctx context.Con tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, regulatoryComplianceStandardName, regulatoryComplianceControlName, filter) + result.page, err = client.List(ctx, regulatoryComplianceStandardName, regulatoryComplianceControlName, filter) return } diff --git a/services/preview/security/mgmt/v1.0/security/regulatorycompliancecontrols.go b/services/preview/security/mgmt/v1.0/security/regulatorycompliancecontrols.go index cd3e803c9f64..cf2811453179 100644 --- a/services/preview/security/mgmt/v1.0/security/regulatorycompliancecontrols.go +++ b/services/preview/security/mgmt/v1.0/security/regulatorycompliancecontrols.go @@ -44,11 +44,9 @@ func NewRegulatoryComplianceControlsClientWithBaseURI(baseURI string, subscripti // Get selected regulatory compliance control details and state // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object // regulatoryComplianceControlName - name of the regulatory compliance control object -func (client RegulatoryComplianceControlsClient) Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (result RegulatoryComplianceControl, err error) { +func (client RegulatoryComplianceControlsClient) Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (result RegulatoryComplianceControl, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceControlsClient.Get") defer func() { @@ -61,15 +59,11 @@ func (client RegulatoryComplianceControlsClient) Get(ctx context.Context, resour } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceControlsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName, regulatoryComplianceControlName) + req, err := client.GetPreparer(ctx, regulatoryComplianceStandardName, regulatoryComplianceControlName) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceControlsClient", "Get", nil, "Failure preparing request") return @@ -91,11 +85,10 @@ func (client RegulatoryComplianceControlsClient) Get(ctx context.Context, resour } // GetPreparer prepares the Get request. -func (client RegulatoryComplianceControlsClient) GetPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (*http.Request, error) { +func (client RegulatoryComplianceControlsClient) GetPreparer(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceControlName": autorest.Encode("path", regulatoryComplianceControlName), "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -107,7 +100,7 @@ func (client RegulatoryComplianceControlsClient) GetPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -134,11 +127,9 @@ func (client RegulatoryComplianceControlsClient) GetResponder(resp *http.Respons // List all supported regulatory compliance controls details and state for selected standard // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object // filter - oData filter. Optional. -func (client RegulatoryComplianceControlsClient) List(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, filter string) (result RegulatoryComplianceControlListPage, err error) { +func (client RegulatoryComplianceControlsClient) List(ctx context.Context, regulatoryComplianceStandardName string, filter string) (result RegulatoryComplianceControlListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceControlsClient.List") defer func() { @@ -151,16 +142,12 @@ func (client RegulatoryComplianceControlsClient) List(ctx context.Context, resou } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceControlsClient", "List", err.Error()) } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName, filter) + req, err := client.ListPreparer(ctx, regulatoryComplianceStandardName, filter) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceControlsClient", "List", nil, "Failure preparing request") return @@ -182,10 +169,9 @@ func (client RegulatoryComplianceControlsClient) List(ctx context.Context, resou } // ListPreparer prepares the List request. -func (client RegulatoryComplianceControlsClient) ListPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, filter string) (*http.Request, error) { +func (client RegulatoryComplianceControlsClient) ListPreparer(ctx context.Context, regulatoryComplianceStandardName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -200,7 +186,7 @@ func (client RegulatoryComplianceControlsClient) ListPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -247,7 +233,7 @@ func (client RegulatoryComplianceControlsClient) listNextResults(ctx context.Con } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegulatoryComplianceControlsClient) ListComplete(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, filter string) (result RegulatoryComplianceControlListIterator, err error) { +func (client RegulatoryComplianceControlsClient) ListComplete(ctx context.Context, regulatoryComplianceStandardName string, filter string) (result RegulatoryComplianceControlListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceControlsClient.List") defer func() { @@ -258,6 +244,6 @@ func (client RegulatoryComplianceControlsClient) ListComplete(ctx context.Contex tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, regulatoryComplianceStandardName, filter) + result.page, err = client.List(ctx, regulatoryComplianceStandardName, filter) return } diff --git a/services/preview/security/mgmt/v1.0/security/regulatorycompliancestandards.go b/services/preview/security/mgmt/v1.0/security/regulatorycompliancestandards.go index 279e3ab19c3e..0c7c07e7eaa7 100644 --- a/services/preview/security/mgmt/v1.0/security/regulatorycompliancestandards.go +++ b/services/preview/security/mgmt/v1.0/security/regulatorycompliancestandards.go @@ -44,10 +44,8 @@ func NewRegulatoryComplianceStandardsClientWithBaseURI(baseURI string, subscript // Get supported regulatory compliance details state for selected standard // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object -func (client RegulatoryComplianceStandardsClient) Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string) (result RegulatoryComplianceStandard, err error) { +func (client RegulatoryComplianceStandardsClient) Get(ctx context.Context, regulatoryComplianceStandardName string) (result RegulatoryComplianceStandard, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceStandardsClient.Get") defer func() { @@ -60,15 +58,11 @@ func (client RegulatoryComplianceStandardsClient) Get(ctx context.Context, resou } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceStandardsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName) + req, err := client.GetPreparer(ctx, regulatoryComplianceStandardName) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceStandardsClient", "Get", nil, "Failure preparing request") return @@ -90,10 +84,9 @@ func (client RegulatoryComplianceStandardsClient) Get(ctx context.Context, resou } // GetPreparer prepares the Get request. -func (client RegulatoryComplianceStandardsClient) GetPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string) (*http.Request, error) { +func (client RegulatoryComplianceStandardsClient) GetPreparer(ctx context.Context, regulatoryComplianceStandardName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -105,7 +98,7 @@ func (client RegulatoryComplianceStandardsClient) GetPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -132,10 +125,8 @@ func (client RegulatoryComplianceStandardsClient) GetResponder(resp *http.Respon // List supported regulatory compliance standards details and state // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // filter - oData filter. Optional. -func (client RegulatoryComplianceStandardsClient) List(ctx context.Context, resourceGroupName string, filter string) (result RegulatoryComplianceStandardListPage, err error) { +func (client RegulatoryComplianceStandardsClient) List(ctx context.Context, filter string) (result RegulatoryComplianceStandardListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceStandardsClient.List") defer func() { @@ -148,16 +139,12 @@ func (client RegulatoryComplianceStandardsClient) List(ctx context.Context, reso } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceStandardsClient", "List", err.Error()) } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, filter) + req, err := client.ListPreparer(ctx, filter) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceStandardsClient", "List", nil, "Failure preparing request") return @@ -179,10 +166,9 @@ func (client RegulatoryComplianceStandardsClient) List(ctx context.Context, reso } // ListPreparer prepares the List request. -func (client RegulatoryComplianceStandardsClient) ListPreparer(ctx context.Context, resourceGroupName string, filter string) (*http.Request, error) { +func (client RegulatoryComplianceStandardsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-01-01-preview" @@ -196,7 +182,7 @@ func (client RegulatoryComplianceStandardsClient) ListPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -243,7 +229,7 @@ func (client RegulatoryComplianceStandardsClient) listNextResults(ctx context.Co } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegulatoryComplianceStandardsClient) ListComplete(ctx context.Context, resourceGroupName string, filter string) (result RegulatoryComplianceStandardListIterator, err error) { +func (client RegulatoryComplianceStandardsClient) ListComplete(ctx context.Context, filter string) (result RegulatoryComplianceStandardListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceStandardsClient.List") defer func() { @@ -254,6 +240,6 @@ func (client RegulatoryComplianceStandardsClient) ListComplete(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, filter) + result.page, err = client.List(ctx, filter) return } 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 46a82559bb30..8d8207b0e5f5 100644 --- a/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go @@ -25,24 +25,24 @@ import ( // RegulatoryComplianceStandardsClientAPI contains the set of methods on the RegulatoryComplianceStandardsClient type. type RegulatoryComplianceStandardsClientAPI interface { - Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string) (result security.RegulatoryComplianceStandard, err error) - List(ctx context.Context, resourceGroupName string, filter string) (result security.RegulatoryComplianceStandardListPage, err error) + Get(ctx context.Context, regulatoryComplianceStandardName string) (result security.RegulatoryComplianceStandard, err error) + List(ctx context.Context, filter string) (result security.RegulatoryComplianceStandardListPage, err error) } var _ RegulatoryComplianceStandardsClientAPI = (*security.RegulatoryComplianceStandardsClient)(nil) // RegulatoryComplianceControlsClientAPI contains the set of methods on the RegulatoryComplianceControlsClient type. type RegulatoryComplianceControlsClientAPI interface { - Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (result security.RegulatoryComplianceControl, err error) - List(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, filter string) (result security.RegulatoryComplianceControlListPage, err error) + 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) } var _ RegulatoryComplianceControlsClientAPI = (*security.RegulatoryComplianceControlsClient)(nil) // RegulatoryComplianceAssessmentsClientAPI contains the set of methods on the RegulatoryComplianceAssessmentsClient type. type RegulatoryComplianceAssessmentsClientAPI interface { - Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (result security.RegulatoryComplianceAssessment, err error) - List(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result security.RegulatoryComplianceAssessmentListPage, err error) + 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) } var _ RegulatoryComplianceAssessmentsClientAPI = (*security.RegulatoryComplianceAssessmentsClient)(nil) diff --git a/services/preview/security/mgmt/v2.0/security/regulatorycomplianceassessments.go b/services/preview/security/mgmt/v2.0/security/regulatorycomplianceassessments.go index a03511f202bb..0e1e97a825ee 100644 --- a/services/preview/security/mgmt/v2.0/security/regulatorycomplianceassessments.go +++ b/services/preview/security/mgmt/v2.0/security/regulatorycomplianceassessments.go @@ -45,12 +45,10 @@ func NewRegulatoryComplianceAssessmentsClientWithBaseURI(baseURI string, subscri // Get supported regulatory compliance details and state for selected assessment // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object // regulatoryComplianceControlName - name of the regulatory compliance control object // regulatoryComplianceAssessmentName - name of the regulatory compliance assessment object -func (client RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (result RegulatoryComplianceAssessment, err error) { +func (client RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (result RegulatoryComplianceAssessment, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceAssessmentsClient.Get") defer func() { @@ -63,15 +61,11 @@ func (client RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, res } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceAssessmentsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName, regulatoryComplianceControlName, regulatoryComplianceAssessmentName) + req, err := client.GetPreparer(ctx, regulatoryComplianceStandardName, regulatoryComplianceControlName, regulatoryComplianceAssessmentName) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceAssessmentsClient", "Get", nil, "Failure preparing request") return @@ -93,12 +87,11 @@ func (client RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, res } // GetPreparer prepares the Get request. -func (client RegulatoryComplianceAssessmentsClient) GetPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (*http.Request, error) { +func (client RegulatoryComplianceAssessmentsClient) GetPreparer(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceAssessmentName": autorest.Encode("path", regulatoryComplianceAssessmentName), "regulatoryComplianceControlName": autorest.Encode("path", regulatoryComplianceControlName), "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -110,7 +103,7 @@ func (client RegulatoryComplianceAssessmentsClient) GetPreparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -137,12 +130,10 @@ func (client RegulatoryComplianceAssessmentsClient) GetResponder(resp *http.Resp // List details and state of assessments mapped to selected regulatory compliance control // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object // regulatoryComplianceControlName - name of the regulatory compliance control object // filter - oData filter. Optional. -func (client RegulatoryComplianceAssessmentsClient) List(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result RegulatoryComplianceAssessmentListPage, err error) { +func (client RegulatoryComplianceAssessmentsClient) List(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result RegulatoryComplianceAssessmentListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceAssessmentsClient.List") defer func() { @@ -155,16 +146,12 @@ func (client RegulatoryComplianceAssessmentsClient) List(ctx context.Context, re } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceAssessmentsClient", "List", err.Error()) } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName, regulatoryComplianceControlName, filter) + req, err := client.ListPreparer(ctx, regulatoryComplianceStandardName, regulatoryComplianceControlName, filter) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceAssessmentsClient", "List", nil, "Failure preparing request") return @@ -186,11 +173,10 @@ func (client RegulatoryComplianceAssessmentsClient) List(ctx context.Context, re } // ListPreparer prepares the List request. -func (client RegulatoryComplianceAssessmentsClient) ListPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (*http.Request, error) { +func (client RegulatoryComplianceAssessmentsClient) ListPreparer(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceControlName": autorest.Encode("path", regulatoryComplianceControlName), "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -205,7 +191,7 @@ func (client RegulatoryComplianceAssessmentsClient) ListPreparer(ctx context.Con preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -252,7 +238,7 @@ func (client RegulatoryComplianceAssessmentsClient) listNextResults(ctx context. } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegulatoryComplianceAssessmentsClient) ListComplete(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result RegulatoryComplianceAssessmentListIterator, err error) { +func (client RegulatoryComplianceAssessmentsClient) ListComplete(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result RegulatoryComplianceAssessmentListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceAssessmentsClient.List") defer func() { @@ -263,6 +249,6 @@ func (client RegulatoryComplianceAssessmentsClient) ListComplete(ctx context.Con tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, regulatoryComplianceStandardName, regulatoryComplianceControlName, filter) + result.page, err = client.List(ctx, regulatoryComplianceStandardName, regulatoryComplianceControlName, filter) return } diff --git a/services/preview/security/mgmt/v2.0/security/regulatorycompliancecontrols.go b/services/preview/security/mgmt/v2.0/security/regulatorycompliancecontrols.go index cd3e803c9f64..cf2811453179 100644 --- a/services/preview/security/mgmt/v2.0/security/regulatorycompliancecontrols.go +++ b/services/preview/security/mgmt/v2.0/security/regulatorycompliancecontrols.go @@ -44,11 +44,9 @@ func NewRegulatoryComplianceControlsClientWithBaseURI(baseURI string, subscripti // Get selected regulatory compliance control details and state // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object // regulatoryComplianceControlName - name of the regulatory compliance control object -func (client RegulatoryComplianceControlsClient) Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (result RegulatoryComplianceControl, err error) { +func (client RegulatoryComplianceControlsClient) Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (result RegulatoryComplianceControl, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceControlsClient.Get") defer func() { @@ -61,15 +59,11 @@ func (client RegulatoryComplianceControlsClient) Get(ctx context.Context, resour } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceControlsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName, regulatoryComplianceControlName) + req, err := client.GetPreparer(ctx, regulatoryComplianceStandardName, regulatoryComplianceControlName) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceControlsClient", "Get", nil, "Failure preparing request") return @@ -91,11 +85,10 @@ func (client RegulatoryComplianceControlsClient) Get(ctx context.Context, resour } // GetPreparer prepares the Get request. -func (client RegulatoryComplianceControlsClient) GetPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (*http.Request, error) { +func (client RegulatoryComplianceControlsClient) GetPreparer(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceControlName": autorest.Encode("path", regulatoryComplianceControlName), "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -107,7 +100,7 @@ func (client RegulatoryComplianceControlsClient) GetPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -134,11 +127,9 @@ func (client RegulatoryComplianceControlsClient) GetResponder(resp *http.Respons // List all supported regulatory compliance controls details and state for selected standard // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object // filter - oData filter. Optional. -func (client RegulatoryComplianceControlsClient) List(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, filter string) (result RegulatoryComplianceControlListPage, err error) { +func (client RegulatoryComplianceControlsClient) List(ctx context.Context, regulatoryComplianceStandardName string, filter string) (result RegulatoryComplianceControlListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceControlsClient.List") defer func() { @@ -151,16 +142,12 @@ func (client RegulatoryComplianceControlsClient) List(ctx context.Context, resou } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceControlsClient", "List", err.Error()) } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName, filter) + req, err := client.ListPreparer(ctx, regulatoryComplianceStandardName, filter) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceControlsClient", "List", nil, "Failure preparing request") return @@ -182,10 +169,9 @@ func (client RegulatoryComplianceControlsClient) List(ctx context.Context, resou } // ListPreparer prepares the List request. -func (client RegulatoryComplianceControlsClient) ListPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, filter string) (*http.Request, error) { +func (client RegulatoryComplianceControlsClient) ListPreparer(ctx context.Context, regulatoryComplianceStandardName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -200,7 +186,7 @@ func (client RegulatoryComplianceControlsClient) ListPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -247,7 +233,7 @@ func (client RegulatoryComplianceControlsClient) listNextResults(ctx context.Con } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegulatoryComplianceControlsClient) ListComplete(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, filter string) (result RegulatoryComplianceControlListIterator, err error) { +func (client RegulatoryComplianceControlsClient) ListComplete(ctx context.Context, regulatoryComplianceStandardName string, filter string) (result RegulatoryComplianceControlListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceControlsClient.List") defer func() { @@ -258,6 +244,6 @@ func (client RegulatoryComplianceControlsClient) ListComplete(ctx context.Contex tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, regulatoryComplianceStandardName, filter) + result.page, err = client.List(ctx, regulatoryComplianceStandardName, filter) return } diff --git a/services/preview/security/mgmt/v2.0/security/regulatorycompliancestandards.go b/services/preview/security/mgmt/v2.0/security/regulatorycompliancestandards.go index 279e3ab19c3e..0c7c07e7eaa7 100644 --- a/services/preview/security/mgmt/v2.0/security/regulatorycompliancestandards.go +++ b/services/preview/security/mgmt/v2.0/security/regulatorycompliancestandards.go @@ -44,10 +44,8 @@ func NewRegulatoryComplianceStandardsClientWithBaseURI(baseURI string, subscript // Get supported regulatory compliance details state for selected standard // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object -func (client RegulatoryComplianceStandardsClient) Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string) (result RegulatoryComplianceStandard, err error) { +func (client RegulatoryComplianceStandardsClient) Get(ctx context.Context, regulatoryComplianceStandardName string) (result RegulatoryComplianceStandard, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceStandardsClient.Get") defer func() { @@ -60,15 +58,11 @@ func (client RegulatoryComplianceStandardsClient) Get(ctx context.Context, resou } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceStandardsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName) + req, err := client.GetPreparer(ctx, regulatoryComplianceStandardName) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceStandardsClient", "Get", nil, "Failure preparing request") return @@ -90,10 +84,9 @@ func (client RegulatoryComplianceStandardsClient) Get(ctx context.Context, resou } // GetPreparer prepares the Get request. -func (client RegulatoryComplianceStandardsClient) GetPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string) (*http.Request, error) { +func (client RegulatoryComplianceStandardsClient) GetPreparer(ctx context.Context, regulatoryComplianceStandardName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -105,7 +98,7 @@ func (client RegulatoryComplianceStandardsClient) GetPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -132,10 +125,8 @@ func (client RegulatoryComplianceStandardsClient) GetResponder(resp *http.Respon // List supported regulatory compliance standards details and state // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // filter - oData filter. Optional. -func (client RegulatoryComplianceStandardsClient) List(ctx context.Context, resourceGroupName string, filter string) (result RegulatoryComplianceStandardListPage, err error) { +func (client RegulatoryComplianceStandardsClient) List(ctx context.Context, filter string) (result RegulatoryComplianceStandardListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceStandardsClient.List") defer func() { @@ -148,16 +139,12 @@ func (client RegulatoryComplianceStandardsClient) List(ctx context.Context, reso } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceStandardsClient", "List", err.Error()) } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, filter) + req, err := client.ListPreparer(ctx, filter) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceStandardsClient", "List", nil, "Failure preparing request") return @@ -179,10 +166,9 @@ func (client RegulatoryComplianceStandardsClient) List(ctx context.Context, reso } // ListPreparer prepares the List request. -func (client RegulatoryComplianceStandardsClient) ListPreparer(ctx context.Context, resourceGroupName string, filter string) (*http.Request, error) { +func (client RegulatoryComplianceStandardsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-01-01-preview" @@ -196,7 +182,7 @@ func (client RegulatoryComplianceStandardsClient) ListPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -243,7 +229,7 @@ func (client RegulatoryComplianceStandardsClient) listNextResults(ctx context.Co } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegulatoryComplianceStandardsClient) ListComplete(ctx context.Context, resourceGroupName string, filter string) (result RegulatoryComplianceStandardListIterator, err error) { +func (client RegulatoryComplianceStandardsClient) ListComplete(ctx context.Context, filter string) (result RegulatoryComplianceStandardListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceStandardsClient.List") defer func() { @@ -254,6 +240,6 @@ func (client RegulatoryComplianceStandardsClient) ListComplete(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, filter) + result.page, err = client.List(ctx, filter) return } 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 b571ae6fd2a3..333b51d906f9 100644 --- a/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go @@ -25,24 +25,24 @@ import ( // RegulatoryComplianceStandardsClientAPI contains the set of methods on the RegulatoryComplianceStandardsClient type. type RegulatoryComplianceStandardsClientAPI interface { - Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string) (result security.RegulatoryComplianceStandard, err error) - List(ctx context.Context, resourceGroupName string, filter string) (result security.RegulatoryComplianceStandardListPage, err error) + Get(ctx context.Context, regulatoryComplianceStandardName string) (result security.RegulatoryComplianceStandard, err error) + List(ctx context.Context, filter string) (result security.RegulatoryComplianceStandardListPage, err error) } var _ RegulatoryComplianceStandardsClientAPI = (*security.RegulatoryComplianceStandardsClient)(nil) // RegulatoryComplianceControlsClientAPI contains the set of methods on the RegulatoryComplianceControlsClient type. type RegulatoryComplianceControlsClientAPI interface { - Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (result security.RegulatoryComplianceControl, err error) - List(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, filter string) (result security.RegulatoryComplianceControlListPage, err error) + 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) } var _ RegulatoryComplianceControlsClientAPI = (*security.RegulatoryComplianceControlsClient)(nil) // RegulatoryComplianceAssessmentsClientAPI contains the set of methods on the RegulatoryComplianceAssessmentsClient type. type RegulatoryComplianceAssessmentsClientAPI interface { - Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (result security.RegulatoryComplianceAssessment, err error) - List(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result security.RegulatoryComplianceAssessmentListPage, err error) + 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) } var _ RegulatoryComplianceAssessmentsClientAPI = (*security.RegulatoryComplianceAssessmentsClient)(nil) diff --git a/services/preview/security/mgmt/v3.0/security/regulatorycomplianceassessments.go b/services/preview/security/mgmt/v3.0/security/regulatorycomplianceassessments.go index a03511f202bb..0e1e97a825ee 100644 --- a/services/preview/security/mgmt/v3.0/security/regulatorycomplianceassessments.go +++ b/services/preview/security/mgmt/v3.0/security/regulatorycomplianceassessments.go @@ -45,12 +45,10 @@ func NewRegulatoryComplianceAssessmentsClientWithBaseURI(baseURI string, subscri // Get supported regulatory compliance details and state for selected assessment // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object // regulatoryComplianceControlName - name of the regulatory compliance control object // regulatoryComplianceAssessmentName - name of the regulatory compliance assessment object -func (client RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (result RegulatoryComplianceAssessment, err error) { +func (client RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (result RegulatoryComplianceAssessment, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceAssessmentsClient.Get") defer func() { @@ -63,15 +61,11 @@ func (client RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, res } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceAssessmentsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName, regulatoryComplianceControlName, regulatoryComplianceAssessmentName) + req, err := client.GetPreparer(ctx, regulatoryComplianceStandardName, regulatoryComplianceControlName, regulatoryComplianceAssessmentName) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceAssessmentsClient", "Get", nil, "Failure preparing request") return @@ -93,12 +87,11 @@ func (client RegulatoryComplianceAssessmentsClient) Get(ctx context.Context, res } // GetPreparer prepares the Get request. -func (client RegulatoryComplianceAssessmentsClient) GetPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (*http.Request, error) { +func (client RegulatoryComplianceAssessmentsClient) GetPreparer(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceAssessmentName": autorest.Encode("path", regulatoryComplianceAssessmentName), "regulatoryComplianceControlName": autorest.Encode("path", regulatoryComplianceControlName), "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -110,7 +103,7 @@ func (client RegulatoryComplianceAssessmentsClient) GetPreparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -137,12 +130,10 @@ func (client RegulatoryComplianceAssessmentsClient) GetResponder(resp *http.Resp // List details and state of assessments mapped to selected regulatory compliance control // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object // regulatoryComplianceControlName - name of the regulatory compliance control object // filter - oData filter. Optional. -func (client RegulatoryComplianceAssessmentsClient) List(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result RegulatoryComplianceAssessmentListPage, err error) { +func (client RegulatoryComplianceAssessmentsClient) List(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result RegulatoryComplianceAssessmentListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceAssessmentsClient.List") defer func() { @@ -155,16 +146,12 @@ func (client RegulatoryComplianceAssessmentsClient) List(ctx context.Context, re } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceAssessmentsClient", "List", err.Error()) } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName, regulatoryComplianceControlName, filter) + req, err := client.ListPreparer(ctx, regulatoryComplianceStandardName, regulatoryComplianceControlName, filter) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceAssessmentsClient", "List", nil, "Failure preparing request") return @@ -186,11 +173,10 @@ func (client RegulatoryComplianceAssessmentsClient) List(ctx context.Context, re } // ListPreparer prepares the List request. -func (client RegulatoryComplianceAssessmentsClient) ListPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (*http.Request, error) { +func (client RegulatoryComplianceAssessmentsClient) ListPreparer(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceControlName": autorest.Encode("path", regulatoryComplianceControlName), "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -205,7 +191,7 @@ func (client RegulatoryComplianceAssessmentsClient) ListPreparer(ctx context.Con preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -252,7 +238,7 @@ func (client RegulatoryComplianceAssessmentsClient) listNextResults(ctx context. } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegulatoryComplianceAssessmentsClient) ListComplete(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result RegulatoryComplianceAssessmentListIterator, err error) { +func (client RegulatoryComplianceAssessmentsClient) ListComplete(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result RegulatoryComplianceAssessmentListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceAssessmentsClient.List") defer func() { @@ -263,6 +249,6 @@ func (client RegulatoryComplianceAssessmentsClient) ListComplete(ctx context.Con tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, regulatoryComplianceStandardName, regulatoryComplianceControlName, filter) + result.page, err = client.List(ctx, regulatoryComplianceStandardName, regulatoryComplianceControlName, filter) return } diff --git a/services/preview/security/mgmt/v3.0/security/regulatorycompliancecontrols.go b/services/preview/security/mgmt/v3.0/security/regulatorycompliancecontrols.go index cd3e803c9f64..cf2811453179 100644 --- a/services/preview/security/mgmt/v3.0/security/regulatorycompliancecontrols.go +++ b/services/preview/security/mgmt/v3.0/security/regulatorycompliancecontrols.go @@ -44,11 +44,9 @@ func NewRegulatoryComplianceControlsClientWithBaseURI(baseURI string, subscripti // Get selected regulatory compliance control details and state // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object // regulatoryComplianceControlName - name of the regulatory compliance control object -func (client RegulatoryComplianceControlsClient) Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (result RegulatoryComplianceControl, err error) { +func (client RegulatoryComplianceControlsClient) Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (result RegulatoryComplianceControl, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceControlsClient.Get") defer func() { @@ -61,15 +59,11 @@ func (client RegulatoryComplianceControlsClient) Get(ctx context.Context, resour } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceControlsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName, regulatoryComplianceControlName) + req, err := client.GetPreparer(ctx, regulatoryComplianceStandardName, regulatoryComplianceControlName) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceControlsClient", "Get", nil, "Failure preparing request") return @@ -91,11 +85,10 @@ func (client RegulatoryComplianceControlsClient) Get(ctx context.Context, resour } // GetPreparer prepares the Get request. -func (client RegulatoryComplianceControlsClient) GetPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (*http.Request, error) { +func (client RegulatoryComplianceControlsClient) GetPreparer(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceControlName": autorest.Encode("path", regulatoryComplianceControlName), "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -107,7 +100,7 @@ func (client RegulatoryComplianceControlsClient) GetPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -134,11 +127,9 @@ func (client RegulatoryComplianceControlsClient) GetResponder(resp *http.Respons // List all supported regulatory compliance controls details and state for selected standard // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object // filter - oData filter. Optional. -func (client RegulatoryComplianceControlsClient) List(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, filter string) (result RegulatoryComplianceControlListPage, err error) { +func (client RegulatoryComplianceControlsClient) List(ctx context.Context, regulatoryComplianceStandardName string, filter string) (result RegulatoryComplianceControlListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceControlsClient.List") defer func() { @@ -151,16 +142,12 @@ func (client RegulatoryComplianceControlsClient) List(ctx context.Context, resou } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceControlsClient", "List", err.Error()) } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName, filter) + req, err := client.ListPreparer(ctx, regulatoryComplianceStandardName, filter) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceControlsClient", "List", nil, "Failure preparing request") return @@ -182,10 +169,9 @@ func (client RegulatoryComplianceControlsClient) List(ctx context.Context, resou } // ListPreparer prepares the List request. -func (client RegulatoryComplianceControlsClient) ListPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, filter string) (*http.Request, error) { +func (client RegulatoryComplianceControlsClient) ListPreparer(ctx context.Context, regulatoryComplianceStandardName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -200,7 +186,7 @@ func (client RegulatoryComplianceControlsClient) ListPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -247,7 +233,7 @@ func (client RegulatoryComplianceControlsClient) listNextResults(ctx context.Con } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegulatoryComplianceControlsClient) ListComplete(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, filter string) (result RegulatoryComplianceControlListIterator, err error) { +func (client RegulatoryComplianceControlsClient) ListComplete(ctx context.Context, regulatoryComplianceStandardName string, filter string) (result RegulatoryComplianceControlListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceControlsClient.List") defer func() { @@ -258,6 +244,6 @@ func (client RegulatoryComplianceControlsClient) ListComplete(ctx context.Contex tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, regulatoryComplianceStandardName, filter) + result.page, err = client.List(ctx, regulatoryComplianceStandardName, filter) return } diff --git a/services/preview/security/mgmt/v3.0/security/regulatorycompliancestandards.go b/services/preview/security/mgmt/v3.0/security/regulatorycompliancestandards.go index 279e3ab19c3e..0c7c07e7eaa7 100644 --- a/services/preview/security/mgmt/v3.0/security/regulatorycompliancestandards.go +++ b/services/preview/security/mgmt/v3.0/security/regulatorycompliancestandards.go @@ -44,10 +44,8 @@ func NewRegulatoryComplianceStandardsClientWithBaseURI(baseURI string, subscript // Get supported regulatory compliance details state for selected standard // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // regulatoryComplianceStandardName - name of the regulatory compliance standard object -func (client RegulatoryComplianceStandardsClient) Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string) (result RegulatoryComplianceStandard, err error) { +func (client RegulatoryComplianceStandardsClient) Get(ctx context.Context, regulatoryComplianceStandardName string) (result RegulatoryComplianceStandard, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceStandardsClient.Get") defer func() { @@ -60,15 +58,11 @@ func (client RegulatoryComplianceStandardsClient) Get(ctx context.Context, resou } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceStandardsClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, regulatoryComplianceStandardName) + req, err := client.GetPreparer(ctx, regulatoryComplianceStandardName) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceStandardsClient", "Get", nil, "Failure preparing request") return @@ -90,10 +84,9 @@ func (client RegulatoryComplianceStandardsClient) Get(ctx context.Context, resou } // GetPreparer prepares the Get request. -func (client RegulatoryComplianceStandardsClient) GetPreparer(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string) (*http.Request, error) { +func (client RegulatoryComplianceStandardsClient) GetPreparer(ctx context.Context, regulatoryComplianceStandardName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "regulatoryComplianceStandardName": autorest.Encode("path", regulatoryComplianceStandardName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -105,7 +98,7 @@ func (client RegulatoryComplianceStandardsClient) GetPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -132,10 +125,8 @@ func (client RegulatoryComplianceStandardsClient) GetResponder(resp *http.Respon // List supported regulatory compliance standards details and state // Parameters: -// resourceGroupName - the name of the resource group within the user's subscription. The name is case -// insensitive. // filter - oData filter. Optional. -func (client RegulatoryComplianceStandardsClient) List(ctx context.Context, resourceGroupName string, filter string) (result RegulatoryComplianceStandardListPage, err error) { +func (client RegulatoryComplianceStandardsClient) List(ctx context.Context, filter string) (result RegulatoryComplianceStandardListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceStandardsClient.List") defer func() { @@ -148,16 +139,12 @@ func (client RegulatoryComplianceStandardsClient) List(ctx context.Context, reso } if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { return result, validation.NewError("security.RegulatoryComplianceStandardsClient", "List", err.Error()) } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, filter) + req, err := client.ListPreparer(ctx, filter) if err != nil { err = autorest.NewErrorWithError(err, "security.RegulatoryComplianceStandardsClient", "List", nil, "Failure preparing request") return @@ -179,10 +166,9 @@ func (client RegulatoryComplianceStandardsClient) List(ctx context.Context, reso } // ListPreparer prepares the List request. -func (client RegulatoryComplianceStandardsClient) ListPreparer(ctx context.Context, resourceGroupName string, filter string) (*http.Request, error) { +func (client RegulatoryComplianceStandardsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-01-01-preview" @@ -196,7 +182,7 @@ func (client RegulatoryComplianceStandardsClient) ListPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -243,7 +229,7 @@ func (client RegulatoryComplianceStandardsClient) listNextResults(ctx context.Co } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegulatoryComplianceStandardsClient) ListComplete(ctx context.Context, resourceGroupName string, filter string) (result RegulatoryComplianceStandardListIterator, err error) { +func (client RegulatoryComplianceStandardsClient) ListComplete(ctx context.Context, filter string) (result RegulatoryComplianceStandardListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RegulatoryComplianceStandardsClient.List") defer func() { @@ -254,6 +240,6 @@ func (client RegulatoryComplianceStandardsClient) ListComplete(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, filter) + result.page, err = client.List(ctx, filter) return } 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 c09a614e0bc6..6bbfd6af5631 100644 --- a/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go @@ -199,24 +199,24 @@ var _ WorkspaceSettingsClientAPI = (*security.WorkspaceSettingsClient)(nil) // RegulatoryComplianceStandardsClientAPI contains the set of methods on the RegulatoryComplianceStandardsClient type. type RegulatoryComplianceStandardsClientAPI interface { - Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string) (result security.RegulatoryComplianceStandard, err error) - List(ctx context.Context, resourceGroupName string, filter string) (result security.RegulatoryComplianceStandardListPage, err error) + Get(ctx context.Context, regulatoryComplianceStandardName string) (result security.RegulatoryComplianceStandard, err error) + List(ctx context.Context, filter string) (result security.RegulatoryComplianceStandardListPage, err error) } var _ RegulatoryComplianceStandardsClientAPI = (*security.RegulatoryComplianceStandardsClient)(nil) // RegulatoryComplianceControlsClientAPI contains the set of methods on the RegulatoryComplianceControlsClient type. type RegulatoryComplianceControlsClientAPI interface { - Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (result security.RegulatoryComplianceControl, err error) - List(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, filter string) (result security.RegulatoryComplianceControlListPage, err error) + 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) } var _ RegulatoryComplianceControlsClientAPI = (*security.RegulatoryComplianceControlsClient)(nil) // RegulatoryComplianceAssessmentsClientAPI contains the set of methods on the RegulatoryComplianceAssessmentsClient type. type RegulatoryComplianceAssessmentsClientAPI interface { - Get(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (result security.RegulatoryComplianceAssessment, err error) - List(ctx context.Context, resourceGroupName string, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result security.RegulatoryComplianceAssessmentListPage, err error) + 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) } var _ RegulatoryComplianceAssessmentsClientAPI = (*security.RegulatoryComplianceAssessmentsClient)(nil)