From 7d84dabacadf27070e1a4cd53856252d888791dc Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 14 Mar 2018 11:49:26 -0700 Subject: [PATCH] Generated from 0f95ff79bf5626b76d881a3abb35826bf22e2b05 (#1252) Add node config to keyvault for Swagger to SDK --- .../mgmt/2015-06-01/keyvault/models.go | 20 ++++++++ .../mgmt/2015-06-01/keyvault/version.go | 6 +-- .../mgmt/2016-10-01/keyvault/models.go | 48 ++++++++++++++++++- .../mgmt/2016-10-01/keyvault/version.go | 6 +-- 4 files changed, 70 insertions(+), 10 deletions(-) diff --git a/services/keyvault/mgmt/2015-06-01/keyvault/models.go b/services/keyvault/mgmt/2015-06-01/keyvault/models.go index 74d928913b6c..6b7461d745c2 100644 --- a/services/keyvault/mgmt/2015-06-01/keyvault/models.go +++ b/services/keyvault/mgmt/2015-06-01/keyvault/models.go @@ -61,6 +61,11 @@ const ( Update CertificatePermissions = "update" ) +// PossibleCertificatePermissionsValues returns an array of possible values for the CertificatePermissions const type. +func PossibleCertificatePermissionsValues() [15]CertificatePermissions { + return [15]CertificatePermissions{All, Create, Delete, Deleteissuers, Get, Getissuers, Import, List, Listissuers, Managecontacts, Manageissuers, Purge, Recover, Setissuers, Update} +} + // KeyPermissions enumerates the values for key permissions. type KeyPermissions string @@ -101,6 +106,11 @@ const ( KeyPermissionsWrapKey KeyPermissions = "wrapKey" ) +// PossibleKeyPermissionsValues returns an array of possible values for the KeyPermissions const type. +func PossibleKeyPermissionsValues() [17]KeyPermissions { + return [17]KeyPermissions{KeyPermissionsAll, KeyPermissionsBackup, KeyPermissionsCreate, KeyPermissionsDecrypt, KeyPermissionsDelete, KeyPermissionsEncrypt, KeyPermissionsGet, KeyPermissionsImport, KeyPermissionsList, KeyPermissionsPurge, KeyPermissionsRecover, KeyPermissionsRestore, KeyPermissionsSign, KeyPermissionsUnwrapKey, KeyPermissionsUpdate, KeyPermissionsVerify, KeyPermissionsWrapKey} +} + // SecretPermissions enumerates the values for secret permissions. type SecretPermissions string @@ -125,6 +135,11 @@ const ( SecretPermissionsSet SecretPermissions = "set" ) +// PossibleSecretPermissionsValues returns an array of possible values for the SecretPermissions const type. +func PossibleSecretPermissionsValues() [9]SecretPermissions { + return [9]SecretPermissions{SecretPermissionsAll, SecretPermissionsBackup, SecretPermissionsDelete, SecretPermissionsGet, SecretPermissionsList, SecretPermissionsPurge, SecretPermissionsRecover, SecretPermissionsRestore, SecretPermissionsSet} +} + // SkuName enumerates the values for sku name. type SkuName string @@ -135,6 +150,11 @@ const ( Standard SkuName = "standard" ) +// PossibleSkuNameValues returns an array of possible values for the SkuName const type. +func PossibleSkuNameValues() [2]SkuName { + return [2]SkuName{Premium, Standard} +} + // AccessPolicyEntry an identity that have access to the key vault. All identities in the array must use the same // tenant ID as the key vault's tenant ID. type AccessPolicyEntry struct { diff --git a/services/keyvault/mgmt/2015-06-01/keyvault/version.go b/services/keyvault/mgmt/2015-06-01/keyvault/version.go index 334702cfacfe..2337129582e1 100644 --- a/services/keyvault/mgmt/2015-06-01/keyvault/version.go +++ b/services/keyvault/mgmt/2015-06-01/keyvault/version.go @@ -1,7 +1,5 @@ package keyvault -import "github.com/Azure/azure-sdk-for-go/version" - // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,10 +19,10 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " keyvault/2015-06-01" + return "Azure-SDK-For-Go/latest services" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return version.Number + return "latest" } diff --git a/services/keyvault/mgmt/2016-10-01/keyvault/models.go b/services/keyvault/mgmt/2016-10-01/keyvault/models.go index 0024be5b746b..7c825199a99e 100644 --- a/services/keyvault/mgmt/2016-10-01/keyvault/models.go +++ b/services/keyvault/mgmt/2016-10-01/keyvault/models.go @@ -39,6 +39,11 @@ const ( Replace AccessPolicyUpdateKind = "replace" ) +// PossibleAccessPolicyUpdateKindValues returns an array of possible values for the AccessPolicyUpdateKind const type. +func PossibleAccessPolicyUpdateKindValues() [3]AccessPolicyUpdateKind { + return [3]AccessPolicyUpdateKind{Add, Remove, Replace} +} + // CertificatePermissions enumerates the values for certificate permissions. type CertificatePermissions string @@ -73,6 +78,11 @@ const ( Update CertificatePermissions = "update" ) +// PossibleCertificatePermissionsValues returns an array of possible values for the CertificatePermissions const type. +func PossibleCertificatePermissionsValues() [14]CertificatePermissions { + return [14]CertificatePermissions{Create, Delete, Deleteissuers, Get, Getissuers, Import, List, Listissuers, Managecontacts, Manageissuers, Purge, Recover, Setissuers, Update} +} + // CreateMode enumerates the values for create mode. type CreateMode string @@ -83,6 +93,11 @@ const ( CreateModeRecover CreateMode = "recover" ) +// PossibleCreateModeValues returns an array of possible values for the CreateMode const type. +func PossibleCreateModeValues() [2]CreateMode { + return [2]CreateMode{CreateModeDefault, CreateModeRecover} +} + // KeyPermissions enumerates the values for key permissions. type KeyPermissions string @@ -121,6 +136,11 @@ const ( KeyPermissionsWrapKey KeyPermissions = "wrapKey" ) +// PossibleKeyPermissionsValues returns an array of possible values for the KeyPermissions const type. +func PossibleKeyPermissionsValues() [16]KeyPermissions { + return [16]KeyPermissions{KeyPermissionsBackup, KeyPermissionsCreate, KeyPermissionsDecrypt, KeyPermissionsDelete, KeyPermissionsEncrypt, KeyPermissionsGet, KeyPermissionsImport, KeyPermissionsList, KeyPermissionsPurge, KeyPermissionsRecover, KeyPermissionsRestore, KeyPermissionsSign, KeyPermissionsUnwrapKey, KeyPermissionsUpdate, KeyPermissionsVerify, KeyPermissionsWrapKey} +} + // Reason enumerates the values for reason. type Reason string @@ -131,6 +151,11 @@ const ( AlreadyExists Reason = "AlreadyExists" ) +// PossibleReasonValues returns an array of possible values for the Reason const type. +func PossibleReasonValues() [2]Reason { + return [2]Reason{AccountNameInvalid, AlreadyExists} +} + // SecretPermissions enumerates the values for secret permissions. type SecretPermissions string @@ -153,6 +178,11 @@ const ( SecretPermissionsSet SecretPermissions = "set" ) +// PossibleSecretPermissionsValues returns an array of possible values for the SecretPermissions const type. +func PossibleSecretPermissionsValues() [8]SecretPermissions { + return [8]SecretPermissions{SecretPermissionsBackup, SecretPermissionsDelete, SecretPermissionsGet, SecretPermissionsList, SecretPermissionsPurge, SecretPermissionsRecover, SecretPermissionsRestore, SecretPermissionsSet} +} + // SkuName enumerates the values for sku name. type SkuName string @@ -163,6 +193,11 @@ const ( Standard SkuName = "standard" ) +// PossibleSkuNameValues returns an array of possible values for the SkuName const type. +func PossibleSkuNameValues() [2]SkuName { + return [2]SkuName{Premium, Standard} +} + // StoragePermissions enumerates the values for storage permissions. type StoragePermissions string @@ -197,6 +232,11 @@ const ( StoragePermissionsUpdate StoragePermissions = "update" ) +// PossibleStoragePermissionsValues returns an array of possible values for the StoragePermissions const type. +func PossibleStoragePermissionsValues() [14]StoragePermissions { + return [14]StoragePermissions{StoragePermissionsBackup, StoragePermissionsDelete, StoragePermissionsDeletesas, StoragePermissionsGet, StoragePermissionsGetsas, StoragePermissionsList, StoragePermissionsListsas, StoragePermissionsPurge, StoragePermissionsRecover, StoragePermissionsRegeneratekey, StoragePermissionsRestore, StoragePermissionsSet, StoragePermissionsSetsas, StoragePermissionsUpdate} +} + // AccessPolicyEntry an identity that have access to the key vault. All identities in the array must use the same // tenant ID as the key vault's tenant ID. type AccessPolicyEntry struct { @@ -959,10 +999,12 @@ type VaultPatchProperties struct { EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty"` // EnabledForTemplateDeployment - Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty"` - // EnableSoftDelete - Property to specify whether the 'soft delete' functionality is enabled for this key vault. It does not accept false value. + // EnableSoftDelete - Property specifying whether recoverable deletion ('soft' delete) is enabled for this key vault. The property may not be set to false. EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` // CreateMode - The vault's create mode to indicate whether the vault need to be recovered or not. Possible values include: 'CreateModeRecover', 'CreateModeDefault' CreateMode CreateMode `json:"createMode,omitempty"` + // EnablePurgeProtection - Property specifying whether protection against purge is enabled for this vault; it is only effective if soft delete is also enabled. Once activated, the property may no longer be reset to false. + EnablePurgeProtection *bool `json:"enablePurgeProtection,omitempty"` } // VaultProperties properties of the vault @@ -981,10 +1023,12 @@ type VaultProperties struct { EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty"` // EnabledForTemplateDeployment - Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty"` - // EnableSoftDelete - Property to specify whether the 'soft delete' functionality is enabled for this key vault. It does not accept false value. + // EnableSoftDelete - Property specifying whether recoverable deletion is enabled for this key vault. Setting this property to true activates the soft delete feature, whereby vaults or vault entities can be recovered after deletion. Enabling this functionality is irreversible - that is, the property does not accept false as its value. EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` // CreateMode - The vault's create mode to indicate whether the vault need to be recovered or not. Possible values include: 'CreateModeRecover', 'CreateModeDefault' CreateMode CreateMode `json:"createMode,omitempty"` + // EnablePurgeProtection - Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates protection against purge for this vault and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this functionality is irreversible - that is, the property does not accept false as its value. + EnablePurgeProtection *bool `json:"enablePurgeProtection,omitempty"` } // VaultsPurgeDeletedFuture an abstraction for monitoring and retrieving the results of a long-running operation. diff --git a/services/keyvault/mgmt/2016-10-01/keyvault/version.go b/services/keyvault/mgmt/2016-10-01/keyvault/version.go index fb6a25c73006..2337129582e1 100644 --- a/services/keyvault/mgmt/2016-10-01/keyvault/version.go +++ b/services/keyvault/mgmt/2016-10-01/keyvault/version.go @@ -1,7 +1,5 @@ package keyvault -import "github.com/Azure/azure-sdk-for-go/version" - // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,10 +19,10 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " keyvault/2016-10-01" + return "Azure-SDK-For-Go/latest services" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return version.Number + return "latest" }