From d10f30ead41a60f3f01c51dd73e973da494e712e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 8 Jul 2021 08:05:01 +0000 Subject: [PATCH] CodeGen from PR 14623 in Azure/azure-rest-api-specs adding az cli command generation (#14623) * adding az cli command generation * reverting x-ms-client-flatten for delegated subnet * address feedback from cli team * pushing another change * remove readonly flag * remove flatten flag Co-authored-by: Ali Egal --- .../2021-03-15/delegatednetwork/CHANGELOG.md | 67 ++---------- .../2021-03-15/delegatednetwork/_meta.json | 2 +- .../2021-03-15/delegatednetwork/controller.go | 12 +- .../delegatednetwork/delegatednetwork.go | 3 +- .../delegatednetworkapi/interfaces.go | 2 +- .../delegatedsubnetservice.go | 15 +-- .../orchestratorinstanceservice.go | 25 ++--- .../delegatednetwork/CHANGELOG.md | 63 ++++++++++- .../delegatednetwork/_meta.json | 2 +- .../delegatednetwork/controller.go | 40 +++---- .../delegatednetwork/delegatednetwork.go | 14 ++- .../delegatednetworkapi/interfaces.go | 2 +- .../delegatedsubnetservice.go | 64 ++++++----- .../delegatednetwork/enums.go | 30 +++++ .../delegatednetwork/models.go | 103 +++++++++--------- .../orchestratorinstanceservice.go | 52 +++++---- 16 files changed, 274 insertions(+), 222 deletions(-) diff --git a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/CHANGELOG.md b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/CHANGELOG.md index df0093654204..3d0524b4de0f 100644 --- a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/CHANGELOG.md +++ b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/CHANGELOG.md @@ -1,61 +1,16 @@ -# Change History +# Unreleased ## Breaking Changes -### Removed Constants +### Signature Changes -1. ActionType.Internal -1. ControllerState.Deleting -1. ControllerState.Failed -1. ControllerState.Provisioning -1. ControllerState.Succeeded -1. Origin.System -1. Origin.User -1. Origin.Usersystem -1. ResourceIdentityType.None -1. ResourceIdentityType.SystemAssigned +#### Funcs -### Removed Funcs - -1. *DelegatedController.UnmarshalJSON([]byte) error -1. *DelegatedSubnet.UnmarshalJSON([]byte) error -1. *Orchestrator.UnmarshalJSON([]byte) error - -### Struct Changes - -#### Removed Struct Fields - -1. DelegatedController.*DelegatedControllerProperties -1. DelegatedSubnet.*DelegatedSubnetProperties -1. Orchestrator.*OrchestratorResourceProperties - -## Additive Changes - -### New Constants - -1. ActionType.ActionTypeInternal -1. ControllerState.ControllerStateDeleting -1. ControllerState.ControllerStateFailed -1. ControllerState.ControllerStateProvisioning -1. ControllerState.ControllerStateSucceeded -1. Origin.OriginSystem -1. Origin.OriginUser -1. Origin.OriginUsersystem -1. ResourceIdentityType.ResourceIdentityTypeNone -1. ResourceIdentityType.ResourceIdentityTypeSystemAssigned - -### New Funcs - -1. DelegatedControllerProperties.MarshalJSON() ([]byte, error) -1. ErrorAdditionalInfo.MarshalJSON() ([]byte, error) -1. ErrorDetail.MarshalJSON() ([]byte, error) -1. OperationDisplay.MarshalJSON() ([]byte, error) -1. OperationListResult.MarshalJSON() ([]byte, error) - -### Struct Changes - -#### New Struct Fields - -1. DelegatedController.Properties -1. DelegatedSubnet.Properties -1. Orchestrator.Properties +1. OrchestratorInstanceServiceClient.Delete + - Params + - From: context.Context, string, string + - To: context.Context, string, string, *bool +1. OrchestratorInstanceServiceClient.DeletePreparer + - Params + - From: context.Context, string, string + - To: context.Context, string, string, *bool diff --git a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/_meta.json b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/_meta.json index b3d1ee294226..38cc1a6ff38a 100644 --- a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/_meta.json +++ b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/_meta.json @@ -1,5 +1,5 @@ { - "commit": "394395ed0bdc1c5c05cb37a031379ca03bfebbb5", + "commit": "43976e106c90a90ae7f1e354c1db5eef0bce0d24", "readme": "/_/azure-rest-api-specs/specification/dnc/resource-manager/readme.md", "tag": "package-2021-03-15", "use": "@microsoft.azure/autorest.go@2.1.183", diff --git a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/controller.go b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/controller.go index 64ec99f56df5..e2e7e0a88ddd 100644 --- a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/controller.go +++ b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/controller.go @@ -50,8 +50,7 @@ func (client ControllerClient) Create(ctx context.Context, resourceGroupName str if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -145,8 +144,7 @@ func (client ControllerClient) Delete(ctx context.Context, resourceGroupName str if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -236,8 +234,7 @@ func (client ControllerClient) GetDetails(ctx context.Context, resourceGroupName if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -327,8 +324,7 @@ func (client ControllerClient) Patch(ctx context.Context, resourceGroupName stri if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/delegatednetwork.go b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/delegatednetwork.go index c91752cb58bf..8705868a105f 100644 --- a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/delegatednetwork.go +++ b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/delegatednetwork.go @@ -48,8 +48,7 @@ func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.Client", "ListByResourceGroup", err.Error()) diff --git a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/delegatednetworkapi/interfaces.go b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/delegatednetworkapi/interfaces.go index 096985ef944d..215ee02e00e4 100644 --- a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/delegatednetworkapi/interfaces.go +++ b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/delegatednetworkapi/interfaces.go @@ -34,7 +34,7 @@ var _ ClientAPI = (*delegatednetwork.Client)(nil) // OrchestratorInstanceServiceClientAPI contains the set of methods on the OrchestratorInstanceServiceClient type. type OrchestratorInstanceServiceClientAPI interface { Create(ctx context.Context, resourceGroupName string, resourceName string, parameters delegatednetwork.Orchestrator) (result delegatednetwork.OrchestratorInstanceServiceCreateFuture, err error) - Delete(ctx context.Context, resourceGroupName string, resourceName string) (result delegatednetwork.OrchestratorInstanceServiceDeleteFuture, err error) + Delete(ctx context.Context, resourceGroupName string, resourceName string, forceDelete *bool) (result delegatednetwork.OrchestratorInstanceServiceDeleteFuture, err error) GetDetails(ctx context.Context, resourceGroupName string, resourceName string) (result delegatednetwork.Orchestrator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result delegatednetwork.OrchestratorsPage, err error) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result delegatednetwork.OrchestratorsIterator, err error) diff --git a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/delegatedsubnetservice.go b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/delegatedsubnetservice.go index 9fb5baca3309..6baf9b8c89b2 100644 --- a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/delegatedsubnetservice.go +++ b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/delegatedsubnetservice.go @@ -51,8 +51,7 @@ func (client DelegatedSubnetServiceClient) DeleteDetails(ctx context.Context, re if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -145,8 +144,7 @@ func (client DelegatedSubnetServiceClient) GetDetails(ctx context.Context, resou if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -234,8 +232,7 @@ func (client DelegatedSubnetServiceClient) ListByResourceGroup(ctx context.Conte if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.DelegatedSubnetServiceClient", "ListByResourceGroup", err.Error()) @@ -481,8 +478,7 @@ func (client DelegatedSubnetServiceClient) PatchDetails(ctx context.Context, res if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -576,8 +572,7 @@ func (client DelegatedSubnetServiceClient) PutDetails(ctx context.Context, resou if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/orchestratorinstanceservice.go b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/orchestratorinstanceservice.go index f47fcd9d695c..9727d2c7e7d0 100644 --- a/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/orchestratorinstanceservice.go +++ b/services/delegatednetwork/mgmt/2021-03-15/delegatednetwork/orchestratorinstanceservice.go @@ -51,8 +51,7 @@ func (client OrchestratorInstanceServiceClient) Create(ctx context.Context, reso if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -134,7 +133,8 @@ func (client OrchestratorInstanceServiceClient) CreateResponder(resp *http.Respo // Parameters: // resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. -func (client OrchestratorInstanceServiceClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result OrchestratorInstanceServiceDeleteFuture, err error) { +// forceDelete - force delete resource +func (client OrchestratorInstanceServiceClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, forceDelete *bool) (result OrchestratorInstanceServiceDeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/OrchestratorInstanceServiceClient.Delete") defer func() { @@ -148,8 +148,7 @@ func (client OrchestratorInstanceServiceClient) Delete(ctx context.Context, reso if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -159,7 +158,7 @@ func (client OrchestratorInstanceServiceClient) Delete(ctx context.Context, reso return result, validation.NewError("delegatednetwork.OrchestratorInstanceServiceClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, forceDelete) if err != nil { err = autorest.NewErrorWithError(err, "delegatednetwork.OrchestratorInstanceServiceClient", "Delete", nil, "Failure preparing request") return @@ -175,7 +174,7 @@ func (client OrchestratorInstanceServiceClient) Delete(ctx context.Context, reso } // DeletePreparer prepares the Delete request. -func (client OrchestratorInstanceServiceClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { +func (client OrchestratorInstanceServiceClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, forceDelete *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "resourceName": autorest.Encode("path", resourceName), @@ -186,6 +185,9 @@ func (client OrchestratorInstanceServiceClient) DeletePreparer(ctx context.Conte queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if forceDelete != nil { + queryParameters["forceDelete"] = autorest.Encode("query", *forceDelete) + } preparer := autorest.CreatePreparer( autorest.AsDelete(), @@ -239,8 +241,7 @@ func (client OrchestratorInstanceServiceClient) GetDetails(ctx context.Context, if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, @@ -328,8 +329,7 @@ func (client OrchestratorInstanceServiceClient) ListByResourceGroup(ctx context. if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.OrchestratorInstanceServiceClient", "ListByResourceGroup", err.Error()) @@ -575,8 +575,7 @@ func (client OrchestratorInstanceServiceClient) Patch(ctx context.Context, resou if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, diff --git a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/CHANGELOG.md b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/CHANGELOG.md index 299dd600ea85..0adae76acc97 100644 --- a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/CHANGELOG.md +++ b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/CHANGELOG.md @@ -1,9 +1,64 @@ -# Change History +# Unreleased + +## Breaking Changes + +### Removed Funcs + +1. ErrorDefinition.MarshalJSON() ([]byte, error) + +### Struct Changes + +#### Removed Structs + +1. ControllerDetailsModel +1. ErrorDefinition + +#### Removed Struct Fields + +1. Operation.Properties + +### Signature Changes + +#### Funcs + +1. DelegatedSubnetServiceClient.DeleteDetails + - Params + - From: context.Context, string, string + - To: context.Context, string, string, *bool +1. DelegatedSubnetServiceClient.DeleteDetailsPreparer + - Params + - From: context.Context, string, string + - To: context.Context, string, string, *bool + +#### Struct Fields + +1. DelegatedSubnetProperties.ControllerDetails changed type from *ControllerDetailsModel to *ControllerDetails +1. ErrorResponse.Error changed type from *ErrorDefinition to *ErrorDetail +1. Operation.Origin changed type from *string to Origin ## Additive Changes +### New Constants + +1. ActionType.Internal +1. Origin.System +1. Origin.User +1. Origin.Usersystem + ### New Funcs -1. DelegatedControllerProperties.MarshalJSON() ([]byte, error) -1. ErrorDefinition.MarshalJSON() ([]byte, error) -1. OperationDisplay.MarshalJSON() ([]byte, error) +1. ErrorAdditionalInfo.MarshalJSON() ([]byte, error) +1. ErrorDetail.MarshalJSON() ([]byte, error) +1. PossibleActionTypeValues() []ActionType +1. PossibleOriginValues() []Origin + +### Struct Changes + +#### New Structs + +1. ErrorAdditionalInfo +1. ErrorDetail + +#### New Struct Fields + +1. Operation.ActionType diff --git a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/_meta.json b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/_meta.json index 9cb1bb2efee4..4f9d5e0d856b 100644 --- a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/_meta.json +++ b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "43976e106c90a90ae7f1e354c1db5eef0bce0d24", "readme": "/_/azure-rest-api-specs/specification/dnc/resource-manager/readme.md", "tag": "package-2020-08-08-preview", "use": "@microsoft.azure/autorest.go@2.1.183", diff --git a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/controller.go b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/controller.go index 50db86d248fd..b63ad648e02d 100644 --- a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/controller.go +++ b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/controller.go @@ -33,8 +33,7 @@ func NewControllerClientWithBaseURI(baseURI string, subscriptionID string) Contr // Create create a dnc controller // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. // parameters - controller type parameters func (client ControllerClient) Create(ctx context.Context, resourceGroupName string, resourceName string, parameters DelegatedController) (result ControllerCreateFuture, err error) { @@ -51,12 +50,13 @@ func (client ControllerClient) Create(ctx context.Context, resourceGroupName str if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.ControllerClient", "Create", err.Error()) } @@ -128,8 +128,7 @@ func (client ControllerClient) CreateResponder(resp *http.Response) (result Dele // Delete deletes the DNC controller // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. func (client ControllerClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result ControllerDeleteFuture, err error) { if tracing.IsEnabled() { @@ -145,12 +144,13 @@ func (client ControllerClient) Delete(ctx context.Context, resourceGroupName str if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.ControllerClient", "Delete", err.Error()) } @@ -218,8 +218,7 @@ func (client ControllerClient) DeleteResponder(resp *http.Response) (result auto // GetDetails gets details about the specified dnc controller. // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. func (client ControllerClient) GetDetails(ctx context.Context, resourceGroupName string, resourceName string) (result DelegatedController, err error) { if tracing.IsEnabled() { @@ -235,12 +234,13 @@ func (client ControllerClient) GetDetails(ctx context.Context, resourceGroupName if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.ControllerClient", "GetDetails", err.Error()) } @@ -307,8 +307,7 @@ func (client ControllerClient) GetDetailsResponder(resp *http.Response) (result // Patch update dnc controller // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. // parameters - controller type parameters func (client ControllerClient) Patch(ctx context.Context, resourceGroupName string, resourceName string, parameters ControllerResourceUpdateParameters) (result DelegatedController, err error) { @@ -325,12 +324,13 @@ func (client ControllerClient) Patch(ctx context.Context, resourceGroupName stri if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.ControllerClient", "Patch", err.Error()) } diff --git a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/delegatednetwork.go b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/delegatednetwork.go index bb4ed4baa5f0..6636c6ae2d10 100644 --- a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/delegatednetwork.go +++ b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/delegatednetwork.go @@ -33,8 +33,7 @@ func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { // ListByResourceGroup get all the delegatedController resources in a resource group. // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DelegatedControllersPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListByResourceGroup") @@ -49,8 +48,9 @@ func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.Client", "ListByResourceGroup", err.Error()) } @@ -168,6 +168,12 @@ func (client Client) ListBySubscription(ctx context.Context) (result DelegatedCo tracing.EndSpan(ctx, sc, err) }() } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("delegatednetwork.Client", "ListBySubscription", err.Error()) + } + result.fn = client.listBySubscriptionNextResults req, err := client.ListBySubscriptionPreparer(ctx) if err != nil { diff --git a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/delegatednetworkapi/interfaces.go b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/delegatednetworkapi/interfaces.go index 6ffc9874c68a..2d86fbf7269f 100644 --- a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/delegatednetworkapi/interfaces.go +++ b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/delegatednetworkapi/interfaces.go @@ -47,7 +47,7 @@ var _ OrchestratorInstanceServiceClientAPI = (*delegatednetwork.OrchestratorInst // DelegatedSubnetServiceClientAPI contains the set of methods on the DelegatedSubnetServiceClient type. type DelegatedSubnetServiceClientAPI interface { - DeleteDetails(ctx context.Context, resourceGroupName string, resourceName string) (result delegatednetwork.DelegatedSubnetServiceDeleteDetailsFuture, err error) + DeleteDetails(ctx context.Context, resourceGroupName string, resourceName string, forceDelete *bool) (result delegatednetwork.DelegatedSubnetServiceDeleteDetailsFuture, err error) GetDetails(ctx context.Context, resourceGroupName string, resourceName string) (result delegatednetwork.DelegatedSubnet, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result delegatednetwork.DelegatedSubnetsPage, err error) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result delegatednetwork.DelegatedSubnetsIterator, err error) diff --git a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/delegatedsubnetservice.go b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/delegatedsubnetservice.go index 187f4168a4a1..71ec02c368f4 100644 --- a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/delegatedsubnetservice.go +++ b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/delegatedsubnetservice.go @@ -34,10 +34,10 @@ func NewDelegatedSubnetServiceClientWithBaseURI(baseURI string, subscriptionID s // DeleteDetails delete dnc DelegatedSubnet. // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. -func (client DelegatedSubnetServiceClient) DeleteDetails(ctx context.Context, resourceGroupName string, resourceName string) (result DelegatedSubnetServiceDeleteDetailsFuture, err error) { +// forceDelete - force delete resource +func (client DelegatedSubnetServiceClient) DeleteDetails(ctx context.Context, resourceGroupName string, resourceName string, forceDelete *bool) (result DelegatedSubnetServiceDeleteDetailsFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DelegatedSubnetServiceClient.DeleteDetails") defer func() { @@ -51,16 +51,17 @@ func (client DelegatedSubnetServiceClient) DeleteDetails(ctx context.Context, re if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.DelegatedSubnetServiceClient", "DeleteDetails", err.Error()) } - req, err := client.DeleteDetailsPreparer(ctx, resourceGroupName, resourceName) + req, err := client.DeleteDetailsPreparer(ctx, resourceGroupName, resourceName, forceDelete) if err != nil { err = autorest.NewErrorWithError(err, "delegatednetwork.DelegatedSubnetServiceClient", "DeleteDetails", nil, "Failure preparing request") return @@ -76,7 +77,7 @@ func (client DelegatedSubnetServiceClient) DeleteDetails(ctx context.Context, re } // DeleteDetailsPreparer prepares the DeleteDetails request. -func (client DelegatedSubnetServiceClient) DeleteDetailsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { +func (client DelegatedSubnetServiceClient) DeleteDetailsPreparer(ctx context.Context, resourceGroupName string, resourceName string, forceDelete *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "resourceName": autorest.Encode("path", resourceName), @@ -87,6 +88,9 @@ func (client DelegatedSubnetServiceClient) DeleteDetailsPreparer(ctx context.Con queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if forceDelete != nil { + queryParameters["forceDelete"] = autorest.Encode("query", *forceDelete) + } preparer := autorest.CreatePreparer( autorest.AsDelete(), @@ -124,8 +128,7 @@ func (client DelegatedSubnetServiceClient) DeleteDetailsResponder(resp *http.Res // GetDetails gets details about the specified dnc DelegatedSubnet Link. // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. func (client DelegatedSubnetServiceClient) GetDetails(ctx context.Context, resourceGroupName string, resourceName string) (result DelegatedSubnet, err error) { if tracing.IsEnabled() { @@ -141,12 +144,13 @@ func (client DelegatedSubnetServiceClient) GetDetails(ctx context.Context, resou if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.DelegatedSubnetServiceClient", "GetDetails", err.Error()) } @@ -213,8 +217,7 @@ func (client DelegatedSubnetServiceClient) GetDetailsResponder(resp *http.Respon // ListByResourceGroup get all the DelegatedSubnets resources in a resource group. // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. func (client DelegatedSubnetServiceClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DelegatedSubnetsPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DelegatedSubnetServiceClient.ListByResourceGroup") @@ -229,8 +232,9 @@ func (client DelegatedSubnetServiceClient) ListByResourceGroup(ctx context.Conte if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.DelegatedSubnetServiceClient", "ListByResourceGroup", err.Error()) } @@ -348,6 +352,12 @@ func (client DelegatedSubnetServiceClient) ListBySubscription(ctx context.Contex tracing.EndSpan(ctx, sc, err) }() } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("delegatednetwork.DelegatedSubnetServiceClient", "ListBySubscription", err.Error()) + } + result.fn = client.listBySubscriptionNextResults req, err := client.ListBySubscriptionPreparer(ctx) if err != nil { @@ -451,8 +461,7 @@ func (client DelegatedSubnetServiceClient) ListBySubscriptionComplete(ctx contex // PatchDetails patch delegated subnet resource // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. // parameters - delegated subnet details. func (client DelegatedSubnetServiceClient) PatchDetails(ctx context.Context, resourceGroupName string, resourceName string, parameters ResourceUpdateParameters) (result DelegatedSubnetServicePatchDetailsFuture, err error) { @@ -469,12 +478,13 @@ func (client DelegatedSubnetServiceClient) PatchDetails(ctx context.Context, res if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.DelegatedSubnetServiceClient", "PatchDetails", err.Error()) } @@ -545,8 +555,7 @@ func (client DelegatedSubnetServiceClient) PatchDetailsResponder(resp *http.Resp // PutDetails put delegated subnet resource // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. // parameters - delegated subnet details. func (client DelegatedSubnetServiceClient) PutDetails(ctx context.Context, resourceGroupName string, resourceName string, parameters DelegatedSubnet) (result DelegatedSubnetServicePutDetailsFuture, err error) { @@ -563,12 +572,13 @@ func (client DelegatedSubnetServiceClient) PutDetails(ctx context.Context, resou if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.DelegatedSubnetServiceClient", "PutDetails", err.Error()) } diff --git a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/enums.go b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/enums.go index 688badcc4302..9c6e35a4c96f 100644 --- a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/enums.go +++ b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/enums.go @@ -6,6 +6,19 @@ package delegatednetwork // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// ActionType enumerates the values for action type. +type ActionType string + +const ( + // Internal ... + Internal ActionType = "Internal" +) + +// PossibleActionTypeValues returns an array of possible values for the ActionType const type. +func PossibleActionTypeValues() []ActionType { + return []ActionType{Internal} +} + // ControllerState enumerates the values for controller state. type ControllerState string @@ -63,6 +76,23 @@ func PossibleOrchestratorInstanceStateValues() []OrchestratorInstanceState { return []OrchestratorInstanceState{OrchestratorInstanceStateDeleting, OrchestratorInstanceStateFailed, OrchestratorInstanceStateProvisioning, OrchestratorInstanceStateSucceeded} } +// Origin enumerates the values for origin. +type Origin string + +const ( + // System ... + System Origin = "system" + // User ... + User Origin = "user" + // Usersystem ... + Usersystem Origin = "user,system" +) + +// PossibleOriginValues returns an array of possible values for the Origin const type. +func PossibleOriginValues() []Origin { + return []Origin{System, User, Usersystem} +} + // ResourceIdentityType enumerates the values for resource identity type. type ResourceIdentityType string diff --git a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/models.go b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/models.go index 9f8beab8b5d8..13a60a14439e 100644 --- a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/models.go +++ b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/models.go @@ -105,12 +105,6 @@ type ControllerDetails struct { ID *string `json:"id,omitempty"` } -// ControllerDetailsModel controller details -type ControllerDetailsModel struct { - // ID - controller arm resource id - ID *string `json:"id,omitempty"` -} - // ControllerResource represents an instance of a resource. type ControllerResource struct { // ID - READ-ONLY; An identifier that represents the resource. @@ -542,10 +536,10 @@ type DelegatedSubnetProperties struct { ResourceGUID *string `json:"resourceGuid,omitempty"` // ProvisioningState - READ-ONLY; The current state of dnc delegated subnet resource. Possible values include: 'DelegatedSubnetStateDeleting', 'DelegatedSubnetStateSucceeded', 'DelegatedSubnetStateFailed', 'DelegatedSubnetStateProvisioning' ProvisioningState DelegatedSubnetState `json:"provisioningState,omitempty"` - // SubnetDetails - orchestrator details + // SubnetDetails - subnet details SubnetDetails *SubnetDetails `json:"subnetDetails,omitempty"` - // ControllerDetails - controller details - ControllerDetails *ControllerDetailsModel `json:"controllerDetails,omitempty"` + // ControllerDetails - Properties of the controller. + ControllerDetails *ControllerDetails `json:"controllerDetails,omitempty"` } // MarshalJSON is the custom marshaler for DelegatedSubnetProperties. @@ -877,94 +871,101 @@ func NewDelegatedSubnetsPage(cur DelegatedSubnets, getNextPage func(context.Cont } } -// ErrorDefinition error definition. -type ErrorDefinition struct { - // Code - READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code. +// ErrorAdditionalInfo the resource management error additional info. +type ErrorAdditionalInfo struct { + // Type - READ-ONLY; The additional info type. + Type *string `json:"type,omitempty"` + // Info - READ-ONLY; The additional info. + Info interface{} `json:"info,omitempty"` +} + +// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. +func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ErrorDetail the error detail. +type ErrorDetail struct { + // Code - READ-ONLY; The error code. Code *string `json:"code,omitempty"` - // Message - READ-ONLY; Description of the error. + // Message - READ-ONLY; The error message. Message *string `json:"message,omitempty"` - // Details - READ-ONLY; Internal error details. - Details *[]ErrorDefinition `json:"details,omitempty"` + // Target - READ-ONLY; The error target. + Target *string `json:"target,omitempty"` + // Details - READ-ONLY; The error details. + Details *[]ErrorDetail `json:"details,omitempty"` + // AdditionalInfo - READ-ONLY; The error additional info. + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` } -// MarshalJSON is the custom marshaler for ErrorDefinition. -func (ed ErrorDefinition) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ErrorDetail. +func (ed ErrorDetail) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } -// ErrorResponse error response. +// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for +// failed operations. (This also follows the OData error response format.). type ErrorResponse struct { - // Error - Error description - Error *ErrorDefinition `json:"error,omitempty"` + // Error - The error object. + Error *ErrorDetail `json:"error,omitempty"` } -// Operation microsoft.DelegatedNetwork REST API operation definition +// Operation details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { - // Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}. + // Name - READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" Name *string `json:"name,omitempty"` - // Origin - Origin of the operation - Origin *string `json:"origin,omitempty"` - // IsDataAction - Gets or sets a value indicating whether the operation is a data action or not. + // IsDataAction - READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. IsDataAction *bool `json:"isDataAction,omitempty"` - // Display - Operation properties display + // Display - Localized display information for this particular operation. Display *OperationDisplay `json:"display,omitempty"` - // Properties - Properties of the operation - Properties interface{} `json:"properties,omitempty"` + // Origin - READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system". Possible values include: 'User', 'System', 'Usersystem' + Origin Origin `json:"origin,omitempty"` + // ActionType - READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. Possible values include: 'Internal' + ActionType ActionType `json:"actionType,omitempty"` } // MarshalJSON is the custom marshaler for Operation. func (o Operation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if o.Origin != nil { - objectMap["origin"] = o.Origin - } - if o.IsDataAction != nil { - objectMap["isDataAction"] = o.IsDataAction - } if o.Display != nil { objectMap["display"] = o.Display } - if o.Properties != nil { - objectMap["properties"] = o.Properties - } return json.Marshal(objectMap) } -// OperationDisplay the object that represents the operation. +// OperationDisplay localized display information for this particular operation. type OperationDisplay struct { - // Provider - READ-ONLY; Service provider: Microsoft.DelegatedNetwork. + // Provider - READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". Provider *string `json:"provider,omitempty"` - // Resource - READ-ONLY; Resource on which the operation is performed: controller, etc. + // Resource - READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". Resource *string `json:"resource,omitempty"` - // Operation - READ-ONLY; Operation type: create, get, delete, etc. + // Operation - READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". Operation *string `json:"operation,omitempty"` - // Description - READ-ONLY; Friendly description for the operation, + // Description - READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string `json:"description,omitempty"` } // MarshalJSON is the custom marshaler for OperationDisplay. -func (od OperationDisplay) MarshalJSON() ([]byte, error) { +func (o OperationDisplay) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } -// OperationListResult result of request to list controller operations.It contains a list of operations and -// a URL link to get the next set of results +// OperationListResult a list of REST API operations supported by an Azure Resource Provider. It contains +// an URL link to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` - // Value - READ-ONLY; List of operations supported by the Microsoft.DelegatedNetwork resource provider. + // Value - READ-ONLY; List of operations supported by the resource provider Value *[]Operation `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. + // NextLink - READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string `json:"nextLink,omitempty"` } // MarshalJSON is the custom marshaler for OperationListResult. func (olr OperationListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if olr.NextLink != nil { - objectMap["nextLink"] = olr.NextLink - } return json.Marshal(objectMap) } @@ -1396,7 +1397,7 @@ type OrchestratorResourceProperties struct { ClusterRootCA *string `json:"clusterRootCA,omitempty"` // APIServerEndpoint - K8s APIServer url APIServerEndpoint *string `json:"apiServerEndpoint,omitempty"` - // ControllerDetails - controller details + // ControllerDetails - Properties of the controller. ControllerDetails *ControllerDetails `json:"controllerDetails,omitempty"` } diff --git a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/orchestratorinstanceservice.go b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/orchestratorinstanceservice.go index 38f849bfc85a..f8de0f42cd83 100644 --- a/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/orchestratorinstanceservice.go +++ b/services/preview/delegatednetwork/mgmt/2020-08-08-preview/delegatednetwork/orchestratorinstanceservice.go @@ -34,8 +34,7 @@ func NewOrchestratorInstanceServiceClientWithBaseURI(baseURI string, subscriptio // Create create a orchestrator instance // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. // parameters - orchestratorInstance type parameters func (client OrchestratorInstanceServiceClient) Create(ctx context.Context, resourceGroupName string, resourceName string, parameters Orchestrator) (result OrchestratorInstanceServiceCreateFuture, err error) { @@ -52,12 +51,13 @@ func (client OrchestratorInstanceServiceClient) Create(ctx context.Context, reso if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.OrchestratorResourceProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.OrchestratorResourceProperties.ControllerDetails", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { @@ -131,8 +131,7 @@ func (client OrchestratorInstanceServiceClient) CreateResponder(resp *http.Respo // Delete deletes the Orchestrator Instance // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. func (client OrchestratorInstanceServiceClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result OrchestratorInstanceServiceDeleteFuture, err error) { if tracing.IsEnabled() { @@ -148,12 +147,13 @@ func (client OrchestratorInstanceServiceClient) Delete(ctx context.Context, reso if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.OrchestratorInstanceServiceClient", "Delete", err.Error()) } @@ -221,8 +221,7 @@ func (client OrchestratorInstanceServiceClient) DeleteResponder(resp *http.Respo // GetDetails gets details about the orchestrator instance. // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. func (client OrchestratorInstanceServiceClient) GetDetails(ctx context.Context, resourceGroupName string, resourceName string) (result Orchestrator, err error) { if tracing.IsEnabled() { @@ -238,12 +237,13 @@ func (client OrchestratorInstanceServiceClient) GetDetails(ctx context.Context, if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.OrchestratorInstanceServiceClient", "GetDetails", err.Error()) } @@ -310,8 +310,7 @@ func (client OrchestratorInstanceServiceClient) GetDetailsResponder(resp *http.R // ListByResourceGroup get all the OrchestratorInstances resources in a resource group. // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. func (client OrchestratorInstanceServiceClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result OrchestratorsPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/OrchestratorInstanceServiceClient.ListByResourceGroup") @@ -326,8 +325,9 @@ func (client OrchestratorInstanceServiceClient) ListByResourceGroup(ctx context. if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.OrchestratorInstanceServiceClient", "ListByResourceGroup", err.Error()) } @@ -445,6 +445,12 @@ func (client OrchestratorInstanceServiceClient) ListBySubscription(ctx context.C tracing.EndSpan(ctx, sc, err) }() } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("delegatednetwork.OrchestratorInstanceServiceClient", "ListBySubscription", err.Error()) + } + result.fn = client.listBySubscriptionNextResults req, err := client.ListBySubscriptionPreparer(ctx) if err != nil { @@ -548,8 +554,7 @@ func (client OrchestratorInstanceServiceClient) ListBySubscriptionComplete(ctx c // Patch update Orchestrator Instance // Parameters: -// resourceGroupName - the name of the Azure Resource group of which a given DelegatedNetwork resource is part. -// This name must be at least 1 character in length, and no more than 90. +// resourceGroupName - the name of the resource group. The name is case insensitive. // resourceName - the name of the resource. It must be a minimum of 3 characters, and a maximum of 63. // parameters - orchestratorInstance update parameters func (client OrchestratorInstanceServiceClient) Patch(ctx context.Context, resourceGroupName string, resourceName string, parameters OrchestratorResourceUpdateParameters) (result Orchestrator, err error) { @@ -566,12 +571,13 @@ func (client OrchestratorInstanceServiceClient) Patch(ctx context.Context, resou if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceName, Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "resourceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("delegatednetwork.OrchestratorInstanceServiceClient", "Patch", err.Error()) }