From 46f5f2f39133e9436c7d563d924285cc3007a0b6 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 11 Apr 2022 17:42:55 +0000 Subject: [PATCH] CodeGen from PR 18481 in Azure/azure-rest-api-specs Merge dddbd04870fb82251ff78f7c3ac6b2171f47a1db into a0ea00d6f2a385a23212211ccaf6eb4a1c3eae7b --- .../deviceupdate/CHANGELOG.md | 173 ------ .../deviceupdate/CHANGELOG.md | 2 + .../deviceupdate/_meta.json | 6 +- .../deviceupdate/accounts.go | 14 +- .../deviceupdate/client.go | 4 +- .../deviceupdateapi/interfaces.go | 14 +- .../deviceupdate/enums.go | 50 ++ .../deviceupdate/instances.go | 12 +- .../deviceupdate/models.go | 359 ++++++++++- .../deviceupdate/operations.go | 2 +- .../privateendpointconnectionproxies.go | 565 ++++++++++++++++++ .../privateendpointconnections.go | 10 +- .../deviceupdate/privatelinkresources.go | 4 +- .../deviceupdate/version.go | 2 +- 14 files changed, 1010 insertions(+), 207 deletions(-) delete mode 100644 services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/CHANGELOG.md create mode 100644 services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/CHANGELOG.md rename services/preview/deviceupdate/mgmt/{2020-03-01-preview => 2022-04-01-preview}/deviceupdate/_meta.json (79%) rename services/preview/deviceupdate/mgmt/{2020-03-01-preview => 2022-04-01-preview}/deviceupdate/accounts.go (98%) rename services/preview/deviceupdate/mgmt/{2020-03-01-preview => 2022-04-01-preview}/deviceupdate/client.go (98%) rename services/preview/deviceupdate/mgmt/{2020-03-01-preview => 2022-04-01-preview}/deviceupdate/deviceupdateapi/interfaces.go (76%) rename services/preview/deviceupdate/mgmt/{2020-03-01-preview => 2022-04-01-preview}/deviceupdate/enums.go (77%) rename services/preview/deviceupdate/mgmt/{2020-03-01-preview => 2022-04-01-preview}/deviceupdate/instances.go (99%) rename services/preview/deviceupdate/mgmt/{2020-03-01-preview => 2022-04-01-preview}/deviceupdate/models.go (79%) rename services/preview/deviceupdate/mgmt/{2020-03-01-preview => 2022-04-01-preview}/deviceupdate/operations.go (99%) create mode 100644 services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/privateendpointconnectionproxies.go rename services/preview/deviceupdate/mgmt/{2020-03-01-preview => 2022-04-01-preview}/deviceupdate/privateendpointconnections.go (98%) rename services/preview/deviceupdate/mgmt/{2020-03-01-preview => 2022-04-01-preview}/deviceupdate/privatelinkresources.go (99%) rename services/preview/deviceupdate/mgmt/{2020-03-01-preview => 2022-04-01-preview}/deviceupdate/version.go (90%) diff --git a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/CHANGELOG.md b/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/CHANGELOG.md deleted file mode 100644 index 478dc4d5096e..000000000000 --- a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/CHANGELOG.md +++ /dev/null @@ -1,173 +0,0 @@ -# Change History - -## Breaking Changes - -### Removed Constants - -1. Origin.System -1. Origin.Usersystem -1. ProvisioningState.Accepted -1. ProvisioningState.Creating -1. ProvisioningState.Deleted - -### Removed Funcs - -1. ErrorDefinition.MarshalJSON() ([]byte, error) -1. ErrorResponse.MarshalJSON() ([]byte, error) - -### Struct Changes - -#### Removed Structs - -1. ErrorDefinition - -#### Removed Struct Fields - -1. ErrorResponse.AdditionalInfo -1. ErrorResponse.Code -1. ErrorResponse.Details -1. ErrorResponse.Message -1. ErrorResponse.Target - -### Signature Changes - -#### Const Types - -1. Canceled changed type from ProvisioningState to GroupIDProvisioningState -1. Failed changed type from ProvisioningState to GroupIDProvisioningState -1. Succeeded changed type from ProvisioningState to GroupIDProvisioningState -1. User changed type from Origin to CreatedByType - -## Additive Changes - -### New Constants - -1. CheckNameAvailabilityReason.AlreadyExists -1. CheckNameAvailabilityReason.Invalid -1. CreatedByType.Application -1. CreatedByType.Key -1. CreatedByType.ManagedIdentity -1. ManagedServiceIdentityType.None -1. ManagedServiceIdentityType.SystemAssigned -1. ManagedServiceIdentityType.SystemAssignedUserAssigned -1. ManagedServiceIdentityType.UserAssigned -1. Origin.OriginSystem -1. Origin.OriginUser -1. Origin.OriginUsersystem -1. PrivateEndpointConnectionProvisioningState.PrivateEndpointConnectionProvisioningStateCreating -1. PrivateEndpointConnectionProvisioningState.PrivateEndpointConnectionProvisioningStateDeleting -1. PrivateEndpointConnectionProvisioningState.PrivateEndpointConnectionProvisioningStateFailed -1. PrivateEndpointConnectionProvisioningState.PrivateEndpointConnectionProvisioningStateSucceeded -1. PrivateEndpointServiceConnectionStatus.Approved -1. PrivateEndpointServiceConnectionStatus.Pending -1. PrivateEndpointServiceConnectionStatus.Rejected -1. ProvisioningState.ProvisioningStateAccepted -1. ProvisioningState.ProvisioningStateCanceled -1. ProvisioningState.ProvisioningStateCreating -1. ProvisioningState.ProvisioningStateDeleted -1. ProvisioningState.ProvisioningStateFailed -1. ProvisioningState.ProvisioningStateSucceeded -1. PublicNetworkAccess.Disabled -1. PublicNetworkAccess.Enabled - -### New Funcs - -1. *GroupInformation.UnmarshalJSON([]byte) error -1. *PrivateEndpointConnection.UnmarshalJSON([]byte) error -1. *PrivateEndpointConnectionsCreateOrUpdateFuture.UnmarshalJSON([]byte) error -1. *PrivateEndpointConnectionsDeleteFuture.UnmarshalJSON([]byte) error -1. AccountsClient.Head(context.Context, string, string) (autorest.Response, error) -1. AccountsClient.HeadPreparer(context.Context, string, string) (*http.Request, error) -1. AccountsClient.HeadResponder(*http.Response) (autorest.Response, error) -1. AccountsClient.HeadSender(*http.Request) (*http.Response, error) -1. BaseClient.CheckNameAvailability(context.Context, CheckNameAvailabilityRequest) (CheckNameAvailabilityResponse, error) -1. BaseClient.CheckNameAvailabilityPreparer(context.Context, CheckNameAvailabilityRequest) (*http.Request, error) -1. BaseClient.CheckNameAvailabilityResponder(*http.Response) (CheckNameAvailabilityResponse, error) -1. BaseClient.CheckNameAvailabilitySender(*http.Request) (*http.Response, error) -1. ErrorDetail.MarshalJSON() ([]byte, error) -1. GroupInformation.MarshalJSON() ([]byte, error) -1. GroupInformationProperties.MarshalJSON() ([]byte, error) -1. InstancesClient.Head(context.Context, string, string, string) (autorest.Response, error) -1. InstancesClient.HeadPreparer(context.Context, string, string, string) (*http.Request, error) -1. InstancesClient.HeadResponder(*http.Response) (autorest.Response, error) -1. InstancesClient.HeadSender(*http.Request) (*http.Response, error) -1. ManagedServiceIdentity.MarshalJSON() ([]byte, error) -1. NewPrivateEndpointConnectionsClient(string) PrivateEndpointConnectionsClient -1. NewPrivateEndpointConnectionsClientWithBaseURI(string, string) PrivateEndpointConnectionsClient -1. NewPrivateLinkResourcesClient(string) PrivateLinkResourcesClient -1. NewPrivateLinkResourcesClientWithBaseURI(string, string) PrivateLinkResourcesClient -1. PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason -1. PossibleCreatedByTypeValues() []CreatedByType -1. PossibleGroupIDProvisioningStateValues() []GroupIDProvisioningState -1. PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType -1. PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState -1. PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus -1. PossiblePublicNetworkAccessValues() []PublicNetworkAccess -1. PrivateEndpoint.MarshalJSON() ([]byte, error) -1. PrivateEndpointConnection.MarshalJSON() ([]byte, error) -1. PrivateEndpointConnectionsClient.CreateOrUpdate(context.Context, string, string, string, PrivateEndpointConnection) (PrivateEndpointConnectionsCreateOrUpdateFuture, error) -1. PrivateEndpointConnectionsClient.CreateOrUpdatePreparer(context.Context, string, string, string, PrivateEndpointConnection) (*http.Request, error) -1. PrivateEndpointConnectionsClient.CreateOrUpdateResponder(*http.Response) (PrivateEndpointConnection, error) -1. PrivateEndpointConnectionsClient.CreateOrUpdateSender(*http.Request) (PrivateEndpointConnectionsCreateOrUpdateFuture, error) -1. PrivateEndpointConnectionsClient.Delete(context.Context, string, string, string) (PrivateEndpointConnectionsDeleteFuture, error) -1. PrivateEndpointConnectionsClient.DeletePreparer(context.Context, string, string, string) (*http.Request, error) -1. PrivateEndpointConnectionsClient.DeleteResponder(*http.Response) (autorest.Response, error) -1. PrivateEndpointConnectionsClient.DeleteSender(*http.Request) (PrivateEndpointConnectionsDeleteFuture, error) -1. PrivateEndpointConnectionsClient.Get(context.Context, string, string, string) (PrivateEndpointConnection, error) -1. PrivateEndpointConnectionsClient.GetPreparer(context.Context, string, string, string) (*http.Request, error) -1. PrivateEndpointConnectionsClient.GetResponder(*http.Response) (PrivateEndpointConnection, error) -1. PrivateEndpointConnectionsClient.GetSender(*http.Request) (*http.Response, error) -1. PrivateEndpointConnectionsClient.ListByAccount(context.Context, string, string) (PrivateEndpointConnectionListResult, error) -1. PrivateEndpointConnectionsClient.ListByAccountPreparer(context.Context, string, string) (*http.Request, error) -1. PrivateEndpointConnectionsClient.ListByAccountResponder(*http.Response) (PrivateEndpointConnectionListResult, error) -1. PrivateEndpointConnectionsClient.ListByAccountSender(*http.Request) (*http.Response, error) -1. PrivateLinkResourceProperties.MarshalJSON() ([]byte, error) -1. PrivateLinkResourcesClient.Get(context.Context, string, string, string) (GroupInformation, error) -1. PrivateLinkResourcesClient.GetPreparer(context.Context, string, string, string) (*http.Request, error) -1. PrivateLinkResourcesClient.GetResponder(*http.Response) (GroupInformation, error) -1. PrivateLinkResourcesClient.GetSender(*http.Request) (*http.Response, error) -1. PrivateLinkResourcesClient.ListByAccount(context.Context, string, string) (PrivateLinkResourceListResult, error) -1. PrivateLinkResourcesClient.ListByAccountPreparer(context.Context, string, string) (*http.Request, error) -1. PrivateLinkResourcesClient.ListByAccountResponder(*http.Response) (PrivateLinkResourceListResult, error) -1. PrivateLinkResourcesClient.ListByAccountSender(*http.Request) (*http.Response, error) -1. UserAssignedIdentity.MarshalJSON() ([]byte, error) - -### Struct Changes - -#### New Structs - -1. CheckNameAvailabilityRequest -1. CheckNameAvailabilityResponse -1. DiagnosticStorageProperties -1. ErrorDetail -1. GroupInformation -1. GroupInformationProperties -1. ManagedServiceIdentity -1. PrivateEndpoint -1. PrivateEndpointConnection -1. PrivateEndpointConnectionListResult -1. PrivateEndpointConnectionProperties -1. PrivateEndpointConnectionsClient -1. PrivateEndpointConnectionsCreateOrUpdateFuture -1. PrivateEndpointConnectionsDeleteFuture -1. PrivateLinkResourceListResult -1. PrivateLinkResourceProperties -1. PrivateLinkResourcesClient -1. PrivateLinkServiceConnectionState -1. SystemData -1. UserAssignedIdentity - -#### New Struct Fields - -1. Account.Identity -1. Account.SystemData -1. AccountProperties.PublicNetworkAccess -1. AccountUpdate.Identity -1. AzureEntityResource.SystemData -1. ErrorResponse.Error -1. Instance.SystemData -1. InstanceProperties.DiagnosticStorageProperties -1. InstanceProperties.EnableDiagnostics -1. ProxyResource.SystemData -1. Resource.SystemData -1. TrackedResource.SystemData diff --git a/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/CHANGELOG.md b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/CHANGELOG.md new file mode 100644 index 000000000000..a1ecf841edb0 --- /dev/null +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/CHANGELOG.md @@ -0,0 +1,2 @@ +# Unreleased + diff --git a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/_meta.json b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/_meta.json similarity index 79% rename from services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/_meta.json rename to services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/_meta.json index 853ef3abea9e..45dee8a9f5dc 100644 --- a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/_meta.json +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/_meta.json @@ -1,10 +1,10 @@ { - "commit": "bd64220293a403f70ae8beebd56fb86951007acf", + "commit": "7983dded237b6a11eb6e77761844619f24f1a393", "readme": "/_/azure-rest-api-specs/specification/deviceupdate/resource-manager/readme.md", - "tag": "package-2020-03-01-preview", + "tag": "package-2022-04-01-preview", "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2020-03-01-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/deviceupdate/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2022-04-01-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/deviceupdate/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" } diff --git a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/accounts.go b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/accounts.go similarity index 98% rename from services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/accounts.go rename to services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/accounts.go index f93c227e3b6f..7623b3829c6f 100644 --- a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/accounts.go +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/accounts.go @@ -78,7 +78,7 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -167,7 +167,7 @@ func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -260,7 +260,7 @@ func (client AccountsClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -344,7 +344,7 @@ func (client AccountsClient) HeadPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -422,7 +422,7 @@ func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -535,7 +535,7 @@ func (client AccountsClient) ListBySubscriptionPreparer(ctx context.Context) (*h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -650,7 +650,7 @@ func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/client.go b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/client.go similarity index 98% rename from services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/client.go rename to services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/client.go index a9f1bcc7ecf1..007aa6732282 100644 --- a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/client.go +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/client.go @@ -1,4 +1,4 @@ -// Package deviceupdate implements the Azure ARM Deviceupdate service API version 2020-03-01-preview. +// Package deviceupdate implements the Azure ARM Deviceupdate service API version 2022-04-01-preview. // // Microsoft Device Update resource provider. package deviceupdate @@ -86,7 +86,7 @@ func (client BaseClient) CheckNameAvailabilityPreparer(ctx context.Context, requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/deviceupdateapi/interfaces.go b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/deviceupdateapi/interfaces.go similarity index 76% rename from services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/deviceupdateapi/interfaces.go rename to services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/deviceupdateapi/interfaces.go index 261e360a245b..5397f1164029 100644 --- a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/deviceupdateapi/interfaces.go +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/deviceupdateapi/interfaces.go @@ -8,7 +8,7 @@ package deviceupdateapi import ( "context" - "github.com/Azure/azure-sdk-for-go/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate" + "github.com/Azure/azure-sdk-for-go/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate" "github.com/Azure/go-autorest/autorest" ) @@ -65,6 +65,18 @@ type PrivateLinkResourcesClientAPI interface { var _ PrivateLinkResourcesClientAPI = (*deviceupdate.PrivateLinkResourcesClient)(nil) +// PrivateEndpointConnectionProxiesClientAPI contains the set of methods on the PrivateEndpointConnectionProxiesClient type. +type PrivateEndpointConnectionProxiesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string, privateEndpointConnectionProxy deviceupdate.PrivateEndpointConnectionProxy) (result deviceupdate.PrivateEndpointConnectionProxiesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string) (result deviceupdate.PrivateEndpointConnectionProxiesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string) (result deviceupdate.PrivateEndpointConnectionProxy, err error) + ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result deviceupdate.PrivateEndpointConnectionProxyListResult, err error) + UpdatePrivateEndpointProperties(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string, privateEndpointUpdate deviceupdate.PrivateEndpointUpdate) (result autorest.Response, err error) + Validate(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string, privateEndpointConnectionProxy deviceupdate.PrivateEndpointConnectionProxy) (result autorest.Response, err error) +} + +var _ PrivateEndpointConnectionProxiesClientAPI = (*deviceupdate.PrivateEndpointConnectionProxiesClient)(nil) + // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result deviceupdate.OperationListResultPage, err error) diff --git a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/enums.go b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/enums.go similarity index 77% rename from services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/enums.go rename to services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/enums.go index ca8688bc2d52..8bef0c4cc016 100644 --- a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/enums.go +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/enums.go @@ -126,6 +126,26 @@ func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpoin return []PrivateEndpointConnectionProvisioningState{PrivateEndpointConnectionProvisioningStateCreating, PrivateEndpointConnectionProvisioningStateDeleting, PrivateEndpointConnectionProvisioningStateFailed, PrivateEndpointConnectionProvisioningStateSucceeded} } +// PrivateEndpointConnectionProxyProvisioningState enumerates the values for private endpoint connection proxy +// provisioning state. +type PrivateEndpointConnectionProxyProvisioningState string + +const ( + // PrivateEndpointConnectionProxyProvisioningStateCreating ... + PrivateEndpointConnectionProxyProvisioningStateCreating PrivateEndpointConnectionProxyProvisioningState = "Creating" + // PrivateEndpointConnectionProxyProvisioningStateDeleting ... + PrivateEndpointConnectionProxyProvisioningStateDeleting PrivateEndpointConnectionProxyProvisioningState = "Deleting" + // PrivateEndpointConnectionProxyProvisioningStateFailed ... + PrivateEndpointConnectionProxyProvisioningStateFailed PrivateEndpointConnectionProxyProvisioningState = "Failed" + // PrivateEndpointConnectionProxyProvisioningStateSucceeded ... + PrivateEndpointConnectionProxyProvisioningStateSucceeded PrivateEndpointConnectionProxyProvisioningState = "Succeeded" +) + +// PossiblePrivateEndpointConnectionProxyProvisioningStateValues returns an array of possible values for the PrivateEndpointConnectionProxyProvisioningState const type. +func PossiblePrivateEndpointConnectionProxyProvisioningStateValues() []PrivateEndpointConnectionProxyProvisioningState { + return []PrivateEndpointConnectionProxyProvisioningState{PrivateEndpointConnectionProxyProvisioningStateCreating, PrivateEndpointConnectionProxyProvisioningStateDeleting, PrivateEndpointConnectionProxyProvisioningStateFailed, PrivateEndpointConnectionProxyProvisioningStateSucceeded} +} + // PrivateEndpointServiceConnectionStatus enumerates the values for private endpoint service connection status. type PrivateEndpointServiceConnectionStatus string @@ -180,3 +200,33 @@ const ( func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { return []PublicNetworkAccess{Disabled, Enabled} } + +// Role enumerates the values for role. +type Role string + +const ( + // Failover ... + Failover Role = "Failover" + // Primary ... + Primary Role = "Primary" +) + +// PossibleRoleValues returns an array of possible values for the Role const type. +func PossibleRoleValues() []Role { + return []Role{Failover, Primary} +} + +// SKU enumerates the values for sku. +type SKU string + +const ( + // Free ... + Free SKU = "Free" + // Standard ... + Standard SKU = "Standard" +) + +// PossibleSKUValues returns an array of possible values for the SKU const type. +func PossibleSKUValues() []SKU { + return []SKU{Free, Standard} +} diff --git a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/instances.go b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/instances.go similarity index 99% rename from services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/instances.go rename to services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/instances.go index 90c59460fd05..f1efe03f9b7c 100644 --- a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/instances.go +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/instances.go @@ -91,7 +91,7 @@ func (client InstancesClient) CreatePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -186,7 +186,7 @@ func (client InstancesClient) DeletePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -285,7 +285,7 @@ func (client InstancesClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -375,7 +375,7 @@ func (client InstancesClient) HeadPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -463,7 +463,7 @@ func (client InstancesClient) ListByAccountPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -591,7 +591,7 @@ func (client InstancesClient) UpdatePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/models.go b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/models.go similarity index 79% rename from services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/models.go rename to services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/models.go index e9a425d4ec9c..8e5145c1b5f8 100644 --- a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/models.go +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/models.go @@ -19,7 +19,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate" // Account device Update account details. type Account struct { @@ -312,8 +312,14 @@ type AccountProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // HostName - READ-ONLY; API host name. HostName *string `json:"hostName,omitempty"` - // PublicNetworkAccess - Whether or not public network access is allowed for the container registry. Possible values include: 'Enabled', 'Disabled' + // PublicNetworkAccess - Whether or not public network access is allowed for the account. Possible values include: 'Enabled', 'Disabled' PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // PrivateEndpointConnections - List of private endpoint connections associated with the account. + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + // Sku - Device Update Sku. Possible values include: 'Free', 'Standard' + Sku SKU `json:"sku,omitempty"` + // Locations - READ-ONLY; Device Update account primary and failover location details + Locations *[]Location `json:"locations,omitempty"` } // MarshalJSON is the custom marshaler for AccountProperties. @@ -322,6 +328,12 @@ func (a AccountProperties) MarshalJSON() ([]byte, error) { if a.PublicNetworkAccess != "" { objectMap["publicNetworkAccess"] = a.PublicNetworkAccess } + if a.PrivateEndpointConnections != nil { + objectMap["privateEndpointConnections"] = a.PrivateEndpointConnections + } + if a.Sku != "" { + objectMap["sku"] = a.Sku + } return json.Marshal(objectMap) } @@ -512,6 +524,26 @@ type CheckNameAvailabilityResponse struct { Message *string `json:"message,omitempty"` } +// ConnectionDetails private endpoint connection proxy object properties. +type ConnectionDetails struct { + // ID - READ-ONLY; Connection details ID. + ID *string `json:"id,omitempty"` + // PrivateIPAddress - READ-ONLY; Private IP address. + PrivateIPAddress *string `json:"privateIpAddress,omitempty"` + // LinkIdentifier - READ-ONLY; Link ID. + LinkIdentifier *string `json:"linkIdentifier,omitempty"` + // GroupID - READ-ONLY; Group ID. + GroupID *string `json:"groupId,omitempty"` + // MemberName - READ-ONLY; Member name. + MemberName *string `json:"memberName,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectionDetails. +func (cd ConnectionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // DiagnosticStorageProperties customer-initiated diagnostic log collection storage properties type DiagnosticStorageProperties struct { // AuthenticationType - Authentication Type @@ -563,6 +595,37 @@ type ErrorResponse struct { Error *ErrorDetail `json:"error,omitempty"` } +// GroupConnectivityInformation group connectivity details. +type GroupConnectivityInformation struct { + // GroupID - READ-ONLY; Group ID. + GroupID *string `json:"groupId,omitempty"` + // MemberName - READ-ONLY; Member name. + MemberName *string `json:"memberName,omitempty"` + // CustomerVisibleFqdns - List of customer visible FQDNs. + CustomerVisibleFqdns *[]string `json:"customerVisibleFqdns,omitempty"` + // InternalFqdn - READ-ONLY; Internal FQDN. + InternalFqdn *string `json:"internalFqdn,omitempty"` + // RedirectMapID - Redirect map ID. + RedirectMapID *string `json:"redirectMapId,omitempty"` + // PrivateLinkServiceArmRegion - PrivateLinkService ARM region. + PrivateLinkServiceArmRegion *string `json:"privateLinkServiceArmRegion,omitempty"` +} + +// MarshalJSON is the custom marshaler for GroupConnectivityInformation. +func (gci GroupConnectivityInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gci.CustomerVisibleFqdns != nil { + objectMap["customerVisibleFqdns"] = gci.CustomerVisibleFqdns + } + if gci.RedirectMapID != nil { + objectMap["redirectMapId"] = gci.RedirectMapID + } + if gci.PrivateLinkServiceArmRegion != nil { + objectMap["privateLinkServiceArmRegion"] = gci.PrivateLinkServiceArmRegion + } + return json.Marshal(objectMap) +} + // GroupInformation the group information for creating a private endpoint on an Account type GroupInformation struct { autorest.Response `json:"-"` @@ -1051,10 +1114,13 @@ func (future *InstancesDeleteFuture) result(client InstancesClient) (ar autorest type IotHubSettings struct { // ResourceID - IoTHub resource ID ResourceID *string `json:"resourceId,omitempty"` - // IoTHubConnectionString - IoTHub connection string. - IoTHubConnectionString *string `json:"ioTHubConnectionString,omitempty"` - // EventHubConnectionString - EventHub connection string. - EventHubConnectionString *string `json:"eventHubConnectionString,omitempty"` +} + +// Location ... +type Location struct { + Name *string `json:"name,omitempty"` + // Role - Whether the location is primary or failover. Possible values include: 'Primary', 'Failover' + Role Role `json:"role,omitempty"` } // ManagedServiceIdentity managed service identity (system assigned and/or user assigned identities) @@ -1397,10 +1463,209 @@ type PrivateEndpointConnectionProperties struct { PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + // GroupIds - Array of group IDs. + GroupIds *[]string `json:"groupIds,omitempty"` // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed' ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` } +// PrivateEndpointConnectionProxiesCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type PrivateEndpointConnectionProxiesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateEndpointConnectionProxiesClient) (PrivateEndpointConnectionProxy, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateEndpointConnectionProxiesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateEndpointConnectionProxiesCreateOrUpdateFuture.Result. +func (future *PrivateEndpointConnectionProxiesCreateOrUpdateFuture) result(client PrivateEndpointConnectionProxiesClient) (pecp PrivateEndpointConnectionProxy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + pecp.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("deviceupdate.PrivateEndpointConnectionProxiesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pecp.Response.Response, err = future.GetResult(sender); err == nil && pecp.Response.Response.StatusCode != http.StatusNoContent { + pecp, err = client.CreateOrUpdateResponder(pecp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesCreateOrUpdateFuture", "Result", pecp.Response.Response, "Failure responding to request") + } + } + return +} + +// PrivateEndpointConnectionProxiesDeleteFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type PrivateEndpointConnectionProxiesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateEndpointConnectionProxiesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateEndpointConnectionProxiesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateEndpointConnectionProxiesDeleteFuture.Result. +func (future *PrivateEndpointConnectionProxiesDeleteFuture) result(client PrivateEndpointConnectionProxiesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("deviceupdate.PrivateEndpointConnectionProxiesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PrivateEndpointConnectionProxy private endpoint connection proxy details. +type PrivateEndpointConnectionProxy struct { + autorest.Response `json:"-"` + // ETag - READ-ONLY; ETag from NRP. + ETag *string `json:"eTag,omitempty"` + // RemotePrivateEndpoint - Remote private endpoint details. + RemotePrivateEndpoint *RemotePrivateEndpoint `json:"remotePrivateEndpoint,omitempty"` + // Status - Operation status. + Status *string `json:"status,omitempty"` + // PrivateEndpointConnectionProxyProperties - Private endpoint connection proxy object property bag. + *PrivateEndpointConnectionProxyProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProxy. +func (pecp PrivateEndpointConnectionProxy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pecp.RemotePrivateEndpoint != nil { + objectMap["remotePrivateEndpoint"] = pecp.RemotePrivateEndpoint + } + if pecp.Status != nil { + objectMap["status"] = pecp.Status + } + if pecp.PrivateEndpointConnectionProxyProperties != nil { + objectMap["properties"] = pecp.PrivateEndpointConnectionProxyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnectionProxy struct. +func (pecp *PrivateEndpointConnectionProxy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + pecp.ETag = &eTag + } + case "remotePrivateEndpoint": + if v != nil { + var remotePrivateEndpoint RemotePrivateEndpoint + err = json.Unmarshal(*v, &remotePrivateEndpoint) + if err != nil { + return err + } + pecp.RemotePrivateEndpoint = &remotePrivateEndpoint + } + case "status": + if v != nil { + var status string + err = json.Unmarshal(*v, &status) + if err != nil { + return err + } + pecp.Status = &status + } + case "properties": + if v != nil { + var privateEndpointConnectionProxyProperties PrivateEndpointConnectionProxyProperties + err = json.Unmarshal(*v, &privateEndpointConnectionProxyProperties) + if err != nil { + return err + } + pecp.PrivateEndpointConnectionProxyProperties = &privateEndpointConnectionProxyProperties + } + } + } + + return nil +} + +// PrivateEndpointConnectionProxyListResult the available private endpoint connection proxies for an +// Account (not to be used by anyone, here because of ARM requirements) +type PrivateEndpointConnectionProxyListResult struct { + autorest.Response `json:"-"` + // Value - The list of available private endpoint connection proxies for an Account + Value *[]PrivateEndpointConnectionProxy `json:"value,omitempty"` + // NextLink - The URI that can be used to request the next list of private endpoint connection proxies. + NextLink *string `json:"nextLink,omitempty"` +} + +// PrivateEndpointConnectionProxyProperties private endpoint connection proxy object property bag. +type PrivateEndpointConnectionProxyProperties struct { + // ProvisioningState - The provisioning state of the private endpoint connection proxy resource. Possible values include: 'PrivateEndpointConnectionProxyProvisioningStateSucceeded', 'PrivateEndpointConnectionProxyProvisioningStateCreating', 'PrivateEndpointConnectionProxyProvisioningStateDeleting', 'PrivateEndpointConnectionProxyProvisioningStateFailed' + ProvisioningState PrivateEndpointConnectionProxyProvisioningState `json:"provisioningState,omitempty"` +} + +// PrivateEndpointConnectionProxyPropertiesModel private endpoint connection proxy object properties. +type PrivateEndpointConnectionProxyPropertiesModel struct { + // ETag - READ-ONLY; ETag from NRP. + ETag *string `json:"eTag,omitempty"` + // RemotePrivateEndpoint - Remote private endpoint details. + RemotePrivateEndpoint *RemotePrivateEndpoint `json:"remotePrivateEndpoint,omitempty"` + // Status - Operation status. + Status *string `json:"status,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProxyPropertiesModel. +func (pecppm PrivateEndpointConnectionProxyPropertiesModel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pecppm.RemotePrivateEndpoint != nil { + objectMap["remotePrivateEndpoint"] = pecppm.RemotePrivateEndpoint + } + if pecppm.Status != nil { + objectMap["status"] = pecppm.Status + } + return json.Marshal(objectMap) +} + // PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results // of a long-running operation. type PrivateEndpointConnectionsCreateOrUpdateFuture struct { @@ -1481,6 +1746,20 @@ func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpo return } +// PrivateEndpointUpdate private endpoint update details. +type PrivateEndpointUpdate struct { + // ID - Remote endpoint resource ID. + ID *string `json:"id,omitempty"` + // Location - ARM location of the remote private endpoint. + Location *string `json:"location,omitempty"` + // ImmutableSubscriptionID - Original subscription ID needed by Microsoft.Network. + ImmutableSubscriptionID *string `json:"immutableSubscriptionId,omitempty"` + // ImmutableResourceID - Original resource ID needed by Microsoft.Network. + ImmutableResourceID *string `json:"immutableResourceId,omitempty"` + // VnetTrafficTag - Virtual network traffic tag. + VnetTrafficTag *string `json:"vnetTrafficTag,omitempty"` +} + // PrivateLinkResourceListResult the available private link resources for an Account type PrivateLinkResourceListResult struct { autorest.Response `json:"-"` @@ -1509,6 +1788,16 @@ func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// PrivateLinkServiceConnection private link service connection details. +type PrivateLinkServiceConnection struct { + // Name - Private link service connection name. + Name *string `json:"name,omitempty"` + // GroupIds - List of group IDs. + GroupIds *[]string `json:"groupIds,omitempty"` + // RequestMessage - Request message. + RequestMessage *string `json:"requestMessage,omitempty"` +} + // PrivateLinkServiceConnectionState a collection of information about the state of the connection between // service consumer and provider. type PrivateLinkServiceConnectionState struct { @@ -1520,6 +1809,30 @@ type PrivateLinkServiceConnectionState struct { ActionsRequired *string `json:"actionsRequired,omitempty"` } +// PrivateLinkServiceProxy private link service proxy details. +type PrivateLinkServiceProxy struct { + // ID - NRP resource ID. + ID *string `json:"id,omitempty"` + // RemotePrivateLinkServiceConnectionState - Remote private link service connection state + RemotePrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"remotePrivateLinkServiceConnectionState,omitempty"` + // RemotePrivateEndpointConnection - Remote private endpoint connection details. + RemotePrivateEndpointConnection *PrivateLinkServiceProxyRemotePrivateEndpointConnection `json:"remotePrivateEndpointConnection,omitempty"` + // GroupConnectivityInformation - Group connectivity information. + GroupConnectivityInformation *[]GroupConnectivityInformation `json:"groupConnectivityInformation,omitempty"` +} + +// PrivateLinkServiceProxyRemotePrivateEndpointConnection remote private endpoint connection details. +type PrivateLinkServiceProxyRemotePrivateEndpointConnection struct { + // ID - READ-ONLY; Remote private endpoint connection ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkServiceProxyRemotePrivateEndpointConnection. +func (plspPec PrivateLinkServiceProxyRemotePrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not // have tags and a location type ProxyResource struct { @@ -1539,6 +1852,40 @@ func (pr ProxyResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// RemotePrivateEndpoint remote private endpoint details. +type RemotePrivateEndpoint struct { + // ID - Remote endpoint resource ID. + ID *string `json:"id,omitempty"` + // Location - ARM location of the remote private endpoint. + Location *string `json:"location,omitempty"` + // ImmutableSubscriptionID - Original subscription ID needed by Microsoft.Network. + ImmutableSubscriptionID *string `json:"immutableSubscriptionId,omitempty"` + // ImmutableResourceID - Original resource ID needed by Microsoft.Network. + ImmutableResourceID *string `json:"immutableResourceId,omitempty"` + // VnetTrafficTag - Virtual network traffic tag. + VnetTrafficTag *string `json:"vnetTrafficTag,omitempty"` + // ManualPrivateLinkServiceConnections - List of private link service connections that need manual approval. + ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` + // PrivateLinkServiceConnections - List of automatically approved private link service connections. + PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` + // PrivateLinkServiceProxies - List of private link service proxies. + PrivateLinkServiceProxies *[]PrivateLinkServiceProxy `json:"privateLinkServiceProxies,omitempty"` + // ConnectionDetails - List of connection details. + ConnectionDetails *[]ConnectionDetails `json:"connectionDetails,omitempty"` +} + +// RemotePrivateEndpointConnection remote private endpoint connection details. +type RemotePrivateEndpointConnection struct { + // ID - READ-ONLY; Remote private endpoint connection ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for RemotePrivateEndpointConnection. +func (rpec RemotePrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // Resource common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} diff --git a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/operations.go b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/operations.go similarity index 99% rename from services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/operations.go rename to services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/operations.go index 39f08f2243c3..0bb6e7a9b491 100644 --- a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/operations.go +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/operations.go @@ -71,7 +71,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/privateendpointconnectionproxies.go b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/privateendpointconnectionproxies.go new file mode 100644 index 000000000000..03be0778255f --- /dev/null +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/privateendpointconnectionproxies.go @@ -0,0 +1,565 @@ +package deviceupdate + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateEndpointConnectionProxiesClient is the microsoft Device Update resource provider. +type PrivateEndpointConnectionProxiesClient struct { + BaseClient +} + +// NewPrivateEndpointConnectionProxiesClient creates an instance of the PrivateEndpointConnectionProxiesClient client. +func NewPrivateEndpointConnectionProxiesClient(subscriptionID string) PrivateEndpointConnectionProxiesClient { + return NewPrivateEndpointConnectionProxiesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateEndpointConnectionProxiesClientWithBaseURI creates an instance of the +// PrivateEndpointConnectionProxiesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewPrivateEndpointConnectionProxiesClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionProxiesClient { + return PrivateEndpointConnectionProxiesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate (INTERNAL - DO NOT USE) Creates or updates the specified private endpoint connection proxy resource +// associated with the device update account. +// Parameters: +// resourceGroupName - the resource group name. +// accountName - account name. +// privateEndpointConnectionProxyID - the ID of the private endpoint connection proxy object. +// privateEndpointConnectionProxy - the parameters for creating a private endpoint connection proxy. +func (client PrivateEndpointConnectionProxiesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string, privateEndpointConnectionProxy PrivateEndpointConnectionProxy) (result PrivateEndpointConnectionProxiesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionProxiesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("deviceupdate.PrivateEndpointConnectionProxiesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionProxyID, privateEndpointConnectionProxy) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PrivateEndpointConnectionProxiesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string, privateEndpointConnectionProxy PrivateEndpointConnectionProxy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "privateEndpointConnectionProxyId": autorest.Encode("path", privateEndpointConnectionProxyID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + privateEndpointConnectionProxy.ETag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}", pathParameters), + autorest.WithJSON(privateEndpointConnectionProxy), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionProxiesClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointConnectionProxiesCreateOrUpdateFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionProxiesClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpointConnectionProxy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete (INTERNAL - DO NOT USE) Deletes the specified private endpoint connection proxy associated with the device +// update account. +// Parameters: +// resourceGroupName - the resource group name. +// accountName - account name. +// privateEndpointConnectionProxyID - the ID of the private endpoint connection proxy object. +func (client PrivateEndpointConnectionProxiesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string) (result PrivateEndpointConnectionProxiesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionProxiesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("deviceupdate.PrivateEndpointConnectionProxiesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionProxyID) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateEndpointConnectionProxiesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "privateEndpointConnectionProxyId": autorest.Encode("path", privateEndpointConnectionProxyID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}", 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 PrivateEndpointConnectionProxiesClient) DeleteSender(req *http.Request) (future PrivateEndpointConnectionProxiesDeleteFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionProxiesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get (INTERNAL - DO NOT USE) Get the specified private endpoint connection proxy associated with the device update +// account. +// Parameters: +// resourceGroupName - the resource group name. +// accountName - account name. +// privateEndpointConnectionProxyID - the ID of the private endpoint connection proxy object. +func (client PrivateEndpointConnectionProxiesClient) Get(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string) (result PrivateEndpointConnectionProxy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionProxiesClient.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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("deviceupdate.PrivateEndpointConnectionProxiesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionProxyID) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateEndpointConnectionProxiesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "privateEndpointConnectionProxyId": autorest.Encode("path", privateEndpointConnectionProxyID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionProxiesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionProxiesClient) GetResponder(resp *http.Response) (result PrivateEndpointConnectionProxy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByAccount (INTERNAL - DO NOT USE) List all private endpoint connection proxies in a device update account. +// Parameters: +// resourceGroupName - the resource group name. +// accountName - account name. +func (client PrivateEndpointConnectionProxiesClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result PrivateEndpointConnectionProxyListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionProxiesClient.ListByAccount") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("deviceupdate.PrivateEndpointConnectionProxiesClient", "ListByAccount", err.Error()) + } + + req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "ListByAccount", nil, "Failure preparing request") + return + } + + resp, err := client.ListByAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "ListByAccount", resp, "Failure sending request") + return + } + + result, err = client.ListByAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "ListByAccount", resp, "Failure responding to request") + return + } + + return +} + +// ListByAccountPreparer prepares the ListByAccount request. +func (client PrivateEndpointConnectionProxiesClient) ListByAccountPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByAccountSender sends the ListByAccount request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionProxiesClient) ListByAccountSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByAccountResponder handles the response to the ListByAccount request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionProxiesClient) ListByAccountResponder(resp *http.Response) (result PrivateEndpointConnectionProxyListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdatePrivateEndpointProperties (INTERNAL - DO NOT USE) Updates a private endpoint inside the private endpoint +// connection proxy object. +// Parameters: +// resourceGroupName - the resource group name. +// accountName - account name. +// privateEndpointConnectionProxyID - the ID of the private endpoint connection proxy object. +// privateEndpointUpdate - the parameters for updating a private endpoint connection proxy. +func (client PrivateEndpointConnectionProxiesClient) UpdatePrivateEndpointProperties(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string, privateEndpointUpdate PrivateEndpointUpdate) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionProxiesClient.UpdatePrivateEndpointProperties") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("deviceupdate.PrivateEndpointConnectionProxiesClient", "UpdatePrivateEndpointProperties", err.Error()) + } + + req, err := client.UpdatePrivateEndpointPropertiesPreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionProxyID, privateEndpointUpdate) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "UpdatePrivateEndpointProperties", nil, "Failure preparing request") + return + } + + resp, err := client.UpdatePrivateEndpointPropertiesSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "UpdatePrivateEndpointProperties", resp, "Failure sending request") + return + } + + result, err = client.UpdatePrivateEndpointPropertiesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "UpdatePrivateEndpointProperties", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePrivateEndpointPropertiesPreparer prepares the UpdatePrivateEndpointProperties request. +func (client PrivateEndpointConnectionProxiesClient) UpdatePrivateEndpointPropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string, privateEndpointUpdate PrivateEndpointUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "privateEndpointConnectionProxyId": autorest.Encode("path", privateEndpointConnectionProxyID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}/updatePrivateEndpointProperties", pathParameters), + autorest.WithJSON(privateEndpointUpdate), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdatePrivateEndpointPropertiesSender sends the UpdatePrivateEndpointProperties request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionProxiesClient) UpdatePrivateEndpointPropertiesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdatePrivateEndpointPropertiesResponder handles the response to the UpdatePrivateEndpointProperties request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionProxiesClient) UpdatePrivateEndpointPropertiesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Validate (INTERNAL - DO NOT USE) Validates a private endpoint connection proxy object. +// Parameters: +// resourceGroupName - the resource group name. +// accountName - account name. +// privateEndpointConnectionProxyID - the ID of the private endpoint connection proxy object. +// privateEndpointConnectionProxy - the parameters for creating a private endpoint connection proxy. +func (client PrivateEndpointConnectionProxiesClient) Validate(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string, privateEndpointConnectionProxy PrivateEndpointConnectionProxy) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionProxiesClient.Validate") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("deviceupdate.PrivateEndpointConnectionProxiesClient", "Validate", err.Error()) + } + + req, err := client.ValidatePreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionProxyID, privateEndpointConnectionProxy) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "Validate", nil, "Failure preparing request") + return + } + + resp, err := client.ValidateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "Validate", resp, "Failure sending request") + return + } + + result, err = client.ValidateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "deviceupdate.PrivateEndpointConnectionProxiesClient", "Validate", resp, "Failure responding to request") + return + } + + return +} + +// ValidatePreparer prepares the Validate request. +func (client PrivateEndpointConnectionProxiesClient) ValidatePreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionProxyID string, privateEndpointConnectionProxy PrivateEndpointConnectionProxy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "privateEndpointConnectionProxyId": autorest.Encode("path", privateEndpointConnectionProxyID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2022-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + privateEndpointConnectionProxy.ETag = 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.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}/validate", pathParameters), + autorest.WithJSON(privateEndpointConnectionProxy), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateSender sends the Validate request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionProxiesClient) ValidateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ValidateResponder handles the response to the Validate request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionProxiesClient) ValidateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/privateendpointconnections.go b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/privateendpointconnections.go similarity index 98% rename from services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/privateendpointconnections.go rename to services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/privateendpointconnections.go index e439216de00a..c063ddb475d2 100644 --- a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/privateendpointconnections.go +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/privateendpointconnections.go @@ -56,7 +56,7 @@ func (client PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Contex {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, {Target: "accountName", Name: validation.Pattern, Rule: `^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$`, Chain: nil}}}, {TargetValue: privateEndpointConnection, - Constraints: []validation.Constraint{{Target: "privateEndpointConnection.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: false, + Constraints: []validation.Constraint{{Target: "privateEndpointConnection.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "privateEndpointConnection.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("deviceupdate.PrivateEndpointConnectionsClient", "CreateOrUpdate", err.Error()) } @@ -85,7 +85,7 @@ func (client PrivateEndpointConnectionsClient) CreateOrUpdatePreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -177,7 +177,7 @@ func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -273,7 +273,7 @@ func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -357,7 +357,7 @@ func (client PrivateEndpointConnectionsClient) ListByAccountPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/privatelinkresources.go b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/privatelinkresources.go similarity index 99% rename from services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/privatelinkresources.go rename to services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/privatelinkresources.go index 962f837df7be..98e015af3f23 100644 --- a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/privatelinkresources.go +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/privatelinkresources.go @@ -87,7 +87,7 @@ func (client PrivateLinkResourcesClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -171,7 +171,7 @@ func (client PrivateLinkResourcesClient) ListByAccountPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-03-01-preview" + const APIVersion = "2022-04-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/version.go b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/version.go similarity index 90% rename from services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/version.go rename to services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/version.go index 5f7fdeefcf00..c36444cfc382 100644 --- a/services/preview/deviceupdate/mgmt/2020-03-01-preview/deviceupdate/version.go +++ b/services/preview/deviceupdate/mgmt/2022-04-01-preview/deviceupdate/version.go @@ -10,7 +10,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " deviceupdate/2020-03-01-preview" + return "Azure-SDK-For-Go/" + Version() + " deviceupdate/2022-04-01-preview" } // Version returns the semantic version (see http://semver.org) of the client.