diff --git a/go.mod b/go.mod index 5a06988c2..0d1aa1a47 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.0.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1 github.com/go-ini/ini v1.67.0 github.com/jongio/azidext/go/azidext v0.4.0 diff --git a/go.sum b/go.sum index 72f6f2118..a1a86ae09 100644 --- a/go.sum +++ b/go.sum @@ -42,9 +42,9 @@ github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybI github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.0.0 h1:lMW1lD/17LUA5z1XTURo7LcVG2ICBPlyMHjIUrcFZNQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.0.0 h1:Jc2KcpCDMu7wJfkrzn7fs/53QMDXH78GuqnH4HOd7zs= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.0.0/go.mod h1:PFVgFsclKzPqYRT/BiwpfUN22cab0C7FlgXR3iWpwMo= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 h1:8d4U82r7ItT1Es91x3eUcAQweih36KWvUha8AZ9X0Rs= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0/go.mod h1:/1bkGperHinQbAHMWivoec/Ucu6//iXo6jn5mhmqCVU= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1 h1:YvQv9Mz6T8oR5ypQOL6erY0Z5t71ak1uHV4QFokCOZk= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1/go.mod h1:c6WvOhtmjNUWbLfOG1qxM/q0SPvQNSVJvolm+C52dIU= diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md index f9a7861f2..f9cd65aaa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md @@ -1,1074 +1,65 @@ # Release History -## 1.0.0 (2022-05-16) -### Breaking Changes - -- Function `*PrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` to `(*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` -- Function `*ManagedHsmsClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[ManagedHsmsClientUpdateResponse], error)` to `(*runtime.Poller[ManagedHsmsClientUpdateResponse], error)` -- Function `*ManagedHsmsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[ManagedHsmsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[ManagedHsmsClientCreateOrUpdateResponse], error)` -- Function `*MHSMPrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[MHSMPrivateEndpointConnectionsClientDeleteResponse], error)` to `(*runtime.Poller[MHSMPrivateEndpointConnectionsClientDeleteResponse], error)` -- Function `*VaultsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[VaultsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[VaultsClientCreateOrUpdateResponse], error)` -- Function `*VaultsClient.BeginPurgeDeleted` return value(s) have been changed from `(*armruntime.Poller[VaultsClientPurgeDeletedResponse], error)` to `(*runtime.Poller[VaultsClientPurgeDeletedResponse], error)` -- Function `*ManagedHsmsClient.BeginPurgeDeleted` return value(s) have been changed from `(*armruntime.Poller[ManagedHsmsClientPurgeDeletedResponse], error)` to `(*runtime.Poller[ManagedHsmsClientPurgeDeletedResponse], error)` -- Function `*ManagedHsmsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[ManagedHsmsClientDeleteResponse], error)` to `(*runtime.Poller[ManagedHsmsClientDeleteResponse], error)` -- Const `JSONWebKeyOperationRelease` has been removed -- Const `KeyPermissionsRotate` has been removed -- Const `KeyPermissionsRelease` has been removed -- Const `KeyRotationPolicyActionTypeRotate` has been removed -- Const `KeyPermissionsGetrotationpolicy` has been removed -- Const `KeyPermissionsSetrotationpolicy` has been removed -- Const `KeyRotationPolicyActionTypeNotify` has been removed -- Function `DeletedManagedHsmProperties.MarshalJSON` has been removed -- Function `RotationPolicy.MarshalJSON` has been removed -- Function `PrivateLinkResourceListResult.MarshalJSON` has been removed -- Function `ServiceSpecification.MarshalJSON` has been removed -- Function `MHSMPrivateLinkResourceListResult.MarshalJSON` has been removed -- Function `MHSMPrivateEndpointConnectionsListResult.MarshalJSON` has been removed -- Function `ResourceListResult.MarshalJSON` has been removed -- Function `DeletedVaultListResult.MarshalJSON` has been removed -- Function `SecretListResult.MarshalJSON` has been removed -- Function `PossibleKeyRotationPolicyActionTypeValues` has been removed -- Function `OperationListResult.MarshalJSON` has been removed -- Function `KeyReleasePolicy.MarshalJSON` has been removed -- Function `KeyListResult.MarshalJSON` has been removed -- Function `PrivateEndpointConnectionListResult.MarshalJSON` has been removed -- Function `VaultListResult.MarshalJSON` has been removed -- Function `DeletedVaultProperties.MarshalJSON` has been removed -- Function `MetricSpecification.MarshalJSON` has been removed -- Function `ManagedHsmListResult.MarshalJSON` has been removed -- Function `DeletedManagedHsmListResult.MarshalJSON` has been removed -- Function `Vault.MarshalJSON` has been removed -- Function `*KeyReleasePolicy.UnmarshalJSON` has been removed -- Struct `Action` has been removed -- Struct `KeyReleasePolicy` has been removed -- Struct `KeyRotationPolicyAttributes` has been removed -- Struct `LifetimeAction` has been removed -- Struct `RotationPolicy` has been removed -- Struct `Trigger` has been removed -- Field `ReleasePolicy` of struct `KeyProperties` has been removed -- Field `RotationPolicy` of struct `KeyProperties` has been removed - - -## 0.5.0 (2022-04-15) -### Breaking Changes - -- Function `*MHSMPrivateEndpointConnectionsClient.ListByResource` has been removed -- Function `*ManagedHsmsClient.ListDeleted` has been removed -- Function `*VaultsClient.ListDeleted` has been removed -- Function `*VaultsClient.ListByResourceGroup` has been removed -- Function `*PrivateEndpointConnectionsClient.ListByResource` has been removed -- Function `*VaultsClient.List` has been removed -- Function `*OperationsClient.List` has been removed -- Function `*SecretsClient.List` has been removed -- Function `*ManagedHsmsClient.ListByResourceGroup` has been removed -- Function `*KeysClient.List` has been removed -- Function `*ManagedHsmsClient.ListBySubscription` has been removed -- Function `*KeysClient.ListVersions` has been removed -- Function `*VaultsClient.ListBySubscription` has been removed - +## 1.2.0 (2023-04-28) ### Features Added -- New function `*OperationsClient.NewListPager(*OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]` -- New function `*VaultsClient.NewListDeletedPager(*VaultsClientListDeletedOptions) *runtime.Pager[VaultsClientListDeletedResponse]` -- New function `*VaultsClient.NewListPager(*VaultsClientListOptions) *runtime.Pager[VaultsClientListResponse]` -- New function `*SecretsClient.NewListPager(string, string, *SecretsClientListOptions) *runtime.Pager[SecretsClientListResponse]` -- New function `*KeysClient.NewListVersionsPager(string, string, string, *KeysClientListVersionsOptions) *runtime.Pager[KeysClientListVersionsResponse]` -- New function `*ManagedHsmsClient.NewListBySubscriptionPager(*ManagedHsmsClientListBySubscriptionOptions) *runtime.Pager[ManagedHsmsClientListBySubscriptionResponse]` -- New function `*ManagedHsmsClient.NewListByResourceGroupPager(string, *ManagedHsmsClientListByResourceGroupOptions) *runtime.Pager[ManagedHsmsClientListByResourceGroupResponse]` -- New function `*PrivateEndpointConnectionsClient.NewListByResourcePager(string, string, *PrivateEndpointConnectionsClientListByResourceOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByResourceResponse]` -- New function `*KeysClient.NewListPager(string, string, *KeysClientListOptions) *runtime.Pager[KeysClientListResponse]` -- New function `*MHSMPrivateEndpointConnectionsClient.NewListByResourcePager(string, string, *MHSMPrivateEndpointConnectionsClientListByResourceOptions) *runtime.Pager[MHSMPrivateEndpointConnectionsClientListByResourceResponse]` -- New function `*VaultsClient.NewListBySubscriptionPager(*VaultsClientListBySubscriptionOptions) *runtime.Pager[VaultsClientListBySubscriptionResponse]` -- New function `*ManagedHsmsClient.NewListDeletedPager(*ManagedHsmsClientListDeletedOptions) *runtime.Pager[ManagedHsmsClientListDeletedResponse]` -- New function `*VaultsClient.NewListByResourceGroupPager(string, *VaultsClientListByResourceGroupOptions) *runtime.Pager[VaultsClientListByResourceGroupResponse]` - - -## 0.4.0 (2022-04-14) -### Breaking Changes - -- Function `*MHSMPrivateEndpointConnectionsClient.ListByResource` return value(s) have been changed from `(*MHSMPrivateEndpointConnectionsClientListByResourcePager)` to `(*runtime.Pager[MHSMPrivateEndpointConnectionsClientListByResourceResponse])` -- Function `*PrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(PrivateEndpointConnectionsClientDeletePollerResponse, error)` to `(*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` -- Function `*ManagedHsmsClient.BeginPurgeDeleted` return value(s) have been changed from `(ManagedHsmsClientPurgeDeletedPollerResponse, error)` to `(*armruntime.Poller[ManagedHsmsClientPurgeDeletedResponse], error)` -- Function `*MHSMPrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(MHSMPrivateEndpointConnectionsClientDeletePollerResponse, error)` to `(*armruntime.Poller[MHSMPrivateEndpointConnectionsClientDeleteResponse], error)` -- Function `*ManagedHsmsClient.ListDeleted` return value(s) have been changed from `(*ManagedHsmsClientListDeletedPager)` to `(*runtime.Pager[ManagedHsmsClientListDeletedResponse])` -- Function `NewOperationsClient` return value(s) have been changed from `(*OperationsClient)` to `(*OperationsClient, error)` -- Function `*KeysClient.ListVersions` return value(s) have been changed from `(*KeysClientListVersionsPager)` to `(*runtime.Pager[KeysClientListVersionsResponse])` -- Function `*VaultsClient.ListByResourceGroup` return value(s) have been changed from `(*VaultsClientListByResourceGroupPager)` to `(*runtime.Pager[VaultsClientListByResourceGroupResponse])` -- Function `*VaultsClient.BeginCreateOrUpdate` return value(s) have been changed from `(VaultsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VaultsClientCreateOrUpdateResponse], error)` -- Function `*VaultsClient.ListBySubscription` return value(s) have been changed from `(*VaultsClientListBySubscriptionPager)` to `(*runtime.Pager[VaultsClientListBySubscriptionResponse])` -- Function `*SecretsClient.List` return value(s) have been changed from `(*SecretsClientListPager)` to `(*runtime.Pager[SecretsClientListResponse])` -- Function `*VaultsClient.ListDeleted` return value(s) have been changed from `(*VaultsClientListDeletedPager)` to `(*runtime.Pager[VaultsClientListDeletedResponse])` -- Function `*ManagedHsmsClient.ListByResourceGroup` return value(s) have been changed from `(*ManagedHsmsClientListByResourceGroupPager)` to `(*runtime.Pager[ManagedHsmsClientListByResourceGroupResponse])` -- Function `*ManagedHsmsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ManagedHsmsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ManagedHsmsClientCreateOrUpdateResponse], error)` -- Function `*ManagedHsmsClient.ListBySubscription` return value(s) have been changed from `(*ManagedHsmsClientListBySubscriptionPager)` to `(*runtime.Pager[ManagedHsmsClientListBySubscriptionResponse])` -- Function `*ManagedHsmsClient.BeginDelete` return value(s) have been changed from `(ManagedHsmsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ManagedHsmsClientDeleteResponse], error)` -- Function `NewSecretsClient` return value(s) have been changed from `(*SecretsClient)` to `(*SecretsClient, error)` -- Function `NewKeysClient` return value(s) have been changed from `(*KeysClient)` to `(*KeysClient, error)` -- Function `NewPrivateLinkResourcesClient` return value(s) have been changed from `(*PrivateLinkResourcesClient)` to `(*PrivateLinkResourcesClient, error)` -- Function `*ManagedHsmsClient.BeginUpdate` return value(s) have been changed from `(ManagedHsmsClientUpdatePollerResponse, error)` to `(*armruntime.Poller[ManagedHsmsClientUpdateResponse], error)` -- Function `*PrivateEndpointConnectionsClient.ListByResource` return value(s) have been changed from `(*PrivateEndpointConnectionsClientListByResourcePager)` to `(*runtime.Pager[PrivateEndpointConnectionsClientListByResourceResponse])` -- Function `NewManagedHsmsClient` return value(s) have been changed from `(*ManagedHsmsClient)` to `(*ManagedHsmsClient, error)` -- Function `NewPrivateEndpointConnectionsClient` return value(s) have been changed from `(*PrivateEndpointConnectionsClient)` to `(*PrivateEndpointConnectionsClient, error)` -- Function `NewMHSMPrivateLinkResourcesClient` return value(s) have been changed from `(*MHSMPrivateLinkResourcesClient)` to `(*MHSMPrivateLinkResourcesClient, error)` -- Function `NewMHSMPrivateEndpointConnectionsClient` return value(s) have been changed from `(*MHSMPrivateEndpointConnectionsClient)` to `(*MHSMPrivateEndpointConnectionsClient, error)` -- Function `*KeysClient.List` return value(s) have been changed from `(*KeysClientListPager)` to `(*runtime.Pager[KeysClientListResponse])` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsClientListPager)` to `(*runtime.Pager[OperationsClientListResponse])` -- Function `*VaultsClient.List` return value(s) have been changed from `(*VaultsClientListPager)` to `(*runtime.Pager[VaultsClientListResponse])` -- Function `NewVaultsClient` return value(s) have been changed from `(*VaultsClient)` to `(*VaultsClient, error)` -- Function `*VaultsClient.BeginPurgeDeleted` return value(s) have been changed from `(VaultsClientPurgeDeletedPollerResponse, error)` to `(*armruntime.Poller[VaultsClientPurgeDeletedResponse], error)` -- Function `PrivateEndpointConnectionsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*VaultsClientListDeletedPager.NextPage` has been removed -- Function `*VaultsClientListByResourceGroupPager.NextPage` has been removed -- Function `*ManagedHsmsClientListByResourceGroupPager.PageResponse` has been removed -- Function `SKUFamily.ToPtr` has been removed -- Function `ManagedHsmsClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `*ManagedHsmsClientListByResourceGroupPager.Err` has been removed -- Function `JSONWebKeyType.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientListByResourcePager.NextPage` has been removed -- Function `JSONWebKeyOperation.ToPtr` has been removed -- Function `JSONWebKeyCurveName.ToPtr` has been removed -- Function `*ManagedHsmsClientDeletePoller.ResumeToken` has been removed -- Function `*VaultsClientCreateOrUpdatePoller.Poll` has been removed -- Function `ManagedHsmsClientPurgeDeletedPollerResponse.PollUntilDone` has been removed -- Function `*OperationsClientListPager.PageResponse` has been removed -- Function `*ManagedHsmsClientDeletePoller.Done` has been removed -- Function `*ManagedHsmsClientPurgeDeletedPoller.Poll` has been removed -- Function `KeyPermissions.ToPtr` has been removed -- Function `*OperationsClientListPager.Err` has been removed -- Function `*OperationsClientListPager.NextPage` has been removed -- Function `*ManagedHsmsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `VaultsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*VaultsClientListByResourceGroupPager.Err` has been removed -- Function `*SecretsClientListPager.PageResponse` has been removed -- Function `ManagedHsmSKUFamily.ToPtr` has been removed -- Function `*ManagedHsmsClientDeletePoller.FinalResponse` has been removed -- Function `*ManagedHsmsClientListDeletedPager.Err` has been removed -- Function `*ManagedHsmsClientListByResourceGroupPager.NextPage` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientDeletePollerResponse.Resume` has been removed -- Function `*VaultsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `StoragePermissions.ToPtr` has been removed -- Function `MHSMPrivateEndpointConnectionsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*ManagedHsmsClientListDeletedPager.NextPage` has been removed -- Function `*VaultsClientPurgeDeletedPoller.ResumeToken` has been removed -- Function `PublicNetworkAccess.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePollerResponse.Resume` has been removed -- Function `*ManagedHsmsClientUpdatePollerResponse.Resume` has been removed -- Function `ManagedHsmSKUName.ToPtr` has been removed -- Function `*VaultsClientPurgeDeletedPoller.Poll` has been removed -- Function `NetworkRuleBypassOptions.ToPtr` has been removed -- Function `KeyRotationPolicyActionType.ToPtr` has been removed -- Function `Reason.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientListByResourcePager.Err` has been removed -- Function `ActionsRequired.ToPtr` has been removed -- Function `*ManagedHsmsClientUpdatePoller.Poll` has been removed -- Function `*ManagedHsmsClientUpdatePoller.FinalResponse` has been removed -- Function `*ManagedHsmsClientCreateOrUpdatePoller.Done` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePoller.FinalResponse` has been removed -- Function `*SecretsClientListPager.NextPage` has been removed -- Function `*ManagedHsmsClientUpdatePoller.ResumeToken` has been removed -- Function `*ManagedHsmsClientUpdatePoller.Done` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientListByResourcePager.Err` has been removed -- Function `VaultProvisioningState.ToPtr` has been removed -- Function `*ManagedHsmsClientPurgeDeletedPoller.ResumeToken` has been removed -- Function `*VaultsClientListPager.Err` has been removed -- Function `*ManagedHsmsClientDeletePoller.Poll` has been removed -- Function `*ManagedHsmsClientPurgeDeletedPollerResponse.Resume` has been removed -- Function `CertificatePermissions.ToPtr` has been removed -- Function `*VaultsClientListPager.NextPage` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientDeletePoller.FinalResponse` has been removed -- Function `CreateMode.ToPtr` has been removed -- Function `ProvisioningState.ToPtr` has been removed -- Function `*ManagedHsmsClientDeletePollerResponse.Resume` has been removed -- Function `ManagedHsmsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*KeysClientListVersionsPager.Err` has been removed -- Function `*ManagedHsmsClientListBySubscriptionPager.NextPage` has been removed -- Function `*KeysClientListPager.NextPage` has been removed -- Function `*ManagedHsmsClientListBySubscriptionPager.Err` has been removed -- Function `*ManagedHsmsClientPurgeDeletedPoller.FinalResponse` has been removed -- Function `SKUName.ToPtr` has been removed -- Function `*VaultsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ManagedHsmsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*VaultsClientListBySubscriptionPager.NextPage` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientDeletePoller.Done` has been removed -- Function `*VaultsClientPurgeDeletedPollerResponse.Resume` has been removed -- Function `*VaultsClientListDeletedPager.Err` has been removed -- Function `PrivateEndpointServiceConnectionStatus.ToPtr` has been removed -- Function `*VaultsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePoller.Poll` has been removed -- Function `*ManagedHsmsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePoller.Done` has been removed -- Function `*VaultsClientPurgeDeletedPoller.Done` has been removed -- Function `*ManagedHsmsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ManagedHsmsClientListDeletedPager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePoller.ResumeToken` has been removed -- Function `NetworkRuleAction.ToPtr` has been removed -- Function `*KeysClientListVersionsPager.PageResponse` has been removed -- Function `*VaultsClientListByResourceGroupPager.PageResponse` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientListByResourcePager.NextPage` has been removed -- Function `AccessPolicyUpdateKind.ToPtr` has been removed -- Function `*VaultsClientCreateOrUpdatePoller.Done` has been removed -- Function `*KeysClientListPager.Err` has been removed -- Function `*VaultsClientListBySubscriptionPager.PageResponse` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientListByResourcePager.PageResponse` has been removed -- Function `*SecretsClientListPager.Err` has been removed -- Function `ManagedHsmsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*KeysClientListPager.PageResponse` has been removed -- Function `DeletionRecoveryLevel.ToPtr` has been removed -- Function `PrivateEndpointConnectionProvisioningState.ToPtr` has been removed -- Function `SecretPermissions.ToPtr` has been removed -- Function `*VaultsClientListBySubscriptionPager.Err` has been removed -- Function `IdentityType.ToPtr` has been removed -- Function `*ManagedHsmsClientListBySubscriptionPager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionsClientListByResourcePager.PageResponse` has been removed -- Function `*VaultsClientPurgeDeletedPoller.FinalResponse` has been removed -- Function `VaultsClientPurgeDeletedPollerResponse.PollUntilDone` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientDeletePoller.ResumeToken` has been removed -- Function `*VaultsClientListDeletedPager.PageResponse` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientDeletePoller.Poll` has been removed -- Function `*ManagedHsmsClientPurgeDeletedPoller.Done` has been removed -- Function `*KeysClientListVersionsPager.NextPage` has been removed -- Function `*VaultsClientListPager.PageResponse` has been removed -- Struct `KeysClientCreateIfNotExistResult` has been removed -- Struct `KeysClientGetResult` has been removed -- Struct `KeysClientGetVersionResult` has been removed -- Struct `KeysClientListPager` has been removed -- Struct `KeysClientListResult` has been removed -- Struct `KeysClientListVersionsPager` has been removed -- Struct `KeysClientListVersionsResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientDeletePoller` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientDeletePollerResponse` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientDeleteResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientGetResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientListByResourcePager` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientListByResourceResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientPutResult` has been removed -- Struct `MHSMPrivateLinkResourcesClientListByMHSMResourceResult` has been removed -- Struct `ManagedHsmsClientCreateOrUpdatePoller` has been removed -- Struct `ManagedHsmsClientCreateOrUpdatePollerResponse` has been removed -- Struct `ManagedHsmsClientCreateOrUpdateResult` has been removed -- Struct `ManagedHsmsClientDeletePoller` has been removed -- Struct `ManagedHsmsClientDeletePollerResponse` has been removed -- Struct `ManagedHsmsClientGetDeletedResult` has been removed -- Struct `ManagedHsmsClientGetResult` has been removed -- Struct `ManagedHsmsClientListByResourceGroupPager` has been removed -- Struct `ManagedHsmsClientListByResourceGroupResult` has been removed -- Struct `ManagedHsmsClientListBySubscriptionPager` has been removed -- Struct `ManagedHsmsClientListBySubscriptionResult` has been removed -- Struct `ManagedHsmsClientListDeletedPager` has been removed -- Struct `ManagedHsmsClientListDeletedResult` has been removed -- Struct `ManagedHsmsClientPurgeDeletedPoller` has been removed -- Struct `ManagedHsmsClientPurgeDeletedPollerResponse` has been removed -- Struct `ManagedHsmsClientUpdatePoller` has been removed -- Struct `ManagedHsmsClientUpdatePollerResponse` has been removed -- Struct `ManagedHsmsClientUpdateResult` has been removed -- Struct `OperationsClientListPager` has been removed -- Struct `OperationsClientListResult` has been removed -- Struct `PrivateEndpointConnectionsClientDeletePoller` has been removed -- Struct `PrivateEndpointConnectionsClientDeletePollerResponse` has been removed -- Struct `PrivateEndpointConnectionsClientDeleteResult` has been removed -- Struct `PrivateEndpointConnectionsClientGetResult` has been removed -- Struct `PrivateEndpointConnectionsClientListByResourcePager` has been removed -- Struct `PrivateEndpointConnectionsClientListByResourceResult` has been removed -- Struct `PrivateEndpointConnectionsClientPutResult` has been removed -- Struct `PrivateLinkResourcesClientListByVaultResult` has been removed -- Struct `SecretsClientCreateOrUpdateResult` has been removed -- Struct `SecretsClientGetResult` has been removed -- Struct `SecretsClientListPager` has been removed -- Struct `SecretsClientListResult` has been removed -- Struct `SecretsClientUpdateResult` has been removed -- Struct `VaultsClientCheckNameAvailabilityResult` has been removed -- Struct `VaultsClientCreateOrUpdatePoller` has been removed -- Struct `VaultsClientCreateOrUpdatePollerResponse` has been removed -- Struct `VaultsClientCreateOrUpdateResult` has been removed -- Struct `VaultsClientGetDeletedResult` has been removed -- Struct `VaultsClientGetResult` has been removed -- Struct `VaultsClientListByResourceGroupPager` has been removed -- Struct `VaultsClientListByResourceGroupResult` has been removed -- Struct `VaultsClientListBySubscriptionPager` has been removed -- Struct `VaultsClientListBySubscriptionResult` has been removed -- Struct `VaultsClientListDeletedPager` has been removed -- Struct `VaultsClientListDeletedResult` has been removed -- Struct `VaultsClientListPager` has been removed -- Struct `VaultsClientListResult` has been removed -- Struct `VaultsClientPurgeDeletedPoller` has been removed -- Struct `VaultsClientPurgeDeletedPollerResponse` has been removed -- Struct `VaultsClientUpdateAccessPolicyResult` has been removed -- Struct `VaultsClientUpdateResult` has been removed -- Field `VaultsClientGetDeletedResult` of struct `VaultsClientGetDeletedResponse` has been removed -- Field `RawResponse` of struct `VaultsClientGetDeletedResponse` has been removed -- Field `KeysClientListVersionsResult` of struct `KeysClientListVersionsResponse` has been removed -- Field `RawResponse` of struct `KeysClientListVersionsResponse` has been removed -- Field `PrivateEndpointConnectionsClientListByResourceResult` of struct `PrivateEndpointConnectionsClientListByResourceResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientListByResourceResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientDeleteResponse` has been removed -- Field `VaultsClientCreateOrUpdateResult` of struct `VaultsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `VaultsClientCreateOrUpdateResponse` has been removed -- Field `PrivateEndpointConnectionsClientDeleteResult` of struct `PrivateEndpointConnectionsClientDeleteResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientDeleteResponse` has been removed -- Field `MHSMPrivateEndpointConnectionsClientGetResult` of struct `MHSMPrivateEndpointConnectionsClientGetResponse` has been removed -- Field `RawResponse` of struct `MHSMPrivateEndpointConnectionsClientGetResponse` has been removed -- Field `RawResponse` of struct `VaultsClientDeleteResponse` has been removed -- Field `VaultsClientCheckNameAvailabilityResult` of struct `VaultsClientCheckNameAvailabilityResponse` has been removed -- Field `RawResponse` of struct `VaultsClientCheckNameAvailabilityResponse` has been removed -- Field `PrivateLinkResourcesClientListByVaultResult` of struct `PrivateLinkResourcesClientListByVaultResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkResourcesClientListByVaultResponse` has been removed -- Field `MHSMPrivateEndpointConnectionsClientDeleteResult` of struct `MHSMPrivateEndpointConnectionsClientDeleteResponse` has been removed -- Field `RawResponse` of struct `MHSMPrivateEndpointConnectionsClientDeleteResponse` has been removed -- Field `KeysClientListResult` of struct `KeysClientListResponse` has been removed -- Field `RawResponse` of struct `KeysClientListResponse` has been removed -- Field `VaultsClientListByResourceGroupResult` of struct `VaultsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `VaultsClientListByResourceGroupResponse` has been removed -- Field `MHSMPrivateEndpointConnectionsClientPutResult` of struct `MHSMPrivateEndpointConnectionsClientPutResponse` has been removed -- Field `RawResponse` of struct `MHSMPrivateEndpointConnectionsClientPutResponse` has been removed -- Field `RawResponse` of struct `VaultsClientPurgeDeletedResponse` has been removed -- Field `ManagedHsmsClientCreateOrUpdateResult` of struct `ManagedHsmsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientCreateOrUpdateResponse` has been removed -- Field `KeysClientGetVersionResult` of struct `KeysClientGetVersionResponse` has been removed -- Field `RawResponse` of struct `KeysClientGetVersionResponse` has been removed -- Field `SecretsClientListResult` of struct `SecretsClientListResponse` has been removed -- Field `RawResponse` of struct `SecretsClientListResponse` has been removed -- Field `VaultsClientListDeletedResult` of struct `VaultsClientListDeletedResponse` has been removed -- Field `RawResponse` of struct `VaultsClientListDeletedResponse` has been removed -- Field `VaultsClientUpdateResult` of struct `VaultsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `VaultsClientUpdateResponse` has been removed -- Field `ManagedHsmsClientListBySubscriptionResult` of struct `ManagedHsmsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientListBySubscriptionResponse` has been removed -- Field `OperationsClientListResult` of struct `OperationsClientListResponse` has been removed -- Field `RawResponse` of struct `OperationsClientListResponse` has been removed -- Field `PrivateEndpointConnectionsClientGetResult` of struct `PrivateEndpointConnectionsClientGetResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientGetResponse` has been removed -- Field `MHSMPrivateLinkResourcesClientListByMHSMResourceResult` of struct `MHSMPrivateLinkResourcesClientListByMHSMResourceResponse` has been removed -- Field `RawResponse` of struct `MHSMPrivateLinkResourcesClientListByMHSMResourceResponse` has been removed -- Field `SecretsClientCreateOrUpdateResult` of struct `SecretsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `SecretsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientPurgeDeletedResponse` has been removed -- Field `ManagedHsmsClientGetResult` of struct `ManagedHsmsClientGetResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientGetResponse` has been removed -- Field `SecretsClientUpdateResult` of struct `SecretsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `SecretsClientUpdateResponse` has been removed -- Field `KeysClientGetResult` of struct `KeysClientGetResponse` has been removed -- Field `RawResponse` of struct `KeysClientGetResponse` has been removed -- Field `ManagedHsmsClientUpdateResult` of struct `ManagedHsmsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientUpdateResponse` has been removed -- Field `ManagedHsmsClientListDeletedResult` of struct `ManagedHsmsClientListDeletedResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientListDeletedResponse` has been removed -- Field `KeysClientCreateIfNotExistResult` of struct `KeysClientCreateIfNotExistResponse` has been removed -- Field `RawResponse` of struct `KeysClientCreateIfNotExistResponse` has been removed -- Field `ManagedHsmsClientGetDeletedResult` of struct `ManagedHsmsClientGetDeletedResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientGetDeletedResponse` has been removed -- Field `MHSMPrivateEndpointConnectionsClientListByResourceResult` of struct `MHSMPrivateEndpointConnectionsClientListByResourceResponse` has been removed -- Field `RawResponse` of struct `MHSMPrivateEndpointConnectionsClientListByResourceResponse` has been removed -- Field `VaultsClientListBySubscriptionResult` of struct `VaultsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `VaultsClientListBySubscriptionResponse` has been removed -- Field `PrivateEndpointConnectionsClientPutResult` of struct `PrivateEndpointConnectionsClientPutResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientPutResponse` has been removed -- Field `SecretsClientGetResult` of struct `SecretsClientGetResponse` has been removed -- Field `RawResponse` of struct `SecretsClientGetResponse` has been removed -- Field `VaultsClientUpdateAccessPolicyResult` of struct `VaultsClientUpdateAccessPolicyResponse` has been removed -- Field `RawResponse` of struct `VaultsClientUpdateAccessPolicyResponse` has been removed -- Field `ManagedHsmsClientListByResourceGroupResult` of struct `ManagedHsmsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientListByResourceGroupResponse` has been removed -- Field `VaultsClientListResult` of struct `VaultsClientListResponse` has been removed -- Field `RawResponse` of struct `VaultsClientListResponse` has been removed -- Field `VaultsClientGetResult` of struct `VaultsClientGetResponse` has been removed -- Field `RawResponse` of struct `VaultsClientGetResponse` has been removed - +- New value `JSONWebKeyOperationRelease` added to enum type `JSONWebKeyOperation` +- New value `KeyPermissionsGetrotationpolicy`, `KeyPermissionsRelease`, `KeyPermissionsRotate`, `KeyPermissionsSetrotationpolicy` added to enum type `KeyPermissions` +- New enum type `ActivationStatus` with values `ActivationStatusActive`, `ActivationStatusFailed`, `ActivationStatusNotActivated`, `ActivationStatusUnknown` +- New enum type `GeoReplicationRegionProvisioningState` with values `GeoReplicationRegionProvisioningStateCleanup`, `GeoReplicationRegionProvisioningStateDeleting`, `GeoReplicationRegionProvisioningStateFailed`, `GeoReplicationRegionProvisioningStatePreprovisioning`, `GeoReplicationRegionProvisioningStateProvisioning`, `GeoReplicationRegionProvisioningStateSucceeded` +- New enum type `KeyRotationPolicyActionType` with values `KeyRotationPolicyActionTypeNotify`, `KeyRotationPolicyActionTypeRotate` +- New function `*ClientFactory.NewMHSMRegionsClient() *MHSMRegionsClient` +- New function `*ClientFactory.NewManagedHsmKeysClient() *ManagedHsmKeysClient` +- New function `NewMHSMRegionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*MHSMRegionsClient, error)` +- New function `*MHSMRegionsClient.NewListByResourcePager(string, string, *MHSMRegionsClientListByResourceOptions) *runtime.Pager[MHSMRegionsClientListByResourceResponse]` +- New function `NewManagedHsmKeysClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedHsmKeysClient, error)` +- New function `*ManagedHsmKeysClient.CreateIfNotExist(context.Context, string, string, string, ManagedHsmKeyCreateParameters, *ManagedHsmKeysClientCreateIfNotExistOptions) (ManagedHsmKeysClientCreateIfNotExistResponse, error)` +- New function `*ManagedHsmKeysClient.Get(context.Context, string, string, string, *ManagedHsmKeysClientGetOptions) (ManagedHsmKeysClientGetResponse, error)` +- New function `*ManagedHsmKeysClient.GetVersion(context.Context, string, string, string, string, *ManagedHsmKeysClientGetVersionOptions) (ManagedHsmKeysClientGetVersionResponse, error)` +- New function `*ManagedHsmKeysClient.NewListPager(string, string, *ManagedHsmKeysClientListOptions) *runtime.Pager[ManagedHsmKeysClientListResponse]` +- New function `*ManagedHsmKeysClient.NewListVersionsPager(string, string, string, *ManagedHsmKeysClientListVersionsOptions) *runtime.Pager[ManagedHsmKeysClientListVersionsResponse]` +- New function `*ManagedHsmsClient.CheckMhsmNameAvailability(context.Context, CheckMhsmNameAvailabilityParameters, *ManagedHsmsClientCheckMhsmNameAvailabilityOptions) (ManagedHsmsClientCheckMhsmNameAvailabilityResponse, error)` +- New struct `Action` +- New struct `CheckMhsmNameAvailabilityParameters` +- New struct `CheckMhsmNameAvailabilityResult` +- New struct `KeyReleasePolicy` +- New struct `KeyRotationPolicyAttributes` +- New struct `LifetimeAction` +- New struct `MHSMGeoReplicatedRegion` +- New struct `MHSMRegionsListResult` +- New struct `ManagedHSMSecurityDomainProperties` +- New struct `ManagedHsmAction` +- New struct `ManagedHsmKey` +- New struct `ManagedHsmKeyAttributes` +- New struct `ManagedHsmKeyCreateParameters` +- New struct `ManagedHsmKeyListResult` +- New struct `ManagedHsmKeyProperties` +- New struct `ManagedHsmKeyReleasePolicy` +- New struct `ManagedHsmKeyRotationPolicyAttributes` +- New struct `ManagedHsmLifetimeAction` +- New struct `ManagedHsmRotationPolicy` +- New struct `ManagedHsmTrigger` +- New struct `ProxyResourceWithoutSystemData` +- New struct `RotationPolicy` +- New struct `Trigger` +- New field `ReleasePolicy` in struct `KeyProperties` +- New field `RotationPolicy` in struct `KeyProperties` +- New field `Etag` in struct `MHSMPrivateEndpointConnectionItem` +- New field `ID` in struct `MHSMPrivateEndpointConnectionItem` +- New field `Regions` in struct `ManagedHsmProperties` +- New field `SecurityDomainProperties` in struct `ManagedHsmProperties` + + +## 1.1.0 (2023-04-06) ### Features Added -- New field `ResumeToken` in struct `ManagedHsmsClientBeginDeleteOptions` -- New anonymous field `Key` in struct `KeysClientGetResponse` -- New anonymous field `MHSMPrivateLinkResourceListResult` in struct `MHSMPrivateLinkResourcesClientListByMHSMResourceResponse` -- New anonymous field `PrivateEndpointConnectionListResult` in struct `PrivateEndpointConnectionsClientListByResourceResponse` -- New anonymous field `Secret` in struct `SecretsClientUpdateResponse` -- New anonymous field `ManagedHsm` in struct `ManagedHsmsClientUpdateResponse` -- New field `ResumeToken` in struct `ManagedHsmsClientBeginUpdateOptions` -- New anonymous field `VaultListResult` in struct `VaultsClientListBySubscriptionResponse` -- New anonymous field `VaultAccessPolicyParameters` in struct `VaultsClientUpdateAccessPolicyResponse` -- New anonymous field `OperationListResult` in struct `OperationsClientListResponse` -- New anonymous field `MHSMPrivateEndpointConnection` in struct `MHSMPrivateEndpointConnectionsClientPutResponse` -- New field `AzureAsyncOperation` in struct `MHSMPrivateEndpointConnectionsClientPutResponse` -- New field `RetryAfter` in struct `MHSMPrivateEndpointConnectionsClientPutResponse` -- New anonymous field `Vault` in struct `VaultsClientCreateOrUpdateResponse` -- New anonymous field `Secret` in struct `SecretsClientGetResponse` -- New anonymous field `PrivateEndpointConnection` in struct `PrivateEndpointConnectionsClientPutResponse` -- New field `AzureAsyncOperation` in struct `PrivateEndpointConnectionsClientPutResponse` -- New field `RetryAfter` in struct `PrivateEndpointConnectionsClientPutResponse` -- New anonymous field `DeletedVault` in struct `VaultsClientGetDeletedResponse` -- New field `ResumeToken` in struct `MHSMPrivateEndpointConnectionsClientBeginDeleteOptions` -- New anonymous field `MHSMPrivateEndpointConnection` in struct `MHSMPrivateEndpointConnectionsClientGetResponse` -- New anonymous field `Vault` in struct `VaultsClientGetResponse` -- New anonymous field `PrivateEndpointConnection` in struct `PrivateEndpointConnectionsClientGetResponse` -- New field `ResumeToken` in struct `ManagedHsmsClientBeginPurgeDeletedOptions` -- New anonymous field `ResourceListResult` in struct `VaultsClientListResponse` -- New anonymous field `MHSMPrivateEndpointConnectionsListResult` in struct `MHSMPrivateEndpointConnectionsClientListByResourceResponse` -- New anonymous field `PrivateEndpointConnection` in struct `PrivateEndpointConnectionsClientDeleteResponse` -- New anonymous field `ManagedHsmListResult` in struct `ManagedHsmsClientListBySubscriptionResponse` -- New anonymous field `ManagedHsm` in struct `ManagedHsmsClientGetResponse` -- New anonymous field `DeletedManagedHsmListResult` in struct `ManagedHsmsClientListDeletedResponse` -- New anonymous field `ManagedHsm` in struct `ManagedHsmsClientCreateOrUpdateResponse` -- New anonymous field `SecretListResult` in struct `SecretsClientListResponse` -- New anonymous field `Vault` in struct `VaultsClientUpdateResponse` -- New field `ResumeToken` in struct `ManagedHsmsClientBeginCreateOrUpdateOptions` -- New anonymous field `DeletedVaultListResult` in struct `VaultsClientListDeletedResponse` -- New field `ResumeToken` in struct `VaultsClientBeginCreateOrUpdateOptions` -- New anonymous field `VaultListResult` in struct `VaultsClientListByResourceGroupResponse` -- New anonymous field `KeyListResult` in struct `KeysClientListVersionsResponse` -- New anonymous field `MHSMPrivateEndpointConnection` in struct `MHSMPrivateEndpointConnectionsClientDeleteResponse` -- New field `ResumeToken` in struct `VaultsClientBeginPurgeDeletedOptions` -- New anonymous field `ManagedHsmListResult` in struct `ManagedHsmsClientListByResourceGroupResponse` -- New anonymous field `KeyListResult` in struct `KeysClientListResponse` -- New anonymous field `Secret` in struct `SecretsClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `PrivateEndpointConnectionsClientBeginDeleteOptions` -- New anonymous field `Key` in struct `KeysClientCreateIfNotExistResponse` -- New anonymous field `Key` in struct `KeysClientGetVersionResponse` -- New anonymous field `DeletedManagedHsm` in struct `ManagedHsmsClientGetDeletedResponse` -- New anonymous field `CheckNameAvailabilityResult` in struct `VaultsClientCheckNameAvailabilityResponse` -- New anonymous field `PrivateLinkResourceListResult` in struct `PrivateLinkResourcesClientListByVaultResponse` - - -## 0.3.1 (2022-02-22) +- New struct `ClientFactory` which is a client factory used to create any client in this module -### Other Changes -- Remove the go_mod_tidy_hack.go file. - -## 0.3.0 (2022-01-13) -### Breaking Changes - -- Function `*MHSMPrivateEndpointConnectionsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *MHSMPrivateEndpointConnectionsGetOptions)` to `(context.Context, string, string, string, *MHSMPrivateEndpointConnectionsClientGetOptions)` -- Function `*MHSMPrivateEndpointConnectionsClient.Get` return value(s) have been changed from `(MHSMPrivateEndpointConnectionsGetResponse, error)` to `(MHSMPrivateEndpointConnectionsClientGetResponse, error)` -- Function `*KeysClient.List` parameter(s) have been changed from `(string, string, *KeysListOptions)` to `(string, string, *KeysClientListOptions)` -- Function `*KeysClient.List` return value(s) have been changed from `(*KeysListPager)` to `(*KeysClientListPager)` -- Function `*OperationsClient.List` parameter(s) have been changed from `(*OperationsListOptions)` to `(*OperationsClientListOptions)` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsListPager)` to `(*OperationsClientListPager)` -- Function `*ManagedHsmsClient.ListByResourceGroup` parameter(s) have been changed from `(string, *ManagedHsmsListByResourceGroupOptions)` to `(string, *ManagedHsmsClientListByResourceGroupOptions)` -- Function `*ManagedHsmsClient.ListByResourceGroup` return value(s) have been changed from `(*ManagedHsmsListByResourceGroupPager)` to `(*ManagedHsmsClientListByResourceGroupPager)` -- Function `*VaultsClient.ListBySubscription` parameter(s) have been changed from `(*VaultsListBySubscriptionOptions)` to `(*VaultsClientListBySubscriptionOptions)` -- Function `*VaultsClient.ListBySubscription` return value(s) have been changed from `(*VaultsListBySubscriptionPager)` to `(*VaultsClientListBySubscriptionPager)` -- Function `*MHSMPrivateEndpointConnectionsClient.Put` parameter(s) have been changed from `(context.Context, string, string, string, MHSMPrivateEndpointConnection, *MHSMPrivateEndpointConnectionsPutOptions)` to `(context.Context, string, string, string, MHSMPrivateEndpointConnection, *MHSMPrivateEndpointConnectionsClientPutOptions)` -- Function `*MHSMPrivateEndpointConnectionsClient.Put` return value(s) have been changed from `(MHSMPrivateEndpointConnectionsPutResponse, error)` to `(MHSMPrivateEndpointConnectionsClientPutResponse, error)` -- Function `*ManagedHsmsClient.ListDeleted` parameter(s) have been changed from `(*ManagedHsmsListDeletedOptions)` to `(*ManagedHsmsClientListDeletedOptions)` -- Function `*ManagedHsmsClient.ListDeleted` return value(s) have been changed from `(*ManagedHsmsListDeletedPager)` to `(*ManagedHsmsClientListDeletedPager)` -- Function `*VaultsClient.List` parameter(s) have been changed from `(*VaultsListOptions)` to `(*VaultsClientListOptions)` -- Function `*VaultsClient.List` return value(s) have been changed from `(*VaultsListPager)` to `(*VaultsClientListPager)` -- Function `*ManagedHsmsClient.BeginPurgeDeleted` parameter(s) have been changed from `(context.Context, string, string, *ManagedHsmsBeginPurgeDeletedOptions)` to `(context.Context, string, string, *ManagedHsmsClientBeginPurgeDeletedOptions)` -- Function `*ManagedHsmsClient.BeginPurgeDeleted` return value(s) have been changed from `(ManagedHsmsPurgeDeletedPollerResponse, error)` to `(ManagedHsmsClientPurgeDeletedPollerResponse, error)` -- Function `*SecretsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, SecretCreateOrUpdateParameters, *SecretsCreateOrUpdateOptions)` to `(context.Context, string, string, string, SecretCreateOrUpdateParameters, *SecretsClientCreateOrUpdateOptions)` -- Function `*SecretsClient.CreateOrUpdate` return value(s) have been changed from `(SecretsCreateOrUpdateResponse, error)` to `(SecretsClientCreateOrUpdateResponse, error)` -- Function `*MHSMPrivateEndpointConnectionsClient.ListByResource` parameter(s) have been changed from `(string, string, *MHSMPrivateEndpointConnectionsListByResourceOptions)` to `(string, string, *MHSMPrivateEndpointConnectionsClientListByResourceOptions)` -- Function `*MHSMPrivateEndpointConnectionsClient.ListByResource` return value(s) have been changed from `(*MHSMPrivateEndpointConnectionsListByResourcePager)` to `(*MHSMPrivateEndpointConnectionsClientListByResourcePager)` -- Function `*VaultsClient.Update` parameter(s) have been changed from `(context.Context, string, string, VaultPatchParameters, *VaultsUpdateOptions)` to `(context.Context, string, string, VaultPatchParameters, *VaultsClientUpdateOptions)` -- Function `*VaultsClient.Update` return value(s) have been changed from `(VaultsUpdateResponse, error)` to `(VaultsClientUpdateResponse, error)` -- Function `*PrivateEndpointConnectionsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateEndpointConnectionsBeginDeleteOptions)` to `(context.Context, string, string, string, *PrivateEndpointConnectionsClientBeginDeleteOptions)` -- Function `*PrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(PrivateEndpointConnectionsDeletePollerResponse, error)` to `(PrivateEndpointConnectionsClientDeletePollerResponse, error)` -- Function `*VaultsClient.ListDeleted` parameter(s) have been changed from `(*VaultsListDeletedOptions)` to `(*VaultsClientListDeletedOptions)` -- Function `*VaultsClient.ListDeleted` return value(s) have been changed from `(*VaultsListDeletedPager)` to `(*VaultsClientListDeletedPager)` -- Function `*ManagedHsmsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ManagedHsmsGetOptions)` to `(context.Context, string, string, *ManagedHsmsClientGetOptions)` -- Function `*ManagedHsmsClient.Get` return value(s) have been changed from `(ManagedHsmsGetResponse, error)` to `(ManagedHsmsClientGetResponse, error)` -- Function `*KeysClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *KeysGetOptions)` to `(context.Context, string, string, string, *KeysClientGetOptions)` -- Function `*KeysClient.Get` return value(s) have been changed from `(KeysGetResponse, error)` to `(KeysClientGetResponse, error)` -- Function `*SecretsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *SecretsGetOptions)` to `(context.Context, string, string, string, *SecretsClientGetOptions)` -- Function `*SecretsClient.Get` return value(s) have been changed from `(SecretsGetResponse, error)` to `(SecretsClientGetResponse, error)` -- Function `*VaultsClient.ListByResourceGroup` parameter(s) have been changed from `(string, *VaultsListByResourceGroupOptions)` to `(string, *VaultsClientListByResourceGroupOptions)` -- Function `*VaultsClient.ListByResourceGroup` return value(s) have been changed from `(*VaultsListByResourceGroupPager)` to `(*VaultsClientListByResourceGroupPager)` -- Function `*KeysClient.GetVersion` parameter(s) have been changed from `(context.Context, string, string, string, string, *KeysGetVersionOptions)` to `(context.Context, string, string, string, string, *KeysClientGetVersionOptions)` -- Function `*KeysClient.GetVersion` return value(s) have been changed from `(KeysGetVersionResponse, error)` to `(KeysClientGetVersionResponse, error)` -- Function `*VaultsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *VaultsDeleteOptions)` to `(context.Context, string, string, *VaultsClientDeleteOptions)` -- Function `*VaultsClient.Delete` return value(s) have been changed from `(VaultsDeleteResponse, error)` to `(VaultsClientDeleteResponse, error)` -- Function `*ManagedHsmsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, ManagedHsm, *ManagedHsmsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, ManagedHsm, *ManagedHsmsClientBeginCreateOrUpdateOptions)` -- Function `*ManagedHsmsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ManagedHsmsCreateOrUpdatePollerResponse, error)` to `(ManagedHsmsClientCreateOrUpdatePollerResponse, error)` -- Function `*PrivateEndpointConnectionsClient.Put` parameter(s) have been changed from `(context.Context, string, string, string, PrivateEndpointConnection, *PrivateEndpointConnectionsPutOptions)` to `(context.Context, string, string, string, PrivateEndpointConnection, *PrivateEndpointConnectionsClientPutOptions)` -- Function `*PrivateEndpointConnectionsClient.Put` return value(s) have been changed from `(PrivateEndpointConnectionsPutResponse, error)` to `(PrivateEndpointConnectionsClientPutResponse, error)` -- Function `*SecretsClient.Update` parameter(s) have been changed from `(context.Context, string, string, string, SecretPatchParameters, *SecretsUpdateOptions)` to `(context.Context, string, string, string, SecretPatchParameters, *SecretsClientUpdateOptions)` -- Function `*SecretsClient.Update` return value(s) have been changed from `(SecretsUpdateResponse, error)` to `(SecretsClientUpdateResponse, error)` -- Function `*VaultsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *VaultsGetOptions)` to `(context.Context, string, string, *VaultsClientGetOptions)` -- Function `*VaultsClient.Get` return value(s) have been changed from `(VaultsGetResponse, error)` to `(VaultsClientGetResponse, error)` -- Function `*PrivateEndpointConnectionsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateEndpointConnectionsGetOptions)` to `(context.Context, string, string, string, *PrivateEndpointConnectionsClientGetOptions)` -- Function `*PrivateEndpointConnectionsClient.Get` return value(s) have been changed from `(PrivateEndpointConnectionsGetResponse, error)` to `(PrivateEndpointConnectionsClientGetResponse, error)` -- Function `*ManagedHsmsClient.GetDeleted` parameter(s) have been changed from `(context.Context, string, string, *ManagedHsmsGetDeletedOptions)` to `(context.Context, string, string, *ManagedHsmsClientGetDeletedOptions)` -- Function `*ManagedHsmsClient.GetDeleted` return value(s) have been changed from `(ManagedHsmsGetDeletedResponse, error)` to `(ManagedHsmsClientGetDeletedResponse, error)` -- Function `*VaultsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, VaultCreateOrUpdateParameters, *VaultsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, VaultCreateOrUpdateParameters, *VaultsClientBeginCreateOrUpdateOptions)` -- Function `*VaultsClient.BeginCreateOrUpdate` return value(s) have been changed from `(VaultsCreateOrUpdatePollerResponse, error)` to `(VaultsClientCreateOrUpdatePollerResponse, error)` -- Function `*ManagedHsmsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, *ManagedHsmsBeginDeleteOptions)` to `(context.Context, string, string, *ManagedHsmsClientBeginDeleteOptions)` -- Function `*ManagedHsmsClient.BeginDelete` return value(s) have been changed from `(ManagedHsmsDeletePollerResponse, error)` to `(ManagedHsmsClientDeletePollerResponse, error)` -- Function `*VaultsClient.GetDeleted` parameter(s) have been changed from `(context.Context, string, string, *VaultsGetDeletedOptions)` to `(context.Context, string, string, *VaultsClientGetDeletedOptions)` -- Function `*VaultsClient.GetDeleted` return value(s) have been changed from `(VaultsGetDeletedResponse, error)` to `(VaultsClientGetDeletedResponse, error)` -- Function `*MHSMPrivateLinkResourcesClient.ListByMHSMResource` parameter(s) have been changed from `(context.Context, string, string, *MHSMPrivateLinkResourcesListByMHSMResourceOptions)` to `(context.Context, string, string, *MHSMPrivateLinkResourcesClientListByMHSMResourceOptions)` -- Function `*MHSMPrivateLinkResourcesClient.ListByMHSMResource` return value(s) have been changed from `(MHSMPrivateLinkResourcesListByMHSMResourceResponse, error)` to `(MHSMPrivateLinkResourcesClientListByMHSMResourceResponse, error)` -- Function `*MHSMPrivateEndpointConnectionsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *MHSMPrivateEndpointConnectionsBeginDeleteOptions)` to `(context.Context, string, string, string, *MHSMPrivateEndpointConnectionsClientBeginDeleteOptions)` -- Function `*MHSMPrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(MHSMPrivateEndpointConnectionsDeletePollerResponse, error)` to `(MHSMPrivateEndpointConnectionsClientDeletePollerResponse, error)` -- Function `*PrivateLinkResourcesClient.ListByVault` parameter(s) have been changed from `(context.Context, string, string, *PrivateLinkResourcesListByVaultOptions)` to `(context.Context, string, string, *PrivateLinkResourcesClientListByVaultOptions)` -- Function `*PrivateLinkResourcesClient.ListByVault` return value(s) have been changed from `(PrivateLinkResourcesListByVaultResponse, error)` to `(PrivateLinkResourcesClientListByVaultResponse, error)` -- Function `*SecretsClient.List` parameter(s) have been changed from `(string, string, *SecretsListOptions)` to `(string, string, *SecretsClientListOptions)` -- Function `*SecretsClient.List` return value(s) have been changed from `(*SecretsListPager)` to `(*SecretsClientListPager)` -- Function `*VaultsClient.UpdateAccessPolicy` parameter(s) have been changed from `(context.Context, string, string, AccessPolicyUpdateKind, VaultAccessPolicyParameters, *VaultsUpdateAccessPolicyOptions)` to `(context.Context, string, string, AccessPolicyUpdateKind, VaultAccessPolicyParameters, *VaultsClientUpdateAccessPolicyOptions)` -- Function `*VaultsClient.UpdateAccessPolicy` return value(s) have been changed from `(VaultsUpdateAccessPolicyResponse, error)` to `(VaultsClientUpdateAccessPolicyResponse, error)` -- Function `*ManagedHsmsClient.ListBySubscription` parameter(s) have been changed from `(*ManagedHsmsListBySubscriptionOptions)` to `(*ManagedHsmsClientListBySubscriptionOptions)` -- Function `*ManagedHsmsClient.ListBySubscription` return value(s) have been changed from `(*ManagedHsmsListBySubscriptionPager)` to `(*ManagedHsmsClientListBySubscriptionPager)` -- Function `*KeysClient.CreateIfNotExist` parameter(s) have been changed from `(context.Context, string, string, string, KeyCreateParameters, *KeysCreateIfNotExistOptions)` to `(context.Context, string, string, string, KeyCreateParameters, *KeysClientCreateIfNotExistOptions)` -- Function `*KeysClient.CreateIfNotExist` return value(s) have been changed from `(KeysCreateIfNotExistResponse, error)` to `(KeysClientCreateIfNotExistResponse, error)` -- Function `*PrivateEndpointConnectionsClient.ListByResource` parameter(s) have been changed from `(string, string, *PrivateEndpointConnectionsListByResourceOptions)` to `(string, string, *PrivateEndpointConnectionsClientListByResourceOptions)` -- Function `*PrivateEndpointConnectionsClient.ListByResource` return value(s) have been changed from `(*PrivateEndpointConnectionsListByResourcePager)` to `(*PrivateEndpointConnectionsClientListByResourcePager)` -- Function `*VaultsClient.BeginPurgeDeleted` parameter(s) have been changed from `(context.Context, string, string, *VaultsBeginPurgeDeletedOptions)` to `(context.Context, string, string, *VaultsClientBeginPurgeDeletedOptions)` -- Function `*VaultsClient.BeginPurgeDeleted` return value(s) have been changed from `(VaultsPurgeDeletedPollerResponse, error)` to `(VaultsClientPurgeDeletedPollerResponse, error)` -- Function `*VaultsClient.CheckNameAvailability` parameter(s) have been changed from `(context.Context, VaultCheckNameAvailabilityParameters, *VaultsCheckNameAvailabilityOptions)` to `(context.Context, VaultCheckNameAvailabilityParameters, *VaultsClientCheckNameAvailabilityOptions)` -- Function `*VaultsClient.CheckNameAvailability` return value(s) have been changed from `(VaultsCheckNameAvailabilityResponse, error)` to `(VaultsClientCheckNameAvailabilityResponse, error)` -- Function `*ManagedHsmsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, ManagedHsm, *ManagedHsmsBeginUpdateOptions)` to `(context.Context, string, string, ManagedHsm, *ManagedHsmsClientBeginUpdateOptions)` -- Function `*ManagedHsmsClient.BeginUpdate` return value(s) have been changed from `(ManagedHsmsUpdatePollerResponse, error)` to `(ManagedHsmsClientUpdatePollerResponse, error)` -- Function `*KeysClient.ListVersions` parameter(s) have been changed from `(string, string, string, *KeysListVersionsOptions)` to `(string, string, string, *KeysClientListVersionsOptions)` -- Function `*KeysClient.ListVersions` return value(s) have been changed from `(*KeysListVersionsPager)` to `(*KeysClientListVersionsPager)` -- Function `*VaultsListPager.Err` has been removed -- Function `*ManagedHsmsListByResourceGroupPager.PageResponse` has been removed -- Function `*VaultsListBySubscriptionPager.PageResponse` has been removed -- Function `*SecretsListPager.PageResponse` has been removed -- Function `*VaultsListBySubscriptionPager.NextPage` has been removed -- Function `*MHSMPrivateEndpointConnectionsDeletePollerResponse.Resume` has been removed -- Function `*KeysListVersionsPager.NextPage` has been removed -- Function `*ManagedHsmsPurgeDeletedPoller.Poll` has been removed -- Function `*ManagedHsmsListBySubscriptionPager.PageResponse` has been removed -- Function `*VaultsListPager.PageResponse` has been removed -- Function `*ManagedHsmsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `CloudError.Error` has been removed -- Function `*ManagedHsmsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*VaultsListByResourceGroupPager.PageResponse` has been removed -- Function `*ManagedHsmsUpdatePoller.Poll` has been removed -- Function `*VaultsPurgeDeletedPoller.Done` has been removed -- Function `ManagedHsmsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*PrivateEndpointConnectionsDeletePoller.Poll` has been removed -- Function `*ManagedHsmsUpdatePoller.FinalResponse` has been removed -- Function `*PrivateEndpointConnectionsDeletePoller.Done` has been removed -- Function `ManagedHsmsDeletePollerResponse.PollUntilDone` has been removed -- Function `*ManagedHsmsDeletePoller.FinalResponse` has been removed -- Function `*KeysListPager.Err` has been removed -- Function `*ManagedHsmsListByResourceGroupPager.Err` has been removed -- Function `PrivateEndpointConnectionsDeletePollerResponse.PollUntilDone` has been removed -- Function `*VaultsListByResourceGroupPager.Err` has been removed -- Function `*ManagedHsmsListByResourceGroupPager.NextPage` has been removed -- Function `*ManagedHsmsListDeletedPager.PageResponse` has been removed -- Function `*KeysListPager.PageResponse` has been removed -- Function `*VaultsPurgeDeletedPollerResponse.Resume` has been removed -- Function `*VaultsListDeletedPager.NextPage` has been removed -- Function `*ManagedHsmsUpdatePollerResponse.Resume` has been removed -- Function `*KeysListVersionsPager.Err` has been removed -- Function `VaultsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*MHSMPrivateEndpointConnectionsListByResourcePager.Err` has been removed -- Function `*PrivateEndpointConnectionsDeletePoller.FinalResponse` has been removed -- Function `*VaultsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*MHSMPrivateEndpointConnectionsDeletePoller.FinalResponse` has been removed -- Function `*VaultsListByResourceGroupPager.NextPage` has been removed -- Function `*VaultsPurgeDeletedPoller.Poll` has been removed -- Function `*ManagedHsmsListBySubscriptionPager.Err` has been removed -- Function `*ManagedHsmsListDeletedPager.NextPage` has been removed -- Function `ManagedHsmsUpdatePollerResponse.PollUntilDone` has been removed -- Function `*VaultsListDeletedPager.PageResponse` has been removed -- Function `*MHSMPrivateEndpointConnectionsDeletePoller.Poll` has been removed -- Function `*ManagedHsmsCreateOrUpdatePoller.Poll` has been removed -- Function `*OperationsListPager.PageResponse` has been removed -- Function `ManagedHsmsPurgeDeletedPollerResponse.PollUntilDone` has been removed -- Function `*PrivateEndpointConnectionsDeletePollerResponse.Resume` has been removed -- Function `*VaultsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ManagedHsmsPurgeDeletedPollerResponse.Resume` has been removed -- Function `*SecretsListPager.NextPage` has been removed -- Function `*KeysListPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsListByResourcePager.Err` has been removed -- Function `*ManagedHsmsListBySubscriptionPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsListByResourcePager.PageResponse` has been removed -- Function `MHSMPrivateEndpointConnectionsDeletePollerResponse.PollUntilDone` has been removed -- Function `*ManagedHsmsUpdatePoller.ResumeToken` has been removed -- Function `*ManagedHsmsCreateOrUpdatePoller.Done` has been removed -- Function `*ManagedHsmsPurgeDeletedPoller.ResumeToken` has been removed -- Function `*KeysListVersionsPager.PageResponse` has been removed -- Function `*VaultsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*VaultsCreateOrUpdatePoller.Poll` has been removed -- Function `*VaultsPurgeDeletedPoller.ResumeToken` has been removed -- Function `*ManagedHsmsListDeletedPager.Err` has been removed -- Function `*MHSMPrivateEndpointConnectionsDeletePoller.Done` has been removed -- Function `*ManagedHsmsDeletePoller.Poll` has been removed -- Function `*ManagedHsmsDeletePoller.ResumeToken` has been removed -- Function `*ManagedHsmsDeletePoller.Done` has been removed -- Function `*VaultsListBySubscriptionPager.Err` has been removed -- Function `*SecretsListPager.Err` has been removed -- Function `*VaultsListPager.NextPage` has been removed -- Function `*VaultsListDeletedPager.Err` has been removed -- Function `*ManagedHsmsPurgeDeletedPoller.FinalResponse` has been removed -- Function `ManagedHsmError.Error` has been removed -- Function `VaultsPurgeDeletedPollerResponse.PollUntilDone` has been removed -- Function `*PrivateEndpointConnectionsDeletePoller.ResumeToken` has been removed -- Function `*OperationsListPager.NextPage` has been removed -- Function `*ManagedHsmsDeletePollerResponse.Resume` has been removed -- Function `*ManagedHsmsPurgeDeletedPoller.Done` has been removed -- Function `*MHSMPrivateEndpointConnectionsListByResourcePager.NextPage` has been removed -- Function `*OperationsListPager.Err` has been removed -- Function `*VaultsPurgeDeletedPoller.FinalResponse` has been removed -- Function `*VaultsCreateOrUpdatePoller.Done` has been removed -- Function `*ManagedHsmsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*MHSMPrivateEndpointConnectionsDeletePoller.ResumeToken` has been removed -- Function `*ManagedHsmsUpdatePoller.Done` has been removed -- Function `*PrivateEndpointConnectionsListByResourcePager.NextPage` has been removed -- Function `*MHSMPrivateEndpointConnectionsListByResourcePager.PageResponse` has been removed -- Struct `KeysCreateIfNotExistOptions` has been removed -- Struct `KeysCreateIfNotExistResponse` has been removed -- Struct `KeysCreateIfNotExistResult` has been removed -- Struct `KeysGetOptions` has been removed -- Struct `KeysGetResponse` has been removed -- Struct `KeysGetResult` has been removed -- Struct `KeysGetVersionOptions` has been removed -- Struct `KeysGetVersionResponse` has been removed -- Struct `KeysGetVersionResult` has been removed -- Struct `KeysListOptions` has been removed -- Struct `KeysListPager` has been removed -- Struct `KeysListResponse` has been removed -- Struct `KeysListResult` has been removed -- Struct `KeysListVersionsOptions` has been removed -- Struct `KeysListVersionsPager` has been removed -- Struct `KeysListVersionsResponse` has been removed -- Struct `KeysListVersionsResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsBeginDeleteOptions` has been removed -- Struct `MHSMPrivateEndpointConnectionsDeletePoller` has been removed -- Struct `MHSMPrivateEndpointConnectionsDeletePollerResponse` has been removed -- Struct `MHSMPrivateEndpointConnectionsDeleteResponse` has been removed -- Struct `MHSMPrivateEndpointConnectionsDeleteResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsGetOptions` has been removed -- Struct `MHSMPrivateEndpointConnectionsGetResponse` has been removed -- Struct `MHSMPrivateEndpointConnectionsGetResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsListByResourceOptions` has been removed -- Struct `MHSMPrivateEndpointConnectionsListByResourcePager` has been removed -- Struct `MHSMPrivateEndpointConnectionsListByResourceResponse` has been removed -- Struct `MHSMPrivateEndpointConnectionsListByResourceResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsPutOptions` has been removed -- Struct `MHSMPrivateEndpointConnectionsPutResponse` has been removed -- Struct `MHSMPrivateEndpointConnectionsPutResult` has been removed -- Struct `MHSMPrivateLinkResourcesListByMHSMResourceOptions` has been removed -- Struct `MHSMPrivateLinkResourcesListByMHSMResourceResponse` has been removed -- Struct `MHSMPrivateLinkResourcesListByMHSMResourceResult` has been removed -- Struct `ManagedHsmsBeginCreateOrUpdateOptions` has been removed -- Struct `ManagedHsmsBeginDeleteOptions` has been removed -- Struct `ManagedHsmsBeginPurgeDeletedOptions` has been removed -- Struct `ManagedHsmsBeginUpdateOptions` has been removed -- Struct `ManagedHsmsCreateOrUpdatePoller` has been removed -- Struct `ManagedHsmsCreateOrUpdatePollerResponse` has been removed -- Struct `ManagedHsmsCreateOrUpdateResponse` has been removed -- Struct `ManagedHsmsCreateOrUpdateResult` has been removed -- Struct `ManagedHsmsDeletePoller` has been removed -- Struct `ManagedHsmsDeletePollerResponse` has been removed -- Struct `ManagedHsmsDeleteResponse` has been removed -- Struct `ManagedHsmsGetDeletedOptions` has been removed -- Struct `ManagedHsmsGetDeletedResponse` has been removed -- Struct `ManagedHsmsGetDeletedResult` has been removed -- Struct `ManagedHsmsGetOptions` has been removed -- Struct `ManagedHsmsGetResponse` has been removed -- Struct `ManagedHsmsGetResult` has been removed -- Struct `ManagedHsmsListByResourceGroupOptions` has been removed -- Struct `ManagedHsmsListByResourceGroupPager` has been removed -- Struct `ManagedHsmsListByResourceGroupResponse` has been removed -- Struct `ManagedHsmsListByResourceGroupResult` has been removed -- Struct `ManagedHsmsListBySubscriptionOptions` has been removed -- Struct `ManagedHsmsListBySubscriptionPager` has been removed -- Struct `ManagedHsmsListBySubscriptionResponse` has been removed -- Struct `ManagedHsmsListBySubscriptionResult` has been removed -- Struct `ManagedHsmsListDeletedOptions` has been removed -- Struct `ManagedHsmsListDeletedPager` has been removed -- Struct `ManagedHsmsListDeletedResponse` has been removed -- Struct `ManagedHsmsListDeletedResult` has been removed -- Struct `ManagedHsmsPurgeDeletedPoller` has been removed -- Struct `ManagedHsmsPurgeDeletedPollerResponse` has been removed -- Struct `ManagedHsmsPurgeDeletedResponse` has been removed -- Struct `ManagedHsmsUpdatePoller` has been removed -- Struct `ManagedHsmsUpdatePollerResponse` has been removed -- Struct `ManagedHsmsUpdateResponse` has been removed -- Struct `ManagedHsmsUpdateResult` has been removed -- Struct `OperationsListOptions` has been removed -- Struct `OperationsListPager` has been removed -- Struct `OperationsListResponse` has been removed -- Struct `OperationsListResult` has been removed -- Struct `PrivateEndpointConnectionsBeginDeleteOptions` has been removed -- Struct `PrivateEndpointConnectionsDeletePoller` has been removed -- Struct `PrivateEndpointConnectionsDeletePollerResponse` has been removed -- Struct `PrivateEndpointConnectionsDeleteResponse` has been removed -- Struct `PrivateEndpointConnectionsDeleteResult` has been removed -- Struct `PrivateEndpointConnectionsGetOptions` has been removed -- Struct `PrivateEndpointConnectionsGetResponse` has been removed -- Struct `PrivateEndpointConnectionsGetResult` has been removed -- Struct `PrivateEndpointConnectionsListByResourceOptions` has been removed -- Struct `PrivateEndpointConnectionsListByResourcePager` has been removed -- Struct `PrivateEndpointConnectionsListByResourceResponse` has been removed -- Struct `PrivateEndpointConnectionsListByResourceResult` has been removed -- Struct `PrivateEndpointConnectionsPutOptions` has been removed -- Struct `PrivateEndpointConnectionsPutResponse` has been removed -- Struct `PrivateEndpointConnectionsPutResult` has been removed -- Struct `PrivateLinkResourcesListByVaultOptions` has been removed -- Struct `PrivateLinkResourcesListByVaultResponse` has been removed -- Struct `PrivateLinkResourcesListByVaultResult` has been removed -- Struct `SecretsCreateOrUpdateOptions` has been removed -- Struct `SecretsCreateOrUpdateResponse` has been removed -- Struct `SecretsCreateOrUpdateResult` has been removed -- Struct `SecretsGetOptions` has been removed -- Struct `SecretsGetResponse` has been removed -- Struct `SecretsGetResult` has been removed -- Struct `SecretsListOptions` has been removed -- Struct `SecretsListPager` has been removed -- Struct `SecretsListResponse` has been removed -- Struct `SecretsListResult` has been removed -- Struct `SecretsUpdateOptions` has been removed -- Struct `SecretsUpdateResponse` has been removed -- Struct `SecretsUpdateResult` has been removed -- Struct `VaultsBeginCreateOrUpdateOptions` has been removed -- Struct `VaultsBeginPurgeDeletedOptions` has been removed -- Struct `VaultsCheckNameAvailabilityOptions` has been removed -- Struct `VaultsCheckNameAvailabilityResponse` has been removed -- Struct `VaultsCheckNameAvailabilityResult` has been removed -- Struct `VaultsCreateOrUpdatePoller` has been removed -- Struct `VaultsCreateOrUpdatePollerResponse` has been removed -- Struct `VaultsCreateOrUpdateResponse` has been removed -- Struct `VaultsCreateOrUpdateResult` has been removed -- Struct `VaultsDeleteOptions` has been removed -- Struct `VaultsDeleteResponse` has been removed -- Struct `VaultsGetDeletedOptions` has been removed -- Struct `VaultsGetDeletedResponse` has been removed -- Struct `VaultsGetDeletedResult` has been removed -- Struct `VaultsGetOptions` has been removed -- Struct `VaultsGetResponse` has been removed -- Struct `VaultsGetResult` has been removed -- Struct `VaultsListByResourceGroupOptions` has been removed -- Struct `VaultsListByResourceGroupPager` has been removed -- Struct `VaultsListByResourceGroupResponse` has been removed -- Struct `VaultsListByResourceGroupResult` has been removed -- Struct `VaultsListBySubscriptionOptions` has been removed -- Struct `VaultsListBySubscriptionPager` has been removed -- Struct `VaultsListBySubscriptionResponse` has been removed -- Struct `VaultsListBySubscriptionResult` has been removed -- Struct `VaultsListDeletedOptions` has been removed -- Struct `VaultsListDeletedPager` has been removed -- Struct `VaultsListDeletedResponse` has been removed -- Struct `VaultsListDeletedResult` has been removed -- Struct `VaultsListOptions` has been removed -- Struct `VaultsListPager` has been removed -- Struct `VaultsListResponse` has been removed -- Struct `VaultsListResult` has been removed -- Struct `VaultsPurgeDeletedPoller` has been removed -- Struct `VaultsPurgeDeletedPollerResponse` has been removed -- Struct `VaultsPurgeDeletedResponse` has been removed -- Struct `VaultsUpdateAccessPolicyOptions` has been removed -- Struct `VaultsUpdateAccessPolicyResponse` has been removed -- Struct `VaultsUpdateAccessPolicyResult` has been removed -- Struct `VaultsUpdateOptions` has been removed -- Struct `VaultsUpdateResponse` has been removed -- Struct `VaultsUpdateResult` has been removed -- Field `ManagedHsmResource` of struct `MHSMPrivateLinkResource` has been removed -- Field `Resource` of struct `PrivateLinkResource` has been removed -- Field `Resource` of struct `Secret` has been removed -- Field `InnerError` of struct `CloudError` has been removed -- Field `ManagedHsmResource` of struct `ManagedHsm` has been removed -- Field `InnerError` of struct `ManagedHsmError` has been removed -- Field `Resource` of struct `PrivateEndpointConnection` has been removed -- Field `Resource` of struct `Key` has been removed -- Field `Attributes` of struct `SecretAttributes` has been removed -- Field `ManagedHsmResource` of struct `MHSMPrivateEndpointConnection` has been removed - -### Features Added - -- New const `KeyPermissionsGetrotationpolicy` -- New const `KeyPermissionsSetrotationpolicy` -- New const `JSONWebKeyOperationRelease` -- New function `*VaultsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*ManagedHsmsClientPurgeDeletedPoller.Done() bool` -- New function `*MHSMPrivateEndpointConnectionsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `SecretAttributes.MarshalJSON() ([]byte, error)` -- New function `*VaultsClientPurgeDeletedPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ManagedHsmsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*PrivateEndpointConnectionsClientListByResourcePager.PageResponse() PrivateEndpointConnectionsClientListByResourceResponse` -- New function `*KeysClientListVersionsPager.PageResponse() KeysClientListVersionsResponse` -- New function `*MHSMPrivateEndpointConnectionsClientDeletePollerResponse.Resume(context.Context, *MHSMPrivateEndpointConnectionsClient, string) error` -- New function `*ManagedHsmsClientUpdatePollerResponse.Resume(context.Context, *ManagedHsmsClient, string) error` -- New function `*MHSMPrivateEndpointConnectionsClientListByResourcePager.Err() error` -- New function `*MHSMPrivateEndpointConnectionsClientDeletePoller.Done() bool` -- New function `*KeysClientListPager.Err() error` -- New function `*VaultsClientPurgeDeletedPollerResponse.Resume(context.Context, *VaultsClient, string) error` -- New function `*VaultsClientPurgeDeletedPoller.FinalResponse(context.Context) (VaultsClientPurgeDeletedResponse, error)` -- New function `*ManagedHsmsClientListDeletedPager.PageResponse() ManagedHsmsClientListDeletedResponse` -- New function `*SecretsClientListPager.PageResponse() SecretsClientListResponse` -- New function `*ManagedHsmsClientCreateOrUpdatePollerResponse.Resume(context.Context, *ManagedHsmsClient, string) error` -- New function `*ManagedHsmsClientDeletePollerResponse.Resume(context.Context, *ManagedHsmsClient, string) error` -- New function `*PrivateEndpointConnectionsClientDeletePoller.FinalResponse(context.Context) (PrivateEndpointConnectionsClientDeleteResponse, error)` -- New function `*VaultsClientListPager.NextPage(context.Context) bool` -- New function `*ManagedHsmsClientCreateOrUpdatePoller.FinalResponse(context.Context) (ManagedHsmsClientCreateOrUpdateResponse, error)` -- New function `*OperationsClientListPager.PageResponse() OperationsClientListResponse` -- New function `ManagedHsmsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (ManagedHsmsClientCreateOrUpdateResponse, error)` -- New function `*ManagedHsmsClientListBySubscriptionPager.Err() error` -- New function `*PrivateEndpointConnectionsClientDeletePoller.ResumeToken() (string, error)` -- New function `*OperationsClientListPager.Err() error` -- New function `*ManagedHsmsClientUpdatePoller.FinalResponse(context.Context) (ManagedHsmsClientUpdateResponse, error)` -- New function `*VaultsClientCreateOrUpdatePoller.FinalResponse(context.Context) (VaultsClientCreateOrUpdateResponse, error)` -- New function `*ManagedHsmsClientCreateOrUpdatePoller.Done() bool` -- New function `*PrivateEndpointConnectionsClientDeletePollerResponse.Resume(context.Context, *PrivateEndpointConnectionsClient, string) error` -- New function `*ManagedHsmsClientDeletePoller.Done() bool` -- New function `*ManagedHsmsClientPurgeDeletedPoller.ResumeToken() (string, error)` -- New function `*VaultsClientListBySubscriptionPager.PageResponse() VaultsClientListBySubscriptionResponse` -- New function `*VaultsClientListDeletedPager.NextPage(context.Context) bool` -- New function `*VaultsClientCreateOrUpdatePollerResponse.Resume(context.Context, *VaultsClient, string) error` -- New function `*VaultsClientCreateOrUpdatePoller.Done() bool` -- New function `*MHSMPrivateEndpointConnectionsClientListByResourcePager.PageResponse() MHSMPrivateEndpointConnectionsClientListByResourceResponse` -- New function `*ManagedHsmsClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*ManagedHsmsClientPurgeDeletedPoller.FinalResponse(context.Context) (ManagedHsmsClientPurgeDeletedResponse, error)` -- New function `*ManagedHsmsClientListBySubscriptionPager.PageResponse() ManagedHsmsClientListBySubscriptionResponse` -- New function `*VaultsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*VaultsClientListBySubscriptionPager.Err() error` -- New function `ManagedHsmsClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (ManagedHsmsClientUpdateResponse, error)` -- New function `*PrivateEndpointConnectionsClientDeletePoller.Done() bool` -- New function `*ManagedHsmsClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `VaultsClientPurgeDeletedPollerResponse.PollUntilDone(context.Context, time.Duration) (VaultsClientPurgeDeletedResponse, error)` -- New function `*SecretsClientListPager.NextPage(context.Context) bool` -- New function `*VaultsClientListByResourceGroupPager.PageResponse() VaultsClientListByResourceGroupResponse` -- New function `*VaultsClientPurgeDeletedPoller.ResumeToken() (string, error)` -- New function `*VaultsClientListDeletedPager.PageResponse() VaultsClientListDeletedResponse` -- New function `*ManagedHsmsClientDeletePoller.ResumeToken() (string, error)` -- New function `*ManagedHsmsClientListDeletedPager.NextPage(context.Context) bool` -- New function `*ManagedHsmsClientPurgeDeletedPollerResponse.Resume(context.Context, *ManagedHsmsClient, string) error` -- New function `*ManagedHsmsClientUpdatePoller.ResumeToken() (string, error)` -- New function `*VaultsClientListDeletedPager.Err() error` -- New function `*PrivateEndpointConnectionsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*ManagedHsmsClientUpdatePoller.Done() bool` -- New function `*ManagedHsmsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*KeysClientListPager.NextPage(context.Context) bool` -- New function `*VaultsClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*MHSMPrivateEndpointConnectionsClientDeletePoller.FinalResponse(context.Context) (MHSMPrivateEndpointConnectionsClientDeleteResponse, error)` -- New function `*KeysClientListVersionsPager.Err() error` -- New function `*PrivateEndpointConnectionsClientListByResourcePager.Err() error` -- New function `ManagedHsmsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (ManagedHsmsClientDeleteResponse, error)` -- New function `*ManagedHsmsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*PrivateEndpointConnectionsClientListByResourcePager.NextPage(context.Context) bool` -- New function `*SecretAttributes.UnmarshalJSON([]byte) error` -- New function `*VaultsClientListPager.PageResponse() VaultsClientListResponse` -- New function `*ManagedHsmsClientDeletePoller.FinalResponse(context.Context) (ManagedHsmsClientDeleteResponse, error)` -- New function `*ManagedHsmsClientListDeletedPager.Err() error` -- New function `*ManagedHsmsClientPurgeDeletedPoller.Poll(context.Context) (*http.Response, error)` -- New function `*KeysClientListVersionsPager.NextPage(context.Context) bool` -- New function `*MHSMPrivateEndpointConnectionsClientListByResourcePager.NextPage(context.Context) bool` -- New function `*ManagedHsmsClientListByResourceGroupPager.PageResponse() ManagedHsmsClientListByResourceGroupResponse` -- New function `*VaultsClientListPager.Err() error` -- New function `*MHSMPrivateEndpointConnectionsClientDeletePoller.ResumeToken() (string, error)` -- New function `*VaultsClientListByResourceGroupPager.Err() error` -- New function `*ManagedHsmsClientListByResourceGroupPager.Err() error` -- New function `*VaultsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `ManagedHsmsClientPurgeDeletedPollerResponse.PollUntilDone(context.Context, time.Duration) (ManagedHsmsClientPurgeDeletedResponse, error)` -- New function `*KeysClientListPager.PageResponse() KeysClientListResponse` -- New function `MHSMPrivateEndpointConnectionsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (MHSMPrivateEndpointConnectionsClientDeleteResponse, error)` -- New function `*ManagedHsmsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*SecretsClientListPager.Err() error` -- New function `VaultsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (VaultsClientCreateOrUpdateResponse, error)` -- New function `*VaultsClientPurgeDeletedPoller.Done() bool` -- New function `*OperationsClientListPager.NextPage(context.Context) bool` -- New function `PrivateEndpointConnectionsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (PrivateEndpointConnectionsClientDeleteResponse, error)` -- New struct `KeysClientCreateIfNotExistOptions` -- New struct `KeysClientCreateIfNotExistResponse` -- New struct `KeysClientCreateIfNotExistResult` -- New struct `KeysClientGetOptions` -- New struct `KeysClientGetResponse` -- New struct `KeysClientGetResult` -- New struct `KeysClientGetVersionOptions` -- New struct `KeysClientGetVersionResponse` -- New struct `KeysClientGetVersionResult` -- New struct `KeysClientListOptions` -- New struct `KeysClientListPager` -- New struct `KeysClientListResponse` -- New struct `KeysClientListResult` -- New struct `KeysClientListVersionsOptions` -- New struct `KeysClientListVersionsPager` -- New struct `KeysClientListVersionsResponse` -- New struct `KeysClientListVersionsResult` -- New struct `MHSMPrivateEndpointConnectionsClientBeginDeleteOptions` -- New struct `MHSMPrivateEndpointConnectionsClientDeletePoller` -- New struct `MHSMPrivateEndpointConnectionsClientDeletePollerResponse` -- New struct `MHSMPrivateEndpointConnectionsClientDeleteResponse` -- New struct `MHSMPrivateEndpointConnectionsClientDeleteResult` -- New struct `MHSMPrivateEndpointConnectionsClientGetOptions` -- New struct `MHSMPrivateEndpointConnectionsClientGetResponse` -- New struct `MHSMPrivateEndpointConnectionsClientGetResult` -- New struct `MHSMPrivateEndpointConnectionsClientListByResourceOptions` -- New struct `MHSMPrivateEndpointConnectionsClientListByResourcePager` -- New struct `MHSMPrivateEndpointConnectionsClientListByResourceResponse` -- New struct `MHSMPrivateEndpointConnectionsClientListByResourceResult` -- New struct `MHSMPrivateEndpointConnectionsClientPutOptions` -- New struct `MHSMPrivateEndpointConnectionsClientPutResponse` -- New struct `MHSMPrivateEndpointConnectionsClientPutResult` -- New struct `MHSMPrivateLinkResourcesClientListByMHSMResourceOptions` -- New struct `MHSMPrivateLinkResourcesClientListByMHSMResourceResponse` -- New struct `MHSMPrivateLinkResourcesClientListByMHSMResourceResult` -- New struct `ManagedHsmsClientBeginCreateOrUpdateOptions` -- New struct `ManagedHsmsClientBeginDeleteOptions` -- New struct `ManagedHsmsClientBeginPurgeDeletedOptions` -- New struct `ManagedHsmsClientBeginUpdateOptions` -- New struct `ManagedHsmsClientCreateOrUpdatePoller` -- New struct `ManagedHsmsClientCreateOrUpdatePollerResponse` -- New struct `ManagedHsmsClientCreateOrUpdateResponse` -- New struct `ManagedHsmsClientCreateOrUpdateResult` -- New struct `ManagedHsmsClientDeletePoller` -- New struct `ManagedHsmsClientDeletePollerResponse` -- New struct `ManagedHsmsClientDeleteResponse` -- New struct `ManagedHsmsClientGetDeletedOptions` -- New struct `ManagedHsmsClientGetDeletedResponse` -- New struct `ManagedHsmsClientGetDeletedResult` -- New struct `ManagedHsmsClientGetOptions` -- New struct `ManagedHsmsClientGetResponse` -- New struct `ManagedHsmsClientGetResult` -- New struct `ManagedHsmsClientListByResourceGroupOptions` -- New struct `ManagedHsmsClientListByResourceGroupPager` -- New struct `ManagedHsmsClientListByResourceGroupResponse` -- New struct `ManagedHsmsClientListByResourceGroupResult` -- New struct `ManagedHsmsClientListBySubscriptionOptions` -- New struct `ManagedHsmsClientListBySubscriptionPager` -- New struct `ManagedHsmsClientListBySubscriptionResponse` -- New struct `ManagedHsmsClientListBySubscriptionResult` -- New struct `ManagedHsmsClientListDeletedOptions` -- New struct `ManagedHsmsClientListDeletedPager` -- New struct `ManagedHsmsClientListDeletedResponse` -- New struct `ManagedHsmsClientListDeletedResult` -- New struct `ManagedHsmsClientPurgeDeletedPoller` -- New struct `ManagedHsmsClientPurgeDeletedPollerResponse` -- New struct `ManagedHsmsClientPurgeDeletedResponse` -- New struct `ManagedHsmsClientUpdatePoller` -- New struct `ManagedHsmsClientUpdatePollerResponse` -- New struct `ManagedHsmsClientUpdateResponse` -- New struct `ManagedHsmsClientUpdateResult` -- New struct `OperationsClientListOptions` -- New struct `OperationsClientListPager` -- New struct `OperationsClientListResponse` -- New struct `OperationsClientListResult` -- New struct `PrivateEndpointConnectionsClientBeginDeleteOptions` -- New struct `PrivateEndpointConnectionsClientDeletePoller` -- New struct `PrivateEndpointConnectionsClientDeletePollerResponse` -- New struct `PrivateEndpointConnectionsClientDeleteResponse` -- New struct `PrivateEndpointConnectionsClientDeleteResult` -- New struct `PrivateEndpointConnectionsClientGetOptions` -- New struct `PrivateEndpointConnectionsClientGetResponse` -- New struct `PrivateEndpointConnectionsClientGetResult` -- New struct `PrivateEndpointConnectionsClientListByResourceOptions` -- New struct `PrivateEndpointConnectionsClientListByResourcePager` -- New struct `PrivateEndpointConnectionsClientListByResourceResponse` -- New struct `PrivateEndpointConnectionsClientListByResourceResult` -- New struct `PrivateEndpointConnectionsClientPutOptions` -- New struct `PrivateEndpointConnectionsClientPutResponse` -- New struct `PrivateEndpointConnectionsClientPutResult` -- New struct `PrivateLinkResourcesClientListByVaultOptions` -- New struct `PrivateLinkResourcesClientListByVaultResponse` -- New struct `PrivateLinkResourcesClientListByVaultResult` -- New struct `SecretsClientCreateOrUpdateOptions` -- New struct `SecretsClientCreateOrUpdateResponse` -- New struct `SecretsClientCreateOrUpdateResult` -- New struct `SecretsClientGetOptions` -- New struct `SecretsClientGetResponse` -- New struct `SecretsClientGetResult` -- New struct `SecretsClientListOptions` -- New struct `SecretsClientListPager` -- New struct `SecretsClientListResponse` -- New struct `SecretsClientListResult` -- New struct `SecretsClientUpdateOptions` -- New struct `SecretsClientUpdateResponse` -- New struct `SecretsClientUpdateResult` -- New struct `VaultsClientBeginCreateOrUpdateOptions` -- New struct `VaultsClientBeginPurgeDeletedOptions` -- New struct `VaultsClientCheckNameAvailabilityOptions` -- New struct `VaultsClientCheckNameAvailabilityResponse` -- New struct `VaultsClientCheckNameAvailabilityResult` -- New struct `VaultsClientCreateOrUpdatePoller` -- New struct `VaultsClientCreateOrUpdatePollerResponse` -- New struct `VaultsClientCreateOrUpdateResponse` -- New struct `VaultsClientCreateOrUpdateResult` -- New struct `VaultsClientDeleteOptions` -- New struct `VaultsClientDeleteResponse` -- New struct `VaultsClientGetDeletedOptions` -- New struct `VaultsClientGetDeletedResponse` -- New struct `VaultsClientGetDeletedResult` -- New struct `VaultsClientGetOptions` -- New struct `VaultsClientGetResponse` -- New struct `VaultsClientGetResult` -- New struct `VaultsClientListByResourceGroupOptions` -- New struct `VaultsClientListByResourceGroupPager` -- New struct `VaultsClientListByResourceGroupResponse` -- New struct `VaultsClientListByResourceGroupResult` -- New struct `VaultsClientListBySubscriptionOptions` -- New struct `VaultsClientListBySubscriptionPager` -- New struct `VaultsClientListBySubscriptionResponse` -- New struct `VaultsClientListBySubscriptionResult` -- New struct `VaultsClientListDeletedOptions` -- New struct `VaultsClientListDeletedPager` -- New struct `VaultsClientListDeletedResponse` -- New struct `VaultsClientListDeletedResult` -- New struct `VaultsClientListOptions` -- New struct `VaultsClientListPager` -- New struct `VaultsClientListResponse` -- New struct `VaultsClientListResult` -- New struct `VaultsClientPurgeDeletedPoller` -- New struct `VaultsClientPurgeDeletedPollerResponse` -- New struct `VaultsClientPurgeDeletedResponse` -- New struct `VaultsClientUpdateAccessPolicyOptions` -- New struct `VaultsClientUpdateAccessPolicyResponse` -- New struct `VaultsClientUpdateAccessPolicyResult` -- New struct `VaultsClientUpdateOptions` -- New struct `VaultsClientUpdateResponse` -- New struct `VaultsClientUpdateResult` -- New field `Name` in struct `MHSMPrivateLinkResource` -- New field `SystemData` in struct `MHSMPrivateLinkResource` -- New field `Type` in struct `MHSMPrivateLinkResource` -- New field `Location` in struct `MHSMPrivateLinkResource` -- New field `SKU` in struct `MHSMPrivateLinkResource` -- New field `Tags` in struct `MHSMPrivateLinkResource` -- New field `ID` in struct `MHSMPrivateLinkResource` -- New field `Tags` in struct `PrivateEndpointConnection` -- New field `Type` in struct `PrivateEndpointConnection` -- New field `ID` in struct `PrivateEndpointConnection` -- New field `Location` in struct `PrivateEndpointConnection` -- New field `Name` in struct `PrivateEndpointConnection` -- New field `ID` in struct `Secret` -- New field `Location` in struct `Secret` -- New field `Name` in struct `Secret` -- New field `Tags` in struct `Secret` -- New field `Type` in struct `Secret` -- New field `Expires` in struct `SecretAttributes` -- New field `NotBefore` in struct `SecretAttributes` -- New field `Created` in struct `SecretAttributes` -- New field `Updated` in struct `SecretAttributes` -- New field `Enabled` in struct `SecretAttributes` -- New field `Location` in struct `Key` -- New field `Name` in struct `Key` -- New field `Tags` in struct `Key` -- New field `Type` in struct `Key` -- New field `ID` in struct `Key` -- New field `Error` in struct `CloudError` -- New field `Error` in struct `ManagedHsmError` -- New field `SKU` in struct `MHSMPrivateEndpointConnection` -- New field `SystemData` in struct `MHSMPrivateEndpointConnection` -- New field `Type` in struct `MHSMPrivateEndpointConnection` -- New field `Location` in struct `MHSMPrivateEndpointConnection` -- New field `Tags` in struct `MHSMPrivateEndpointConnection` -- New field `ID` in struct `MHSMPrivateEndpointConnection` -- New field `Name` in struct `MHSMPrivateEndpointConnection` -- New field `ID` in struct `PrivateLinkResource` -- New field `Location` in struct `PrivateLinkResource` -- New field `Name` in struct `PrivateLinkResource` -- New field `Tags` in struct `PrivateLinkResource` -- New field `Type` in struct `PrivateLinkResource` -- New field `Name` in struct `ManagedHsm` -- New field `SystemData` in struct `ManagedHsm` -- New field `Type` in struct `ManagedHsm` -- New field `Location` in struct `ManagedHsm` -- New field `SKU` in struct `ManagedHsm` -- New field `Tags` in struct `ManagedHsm` -- New field `ID` in struct `ManagedHsm` - - -## 0.2.1 (2021-11-26) - -### Other Changes - -- Now use `github.com/Azure/azure-sdk-for-go/sdk/azidentity@v0.12.0` explicitly. - -## 0.2.0 (2021-10-29) +## 1.0.0 (2022-05-16) -### Breaking Changes +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. -- `arm.Connection` has been removed in `github.com/Azure/azure-sdk-for-go/sdk/azcore/v0.20.0` -- The parameters of `NewXXXClient` has been changed from `(con *arm.Connection, subscriptionID string)` to `(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions)` +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). -## 0.1.0 (2021-09-29) -- To better align with the Azure SDK guidelines (https://azure.github.io/azure-sdk/general_introduction.html), we have decided to change the module path to "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault". Therefore, we are deprecating the old module path (which is "github.com/Azure/azure-sdk-for-go/sdk/keyvault/armkeyvault") to avoid confusion. +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/README.md index ed0ac4504..11dbffa46 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/README.md @@ -11,7 +11,7 @@ The `armkeyvault` module provides operations for working with Azure Key Vault. ## Prerequisites - an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) ## Install the package @@ -33,12 +33,12 @@ cred, err := azidentity.NewDefaultAzureCredential(nil) For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). -## Clients +## Client Factory -Azure Key Vault modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. +Azure Key Vault module consists of one or more clients. We provide a client factory which could be used to create any client in this module. ```go -client, err := armkeyvault.NewKeysClient(, cred, nil) +clientFactory, err := armkeyvault.NewClientFactory(, cred, nil) ``` You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). @@ -49,7 +49,15 @@ options := arm.ClientOptions { Cloud: cloud.AzureChina, }, } -client, err := armkeyvault.NewKeysClient(, cred, &options) +clientFactory, err := armkeyvault.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewVaultsClient() ``` ## More sample code diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json new file mode 100644 index 000000000..9ae804c30 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/keyvault/armkeyvault", + "Tag": "go/resourcemanager/keyvault/armkeyvault_283c3f03b2" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md index a930f8d5a..4692f2f56 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md @@ -4,12 +4,12 @@ ``` yaml azure-arm: true -tag: package-2021-10 require: -- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/keyvault/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/keyvault/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/keyvault/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/keyvault/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.0.0 +module-version: 1.2.0 modelerfour: seal-single-value-enum-by-default: true +tag: package-2023-02 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go index 4e71bd3b4..c3da538ed 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go @@ -2,6 +2,6 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh.exe ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/keyvault/armkeyvault +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/keyvault/armkeyvault package armkeyvault diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go new file mode 100644 index 000000000..ff61f9101 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go @@ -0,0 +1,95 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armkeyvault + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + credential azcore.TokenCredential + options *arm.ClientOptions +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + _, err := arm.NewClient(moduleName+".ClientFactory", moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, credential: credential, + options: options.Clone(), + }, nil +} + +func (c *ClientFactory) NewKeysClient() *KeysClient { + subClient, _ := NewKeysClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewManagedHsmKeysClient() *ManagedHsmKeysClient { + subClient, _ := NewManagedHsmKeysClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewVaultsClient() *VaultsClient { + subClient, _ := NewVaultsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewManagedHsmsClient() *ManagedHsmsClient { + subClient, _ := NewManagedHsmsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewMHSMPrivateEndpointConnectionsClient() *MHSMPrivateEndpointConnectionsClient { + subClient, _ := NewMHSMPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewMHSMPrivateLinkResourcesClient() *MHSMPrivateLinkResourcesClient { + subClient, _ := NewMHSMPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewMHSMRegionsClient() *MHSMRegionsClient { + subClient, _ := NewMHSMRegionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewSecretsClient() *SecretsClient { + subClient, _ := NewSecretsClient(c.subscriptionID, c.credential, c.options) + return subClient +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_constants.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go index 7e995b84a..d6415ed56 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go @@ -5,12 +5,13 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault const ( moduleName = "armkeyvault" - moduleVersion = "v1.0.0" + moduleVersion = "v1.2.0" ) type AccessPolicyUpdateKind string @@ -44,6 +45,30 @@ func PossibleActionsRequiredValues() []ActionsRequired { } } +// ActivationStatus - Activation Status +type ActivationStatus string + +const ( + // ActivationStatusActive - The managed HSM Pool is active. + ActivationStatusActive ActivationStatus = "Active" + // ActivationStatusFailed - Failed to activate managed hsm. + ActivationStatusFailed ActivationStatus = "Failed" + // ActivationStatusNotActivated - The managed HSM Pool is not yet activated. + ActivationStatusNotActivated ActivationStatus = "NotActivated" + // ActivationStatusUnknown - An unknown error occurred while activating managed hsm. + ActivationStatusUnknown ActivationStatus = "Unknown" +) + +// PossibleActivationStatusValues returns the possible values for the ActivationStatus const type. +func PossibleActivationStatusValues() []ActivationStatus { + return []ActivationStatus{ + ActivationStatusActive, + ActivationStatusFailed, + ActivationStatusNotActivated, + ActivationStatusUnknown, + } +} + type CertificatePermissions string const ( @@ -127,6 +152,30 @@ func PossibleDeletionRecoveryLevelValues() []DeletionRecoveryLevel { } } +// GeoReplicationRegionProvisioningState - The current provisioning state. +type GeoReplicationRegionProvisioningState string + +const ( + GeoReplicationRegionProvisioningStateCleanup GeoReplicationRegionProvisioningState = "Cleanup" + GeoReplicationRegionProvisioningStateDeleting GeoReplicationRegionProvisioningState = "Deleting" + GeoReplicationRegionProvisioningStateFailed GeoReplicationRegionProvisioningState = "Failed" + GeoReplicationRegionProvisioningStatePreprovisioning GeoReplicationRegionProvisioningState = "Preprovisioning" + GeoReplicationRegionProvisioningStateProvisioning GeoReplicationRegionProvisioningState = "Provisioning" + GeoReplicationRegionProvisioningStateSucceeded GeoReplicationRegionProvisioningState = "Succeeded" +) + +// PossibleGeoReplicationRegionProvisioningStateValues returns the possible values for the GeoReplicationRegionProvisioningState const type. +func PossibleGeoReplicationRegionProvisioningStateValues() []GeoReplicationRegionProvisioningState { + return []GeoReplicationRegionProvisioningState{ + GeoReplicationRegionProvisioningStateCleanup, + GeoReplicationRegionProvisioningStateDeleting, + GeoReplicationRegionProvisioningStateFailed, + GeoReplicationRegionProvisioningStatePreprovisioning, + GeoReplicationRegionProvisioningStateProvisioning, + GeoReplicationRegionProvisioningStateSucceeded, + } +} + // IdentityType - The type of identity. type IdentityType string @@ -174,6 +223,7 @@ const ( JSONWebKeyOperationDecrypt JSONWebKeyOperation = "decrypt" JSONWebKeyOperationEncrypt JSONWebKeyOperation = "encrypt" JSONWebKeyOperationImport JSONWebKeyOperation = "import" + JSONWebKeyOperationRelease JSONWebKeyOperation = "release" JSONWebKeyOperationSign JSONWebKeyOperation = "sign" JSONWebKeyOperationUnwrapKey JSONWebKeyOperation = "unwrapKey" JSONWebKeyOperationVerify JSONWebKeyOperation = "verify" @@ -186,6 +236,7 @@ func PossibleJSONWebKeyOperationValues() []JSONWebKeyOperation { JSONWebKeyOperationDecrypt, JSONWebKeyOperationEncrypt, JSONWebKeyOperationImport, + JSONWebKeyOperationRelease, JSONWebKeyOperationSign, JSONWebKeyOperationUnwrapKey, JSONWebKeyOperationVerify, @@ -216,23 +267,27 @@ func PossibleJSONWebKeyTypeValues() []JSONWebKeyType { type KeyPermissions string const ( - KeyPermissionsAll KeyPermissions = "all" - KeyPermissionsBackup KeyPermissions = "backup" - KeyPermissionsCreate KeyPermissions = "create" - KeyPermissionsDecrypt KeyPermissions = "decrypt" - KeyPermissionsDelete KeyPermissions = "delete" - KeyPermissionsEncrypt KeyPermissions = "encrypt" - KeyPermissionsGet KeyPermissions = "get" - KeyPermissionsImport KeyPermissions = "import" - KeyPermissionsList KeyPermissions = "list" - KeyPermissionsPurge KeyPermissions = "purge" - KeyPermissionsRecover KeyPermissions = "recover" - KeyPermissionsRestore KeyPermissions = "restore" - KeyPermissionsSign KeyPermissions = "sign" - KeyPermissionsUnwrapKey KeyPermissions = "unwrapKey" - KeyPermissionsUpdate KeyPermissions = "update" - KeyPermissionsVerify KeyPermissions = "verify" - KeyPermissionsWrapKey KeyPermissions = "wrapKey" + KeyPermissionsAll KeyPermissions = "all" + KeyPermissionsBackup KeyPermissions = "backup" + KeyPermissionsCreate KeyPermissions = "create" + KeyPermissionsDecrypt KeyPermissions = "decrypt" + KeyPermissionsDelete KeyPermissions = "delete" + KeyPermissionsEncrypt KeyPermissions = "encrypt" + KeyPermissionsGet KeyPermissions = "get" + KeyPermissionsGetrotationpolicy KeyPermissions = "getrotationpolicy" + KeyPermissionsImport KeyPermissions = "import" + KeyPermissionsList KeyPermissions = "list" + KeyPermissionsPurge KeyPermissions = "purge" + KeyPermissionsRecover KeyPermissions = "recover" + KeyPermissionsRelease KeyPermissions = "release" + KeyPermissionsRestore KeyPermissions = "restore" + KeyPermissionsRotate KeyPermissions = "rotate" + KeyPermissionsSetrotationpolicy KeyPermissions = "setrotationpolicy" + KeyPermissionsSign KeyPermissions = "sign" + KeyPermissionsUnwrapKey KeyPermissions = "unwrapKey" + KeyPermissionsUpdate KeyPermissions = "update" + KeyPermissionsVerify KeyPermissions = "verify" + KeyPermissionsWrapKey KeyPermissions = "wrapKey" ) // PossibleKeyPermissionsValues returns the possible values for the KeyPermissions const type. @@ -245,11 +300,15 @@ func PossibleKeyPermissionsValues() []KeyPermissions { KeyPermissionsDelete, KeyPermissionsEncrypt, KeyPermissionsGet, + KeyPermissionsGetrotationpolicy, KeyPermissionsImport, KeyPermissionsList, KeyPermissionsPurge, KeyPermissionsRecover, + KeyPermissionsRelease, KeyPermissionsRestore, + KeyPermissionsRotate, + KeyPermissionsSetrotationpolicy, KeyPermissionsSign, KeyPermissionsUnwrapKey, KeyPermissionsUpdate, @@ -258,6 +317,22 @@ func PossibleKeyPermissionsValues() []KeyPermissions { } } +// KeyRotationPolicyActionType - The type of action. +type KeyRotationPolicyActionType string + +const ( + KeyRotationPolicyActionTypeRotate KeyRotationPolicyActionType = "rotate" + KeyRotationPolicyActionTypeNotify KeyRotationPolicyActionType = "notify" +) + +// PossibleKeyRotationPolicyActionTypeValues returns the possible values for the KeyRotationPolicyActionType const type. +func PossibleKeyRotationPolicyActionTypeValues() []KeyRotationPolicyActionType { + return []KeyRotationPolicyActionType{ + KeyRotationPolicyActionTypeRotate, + KeyRotationPolicyActionTypeNotify, + } +} + // ManagedHsmSKUFamily - SKU Family of the managed HSM Pool type ManagedHsmSKUFamily string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_keys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_keys_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go index f9f68548b..bd55b5b7c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_keys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -25,32 +24,23 @@ import ( // KeysClient contains the methods for the Keys group. // Don't use this type directly, use NewKeysClient() instead. type KeysClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewKeysClient creates a new instance of KeysClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KeysClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".KeysClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &KeysClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } @@ -59,18 +49,21 @@ func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, opt // key is returned without any write operations being performed. This API does not create subsequent // versions, and does not update existing keys. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group which contains the specified key vault. -// vaultName - The name of the key vault which contains the key to be created. -// keyName - The name of the key to be created. -// parameters - The parameters used to create the specified key. -// options - KeysClientCreateIfNotExistOptions contains the optional parameters for the KeysClient.CreateIfNotExist method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group which contains the specified key vault. +// - vaultName - The name of the key vault which contains the key to be created. +// - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the +// service. The value provided should not include personally identifiable or sensitive +// information. +// - parameters - The parameters used to create the specified key. +// - options - KeysClientCreateIfNotExistOptions contains the optional parameters for the KeysClient.CreateIfNotExist method. func (client *KeysClient) CreateIfNotExist(ctx context.Context, resourceGroupName string, vaultName string, keyName string, parameters KeyCreateParameters, options *KeysClientCreateIfNotExistOptions) (KeysClientCreateIfNotExistResponse, error) { req, err := client.createIfNotExistCreateRequest(ctx, resourceGroupName, vaultName, keyName, parameters, options) if err != nil { return KeysClientCreateIfNotExistResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientCreateIfNotExistResponse{}, err } @@ -99,12 +92,12 @@ func (client *KeysClient) createIfNotExistCreateRequest(ctx context.Context, res return nil, errors.New("parameter keyName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -121,17 +114,18 @@ func (client *KeysClient) createIfNotExistHandleResponse(resp *http.Response) (K // Get - Gets the current version of the specified key from the specified key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group which contains the specified key vault. -// vaultName - The name of the vault which contains the key to be retrieved. -// keyName - The name of the key to be retrieved. -// options - KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group which contains the specified key vault. +// - vaultName - The name of the vault which contains the key to be retrieved. +// - keyName - The name of the key to be retrieved. +// - options - KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. func (client *KeysClient) Get(ctx context.Context, resourceGroupName string, vaultName string, keyName string, options *KeysClientGetOptions) (KeysClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, keyName, options) if err != nil { return KeysClientGetResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientGetResponse{}, err } @@ -160,12 +154,12 @@ func (client *KeysClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, errors.New("parameter keyName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,18 +176,19 @@ func (client *KeysClient) getHandleResponse(resp *http.Response) (KeysClientGetR // GetVersion - Gets the specified version of the specified key in the specified key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group which contains the specified key vault. -// vaultName - The name of the vault which contains the key version to be retrieved. -// keyName - The name of the key version to be retrieved. -// keyVersion - The version of the key to be retrieved. -// options - KeysClientGetVersionOptions contains the optional parameters for the KeysClient.GetVersion method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group which contains the specified key vault. +// - vaultName - The name of the vault which contains the key version to be retrieved. +// - keyName - The name of the key version to be retrieved. +// - keyVersion - The version of the key to be retrieved. +// - options - KeysClientGetVersionOptions contains the optional parameters for the KeysClient.GetVersion method. func (client *KeysClient) GetVersion(ctx context.Context, resourceGroupName string, vaultName string, keyName string, keyVersion string, options *KeysClientGetVersionOptions) (KeysClientGetVersionResponse, error) { req, err := client.getVersionCreateRequest(ctx, resourceGroupName, vaultName, keyName, keyVersion, options) if err != nil { return KeysClientGetVersionResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientGetVersionResponse{}, err } @@ -226,12 +221,12 @@ func (client *KeysClient) getVersionCreateRequest(ctx context.Context, resourceG return nil, errors.New("parameter keyVersion cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{keyVersion}", url.PathEscape(keyVersion)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,11 +242,11 @@ func (client *KeysClient) getVersionHandleResponse(resp *http.Response) (KeysCli } // NewListPager - Lists the keys in the specified key vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group which contains the specified key vault. -// vaultName - The name of the vault which contains the keys to be retrieved. -// options - KeysClientListOptions contains the optional parameters for the KeysClient.List method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group which contains the specified key vault. +// - vaultName - The name of the vault which contains the keys to be retrieved. +// - options - KeysClientListOptions contains the optional parameters for the KeysClient.NewListPager method. func (client *KeysClient) NewListPager(resourceGroupName string, vaultName string, options *KeysClientListOptions) *runtime.Pager[KeysClientListResponse] { return runtime.NewPager(runtime.PagingHandler[KeysClientListResponse]{ More: func(page KeysClientListResponse) bool { @@ -268,7 +263,7 @@ func (client *KeysClient) NewListPager(resourceGroupName string, vaultName strin if err != nil { return KeysClientListResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientListResponse{}, err } @@ -295,12 +290,12 @@ func (client *KeysClient) listCreateRequest(ctx context.Context, resourceGroupNa return nil, errors.New("parameter vaultName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -316,12 +311,12 @@ func (client *KeysClient) listHandleResponse(resp *http.Response) (KeysClientLis } // NewListVersionsPager - Lists the versions of the specified key in the specified key vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group which contains the specified key vault. -// vaultName - The name of the vault which contains the key versions to be retrieved. -// keyName - The name of the key versions to be retrieved. -// options - KeysClientListVersionsOptions contains the optional parameters for the KeysClient.ListVersions method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group which contains the specified key vault. +// - vaultName - The name of the vault which contains the key versions to be retrieved. +// - keyName - The name of the key versions to be retrieved. +// - options - KeysClientListVersionsOptions contains the optional parameters for the KeysClient.NewListVersionsPager method. func (client *KeysClient) NewListVersionsPager(resourceGroupName string, vaultName string, keyName string, options *KeysClientListVersionsOptions) *runtime.Pager[KeysClientListVersionsResponse] { return runtime.NewPager(runtime.PagingHandler[KeysClientListVersionsResponse]{ More: func(page KeysClientListVersionsResponse) bool { @@ -338,7 +333,7 @@ func (client *KeysClient) NewListVersionsPager(resourceGroupName string, vaultNa if err != nil { return KeysClientListVersionsResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientListVersionsResponse{}, err } @@ -369,12 +364,12 @@ func (client *KeysClient) listVersionsCreateRequest(ctx context.Context, resourc return nil, errors.New("parameter keyName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go new file mode 100644 index 000000000..3288eefd3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go @@ -0,0 +1,394 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armkeyvault + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedHsmKeysClient contains the methods for the ManagedHsmKeys group. +// Don't use this type directly, use NewManagedHsmKeysClient() instead. +type ManagedHsmKeysClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedHsmKeysClient creates a new instance of ManagedHsmKeysClient with the specified values. +// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedHsmKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedHsmKeysClient, error) { + cl, err := arm.NewClient(moduleName+".ManagedHsmKeysClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedHsmKeysClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateIfNotExist - Creates the first version of a new key if it does not exist. If it already exists, then the existing +// key is returned without any write operations being performed. This API does not create subsequent +// versions, and does not update existing keys. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - name - The name of the Managed HSM Pool within the specified resource group. +// - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the +// service. The value provided should not include personally identifiable or sensitive +// information. +// - parameters - The parameters used to create the specified key. +// - options - ManagedHsmKeysClientCreateIfNotExistOptions contains the optional parameters for the ManagedHsmKeysClient.CreateIfNotExist +// method. +func (client *ManagedHsmKeysClient) CreateIfNotExist(ctx context.Context, resourceGroupName string, name string, keyName string, parameters ManagedHsmKeyCreateParameters, options *ManagedHsmKeysClientCreateIfNotExistOptions) (ManagedHsmKeysClientCreateIfNotExistResponse, error) { + req, err := client.createIfNotExistCreateRequest(ctx, resourceGroupName, name, keyName, parameters, options) + if err != nil { + return ManagedHsmKeysClientCreateIfNotExistResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedHsmKeysClientCreateIfNotExistResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedHsmKeysClientCreateIfNotExistResponse{}, runtime.NewResponseError(resp) + } + return client.createIfNotExistHandleResponse(resp) +} + +// createIfNotExistCreateRequest creates the CreateIfNotExist request. +func (client *ManagedHsmKeysClient) createIfNotExistCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, parameters ManagedHsmKeyCreateParameters, options *ManagedHsmKeysClientCreateIfNotExistOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, parameters) +} + +// createIfNotExistHandleResponse handles the CreateIfNotExist response. +func (client *ManagedHsmKeysClient) createIfNotExistHandleResponse(resp *http.Response) (ManagedHsmKeysClientCreateIfNotExistResponse, error) { + result := ManagedHsmKeysClientCreateIfNotExistResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedHsmKey); err != nil { + return ManagedHsmKeysClientCreateIfNotExistResponse{}, err + } + return result, nil +} + +// Get - Gets the current version of the specified key from the specified managed HSM. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - name - The name of the Managed HSM Pool within the specified resource group. +// - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the +// service. The value provided should not include personally identifiable or sensitive +// information. +// - options - ManagedHsmKeysClientGetOptions contains the optional parameters for the ManagedHsmKeysClient.Get method. +func (client *ManagedHsmKeysClient) Get(ctx context.Context, resourceGroupName string, name string, keyName string, options *ManagedHsmKeysClientGetOptions) (ManagedHsmKeysClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, name, keyName, options) + if err != nil { + return ManagedHsmKeysClientGetResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedHsmKeysClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedHsmKeysClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *ManagedHsmKeysClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, options *ManagedHsmKeysClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedHsmKeysClient) getHandleResponse(resp *http.Response) (ManagedHsmKeysClientGetResponse, error) { + result := ManagedHsmKeysClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedHsmKey); err != nil { + return ManagedHsmKeysClientGetResponse{}, err + } + return result, nil +} + +// GetVersion - Gets the specified version of the specified key in the specified managed HSM. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - name - The name of the Managed HSM Pool within the specified resource group. +// - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the +// service. The value provided should not include personally identifiable or sensitive +// information. +// - keyVersion - The version of the key to be retrieved. +// - options - ManagedHsmKeysClientGetVersionOptions contains the optional parameters for the ManagedHsmKeysClient.GetVersion +// method. +func (client *ManagedHsmKeysClient) GetVersion(ctx context.Context, resourceGroupName string, name string, keyName string, keyVersion string, options *ManagedHsmKeysClientGetVersionOptions) (ManagedHsmKeysClientGetVersionResponse, error) { + req, err := client.getVersionCreateRequest(ctx, resourceGroupName, name, keyName, keyVersion, options) + if err != nil { + return ManagedHsmKeysClientGetVersionResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedHsmKeysClientGetVersionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedHsmKeysClientGetVersionResponse{}, runtime.NewResponseError(resp) + } + return client.getVersionHandleResponse(resp) +} + +// getVersionCreateRequest creates the GetVersion request. +func (client *ManagedHsmKeysClient) getVersionCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, keyVersion string, options *ManagedHsmKeysClientGetVersionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}/versions/{keyVersion}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if keyVersion == "" { + return nil, errors.New("parameter keyVersion cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyVersion}", url.PathEscape(keyVersion)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVersionHandleResponse handles the GetVersion response. +func (client *ManagedHsmKeysClient) getVersionHandleResponse(resp *http.Response) (ManagedHsmKeysClientGetVersionResponse, error) { + result := ManagedHsmKeysClientGetVersionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedHsmKey); err != nil { + return ManagedHsmKeysClientGetVersionResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the keys in the specified managed HSM. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - name - The name of the Managed HSM Pool within the specified resource group. +// - options - ManagedHsmKeysClientListOptions contains the optional parameters for the ManagedHsmKeysClient.NewListPager method. +func (client *ManagedHsmKeysClient) NewListPager(resourceGroupName string, name string, options *ManagedHsmKeysClientListOptions) *runtime.Pager[ManagedHsmKeysClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedHsmKeysClientListResponse]{ + More: func(page ManagedHsmKeysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedHsmKeysClientListResponse) (ManagedHsmKeysClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, name, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ManagedHsmKeysClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedHsmKeysClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedHsmKeysClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *ManagedHsmKeysClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmKeysClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ManagedHsmKeysClient) listHandleResponse(resp *http.Response) (ManagedHsmKeysClientListResponse, error) { + result := ManagedHsmKeysClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedHsmKeyListResult); err != nil { + return ManagedHsmKeysClientListResponse{}, err + } + return result, nil +} + +// NewListVersionsPager - Lists the versions of the specified key in the specified managed HSM. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - name - The name of the Managed HSM Pool within the specified resource group. +// - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the +// service. The value provided should not include personally identifiable or sensitive +// information. +// - options - ManagedHsmKeysClientListVersionsOptions contains the optional parameters for the ManagedHsmKeysClient.NewListVersionsPager +// method. +func (client *ManagedHsmKeysClient) NewListVersionsPager(resourceGroupName string, name string, keyName string, options *ManagedHsmKeysClientListVersionsOptions) *runtime.Pager[ManagedHsmKeysClientListVersionsResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedHsmKeysClientListVersionsResponse]{ + More: func(page ManagedHsmKeysClientListVersionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedHsmKeysClientListVersionsResponse) (ManagedHsmKeysClientListVersionsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listVersionsCreateRequest(ctx, resourceGroupName, name, keyName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ManagedHsmKeysClientListVersionsResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedHsmKeysClientListVersionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedHsmKeysClientListVersionsResponse{}, runtime.NewResponseError(resp) + } + return client.listVersionsHandleResponse(resp) + }, + }) +} + +// listVersionsCreateRequest creates the ListVersions request. +func (client *ManagedHsmKeysClient) listVersionsCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, options *ManagedHsmKeysClientListVersionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listVersionsHandleResponse handles the ListVersions response. +func (client *ManagedHsmKeysClient) listVersionsHandleResponse(resp *http.Response) (ManagedHsmKeysClientListVersionsResponse, error) { + result := ManagedHsmKeysClientListVersionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedHsmKeyListResult); err != nil { + return ManagedHsmKeysClientListVersionsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_managedhsms_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_managedhsms_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go index 46eaa4b4e..21d87f4e5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_managedhsms_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -26,65 +25,107 @@ import ( // ManagedHsmsClient contains the methods for the ManagedHsms group. // Don't use this type directly, use NewManagedHsmsClient() instead. type ManagedHsmsClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewManagedHsmsClient creates a new instance of ManagedHsmsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewManagedHsmsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedHsmsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".ManagedHsmsClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &ManagedHsmsClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } +// CheckMhsmNameAvailability - Checks that the managed hsm name is valid and is not already in use. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01 +// - mhsmName - The name of the managed hsm. +// - options - ManagedHsmsClientCheckMhsmNameAvailabilityOptions contains the optional parameters for the ManagedHsmsClient.CheckMhsmNameAvailability +// method. +func (client *ManagedHsmsClient) CheckMhsmNameAvailability(ctx context.Context, mhsmName CheckMhsmNameAvailabilityParameters, options *ManagedHsmsClientCheckMhsmNameAvailabilityOptions) (ManagedHsmsClientCheckMhsmNameAvailabilityResponse, error) { + req, err := client.checkMhsmNameAvailabilityCreateRequest(ctx, mhsmName, options) + if err != nil { + return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, runtime.NewResponseError(resp) + } + return client.checkMhsmNameAvailabilityHandleResponse(resp) +} + +// checkMhsmNameAvailabilityCreateRequest creates the CheckMhsmNameAvailability request. +func (client *ManagedHsmsClient) checkMhsmNameAvailabilityCreateRequest(ctx context.Context, mhsmName CheckMhsmNameAvailabilityParameters, options *ManagedHsmsClientCheckMhsmNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkMhsmNameAvailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, mhsmName) +} + +// checkMhsmNameAvailabilityHandleResponse handles the CheckMhsmNameAvailability response. +func (client *ManagedHsmsClient) checkMhsmNameAvailabilityHandleResponse(resp *http.Response) (ManagedHsmsClientCheckMhsmNameAvailabilityResponse, error) { + result := ManagedHsmsClientCheckMhsmNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckMhsmNameAvailabilityResult); err != nil { + return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, err + } + return result, nil +} + // BeginCreateOrUpdate - Create or update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// parameters - Parameters to create or update the managed HSM Pool -// options - ManagedHsmsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - parameters - Parameters to create or update the managed HSM Pool +// - options - ManagedHsmsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginCreateOrUpdate +// method. func (client *ManagedHsmsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedHsmsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[ManagedHsmsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[ManagedHsmsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ManagedHsmsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // CreateOrUpdate - Create or update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *ManagedHsmsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -109,12 +150,12 @@ func (client *ManagedHsmsClient) createOrUpdateCreateRequest(ctx context.Context return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -122,31 +163,33 @@ func (client *ManagedHsmsClient) createOrUpdateCreateRequest(ctx context.Context // BeginDelete - Deletes the specified managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - The name of the managed HSM Pool to delete -// options - ManagedHsmsClientBeginDeleteOptions contains the optional parameters for the ManagedHsmsClient.BeginDelete method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - The name of the managed HSM Pool to delete +// - options - ManagedHsmsClientBeginDeleteOptions contains the optional parameters for the ManagedHsmsClient.BeginDelete method. func (client *ManagedHsmsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmsClientBeginDeleteOptions) (*runtime.Poller[ManagedHsmsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[ManagedHsmsClientDeleteResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[ManagedHsmsClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ManagedHsmsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // Delete - Deletes the specified managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *ManagedHsmsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -171,12 +214,12 @@ func (client *ManagedHsmsClient) deleteCreateRequest(ctx context.Context, resour return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -184,20 +227,21 @@ func (client *ManagedHsmsClient) deleteCreateRequest(ctx context.Context, resour // Get - Gets the specified managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - The name of the managed HSM Pool. -// options - ManagedHsmsClientGetOptions contains the optional parameters for the ManagedHsmsClient.Get method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - The name of the managed HSM Pool. +// - options - ManagedHsmsClientGetOptions contains the optional parameters for the ManagedHsmsClient.Get method. func (client *ManagedHsmsClient) Get(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmsClientGetOptions) (ManagedHsmsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return ManagedHsmsClientGetResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { return ManagedHsmsClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) @@ -218,12 +262,12 @@ func (client *ManagedHsmsClient) getCreateRequest(ctx context.Context, resourceG return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -240,16 +284,17 @@ func (client *ManagedHsmsClient) getHandleResponse(resp *http.Response) (Managed // GetDeleted - Gets the specified deleted managed HSM. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// name - The name of the deleted managed HSM. -// location - The location of the deleted managed HSM. -// options - ManagedHsmsClientGetDeletedOptions contains the optional parameters for the ManagedHsmsClient.GetDeleted method. +// +// Generated from API version 2023-02-01 +// - name - The name of the deleted managed HSM. +// - location - The location of the deleted managed HSM. +// - options - ManagedHsmsClientGetDeletedOptions contains the optional parameters for the ManagedHsmsClient.GetDeleted method. func (client *ManagedHsmsClient) GetDeleted(ctx context.Context, name string, location string, options *ManagedHsmsClientGetDeletedOptions) (ManagedHsmsClientGetDeletedResponse, error) { req, err := client.getDeletedCreateRequest(ctx, name, location, options) if err != nil { return ManagedHsmsClientGetDeletedResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientGetDeletedResponse{}, err } @@ -274,12 +319,12 @@ func (client *ManagedHsmsClient) getDeletedCreateRequest(ctx context.Context, na return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -296,11 +341,11 @@ func (client *ManagedHsmsClient) getDeletedHandleResponse(resp *http.Response) ( // NewListByResourceGroupPager - The List operation gets information about the managed HSM Pools associated with the subscription // and within the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// options - ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.ListByResourceGroup -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - options - ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.NewListByResourceGroupPager +// method. func (client *ManagedHsmsClient) NewListByResourceGroupPager(resourceGroupName string, options *ManagedHsmsClientListByResourceGroupOptions) *runtime.Pager[ManagedHsmsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[ManagedHsmsClientListByResourceGroupResponse]{ More: func(page ManagedHsmsClientListByResourceGroupResponse) bool { @@ -317,7 +362,7 @@ func (client *ManagedHsmsClient) NewListByResourceGroupPager(resourceGroupName s if err != nil { return ManagedHsmsClientListByResourceGroupResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientListByResourceGroupResponse{}, err } @@ -340,7 +385,7 @@ func (client *ManagedHsmsClient) listByResourceGroupCreateRequest(ctx context.Co return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -348,7 +393,7 @@ func (client *ManagedHsmsClient) listByResourceGroupCreateRequest(ctx context.Co if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -364,10 +409,10 @@ func (client *ManagedHsmsClient) listByResourceGroupHandleResponse(resp *http.Re } // NewListBySubscriptionPager - The List operation gets information about the managed HSM Pools associated with the subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.ListBySubscription -// method. +// +// Generated from API version 2023-02-01 +// - options - ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.NewListBySubscriptionPager +// method. func (client *ManagedHsmsClient) NewListBySubscriptionPager(options *ManagedHsmsClientListBySubscriptionOptions) *runtime.Pager[ManagedHsmsClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[ManagedHsmsClientListBySubscriptionResponse]{ More: func(page ManagedHsmsClientListBySubscriptionResponse) bool { @@ -384,7 +429,7 @@ func (client *ManagedHsmsClient) NewListBySubscriptionPager(options *ManagedHsms if err != nil { return ManagedHsmsClientListBySubscriptionResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientListBySubscriptionResponse{}, err } @@ -403,7 +448,7 @@ func (client *ManagedHsmsClient) listBySubscriptionCreateRequest(ctx context.Con return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -411,7 +456,7 @@ func (client *ManagedHsmsClient) listBySubscriptionCreateRequest(ctx context.Con if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -427,9 +472,10 @@ func (client *ManagedHsmsClient) listBySubscriptionHandleResponse(resp *http.Res } // NewListDeletedPager - The List operation gets information about the deleted managed HSMs associated with the subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.ListDeleted method. +// +// Generated from API version 2023-02-01 +// - options - ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.NewListDeletedPager +// method. func (client *ManagedHsmsClient) NewListDeletedPager(options *ManagedHsmsClientListDeletedOptions) *runtime.Pager[ManagedHsmsClientListDeletedResponse] { return runtime.NewPager(runtime.PagingHandler[ManagedHsmsClientListDeletedResponse]{ More: func(page ManagedHsmsClientListDeletedResponse) bool { @@ -446,7 +492,7 @@ func (client *ManagedHsmsClient) NewListDeletedPager(options *ManagedHsmsClientL if err != nil { return ManagedHsmsClientListDeletedResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientListDeletedResponse{}, err } @@ -465,12 +511,12 @@ func (client *ManagedHsmsClient) listDeletedCreateRequest(ctx context.Context, o return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -487,32 +533,34 @@ func (client *ManagedHsmsClient) listDeletedHandleResponse(resp *http.Response) // BeginPurgeDeleted - Permanently deletes the specified managed HSM. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// name - The name of the soft-deleted managed HSM. -// location - The location of the soft-deleted managed HSM. -// options - ManagedHsmsClientBeginPurgeDeletedOptions contains the optional parameters for the ManagedHsmsClient.BeginPurgeDeleted -// method. +// +// Generated from API version 2023-02-01 +// - name - The name of the soft-deleted managed HSM. +// - location - The location of the soft-deleted managed HSM. +// - options - ManagedHsmsClientBeginPurgeDeletedOptions contains the optional parameters for the ManagedHsmsClient.BeginPurgeDeleted +// method. func (client *ManagedHsmsClient) BeginPurgeDeleted(ctx context.Context, name string, location string, options *ManagedHsmsClientBeginPurgeDeletedOptions) (*runtime.Poller[ManagedHsmsClientPurgeDeletedResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.purgeDeleted(ctx, name, location, options) if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientPurgeDeletedResponse](resp, client.pl, nil) + return runtime.NewPoller[ManagedHsmsClientPurgeDeletedResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[ManagedHsmsClientPurgeDeletedResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ManagedHsmsClientPurgeDeletedResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // PurgeDeleted - Permanently deletes the specified managed HSM. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *ManagedHsmsClient) purgeDeleted(ctx context.Context, name string, location string, options *ManagedHsmsClientBeginPurgeDeletedOptions) (*http.Response, error) { req, err := client.purgeDeletedCreateRequest(ctx, name, location, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -537,12 +585,12 @@ func (client *ManagedHsmsClient) purgeDeletedCreateRequest(ctx context.Context, return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -550,32 +598,34 @@ func (client *ManagedHsmsClient) purgeDeletedCreateRequest(ctx context.Context, // BeginUpdate - Update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// parameters - Parameters to patch the managed HSM Pool -// options - ManagedHsmsClientBeginUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginUpdate method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - parameters - Parameters to patch the managed HSM Pool +// - options - ManagedHsmsClientBeginUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginUpdate method. func (client *ManagedHsmsClient) BeginUpdate(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginUpdateOptions) (*runtime.Poller[ManagedHsmsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[ManagedHsmsClientUpdateResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[ManagedHsmsClientUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ManagedHsmsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // Update - Update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *ManagedHsmsClient) update(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -600,12 +650,12 @@ func (client *ManagedHsmsClient) updateCreateRequest(ctx context.Context, resour return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_mhsmprivateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_mhsmprivateendpointconnections_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go index e7ab85843..b8b66a494 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_mhsmprivateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -26,65 +25,58 @@ import ( // MHSMPrivateEndpointConnectionsClient contains the methods for the MHSMPrivateEndpointConnections group. // Don't use this type directly, use NewMHSMPrivateEndpointConnectionsClient() instead. type MHSMPrivateEndpointConnectionsClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewMHSMPrivateEndpointConnectionsClient creates a new instance of MHSMPrivateEndpointConnectionsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewMHSMPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MHSMPrivateEndpointConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".MHSMPrivateEndpointConnectionsClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &MHSMPrivateEndpointConnectionsClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } // BeginDelete - Deletes the specified private endpoint connection associated with the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. -// options - MHSMPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.BeginDelete -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. +// - options - MHSMPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.BeginDelete +// method. func (client *MHSMPrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *MHSMPrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[MHSMPrivateEndpointConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return nil, err } - return runtime.NewPoller[MHSMPrivateEndpointConnectionsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[MHSMPrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[MHSMPrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[MHSMPrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // Delete - Deletes the specified private endpoint connection associated with the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *MHSMPrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *MHSMPrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -113,12 +105,12 @@ func (client *MHSMPrivateEndpointConnectionsClient) deleteCreateRequest(ctx cont return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -126,18 +118,19 @@ func (client *MHSMPrivateEndpointConnectionsClient) deleteCreateRequest(ctx cont // Get - Gets the specified private endpoint connection associated with the managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. -// options - MHSMPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Get -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. +// - options - MHSMPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Get +// method. func (client *MHSMPrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *MHSMPrivateEndpointConnectionsClientGetOptions) (MHSMPrivateEndpointConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return MHSMPrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateEndpointConnectionsClientGetResponse{}, err } @@ -166,12 +159,12 @@ func (client *MHSMPrivateEndpointConnectionsClient) getCreateRequest(ctx context return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,12 +181,12 @@ func (client *MHSMPrivateEndpointConnectionsClient) getHandleResponse(resp *http // NewListByResourcePager - The List operation gets information about the private endpoint connections associated with the // managed HSM Pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// options - MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.ListByResource -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - options - MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.NewListByResourcePager +// method. func (client *MHSMPrivateEndpointConnectionsClient) NewListByResourcePager(resourceGroupName string, name string, options *MHSMPrivateEndpointConnectionsClientListByResourceOptions) *runtime.Pager[MHSMPrivateEndpointConnectionsClientListByResourceResponse] { return runtime.NewPager(runtime.PagingHandler[MHSMPrivateEndpointConnectionsClientListByResourceResponse]{ More: func(page MHSMPrivateEndpointConnectionsClientListByResourceResponse) bool { @@ -210,7 +203,7 @@ func (client *MHSMPrivateEndpointConnectionsClient) NewListByResourcePager(resou if err != nil { return MHSMPrivateEndpointConnectionsClientListByResourceResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateEndpointConnectionsClientListByResourceResponse{}, err } @@ -237,12 +230,12 @@ func (client *MHSMPrivateEndpointConnectionsClient) listByResourceCreateRequest( return nil, errors.New("parameter name cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,19 +252,20 @@ func (client *MHSMPrivateEndpointConnectionsClient) listByResourceHandleResponse // Put - Updates the specified private endpoint connection associated with the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. -// properties - The intended state of private endpoint connection. -// options - MHSMPrivateEndpointConnectionsClientPutOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Put -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. +// - properties - The intended state of private endpoint connection. +// - options - MHSMPrivateEndpointConnectionsClientPutOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Put +// method. func (client *MHSMPrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, properties MHSMPrivateEndpointConnection, options *MHSMPrivateEndpointConnectionsClientPutOptions) (MHSMPrivateEndpointConnectionsClientPutResponse, error) { req, err := client.putCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, properties, options) if err != nil { return MHSMPrivateEndpointConnectionsClientPutResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateEndpointConnectionsClientPutResponse{}, err } @@ -300,12 +294,12 @@ func (client *MHSMPrivateEndpointConnectionsClient) putCreateRequest(ctx context return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, properties) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_mhsmprivatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_mhsmprivatelinkresources_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go index e6579929a..4bff50b0f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_mhsmprivatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -25,49 +24,41 @@ import ( // MHSMPrivateLinkResourcesClient contains the methods for the MHSMPrivateLinkResources group. // Don't use this type directly, use NewMHSMPrivateLinkResourcesClient() instead. type MHSMPrivateLinkResourcesClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewMHSMPrivateLinkResourcesClient creates a new instance of MHSMPrivateLinkResourcesClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewMHSMPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MHSMPrivateLinkResourcesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".MHSMPrivateLinkResourcesClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &MHSMPrivateLinkResourcesClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } // ListByMHSMResource - Gets the private link resources supported for the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// options - MHSMPrivateLinkResourcesClientListByMHSMResourceOptions contains the optional parameters for the MHSMPrivateLinkResourcesClient.ListByMHSMResource -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - options - MHSMPrivateLinkResourcesClientListByMHSMResourceOptions contains the optional parameters for the MHSMPrivateLinkResourcesClient.ListByMHSMResource +// method. func (client *MHSMPrivateLinkResourcesClient) ListByMHSMResource(ctx context.Context, resourceGroupName string, name string, options *MHSMPrivateLinkResourcesClientListByMHSMResourceOptions) (MHSMPrivateLinkResourcesClientListByMHSMResourceResponse, error) { req, err := client.listByMHSMResourceCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return MHSMPrivateLinkResourcesClientListByMHSMResourceResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateLinkResourcesClientListByMHSMResourceResponse{}, err } @@ -92,12 +83,12 @@ func (client *MHSMPrivateLinkResourcesClient) listByMHSMResourceCreateRequest(ct return nil, errors.New("parameter name cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go new file mode 100644 index 000000000..64692ec10 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go @@ -0,0 +1,116 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armkeyvault + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// MHSMRegionsClient contains the methods for the MHSMRegions group. +// Don't use this type directly, use NewMHSMRegionsClient() instead. +type MHSMRegionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewMHSMRegionsClient creates a new instance of MHSMRegionsClient with the specified values. +// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewMHSMRegionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MHSMRegionsClient, error) { + cl, err := arm.NewClient(moduleName+".MHSMRegionsClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &MHSMRegionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByResourcePager - The List operation gets information about the regions associated with the managed HSM Pool. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - options - MHSMRegionsClientListByResourceOptions contains the optional parameters for the MHSMRegionsClient.NewListByResourcePager +// method. +func (client *MHSMRegionsClient) NewListByResourcePager(resourceGroupName string, name string, options *MHSMRegionsClientListByResourceOptions) *runtime.Pager[MHSMRegionsClientListByResourceResponse] { + return runtime.NewPager(runtime.PagingHandler[MHSMRegionsClientListByResourceResponse]{ + More: func(page MHSMRegionsClientListByResourceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *MHSMRegionsClientListByResourceResponse) (MHSMRegionsClientListByResourceResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceCreateRequest(ctx, resourceGroupName, name, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return MHSMRegionsClientListByResourceResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MHSMRegionsClientListByResourceResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return MHSMRegionsClientListByResourceResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceHandleResponse(resp) + }, + }) +} + +// listByResourceCreateRequest creates the ListByResource request. +func (client *MHSMRegionsClient) listByResourceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *MHSMRegionsClientListByResourceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/regions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceHandleResponse handles the ListByResource response. +func (client *MHSMRegionsClient) listByResourceHandleResponse(resp *http.Response) (MHSMRegionsClientListByResourceResponse, error) { + result := MHSMRegionsClientListByResourceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MHSMRegionsListResult); err != nil { + return MHSMRegionsClientListByResourceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go index 6b6311593..27413da2a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -27,6 +28,11 @@ type AccessPolicyEntry struct { ApplicationID *string `json:"applicationId,omitempty"` } +type Action struct { + // The type of action. + Type *KeyRotationPolicyActionType `json:"type,omitempty"` +} + // Attributes - The object attributes managed by the KeyVault service. type Attributes struct { // Determines whether the object is enabled. @@ -45,8 +51,14 @@ type Attributes struct { Updated *time.Time `json:"updated,omitempty" azure:"ro"` } -// CheckNameAvailabilityResult - The CheckNameAvailability operation response. -type CheckNameAvailabilityResult struct { +// CheckMhsmNameAvailabilityParameters - The parameters used to check the availability of the managed hsm name. +type CheckMhsmNameAvailabilityParameters struct { + // REQUIRED; The managed hsm name. + Name *string `json:"name,omitempty"` +} + +// CheckMhsmNameAvailabilityResult - The CheckMhsmNameAvailability operation response. +type CheckMhsmNameAvailabilityResult struct { // READ-ONLY; An error message explaining the Reason value in more detail. Message *string `json:"message,omitempty" azure:"ro"` @@ -54,23 +66,22 @@ type CheckNameAvailabilityResult struct { // If false, the name has already been taken or is invalid and cannot be used. NameAvailable *bool `json:"nameAvailable,omitempty" azure:"ro"` - // READ-ONLY; The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false. + // READ-ONLY; The reason that a managed hsm name could not be used. The reason element is only returned if NameAvailable is + // false. Reason *Reason `json:"reason,omitempty" azure:"ro"` } -// CloudError - An error response from Key Vault resource provider -type CloudError struct { - // An error response from Key Vault resource provider - Error *CloudErrorBody `json:"error,omitempty"` -} +// CheckNameAvailabilityResult - The CheckNameAvailability operation response. +type CheckNameAvailabilityResult struct { + // READ-ONLY; An error message explaining the Reason value in more detail. + Message *string `json:"message,omitempty" azure:"ro"` -// CloudErrorBody - An error response from Key Vault resource provider -type CloudErrorBody struct { - // Error code. This is a mnemonic that can be consumed programmatically. - Code *string `json:"code,omitempty"` + // READ-ONLY; A boolean value that indicates whether the name is available for you to use. If true, the name is available. + // If false, the name has already been taken or is invalid and cannot be used. + NameAvailable *bool `json:"nameAvailable,omitempty" azure:"ro"` - // User friendly error message. The message is typically localized and may vary with service version. - Message *string `json:"message,omitempty"` + // READ-ONLY; The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false. + Reason *Reason `json:"reason,omitempty" azure:"ro"` } type DeletedManagedHsm struct { @@ -273,6 +284,12 @@ type KeyProperties struct { // The type of the key. For valid values, see JsonWebKeyType. Kty *JSONWebKeyType `json:"kty,omitempty"` + // Key release policy in response. It will be used for both output and input. Omitted if empty + ReleasePolicy *KeyReleasePolicy `json:"release_policy,omitempty"` + + // Key rotation policy in response. It will be used for both output and input. Omitted if empty + RotationPolicy *RotationPolicy `json:"rotationPolicy,omitempty"` + // READ-ONLY; The URI to retrieve the current version of the key. KeyURI *string `json:"keyUri,omitempty" azure:"ro"` @@ -280,6 +297,25 @@ type KeyProperties struct { KeyURIWithVersion *string `json:"keyUriWithVersion,omitempty" azure:"ro"` } +type KeyReleasePolicy struct { + // Content type and version of key release policy + ContentType *string `json:"contentType,omitempty"` + + // Blob encoding the policy rules under which the key can be released. + Data []byte `json:"data,omitempty"` +} + +type KeyRotationPolicyAttributes struct { + // The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'. + ExpiryTime *string `json:"expiryTime,omitempty"` + + // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. + Created *int64 `json:"created,omitempty" azure:"ro"` + + // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. + Updated *int64 `json:"updated,omitempty" azure:"ro"` +} + // KeysClientCreateIfNotExistOptions contains the optional parameters for the KeysClient.CreateIfNotExist method. type KeysClientCreateIfNotExistOptions struct { // placeholder for future optional parameters @@ -295,16 +331,24 @@ type KeysClientGetVersionOptions struct { // placeholder for future optional parameters } -// KeysClientListOptions contains the optional parameters for the KeysClient.List method. +// KeysClientListOptions contains the optional parameters for the KeysClient.NewListPager method. type KeysClientListOptions struct { // placeholder for future optional parameters } -// KeysClientListVersionsOptions contains the optional parameters for the KeysClient.ListVersions method. +// KeysClientListVersionsOptions contains the optional parameters for the KeysClient.NewListVersionsPager method. type KeysClientListVersionsOptions struct { // placeholder for future optional parameters } +type LifetimeAction struct { + // The action of key rotation policy lifetimeAction. + Action *Action `json:"action,omitempty"` + + // The trigger of key rotation policy lifetimeAction. + Trigger *Trigger `json:"trigger,omitempty"` +} + // LogSpecification - Log specification of operation. type LogSpecification struct { // Blob duration of specification. @@ -317,7 +361,19 @@ type LogSpecification struct { Name *string `json:"name,omitempty"` } -// MHSMIPRule - A rule governing the accessibility of a managed hsm pool from a specific ip address or ip range. +// MHSMGeoReplicatedRegion - A region that this managed HSM Pool has been extended to. +type MHSMGeoReplicatedRegion struct { + // A boolean value that indicates whether the region is the primary region or a secondary region. + IsPrimary *bool `json:"isPrimary,omitempty"` + + // Name of the geo replicated region. + Name *string `json:"name,omitempty"` + + // READ-ONLY; Provisioning state of the geo replicated region. + ProvisioningState *GeoReplicationRegionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} + +// MHSMIPRule - A rule governing the accessibility of a managed HSM pool from a specific IP address or IP range. type MHSMIPRule struct { // REQUIRED; An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses // that start with 124.56.78). @@ -378,6 +434,12 @@ type MHSMPrivateEndpointConnection struct { // MHSMPrivateEndpointConnectionItem - Private endpoint connection item. type MHSMPrivateEndpointConnectionItem struct { + // Modified whenever there is a change in the state of private endpoint connection. + Etag *string `json:"etag,omitempty"` + + // Id of private endpoint connection. + ID *string `json:"id,omitempty"` + // Private endpoint connection properties. Properties *MHSMPrivateEndpointConnectionProperties `json:"properties,omitempty"` } @@ -407,7 +469,7 @@ type MHSMPrivateEndpointConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.ListByResource +// MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.NewListByResourcePager // method. type MHSMPrivateEndpointConnectionsClientListByResourceOptions struct { // placeholder for future optional parameters @@ -491,12 +553,36 @@ type MHSMPrivateLinkServiceConnectionState struct { Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` } +// MHSMRegionsClientListByResourceOptions contains the optional parameters for the MHSMRegionsClient.NewListByResourcePager +// method. +type MHSMRegionsClientListByResourceOptions struct { + // placeholder for future optional parameters +} + +// MHSMRegionsListResult - List of regions associated with a managed HSM Pools +type MHSMRegionsListResult struct { + // The URL to get the next set of managed HSM Pools. + NextLink *string `json:"nextLink,omitempty"` + + // The region associated with a managed HSM Pools. + Value []*MHSMGeoReplicatedRegion `json:"value,omitempty"` +} + // MHSMVirtualNetworkRule - A rule governing the accessibility of a managed hsm pool from a specific virtual network. type MHSMVirtualNetworkRule struct { // REQUIRED; Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. ID *string `json:"id,omitempty"` } +// ManagedHSMSecurityDomainProperties - The security domain properties of the managed hsm. +type ManagedHSMSecurityDomainProperties struct { + // READ-ONLY; Activation Status + ActivationStatus *ActivationStatus `json:"activationStatus,omitempty" azure:"ro"` + + // READ-ONLY; Activation Status Message. + ActivationStatusMessage *string `json:"activationStatusMessage,omitempty" azure:"ro"` +} + // ManagedHsm - Resource information with extended details. type ManagedHsm struct { // The supported Azure location where the managed HSM Pool should be created. @@ -524,12 +610,161 @@ type ManagedHsm struct { Type *string `json:"type,omitempty" azure:"ro"` } +type ManagedHsmAction struct { + // The type of action. + Type *KeyRotationPolicyActionType `json:"type,omitempty"` +} + // ManagedHsmError - The error exception. type ManagedHsmError struct { // READ-ONLY; The server error. Error *Error `json:"error,omitempty" azure:"ro"` } +// ManagedHsmKey - The key resource. +type ManagedHsmKey struct { + // REQUIRED; The properties of the key. + Properties *ManagedHsmKeyProperties `json:"properties,omitempty"` + + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +// ManagedHsmKeyAttributes - The object attributes managed by the Azure Key Vault service. +type ManagedHsmKeyAttributes struct { + // Determines whether or not the object is enabled. + Enabled *bool `json:"enabled,omitempty"` + + // Expiry date in seconds since 1970-01-01T00:00:00Z. + Expires *int64 `json:"exp,omitempty"` + + // Indicates if the private key can be exported. + Exportable *bool `json:"exportable,omitempty"` + + // Not before date in seconds since 1970-01-01T00:00:00Z. + NotBefore *int64 `json:"nbf,omitempty"` + + // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. + Created *int64 `json:"created,omitempty" azure:"ro"` + + // READ-ONLY; The deletion recovery level currently in effect for the object. If it contains 'Purgeable', then the object + // can be permanently deleted by a privileged user; otherwise, only the system can purge the + // object at the end of the retention interval. + RecoveryLevel *DeletionRecoveryLevel `json:"recoveryLevel,omitempty" azure:"ro"` + + // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. + Updated *int64 `json:"updated,omitempty" azure:"ro"` +} + +// ManagedHsmKeyCreateParameters - The parameters used to create a key. +type ManagedHsmKeyCreateParameters struct { + // REQUIRED; The properties of the key to be created. + Properties *ManagedHsmKeyProperties `json:"properties,omitempty"` + + // The tags that will be assigned to the key. + Tags map[string]*string `json:"tags,omitempty"` +} + +// ManagedHsmKeyListResult - The page of keys. +type ManagedHsmKeyListResult struct { + // The URL to get the next page of keys. + NextLink *string `json:"nextLink,omitempty"` + + // The key resources. + Value []*ManagedHsmKey `json:"value,omitempty"` +} + +// ManagedHsmKeyProperties - The properties of the key. +type ManagedHsmKeyProperties struct { + // The attributes of the key. + Attributes *ManagedHsmKeyAttributes `json:"attributes,omitempty"` + + // The elliptic curve name. For valid values, see JsonWebKeyCurveName. + CurveName *JSONWebKeyCurveName `json:"curveName,omitempty"` + KeyOps []*JSONWebKeyOperation `json:"keyOps,omitempty"` + + // The key size in bits. For example: 2048, 3072, or 4096 for RSA. + KeySize *int32 `json:"keySize,omitempty"` + + // The type of the key. For valid values, see JsonWebKeyType. + Kty *JSONWebKeyType `json:"kty,omitempty"` + + // Key release policy in response. It will be used for both output and input. Omitted if empty + ReleasePolicy *ManagedHsmKeyReleasePolicy `json:"release_policy,omitempty"` + + // Key rotation policy in response. It will be used for both output and input. Omitted if empty + RotationPolicy *ManagedHsmRotationPolicy `json:"rotationPolicy,omitempty"` + + // READ-ONLY; The URI to retrieve the current version of the key. + KeyURI *string `json:"keyUri,omitempty" azure:"ro"` + + // READ-ONLY; The URI to retrieve the specific version of the key. + KeyURIWithVersion *string `json:"keyUriWithVersion,omitempty" azure:"ro"` +} + +type ManagedHsmKeyReleasePolicy struct { + // Content type and version of key release policy + ContentType *string `json:"contentType,omitempty"` + + // Blob encoding the policy rules under which the key can be released. + Data []byte `json:"data,omitempty"` +} + +type ManagedHsmKeyRotationPolicyAttributes struct { + // The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'. + ExpiryTime *string `json:"expiryTime,omitempty"` + + // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. + Created *int64 `json:"created,omitempty" azure:"ro"` + + // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. + Updated *int64 `json:"updated,omitempty" azure:"ro"` +} + +// ManagedHsmKeysClientCreateIfNotExistOptions contains the optional parameters for the ManagedHsmKeysClient.CreateIfNotExist +// method. +type ManagedHsmKeysClientCreateIfNotExistOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientGetOptions contains the optional parameters for the ManagedHsmKeysClient.Get method. +type ManagedHsmKeysClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientGetVersionOptions contains the optional parameters for the ManagedHsmKeysClient.GetVersion method. +type ManagedHsmKeysClientGetVersionOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientListOptions contains the optional parameters for the ManagedHsmKeysClient.NewListPager method. +type ManagedHsmKeysClientListOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientListVersionsOptions contains the optional parameters for the ManagedHsmKeysClient.NewListVersionsPager +// method. +type ManagedHsmKeysClientListVersionsOptions struct { + // placeholder for future optional parameters +} + +type ManagedHsmLifetimeAction struct { + // The action of key rotation policy lifetimeAction. + Action *ManagedHsmAction `json:"action,omitempty"` + + // The trigger of key rotation policy lifetimeAction. + Trigger *ManagedHsmTrigger `json:"trigger,omitempty"` +} + // ManagedHsmListResult - List of managed HSM Pools type ManagedHsmListResult struct { // The URL to get the next set of managed HSM Pools. @@ -564,6 +799,9 @@ type ManagedHsmProperties struct { // Control permission for data plane traffic coming from public networks while private endpoint is enabled. PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // List of all regions associated with the managed hsm pool. + Regions []*MHSMGeoReplicatedRegion `json:"regions,omitempty"` + // softDelete data retention days. It accepts >=7 and <=90. SoftDeleteRetentionInDays *int32 `json:"softDeleteRetentionInDays,omitempty"` @@ -582,6 +820,9 @@ type ManagedHsmProperties struct { // READ-ONLY; The scheduled purge date in UTC. ScheduledPurgeDate *time.Time `json:"scheduledPurgeDate,omitempty" azure:"ro"` + // READ-ONLY; Managed HSM security domain properties. + SecurityDomainProperties *ManagedHSMSecurityDomainProperties `json:"securityDomainProperties,omitempty" azure:"ro"` + // READ-ONLY; Resource Status Message. StatusMessage *string `json:"statusMessage,omitempty" azure:"ro"` } @@ -610,6 +851,14 @@ type ManagedHsmResource struct { Type *string `json:"type,omitempty" azure:"ro"` } +type ManagedHsmRotationPolicy struct { + // The attributes of key rotation policy. + Attributes *ManagedHsmKeyRotationPolicyAttributes `json:"attributes,omitempty"` + + // The lifetimeActions for key rotation action. + LifetimeActions []*ManagedHsmLifetimeAction `json:"lifetimeActions,omitempty"` +} + // ManagedHsmSKU - SKU details type ManagedHsmSKU struct { // REQUIRED; SKU Family of the managed HSM Pool @@ -619,6 +868,15 @@ type ManagedHsmSKU struct { Name *ManagedHsmSKUName `json:"name,omitempty"` } +type ManagedHsmTrigger struct { + // The time duration after key creation to rotate the key. It only applies to rotate. It will be in ISO 8601 duration format. + // Eg: 'P90D', 'P1Y'. + TimeAfterCreate *string `json:"timeAfterCreate,omitempty"` + + // The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty"` +} + // ManagedHsmsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginCreateOrUpdate // method. type ManagedHsmsClientBeginCreateOrUpdateOptions struct { @@ -645,6 +903,12 @@ type ManagedHsmsClientBeginUpdateOptions struct { ResumeToken string } +// ManagedHsmsClientCheckMhsmNameAvailabilityOptions contains the optional parameters for the ManagedHsmsClient.CheckMhsmNameAvailability +// method. +type ManagedHsmsClientCheckMhsmNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + // ManagedHsmsClientGetDeletedOptions contains the optional parameters for the ManagedHsmsClient.GetDeleted method. type ManagedHsmsClientGetDeletedOptions struct { // placeholder for future optional parameters @@ -655,21 +919,21 @@ type ManagedHsmsClientGetOptions struct { // placeholder for future optional parameters } -// ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.ListByResourceGroup +// ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.NewListByResourceGroupPager // method. type ManagedHsmsClientListByResourceGroupOptions struct { // Maximum number of results to return. Top *int32 } -// ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.ListBySubscription +// ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.NewListBySubscriptionPager // method. type ManagedHsmsClientListBySubscriptionOptions struct { // Maximum number of results to return. Top *int32 } -// ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.ListDeleted method. +// ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.NewListDeletedPager method. type ManagedHsmsClientListDeletedOptions struct { // placeholder for future optional parameters } @@ -775,7 +1039,7 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. type OperationsClientListOptions struct { // placeholder for future optional parameters } @@ -871,7 +1135,7 @@ type PrivateEndpointConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.ListByResource +// PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByResourcePager // method. type PrivateEndpointConnectionsClientListByResourceOptions struct { // placeholder for future optional parameters @@ -940,6 +1204,21 @@ type PrivateLinkServiceConnectionState struct { Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` } +// ProxyResourceWithoutSystemData - Common fields that are returned in the response for all Azure Resource Manager resources +type ProxyResourceWithoutSystemData struct { + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + // Resource - Key Vault resource type Resource struct { // READ-ONLY; Fully qualified identifier of the key vault resource. @@ -967,6 +1246,14 @@ type ResourceListResult struct { Value []*Resource `json:"value,omitempty"` } +type RotationPolicy struct { + // The attributes of key rotation policy. + Attributes *KeyRotationPolicyAttributes `json:"attributes,omitempty"` + + // The lifetimeActions for key rotation action. + LifetimeActions []*LifetimeAction `json:"lifetimeActions,omitempty"` +} + // SKU details type SKU struct { // REQUIRED; SKU family name @@ -1084,7 +1371,7 @@ type SecretsClientGetOptions struct { // placeholder for future optional parameters } -// SecretsClientListOptions contains the optional parameters for the SecretsClient.List method. +// SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method. type SecretsClientListOptions struct { // Maximum number of results to return. Top *int32 @@ -1125,6 +1412,15 @@ type SystemData struct { LastModifiedByType *IdentityType `json:"lastModifiedByType,omitempty"` } +type Trigger struct { + // The time duration after key creation to rotate the key. It only applies to rotate. It will be in ISO 8601 duration format. + // Eg: 'P90D', 'P1Y'. + TimeAfterCreate *string `json:"timeAfterCreate,omitempty"` + + // The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty"` +} + // Vault - Resource information with extended details. type Vault struct { // REQUIRED; Properties of the vault @@ -1179,7 +1475,8 @@ type VaultCheckNameAvailabilityParameters struct { // REQUIRED; The vault name. Name *string `json:"name,omitempty"` - // REQUIRED; The type of resource, Microsoft.KeyVault/vaults + // CONSTANT; The type of resource, Microsoft.KeyVault/vaults + // Field has constant value "Microsoft.KeyVault/vaults", any specified value is ignored. Type *string `json:"type,omitempty"` } @@ -1372,24 +1669,26 @@ type VaultsClientGetOptions struct { // placeholder for future optional parameters } -// VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.ListByResourceGroup method. +// VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.NewListByResourceGroupPager +// method. type VaultsClientListByResourceGroupOptions struct { // Maximum number of results to return. Top *int32 } -// VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.ListBySubscription method. +// VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.NewListBySubscriptionPager +// method. type VaultsClientListBySubscriptionOptions struct { // Maximum number of results to return. Top *int32 } -// VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.ListDeleted method. +// VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.NewListDeletedPager method. type VaultsClientListDeletedOptions struct { // placeholder for future optional parameters } -// VaultsClientListOptions contains the optional parameters for the VaultsClient.List method. +// VaultsClientListOptions contains the optional parameters for the VaultsClient.NewListPager method. type VaultsClientListOptions struct { // Maximum number of results to return. Top *int32 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go new file mode 100644 index 000000000..7f7a5e10c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go @@ -0,0 +1,3750 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armkeyvault + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type AccessPolicyEntry. +func (a AccessPolicyEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationId", a.ApplicationID) + populate(objectMap, "objectId", a.ObjectID) + populate(objectMap, "permissions", a.Permissions) + populate(objectMap, "tenantId", a.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessPolicyEntry. +func (a *AccessPolicyEntry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationId": + err = unpopulate(val, "ApplicationID", &a.ApplicationID) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &a.ObjectID) + delete(rawMsg, key) + case "permissions": + err = unpopulate(val, "Permissions", &a.Permissions) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &a.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Action. +func (a Action) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Action. +func (a *Action) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Attributes. +func (a Attributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeUnix(objectMap, "created", a.Created) + populate(objectMap, "enabled", a.Enabled) + populateTimeUnix(objectMap, "exp", a.Expires) + populateTimeUnix(objectMap, "nbf", a.NotBefore) + populateTimeUnix(objectMap, "updated", a.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Attributes. +func (a *Attributes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "created": + err = unpopulateTimeUnix(val, "Created", &a.Created) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "exp": + err = unpopulateTimeUnix(val, "Expires", &a.Expires) + delete(rawMsg, key) + case "nbf": + err = unpopulateTimeUnix(val, "NotBefore", &a.NotBefore) + delete(rawMsg, key) + case "updated": + err = unpopulateTimeUnix(val, "Updated", &a.Updated) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckMhsmNameAvailabilityParameters. +func (c CheckMhsmNameAvailabilityParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckMhsmNameAvailabilityParameters. +func (c *CheckMhsmNameAvailabilityParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckMhsmNameAvailabilityResult. +func (c CheckMhsmNameAvailabilityResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", c.Message) + populate(objectMap, "nameAvailable", c.NameAvailable) + populate(objectMap, "reason", c.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckMhsmNameAvailabilityResult. +func (c *CheckMhsmNameAvailabilityResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &c.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResult. +func (c CheckNameAvailabilityResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", c.Message) + populate(objectMap, "nameAvailable", c.NameAvailable) + populate(objectMap, "reason", c.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResult. +func (c *CheckNameAvailabilityResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &c.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedManagedHsm. +func (d DeletedManagedHsm) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedManagedHsm. +func (d *DeletedManagedHsm) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedManagedHsmListResult. +func (d DeletedManagedHsmListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedManagedHsmListResult. +func (d *DeletedManagedHsmListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedManagedHsmProperties. +func (d DeletedManagedHsmProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "deletionDate", d.DeletionDate) + populate(objectMap, "location", d.Location) + populate(objectMap, "mhsmId", d.MhsmID) + populate(objectMap, "purgeProtectionEnabled", d.PurgeProtectionEnabled) + populateTimeRFC3339(objectMap, "scheduledPurgeDate", d.ScheduledPurgeDate) + populate(objectMap, "tags", d.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedManagedHsmProperties. +func (d *DeletedManagedHsmProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deletionDate": + err = unpopulateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "mhsmId": + err = unpopulate(val, "MhsmID", &d.MhsmID) + delete(rawMsg, key) + case "purgeProtectionEnabled": + err = unpopulate(val, "PurgeProtectionEnabled", &d.PurgeProtectionEnabled) + delete(rawMsg, key) + case "scheduledPurgeDate": + err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedVault. +func (d DeletedVault) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedVault. +func (d *DeletedVault) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedVaultListResult. +func (d DeletedVaultListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedVaultListResult. +func (d *DeletedVaultListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedVaultProperties. +func (d DeletedVaultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "deletionDate", d.DeletionDate) + populate(objectMap, "location", d.Location) + populate(objectMap, "purgeProtectionEnabled", d.PurgeProtectionEnabled) + populateTimeRFC3339(objectMap, "scheduledPurgeDate", d.ScheduledPurgeDate) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "vaultId", d.VaultID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedVaultProperties. +func (d *DeletedVaultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deletionDate": + err = unpopulateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "purgeProtectionEnabled": + err = unpopulate(val, "PurgeProtectionEnabled", &d.PurgeProtectionEnabled) + delete(rawMsg, key) + case "scheduledPurgeDate": + err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &d.VaultID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DimensionProperties. +func (d DimensionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", d.DisplayName) + populate(objectMap, "name", d.Name) + populate(objectMap, "toBeExportedForShoebox", d.ToBeExportedForShoebox) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DimensionProperties. +func (d *DimensionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &d.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "toBeExportedForShoebox": + err = unpopulate(val, "ToBeExportedForShoebox", &d.ToBeExportedForShoebox) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Error. +func (e Error) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", e.Code) + populate(objectMap, "innererror", e.InnerError) + populate(objectMap, "message", e.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Error. +func (e *Error) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "innererror": + err = unpopulate(val, "InnerError", &e.InnerError) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPRule. +func (i IPRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPRule. +func (i *IPRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Key. +func (k Key) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", k.ID) + populate(objectMap, "location", k.Location) + populate(objectMap, "name", k.Name) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "tags", k.Tags) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Key. +func (k *Key) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &k.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &k.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyAttributes. +func (k KeyAttributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "created", k.Created) + populate(objectMap, "enabled", k.Enabled) + populate(objectMap, "exp", k.Expires) + populate(objectMap, "exportable", k.Exportable) + populate(objectMap, "nbf", k.NotBefore) + populate(objectMap, "recoveryLevel", k.RecoveryLevel) + populate(objectMap, "updated", k.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyAttributes. +func (k *KeyAttributes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "created": + err = unpopulate(val, "Created", &k.Created) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &k.Enabled) + delete(rawMsg, key) + case "exp": + err = unpopulate(val, "Expires", &k.Expires) + delete(rawMsg, key) + case "exportable": + err = unpopulate(val, "Exportable", &k.Exportable) + delete(rawMsg, key) + case "nbf": + err = unpopulate(val, "NotBefore", &k.NotBefore) + delete(rawMsg, key) + case "recoveryLevel": + err = unpopulate(val, "RecoveryLevel", &k.RecoveryLevel) + delete(rawMsg, key) + case "updated": + err = unpopulate(val, "Updated", &k.Updated) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyCreateParameters. +func (k KeyCreateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "tags", k.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyCreateParameters. +func (k *KeyCreateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &k.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyListResult. +func (k KeyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", k.NextLink) + populate(objectMap, "value", k.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyListResult. +func (k *KeyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &k.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &k.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyProperties. +func (k KeyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", k.Attributes) + populate(objectMap, "curveName", k.CurveName) + populate(objectMap, "keyOps", k.KeyOps) + populate(objectMap, "keySize", k.KeySize) + populate(objectMap, "keyUri", k.KeyURI) + populate(objectMap, "keyUriWithVersion", k.KeyURIWithVersion) + populate(objectMap, "kty", k.Kty) + populate(objectMap, "release_policy", k.ReleasePolicy) + populate(objectMap, "rotationPolicy", k.RotationPolicy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyProperties. +func (k *KeyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attributes": + err = unpopulate(val, "Attributes", &k.Attributes) + delete(rawMsg, key) + case "curveName": + err = unpopulate(val, "CurveName", &k.CurveName) + delete(rawMsg, key) + case "keyOps": + err = unpopulate(val, "KeyOps", &k.KeyOps) + delete(rawMsg, key) + case "keySize": + err = unpopulate(val, "KeySize", &k.KeySize) + delete(rawMsg, key) + case "keyUri": + err = unpopulate(val, "KeyURI", &k.KeyURI) + delete(rawMsg, key) + case "keyUriWithVersion": + err = unpopulate(val, "KeyURIWithVersion", &k.KeyURIWithVersion) + delete(rawMsg, key) + case "kty": + err = unpopulate(val, "Kty", &k.Kty) + delete(rawMsg, key) + case "release_policy": + err = unpopulate(val, "ReleasePolicy", &k.ReleasePolicy) + delete(rawMsg, key) + case "rotationPolicy": + err = unpopulate(val, "RotationPolicy", &k.RotationPolicy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyReleasePolicy. +func (k KeyReleasePolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentType", k.ContentType) + populateByteArray(objectMap, "data", k.Data, runtime.Base64URLFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyReleasePolicy. +func (k *KeyReleasePolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentType": + err = unpopulate(val, "ContentType", &k.ContentType) + delete(rawMsg, key) + case "data": + err = runtime.DecodeByteArray(string(val), &k.Data, runtime.Base64URLFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyRotationPolicyAttributes. +func (k KeyRotationPolicyAttributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "created", k.Created) + populate(objectMap, "expiryTime", k.ExpiryTime) + populate(objectMap, "updated", k.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyRotationPolicyAttributes. +func (k *KeyRotationPolicyAttributes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "created": + err = unpopulate(val, "Created", &k.Created) + delete(rawMsg, key) + case "expiryTime": + err = unpopulate(val, "ExpiryTime", &k.ExpiryTime) + delete(rawMsg, key) + case "updated": + err = unpopulate(val, "Updated", &k.Updated) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LifetimeAction. +func (l LifetimeAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", l.Action) + populate(objectMap, "trigger", l.Trigger) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LifetimeAction. +func (l *LifetimeAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &l.Action) + delete(rawMsg, key) + case "trigger": + err = unpopulate(val, "Trigger", &l.Trigger) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", l.BlobDuration) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &l.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMGeoReplicatedRegion. +func (m MHSMGeoReplicatedRegion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isPrimary", m.IsPrimary) + populate(objectMap, "name", m.Name) + populate(objectMap, "provisioningState", m.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMGeoReplicatedRegion. +func (m *MHSMGeoReplicatedRegion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isPrimary": + err = unpopulate(val, "IsPrimary", &m.IsPrimary) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMIPRule. +func (m MHSMIPRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMIPRule. +func (m *MHSMIPRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMNetworkRuleSet. +func (m MHSMNetworkRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bypass", m.Bypass) + populate(objectMap, "defaultAction", m.DefaultAction) + populate(objectMap, "ipRules", m.IPRules) + populate(objectMap, "virtualNetworkRules", m.VirtualNetworkRules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMNetworkRuleSet. +func (m *MHSMNetworkRuleSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bypass": + err = unpopulate(val, "Bypass", &m.Bypass) + delete(rawMsg, key) + case "defaultAction": + err = unpopulate(val, "DefaultAction", &m.DefaultAction) + delete(rawMsg, key) + case "ipRules": + err = unpopulate(val, "IPRules", &m.IPRules) + delete(rawMsg, key) + case "virtualNetworkRules": + err = unpopulate(val, "VirtualNetworkRules", &m.VirtualNetworkRules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateEndpoint. +func (m MHSMPrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateEndpoint. +func (m *MHSMPrivateEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateEndpointConnection. +func (m MHSMPrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", m.Etag) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateEndpointConnection. +func (m *MHSMPrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &m.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateEndpointConnectionItem. +func (m MHSMPrivateEndpointConnectionItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", m.Etag) + populate(objectMap, "id", m.ID) + populate(objectMap, "properties", m.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateEndpointConnectionItem. +func (m *MHSMPrivateEndpointConnectionItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &m.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateEndpointConnectionProperties. +func (m MHSMPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpoint", m.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", m.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", m.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateEndpointConnectionProperties. +func (m *MHSMPrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &m.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &m.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateEndpointConnectionsListResult. +func (m MHSMPrivateEndpointConnectionsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateEndpointConnectionsListResult. +func (m *MHSMPrivateEndpointConnectionsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateLinkResource. +func (m MHSMPrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateLinkResource. +func (m *MHSMPrivateLinkResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateLinkResourceListResult. +func (m MHSMPrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateLinkResourceListResult. +func (m *MHSMPrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateLinkResourceProperties. +func (m MHSMPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", m.GroupID) + populate(objectMap, "requiredMembers", m.RequiredMembers) + populate(objectMap, "requiredZoneNames", m.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateLinkResourceProperties. +func (m *MHSMPrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &m.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &m.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &m.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateLinkServiceConnectionState. +func (m MHSMPrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", m.ActionsRequired) + populate(objectMap, "description", m.Description) + populate(objectMap, "status", m.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateLinkServiceConnectionState. +func (m *MHSMPrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &m.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMRegionsListResult. +func (m MHSMRegionsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMRegionsListResult. +func (m *MHSMRegionsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MHSMVirtualNetworkRule. +func (m MHSMVirtualNetworkRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMVirtualNetworkRule. +func (m *MHSMVirtualNetworkRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHSMSecurityDomainProperties. +func (m ManagedHSMSecurityDomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activationStatus", m.ActivationStatus) + populate(objectMap, "activationStatusMessage", m.ActivationStatusMessage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHSMSecurityDomainProperties. +func (m *ManagedHSMSecurityDomainProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activationStatus": + err = unpopulate(val, "ActivationStatus", &m.ActivationStatus) + delete(rawMsg, key) + case "activationStatusMessage": + err = unpopulate(val, "ActivationStatusMessage", &m.ActivationStatusMessage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsm. +func (m ManagedHsm) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsm. +func (m *ManagedHsm) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmAction. +func (m ManagedHsmAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmAction. +func (m *ManagedHsmAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmError. +func (m ManagedHsmError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", m.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmError. +func (m *ManagedHsmError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &m.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmKey. +func (m ManagedHsmKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKey. +func (m *ManagedHsmKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmKeyAttributes. +func (m ManagedHsmKeyAttributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "created", m.Created) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "exp", m.Expires) + populate(objectMap, "exportable", m.Exportable) + populate(objectMap, "nbf", m.NotBefore) + populate(objectMap, "recoveryLevel", m.RecoveryLevel) + populate(objectMap, "updated", m.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKeyAttributes. +func (m *ManagedHsmKeyAttributes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "created": + err = unpopulate(val, "Created", &m.Created) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + case "exp": + err = unpopulate(val, "Expires", &m.Expires) + delete(rawMsg, key) + case "exportable": + err = unpopulate(val, "Exportable", &m.Exportable) + delete(rawMsg, key) + case "nbf": + err = unpopulate(val, "NotBefore", &m.NotBefore) + delete(rawMsg, key) + case "recoveryLevel": + err = unpopulate(val, "RecoveryLevel", &m.RecoveryLevel) + delete(rawMsg, key) + case "updated": + err = unpopulate(val, "Updated", &m.Updated) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmKeyCreateParameters. +func (m ManagedHsmKeyCreateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "tags", m.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKeyCreateParameters. +func (m *ManagedHsmKeyCreateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmKeyListResult. +func (m ManagedHsmKeyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKeyListResult. +func (m *ManagedHsmKeyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmKeyProperties. +func (m ManagedHsmKeyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", m.Attributes) + populate(objectMap, "curveName", m.CurveName) + populate(objectMap, "keyOps", m.KeyOps) + populate(objectMap, "keySize", m.KeySize) + populate(objectMap, "keyUri", m.KeyURI) + populate(objectMap, "keyUriWithVersion", m.KeyURIWithVersion) + populate(objectMap, "kty", m.Kty) + populate(objectMap, "release_policy", m.ReleasePolicy) + populate(objectMap, "rotationPolicy", m.RotationPolicy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKeyProperties. +func (m *ManagedHsmKeyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attributes": + err = unpopulate(val, "Attributes", &m.Attributes) + delete(rawMsg, key) + case "curveName": + err = unpopulate(val, "CurveName", &m.CurveName) + delete(rawMsg, key) + case "keyOps": + err = unpopulate(val, "KeyOps", &m.KeyOps) + delete(rawMsg, key) + case "keySize": + err = unpopulate(val, "KeySize", &m.KeySize) + delete(rawMsg, key) + case "keyUri": + err = unpopulate(val, "KeyURI", &m.KeyURI) + delete(rawMsg, key) + case "keyUriWithVersion": + err = unpopulate(val, "KeyURIWithVersion", &m.KeyURIWithVersion) + delete(rawMsg, key) + case "kty": + err = unpopulate(val, "Kty", &m.Kty) + delete(rawMsg, key) + case "release_policy": + err = unpopulate(val, "ReleasePolicy", &m.ReleasePolicy) + delete(rawMsg, key) + case "rotationPolicy": + err = unpopulate(val, "RotationPolicy", &m.RotationPolicy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmKeyReleasePolicy. +func (m ManagedHsmKeyReleasePolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentType", m.ContentType) + populateByteArray(objectMap, "data", m.Data, runtime.Base64URLFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKeyReleasePolicy. +func (m *ManagedHsmKeyReleasePolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentType": + err = unpopulate(val, "ContentType", &m.ContentType) + delete(rawMsg, key) + case "data": + err = runtime.DecodeByteArray(string(val), &m.Data, runtime.Base64URLFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmKeyRotationPolicyAttributes. +func (m ManagedHsmKeyRotationPolicyAttributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "created", m.Created) + populate(objectMap, "expiryTime", m.ExpiryTime) + populate(objectMap, "updated", m.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKeyRotationPolicyAttributes. +func (m *ManagedHsmKeyRotationPolicyAttributes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "created": + err = unpopulate(val, "Created", &m.Created) + delete(rawMsg, key) + case "expiryTime": + err = unpopulate(val, "ExpiryTime", &m.ExpiryTime) + delete(rawMsg, key) + case "updated": + err = unpopulate(val, "Updated", &m.Updated) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmLifetimeAction. +func (m ManagedHsmLifetimeAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", m.Action) + populate(objectMap, "trigger", m.Trigger) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmLifetimeAction. +func (m *ManagedHsmLifetimeAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &m.Action) + delete(rawMsg, key) + case "trigger": + err = unpopulate(val, "Trigger", &m.Trigger) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmListResult. +func (m ManagedHsmListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmListResult. +func (m *ManagedHsmListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmProperties. +func (m ManagedHsmProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "createMode", m.CreateMode) + populate(objectMap, "enablePurgeProtection", m.EnablePurgeProtection) + populate(objectMap, "enableSoftDelete", m.EnableSoftDelete) + populate(objectMap, "hsmUri", m.HsmURI) + populate(objectMap, "initialAdminObjectIds", m.InitialAdminObjectIDs) + populate(objectMap, "networkAcls", m.NetworkACLs) + populate(objectMap, "privateEndpointConnections", m.PrivateEndpointConnections) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "publicNetworkAccess", m.PublicNetworkAccess) + populate(objectMap, "regions", m.Regions) + populateTimeRFC3339(objectMap, "scheduledPurgeDate", m.ScheduledPurgeDate) + populate(objectMap, "securityDomainProperties", m.SecurityDomainProperties) + populate(objectMap, "softDeleteRetentionInDays", m.SoftDeleteRetentionInDays) + populate(objectMap, "statusMessage", m.StatusMessage) + populate(objectMap, "tenantId", m.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmProperties. +func (m *ManagedHsmProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createMode": + err = unpopulate(val, "CreateMode", &m.CreateMode) + delete(rawMsg, key) + case "enablePurgeProtection": + err = unpopulate(val, "EnablePurgeProtection", &m.EnablePurgeProtection) + delete(rawMsg, key) + case "enableSoftDelete": + err = unpopulate(val, "EnableSoftDelete", &m.EnableSoftDelete) + delete(rawMsg, key) + case "hsmUri": + err = unpopulate(val, "HsmURI", &m.HsmURI) + delete(rawMsg, key) + case "initialAdminObjectIds": + err = unpopulate(val, "InitialAdminObjectIDs", &m.InitialAdminObjectIDs) + delete(rawMsg, key) + case "networkAcls": + err = unpopulate(val, "NetworkACLs", &m.NetworkACLs) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &m.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &m.PublicNetworkAccess) + delete(rawMsg, key) + case "regions": + err = unpopulate(val, "Regions", &m.Regions) + delete(rawMsg, key) + case "scheduledPurgeDate": + err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &m.ScheduledPurgeDate) + delete(rawMsg, key) + case "securityDomainProperties": + err = unpopulate(val, "SecurityDomainProperties", &m.SecurityDomainProperties) + delete(rawMsg, key) + case "softDeleteRetentionInDays": + err = unpopulate(val, "SoftDeleteRetentionInDays", &m.SoftDeleteRetentionInDays) + delete(rawMsg, key) + case "statusMessage": + err = unpopulate(val, "StatusMessage", &m.StatusMessage) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmResource. +func (m ManagedHsmResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmResource. +func (m *ManagedHsmResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmRotationPolicy. +func (m ManagedHsmRotationPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", m.Attributes) + populate(objectMap, "lifetimeActions", m.LifetimeActions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmRotationPolicy. +func (m *ManagedHsmRotationPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attributes": + err = unpopulate(val, "Attributes", &m.Attributes) + delete(rawMsg, key) + case "lifetimeActions": + err = unpopulate(val, "LifetimeActions", &m.LifetimeActions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmSKU. +func (m ManagedHsmSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + if m.Family == nil { + m.Family = to.Ptr(ManagedHsmSKUFamilyB) + } + populate(objectMap, "family", m.Family) + populate(objectMap, "name", m.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmSKU. +func (m *ManagedHsmSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "family": + err = unpopulate(val, "Family", &m.Family) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHsmTrigger. +func (m ManagedHsmTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "timeAfterCreate", m.TimeAfterCreate) + populate(objectMap, "timeBeforeExpiry", m.TimeBeforeExpiry) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmTrigger. +func (m *ManagedHsmTrigger) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "timeAfterCreate": + err = unpopulate(val, "TimeAfterCreate", &m.TimeAfterCreate) + delete(rawMsg, key) + case "timeBeforeExpiry": + err = unpopulate(val, "TimeBeforeExpiry", &m.TimeBeforeExpiry) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "fillGapWithZero", m.FillGapWithZero) + populate(objectMap, "internalMetricName", m.InternalMetricName) + populate(objectMap, "lockAggregationType", m.LockAggregationType) + populate(objectMap, "name", m.Name) + populate(objectMap, "supportedAggregationTypes", m.SupportedAggregationTypes) + populate(objectMap, "supportedTimeGrainTypes", m.SupportedTimeGrainTypes) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. +func (m *MetricSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationType": + err = unpopulate(val, "AggregationType", &m.AggregationType) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &m.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "fillGapWithZero": + err = unpopulate(val, "FillGapWithZero", &m.FillGapWithZero) + delete(rawMsg, key) + case "internalMetricName": + err = unpopulate(val, "InternalMetricName", &m.InternalMetricName) + delete(rawMsg, key) + case "lockAggregationType": + err = unpopulate(val, "LockAggregationType", &m.LockAggregationType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "supportedAggregationTypes": + err = unpopulate(val, "SupportedAggregationTypes", &m.SupportedAggregationTypes) + delete(rawMsg, key) + case "supportedTimeGrainTypes": + err = unpopulate(val, "SupportedTimeGrainTypes", &m.SupportedTimeGrainTypes) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkRuleSet. +func (n NetworkRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bypass", n.Bypass) + populate(objectMap, "defaultAction", n.DefaultAction) + populate(objectMap, "ipRules", n.IPRules) + populate(objectMap, "virtualNetworkRules", n.VirtualNetworkRules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSet. +func (n *NetworkRuleSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bypass": + err = unpopulate(val, "Bypass", &n.Bypass) + delete(rawMsg, key) + case "defaultAction": + err = unpopulate(val, "DefaultAction", &n.DefaultAction) + delete(rawMsg, key) + case "ipRules": + err = unpopulate(val, "IPRules", &n.IPRules) + delete(rawMsg, key) + case "virtualNetworkRules": + err = unpopulate(val, "VirtualNetworkRules", &n.VirtualNetworkRules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", o.Display) + populate(objectMap, "isDataAction", o.IsDataAction) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.OperationProperties) + populate(objectMap, "origin", o.Origin) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &o.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "OperationProperties", &o.OperationProperties) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. +func (o *OperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationProperties. +func (o OperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", o.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties. +func (o *OperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Permissions. +func (p Permissions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificates", p.Certificates) + populate(objectMap, "keys", p.Keys) + populate(objectMap, "secrets", p.Secrets) + populate(objectMap, "storage", p.Storage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Permissions. +func (p *Permissions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificates": + err = unpopulate(val, "Certificates", &p.Certificates) + delete(rawMsg, key) + case "keys": + err = unpopulate(val, "Keys", &p.Keys) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &p.Secrets) + delete(rawMsg, key) + case "storage": + err = unpopulate(val, "Storage", &p.Storage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. +func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint. +func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. +func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. +func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionItem. +func (p PrivateEndpointConnectionItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionItem. +func (p *PrivateEndpointConnectionItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. +func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. +func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. +func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. +func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. +func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. +func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. +func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. +func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. +func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. +func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. +func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProxyResourceWithoutSystemData. +func (p ProxyResourceWithoutSystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResourceWithoutSystemData. +func (p *ProxyResourceWithoutSystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceListResult. +func (r ResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceListResult. +func (r *ResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RotationPolicy. +func (r RotationPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", r.Attributes) + populate(objectMap, "lifetimeActions", r.LifetimeActions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RotationPolicy. +func (r *RotationPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attributes": + err = unpopulate(val, "Attributes", &r.Attributes) + delete(rawMsg, key) + case "lifetimeActions": + err = unpopulate(val, "LifetimeActions", &r.LifetimeActions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKU. +func (s SKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + if s.Family == nil { + s.Family = to.Ptr(SKUFamilyA) + } + populate(objectMap, "family", s.Family) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. +func (s *SKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "family": + err = unpopulate(val, "Family", &s.Family) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Secret. +func (s Secret) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Secret. +func (s *Secret) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretAttributes. +func (s SecretAttributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeUnix(objectMap, "created", s.Created) + populate(objectMap, "enabled", s.Enabled) + populateTimeUnix(objectMap, "exp", s.Expires) + populateTimeUnix(objectMap, "nbf", s.NotBefore) + populateTimeUnix(objectMap, "updated", s.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretAttributes. +func (s *SecretAttributes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "created": + err = unpopulateTimeUnix(val, "Created", &s.Created) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) + delete(rawMsg, key) + case "exp": + err = unpopulateTimeUnix(val, "Expires", &s.Expires) + delete(rawMsg, key) + case "nbf": + err = unpopulateTimeUnix(val, "NotBefore", &s.NotBefore) + delete(rawMsg, key) + case "updated": + err = unpopulateTimeUnix(val, "Updated", &s.Updated) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretCreateOrUpdateParameters. +func (s SecretCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretCreateOrUpdateParameters. +func (s *SecretCreateOrUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretListResult. +func (s SecretListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretListResult. +func (s *SecretListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretPatchParameters. +func (s SecretPatchParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretPatchParameters. +func (s *SecretPatchParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretPatchProperties. +func (s SecretPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", s.Attributes) + populate(objectMap, "contentType", s.ContentType) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretPatchProperties. +func (s *SecretPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attributes": + err = unpopulate(val, "Attributes", &s.Attributes) + delete(rawMsg, key) + case "contentType": + err = unpopulate(val, "ContentType", &s.ContentType) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretProperties. +func (s SecretProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", s.Attributes) + populate(objectMap, "contentType", s.ContentType) + populate(objectMap, "secretUri", s.SecretURI) + populate(objectMap, "secretUriWithVersion", s.SecretURIWithVersion) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretProperties. +func (s *SecretProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attributes": + err = unpopulate(val, "Attributes", &s.Attributes) + delete(rawMsg, key) + case "contentType": + err = unpopulate(val, "ContentType", &s.ContentType) + delete(rawMsg, key) + case "secretUri": + err = unpopulate(val, "SecretURI", &s.SecretURI) + delete(rawMsg, key) + case "secretUriWithVersion": + err = unpopulate(val, "SecretURIWithVersion", &s.SecretURIWithVersion) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. +func (s ServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", s.LogSpecifications) + populate(objectMap, "metricSpecifications", s.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. +func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &s.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &s.MetricSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Trigger. +func (t Trigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "timeAfterCreate", t.TimeAfterCreate) + populate(objectMap, "timeBeforeExpiry", t.TimeBeforeExpiry) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Trigger. +func (t *Trigger) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "timeAfterCreate": + err = unpopulate(val, "TimeAfterCreate", &t.TimeAfterCreate) + delete(rawMsg, key) + case "timeBeforeExpiry": + err = unpopulate(val, "TimeBeforeExpiry", &t.TimeBeforeExpiry) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Vault. +func (v Vault) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "systemData", v.SystemData) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Vault. +func (v *Vault) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &v.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultAccessPolicyParameters. +func (v VaultAccessPolicyParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultAccessPolicyParameters. +func (v *VaultAccessPolicyParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultAccessPolicyProperties. +func (v VaultAccessPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessPolicies", v.AccessPolicies) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultAccessPolicyProperties. +func (v *VaultAccessPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessPolicies": + err = unpopulate(val, "AccessPolicies", &v.AccessPolicies) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultCheckNameAvailabilityParameters. +func (v VaultCheckNameAvailabilityParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", v.Name) + objectMap["type"] = "Microsoft.KeyVault/vaults" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultCheckNameAvailabilityParameters. +func (v *VaultCheckNameAvailabilityParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultCreateOrUpdateParameters. +func (v VaultCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", v.Location) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultCreateOrUpdateParameters. +func (v *VaultCreateOrUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultListResult. +func (v VaultListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultListResult. +func (v *VaultListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultPatchParameters. +func (v VaultPatchParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultPatchParameters. +func (v *VaultPatchParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultPatchProperties. +func (v VaultPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessPolicies", v.AccessPolicies) + populate(objectMap, "createMode", v.CreateMode) + populate(objectMap, "enablePurgeProtection", v.EnablePurgeProtection) + populate(objectMap, "enableRbacAuthorization", v.EnableRbacAuthorization) + populate(objectMap, "enableSoftDelete", v.EnableSoftDelete) + populate(objectMap, "enabledForDeployment", v.EnabledForDeployment) + populate(objectMap, "enabledForDiskEncryption", v.EnabledForDiskEncryption) + populate(objectMap, "enabledForTemplateDeployment", v.EnabledForTemplateDeployment) + populate(objectMap, "networkAcls", v.NetworkACLs) + populate(objectMap, "publicNetworkAccess", v.PublicNetworkAccess) + populate(objectMap, "sku", v.SKU) + populate(objectMap, "softDeleteRetentionInDays", v.SoftDeleteRetentionInDays) + populate(objectMap, "tenantId", v.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultPatchProperties. +func (v *VaultPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessPolicies": + err = unpopulate(val, "AccessPolicies", &v.AccessPolicies) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &v.CreateMode) + delete(rawMsg, key) + case "enablePurgeProtection": + err = unpopulate(val, "EnablePurgeProtection", &v.EnablePurgeProtection) + delete(rawMsg, key) + case "enableRbacAuthorization": + err = unpopulate(val, "EnableRbacAuthorization", &v.EnableRbacAuthorization) + delete(rawMsg, key) + case "enableSoftDelete": + err = unpopulate(val, "EnableSoftDelete", &v.EnableSoftDelete) + delete(rawMsg, key) + case "enabledForDeployment": + err = unpopulate(val, "EnabledForDeployment", &v.EnabledForDeployment) + delete(rawMsg, key) + case "enabledForDiskEncryption": + err = unpopulate(val, "EnabledForDiskEncryption", &v.EnabledForDiskEncryption) + delete(rawMsg, key) + case "enabledForTemplateDeployment": + err = unpopulate(val, "EnabledForTemplateDeployment", &v.EnabledForTemplateDeployment) + delete(rawMsg, key) + case "networkAcls": + err = unpopulate(val, "NetworkACLs", &v.NetworkACLs) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &v.PublicNetworkAccess) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &v.SKU) + delete(rawMsg, key) + case "softDeleteRetentionInDays": + err = unpopulate(val, "SoftDeleteRetentionInDays", &v.SoftDeleteRetentionInDays) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &v.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultProperties. +func (v VaultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessPolicies", v.AccessPolicies) + populate(objectMap, "createMode", v.CreateMode) + populate(objectMap, "enablePurgeProtection", v.EnablePurgeProtection) + populate(objectMap, "enableRbacAuthorization", v.EnableRbacAuthorization) + populate(objectMap, "enableSoftDelete", v.EnableSoftDelete) + populate(objectMap, "enabledForDeployment", v.EnabledForDeployment) + populate(objectMap, "enabledForDiskEncryption", v.EnabledForDiskEncryption) + populate(objectMap, "enabledForTemplateDeployment", v.EnabledForTemplateDeployment) + populate(objectMap, "hsmPoolResourceId", v.HsmPoolResourceID) + populate(objectMap, "networkAcls", v.NetworkACLs) + populate(objectMap, "privateEndpointConnections", v.PrivateEndpointConnections) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "publicNetworkAccess", v.PublicNetworkAccess) + populate(objectMap, "sku", v.SKU) + populate(objectMap, "softDeleteRetentionInDays", v.SoftDeleteRetentionInDays) + populate(objectMap, "tenantId", v.TenantID) + populate(objectMap, "vaultUri", v.VaultURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultProperties. +func (v *VaultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessPolicies": + err = unpopulate(val, "AccessPolicies", &v.AccessPolicies) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &v.CreateMode) + delete(rawMsg, key) + case "enablePurgeProtection": + err = unpopulate(val, "EnablePurgeProtection", &v.EnablePurgeProtection) + delete(rawMsg, key) + case "enableRbacAuthorization": + err = unpopulate(val, "EnableRbacAuthorization", &v.EnableRbacAuthorization) + delete(rawMsg, key) + case "enableSoftDelete": + err = unpopulate(val, "EnableSoftDelete", &v.EnableSoftDelete) + delete(rawMsg, key) + case "enabledForDeployment": + err = unpopulate(val, "EnabledForDeployment", &v.EnabledForDeployment) + delete(rawMsg, key) + case "enabledForDiskEncryption": + err = unpopulate(val, "EnabledForDiskEncryption", &v.EnabledForDiskEncryption) + delete(rawMsg, key) + case "enabledForTemplateDeployment": + err = unpopulate(val, "EnabledForTemplateDeployment", &v.EnabledForTemplateDeployment) + delete(rawMsg, key) + case "hsmPoolResourceId": + err = unpopulate(val, "HsmPoolResourceID", &v.HsmPoolResourceID) + delete(rawMsg, key) + case "networkAcls": + err = unpopulate(val, "NetworkACLs", &v.NetworkACLs) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &v.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &v.PublicNetworkAccess) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &v.SKU) + delete(rawMsg, key) + case "softDeleteRetentionInDays": + err = unpopulate(val, "SoftDeleteRetentionInDays", &v.SoftDeleteRetentionInDays) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &v.TenantID) + delete(rawMsg, key) + case "vaultUri": + err = unpopulate(val, "VaultURI", &v.VaultURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRule. +func (v VirtualNetworkRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "ignoreMissingVnetServiceEndpoint", v.IgnoreMissingVnetServiceEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRule. +func (v *VirtualNetworkRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "ignoreMissingVnetServiceEndpoint": + err = unpopulate(val, "IgnoreMissingVnetServiceEndpoint", &v.IgnoreMissingVnetServiceEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateByteArray(m map[string]any, k string, b []byte, f runtime.Base64Encoding) { + if azcore.IsNullValue(b) { + m[k] = nil + } else if len(b) == 0 { + return + } else { + m[k] = runtime.EncodeByteArray(b, f) + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_operations_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go index 491d2b4d7..3b7216f1d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -12,8 +13,6 @@ import ( "context" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -22,36 +21,27 @@ import ( // OperationsClient contains the methods for the Operations group. // Don't use this type directly, use NewOperationsClient() instead. type OperationsClient struct { - host string - pl runtime.Pipeline + internal *arm.Client } // NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".OperationsClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &OperationsClient{ - host: ep, - pl: pl, + internal: cl, } return client, nil } // NewListPager - Lists all of the available Key Vault Rest API operations. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// +// Generated from API version 2023-02-01 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { @@ -68,7 +58,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption if err != nil { return OperationsClientListResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return OperationsClientListResponse{}, err } @@ -83,12 +73,12 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption // listCreateRequest creates the List request. func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { urlPath := "/providers/Microsoft.KeyVault/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_privateendpointconnections_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go index 679f54da3..5d48db74b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -26,65 +25,58 @@ import ( // PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. // Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead. type PrivateEndpointConnectionsClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".PrivateEndpointConnectionsClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &PrivateEndpointConnectionsClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } // BeginDelete - Deletes the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the key vault. -// vaultName - The name of the key vault. -// privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. -// options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the key vault. +// - vaultName - The name of the key vault. +// - privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. +// - options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, options) if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // Delete - Deletes the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -113,12 +105,12 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -126,18 +118,19 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the key vault. -// vaultName - The name of the key vault. -// privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. -// options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the key vault. +// - vaultName - The name of the key vault. +// - privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. +// - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } @@ -166,12 +159,12 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,12 +181,12 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListByResourcePager - The List operation gets information about the private endpoint connections associated with the // vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the key vault. -// vaultName - The name of the key vault. -// options - PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.ListByResource -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the key vault. +// - vaultName - The name of the key vault. +// - options - PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByResourcePager +// method. func (client *PrivateEndpointConnectionsClient) NewListByResourcePager(resourceGroupName string, vaultName string, options *PrivateEndpointConnectionsClientListByResourceOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByResourceResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListByResourceResponse]{ More: func(page PrivateEndpointConnectionsClientListByResourceResponse) bool { @@ -210,7 +203,7 @@ func (client *PrivateEndpointConnectionsClient) NewListByResourcePager(resourceG if err != nil { return PrivateEndpointConnectionsClientListByResourceResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientListByResourceResponse{}, err } @@ -237,12 +230,12 @@ func (client *PrivateEndpointConnectionsClient) listByResourceCreateRequest(ctx return nil, errors.New("parameter vaultName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,19 +252,20 @@ func (client *PrivateEndpointConnectionsClient) listByResourceHandleResponse(res // Put - Updates the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the key vault. -// vaultName - The name of the key vault. -// privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. -// properties - The intended state of private endpoint connection. -// options - PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the key vault. +// - vaultName - The name of the key vault. +// - privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. +// - properties - The intended state of private endpoint connection. +// - options - PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put +// method. func (client *PrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientPutOptions) (PrivateEndpointConnectionsClientPutResponse, error) { req, err := client.putCreateRequest(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, properties, options) if err != nil { return PrivateEndpointConnectionsClientPutResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientPutResponse{}, err } @@ -300,12 +294,12 @@ func (client *PrivateEndpointConnectionsClient) putCreateRequest(ctx context.Con return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, properties) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_privatelinkresources_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go index 26b4acbfc..731c8aa54 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -25,49 +24,41 @@ import ( // PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. // Don't use this type directly, use NewPrivateLinkResourcesClient() instead. type PrivateLinkResourcesClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".PrivateLinkResourcesClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &PrivateLinkResourcesClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } // ListByVault - Gets the private link resources supported for the key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the key vault. -// vaultName - The name of the key vault. -// options - PrivateLinkResourcesClientListByVaultOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByVault -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the key vault. +// - vaultName - The name of the key vault. +// - options - PrivateLinkResourcesClientListByVaultOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByVault +// method. func (client *PrivateLinkResourcesClient) ListByVault(ctx context.Context, resourceGroupName string, vaultName string, options *PrivateLinkResourcesClientListByVaultOptions) (PrivateLinkResourcesClientListByVaultResponse, error) { req, err := client.listByVaultCreateRequest(ctx, resourceGroupName, vaultName, options) if err != nil { return PrivateLinkResourcesClientListByVaultResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientListByVaultResponse{}, err } @@ -92,12 +83,12 @@ func (client *PrivateLinkResourcesClient) listByVaultCreateRequest(ctx context.C return nil, errors.New("parameter vaultName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/response_types.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_response_types.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/response_types.go index 7513e1403..a1fd185c6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/response_types.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -23,17 +24,17 @@ type KeysClientGetVersionResponse struct { Key } -// KeysClientListResponse contains the response from method KeysClient.List. +// KeysClientListResponse contains the response from method KeysClient.NewListPager. type KeysClientListResponse struct { KeyListResult } -// KeysClientListVersionsResponse contains the response from method KeysClient.ListVersions. +// KeysClientListVersionsResponse contains the response from method KeysClient.NewListVersionsPager. type KeysClientListVersionsResponse struct { KeyListResult } -// MHSMPrivateEndpointConnectionsClientDeleteResponse contains the response from method MHSMPrivateEndpointConnectionsClient.Delete. +// MHSMPrivateEndpointConnectionsClientDeleteResponse contains the response from method MHSMPrivateEndpointConnectionsClient.BeginDelete. type MHSMPrivateEndpointConnectionsClientDeleteResponse struct { MHSMPrivateEndpointConnection } @@ -43,7 +44,7 @@ type MHSMPrivateEndpointConnectionsClientGetResponse struct { MHSMPrivateEndpointConnection } -// MHSMPrivateEndpointConnectionsClientListByResourceResponse contains the response from method MHSMPrivateEndpointConnectionsClient.ListByResource. +// MHSMPrivateEndpointConnectionsClientListByResourceResponse contains the response from method MHSMPrivateEndpointConnectionsClient.NewListByResourcePager. type MHSMPrivateEndpointConnectionsClientListByResourceResponse struct { MHSMPrivateEndpointConnectionsListResult } @@ -63,12 +64,47 @@ type MHSMPrivateLinkResourcesClientListByMHSMResourceResponse struct { MHSMPrivateLinkResourceListResult } -// ManagedHsmsClientCreateOrUpdateResponse contains the response from method ManagedHsmsClient.CreateOrUpdate. +// MHSMRegionsClientListByResourceResponse contains the response from method MHSMRegionsClient.NewListByResourcePager. +type MHSMRegionsClientListByResourceResponse struct { + MHSMRegionsListResult +} + +// ManagedHsmKeysClientCreateIfNotExistResponse contains the response from method ManagedHsmKeysClient.CreateIfNotExist. +type ManagedHsmKeysClientCreateIfNotExistResponse struct { + ManagedHsmKey +} + +// ManagedHsmKeysClientGetResponse contains the response from method ManagedHsmKeysClient.Get. +type ManagedHsmKeysClientGetResponse struct { + ManagedHsmKey +} + +// ManagedHsmKeysClientGetVersionResponse contains the response from method ManagedHsmKeysClient.GetVersion. +type ManagedHsmKeysClientGetVersionResponse struct { + ManagedHsmKey +} + +// ManagedHsmKeysClientListResponse contains the response from method ManagedHsmKeysClient.NewListPager. +type ManagedHsmKeysClientListResponse struct { + ManagedHsmKeyListResult +} + +// ManagedHsmKeysClientListVersionsResponse contains the response from method ManagedHsmKeysClient.NewListVersionsPager. +type ManagedHsmKeysClientListVersionsResponse struct { + ManagedHsmKeyListResult +} + +// ManagedHsmsClientCheckMhsmNameAvailabilityResponse contains the response from method ManagedHsmsClient.CheckMhsmNameAvailability. +type ManagedHsmsClientCheckMhsmNameAvailabilityResponse struct { + CheckMhsmNameAvailabilityResult +} + +// ManagedHsmsClientCreateOrUpdateResponse contains the response from method ManagedHsmsClient.BeginCreateOrUpdate. type ManagedHsmsClientCreateOrUpdateResponse struct { ManagedHsm } -// ManagedHsmsClientDeleteResponse contains the response from method ManagedHsmsClient.Delete. +// ManagedHsmsClientDeleteResponse contains the response from method ManagedHsmsClient.BeginDelete. type ManagedHsmsClientDeleteResponse struct { // placeholder for future response values } @@ -83,37 +119,37 @@ type ManagedHsmsClientGetResponse struct { ManagedHsm } -// ManagedHsmsClientListByResourceGroupResponse contains the response from method ManagedHsmsClient.ListByResourceGroup. +// ManagedHsmsClientListByResourceGroupResponse contains the response from method ManagedHsmsClient.NewListByResourceGroupPager. type ManagedHsmsClientListByResourceGroupResponse struct { ManagedHsmListResult } -// ManagedHsmsClientListBySubscriptionResponse contains the response from method ManagedHsmsClient.ListBySubscription. +// ManagedHsmsClientListBySubscriptionResponse contains the response from method ManagedHsmsClient.NewListBySubscriptionPager. type ManagedHsmsClientListBySubscriptionResponse struct { ManagedHsmListResult } -// ManagedHsmsClientListDeletedResponse contains the response from method ManagedHsmsClient.ListDeleted. +// ManagedHsmsClientListDeletedResponse contains the response from method ManagedHsmsClient.NewListDeletedPager. type ManagedHsmsClientListDeletedResponse struct { DeletedManagedHsmListResult } -// ManagedHsmsClientPurgeDeletedResponse contains the response from method ManagedHsmsClient.PurgeDeleted. +// ManagedHsmsClientPurgeDeletedResponse contains the response from method ManagedHsmsClient.BeginPurgeDeleted. type ManagedHsmsClientPurgeDeletedResponse struct { // placeholder for future response values } -// ManagedHsmsClientUpdateResponse contains the response from method ManagedHsmsClient.Update. +// ManagedHsmsClientUpdateResponse contains the response from method ManagedHsmsClient.BeginUpdate. type ManagedHsmsClientUpdateResponse struct { ManagedHsm } -// OperationsClientListResponse contains the response from method OperationsClient.List. +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { OperationListResult } -// PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete. +// PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete. type PrivateEndpointConnectionsClientDeleteResponse struct { PrivateEndpointConnection } @@ -123,7 +159,7 @@ type PrivateEndpointConnectionsClientGetResponse struct { PrivateEndpointConnection } -// PrivateEndpointConnectionsClientListByResourceResponse contains the response from method PrivateEndpointConnectionsClient.ListByResource. +// PrivateEndpointConnectionsClientListByResourceResponse contains the response from method PrivateEndpointConnectionsClient.NewListByResourcePager. type PrivateEndpointConnectionsClientListByResourceResponse struct { PrivateEndpointConnectionListResult } @@ -153,7 +189,7 @@ type SecretsClientGetResponse struct { Secret } -// SecretsClientListResponse contains the response from method SecretsClient.List. +// SecretsClientListResponse contains the response from method SecretsClient.NewListPager. type SecretsClientListResponse struct { SecretListResult } @@ -168,7 +204,7 @@ type VaultsClientCheckNameAvailabilityResponse struct { CheckNameAvailabilityResult } -// VaultsClientCreateOrUpdateResponse contains the response from method VaultsClient.CreateOrUpdate. +// VaultsClientCreateOrUpdateResponse contains the response from method VaultsClient.BeginCreateOrUpdate. type VaultsClientCreateOrUpdateResponse struct { Vault } @@ -188,27 +224,27 @@ type VaultsClientGetResponse struct { Vault } -// VaultsClientListByResourceGroupResponse contains the response from method VaultsClient.ListByResourceGroup. +// VaultsClientListByResourceGroupResponse contains the response from method VaultsClient.NewListByResourceGroupPager. type VaultsClientListByResourceGroupResponse struct { VaultListResult } -// VaultsClientListBySubscriptionResponse contains the response from method VaultsClient.ListBySubscription. +// VaultsClientListBySubscriptionResponse contains the response from method VaultsClient.NewListBySubscriptionPager. type VaultsClientListBySubscriptionResponse struct { VaultListResult } -// VaultsClientListDeletedResponse contains the response from method VaultsClient.ListDeleted. +// VaultsClientListDeletedResponse contains the response from method VaultsClient.NewListDeletedPager. type VaultsClientListDeletedResponse struct { DeletedVaultListResult } -// VaultsClientListResponse contains the response from method VaultsClient.List. +// VaultsClientListResponse contains the response from method VaultsClient.NewListPager. type VaultsClientListResponse struct { ResourceListResult } -// VaultsClientPurgeDeletedResponse contains the response from method VaultsClient.PurgeDeleted. +// VaultsClientPurgeDeletedResponse contains the response from method VaultsClient.BeginPurgeDeleted. type VaultsClientPurgeDeletedResponse struct { // placeholder for future response values } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_secrets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_secrets_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go index fe357bbbd..cf43971e1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_secrets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -26,32 +25,23 @@ import ( // SecretsClient contains the methods for the Secrets group. // Don't use this type directly, use NewSecretsClient() instead. type SecretsClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewSecretsClient creates a new instance of SecretsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecretsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".SecretsClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &SecretsClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } @@ -60,18 +50,20 @@ func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, // internal use in ARM deployments. Users should use the data-plane REST service for interaction // with vault secrets. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - Name of the vault -// secretName - Name of the secret -// parameters - Parameters to create or update the secret -// options - SecretsClientCreateOrUpdateOptions contains the optional parameters for the SecretsClient.CreateOrUpdate method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - Name of the vault +// - secretName - Name of the secret. The value you provide may be copied globally for the purpose of running the service. The +// value provided should not include personally identifiable or sensitive information. +// - parameters - Parameters to create or update the secret +// - options - SecretsClientCreateOrUpdateOptions contains the optional parameters for the SecretsClient.CreateOrUpdate method. func (client *SecretsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, secretName string, parameters SecretCreateOrUpdateParameters, options *SecretsClientCreateOrUpdateOptions) (SecretsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, secretName, parameters, options) if err != nil { return SecretsClientCreateOrUpdateResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientCreateOrUpdateResponse{}, err } @@ -100,12 +92,12 @@ func (client *SecretsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,17 +115,18 @@ func (client *SecretsClient) createOrUpdateHandleResponse(resp *http.Response) ( // Get - Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane // REST service for interaction with vault secrets. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - The name of the vault. -// secretName - The name of the secret. -// options - SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - The name of the vault. +// - secretName - The name of the secret. +// - options - SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. func (client *SecretsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, secretName string, options *SecretsClientGetOptions) (SecretsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, secretName, options) if err != nil { return SecretsClientGetResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientGetResponse{}, err } @@ -162,12 +155,12 @@ func (client *SecretsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -185,11 +178,11 @@ func (client *SecretsClient) getHandleResponse(resp *http.Response) (SecretsClie // NewListPager - The List operation gets information about the secrets in a vault. NOTE: This API is intended for internal // use in ARM deployments. Users should use the data-plane REST service for interaction with // vault secrets. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - The name of the vault. -// options - SecretsClientListOptions contains the optional parameters for the SecretsClient.List method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - The name of the vault. +// - options - SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method. func (client *SecretsClient) NewListPager(resourceGroupName string, vaultName string, options *SecretsClientListOptions) *runtime.Pager[SecretsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SecretsClientListResponse]{ More: func(page SecretsClientListResponse) bool { @@ -206,7 +199,7 @@ func (client *SecretsClient) NewListPager(resourceGroupName string, vaultName st if err != nil { return SecretsClientListResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientListResponse{}, err } @@ -233,7 +226,7 @@ func (client *SecretsClient) listCreateRequest(ctx context.Context, resourceGrou return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -241,7 +234,7 @@ func (client *SecretsClient) listCreateRequest(ctx context.Context, resourceGrou if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,18 +252,19 @@ func (client *SecretsClient) listHandleResponse(resp *http.Response) (SecretsCli // Update - Update a secret in the specified subscription. NOTE: This API is intended for internal use in ARM deployments. // Users should use the data-plane REST service for interaction with vault secrets. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - Name of the vault -// secretName - Name of the secret -// parameters - Parameters to patch the secret -// options - SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - Name of the vault +// - secretName - Name of the secret +// - parameters - Parameters to patch the secret +// - options - SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. func (client *SecretsClient) Update(ctx context.Context, resourceGroupName string, vaultName string, secretName string, parameters SecretPatchParameters, options *SecretsClientUpdateOptions) (SecretsClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, vaultName, secretName, parameters, options) if err != nil { return SecretsClientUpdateResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientUpdateResponse{}, err } @@ -299,12 +293,12 @@ func (client *SecretsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_time_rfc3339.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go index 543471aa0..6b1097513 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -61,7 +62,7 @@ func (t *timeRFC3339) Parse(layout, value string) error { return err } -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { +func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_time_unix.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_time_unix.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go index 6ef891087..569805882 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_time_unix.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -36,7 +37,7 @@ func (t timeUnix) String() string { return fmt.Sprintf("%d", time.Time(t).Unix()) } -func populateTimeUnix(m map[string]interface{}, k string, t *time.Time) { +func populateTimeUnix(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_vaults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go similarity index 84% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_vaults_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go index 310e7d09f..b087a90a9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_vaults_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -26,48 +25,40 @@ import ( // VaultsClient contains the methods for the Vaults group. // Don't use this type directly, use NewVaultsClient() instead. type VaultsClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewVaultsClient creates a new instance of VaultsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVaultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VaultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".VaultsClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &VaultsClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } // CheckNameAvailability - Checks that the vault name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// vaultName - The name of the vault. -// options - VaultsClientCheckNameAvailabilityOptions contains the optional parameters for the VaultsClient.CheckNameAvailability -// method. +// +// Generated from API version 2023-02-01 +// - vaultName - The name of the vault. +// - options - VaultsClientCheckNameAvailabilityOptions contains the optional parameters for the VaultsClient.CheckNameAvailability +// method. func (client *VaultsClient) CheckNameAvailability(ctx context.Context, vaultName VaultCheckNameAvailabilityParameters, options *VaultsClientCheckNameAvailabilityOptions) (VaultsClientCheckNameAvailabilityResponse, error) { req, err := client.checkNameAvailabilityCreateRequest(ctx, vaultName, options) if err != nil { return VaultsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientCheckNameAvailabilityResponse{}, err } @@ -84,12 +75,12 @@ func (client *VaultsClient) checkNameAvailabilityCreateRequest(ctx context.Conte return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vaultName) @@ -106,33 +97,35 @@ func (client *VaultsClient) checkNameAvailabilityHandleResponse(resp *http.Respo // BeginCreateOrUpdate - Create or update a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the server belongs. -// vaultName - Name of the vault -// parameters - Parameters to create or update the vault -// options - VaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the VaultsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the server belongs. +// - vaultName - Name of the vault +// - parameters - Parameters to create or update the vault +// - options - VaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the VaultsClient.BeginCreateOrUpdate +// method. func (client *VaultsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultCreateOrUpdateParameters, options *VaultsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VaultsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, vaultName, parameters, options) if err != nil { return nil, err } - return runtime.NewPoller[VaultsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[VaultsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[VaultsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[VaultsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // CreateOrUpdate - Create or update a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *VaultsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultCreateOrUpdateParameters, options *VaultsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -157,12 +150,12 @@ func (client *VaultsClient) createOrUpdateCreateRequest(ctx context.Context, res return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -170,16 +163,17 @@ func (client *VaultsClient) createOrUpdateCreateRequest(ctx context.Context, res // Delete - Deletes the specified Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - The name of the vault to delete -// options - VaultsClientDeleteOptions contains the optional parameters for the VaultsClient.Delete method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - The name of the vault to delete +// - options - VaultsClientDeleteOptions contains the optional parameters for the VaultsClient.Delete method. func (client *VaultsClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, options *VaultsClientDeleteOptions) (VaultsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, options) if err != nil { return VaultsClientDeleteResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientDeleteResponse{}, err } @@ -204,12 +198,12 @@ func (client *VaultsClient) deleteCreateRequest(ctx context.Context, resourceGro return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,16 +211,17 @@ func (client *VaultsClient) deleteCreateRequest(ctx context.Context, resourceGro // Get - Gets the specified Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - The name of the vault. -// options - VaultsClientGetOptions contains the optional parameters for the VaultsClient.Get method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - The name of the vault. +// - options - VaultsClientGetOptions contains the optional parameters for the VaultsClient.Get method. func (client *VaultsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, options *VaultsClientGetOptions) (VaultsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, options) if err != nil { return VaultsClientGetResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientGetResponse{}, err } @@ -251,12 +246,12 @@ func (client *VaultsClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -273,16 +268,17 @@ func (client *VaultsClient) getHandleResponse(resp *http.Response) (VaultsClient // GetDeleted - Gets the deleted Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// vaultName - The name of the vault. -// location - The location of the deleted vault. -// options - VaultsClientGetDeletedOptions contains the optional parameters for the VaultsClient.GetDeleted method. +// +// Generated from API version 2023-02-01 +// - vaultName - The name of the vault. +// - location - The location of the deleted vault. +// - options - VaultsClientGetDeletedOptions contains the optional parameters for the VaultsClient.GetDeleted method. func (client *VaultsClient) GetDeleted(ctx context.Context, vaultName string, location string, options *VaultsClientGetDeletedOptions) (VaultsClientGetDeletedResponse, error) { req, err := client.getDeletedCreateRequest(ctx, vaultName, location, options) if err != nil { return VaultsClientGetDeletedResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientGetDeletedResponse{}, err } @@ -307,12 +303,12 @@ func (client *VaultsClient) getDeletedCreateRequest(ctx context.Context, vaultNa return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -328,9 +324,9 @@ func (client *VaultsClient) getDeletedHandleResponse(resp *http.Response) (Vault } // NewListPager - The List operation gets information about the vaults associated with the subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - VaultsClientListOptions contains the optional parameters for the VaultsClient.List method. +// +// Generated from API version 2023-02-01 +// - options - VaultsClientListOptions contains the optional parameters for the VaultsClient.NewListPager method. func (client *VaultsClient) NewListPager(options *VaultsClientListOptions) *runtime.Pager[VaultsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VaultsClientListResponse]{ More: func(page VaultsClientListResponse) bool { @@ -347,7 +343,7 @@ func (client *VaultsClient) NewListPager(options *VaultsClientListOptions) *runt if err != nil { return VaultsClientListResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientListResponse{}, err } @@ -366,7 +362,7 @@ func (client *VaultsClient) listCreateRequest(ctx context.Context, options *Vaul return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -392,11 +388,11 @@ func (client *VaultsClient) listHandleResponse(resp *http.Response) (VaultsClien // NewListByResourceGroupPager - The List operation gets information about the vaults associated with the subscription and // within the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// options - VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.ListByResourceGroup -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - options - VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.NewListByResourceGroupPager +// method. func (client *VaultsClient) NewListByResourceGroupPager(resourceGroupName string, options *VaultsClientListByResourceGroupOptions) *runtime.Pager[VaultsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[VaultsClientListByResourceGroupResponse]{ More: func(page VaultsClientListByResourceGroupResponse) bool { @@ -413,7 +409,7 @@ func (client *VaultsClient) NewListByResourceGroupPager(resourceGroupName string if err != nil { return VaultsClientListByResourceGroupResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientListByResourceGroupResponse{}, err } @@ -436,7 +432,7 @@ func (client *VaultsClient) listByResourceGroupCreateRequest(ctx context.Context return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -444,7 +440,7 @@ func (client *VaultsClient) listByResourceGroupCreateRequest(ctx context.Context if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -460,10 +456,10 @@ func (client *VaultsClient) listByResourceGroupHandleResponse(resp *http.Respons } // NewListBySubscriptionPager - The List operation gets information about the vaults associated with the subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.ListBySubscription -// method. +// +// Generated from API version 2023-02-01 +// - options - VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.NewListBySubscriptionPager +// method. func (client *VaultsClient) NewListBySubscriptionPager(options *VaultsClientListBySubscriptionOptions) *runtime.Pager[VaultsClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[VaultsClientListBySubscriptionResponse]{ More: func(page VaultsClientListBySubscriptionResponse) bool { @@ -480,7 +476,7 @@ func (client *VaultsClient) NewListBySubscriptionPager(options *VaultsClientList if err != nil { return VaultsClientListBySubscriptionResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientListBySubscriptionResponse{}, err } @@ -499,7 +495,7 @@ func (client *VaultsClient) listBySubscriptionCreateRequest(ctx context.Context, return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -507,7 +503,7 @@ func (client *VaultsClient) listBySubscriptionCreateRequest(ctx context.Context, if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -523,9 +519,9 @@ func (client *VaultsClient) listBySubscriptionHandleResponse(resp *http.Response } // NewListDeletedPager - Gets information about the deleted vaults in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.ListDeleted method. +// +// Generated from API version 2023-02-01 +// - options - VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.NewListDeletedPager method. func (client *VaultsClient) NewListDeletedPager(options *VaultsClientListDeletedOptions) *runtime.Pager[VaultsClientListDeletedResponse] { return runtime.NewPager(runtime.PagingHandler[VaultsClientListDeletedResponse]{ More: func(page VaultsClientListDeletedResponse) bool { @@ -542,7 +538,7 @@ func (client *VaultsClient) NewListDeletedPager(options *VaultsClientListDeleted if err != nil { return VaultsClientListDeletedResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientListDeletedResponse{}, err } @@ -561,12 +557,12 @@ func (client *VaultsClient) listDeletedCreateRequest(ctx context.Context, option return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -583,32 +579,34 @@ func (client *VaultsClient) listDeletedHandleResponse(resp *http.Response) (Vaul // BeginPurgeDeleted - Permanently deletes the specified vault. aka Purges the deleted Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// vaultName - The name of the soft-deleted vault. -// location - The location of the soft-deleted vault. -// options - VaultsClientBeginPurgeDeletedOptions contains the optional parameters for the VaultsClient.BeginPurgeDeleted -// method. +// +// Generated from API version 2023-02-01 +// - vaultName - The name of the soft-deleted vault. +// - location - The location of the soft-deleted vault. +// - options - VaultsClientBeginPurgeDeletedOptions contains the optional parameters for the VaultsClient.BeginPurgeDeleted +// method. func (client *VaultsClient) BeginPurgeDeleted(ctx context.Context, vaultName string, location string, options *VaultsClientBeginPurgeDeletedOptions) (*runtime.Poller[VaultsClientPurgeDeletedResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.purgeDeleted(ctx, vaultName, location, options) if err != nil { return nil, err } - return runtime.NewPoller[VaultsClientPurgeDeletedResponse](resp, client.pl, nil) + return runtime.NewPoller[VaultsClientPurgeDeletedResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[VaultsClientPurgeDeletedResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[VaultsClientPurgeDeletedResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // PurgeDeleted - Permanently deletes the specified vault. aka Purges the deleted Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *VaultsClient) purgeDeleted(ctx context.Context, vaultName string, location string, options *VaultsClientBeginPurgeDeletedOptions) (*http.Response, error) { req, err := client.purgeDeletedCreateRequest(ctx, vaultName, location, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -633,12 +631,12 @@ func (client *VaultsClient) purgeDeletedCreateRequest(ctx context.Context, vault return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -646,17 +644,18 @@ func (client *VaultsClient) purgeDeletedCreateRequest(ctx context.Context, vault // Update - Update a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the server belongs. -// vaultName - Name of the vault -// parameters - Parameters to patch the vault -// options - VaultsClientUpdateOptions contains the optional parameters for the VaultsClient.Update method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the server belongs. +// - vaultName - Name of the vault +// - parameters - Parameters to patch the vault +// - options - VaultsClientUpdateOptions contains the optional parameters for the VaultsClient.Update method. func (client *VaultsClient) Update(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultPatchParameters, options *VaultsClientUpdateOptions) (VaultsClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) if err != nil { return VaultsClientUpdateResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientUpdateResponse{}, err } @@ -681,12 +680,12 @@ func (client *VaultsClient) updateCreateRequest(ctx context.Context, resourceGro return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -703,19 +702,20 @@ func (client *VaultsClient) updateHandleResponse(resp *http.Response) (VaultsCli // UpdateAccessPolicy - Update access policies in a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - Name of the vault -// operationKind - Name of the operation -// parameters - Access policy to merge into the vault -// options - VaultsClientUpdateAccessPolicyOptions contains the optional parameters for the VaultsClient.UpdateAccessPolicy -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - Name of the vault +// - operationKind - Name of the operation +// - parameters - Access policy to merge into the vault +// - options - VaultsClientUpdateAccessPolicyOptions contains the optional parameters for the VaultsClient.UpdateAccessPolicy +// method. func (client *VaultsClient) UpdateAccessPolicy(ctx context.Context, resourceGroupName string, vaultName string, operationKind AccessPolicyUpdateKind, parameters VaultAccessPolicyParameters, options *VaultsClientUpdateAccessPolicyOptions) (VaultsClientUpdateAccessPolicyResponse, error) { req, err := client.updateAccessPolicyCreateRequest(ctx, resourceGroupName, vaultName, operationKind, parameters, options) if err != nil { return VaultsClientUpdateAccessPolicyResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientUpdateAccessPolicyResponse{}, err } @@ -744,12 +744,12 @@ func (client *VaultsClient) updateAccessPolicyCreateRequest(ctx context.Context, return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models_serde.go deleted file mode 100644 index 95d14a8bc..000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models_serde.go +++ /dev/null @@ -1,581 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armkeyvault - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type Attributes. -func (a Attributes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeUnix(objectMap, "created", a.Created) - populate(objectMap, "enabled", a.Enabled) - populateTimeUnix(objectMap, "exp", a.Expires) - populateTimeUnix(objectMap, "nbf", a.NotBefore) - populateTimeUnix(objectMap, "updated", a.Updated) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Attributes. -func (a *Attributes) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "created": - err = unpopulateTimeUnix(val, "Created", &a.Created) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &a.Enabled) - delete(rawMsg, key) - case "exp": - err = unpopulateTimeUnix(val, "Expires", &a.Expires) - delete(rawMsg, key) - case "nbf": - err = unpopulateTimeUnix(val, "NotBefore", &a.NotBefore) - delete(rawMsg, key) - case "updated": - err = unpopulateTimeUnix(val, "Updated", &a.Updated) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedManagedHsmProperties. -func (d *DeletedManagedHsmProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deletionDate": - err = unpopulateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "mhsmId": - err = unpopulate(val, "MhsmID", &d.MhsmID) - delete(rawMsg, key) - case "purgeProtectionEnabled": - err = unpopulate(val, "PurgeProtectionEnabled", &d.PurgeProtectionEnabled) - delete(rawMsg, key) - case "scheduledPurgeDate": - err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &d.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedVaultProperties. -func (d *DeletedVaultProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deletionDate": - err = unpopulateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "purgeProtectionEnabled": - err = unpopulate(val, "PurgeProtectionEnabled", &d.PurgeProtectionEnabled) - delete(rawMsg, key) - case "scheduledPurgeDate": - err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &d.Tags) - delete(rawMsg, key) - case "vaultId": - err = unpopulate(val, "VaultID", &d.VaultID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Key. -func (k Key) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", k.ID) - populate(objectMap, "location", k.Location) - populate(objectMap, "name", k.Name) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "tags", k.Tags) - populate(objectMap, "type", k.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type KeyCreateParameters. -func (k KeyCreateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "tags", k.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type KeyProperties. -func (k KeyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "attributes", k.Attributes) - populate(objectMap, "curveName", k.CurveName) - populate(objectMap, "keyOps", k.KeyOps) - populate(objectMap, "keySize", k.KeySize) - populate(objectMap, "keyUri", k.KeyURI) - populate(objectMap, "keyUriWithVersion", k.KeyURIWithVersion) - populate(objectMap, "kty", k.Kty) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MHSMNetworkRuleSet. -func (m MHSMNetworkRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bypass", m.Bypass) - populate(objectMap, "defaultAction", m.DefaultAction) - populate(objectMap, "ipRules", m.IPRules) - populate(objectMap, "virtualNetworkRules", m.VirtualNetworkRules) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateEndpointConnection. -func (m MHSMPrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", m.Etag) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateLinkResource. -func (m MHSMPrivateLinkResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateLinkResourceProperties. -func (m MHSMPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupId", m.GroupID) - populate(objectMap, "requiredMembers", m.RequiredMembers) - populate(objectMap, "requiredZoneNames", m.RequiredZoneNames) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedHsm. -func (m ManagedHsm) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedHsmProperties. -func (m ManagedHsmProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "createMode", m.CreateMode) - populate(objectMap, "enablePurgeProtection", m.EnablePurgeProtection) - populate(objectMap, "enableSoftDelete", m.EnableSoftDelete) - populate(objectMap, "hsmUri", m.HsmURI) - populate(objectMap, "initialAdminObjectIds", m.InitialAdminObjectIDs) - populate(objectMap, "networkAcls", m.NetworkACLs) - populate(objectMap, "privateEndpointConnections", m.PrivateEndpointConnections) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "publicNetworkAccess", m.PublicNetworkAccess) - populateTimeRFC3339(objectMap, "scheduledPurgeDate", m.ScheduledPurgeDate) - populate(objectMap, "softDeleteRetentionInDays", m.SoftDeleteRetentionInDays) - populate(objectMap, "statusMessage", m.StatusMessage) - populate(objectMap, "tenantId", m.TenantID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmProperties. -func (m *ManagedHsmProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createMode": - err = unpopulate(val, "CreateMode", &m.CreateMode) - delete(rawMsg, key) - case "enablePurgeProtection": - err = unpopulate(val, "EnablePurgeProtection", &m.EnablePurgeProtection) - delete(rawMsg, key) - case "enableSoftDelete": - err = unpopulate(val, "EnableSoftDelete", &m.EnableSoftDelete) - delete(rawMsg, key) - case "hsmUri": - err = unpopulate(val, "HsmURI", &m.HsmURI) - delete(rawMsg, key) - case "initialAdminObjectIds": - err = unpopulate(val, "InitialAdminObjectIDs", &m.InitialAdminObjectIDs) - delete(rawMsg, key) - case "networkAcls": - err = unpopulate(val, "NetworkACLs", &m.NetworkACLs) - delete(rawMsg, key) - case "privateEndpointConnections": - err = unpopulate(val, "PrivateEndpointConnections", &m.PrivateEndpointConnections) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &m.PublicNetworkAccess) - delete(rawMsg, key) - case "scheduledPurgeDate": - err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &m.ScheduledPurgeDate) - delete(rawMsg, key) - case "softDeleteRetentionInDays": - err = unpopulate(val, "SoftDeleteRetentionInDays", &m.SoftDeleteRetentionInDays) - delete(rawMsg, key) - case "statusMessage": - err = unpopulate(val, "StatusMessage", &m.StatusMessage) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &m.TenantID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedHsmResource. -func (m ManagedHsmResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkRuleSet. -func (n NetworkRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bypass", n.Bypass) - populate(objectMap, "defaultAction", n.DefaultAction) - populate(objectMap, "ipRules", n.IPRules) - populate(objectMap, "virtualNetworkRules", n.VirtualNetworkRules) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Permissions. -func (p Permissions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "certificates", p.Certificates) - populate(objectMap, "keys", p.Keys) - populate(objectMap, "secrets", p.Secrets) - populate(objectMap, "storage", p.Storage) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. -func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. -func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. -func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupId", p.GroupID) - populate(objectMap, "requiredMembers", p.RequiredMembers) - populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Secret. -func (s Secret) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SecretAttributes. -func (s SecretAttributes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeUnix(objectMap, "created", s.Created) - populate(objectMap, "enabled", s.Enabled) - populateTimeUnix(objectMap, "exp", s.Expires) - populateTimeUnix(objectMap, "nbf", s.NotBefore) - populateTimeUnix(objectMap, "updated", s.Updated) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecretAttributes. -func (s *SecretAttributes) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "created": - err = unpopulateTimeUnix(val, "Created", &s.Created) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &s.Enabled) - delete(rawMsg, key) - case "exp": - err = unpopulateTimeUnix(val, "Expires", &s.Expires) - delete(rawMsg, key) - case "nbf": - err = unpopulateTimeUnix(val, "NotBefore", &s.NotBefore) - delete(rawMsg, key) - case "updated": - err = unpopulateTimeUnix(val, "Updated", &s.Updated) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecretCreateOrUpdateParameters. -func (s SecretCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SecretPatchParameters. -func (s SecretPatchParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VaultAccessPolicyProperties. -func (v VaultAccessPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accessPolicies", v.AccessPolicies) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VaultCreateOrUpdateParameters. -func (v VaultCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "location", v.Location) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VaultPatchParameters. -func (v VaultPatchParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VaultPatchProperties. -func (v VaultPatchProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accessPolicies", v.AccessPolicies) - populate(objectMap, "createMode", v.CreateMode) - populate(objectMap, "enablePurgeProtection", v.EnablePurgeProtection) - populate(objectMap, "enableRbacAuthorization", v.EnableRbacAuthorization) - populate(objectMap, "enableSoftDelete", v.EnableSoftDelete) - populate(objectMap, "enabledForDeployment", v.EnabledForDeployment) - populate(objectMap, "enabledForDiskEncryption", v.EnabledForDiskEncryption) - populate(objectMap, "enabledForTemplateDeployment", v.EnabledForTemplateDeployment) - populate(objectMap, "networkAcls", v.NetworkACLs) - populate(objectMap, "publicNetworkAccess", v.PublicNetworkAccess) - populate(objectMap, "sku", v.SKU) - populate(objectMap, "softDeleteRetentionInDays", v.SoftDeleteRetentionInDays) - populate(objectMap, "tenantId", v.TenantID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VaultProperties. -func (v VaultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accessPolicies", v.AccessPolicies) - populate(objectMap, "createMode", v.CreateMode) - populate(objectMap, "enablePurgeProtection", v.EnablePurgeProtection) - populate(objectMap, "enableRbacAuthorization", v.EnableRbacAuthorization) - populate(objectMap, "enableSoftDelete", v.EnableSoftDelete) - populate(objectMap, "enabledForDeployment", v.EnabledForDeployment) - populate(objectMap, "enabledForDiskEncryption", v.EnabledForDiskEncryption) - populate(objectMap, "enabledForTemplateDeployment", v.EnabledForTemplateDeployment) - populate(objectMap, "hsmPoolResourceId", v.HsmPoolResourceID) - populate(objectMap, "networkAcls", v.NetworkACLs) - populate(objectMap, "privateEndpointConnections", v.PrivateEndpointConnections) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "publicNetworkAccess", v.PublicNetworkAccess) - populate(objectMap, "sku", v.SKU) - populate(objectMap, "softDeleteRetentionInDays", v.SoftDeleteRetentionInDays) - populate(objectMap, "tenantId", v.TenantID) - populate(objectMap, "vaultUri", v.VaultURI) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/modules.txt b/vendor/modules.txt index d05bb87c2..a92072d69 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -47,7 +47,7 @@ github.com/Azure/azure-sdk-for-go/sdk/internal/log github.com/Azure/azure-sdk-for-go/sdk/internal/poller github.com/Azure/azure-sdk-for-go/sdk/internal/temporal github.com/Azure/azure-sdk-for-go/sdk/internal/uuid -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.0.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault # github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1