diff --git a/v2/api/keyvault/v1api20210401preview/arm/structure.txt b/v2/api/keyvault/v1api20210401preview/arm/structure.txt new file mode 100644 index 00000000000..a9fcd0591bd --- /dev/null +++ b/v2/api/keyvault/v1api20210401preview/arm/structure.txt @@ -0,0 +1,251 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20210401preview/arm +-------------------------------------------------------------------------------- +Vault_STATUS: Object (7 properties) +├── Id: *string +├── Location: *string +├── Name: *string +├── Properties: *Object (16 properties) +│ ├── AccessPolicies: Object (4 properties)[] +│ │ ├── ApplicationId: *string +│ │ ├── ObjectId: *string +│ │ ├── Permissions: *Object (4 properties) +│ │ │ ├── Certificates: Enum (16 values)[] +│ │ │ │ ├── "backup" +│ │ │ │ ├── "create" +│ │ │ │ ├── "delete" +│ │ │ │ ├── "deleteissuers" +│ │ │ │ ├── "get" +│ │ │ │ ├── "getissuers" +│ │ │ │ ├── "import" +│ │ │ │ ├── "list" +│ │ │ │ ├── "listissuers" +│ │ │ │ ├── "managecontacts" +│ │ │ │ ├── "manageissuers" +│ │ │ │ ├── "purge" +│ │ │ │ ├── "recover" +│ │ │ │ ├── "restore" +│ │ │ │ ├── "setissuers" +│ │ │ │ └── "update" +│ │ │ ├── Keys: Enum (17 values)[] +│ │ │ │ ├── "backup" +│ │ │ │ ├── "create" +│ │ │ │ ├── "decrypt" +│ │ │ │ ├── "delete" +│ │ │ │ ├── "encrypt" +│ │ │ │ ├── "get" +│ │ │ │ ├── "import" +│ │ │ │ ├── "list" +│ │ │ │ ├── "purge" +│ │ │ │ ├── "recover" +│ │ │ │ ├── "release" +│ │ │ │ ├── "restore" +│ │ │ │ ├── "sign" +│ │ │ │ ├── "unwrapKey" +│ │ │ │ ├── "update" +│ │ │ │ ├── "verify" +│ │ │ │ └── "wrapKey" +│ │ │ ├── Secrets: Enum (8 values)[] +│ │ │ │ ├── "backup" +│ │ │ │ ├── "delete" +│ │ │ │ ├── "get" +│ │ │ │ ├── "list" +│ │ │ │ ├── "purge" +│ │ │ │ ├── "recover" +│ │ │ │ ├── "restore" +│ │ │ │ └── "set" +│ │ │ └── Storage: Enum (14 values)[] +│ │ │ ├── "backup" +│ │ │ ├── "delete" +│ │ │ ├── "deletesas" +│ │ │ ├── "get" +│ │ │ ├── "getsas" +│ │ │ ├── "list" +│ │ │ ├── "listsas" +│ │ │ ├── "purge" +│ │ │ ├── "recover" +│ │ │ ├── "regeneratekey" +│ │ │ ├── "restore" +│ │ │ ├── "set" +│ │ │ ├── "setsas" +│ │ │ └── "update" +│ │ └── TenantId: *string +│ ├── CreateMode: *Enum (4 values) +│ │ ├── "createOrRecover" +│ │ ├── "default" +│ │ ├── "purgeThenCreate" +│ │ └── "recover" +│ ├── EnablePurgeProtection: *bool +│ ├── EnableRbacAuthorization: *bool +│ ├── EnableSoftDelete: *bool +│ ├── EnabledForDeployment: *bool +│ ├── EnabledForDiskEncryption: *bool +│ ├── EnabledForTemplateDeployment: *bool +│ ├── HsmPoolResourceId: *string +│ ├── NetworkAcls: *Object (4 properties) +│ │ ├── Bypass: *Enum (2 values) +│ │ │ ├── "AzureServices" +│ │ │ └── "None" +│ │ ├── DefaultAction: *Enum (2 values) +│ │ │ ├── "Allow" +│ │ │ └── "Deny" +│ │ ├── IpRules: Object (1 property)[] +│ │ │ └── Value: *string +│ │ └── VirtualNetworkRules: Object (2 properties)[] +│ │ ├── Id: *string +│ │ └── IgnoreMissingVnetServiceEndpoint: *bool +│ ├── PrivateEndpointConnections: Object (3 properties)[] +│ │ ├── Etag: *string +│ │ ├── Id: *string +│ │ └── Properties: *Object (3 properties) +│ │ ├── PrivateEndpoint: *Object (1 property) +│ │ │ └── Id: *string +│ │ ├── PrivateLinkServiceConnectionState: *Object (3 properties) +│ │ │ ├── ActionsRequired: *Enum (1 value) +│ │ │ │ └── "None" +│ │ │ ├── Description: *string +│ │ │ └── Status: *Enum (4 values) +│ │ │ ├── "Approved" +│ │ │ ├── "Disconnected" +│ │ │ ├── "Pending" +│ │ │ └── "Rejected" +│ │ └── ProvisioningState: *Enum (6 values) +│ │ ├── "Creating" +│ │ ├── "Deleting" +│ │ ├── "Disconnected" +│ │ ├── "Failed" +│ │ ├── "Succeeded" +│ │ └── "Updating" +│ ├── ProvisioningState: *Enum (2 values) +│ │ ├── "RegisteringDns" +│ │ └── "Succeeded" +│ ├── Sku: *Object (2 properties) +│ │ ├── Family: *Enum (1 value) +│ │ │ └── "A" +│ │ └── Name: *Enum (2 values) +│ │ ├── "premium" +│ │ └── "standard" +│ ├── SoftDeleteRetentionInDays: *int +│ ├── TenantId: *string +│ └── VaultUri: *string +├── SystemData: *Object (6 properties) +│ ├── CreatedAt: *string +│ ├── CreatedBy: *string +│ ├── CreatedByType: *Enum (4 values) +│ │ ├── "Application" +│ │ ├── "Key" +│ │ ├── "ManagedIdentity" +│ │ └── "User" +│ ├── LastModifiedAt: *string +│ ├── LastModifiedBy: *string +│ └── LastModifiedByType: *Enum (4 values) +│ ├── "Application" +│ ├── "Key" +│ ├── "ManagedIdentity" +│ └── "User" +├── Tags: map[string]string +└── Type: *string +Vault_Spec: Object (4 properties) +├── Location: *string +├── Name: string +├── Properties: *Object (14 properties) +│ ├── AccessPolicies: Object (4 properties)[] +│ │ ├── ApplicationId: *string +│ │ ├── ObjectId: *string +│ │ ├── Permissions: *Object (4 properties) +│ │ │ ├── Certificates: Enum (16 values)[] +│ │ │ │ ├── "backup" +│ │ │ │ ├── "create" +│ │ │ │ ├── "delete" +│ │ │ │ ├── "deleteissuers" +│ │ │ │ ├── "get" +│ │ │ │ ├── "getissuers" +│ │ │ │ ├── "import" +│ │ │ │ ├── "list" +│ │ │ │ ├── "listissuers" +│ │ │ │ ├── "managecontacts" +│ │ │ │ ├── "manageissuers" +│ │ │ │ ├── "purge" +│ │ │ │ ├── "recover" +│ │ │ │ ├── "restore" +│ │ │ │ ├── "setissuers" +│ │ │ │ └── "update" +│ │ │ ├── Keys: Enum (17 values)[] +│ │ │ │ ├── "backup" +│ │ │ │ ├── "create" +│ │ │ │ ├── "decrypt" +│ │ │ │ ├── "delete" +│ │ │ │ ├── "encrypt" +│ │ │ │ ├── "get" +│ │ │ │ ├── "import" +│ │ │ │ ├── "list" +│ │ │ │ ├── "purge" +│ │ │ │ ├── "recover" +│ │ │ │ ├── "release" +│ │ │ │ ├── "restore" +│ │ │ │ ├── "sign" +│ │ │ │ ├── "unwrapKey" +│ │ │ │ ├── "update" +│ │ │ │ ├── "verify" +│ │ │ │ └── "wrapKey" +│ │ │ ├── Secrets: Enum (8 values)[] +│ │ │ │ ├── "backup" +│ │ │ │ ├── "delete" +│ │ │ │ ├── "get" +│ │ │ │ ├── "list" +│ │ │ │ ├── "purge" +│ │ │ │ ├── "recover" +│ │ │ │ ├── "restore" +│ │ │ │ └── "set" +│ │ │ └── Storage: Enum (14 values)[] +│ │ │ ├── "backup" +│ │ │ ├── "delete" +│ │ │ ├── "deletesas" +│ │ │ ├── "get" +│ │ │ ├── "getsas" +│ │ │ ├── "list" +│ │ │ ├── "listsas" +│ │ │ ├── "purge" +│ │ │ ├── "recover" +│ │ │ ├── "regeneratekey" +│ │ │ ├── "restore" +│ │ │ ├── "set" +│ │ │ ├── "setsas" +│ │ │ └── "update" +│ │ └── TenantId: *string +│ ├── CreateMode: *Enum (4 values) +│ │ ├── "createOrRecover" +│ │ ├── "default" +│ │ ├── "purgeThenCreate" +│ │ └── "recover" +│ ├── EnablePurgeProtection: *bool +│ ├── EnableRbacAuthorization: *bool +│ ├── EnableSoftDelete: *bool +│ ├── EnabledForDeployment: *bool +│ ├── EnabledForDiskEncryption: *bool +│ ├── EnabledForTemplateDeployment: *bool +│ ├── NetworkAcls: *Object (4 properties) +│ │ ├── Bypass: *Enum (2 values) +│ │ │ ├── "AzureServices" +│ │ │ └── "None" +│ │ ├── DefaultAction: *Enum (2 values) +│ │ │ ├── "Allow" +│ │ │ └── "Deny" +│ │ ├── IpRules: Object (1 property)[] +│ │ │ └── Value: *string +│ │ └── VirtualNetworkRules: Object (2 properties)[] +│ │ ├── Id: *string +│ │ └── IgnoreMissingVnetServiceEndpoint: *bool +│ ├── ProvisioningState: *Enum (2 values) +│ │ ├── "RegisteringDns" +│ │ └── "Succeeded" +│ ├── Sku: *Object (2 properties) +│ │ ├── Family: *Enum (1 value) +│ │ │ └── "A" +│ │ └── Name: *Enum (2 values) +│ │ ├── "premium" +│ │ └── "standard" +│ ├── SoftDeleteRetentionInDays: *int +│ ├── TenantId: *string +│ └── VaultUri: *string +└── Tags: map[string]string diff --git a/v2/api/keyvault/v1api20210401preview/arm/vault_spec_types_gen.go b/v2/api/keyvault/v1api20210401preview/arm/vault_spec_types_gen.go new file mode 100644 index 00000000000..e3a615a2bfd --- /dev/null +++ b/v2/api/keyvault/v1api20210401preview/arm/vault_spec_types_gen.go @@ -0,0 +1,402 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type Vault_Spec struct { + // Location: The supported Azure location where the key vault should be created. + Location *string `json:"location,omitempty"` + Name string `json:"name,omitempty"` + + // Properties: Properties of the vault + Properties *VaultProperties `json:"properties,omitempty"` + + // Tags: The tags that will be assigned to the key vault. + Tags map[string]string `json:"tags,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &Vault_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2021-04-01-preview" +func (vault Vault_Spec) GetAPIVersion() string { + return "2021-04-01-preview" +} + +// GetName returns the Name of the resource +func (vault *Vault_Spec) GetName() string { + return vault.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.KeyVault/vaults" +func (vault *Vault_Spec) GetType() string { + return "Microsoft.KeyVault/vaults" +} + +// Properties of the vault +type VaultProperties struct { + // AccessPolicies: An array of 0 to 1024 identities 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. When `createMode` is set to `recover`, access policies are not + // required. Otherwise, access policies are required. + AccessPolicies []AccessPolicyEntry `json:"accessPolicies,omitempty"` + + // CreateMode: The vault's create mode to indicate whether the vault need to be recovered or not. + CreateMode *VaultProperties_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"` + + // EnableRbacAuthorization: Property that controls how data actions are authorized. When true, the key vault will use Role + // Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties + // will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy + // stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value + // of false. Note that management actions are always authorized with RBAC. + EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"` + + // EnableSoftDelete: Property to specify whether the 'soft delete' functionality is enabled for this key vault. If it's not + // set to any value(true or false) when creating new key vault, it will be set to true by default. Once set to true, it + // cannot be reverted to false. + EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` + + // EnabledForDeployment: Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored + // as secrets from the key vault. + EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` + + // EnabledForDiskEncryption: Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the + // vault and unwrap keys. + 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"` + + // NetworkAcls: Rules governing the accessibility of the key vault from specific network locations. + NetworkAcls *NetworkRuleSet `json:"networkAcls,omitempty"` + + // ProvisioningState: Provisioning state of the vault. + ProvisioningState *VaultProperties_ProvisioningState `json:"provisioningState,omitempty"` + + // Sku: SKU details + Sku *Sku `json:"sku,omitempty"` + + // SoftDeleteRetentionInDays: softDelete data retention days. It accepts >=7 and <=90. + SoftDeleteRetentionInDays *int `json:"softDeleteRetentionInDays,omitempty"` + + // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. + TenantId *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"` + + // VaultUri: The URI of the vault for performing operations on keys and secrets. + VaultUri *string `json:"vaultUri,omitempty"` +} + +// 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 { + // ApplicationId: Application ID of the client making request on behalf of a principal + ApplicationId *string `json:"applicationId,omitempty" optionalConfigMapPair:"ApplicationId"` + + // ObjectId: The object ID of a user, service principal or security group in the Azure Active Directory tenant for the + // vault. The object ID must be unique for the list of access policies. + ObjectId *string `json:"objectId,omitempty" optionalConfigMapPair:"ObjectId"` + + // Permissions: Permissions the identity has for keys, secrets and certificates. + Permissions *Permissions `json:"permissions,omitempty"` + + // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. + TenantId *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"` +} + +// A set of rules governing the network accessibility of a vault. +type NetworkRuleSet struct { + // Bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the + // default is 'AzureServices'. + Bypass *NetworkRuleSet_Bypass `json:"bypass,omitempty"` + + // DefaultAction: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after + // the bypass property has been evaluated. + DefaultAction *NetworkRuleSet_DefaultAction `json:"defaultAction,omitempty"` + + // IpRules: The list of IP address rules. + IpRules []IPRule `json:"ipRules,omitempty"` + + // VirtualNetworkRules: The list of virtual network rules. + VirtualNetworkRules []VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` +} + +// SKU details +type Sku struct { + // Family: SKU family name + Family *Sku_Family `json:"family,omitempty"` + + // Name: SKU name to specify whether the key vault is a standard vault or a premium vault. + Name *Sku_Name `json:"name,omitempty"` +} + +// +kubebuilder:validation:Enum={"createOrRecover","default","purgeThenCreate","recover"} +type VaultProperties_CreateMode string + +const ( + VaultProperties_CreateMode_CreateOrRecover = VaultProperties_CreateMode("createOrRecover") + VaultProperties_CreateMode_Default = VaultProperties_CreateMode("default") + VaultProperties_CreateMode_PurgeThenCreate = VaultProperties_CreateMode("purgeThenCreate") + VaultProperties_CreateMode_Recover = VaultProperties_CreateMode("recover") +) + +// Mapping from string to VaultProperties_CreateMode +var vaultProperties_CreateMode_Values = map[string]VaultProperties_CreateMode{ + "createorrecover": VaultProperties_CreateMode_CreateOrRecover, + "default": VaultProperties_CreateMode_Default, + "purgethencreate": VaultProperties_CreateMode_PurgeThenCreate, + "recover": VaultProperties_CreateMode_Recover, +} + +// +kubebuilder:validation:Enum={"RegisteringDns","Succeeded"} +type VaultProperties_ProvisioningState string + +const ( + VaultProperties_ProvisioningState_RegisteringDns = VaultProperties_ProvisioningState("RegisteringDns") + VaultProperties_ProvisioningState_Succeeded = VaultProperties_ProvisioningState("Succeeded") +) + +// Mapping from string to VaultProperties_ProvisioningState +var vaultProperties_ProvisioningState_Values = map[string]VaultProperties_ProvisioningState{ + "registeringdns": VaultProperties_ProvisioningState_RegisteringDns, + "succeeded": VaultProperties_ProvisioningState_Succeeded, +} + +// A rule governing the accessibility of a vault from a specific ip address or ip range. +type IPRule struct { + // Value: 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). + Value *string `json:"value,omitempty"` +} + +// +kubebuilder:validation:Enum={"AzureServices","None"} +type NetworkRuleSet_Bypass string + +const ( + NetworkRuleSet_Bypass_AzureServices = NetworkRuleSet_Bypass("AzureServices") + NetworkRuleSet_Bypass_None = NetworkRuleSet_Bypass("None") +) + +// Mapping from string to NetworkRuleSet_Bypass +var networkRuleSet_Bypass_Values = map[string]NetworkRuleSet_Bypass{ + "azureservices": NetworkRuleSet_Bypass_AzureServices, + "none": NetworkRuleSet_Bypass_None, +} + +// +kubebuilder:validation:Enum={"Allow","Deny"} +type NetworkRuleSet_DefaultAction string + +const ( + NetworkRuleSet_DefaultAction_Allow = NetworkRuleSet_DefaultAction("Allow") + NetworkRuleSet_DefaultAction_Deny = NetworkRuleSet_DefaultAction("Deny") +) + +// Mapping from string to NetworkRuleSet_DefaultAction +var networkRuleSet_DefaultAction_Values = map[string]NetworkRuleSet_DefaultAction{ + "allow": NetworkRuleSet_DefaultAction_Allow, + "deny": NetworkRuleSet_DefaultAction_Deny, +} + +// Permissions the identity has for keys, secrets, certificates and storage. +type Permissions struct { + // Certificates: Permissions to certificates + Certificates []Permissions_Certificates `json:"certificates,omitempty"` + + // Keys: Permissions to keys + Keys []Permissions_Keys `json:"keys,omitempty"` + + // Secrets: Permissions to secrets + Secrets []Permissions_Secrets `json:"secrets,omitempty"` + + // Storage: Permissions to storage accounts + Storage []Permissions_Storage `json:"storage,omitempty"` +} + +// +kubebuilder:validation:Enum={"A"} +type Sku_Family string + +const Sku_Family_A = Sku_Family("A") + +// Mapping from string to Sku_Family +var sku_Family_Values = map[string]Sku_Family{ + "a": Sku_Family_A, +} + +// +kubebuilder:validation:Enum={"premium","standard"} +type Sku_Name string + +const ( + Sku_Name_Premium = Sku_Name("premium") + Sku_Name_Standard = Sku_Name("standard") +) + +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "premium": Sku_Name_Premium, + "standard": Sku_Name_Standard, +} + +// A rule governing the accessibility of a vault from a specific virtual network. +type VirtualNetworkRule struct { + Id *string `json:"id,omitempty"` + + // IgnoreMissingVnetServiceEndpoint: Property to specify whether NRP will ignore the check if parent subnet has + // serviceEndpoints configured. + IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` +} + +// +kubebuilder:validation:Enum={"backup","create","delete","deleteissuers","get","getissuers","import","list","listissuers","managecontacts","manageissuers","purge","recover","restore","setissuers","update"} +type Permissions_Certificates string + +const ( + Permissions_Certificates_Backup = Permissions_Certificates("backup") + Permissions_Certificates_Create = Permissions_Certificates("create") + Permissions_Certificates_Delete = Permissions_Certificates("delete") + Permissions_Certificates_Deleteissuers = Permissions_Certificates("deleteissuers") + Permissions_Certificates_Get = Permissions_Certificates("get") + Permissions_Certificates_Getissuers = Permissions_Certificates("getissuers") + Permissions_Certificates_Import = Permissions_Certificates("import") + Permissions_Certificates_List = Permissions_Certificates("list") + Permissions_Certificates_Listissuers = Permissions_Certificates("listissuers") + Permissions_Certificates_Managecontacts = Permissions_Certificates("managecontacts") + Permissions_Certificates_Manageissuers = Permissions_Certificates("manageissuers") + Permissions_Certificates_Purge = Permissions_Certificates("purge") + Permissions_Certificates_Recover = Permissions_Certificates("recover") + Permissions_Certificates_Restore = Permissions_Certificates("restore") + Permissions_Certificates_Setissuers = Permissions_Certificates("setissuers") + Permissions_Certificates_Update = Permissions_Certificates("update") +) + +// Mapping from string to Permissions_Certificates +var permissions_Certificates_Values = map[string]Permissions_Certificates{ + "backup": Permissions_Certificates_Backup, + "create": Permissions_Certificates_Create, + "delete": Permissions_Certificates_Delete, + "deleteissuers": Permissions_Certificates_Deleteissuers, + "get": Permissions_Certificates_Get, + "getissuers": Permissions_Certificates_Getissuers, + "import": Permissions_Certificates_Import, + "list": Permissions_Certificates_List, + "listissuers": Permissions_Certificates_Listissuers, + "managecontacts": Permissions_Certificates_Managecontacts, + "manageissuers": Permissions_Certificates_Manageissuers, + "purge": Permissions_Certificates_Purge, + "recover": Permissions_Certificates_Recover, + "restore": Permissions_Certificates_Restore, + "setissuers": Permissions_Certificates_Setissuers, + "update": Permissions_Certificates_Update, +} + +// +kubebuilder:validation:Enum={"backup","create","decrypt","delete","encrypt","get","import","list","purge","recover","release","restore","sign","unwrapKey","update","verify","wrapKey"} +type Permissions_Keys string + +const ( + Permissions_Keys_Backup = Permissions_Keys("backup") + Permissions_Keys_Create = Permissions_Keys("create") + Permissions_Keys_Decrypt = Permissions_Keys("decrypt") + Permissions_Keys_Delete = Permissions_Keys("delete") + Permissions_Keys_Encrypt = Permissions_Keys("encrypt") + Permissions_Keys_Get = Permissions_Keys("get") + Permissions_Keys_Import = Permissions_Keys("import") + Permissions_Keys_List = Permissions_Keys("list") + Permissions_Keys_Purge = Permissions_Keys("purge") + Permissions_Keys_Recover = Permissions_Keys("recover") + Permissions_Keys_Release = Permissions_Keys("release") + Permissions_Keys_Restore = Permissions_Keys("restore") + Permissions_Keys_Sign = Permissions_Keys("sign") + Permissions_Keys_UnwrapKey = Permissions_Keys("unwrapKey") + Permissions_Keys_Update = Permissions_Keys("update") + Permissions_Keys_Verify = Permissions_Keys("verify") + Permissions_Keys_WrapKey = Permissions_Keys("wrapKey") +) + +// Mapping from string to Permissions_Keys +var permissions_Keys_Values = map[string]Permissions_Keys{ + "backup": Permissions_Keys_Backup, + "create": Permissions_Keys_Create, + "decrypt": Permissions_Keys_Decrypt, + "delete": Permissions_Keys_Delete, + "encrypt": Permissions_Keys_Encrypt, + "get": Permissions_Keys_Get, + "import": Permissions_Keys_Import, + "list": Permissions_Keys_List, + "purge": Permissions_Keys_Purge, + "recover": Permissions_Keys_Recover, + "release": Permissions_Keys_Release, + "restore": Permissions_Keys_Restore, + "sign": Permissions_Keys_Sign, + "unwrapkey": Permissions_Keys_UnwrapKey, + "update": Permissions_Keys_Update, + "verify": Permissions_Keys_Verify, + "wrapkey": Permissions_Keys_WrapKey, +} + +// +kubebuilder:validation:Enum={"backup","delete","get","list","purge","recover","restore","set"} +type Permissions_Secrets string + +const ( + Permissions_Secrets_Backup = Permissions_Secrets("backup") + Permissions_Secrets_Delete = Permissions_Secrets("delete") + Permissions_Secrets_Get = Permissions_Secrets("get") + Permissions_Secrets_List = Permissions_Secrets("list") + Permissions_Secrets_Purge = Permissions_Secrets("purge") + Permissions_Secrets_Recover = Permissions_Secrets("recover") + Permissions_Secrets_Restore = Permissions_Secrets("restore") + Permissions_Secrets_Set = Permissions_Secrets("set") +) + +// Mapping from string to Permissions_Secrets +var permissions_Secrets_Values = map[string]Permissions_Secrets{ + "backup": Permissions_Secrets_Backup, + "delete": Permissions_Secrets_Delete, + "get": Permissions_Secrets_Get, + "list": Permissions_Secrets_List, + "purge": Permissions_Secrets_Purge, + "recover": Permissions_Secrets_Recover, + "restore": Permissions_Secrets_Restore, + "set": Permissions_Secrets_Set, +} + +// +kubebuilder:validation:Enum={"backup","delete","deletesas","get","getsas","list","listsas","purge","recover","regeneratekey","restore","set","setsas","update"} +type Permissions_Storage string + +const ( + Permissions_Storage_Backup = Permissions_Storage("backup") + Permissions_Storage_Delete = Permissions_Storage("delete") + Permissions_Storage_Deletesas = Permissions_Storage("deletesas") + Permissions_Storage_Get = Permissions_Storage("get") + Permissions_Storage_Getsas = Permissions_Storage("getsas") + Permissions_Storage_List = Permissions_Storage("list") + Permissions_Storage_Listsas = Permissions_Storage("listsas") + Permissions_Storage_Purge = Permissions_Storage("purge") + Permissions_Storage_Recover = Permissions_Storage("recover") + Permissions_Storage_Regeneratekey = Permissions_Storage("regeneratekey") + Permissions_Storage_Restore = Permissions_Storage("restore") + Permissions_Storage_Set = Permissions_Storage("set") + Permissions_Storage_Setsas = Permissions_Storage("setsas") + Permissions_Storage_Update = Permissions_Storage("update") +) + +// Mapping from string to Permissions_Storage +var permissions_Storage_Values = map[string]Permissions_Storage{ + "backup": Permissions_Storage_Backup, + "delete": Permissions_Storage_Delete, + "deletesas": Permissions_Storage_Deletesas, + "get": Permissions_Storage_Get, + "getsas": Permissions_Storage_Getsas, + "list": Permissions_Storage_List, + "listsas": Permissions_Storage_Listsas, + "purge": Permissions_Storage_Purge, + "recover": Permissions_Storage_Recover, + "regeneratekey": Permissions_Storage_Regeneratekey, + "restore": Permissions_Storage_Restore, + "set": Permissions_Storage_Set, + "setsas": Permissions_Storage_Setsas, + "update": Permissions_Storage_Update, +} diff --git a/v2/api/keyvault/v1api20210401preview/arm/vault_spec_types_gen_test.go b/v2/api/keyvault/v1api20210401preview/arm/vault_spec_types_gen_test.go new file mode 100644 index 00000000000..e4760d0ab65 --- /dev/null +++ b/v2/api/keyvault/v1api20210401preview/arm/vault_spec_types_gen_test.go @@ -0,0 +1,638 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_AccessPolicyEntry_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccessPolicyEntry via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccessPolicyEntry, AccessPolicyEntryGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccessPolicyEntry runs a test to see if a specific instance of AccessPolicyEntry round trips to JSON and back losslessly +func RunJSONSerializationTestForAccessPolicyEntry(subject AccessPolicyEntry) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccessPolicyEntry + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccessPolicyEntry instances for property testing - lazily instantiated by AccessPolicyEntryGenerator() +var accessPolicyEntryGenerator gopter.Gen + +// AccessPolicyEntryGenerator returns a generator of AccessPolicyEntry instances for property testing. +// We first initialize accessPolicyEntryGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func AccessPolicyEntryGenerator() gopter.Gen { + if accessPolicyEntryGenerator != nil { + return accessPolicyEntryGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicyEntry(generators) + accessPolicyEntryGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicyEntry(generators) + AddRelatedPropertyGeneratorsForAccessPolicyEntry(generators) + accessPolicyEntryGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry{}), generators) + + return accessPolicyEntryGenerator +} + +// AddIndependentPropertyGeneratorsForAccessPolicyEntry is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccessPolicyEntry(gens map[string]gopter.Gen) { + gens["ApplicationId"] = gen.PtrOf(gen.AlphaString()) + gens["ObjectId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForAccessPolicyEntry is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForAccessPolicyEntry(gens map[string]gopter.Gen) { + gens["Permissions"] = gen.PtrOf(PermissionsGenerator()) +} + +func Test_IPRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of IPRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIPRule, IPRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIPRule runs a test to see if a specific instance of IPRule round trips to JSON and back losslessly +func RunJSONSerializationTestForIPRule(subject IPRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual IPRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of IPRule instances for property testing - lazily instantiated by IPRuleGenerator() +var ipRuleGenerator gopter.Gen + +// IPRuleGenerator returns a generator of IPRule instances for property testing. +func IPRuleGenerator() gopter.Gen { + if ipRuleGenerator != nil { + return ipRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIPRule(generators) + ipRuleGenerator = gen.Struct(reflect.TypeOf(IPRule{}), generators) + + return ipRuleGenerator +} + +// AddIndependentPropertyGeneratorsForIPRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIPRule(gens map[string]gopter.Gen) { + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_NetworkRuleSet_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of NetworkRuleSet via JSON returns original", + prop.ForAll(RunJSONSerializationTestForNetworkRuleSet, NetworkRuleSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForNetworkRuleSet runs a test to see if a specific instance of NetworkRuleSet round trips to JSON and back losslessly +func RunJSONSerializationTestForNetworkRuleSet(subject NetworkRuleSet) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual NetworkRuleSet + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of NetworkRuleSet instances for property testing - lazily instantiated by NetworkRuleSetGenerator() +var networkRuleSetGenerator gopter.Gen + +// NetworkRuleSetGenerator returns a generator of NetworkRuleSet instances for property testing. +// We first initialize networkRuleSetGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func NetworkRuleSetGenerator() gopter.Gen { + if networkRuleSetGenerator != nil { + return networkRuleSetGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet(generators) + networkRuleSetGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet(generators) + AddRelatedPropertyGeneratorsForNetworkRuleSet(generators) + networkRuleSetGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet{}), generators) + + return networkRuleSetGenerator +} + +// AddIndependentPropertyGeneratorsForNetworkRuleSet is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForNetworkRuleSet(gens map[string]gopter.Gen) { + gens["Bypass"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_Bypass_AzureServices, NetworkRuleSet_Bypass_None)) + gens["DefaultAction"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_DefaultAction_Allow, NetworkRuleSet_DefaultAction_Deny)) +} + +// AddRelatedPropertyGeneratorsForNetworkRuleSet is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForNetworkRuleSet(gens map[string]gopter.Gen) { + gens["IpRules"] = gen.SliceOf(IPRuleGenerator()) + gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRuleGenerator()) +} + +func Test_Permissions_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Permissions via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPermissions, PermissionsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPermissions runs a test to see if a specific instance of Permissions round trips to JSON and back losslessly +func RunJSONSerializationTestForPermissions(subject Permissions) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Permissions + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Permissions instances for property testing - lazily instantiated by PermissionsGenerator() +var permissionsGenerator gopter.Gen + +// PermissionsGenerator returns a generator of Permissions instances for property testing. +func PermissionsGenerator() gopter.Gen { + if permissionsGenerator != nil { + return permissionsGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPermissions(generators) + permissionsGenerator = gen.Struct(reflect.TypeOf(Permissions{}), generators) + + return permissionsGenerator +} + +// AddIndependentPropertyGeneratorsForPermissions is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPermissions(gens map[string]gopter.Gen) { + gens["Certificates"] = gen.SliceOf(gen.OneConstOf( + Permissions_Certificates_Backup, + Permissions_Certificates_Create, + Permissions_Certificates_Delete, + Permissions_Certificates_Deleteissuers, + Permissions_Certificates_Get, + Permissions_Certificates_Getissuers, + Permissions_Certificates_Import, + Permissions_Certificates_List, + Permissions_Certificates_Listissuers, + Permissions_Certificates_Managecontacts, + Permissions_Certificates_Manageissuers, + Permissions_Certificates_Purge, + Permissions_Certificates_Recover, + Permissions_Certificates_Restore, + Permissions_Certificates_Setissuers, + Permissions_Certificates_Update)) + gens["Keys"] = gen.SliceOf(gen.OneConstOf( + Permissions_Keys_Backup, + Permissions_Keys_Create, + Permissions_Keys_Decrypt, + Permissions_Keys_Delete, + Permissions_Keys_Encrypt, + Permissions_Keys_Get, + Permissions_Keys_Import, + Permissions_Keys_List, + Permissions_Keys_Purge, + Permissions_Keys_Recover, + Permissions_Keys_Release, + Permissions_Keys_Restore, + Permissions_Keys_Sign, + Permissions_Keys_UnwrapKey, + Permissions_Keys_Update, + Permissions_Keys_Verify, + Permissions_Keys_WrapKey)) + gens["Secrets"] = gen.SliceOf(gen.OneConstOf( + Permissions_Secrets_Backup, + Permissions_Secrets_Delete, + Permissions_Secrets_Get, + Permissions_Secrets_List, + Permissions_Secrets_Purge, + Permissions_Secrets_Recover, + Permissions_Secrets_Restore, + Permissions_Secrets_Set)) + gens["Storage"] = gen.SliceOf(gen.OneConstOf( + Permissions_Storage_Backup, + Permissions_Storage_Delete, + Permissions_Storage_Deletesas, + Permissions_Storage_Get, + Permissions_Storage_Getsas, + Permissions_Storage_List, + Permissions_Storage_Listsas, + Permissions_Storage_Purge, + Permissions_Storage_Recover, + Permissions_Storage_Regeneratekey, + Permissions_Storage_Restore, + Permissions_Storage_Set, + Permissions_Storage_Setsas, + Permissions_Storage_Update)) +} + +func Test_Sku_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Sku via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSku, SkuGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSku runs a test to see if a specific instance of Sku round trips to JSON and back losslessly +func RunJSONSerializationTestForSku(subject Sku) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Sku + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Sku instances for property testing - lazily instantiated by SkuGenerator() +var skuGenerator gopter.Gen + +// SkuGenerator returns a generator of Sku instances for property testing. +func SkuGenerator() gopter.Gen { + if skuGenerator != nil { + return skuGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSku(generators) + skuGenerator = gen.Struct(reflect.TypeOf(Sku{}), generators) + + return skuGenerator +} + +// AddIndependentPropertyGeneratorsForSku is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSku(gens map[string]gopter.Gen) { + gens["Family"] = gen.PtrOf(gen.OneConstOf(Sku_Family_A)) + gens["Name"] = gen.PtrOf(gen.OneConstOf(Sku_Name_Premium, Sku_Name_Standard)) +} + +func Test_VaultProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VaultProperties via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVaultProperties, VaultPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVaultProperties runs a test to see if a specific instance of VaultProperties round trips to JSON and back losslessly +func RunJSONSerializationTestForVaultProperties(subject VaultProperties) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VaultProperties + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VaultProperties instances for property testing - lazily instantiated by VaultPropertiesGenerator() +var vaultPropertiesGenerator gopter.Gen + +// VaultPropertiesGenerator returns a generator of VaultProperties instances for property testing. +// We first initialize vaultPropertiesGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func VaultPropertiesGenerator() gopter.Gen { + if vaultPropertiesGenerator != nil { + return vaultPropertiesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVaultProperties(generators) + vaultPropertiesGenerator = gen.Struct(reflect.TypeOf(VaultProperties{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVaultProperties(generators) + AddRelatedPropertyGeneratorsForVaultProperties(generators) + vaultPropertiesGenerator = gen.Struct(reflect.TypeOf(VaultProperties{}), generators) + + return vaultPropertiesGenerator +} + +// AddIndependentPropertyGeneratorsForVaultProperties is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVaultProperties(gens map[string]gopter.Gen) { + gens["CreateMode"] = gen.PtrOf(gen.OneConstOf( + VaultProperties_CreateMode_CreateOrRecover, + VaultProperties_CreateMode_Default, + VaultProperties_CreateMode_PurgeThenCreate, + VaultProperties_CreateMode_Recover)) + gens["EnablePurgeProtection"] = gen.PtrOf(gen.Bool()) + gens["EnableRbacAuthorization"] = gen.PtrOf(gen.Bool()) + gens["EnableSoftDelete"] = gen.PtrOf(gen.Bool()) + gens["EnabledForDeployment"] = gen.PtrOf(gen.Bool()) + gens["EnabledForDiskEncryption"] = gen.PtrOf(gen.Bool()) + gens["EnabledForTemplateDeployment"] = gen.PtrOf(gen.Bool()) + gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(VaultProperties_ProvisioningState_RegisteringDns, VaultProperties_ProvisioningState_Succeeded)) + gens["SoftDeleteRetentionInDays"] = gen.PtrOf(gen.Int()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["VaultUri"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForVaultProperties is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForVaultProperties(gens map[string]gopter.Gen) { + gens["AccessPolicies"] = gen.SliceOf(AccessPolicyEntryGenerator()) + gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSetGenerator()) + gens["Sku"] = gen.PtrOf(SkuGenerator()) +} + +func Test_Vault_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Vault_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVault_Spec, Vault_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVault_Spec runs a test to see if a specific instance of Vault_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForVault_Spec(subject Vault_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Vault_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Vault_Spec instances for property testing - lazily instantiated by Vault_SpecGenerator() +var vault_SpecGenerator gopter.Gen + +// Vault_SpecGenerator returns a generator of Vault_Spec instances for property testing. +// We first initialize vault_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Vault_SpecGenerator() gopter.Gen { + if vault_SpecGenerator != nil { + return vault_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVault_Spec(generators) + vault_SpecGenerator = gen.Struct(reflect.TypeOf(Vault_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVault_Spec(generators) + AddRelatedPropertyGeneratorsForVault_Spec(generators) + vault_SpecGenerator = gen.Struct(reflect.TypeOf(Vault_Spec{}), generators) + + return vault_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForVault_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVault_Spec(gens map[string]gopter.Gen) { + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.AlphaString() + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForVault_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForVault_Spec(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(VaultPropertiesGenerator()) +} + +func Test_VirtualNetworkRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VirtualNetworkRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule, VirtualNetworkRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVirtualNetworkRule runs a test to see if a specific instance of VirtualNetworkRule round trips to JSON and back losslessly +func RunJSONSerializationTestForVirtualNetworkRule(subject VirtualNetworkRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VirtualNetworkRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VirtualNetworkRule instances for property testing - lazily instantiated by VirtualNetworkRuleGenerator() +var virtualNetworkRuleGenerator gopter.Gen + +// VirtualNetworkRuleGenerator returns a generator of VirtualNetworkRule instances for property testing. +func VirtualNetworkRuleGenerator() gopter.Gen { + if virtualNetworkRuleGenerator != nil { + return virtualNetworkRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVirtualNetworkRule(generators) + virtualNetworkRuleGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule{}), generators) + + return virtualNetworkRuleGenerator +} + +// AddIndependentPropertyGeneratorsForVirtualNetworkRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVirtualNetworkRule(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["IgnoreMissingVnetServiceEndpoint"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/keyvault/v1api20210401preview/arm/vault_status_types_gen.go b/v2/api/keyvault/v1api20210401preview/arm/vault_status_types_gen.go new file mode 100644 index 00000000000..31080a78588 --- /dev/null +++ b/v2/api/keyvault/v1api20210401preview/arm/vault_status_types_gen.go @@ -0,0 +1,523 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +// Resource information with extended details. +type Vault_STATUS struct { + // Id: Fully qualified identifier of the key vault resource. + Id *string `json:"id,omitempty"` + + // Location: Azure location of the key vault resource. + Location *string `json:"location,omitempty"` + + // Name: Name of the key vault resource. + Name *string `json:"name,omitempty"` + + // Properties: Properties of the vault + Properties *VaultProperties_STATUS `json:"properties,omitempty"` + + // SystemData: System metadata for the key vault. + SystemData *SystemData_STATUS `json:"systemData,omitempty"` + + // Tags: Tags assigned to the key vault resource. + Tags map[string]string `json:"tags,omitempty"` + + // Type: Resource type of the key vault resource. + Type *string `json:"type,omitempty"` +} + +// Metadata pertaining to creation and last modification of the key vault resource. +type SystemData_STATUS struct { + // CreatedAt: The timestamp of the key vault resource creation (UTC). + CreatedAt *string `json:"createdAt,omitempty"` + + // CreatedBy: The identity that created the key vault resource. + CreatedBy *string `json:"createdBy,omitempty"` + + // CreatedByType: The type of identity that created the key vault resource. + CreatedByType *IdentityType_STATUS `json:"createdByType,omitempty"` + + // LastModifiedAt: The timestamp of the key vault resource last modification (UTC). + LastModifiedAt *string `json:"lastModifiedAt,omitempty"` + + // LastModifiedBy: The identity that last modified the key vault resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + + // LastModifiedByType: The type of identity that last modified the key vault resource. + LastModifiedByType *IdentityType_STATUS `json:"lastModifiedByType,omitempty"` +} + +// Properties of the vault +type VaultProperties_STATUS struct { + // AccessPolicies: An array of 0 to 1024 identities 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. When `createMode` is set to `recover`, access policies are not + // required. Otherwise, access policies are required. + AccessPolicies []AccessPolicyEntry_STATUS `json:"accessPolicies,omitempty"` + + // CreateMode: The vault's create mode to indicate whether the vault need to be recovered or not. + CreateMode *VaultProperties_CreateMode_STATUS `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"` + + // EnableRbacAuthorization: Property that controls how data actions are authorized. When true, the key vault will use Role + // Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties + // will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy + // stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value + // of false. Note that management actions are always authorized with RBAC. + EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"` + + // EnableSoftDelete: Property to specify whether the 'soft delete' functionality is enabled for this key vault. If it's not + // set to any value(true or false) when creating new key vault, it will be set to true by default. Once set to true, it + // cannot be reverted to false. + EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` + + // EnabledForDeployment: Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored + // as secrets from the key vault. + EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` + + // EnabledForDiskEncryption: Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the + // vault and unwrap keys. + 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"` + + // HsmPoolResourceId: The resource id of HSM Pool. + HsmPoolResourceId *string `json:"hsmPoolResourceId,omitempty"` + + // NetworkAcls: Rules governing the accessibility of the key vault from specific network locations. + NetworkAcls *NetworkRuleSet_STATUS `json:"networkAcls,omitempty"` + + // PrivateEndpointConnections: List of private endpoint connections associated with the key vault. + PrivateEndpointConnections []PrivateEndpointConnectionItem_STATUS `json:"privateEndpointConnections,omitempty"` + + // ProvisioningState: Provisioning state of the vault. + ProvisioningState *VaultProperties_ProvisioningState_STATUS `json:"provisioningState,omitempty"` + + // Sku: SKU details + Sku *Sku_STATUS `json:"sku,omitempty"` + + // SoftDeleteRetentionInDays: softDelete data retention days. It accepts >=7 and <=90. + SoftDeleteRetentionInDays *int `json:"softDeleteRetentionInDays,omitempty"` + + // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. + TenantId *string `json:"tenantId,omitempty"` + + // VaultUri: The URI of the vault for performing operations on keys and secrets. + VaultUri *string `json:"vaultUri,omitempty"` +} + +// 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_STATUS struct { + // ApplicationId: Application ID of the client making request on behalf of a principal + ApplicationId *string `json:"applicationId,omitempty"` + + // ObjectId: The object ID of a user, service principal or security group in the Azure Active Directory tenant for the + // vault. The object ID must be unique for the list of access policies. + ObjectId *string `json:"objectId,omitempty"` + + // Permissions: Permissions the identity has for keys, secrets and certificates. + Permissions *Permissions_STATUS `json:"permissions,omitempty"` + + // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. + TenantId *string `json:"tenantId,omitempty"` +} + +// The type of identity. +type IdentityType_STATUS string + +const ( + IdentityType_STATUS_Application = IdentityType_STATUS("Application") + IdentityType_STATUS_Key = IdentityType_STATUS("Key") + IdentityType_STATUS_ManagedIdentity = IdentityType_STATUS("ManagedIdentity") + IdentityType_STATUS_User = IdentityType_STATUS("User") +) + +// Mapping from string to IdentityType_STATUS +var identityType_STATUS_Values = map[string]IdentityType_STATUS{ + "application": IdentityType_STATUS_Application, + "key": IdentityType_STATUS_Key, + "managedidentity": IdentityType_STATUS_ManagedIdentity, + "user": IdentityType_STATUS_User, +} + +// A set of rules governing the network accessibility of a vault. +type NetworkRuleSet_STATUS struct { + // Bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the + // default is 'AzureServices'. + Bypass *NetworkRuleSet_Bypass_STATUS `json:"bypass,omitempty"` + + // DefaultAction: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after + // the bypass property has been evaluated. + DefaultAction *NetworkRuleSet_DefaultAction_STATUS `json:"defaultAction,omitempty"` + + // IpRules: The list of IP address rules. + IpRules []IPRule_STATUS `json:"ipRules,omitempty"` + + // VirtualNetworkRules: The list of virtual network rules. + VirtualNetworkRules []VirtualNetworkRule_STATUS `json:"virtualNetworkRules,omitempty"` +} + +// Private endpoint connection item. +type PrivateEndpointConnectionItem_STATUS struct { + // Etag: Modified whenever there is a change in the state of private endpoint connection. + Etag *string `json:"etag,omitempty"` + + // Id: Id of private endpoint connection. + Id *string `json:"id,omitempty"` + + // Properties: Private endpoint connection properties. + Properties *PrivateEndpointConnectionProperties_STATUS `json:"properties,omitempty"` +} + +// SKU details +type Sku_STATUS struct { + // Family: SKU family name + Family *Sku_Family_STATUS `json:"family,omitempty"` + + // Name: SKU name to specify whether the key vault is a standard vault or a premium vault. + Name *Sku_Name_STATUS `json:"name,omitempty"` +} + +type VaultProperties_CreateMode_STATUS string + +const ( + VaultProperties_CreateMode_STATUS_CreateOrRecover = VaultProperties_CreateMode_STATUS("createOrRecover") + VaultProperties_CreateMode_STATUS_Default = VaultProperties_CreateMode_STATUS("default") + VaultProperties_CreateMode_STATUS_PurgeThenCreate = VaultProperties_CreateMode_STATUS("purgeThenCreate") + VaultProperties_CreateMode_STATUS_Recover = VaultProperties_CreateMode_STATUS("recover") +) + +// Mapping from string to VaultProperties_CreateMode_STATUS +var vaultProperties_CreateMode_STATUS_Values = map[string]VaultProperties_CreateMode_STATUS{ + "createorrecover": VaultProperties_CreateMode_STATUS_CreateOrRecover, + "default": VaultProperties_CreateMode_STATUS_Default, + "purgethencreate": VaultProperties_CreateMode_STATUS_PurgeThenCreate, + "recover": VaultProperties_CreateMode_STATUS_Recover, +} + +type VaultProperties_ProvisioningState_STATUS string + +const ( + VaultProperties_ProvisioningState_STATUS_RegisteringDns = VaultProperties_ProvisioningState_STATUS("RegisteringDns") + VaultProperties_ProvisioningState_STATUS_Succeeded = VaultProperties_ProvisioningState_STATUS("Succeeded") +) + +// Mapping from string to VaultProperties_ProvisioningState_STATUS +var vaultProperties_ProvisioningState_STATUS_Values = map[string]VaultProperties_ProvisioningState_STATUS{ + "registeringdns": VaultProperties_ProvisioningState_STATUS_RegisteringDns, + "succeeded": VaultProperties_ProvisioningState_STATUS_Succeeded, +} + +// A rule governing the accessibility of a vault from a specific ip address or ip range. +type IPRule_STATUS struct { + // Value: 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). + Value *string `json:"value,omitempty"` +} + +type NetworkRuleSet_Bypass_STATUS string + +const ( + NetworkRuleSet_Bypass_STATUS_AzureServices = NetworkRuleSet_Bypass_STATUS("AzureServices") + NetworkRuleSet_Bypass_STATUS_None = NetworkRuleSet_Bypass_STATUS("None") +) + +// Mapping from string to NetworkRuleSet_Bypass_STATUS +var networkRuleSet_Bypass_STATUS_Values = map[string]NetworkRuleSet_Bypass_STATUS{ + "azureservices": NetworkRuleSet_Bypass_STATUS_AzureServices, + "none": NetworkRuleSet_Bypass_STATUS_None, +} + +type NetworkRuleSet_DefaultAction_STATUS string + +const ( + NetworkRuleSet_DefaultAction_STATUS_Allow = NetworkRuleSet_DefaultAction_STATUS("Allow") + NetworkRuleSet_DefaultAction_STATUS_Deny = NetworkRuleSet_DefaultAction_STATUS("Deny") +) + +// Mapping from string to NetworkRuleSet_DefaultAction_STATUS +var networkRuleSet_DefaultAction_STATUS_Values = map[string]NetworkRuleSet_DefaultAction_STATUS{ + "allow": NetworkRuleSet_DefaultAction_STATUS_Allow, + "deny": NetworkRuleSet_DefaultAction_STATUS_Deny, +} + +// Permissions the identity has for keys, secrets, certificates and storage. +type Permissions_STATUS struct { + // Certificates: Permissions to certificates + Certificates []Permissions_Certificates_STATUS `json:"certificates,omitempty"` + + // Keys: Permissions to keys + Keys []Permissions_Keys_STATUS `json:"keys,omitempty"` + + // Secrets: Permissions to secrets + Secrets []Permissions_Secrets_STATUS `json:"secrets,omitempty"` + + // Storage: Permissions to storage accounts + Storage []Permissions_Storage_STATUS `json:"storage,omitempty"` +} + +// Properties of the private endpoint connection resource. +type PrivateEndpointConnectionProperties_STATUS struct { + // PrivateEndpoint: Properties of the private endpoint object. + PrivateEndpoint *PrivateEndpoint_STATUS `json:"privateEndpoint,omitempty"` + + // PrivateLinkServiceConnectionState: Approval state of the private link connection. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState_STATUS `json:"privateLinkServiceConnectionState,omitempty"` + + // ProvisioningState: Provisioning state of the private endpoint connection. + ProvisioningState *PrivateEndpointConnectionProvisioningState_STATUS `json:"provisioningState,omitempty"` +} + +type Sku_Family_STATUS string + +const Sku_Family_STATUS_A = Sku_Family_STATUS("A") + +// Mapping from string to Sku_Family_STATUS +var sku_Family_STATUS_Values = map[string]Sku_Family_STATUS{ + "a": Sku_Family_STATUS_A, +} + +type Sku_Name_STATUS string + +const ( + Sku_Name_STATUS_Premium = Sku_Name_STATUS("premium") + Sku_Name_STATUS_Standard = Sku_Name_STATUS("standard") +) + +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "premium": Sku_Name_STATUS_Premium, + "standard": Sku_Name_STATUS_Standard, +} + +// A rule governing the accessibility of a vault from a specific virtual network. +type VirtualNetworkRule_STATUS struct { + // Id: 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"` + + // IgnoreMissingVnetServiceEndpoint: Property to specify whether NRP will ignore the check if parent subnet has + // serviceEndpoints configured. + IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` +} + +type Permissions_Certificates_STATUS string + +const ( + Permissions_Certificates_STATUS_Backup = Permissions_Certificates_STATUS("backup") + Permissions_Certificates_STATUS_Create = Permissions_Certificates_STATUS("create") + Permissions_Certificates_STATUS_Delete = Permissions_Certificates_STATUS("delete") + Permissions_Certificates_STATUS_Deleteissuers = Permissions_Certificates_STATUS("deleteissuers") + Permissions_Certificates_STATUS_Get = Permissions_Certificates_STATUS("get") + Permissions_Certificates_STATUS_Getissuers = Permissions_Certificates_STATUS("getissuers") + Permissions_Certificates_STATUS_Import = Permissions_Certificates_STATUS("import") + Permissions_Certificates_STATUS_List = Permissions_Certificates_STATUS("list") + Permissions_Certificates_STATUS_Listissuers = Permissions_Certificates_STATUS("listissuers") + Permissions_Certificates_STATUS_Managecontacts = Permissions_Certificates_STATUS("managecontacts") + Permissions_Certificates_STATUS_Manageissuers = Permissions_Certificates_STATUS("manageissuers") + Permissions_Certificates_STATUS_Purge = Permissions_Certificates_STATUS("purge") + Permissions_Certificates_STATUS_Recover = Permissions_Certificates_STATUS("recover") + Permissions_Certificates_STATUS_Restore = Permissions_Certificates_STATUS("restore") + Permissions_Certificates_STATUS_Setissuers = Permissions_Certificates_STATUS("setissuers") + Permissions_Certificates_STATUS_Update = Permissions_Certificates_STATUS("update") +) + +// Mapping from string to Permissions_Certificates_STATUS +var permissions_Certificates_STATUS_Values = map[string]Permissions_Certificates_STATUS{ + "backup": Permissions_Certificates_STATUS_Backup, + "create": Permissions_Certificates_STATUS_Create, + "delete": Permissions_Certificates_STATUS_Delete, + "deleteissuers": Permissions_Certificates_STATUS_Deleteissuers, + "get": Permissions_Certificates_STATUS_Get, + "getissuers": Permissions_Certificates_STATUS_Getissuers, + "import": Permissions_Certificates_STATUS_Import, + "list": Permissions_Certificates_STATUS_List, + "listissuers": Permissions_Certificates_STATUS_Listissuers, + "managecontacts": Permissions_Certificates_STATUS_Managecontacts, + "manageissuers": Permissions_Certificates_STATUS_Manageissuers, + "purge": Permissions_Certificates_STATUS_Purge, + "recover": Permissions_Certificates_STATUS_Recover, + "restore": Permissions_Certificates_STATUS_Restore, + "setissuers": Permissions_Certificates_STATUS_Setissuers, + "update": Permissions_Certificates_STATUS_Update, +} + +type Permissions_Keys_STATUS string + +const ( + Permissions_Keys_STATUS_Backup = Permissions_Keys_STATUS("backup") + Permissions_Keys_STATUS_Create = Permissions_Keys_STATUS("create") + Permissions_Keys_STATUS_Decrypt = Permissions_Keys_STATUS("decrypt") + Permissions_Keys_STATUS_Delete = Permissions_Keys_STATUS("delete") + Permissions_Keys_STATUS_Encrypt = Permissions_Keys_STATUS("encrypt") + Permissions_Keys_STATUS_Get = Permissions_Keys_STATUS("get") + Permissions_Keys_STATUS_Import = Permissions_Keys_STATUS("import") + Permissions_Keys_STATUS_List = Permissions_Keys_STATUS("list") + Permissions_Keys_STATUS_Purge = Permissions_Keys_STATUS("purge") + Permissions_Keys_STATUS_Recover = Permissions_Keys_STATUS("recover") + Permissions_Keys_STATUS_Release = Permissions_Keys_STATUS("release") + Permissions_Keys_STATUS_Restore = Permissions_Keys_STATUS("restore") + Permissions_Keys_STATUS_Sign = Permissions_Keys_STATUS("sign") + Permissions_Keys_STATUS_UnwrapKey = Permissions_Keys_STATUS("unwrapKey") + Permissions_Keys_STATUS_Update = Permissions_Keys_STATUS("update") + Permissions_Keys_STATUS_Verify = Permissions_Keys_STATUS("verify") + Permissions_Keys_STATUS_WrapKey = Permissions_Keys_STATUS("wrapKey") +) + +// Mapping from string to Permissions_Keys_STATUS +var permissions_Keys_STATUS_Values = map[string]Permissions_Keys_STATUS{ + "backup": Permissions_Keys_STATUS_Backup, + "create": Permissions_Keys_STATUS_Create, + "decrypt": Permissions_Keys_STATUS_Decrypt, + "delete": Permissions_Keys_STATUS_Delete, + "encrypt": Permissions_Keys_STATUS_Encrypt, + "get": Permissions_Keys_STATUS_Get, + "import": Permissions_Keys_STATUS_Import, + "list": Permissions_Keys_STATUS_List, + "purge": Permissions_Keys_STATUS_Purge, + "recover": Permissions_Keys_STATUS_Recover, + "release": Permissions_Keys_STATUS_Release, + "restore": Permissions_Keys_STATUS_Restore, + "sign": Permissions_Keys_STATUS_Sign, + "unwrapkey": Permissions_Keys_STATUS_UnwrapKey, + "update": Permissions_Keys_STATUS_Update, + "verify": Permissions_Keys_STATUS_Verify, + "wrapkey": Permissions_Keys_STATUS_WrapKey, +} + +type Permissions_Secrets_STATUS string + +const ( + Permissions_Secrets_STATUS_Backup = Permissions_Secrets_STATUS("backup") + Permissions_Secrets_STATUS_Delete = Permissions_Secrets_STATUS("delete") + Permissions_Secrets_STATUS_Get = Permissions_Secrets_STATUS("get") + Permissions_Secrets_STATUS_List = Permissions_Secrets_STATUS("list") + Permissions_Secrets_STATUS_Purge = Permissions_Secrets_STATUS("purge") + Permissions_Secrets_STATUS_Recover = Permissions_Secrets_STATUS("recover") + Permissions_Secrets_STATUS_Restore = Permissions_Secrets_STATUS("restore") + Permissions_Secrets_STATUS_Set = Permissions_Secrets_STATUS("set") +) + +// Mapping from string to Permissions_Secrets_STATUS +var permissions_Secrets_STATUS_Values = map[string]Permissions_Secrets_STATUS{ + "backup": Permissions_Secrets_STATUS_Backup, + "delete": Permissions_Secrets_STATUS_Delete, + "get": Permissions_Secrets_STATUS_Get, + "list": Permissions_Secrets_STATUS_List, + "purge": Permissions_Secrets_STATUS_Purge, + "recover": Permissions_Secrets_STATUS_Recover, + "restore": Permissions_Secrets_STATUS_Restore, + "set": Permissions_Secrets_STATUS_Set, +} + +type Permissions_Storage_STATUS string + +const ( + Permissions_Storage_STATUS_Backup = Permissions_Storage_STATUS("backup") + Permissions_Storage_STATUS_Delete = Permissions_Storage_STATUS("delete") + Permissions_Storage_STATUS_Deletesas = Permissions_Storage_STATUS("deletesas") + Permissions_Storage_STATUS_Get = Permissions_Storage_STATUS("get") + Permissions_Storage_STATUS_Getsas = Permissions_Storage_STATUS("getsas") + Permissions_Storage_STATUS_List = Permissions_Storage_STATUS("list") + Permissions_Storage_STATUS_Listsas = Permissions_Storage_STATUS("listsas") + Permissions_Storage_STATUS_Purge = Permissions_Storage_STATUS("purge") + Permissions_Storage_STATUS_Recover = Permissions_Storage_STATUS("recover") + Permissions_Storage_STATUS_Regeneratekey = Permissions_Storage_STATUS("regeneratekey") + Permissions_Storage_STATUS_Restore = Permissions_Storage_STATUS("restore") + Permissions_Storage_STATUS_Set = Permissions_Storage_STATUS("set") + Permissions_Storage_STATUS_Setsas = Permissions_Storage_STATUS("setsas") + Permissions_Storage_STATUS_Update = Permissions_Storage_STATUS("update") +) + +// Mapping from string to Permissions_Storage_STATUS +var permissions_Storage_STATUS_Values = map[string]Permissions_Storage_STATUS{ + "backup": Permissions_Storage_STATUS_Backup, + "delete": Permissions_Storage_STATUS_Delete, + "deletesas": Permissions_Storage_STATUS_Deletesas, + "get": Permissions_Storage_STATUS_Get, + "getsas": Permissions_Storage_STATUS_Getsas, + "list": Permissions_Storage_STATUS_List, + "listsas": Permissions_Storage_STATUS_Listsas, + "purge": Permissions_Storage_STATUS_Purge, + "recover": Permissions_Storage_STATUS_Recover, + "regeneratekey": Permissions_Storage_STATUS_Regeneratekey, + "restore": Permissions_Storage_STATUS_Restore, + "set": Permissions_Storage_STATUS_Set, + "setsas": Permissions_Storage_STATUS_Setsas, + "update": Permissions_Storage_STATUS_Update, +} + +// Private endpoint object properties. +type PrivateEndpoint_STATUS struct { + // Id: Full identifier of the private endpoint resource. + Id *string `json:"id,omitempty"` +} + +// The current provisioning state. +type PrivateEndpointConnectionProvisioningState_STATUS string + +const ( + PrivateEndpointConnectionProvisioningState_STATUS_Creating = PrivateEndpointConnectionProvisioningState_STATUS("Creating") + PrivateEndpointConnectionProvisioningState_STATUS_Deleting = PrivateEndpointConnectionProvisioningState_STATUS("Deleting") + PrivateEndpointConnectionProvisioningState_STATUS_Disconnected = PrivateEndpointConnectionProvisioningState_STATUS("Disconnected") + PrivateEndpointConnectionProvisioningState_STATUS_Failed = PrivateEndpointConnectionProvisioningState_STATUS("Failed") + PrivateEndpointConnectionProvisioningState_STATUS_Succeeded = PrivateEndpointConnectionProvisioningState_STATUS("Succeeded") + PrivateEndpointConnectionProvisioningState_STATUS_Updating = PrivateEndpointConnectionProvisioningState_STATUS("Updating") +) + +// Mapping from string to PrivateEndpointConnectionProvisioningState_STATUS +var privateEndpointConnectionProvisioningState_STATUS_Values = map[string]PrivateEndpointConnectionProvisioningState_STATUS{ + "creating": PrivateEndpointConnectionProvisioningState_STATUS_Creating, + "deleting": PrivateEndpointConnectionProvisioningState_STATUS_Deleting, + "disconnected": PrivateEndpointConnectionProvisioningState_STATUS_Disconnected, + "failed": PrivateEndpointConnectionProvisioningState_STATUS_Failed, + "succeeded": PrivateEndpointConnectionProvisioningState_STATUS_Succeeded, + "updating": PrivateEndpointConnectionProvisioningState_STATUS_Updating, +} + +// An object that represents the approval state of the private link connection. +type PrivateLinkServiceConnectionState_STATUS struct { + // ActionsRequired: A message indicating if changes on the service provider require any updates on the consumer. + ActionsRequired *PrivateLinkServiceConnectionState_ActionsRequired_STATUS `json:"actionsRequired,omitempty"` + + // Description: The reason for approval or rejection. + Description *string `json:"description,omitempty"` + + // Status: Indicates whether the connection has been approved, rejected or removed by the key vault owner. + Status *PrivateEndpointServiceConnectionStatus_STATUS `json:"status,omitempty"` +} + +// The private endpoint connection status. +type PrivateEndpointServiceConnectionStatus_STATUS string + +const ( + PrivateEndpointServiceConnectionStatus_STATUS_Approved = PrivateEndpointServiceConnectionStatus_STATUS("Approved") + PrivateEndpointServiceConnectionStatus_STATUS_Disconnected = PrivateEndpointServiceConnectionStatus_STATUS("Disconnected") + PrivateEndpointServiceConnectionStatus_STATUS_Pending = PrivateEndpointServiceConnectionStatus_STATUS("Pending") + PrivateEndpointServiceConnectionStatus_STATUS_Rejected = PrivateEndpointServiceConnectionStatus_STATUS("Rejected") +) + +// Mapping from string to PrivateEndpointServiceConnectionStatus_STATUS +var privateEndpointServiceConnectionStatus_STATUS_Values = map[string]PrivateEndpointServiceConnectionStatus_STATUS{ + "approved": PrivateEndpointServiceConnectionStatus_STATUS_Approved, + "disconnected": PrivateEndpointServiceConnectionStatus_STATUS_Disconnected, + "pending": PrivateEndpointServiceConnectionStatus_STATUS_Pending, + "rejected": PrivateEndpointServiceConnectionStatus_STATUS_Rejected, +} + +type PrivateLinkServiceConnectionState_ActionsRequired_STATUS string + +const PrivateLinkServiceConnectionState_ActionsRequired_STATUS_None = PrivateLinkServiceConnectionState_ActionsRequired_STATUS("None") + +// Mapping from string to PrivateLinkServiceConnectionState_ActionsRequired_STATUS +var privateLinkServiceConnectionState_ActionsRequired_STATUS_Values = map[string]PrivateLinkServiceConnectionState_ActionsRequired_STATUS{ + "none": PrivateLinkServiceConnectionState_ActionsRequired_STATUS_None, +} diff --git a/v2/api/keyvault/v1api20210401preview/arm/vault_status_types_gen_test.go b/v2/api/keyvault/v1api20210401preview/arm/vault_status_types_gen_test.go new file mode 100644 index 00000000000..72d0a17d606 --- /dev/null +++ b/v2/api/keyvault/v1api20210401preview/arm/vault_status_types_gen_test.go @@ -0,0 +1,1006 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_AccessPolicyEntry_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccessPolicyEntry_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccessPolicyEntry_STATUS, AccessPolicyEntry_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccessPolicyEntry_STATUS runs a test to see if a specific instance of AccessPolicyEntry_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForAccessPolicyEntry_STATUS(subject AccessPolicyEntry_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccessPolicyEntry_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccessPolicyEntry_STATUS instances for property testing - lazily instantiated by +// AccessPolicyEntry_STATUSGenerator() +var accessPolicyEntry_STATUSGenerator gopter.Gen + +// AccessPolicyEntry_STATUSGenerator returns a generator of AccessPolicyEntry_STATUS instances for property testing. +// We first initialize accessPolicyEntry_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func AccessPolicyEntry_STATUSGenerator() gopter.Gen { + if accessPolicyEntry_STATUSGenerator != nil { + return accessPolicyEntry_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS(generators) + accessPolicyEntry_STATUSGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS(generators) + AddRelatedPropertyGeneratorsForAccessPolicyEntry_STATUS(generators) + accessPolicyEntry_STATUSGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry_STATUS{}), generators) + + return accessPolicyEntry_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS(gens map[string]gopter.Gen) { + gens["ApplicationId"] = gen.PtrOf(gen.AlphaString()) + gens["ObjectId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForAccessPolicyEntry_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForAccessPolicyEntry_STATUS(gens map[string]gopter.Gen) { + gens["Permissions"] = gen.PtrOf(Permissions_STATUSGenerator()) +} + +func Test_IPRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of IPRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIPRule_STATUS, IPRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIPRule_STATUS runs a test to see if a specific instance of IPRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForIPRule_STATUS(subject IPRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual IPRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of IPRule_STATUS instances for property testing - lazily instantiated by IPRule_STATUSGenerator() +var ipRule_STATUSGenerator gopter.Gen + +// IPRule_STATUSGenerator returns a generator of IPRule_STATUS instances for property testing. +func IPRule_STATUSGenerator() gopter.Gen { + if ipRule_STATUSGenerator != nil { + return ipRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIPRule_STATUS(generators) + ipRule_STATUSGenerator = gen.Struct(reflect.TypeOf(IPRule_STATUS{}), generators) + + return ipRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForIPRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIPRule_STATUS(gens map[string]gopter.Gen) { + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_NetworkRuleSet_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of NetworkRuleSet_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForNetworkRuleSet_STATUS, NetworkRuleSet_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForNetworkRuleSet_STATUS runs a test to see if a specific instance of NetworkRuleSet_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForNetworkRuleSet_STATUS(subject NetworkRuleSet_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual NetworkRuleSet_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of NetworkRuleSet_STATUS instances for property testing - lazily instantiated by +// NetworkRuleSet_STATUSGenerator() +var networkRuleSet_STATUSGenerator gopter.Gen + +// NetworkRuleSet_STATUSGenerator returns a generator of NetworkRuleSet_STATUS instances for property testing. +// We first initialize networkRuleSet_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func NetworkRuleSet_STATUSGenerator() gopter.Gen { + if networkRuleSet_STATUSGenerator != nil { + return networkRuleSet_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS(generators) + networkRuleSet_STATUSGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS(generators) + AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS(generators) + networkRuleSet_STATUSGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS{}), generators) + + return networkRuleSet_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS(gens map[string]gopter.Gen) { + gens["Bypass"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_Bypass_STATUS_AzureServices, NetworkRuleSet_Bypass_STATUS_None)) + gens["DefaultAction"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_DefaultAction_STATUS_Allow, NetworkRuleSet_DefaultAction_STATUS_Deny)) +} + +// AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS(gens map[string]gopter.Gen) { + gens["IpRules"] = gen.SliceOf(IPRule_STATUSGenerator()) + gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRule_STATUSGenerator()) +} + +func Test_Permissions_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Permissions_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPermissions_STATUS, Permissions_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPermissions_STATUS runs a test to see if a specific instance of Permissions_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForPermissions_STATUS(subject Permissions_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Permissions_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Permissions_STATUS instances for property testing - lazily instantiated by Permissions_STATUSGenerator() +var permissions_STATUSGenerator gopter.Gen + +// Permissions_STATUSGenerator returns a generator of Permissions_STATUS instances for property testing. +func Permissions_STATUSGenerator() gopter.Gen { + if permissions_STATUSGenerator != nil { + return permissions_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPermissions_STATUS(generators) + permissions_STATUSGenerator = gen.Struct(reflect.TypeOf(Permissions_STATUS{}), generators) + + return permissions_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForPermissions_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPermissions_STATUS(gens map[string]gopter.Gen) { + gens["Certificates"] = gen.SliceOf(gen.OneConstOf( + Permissions_Certificates_STATUS_Backup, + Permissions_Certificates_STATUS_Create, + Permissions_Certificates_STATUS_Delete, + Permissions_Certificates_STATUS_Deleteissuers, + Permissions_Certificates_STATUS_Get, + Permissions_Certificates_STATUS_Getissuers, + Permissions_Certificates_STATUS_Import, + Permissions_Certificates_STATUS_List, + Permissions_Certificates_STATUS_Listissuers, + Permissions_Certificates_STATUS_Managecontacts, + Permissions_Certificates_STATUS_Manageissuers, + Permissions_Certificates_STATUS_Purge, + Permissions_Certificates_STATUS_Recover, + Permissions_Certificates_STATUS_Restore, + Permissions_Certificates_STATUS_Setissuers, + Permissions_Certificates_STATUS_Update)) + gens["Keys"] = gen.SliceOf(gen.OneConstOf( + Permissions_Keys_STATUS_Backup, + Permissions_Keys_STATUS_Create, + Permissions_Keys_STATUS_Decrypt, + Permissions_Keys_STATUS_Delete, + Permissions_Keys_STATUS_Encrypt, + Permissions_Keys_STATUS_Get, + Permissions_Keys_STATUS_Import, + Permissions_Keys_STATUS_List, + Permissions_Keys_STATUS_Purge, + Permissions_Keys_STATUS_Recover, + Permissions_Keys_STATUS_Release, + Permissions_Keys_STATUS_Restore, + Permissions_Keys_STATUS_Sign, + Permissions_Keys_STATUS_UnwrapKey, + Permissions_Keys_STATUS_Update, + Permissions_Keys_STATUS_Verify, + Permissions_Keys_STATUS_WrapKey)) + gens["Secrets"] = gen.SliceOf(gen.OneConstOf( + Permissions_Secrets_STATUS_Backup, + Permissions_Secrets_STATUS_Delete, + Permissions_Secrets_STATUS_Get, + Permissions_Secrets_STATUS_List, + Permissions_Secrets_STATUS_Purge, + Permissions_Secrets_STATUS_Recover, + Permissions_Secrets_STATUS_Restore, + Permissions_Secrets_STATUS_Set)) + gens["Storage"] = gen.SliceOf(gen.OneConstOf( + Permissions_Storage_STATUS_Backup, + Permissions_Storage_STATUS_Delete, + Permissions_Storage_STATUS_Deletesas, + Permissions_Storage_STATUS_Get, + Permissions_Storage_STATUS_Getsas, + Permissions_Storage_STATUS_List, + Permissions_Storage_STATUS_Listsas, + Permissions_Storage_STATUS_Purge, + Permissions_Storage_STATUS_Recover, + Permissions_Storage_STATUS_Regeneratekey, + Permissions_Storage_STATUS_Restore, + Permissions_Storage_STATUS_Set, + Permissions_Storage_STATUS_Setsas, + Permissions_Storage_STATUS_Update)) +} + +func Test_PrivateEndpointConnectionItem_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of PrivateEndpointConnectionItem_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPrivateEndpointConnectionItem_STATUS, PrivateEndpointConnectionItem_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPrivateEndpointConnectionItem_STATUS runs a test to see if a specific instance of PrivateEndpointConnectionItem_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForPrivateEndpointConnectionItem_STATUS(subject PrivateEndpointConnectionItem_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual PrivateEndpointConnectionItem_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of PrivateEndpointConnectionItem_STATUS instances for property testing - lazily instantiated by +// PrivateEndpointConnectionItem_STATUSGenerator() +var privateEndpointConnectionItem_STATUSGenerator gopter.Gen + +// PrivateEndpointConnectionItem_STATUSGenerator returns a generator of PrivateEndpointConnectionItem_STATUS instances for property testing. +// We first initialize privateEndpointConnectionItem_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func PrivateEndpointConnectionItem_STATUSGenerator() gopter.Gen { + if privateEndpointConnectionItem_STATUSGenerator != nil { + return privateEndpointConnectionItem_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS(generators) + privateEndpointConnectionItem_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionItem_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS(generators) + AddRelatedPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS(generators) + privateEndpointConnectionItem_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionItem_STATUS{}), generators) + + return privateEndpointConnectionItem_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS(gens map[string]gopter.Gen) { + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(PrivateEndpointConnectionProperties_STATUSGenerator()) +} + +func Test_PrivateEndpointConnectionProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of PrivateEndpointConnectionProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPrivateEndpointConnectionProperties_STATUS, PrivateEndpointConnectionProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPrivateEndpointConnectionProperties_STATUS runs a test to see if a specific instance of PrivateEndpointConnectionProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForPrivateEndpointConnectionProperties_STATUS(subject PrivateEndpointConnectionProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual PrivateEndpointConnectionProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of PrivateEndpointConnectionProperties_STATUS instances for property testing - lazily instantiated by +// PrivateEndpointConnectionProperties_STATUSGenerator() +var privateEndpointConnectionProperties_STATUSGenerator gopter.Gen + +// PrivateEndpointConnectionProperties_STATUSGenerator returns a generator of PrivateEndpointConnectionProperties_STATUS instances for property testing. +// We first initialize privateEndpointConnectionProperties_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func PrivateEndpointConnectionProperties_STATUSGenerator() gopter.Gen { + if privateEndpointConnectionProperties_STATUSGenerator != nil { + return privateEndpointConnectionProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS(generators) + privateEndpointConnectionProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionProperties_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS(generators) + AddRelatedPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS(generators) + privateEndpointConnectionProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionProperties_STATUS{}), generators) + + return privateEndpointConnectionProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS(gens map[string]gopter.Gen) { + gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf( + PrivateEndpointConnectionProvisioningState_STATUS_Creating, + PrivateEndpointConnectionProvisioningState_STATUS_Deleting, + PrivateEndpointConnectionProvisioningState_STATUS_Disconnected, + PrivateEndpointConnectionProvisioningState_STATUS_Failed, + PrivateEndpointConnectionProvisioningState_STATUS_Succeeded, + PrivateEndpointConnectionProvisioningState_STATUS_Updating)) +} + +// AddRelatedPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS(gens map[string]gopter.Gen) { + gens["PrivateEndpoint"] = gen.PtrOf(PrivateEndpoint_STATUSGenerator()) + gens["PrivateLinkServiceConnectionState"] = gen.PtrOf(PrivateLinkServiceConnectionState_STATUSGenerator()) +} + +func Test_PrivateEndpoint_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of PrivateEndpoint_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPrivateEndpoint_STATUS, PrivateEndpoint_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPrivateEndpoint_STATUS runs a test to see if a specific instance of PrivateEndpoint_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForPrivateEndpoint_STATUS(subject PrivateEndpoint_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual PrivateEndpoint_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of PrivateEndpoint_STATUS instances for property testing - lazily instantiated by +// PrivateEndpoint_STATUSGenerator() +var privateEndpoint_STATUSGenerator gopter.Gen + +// PrivateEndpoint_STATUSGenerator returns a generator of PrivateEndpoint_STATUS instances for property testing. +func PrivateEndpoint_STATUSGenerator() gopter.Gen { + if privateEndpoint_STATUSGenerator != nil { + return privateEndpoint_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpoint_STATUS(generators) + privateEndpoint_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateEndpoint_STATUS{}), generators) + + return privateEndpoint_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForPrivateEndpoint_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPrivateEndpoint_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_PrivateLinkServiceConnectionState_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of PrivateLinkServiceConnectionState_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPrivateLinkServiceConnectionState_STATUS, PrivateLinkServiceConnectionState_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPrivateLinkServiceConnectionState_STATUS runs a test to see if a specific instance of PrivateLinkServiceConnectionState_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForPrivateLinkServiceConnectionState_STATUS(subject PrivateLinkServiceConnectionState_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual PrivateLinkServiceConnectionState_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of PrivateLinkServiceConnectionState_STATUS instances for property testing - lazily instantiated by +// PrivateLinkServiceConnectionState_STATUSGenerator() +var privateLinkServiceConnectionState_STATUSGenerator gopter.Gen + +// PrivateLinkServiceConnectionState_STATUSGenerator returns a generator of PrivateLinkServiceConnectionState_STATUS instances for property testing. +func PrivateLinkServiceConnectionState_STATUSGenerator() gopter.Gen { + if privateLinkServiceConnectionState_STATUSGenerator != nil { + return privateLinkServiceConnectionState_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateLinkServiceConnectionState_STATUS(generators) + privateLinkServiceConnectionState_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateLinkServiceConnectionState_STATUS{}), generators) + + return privateLinkServiceConnectionState_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForPrivateLinkServiceConnectionState_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPrivateLinkServiceConnectionState_STATUS(gens map[string]gopter.Gen) { + gens["ActionsRequired"] = gen.PtrOf(gen.OneConstOf(PrivateLinkServiceConnectionState_ActionsRequired_STATUS_None)) + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["Status"] = gen.PtrOf(gen.OneConstOf( + PrivateEndpointServiceConnectionStatus_STATUS_Approved, + PrivateEndpointServiceConnectionStatus_STATUS_Disconnected, + PrivateEndpointServiceConnectionStatus_STATUS_Pending, + PrivateEndpointServiceConnectionStatus_STATUS_Rejected)) +} + +func Test_Sku_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Sku_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSku_STATUS, Sku_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSku_STATUS runs a test to see if a specific instance of Sku_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSku_STATUS(subject Sku_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Sku_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Sku_STATUS instances for property testing - lazily instantiated by Sku_STATUSGenerator() +var sku_STATUSGenerator gopter.Gen + +// Sku_STATUSGenerator returns a generator of Sku_STATUS instances for property testing. +func Sku_STATUSGenerator() gopter.Gen { + if sku_STATUSGenerator != nil { + return sku_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSku_STATUS(generators) + sku_STATUSGenerator = gen.Struct(reflect.TypeOf(Sku_STATUS{}), generators) + + return sku_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSku_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSku_STATUS(gens map[string]gopter.Gen) { + gens["Family"] = gen.PtrOf(gen.OneConstOf(Sku_Family_STATUS_A)) + gens["Name"] = gen.PtrOf(gen.OneConstOf(Sku_Name_STATUS_Premium, Sku_Name_STATUS_Standard)) +} + +func Test_SystemData_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SystemData_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSystemData_STATUS, SystemData_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSystemData_STATUS runs a test to see if a specific instance of SystemData_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSystemData_STATUS(subject SystemData_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SystemData_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SystemData_STATUS instances for property testing - lazily instantiated by SystemData_STATUSGenerator() +var systemData_STATUSGenerator gopter.Gen + +// SystemData_STATUSGenerator returns a generator of SystemData_STATUS instances for property testing. +func SystemData_STATUSGenerator() gopter.Gen { + if systemData_STATUSGenerator != nil { + return systemData_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSystemData_STATUS(generators) + systemData_STATUSGenerator = gen.Struct(reflect.TypeOf(SystemData_STATUS{}), generators) + + return systemData_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSystemData_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSystemData_STATUS(gens map[string]gopter.Gen) { + gens["CreatedAt"] = gen.PtrOf(gen.AlphaString()) + gens["CreatedBy"] = gen.PtrOf(gen.AlphaString()) + gens["CreatedByType"] = gen.PtrOf(gen.OneConstOf( + IdentityType_STATUS_Application, + IdentityType_STATUS_Key, + IdentityType_STATUS_ManagedIdentity, + IdentityType_STATUS_User)) + gens["LastModifiedAt"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedBy"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedByType"] = gen.PtrOf(gen.OneConstOf( + IdentityType_STATUS_Application, + IdentityType_STATUS_Key, + IdentityType_STATUS_ManagedIdentity, + IdentityType_STATUS_User)) +} + +func Test_VaultProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VaultProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVaultProperties_STATUS, VaultProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVaultProperties_STATUS runs a test to see if a specific instance of VaultProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForVaultProperties_STATUS(subject VaultProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VaultProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VaultProperties_STATUS instances for property testing - lazily instantiated by +// VaultProperties_STATUSGenerator() +var vaultProperties_STATUSGenerator gopter.Gen + +// VaultProperties_STATUSGenerator returns a generator of VaultProperties_STATUS instances for property testing. +// We first initialize vaultProperties_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func VaultProperties_STATUSGenerator() gopter.Gen { + if vaultProperties_STATUSGenerator != nil { + return vaultProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVaultProperties_STATUS(generators) + vaultProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(VaultProperties_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVaultProperties_STATUS(generators) + AddRelatedPropertyGeneratorsForVaultProperties_STATUS(generators) + vaultProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(VaultProperties_STATUS{}), generators) + + return vaultProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForVaultProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVaultProperties_STATUS(gens map[string]gopter.Gen) { + gens["CreateMode"] = gen.PtrOf(gen.OneConstOf( + VaultProperties_CreateMode_STATUS_CreateOrRecover, + VaultProperties_CreateMode_STATUS_Default, + VaultProperties_CreateMode_STATUS_PurgeThenCreate, + VaultProperties_CreateMode_STATUS_Recover)) + gens["EnablePurgeProtection"] = gen.PtrOf(gen.Bool()) + gens["EnableRbacAuthorization"] = gen.PtrOf(gen.Bool()) + gens["EnableSoftDelete"] = gen.PtrOf(gen.Bool()) + gens["EnabledForDeployment"] = gen.PtrOf(gen.Bool()) + gens["EnabledForDiskEncryption"] = gen.PtrOf(gen.Bool()) + gens["EnabledForTemplateDeployment"] = gen.PtrOf(gen.Bool()) + gens["HsmPoolResourceId"] = gen.PtrOf(gen.AlphaString()) + gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(VaultProperties_ProvisioningState_STATUS_RegisteringDns, VaultProperties_ProvisioningState_STATUS_Succeeded)) + gens["SoftDeleteRetentionInDays"] = gen.PtrOf(gen.Int()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["VaultUri"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForVaultProperties_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForVaultProperties_STATUS(gens map[string]gopter.Gen) { + gens["AccessPolicies"] = gen.SliceOf(AccessPolicyEntry_STATUSGenerator()) + gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSet_STATUSGenerator()) + gens["PrivateEndpointConnections"] = gen.SliceOf(PrivateEndpointConnectionItem_STATUSGenerator()) + gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator()) +} + +func Test_Vault_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Vault_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVault_STATUS, Vault_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVault_STATUS runs a test to see if a specific instance of Vault_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForVault_STATUS(subject Vault_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Vault_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Vault_STATUS instances for property testing - lazily instantiated by Vault_STATUSGenerator() +var vault_STATUSGenerator gopter.Gen + +// Vault_STATUSGenerator returns a generator of Vault_STATUS instances for property testing. +// We first initialize vault_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Vault_STATUSGenerator() gopter.Gen { + if vault_STATUSGenerator != nil { + return vault_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVault_STATUS(generators) + vault_STATUSGenerator = gen.Struct(reflect.TypeOf(Vault_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVault_STATUS(generators) + AddRelatedPropertyGeneratorsForVault_STATUS(generators) + vault_STATUSGenerator = gen.Struct(reflect.TypeOf(Vault_STATUS{}), generators) + + return vault_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForVault_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVault_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForVault_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForVault_STATUS(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(VaultProperties_STATUSGenerator()) + gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator()) +} + +func Test_VirtualNetworkRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VirtualNetworkRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule_STATUS, VirtualNetworkRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVirtualNetworkRule_STATUS runs a test to see if a specific instance of VirtualNetworkRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForVirtualNetworkRule_STATUS(subject VirtualNetworkRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VirtualNetworkRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VirtualNetworkRule_STATUS instances for property testing - lazily instantiated by +// VirtualNetworkRule_STATUSGenerator() +var virtualNetworkRule_STATUSGenerator gopter.Gen + +// VirtualNetworkRule_STATUSGenerator returns a generator of VirtualNetworkRule_STATUS instances for property testing. +func VirtualNetworkRule_STATUSGenerator() gopter.Gen { + if virtualNetworkRule_STATUSGenerator != nil { + return virtualNetworkRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS(generators) + virtualNetworkRule_STATUSGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule_STATUS{}), generators) + + return virtualNetworkRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["IgnoreMissingVnetServiceEndpoint"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/keyvault/v1api20210401preview/structure.txt b/v2/api/keyvault/v1api20210401preview/structure.txt index d099bd4eb2e..0d35db71caf 100644 --- a/v2/api/keyvault/v1api20210401preview/structure.txt +++ b/v2/api/keyvault/v1api20210401preview/structure.txt @@ -262,251 +262,3 @@ Vault: Resource │ └── "User" ├── Tags: map[string]string └── Type: *string -Vault_STATUS_ARM: Object (7 properties) -├── Id: *string -├── Location: *string -├── Name: *string -├── Properties: *Object (16 properties) -│ ├── AccessPolicies: Object (4 properties)[] -│ │ ├── ApplicationId: *string -│ │ ├── ObjectId: *string -│ │ ├── Permissions: *Object (4 properties) -│ │ │ ├── Certificates: Enum (16 values)[] -│ │ │ │ ├── "backup" -│ │ │ │ ├── "create" -│ │ │ │ ├── "delete" -│ │ │ │ ├── "deleteissuers" -│ │ │ │ ├── "get" -│ │ │ │ ├── "getissuers" -│ │ │ │ ├── "import" -│ │ │ │ ├── "list" -│ │ │ │ ├── "listissuers" -│ │ │ │ ├── "managecontacts" -│ │ │ │ ├── "manageissuers" -│ │ │ │ ├── "purge" -│ │ │ │ ├── "recover" -│ │ │ │ ├── "restore" -│ │ │ │ ├── "setissuers" -│ │ │ │ └── "update" -│ │ │ ├── Keys: Enum (17 values)[] -│ │ │ │ ├── "backup" -│ │ │ │ ├── "create" -│ │ │ │ ├── "decrypt" -│ │ │ │ ├── "delete" -│ │ │ │ ├── "encrypt" -│ │ │ │ ├── "get" -│ │ │ │ ├── "import" -│ │ │ │ ├── "list" -│ │ │ │ ├── "purge" -│ │ │ │ ├── "recover" -│ │ │ │ ├── "release" -│ │ │ │ ├── "restore" -│ │ │ │ ├── "sign" -│ │ │ │ ├── "unwrapKey" -│ │ │ │ ├── "update" -│ │ │ │ ├── "verify" -│ │ │ │ └── "wrapKey" -│ │ │ ├── Secrets: Enum (8 values)[] -│ │ │ │ ├── "backup" -│ │ │ │ ├── "delete" -│ │ │ │ ├── "get" -│ │ │ │ ├── "list" -│ │ │ │ ├── "purge" -│ │ │ │ ├── "recover" -│ │ │ │ ├── "restore" -│ │ │ │ └── "set" -│ │ │ └── Storage: Enum (14 values)[] -│ │ │ ├── "backup" -│ │ │ ├── "delete" -│ │ │ ├── "deletesas" -│ │ │ ├── "get" -│ │ │ ├── "getsas" -│ │ │ ├── "list" -│ │ │ ├── "listsas" -│ │ │ ├── "purge" -│ │ │ ├── "recover" -│ │ │ ├── "regeneratekey" -│ │ │ ├── "restore" -│ │ │ ├── "set" -│ │ │ ├── "setsas" -│ │ │ └── "update" -│ │ └── TenantId: *string -│ ├── CreateMode: *Enum (4 values) -│ │ ├── "createOrRecover" -│ │ ├── "default" -│ │ ├── "purgeThenCreate" -│ │ └── "recover" -│ ├── EnablePurgeProtection: *bool -│ ├── EnableRbacAuthorization: *bool -│ ├── EnableSoftDelete: *bool -│ ├── EnabledForDeployment: *bool -│ ├── EnabledForDiskEncryption: *bool -│ ├── EnabledForTemplateDeployment: *bool -│ ├── HsmPoolResourceId: *string -│ ├── NetworkAcls: *Object (4 properties) -│ │ ├── Bypass: *Enum (2 values) -│ │ │ ├── "AzureServices" -│ │ │ └── "None" -│ │ ├── DefaultAction: *Enum (2 values) -│ │ │ ├── "Allow" -│ │ │ └── "Deny" -│ │ ├── IpRules: Object (1 property)[] -│ │ │ └── Value: *string -│ │ └── VirtualNetworkRules: Object (2 properties)[] -│ │ ├── Id: *string -│ │ └── IgnoreMissingVnetServiceEndpoint: *bool -│ ├── PrivateEndpointConnections: Object (3 properties)[] -│ │ ├── Etag: *string -│ │ ├── Id: *string -│ │ └── Properties: *Object (3 properties) -│ │ ├── PrivateEndpoint: *Object (1 property) -│ │ │ └── Id: *string -│ │ ├── PrivateLinkServiceConnectionState: *Object (3 properties) -│ │ │ ├── ActionsRequired: *Enum (1 value) -│ │ │ │ └── "None" -│ │ │ ├── Description: *string -│ │ │ └── Status: *Enum (4 values) -│ │ │ ├── "Approved" -│ │ │ ├── "Disconnected" -│ │ │ ├── "Pending" -│ │ │ └── "Rejected" -│ │ └── ProvisioningState: *Enum (6 values) -│ │ ├── "Creating" -│ │ ├── "Deleting" -│ │ ├── "Disconnected" -│ │ ├── "Failed" -│ │ ├── "Succeeded" -│ │ └── "Updating" -│ ├── ProvisioningState: *Enum (2 values) -│ │ ├── "RegisteringDns" -│ │ └── "Succeeded" -│ ├── Sku: *Object (2 properties) -│ │ ├── Family: *Enum (1 value) -│ │ │ └── "A" -│ │ └── Name: *Enum (2 values) -│ │ ├── "premium" -│ │ └── "standard" -│ ├── SoftDeleteRetentionInDays: *int -│ ├── TenantId: *string -│ └── VaultUri: *string -├── SystemData: *Object (6 properties) -│ ├── CreatedAt: *string -│ ├── CreatedBy: *string -│ ├── CreatedByType: *Enum (4 values) -│ │ ├── "Application" -│ │ ├── "Key" -│ │ ├── "ManagedIdentity" -│ │ └── "User" -│ ├── LastModifiedAt: *string -│ ├── LastModifiedBy: *string -│ └── LastModifiedByType: *Enum (4 values) -│ ├── "Application" -│ ├── "Key" -│ ├── "ManagedIdentity" -│ └── "User" -├── Tags: map[string]string -└── Type: *string -Vault_Spec_ARM: Object (4 properties) -├── Location: *string -├── Name: string -├── Properties: *Object (14 properties) -│ ├── AccessPolicies: Object (4 properties)[] -│ │ ├── ApplicationId: *string -│ │ ├── ObjectId: *string -│ │ ├── Permissions: *Object (4 properties) -│ │ │ ├── Certificates: Enum (16 values)[] -│ │ │ │ ├── "backup" -│ │ │ │ ├── "create" -│ │ │ │ ├── "delete" -│ │ │ │ ├── "deleteissuers" -│ │ │ │ ├── "get" -│ │ │ │ ├── "getissuers" -│ │ │ │ ├── "import" -│ │ │ │ ├── "list" -│ │ │ │ ├── "listissuers" -│ │ │ │ ├── "managecontacts" -│ │ │ │ ├── "manageissuers" -│ │ │ │ ├── "purge" -│ │ │ │ ├── "recover" -│ │ │ │ ├── "restore" -│ │ │ │ ├── "setissuers" -│ │ │ │ └── "update" -│ │ │ ├── Keys: Enum (17 values)[] -│ │ │ │ ├── "backup" -│ │ │ │ ├── "create" -│ │ │ │ ├── "decrypt" -│ │ │ │ ├── "delete" -│ │ │ │ ├── "encrypt" -│ │ │ │ ├── "get" -│ │ │ │ ├── "import" -│ │ │ │ ├── "list" -│ │ │ │ ├── "purge" -│ │ │ │ ├── "recover" -│ │ │ │ ├── "release" -│ │ │ │ ├── "restore" -│ │ │ │ ├── "sign" -│ │ │ │ ├── "unwrapKey" -│ │ │ │ ├── "update" -│ │ │ │ ├── "verify" -│ │ │ │ └── "wrapKey" -│ │ │ ├── Secrets: Enum (8 values)[] -│ │ │ │ ├── "backup" -│ │ │ │ ├── "delete" -│ │ │ │ ├── "get" -│ │ │ │ ├── "list" -│ │ │ │ ├── "purge" -│ │ │ │ ├── "recover" -│ │ │ │ ├── "restore" -│ │ │ │ └── "set" -│ │ │ └── Storage: Enum (14 values)[] -│ │ │ ├── "backup" -│ │ │ ├── "delete" -│ │ │ ├── "deletesas" -│ │ │ ├── "get" -│ │ │ ├── "getsas" -│ │ │ ├── "list" -│ │ │ ├── "listsas" -│ │ │ ├── "purge" -│ │ │ ├── "recover" -│ │ │ ├── "regeneratekey" -│ │ │ ├── "restore" -│ │ │ ├── "set" -│ │ │ ├── "setsas" -│ │ │ └── "update" -│ │ └── TenantId: *string -│ ├── CreateMode: *Enum (4 values) -│ │ ├── "createOrRecover" -│ │ ├── "default" -│ │ ├── "purgeThenCreate" -│ │ └── "recover" -│ ├── EnablePurgeProtection: *bool -│ ├── EnableRbacAuthorization: *bool -│ ├── EnableSoftDelete: *bool -│ ├── EnabledForDeployment: *bool -│ ├── EnabledForDiskEncryption: *bool -│ ├── EnabledForTemplateDeployment: *bool -│ ├── NetworkAcls: *Object (4 properties) -│ │ ├── Bypass: *Enum (2 values) -│ │ │ ├── "AzureServices" -│ │ │ └── "None" -│ │ ├── DefaultAction: *Enum (2 values) -│ │ │ ├── "Allow" -│ │ │ └── "Deny" -│ │ ├── IpRules: Object (1 property)[] -│ │ │ └── Value: *string -│ │ └── VirtualNetworkRules: Object (2 properties)[] -│ │ ├── Id: *string -│ │ └── IgnoreMissingVnetServiceEndpoint: *bool -│ ├── ProvisioningState: *Enum (2 values) -│ │ ├── "RegisteringDns" -│ │ └── "Succeeded" -│ ├── Sku: *Object (2 properties) -│ │ ├── Family: *Enum (1 value) -│ │ │ └── "A" -│ │ └── Name: *Enum (2 values) -│ │ ├── "premium" -│ │ └── "standard" -│ ├── SoftDeleteRetentionInDays: *int -│ ├── TenantId: *string -│ └── VaultUri: *string -└── Tags: map[string]string diff --git a/v2/api/keyvault/v1api20210401preview/vault_spec_arm_types_gen.go b/v2/api/keyvault/v1api20210401preview/vault_spec_arm_types_gen.go deleted file mode 100644 index bc0a2c27716..00000000000 --- a/v2/api/keyvault/v1api20210401preview/vault_spec_arm_types_gen.go +++ /dev/null @@ -1,402 +0,0 @@ -// Code generated by azure-service-operator-codegen. DO NOT EDIT. -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -package v1api20210401preview - -import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" - -type Vault_Spec_ARM struct { - // Location: The supported Azure location where the key vault should be created. - Location *string `json:"location,omitempty"` - Name string `json:"name,omitempty"` - - // Properties: Properties of the vault - Properties *VaultProperties_ARM `json:"properties,omitempty"` - - // Tags: The tags that will be assigned to the key vault. - Tags map[string]string `json:"tags,omitempty"` -} - -var _ genruntime.ARMResourceSpec = &Vault_Spec_ARM{} - -// GetAPIVersion returns the ARM API version of the resource. This is always "2021-04-01-preview" -func (vault Vault_Spec_ARM) GetAPIVersion() string { - return "2021-04-01-preview" -} - -// GetName returns the Name of the resource -func (vault *Vault_Spec_ARM) GetName() string { - return vault.Name -} - -// GetType returns the ARM Type of the resource. This is always "Microsoft.KeyVault/vaults" -func (vault *Vault_Spec_ARM) GetType() string { - return "Microsoft.KeyVault/vaults" -} - -// Properties of the vault -type VaultProperties_ARM struct { - // AccessPolicies: An array of 0 to 1024 identities 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. When `createMode` is set to `recover`, access policies are not - // required. Otherwise, access policies are required. - AccessPolicies []AccessPolicyEntry_ARM `json:"accessPolicies,omitempty"` - - // CreateMode: The vault's create mode to indicate whether the vault need to be recovered or not. - CreateMode *VaultProperties_CreateMode_ARM `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"` - - // EnableRbacAuthorization: Property that controls how data actions are authorized. When true, the key vault will use Role - // Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties - // will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy - // stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value - // of false. Note that management actions are always authorized with RBAC. - EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"` - - // EnableSoftDelete: Property to specify whether the 'soft delete' functionality is enabled for this key vault. If it's not - // set to any value(true or false) when creating new key vault, it will be set to true by default. Once set to true, it - // cannot be reverted to false. - EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` - - // EnabledForDeployment: Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored - // as secrets from the key vault. - EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` - - // EnabledForDiskEncryption: Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the - // vault and unwrap keys. - 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"` - - // NetworkAcls: Rules governing the accessibility of the key vault from specific network locations. - NetworkAcls *NetworkRuleSet_ARM `json:"networkAcls,omitempty"` - - // ProvisioningState: Provisioning state of the vault. - ProvisioningState *VaultProperties_ProvisioningState_ARM `json:"provisioningState,omitempty"` - - // Sku: SKU details - Sku *Sku_ARM `json:"sku,omitempty"` - - // SoftDeleteRetentionInDays: softDelete data retention days. It accepts >=7 and <=90. - SoftDeleteRetentionInDays *int `json:"softDeleteRetentionInDays,omitempty"` - - // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantId *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"` - - // VaultUri: The URI of the vault for performing operations on keys and secrets. - VaultUri *string `json:"vaultUri,omitempty"` -} - -// 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_ARM struct { - // ApplicationId: Application ID of the client making request on behalf of a principal - ApplicationId *string `json:"applicationId,omitempty" optionalConfigMapPair:"ApplicationId"` - - // ObjectId: The object ID of a user, service principal or security group in the Azure Active Directory tenant for the - // vault. The object ID must be unique for the list of access policies. - ObjectId *string `json:"objectId,omitempty" optionalConfigMapPair:"ObjectId"` - - // Permissions: Permissions the identity has for keys, secrets and certificates. - Permissions *Permissions_ARM `json:"permissions,omitempty"` - - // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantId *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"` -} - -// A set of rules governing the network accessibility of a vault. -type NetworkRuleSet_ARM struct { - // Bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the - // default is 'AzureServices'. - Bypass *NetworkRuleSet_Bypass_ARM `json:"bypass,omitempty"` - - // DefaultAction: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after - // the bypass property has been evaluated. - DefaultAction *NetworkRuleSet_DefaultAction_ARM `json:"defaultAction,omitempty"` - - // IpRules: The list of IP address rules. - IpRules []IPRule_ARM `json:"ipRules,omitempty"` - - // VirtualNetworkRules: The list of virtual network rules. - VirtualNetworkRules []VirtualNetworkRule_ARM `json:"virtualNetworkRules,omitempty"` -} - -// SKU details -type Sku_ARM struct { - // Family: SKU family name - Family *Sku_Family_ARM `json:"family,omitempty"` - - // Name: SKU name to specify whether the key vault is a standard vault or a premium vault. - Name *Sku_Name_ARM `json:"name,omitempty"` -} - -// +kubebuilder:validation:Enum={"createOrRecover","default","purgeThenCreate","recover"} -type VaultProperties_CreateMode_ARM string - -const ( - VaultProperties_CreateMode_ARM_CreateOrRecover = VaultProperties_CreateMode_ARM("createOrRecover") - VaultProperties_CreateMode_ARM_Default = VaultProperties_CreateMode_ARM("default") - VaultProperties_CreateMode_ARM_PurgeThenCreate = VaultProperties_CreateMode_ARM("purgeThenCreate") - VaultProperties_CreateMode_ARM_Recover = VaultProperties_CreateMode_ARM("recover") -) - -// Mapping from string to VaultProperties_CreateMode_ARM -var vaultProperties_CreateMode_ARM_Values = map[string]VaultProperties_CreateMode_ARM{ - "createorrecover": VaultProperties_CreateMode_ARM_CreateOrRecover, - "default": VaultProperties_CreateMode_ARM_Default, - "purgethencreate": VaultProperties_CreateMode_ARM_PurgeThenCreate, - "recover": VaultProperties_CreateMode_ARM_Recover, -} - -// +kubebuilder:validation:Enum={"RegisteringDns","Succeeded"} -type VaultProperties_ProvisioningState_ARM string - -const ( - VaultProperties_ProvisioningState_ARM_RegisteringDns = VaultProperties_ProvisioningState_ARM("RegisteringDns") - VaultProperties_ProvisioningState_ARM_Succeeded = VaultProperties_ProvisioningState_ARM("Succeeded") -) - -// Mapping from string to VaultProperties_ProvisioningState_ARM -var vaultProperties_ProvisioningState_ARM_Values = map[string]VaultProperties_ProvisioningState_ARM{ - "registeringdns": VaultProperties_ProvisioningState_ARM_RegisteringDns, - "succeeded": VaultProperties_ProvisioningState_ARM_Succeeded, -} - -// A rule governing the accessibility of a vault from a specific ip address or ip range. -type IPRule_ARM struct { - // Value: 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). - Value *string `json:"value,omitempty"` -} - -// +kubebuilder:validation:Enum={"AzureServices","None"} -type NetworkRuleSet_Bypass_ARM string - -const ( - NetworkRuleSet_Bypass_ARM_AzureServices = NetworkRuleSet_Bypass_ARM("AzureServices") - NetworkRuleSet_Bypass_ARM_None = NetworkRuleSet_Bypass_ARM("None") -) - -// Mapping from string to NetworkRuleSet_Bypass_ARM -var networkRuleSet_Bypass_ARM_Values = map[string]NetworkRuleSet_Bypass_ARM{ - "azureservices": NetworkRuleSet_Bypass_ARM_AzureServices, - "none": NetworkRuleSet_Bypass_ARM_None, -} - -// +kubebuilder:validation:Enum={"Allow","Deny"} -type NetworkRuleSet_DefaultAction_ARM string - -const ( - NetworkRuleSet_DefaultAction_ARM_Allow = NetworkRuleSet_DefaultAction_ARM("Allow") - NetworkRuleSet_DefaultAction_ARM_Deny = NetworkRuleSet_DefaultAction_ARM("Deny") -) - -// Mapping from string to NetworkRuleSet_DefaultAction_ARM -var networkRuleSet_DefaultAction_ARM_Values = map[string]NetworkRuleSet_DefaultAction_ARM{ - "allow": NetworkRuleSet_DefaultAction_ARM_Allow, - "deny": NetworkRuleSet_DefaultAction_ARM_Deny, -} - -// Permissions the identity has for keys, secrets, certificates and storage. -type Permissions_ARM struct { - // Certificates: Permissions to certificates - Certificates []Permissions_Certificates_ARM `json:"certificates,omitempty"` - - // Keys: Permissions to keys - Keys []Permissions_Keys_ARM `json:"keys,omitempty"` - - // Secrets: Permissions to secrets - Secrets []Permissions_Secrets_ARM `json:"secrets,omitempty"` - - // Storage: Permissions to storage accounts - Storage []Permissions_Storage_ARM `json:"storage,omitempty"` -} - -// +kubebuilder:validation:Enum={"A"} -type Sku_Family_ARM string - -const Sku_Family_ARM_A = Sku_Family_ARM("A") - -// Mapping from string to Sku_Family_ARM -var sku_Family_ARM_Values = map[string]Sku_Family_ARM{ - "a": Sku_Family_ARM_A, -} - -// +kubebuilder:validation:Enum={"premium","standard"} -type Sku_Name_ARM string - -const ( - Sku_Name_ARM_Premium = Sku_Name_ARM("premium") - Sku_Name_ARM_Standard = Sku_Name_ARM("standard") -) - -// Mapping from string to Sku_Name_ARM -var sku_Name_ARM_Values = map[string]Sku_Name_ARM{ - "premium": Sku_Name_ARM_Premium, - "standard": Sku_Name_ARM_Standard, -} - -// A rule governing the accessibility of a vault from a specific virtual network. -type VirtualNetworkRule_ARM struct { - Id *string `json:"id,omitempty"` - - // IgnoreMissingVnetServiceEndpoint: Property to specify whether NRP will ignore the check if parent subnet has - // serviceEndpoints configured. - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` -} - -// +kubebuilder:validation:Enum={"backup","create","delete","deleteissuers","get","getissuers","import","list","listissuers","managecontacts","manageissuers","purge","recover","restore","setissuers","update"} -type Permissions_Certificates_ARM string - -const ( - Permissions_Certificates_ARM_Backup = Permissions_Certificates_ARM("backup") - Permissions_Certificates_ARM_Create = Permissions_Certificates_ARM("create") - Permissions_Certificates_ARM_Delete = Permissions_Certificates_ARM("delete") - Permissions_Certificates_ARM_Deleteissuers = Permissions_Certificates_ARM("deleteissuers") - Permissions_Certificates_ARM_Get = Permissions_Certificates_ARM("get") - Permissions_Certificates_ARM_Getissuers = Permissions_Certificates_ARM("getissuers") - Permissions_Certificates_ARM_Import = Permissions_Certificates_ARM("import") - Permissions_Certificates_ARM_List = Permissions_Certificates_ARM("list") - Permissions_Certificates_ARM_Listissuers = Permissions_Certificates_ARM("listissuers") - Permissions_Certificates_ARM_Managecontacts = Permissions_Certificates_ARM("managecontacts") - Permissions_Certificates_ARM_Manageissuers = Permissions_Certificates_ARM("manageissuers") - Permissions_Certificates_ARM_Purge = Permissions_Certificates_ARM("purge") - Permissions_Certificates_ARM_Recover = Permissions_Certificates_ARM("recover") - Permissions_Certificates_ARM_Restore = Permissions_Certificates_ARM("restore") - Permissions_Certificates_ARM_Setissuers = Permissions_Certificates_ARM("setissuers") - Permissions_Certificates_ARM_Update = Permissions_Certificates_ARM("update") -) - -// Mapping from string to Permissions_Certificates_ARM -var permissions_Certificates_ARM_Values = map[string]Permissions_Certificates_ARM{ - "backup": Permissions_Certificates_ARM_Backup, - "create": Permissions_Certificates_ARM_Create, - "delete": Permissions_Certificates_ARM_Delete, - "deleteissuers": Permissions_Certificates_ARM_Deleteissuers, - "get": Permissions_Certificates_ARM_Get, - "getissuers": Permissions_Certificates_ARM_Getissuers, - "import": Permissions_Certificates_ARM_Import, - "list": Permissions_Certificates_ARM_List, - "listissuers": Permissions_Certificates_ARM_Listissuers, - "managecontacts": Permissions_Certificates_ARM_Managecontacts, - "manageissuers": Permissions_Certificates_ARM_Manageissuers, - "purge": Permissions_Certificates_ARM_Purge, - "recover": Permissions_Certificates_ARM_Recover, - "restore": Permissions_Certificates_ARM_Restore, - "setissuers": Permissions_Certificates_ARM_Setissuers, - "update": Permissions_Certificates_ARM_Update, -} - -// +kubebuilder:validation:Enum={"backup","create","decrypt","delete","encrypt","get","import","list","purge","recover","release","restore","sign","unwrapKey","update","verify","wrapKey"} -type Permissions_Keys_ARM string - -const ( - Permissions_Keys_ARM_Backup = Permissions_Keys_ARM("backup") - Permissions_Keys_ARM_Create = Permissions_Keys_ARM("create") - Permissions_Keys_ARM_Decrypt = Permissions_Keys_ARM("decrypt") - Permissions_Keys_ARM_Delete = Permissions_Keys_ARM("delete") - Permissions_Keys_ARM_Encrypt = Permissions_Keys_ARM("encrypt") - Permissions_Keys_ARM_Get = Permissions_Keys_ARM("get") - Permissions_Keys_ARM_Import = Permissions_Keys_ARM("import") - Permissions_Keys_ARM_List = Permissions_Keys_ARM("list") - Permissions_Keys_ARM_Purge = Permissions_Keys_ARM("purge") - Permissions_Keys_ARM_Recover = Permissions_Keys_ARM("recover") - Permissions_Keys_ARM_Release = Permissions_Keys_ARM("release") - Permissions_Keys_ARM_Restore = Permissions_Keys_ARM("restore") - Permissions_Keys_ARM_Sign = Permissions_Keys_ARM("sign") - Permissions_Keys_ARM_UnwrapKey = Permissions_Keys_ARM("unwrapKey") - Permissions_Keys_ARM_Update = Permissions_Keys_ARM("update") - Permissions_Keys_ARM_Verify = Permissions_Keys_ARM("verify") - Permissions_Keys_ARM_WrapKey = Permissions_Keys_ARM("wrapKey") -) - -// Mapping from string to Permissions_Keys_ARM -var permissions_Keys_ARM_Values = map[string]Permissions_Keys_ARM{ - "backup": Permissions_Keys_ARM_Backup, - "create": Permissions_Keys_ARM_Create, - "decrypt": Permissions_Keys_ARM_Decrypt, - "delete": Permissions_Keys_ARM_Delete, - "encrypt": Permissions_Keys_ARM_Encrypt, - "get": Permissions_Keys_ARM_Get, - "import": Permissions_Keys_ARM_Import, - "list": Permissions_Keys_ARM_List, - "purge": Permissions_Keys_ARM_Purge, - "recover": Permissions_Keys_ARM_Recover, - "release": Permissions_Keys_ARM_Release, - "restore": Permissions_Keys_ARM_Restore, - "sign": Permissions_Keys_ARM_Sign, - "unwrapkey": Permissions_Keys_ARM_UnwrapKey, - "update": Permissions_Keys_ARM_Update, - "verify": Permissions_Keys_ARM_Verify, - "wrapkey": Permissions_Keys_ARM_WrapKey, -} - -// +kubebuilder:validation:Enum={"backup","delete","get","list","purge","recover","restore","set"} -type Permissions_Secrets_ARM string - -const ( - Permissions_Secrets_ARM_Backup = Permissions_Secrets_ARM("backup") - Permissions_Secrets_ARM_Delete = Permissions_Secrets_ARM("delete") - Permissions_Secrets_ARM_Get = Permissions_Secrets_ARM("get") - Permissions_Secrets_ARM_List = Permissions_Secrets_ARM("list") - Permissions_Secrets_ARM_Purge = Permissions_Secrets_ARM("purge") - Permissions_Secrets_ARM_Recover = Permissions_Secrets_ARM("recover") - Permissions_Secrets_ARM_Restore = Permissions_Secrets_ARM("restore") - Permissions_Secrets_ARM_Set = Permissions_Secrets_ARM("set") -) - -// Mapping from string to Permissions_Secrets_ARM -var permissions_Secrets_ARM_Values = map[string]Permissions_Secrets_ARM{ - "backup": Permissions_Secrets_ARM_Backup, - "delete": Permissions_Secrets_ARM_Delete, - "get": Permissions_Secrets_ARM_Get, - "list": Permissions_Secrets_ARM_List, - "purge": Permissions_Secrets_ARM_Purge, - "recover": Permissions_Secrets_ARM_Recover, - "restore": Permissions_Secrets_ARM_Restore, - "set": Permissions_Secrets_ARM_Set, -} - -// +kubebuilder:validation:Enum={"backup","delete","deletesas","get","getsas","list","listsas","purge","recover","regeneratekey","restore","set","setsas","update"} -type Permissions_Storage_ARM string - -const ( - Permissions_Storage_ARM_Backup = Permissions_Storage_ARM("backup") - Permissions_Storage_ARM_Delete = Permissions_Storage_ARM("delete") - Permissions_Storage_ARM_Deletesas = Permissions_Storage_ARM("deletesas") - Permissions_Storage_ARM_Get = Permissions_Storage_ARM("get") - Permissions_Storage_ARM_Getsas = Permissions_Storage_ARM("getsas") - Permissions_Storage_ARM_List = Permissions_Storage_ARM("list") - Permissions_Storage_ARM_Listsas = Permissions_Storage_ARM("listsas") - Permissions_Storage_ARM_Purge = Permissions_Storage_ARM("purge") - Permissions_Storage_ARM_Recover = Permissions_Storage_ARM("recover") - Permissions_Storage_ARM_Regeneratekey = Permissions_Storage_ARM("regeneratekey") - Permissions_Storage_ARM_Restore = Permissions_Storage_ARM("restore") - Permissions_Storage_ARM_Set = Permissions_Storage_ARM("set") - Permissions_Storage_ARM_Setsas = Permissions_Storage_ARM("setsas") - Permissions_Storage_ARM_Update = Permissions_Storage_ARM("update") -) - -// Mapping from string to Permissions_Storage_ARM -var permissions_Storage_ARM_Values = map[string]Permissions_Storage_ARM{ - "backup": Permissions_Storage_ARM_Backup, - "delete": Permissions_Storage_ARM_Delete, - "deletesas": Permissions_Storage_ARM_Deletesas, - "get": Permissions_Storage_ARM_Get, - "getsas": Permissions_Storage_ARM_Getsas, - "list": Permissions_Storage_ARM_List, - "listsas": Permissions_Storage_ARM_Listsas, - "purge": Permissions_Storage_ARM_Purge, - "recover": Permissions_Storage_ARM_Recover, - "regeneratekey": Permissions_Storage_ARM_Regeneratekey, - "restore": Permissions_Storage_ARM_Restore, - "set": Permissions_Storage_ARM_Set, - "setsas": Permissions_Storage_ARM_Setsas, - "update": Permissions_Storage_ARM_Update, -} diff --git a/v2/api/keyvault/v1api20210401preview/vault_spec_arm_types_gen_test.go b/v2/api/keyvault/v1api20210401preview/vault_spec_arm_types_gen_test.go deleted file mode 100644 index 7d04dd25a40..00000000000 --- a/v2/api/keyvault/v1api20210401preview/vault_spec_arm_types_gen_test.go +++ /dev/null @@ -1,641 +0,0 @@ -// Code generated by azure-service-operator-codegen. DO NOT EDIT. -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -package v1api20210401preview - -import ( - "encoding/json" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" - "github.com/kr/pretty" - "github.com/kylelemons/godebug/diff" - "github.com/leanovate/gopter" - "github.com/leanovate/gopter/gen" - "github.com/leanovate/gopter/prop" - "os" - "reflect" - "testing" -) - -func Test_AccessPolicyEntry_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of AccessPolicyEntry_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForAccessPolicyEntry_ARM, AccessPolicyEntry_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForAccessPolicyEntry_ARM runs a test to see if a specific instance of AccessPolicyEntry_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForAccessPolicyEntry_ARM(subject AccessPolicyEntry_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual AccessPolicyEntry_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of AccessPolicyEntry_ARM instances for property testing - lazily instantiated by -// AccessPolicyEntry_ARMGenerator() -var accessPolicyEntry_ARMGenerator gopter.Gen - -// AccessPolicyEntry_ARMGenerator returns a generator of AccessPolicyEntry_ARM instances for property testing. -// We first initialize accessPolicyEntry_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func AccessPolicyEntry_ARMGenerator() gopter.Gen { - if accessPolicyEntry_ARMGenerator != nil { - return accessPolicyEntry_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForAccessPolicyEntry_ARM(generators) - accessPolicyEntry_ARMGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForAccessPolicyEntry_ARM(generators) - AddRelatedPropertyGeneratorsForAccessPolicyEntry_ARM(generators) - accessPolicyEntry_ARMGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry_ARM{}), generators) - - return accessPolicyEntry_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForAccessPolicyEntry_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForAccessPolicyEntry_ARM(gens map[string]gopter.Gen) { - gens["ApplicationId"] = gen.PtrOf(gen.AlphaString()) - gens["ObjectId"] = gen.PtrOf(gen.AlphaString()) - gens["TenantId"] = gen.PtrOf(gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForAccessPolicyEntry_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForAccessPolicyEntry_ARM(gens map[string]gopter.Gen) { - gens["Permissions"] = gen.PtrOf(Permissions_ARMGenerator()) -} - -func Test_IPRule_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of IPRule_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForIPRule_ARM, IPRule_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForIPRule_ARM runs a test to see if a specific instance of IPRule_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForIPRule_ARM(subject IPRule_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual IPRule_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of IPRule_ARM instances for property testing - lazily instantiated by IPRule_ARMGenerator() -var ipRule_ARMGenerator gopter.Gen - -// IPRule_ARMGenerator returns a generator of IPRule_ARM instances for property testing. -func IPRule_ARMGenerator() gopter.Gen { - if ipRule_ARMGenerator != nil { - return ipRule_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForIPRule_ARM(generators) - ipRule_ARMGenerator = gen.Struct(reflect.TypeOf(IPRule_ARM{}), generators) - - return ipRule_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForIPRule_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForIPRule_ARM(gens map[string]gopter.Gen) { - gens["Value"] = gen.PtrOf(gen.AlphaString()) -} - -func Test_NetworkRuleSet_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of NetworkRuleSet_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForNetworkRuleSet_ARM, NetworkRuleSet_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForNetworkRuleSet_ARM runs a test to see if a specific instance of NetworkRuleSet_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForNetworkRuleSet_ARM(subject NetworkRuleSet_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual NetworkRuleSet_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of NetworkRuleSet_ARM instances for property testing - lazily instantiated by NetworkRuleSet_ARMGenerator() -var networkRuleSet_ARMGenerator gopter.Gen - -// NetworkRuleSet_ARMGenerator returns a generator of NetworkRuleSet_ARM instances for property testing. -// We first initialize networkRuleSet_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func NetworkRuleSet_ARMGenerator() gopter.Gen { - if networkRuleSet_ARMGenerator != nil { - return networkRuleSet_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForNetworkRuleSet_ARM(generators) - networkRuleSet_ARMGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForNetworkRuleSet_ARM(generators) - AddRelatedPropertyGeneratorsForNetworkRuleSet_ARM(generators) - networkRuleSet_ARMGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_ARM{}), generators) - - return networkRuleSet_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForNetworkRuleSet_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForNetworkRuleSet_ARM(gens map[string]gopter.Gen) { - gens["Bypass"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_Bypass_ARM_AzureServices, NetworkRuleSet_Bypass_ARM_None)) - gens["DefaultAction"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_DefaultAction_ARM_Allow, NetworkRuleSet_DefaultAction_ARM_Deny)) -} - -// AddRelatedPropertyGeneratorsForNetworkRuleSet_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForNetworkRuleSet_ARM(gens map[string]gopter.Gen) { - gens["IpRules"] = gen.SliceOf(IPRule_ARMGenerator()) - gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRule_ARMGenerator()) -} - -func Test_Permissions_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of Permissions_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForPermissions_ARM, Permissions_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForPermissions_ARM runs a test to see if a specific instance of Permissions_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForPermissions_ARM(subject Permissions_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual Permissions_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of Permissions_ARM instances for property testing - lazily instantiated by Permissions_ARMGenerator() -var permissions_ARMGenerator gopter.Gen - -// Permissions_ARMGenerator returns a generator of Permissions_ARM instances for property testing. -func Permissions_ARMGenerator() gopter.Gen { - if permissions_ARMGenerator != nil { - return permissions_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPermissions_ARM(generators) - permissions_ARMGenerator = gen.Struct(reflect.TypeOf(Permissions_ARM{}), generators) - - return permissions_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForPermissions_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForPermissions_ARM(gens map[string]gopter.Gen) { - gens["Certificates"] = gen.SliceOf(gen.OneConstOf( - Permissions_Certificates_ARM_Backup, - Permissions_Certificates_ARM_Create, - Permissions_Certificates_ARM_Delete, - Permissions_Certificates_ARM_Deleteissuers, - Permissions_Certificates_ARM_Get, - Permissions_Certificates_ARM_Getissuers, - Permissions_Certificates_ARM_Import, - Permissions_Certificates_ARM_List, - Permissions_Certificates_ARM_Listissuers, - Permissions_Certificates_ARM_Managecontacts, - Permissions_Certificates_ARM_Manageissuers, - Permissions_Certificates_ARM_Purge, - Permissions_Certificates_ARM_Recover, - Permissions_Certificates_ARM_Restore, - Permissions_Certificates_ARM_Setissuers, - Permissions_Certificates_ARM_Update)) - gens["Keys"] = gen.SliceOf(gen.OneConstOf( - Permissions_Keys_ARM_Backup, - Permissions_Keys_ARM_Create, - Permissions_Keys_ARM_Decrypt, - Permissions_Keys_ARM_Delete, - Permissions_Keys_ARM_Encrypt, - Permissions_Keys_ARM_Get, - Permissions_Keys_ARM_Import, - Permissions_Keys_ARM_List, - Permissions_Keys_ARM_Purge, - Permissions_Keys_ARM_Recover, - Permissions_Keys_ARM_Release, - Permissions_Keys_ARM_Restore, - Permissions_Keys_ARM_Sign, - Permissions_Keys_ARM_UnwrapKey, - Permissions_Keys_ARM_Update, - Permissions_Keys_ARM_Verify, - Permissions_Keys_ARM_WrapKey)) - gens["Secrets"] = gen.SliceOf(gen.OneConstOf( - Permissions_Secrets_ARM_Backup, - Permissions_Secrets_ARM_Delete, - Permissions_Secrets_ARM_Get, - Permissions_Secrets_ARM_List, - Permissions_Secrets_ARM_Purge, - Permissions_Secrets_ARM_Recover, - Permissions_Secrets_ARM_Restore, - Permissions_Secrets_ARM_Set)) - gens["Storage"] = gen.SliceOf(gen.OneConstOf( - Permissions_Storage_ARM_Backup, - Permissions_Storage_ARM_Delete, - Permissions_Storage_ARM_Deletesas, - Permissions_Storage_ARM_Get, - Permissions_Storage_ARM_Getsas, - Permissions_Storage_ARM_List, - Permissions_Storage_ARM_Listsas, - Permissions_Storage_ARM_Purge, - Permissions_Storage_ARM_Recover, - Permissions_Storage_ARM_Regeneratekey, - Permissions_Storage_ARM_Restore, - Permissions_Storage_ARM_Set, - Permissions_Storage_ARM_Setsas, - Permissions_Storage_ARM_Update)) -} - -func Test_Sku_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of Sku_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForSku_ARM, Sku_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForSku_ARM runs a test to see if a specific instance of Sku_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForSku_ARM(subject Sku_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual Sku_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of Sku_ARM instances for property testing - lazily instantiated by Sku_ARMGenerator() -var sku_ARMGenerator gopter.Gen - -// Sku_ARMGenerator returns a generator of Sku_ARM instances for property testing. -func Sku_ARMGenerator() gopter.Gen { - if sku_ARMGenerator != nil { - return sku_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForSku_ARM(generators) - sku_ARMGenerator = gen.Struct(reflect.TypeOf(Sku_ARM{}), generators) - - return sku_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForSku_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForSku_ARM(gens map[string]gopter.Gen) { - gens["Family"] = gen.PtrOf(gen.OneConstOf(Sku_Family_ARM_A)) - gens["Name"] = gen.PtrOf(gen.OneConstOf(Sku_Name_ARM_Premium, Sku_Name_ARM_Standard)) -} - -func Test_VaultProperties_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of VaultProperties_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForVaultProperties_ARM, VaultProperties_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForVaultProperties_ARM runs a test to see if a specific instance of VaultProperties_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForVaultProperties_ARM(subject VaultProperties_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual VaultProperties_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of VaultProperties_ARM instances for property testing - lazily instantiated by -// VaultProperties_ARMGenerator() -var vaultProperties_ARMGenerator gopter.Gen - -// VaultProperties_ARMGenerator returns a generator of VaultProperties_ARM instances for property testing. -// We first initialize vaultProperties_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func VaultProperties_ARMGenerator() gopter.Gen { - if vaultProperties_ARMGenerator != nil { - return vaultProperties_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVaultProperties_ARM(generators) - vaultProperties_ARMGenerator = gen.Struct(reflect.TypeOf(VaultProperties_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVaultProperties_ARM(generators) - AddRelatedPropertyGeneratorsForVaultProperties_ARM(generators) - vaultProperties_ARMGenerator = gen.Struct(reflect.TypeOf(VaultProperties_ARM{}), generators) - - return vaultProperties_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForVaultProperties_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForVaultProperties_ARM(gens map[string]gopter.Gen) { - gens["CreateMode"] = gen.PtrOf(gen.OneConstOf( - VaultProperties_CreateMode_ARM_CreateOrRecover, - VaultProperties_CreateMode_ARM_Default, - VaultProperties_CreateMode_ARM_PurgeThenCreate, - VaultProperties_CreateMode_ARM_Recover)) - gens["EnablePurgeProtection"] = gen.PtrOf(gen.Bool()) - gens["EnableRbacAuthorization"] = gen.PtrOf(gen.Bool()) - gens["EnableSoftDelete"] = gen.PtrOf(gen.Bool()) - gens["EnabledForDeployment"] = gen.PtrOf(gen.Bool()) - gens["EnabledForDiskEncryption"] = gen.PtrOf(gen.Bool()) - gens["EnabledForTemplateDeployment"] = gen.PtrOf(gen.Bool()) - gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(VaultProperties_ProvisioningState_ARM_RegisteringDns, VaultProperties_ProvisioningState_ARM_Succeeded)) - gens["SoftDeleteRetentionInDays"] = gen.PtrOf(gen.Int()) - gens["TenantId"] = gen.PtrOf(gen.AlphaString()) - gens["VaultUri"] = gen.PtrOf(gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForVaultProperties_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForVaultProperties_ARM(gens map[string]gopter.Gen) { - gens["AccessPolicies"] = gen.SliceOf(AccessPolicyEntry_ARMGenerator()) - gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSet_ARMGenerator()) - gens["Sku"] = gen.PtrOf(Sku_ARMGenerator()) -} - -func Test_Vault_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of Vault_Spec_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForVault_Spec_ARM, Vault_Spec_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForVault_Spec_ARM runs a test to see if a specific instance of Vault_Spec_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForVault_Spec_ARM(subject Vault_Spec_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual Vault_Spec_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of Vault_Spec_ARM instances for property testing - lazily instantiated by Vault_Spec_ARMGenerator() -var vault_Spec_ARMGenerator gopter.Gen - -// Vault_Spec_ARMGenerator returns a generator of Vault_Spec_ARM instances for property testing. -// We first initialize vault_Spec_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func Vault_Spec_ARMGenerator() gopter.Gen { - if vault_Spec_ARMGenerator != nil { - return vault_Spec_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVault_Spec_ARM(generators) - vault_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(Vault_Spec_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVault_Spec_ARM(generators) - AddRelatedPropertyGeneratorsForVault_Spec_ARM(generators) - vault_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(Vault_Spec_ARM{}), generators) - - return vault_Spec_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForVault_Spec_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForVault_Spec_ARM(gens map[string]gopter.Gen) { - gens["Location"] = gen.PtrOf(gen.AlphaString()) - gens["Name"] = gen.AlphaString() - gens["Tags"] = gen.MapOf( - gen.AlphaString(), - gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForVault_Spec_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForVault_Spec_ARM(gens map[string]gopter.Gen) { - gens["Properties"] = gen.PtrOf(VaultProperties_ARMGenerator()) -} - -func Test_VirtualNetworkRule_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of VirtualNetworkRule_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule_ARM, VirtualNetworkRule_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForVirtualNetworkRule_ARM runs a test to see if a specific instance of VirtualNetworkRule_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForVirtualNetworkRule_ARM(subject VirtualNetworkRule_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual VirtualNetworkRule_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of VirtualNetworkRule_ARM instances for property testing - lazily instantiated by -// VirtualNetworkRule_ARMGenerator() -var virtualNetworkRule_ARMGenerator gopter.Gen - -// VirtualNetworkRule_ARMGenerator returns a generator of VirtualNetworkRule_ARM instances for property testing. -func VirtualNetworkRule_ARMGenerator() gopter.Gen { - if virtualNetworkRule_ARMGenerator != nil { - return virtualNetworkRule_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVirtualNetworkRule_ARM(generators) - virtualNetworkRule_ARMGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule_ARM{}), generators) - - return virtualNetworkRule_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForVirtualNetworkRule_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForVirtualNetworkRule_ARM(gens map[string]gopter.Gen) { - gens["Id"] = gen.PtrOf(gen.AlphaString()) - gens["IgnoreMissingVnetServiceEndpoint"] = gen.PtrOf(gen.Bool()) -} diff --git a/v2/api/keyvault/v1api20210401preview/vault_status_arm_types_gen.go b/v2/api/keyvault/v1api20210401preview/vault_status_arm_types_gen.go deleted file mode 100644 index 1503066d2b0..00000000000 --- a/v2/api/keyvault/v1api20210401preview/vault_status_arm_types_gen.go +++ /dev/null @@ -1,523 +0,0 @@ -// Code generated by azure-service-operator-codegen. DO NOT EDIT. -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -package v1api20210401preview - -// Resource information with extended details. -type Vault_STATUS_ARM struct { - // Id: Fully qualified identifier of the key vault resource. - Id *string `json:"id,omitempty"` - - // Location: Azure location of the key vault resource. - Location *string `json:"location,omitempty"` - - // Name: Name of the key vault resource. - Name *string `json:"name,omitempty"` - - // Properties: Properties of the vault - Properties *VaultProperties_STATUS_ARM `json:"properties,omitempty"` - - // SystemData: System metadata for the key vault. - SystemData *SystemData_STATUS_ARM `json:"systemData,omitempty"` - - // Tags: Tags assigned to the key vault resource. - Tags map[string]string `json:"tags,omitempty"` - - // Type: Resource type of the key vault resource. - Type *string `json:"type,omitempty"` -} - -// Metadata pertaining to creation and last modification of the key vault resource. -type SystemData_STATUS_ARM struct { - // CreatedAt: The timestamp of the key vault resource creation (UTC). - CreatedAt *string `json:"createdAt,omitempty"` - - // CreatedBy: The identity that created the key vault resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // CreatedByType: The type of identity that created the key vault resource. - CreatedByType *IdentityType_STATUS_ARM `json:"createdByType,omitempty"` - - // LastModifiedAt: The timestamp of the key vault resource last modification (UTC). - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - - // LastModifiedBy: The identity that last modified the key vault resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // LastModifiedByType: The type of identity that last modified the key vault resource. - LastModifiedByType *IdentityType_STATUS_ARM `json:"lastModifiedByType,omitempty"` -} - -// Properties of the vault -type VaultProperties_STATUS_ARM struct { - // AccessPolicies: An array of 0 to 1024 identities 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. When `createMode` is set to `recover`, access policies are not - // required. Otherwise, access policies are required. - AccessPolicies []AccessPolicyEntry_STATUS_ARM `json:"accessPolicies,omitempty"` - - // CreateMode: The vault's create mode to indicate whether the vault need to be recovered or not. - CreateMode *VaultProperties_CreateMode_STATUS_ARM `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"` - - // EnableRbacAuthorization: Property that controls how data actions are authorized. When true, the key vault will use Role - // Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties - // will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy - // stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value - // of false. Note that management actions are always authorized with RBAC. - EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"` - - // EnableSoftDelete: Property to specify whether the 'soft delete' functionality is enabled for this key vault. If it's not - // set to any value(true or false) when creating new key vault, it will be set to true by default. Once set to true, it - // cannot be reverted to false. - EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` - - // EnabledForDeployment: Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored - // as secrets from the key vault. - EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` - - // EnabledForDiskEncryption: Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the - // vault and unwrap keys. - 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"` - - // HsmPoolResourceId: The resource id of HSM Pool. - HsmPoolResourceId *string `json:"hsmPoolResourceId,omitempty"` - - // NetworkAcls: Rules governing the accessibility of the key vault from specific network locations. - NetworkAcls *NetworkRuleSet_STATUS_ARM `json:"networkAcls,omitempty"` - - // PrivateEndpointConnections: List of private endpoint connections associated with the key vault. - PrivateEndpointConnections []PrivateEndpointConnectionItem_STATUS_ARM `json:"privateEndpointConnections,omitempty"` - - // ProvisioningState: Provisioning state of the vault. - ProvisioningState *VaultProperties_ProvisioningState_STATUS_ARM `json:"provisioningState,omitempty"` - - // Sku: SKU details - Sku *Sku_STATUS_ARM `json:"sku,omitempty"` - - // SoftDeleteRetentionInDays: softDelete data retention days. It accepts >=7 and <=90. - SoftDeleteRetentionInDays *int `json:"softDeleteRetentionInDays,omitempty"` - - // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantId *string `json:"tenantId,omitempty"` - - // VaultUri: The URI of the vault for performing operations on keys and secrets. - VaultUri *string `json:"vaultUri,omitempty"` -} - -// 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_STATUS_ARM struct { - // ApplicationId: Application ID of the client making request on behalf of a principal - ApplicationId *string `json:"applicationId,omitempty"` - - // ObjectId: The object ID of a user, service principal or security group in the Azure Active Directory tenant for the - // vault. The object ID must be unique for the list of access policies. - ObjectId *string `json:"objectId,omitempty"` - - // Permissions: Permissions the identity has for keys, secrets and certificates. - Permissions *Permissions_STATUS_ARM `json:"permissions,omitempty"` - - // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantId *string `json:"tenantId,omitempty"` -} - -// The type of identity. -type IdentityType_STATUS_ARM string - -const ( - IdentityType_STATUS_ARM_Application = IdentityType_STATUS_ARM("Application") - IdentityType_STATUS_ARM_Key = IdentityType_STATUS_ARM("Key") - IdentityType_STATUS_ARM_ManagedIdentity = IdentityType_STATUS_ARM("ManagedIdentity") - IdentityType_STATUS_ARM_User = IdentityType_STATUS_ARM("User") -) - -// Mapping from string to IdentityType_STATUS_ARM -var identityType_STATUS_ARM_Values = map[string]IdentityType_STATUS_ARM{ - "application": IdentityType_STATUS_ARM_Application, - "key": IdentityType_STATUS_ARM_Key, - "managedidentity": IdentityType_STATUS_ARM_ManagedIdentity, - "user": IdentityType_STATUS_ARM_User, -} - -// A set of rules governing the network accessibility of a vault. -type NetworkRuleSet_STATUS_ARM struct { - // Bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the - // default is 'AzureServices'. - Bypass *NetworkRuleSet_Bypass_STATUS_ARM `json:"bypass,omitempty"` - - // DefaultAction: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after - // the bypass property has been evaluated. - DefaultAction *NetworkRuleSet_DefaultAction_STATUS_ARM `json:"defaultAction,omitempty"` - - // IpRules: The list of IP address rules. - IpRules []IPRule_STATUS_ARM `json:"ipRules,omitempty"` - - // VirtualNetworkRules: The list of virtual network rules. - VirtualNetworkRules []VirtualNetworkRule_STATUS_ARM `json:"virtualNetworkRules,omitempty"` -} - -// Private endpoint connection item. -type PrivateEndpointConnectionItem_STATUS_ARM struct { - // Etag: Modified whenever there is a change in the state of private endpoint connection. - Etag *string `json:"etag,omitempty"` - - // Id: Id of private endpoint connection. - Id *string `json:"id,omitempty"` - - // Properties: Private endpoint connection properties. - Properties *PrivateEndpointConnectionProperties_STATUS_ARM `json:"properties,omitempty"` -} - -// SKU details -type Sku_STATUS_ARM struct { - // Family: SKU family name - Family *Sku_Family_STATUS_ARM `json:"family,omitempty"` - - // Name: SKU name to specify whether the key vault is a standard vault or a premium vault. - Name *Sku_Name_STATUS_ARM `json:"name,omitempty"` -} - -type VaultProperties_CreateMode_STATUS_ARM string - -const ( - VaultProperties_CreateMode_STATUS_ARM_CreateOrRecover = VaultProperties_CreateMode_STATUS_ARM("createOrRecover") - VaultProperties_CreateMode_STATUS_ARM_Default = VaultProperties_CreateMode_STATUS_ARM("default") - VaultProperties_CreateMode_STATUS_ARM_PurgeThenCreate = VaultProperties_CreateMode_STATUS_ARM("purgeThenCreate") - VaultProperties_CreateMode_STATUS_ARM_Recover = VaultProperties_CreateMode_STATUS_ARM("recover") -) - -// Mapping from string to VaultProperties_CreateMode_STATUS_ARM -var vaultProperties_CreateMode_STATUS_ARM_Values = map[string]VaultProperties_CreateMode_STATUS_ARM{ - "createorrecover": VaultProperties_CreateMode_STATUS_ARM_CreateOrRecover, - "default": VaultProperties_CreateMode_STATUS_ARM_Default, - "purgethencreate": VaultProperties_CreateMode_STATUS_ARM_PurgeThenCreate, - "recover": VaultProperties_CreateMode_STATUS_ARM_Recover, -} - -type VaultProperties_ProvisioningState_STATUS_ARM string - -const ( - VaultProperties_ProvisioningState_STATUS_ARM_RegisteringDns = VaultProperties_ProvisioningState_STATUS_ARM("RegisteringDns") - VaultProperties_ProvisioningState_STATUS_ARM_Succeeded = VaultProperties_ProvisioningState_STATUS_ARM("Succeeded") -) - -// Mapping from string to VaultProperties_ProvisioningState_STATUS_ARM -var vaultProperties_ProvisioningState_STATUS_ARM_Values = map[string]VaultProperties_ProvisioningState_STATUS_ARM{ - "registeringdns": VaultProperties_ProvisioningState_STATUS_ARM_RegisteringDns, - "succeeded": VaultProperties_ProvisioningState_STATUS_ARM_Succeeded, -} - -// A rule governing the accessibility of a vault from a specific ip address or ip range. -type IPRule_STATUS_ARM struct { - // Value: 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). - Value *string `json:"value,omitempty"` -} - -type NetworkRuleSet_Bypass_STATUS_ARM string - -const ( - NetworkRuleSet_Bypass_STATUS_ARM_AzureServices = NetworkRuleSet_Bypass_STATUS_ARM("AzureServices") - NetworkRuleSet_Bypass_STATUS_ARM_None = NetworkRuleSet_Bypass_STATUS_ARM("None") -) - -// Mapping from string to NetworkRuleSet_Bypass_STATUS_ARM -var networkRuleSet_Bypass_STATUS_ARM_Values = map[string]NetworkRuleSet_Bypass_STATUS_ARM{ - "azureservices": NetworkRuleSet_Bypass_STATUS_ARM_AzureServices, - "none": NetworkRuleSet_Bypass_STATUS_ARM_None, -} - -type NetworkRuleSet_DefaultAction_STATUS_ARM string - -const ( - NetworkRuleSet_DefaultAction_STATUS_ARM_Allow = NetworkRuleSet_DefaultAction_STATUS_ARM("Allow") - NetworkRuleSet_DefaultAction_STATUS_ARM_Deny = NetworkRuleSet_DefaultAction_STATUS_ARM("Deny") -) - -// Mapping from string to NetworkRuleSet_DefaultAction_STATUS_ARM -var networkRuleSet_DefaultAction_STATUS_ARM_Values = map[string]NetworkRuleSet_DefaultAction_STATUS_ARM{ - "allow": NetworkRuleSet_DefaultAction_STATUS_ARM_Allow, - "deny": NetworkRuleSet_DefaultAction_STATUS_ARM_Deny, -} - -// Permissions the identity has for keys, secrets, certificates and storage. -type Permissions_STATUS_ARM struct { - // Certificates: Permissions to certificates - Certificates []Permissions_Certificates_STATUS_ARM `json:"certificates,omitempty"` - - // Keys: Permissions to keys - Keys []Permissions_Keys_STATUS_ARM `json:"keys,omitempty"` - - // Secrets: Permissions to secrets - Secrets []Permissions_Secrets_STATUS_ARM `json:"secrets,omitempty"` - - // Storage: Permissions to storage accounts - Storage []Permissions_Storage_STATUS_ARM `json:"storage,omitempty"` -} - -// Properties of the private endpoint connection resource. -type PrivateEndpointConnectionProperties_STATUS_ARM struct { - // PrivateEndpoint: Properties of the private endpoint object. - PrivateEndpoint *PrivateEndpoint_STATUS_ARM `json:"privateEndpoint,omitempty"` - - // PrivateLinkServiceConnectionState: Approval state of the private link connection. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState_STATUS_ARM `json:"privateLinkServiceConnectionState,omitempty"` - - // ProvisioningState: Provisioning state of the private endpoint connection. - ProvisioningState *PrivateEndpointConnectionProvisioningState_STATUS_ARM `json:"provisioningState,omitempty"` -} - -type Sku_Family_STATUS_ARM string - -const Sku_Family_STATUS_ARM_A = Sku_Family_STATUS_ARM("A") - -// Mapping from string to Sku_Family_STATUS_ARM -var sku_Family_STATUS_ARM_Values = map[string]Sku_Family_STATUS_ARM{ - "a": Sku_Family_STATUS_ARM_A, -} - -type Sku_Name_STATUS_ARM string - -const ( - Sku_Name_STATUS_ARM_Premium = Sku_Name_STATUS_ARM("premium") - Sku_Name_STATUS_ARM_Standard = Sku_Name_STATUS_ARM("standard") -) - -// Mapping from string to Sku_Name_STATUS_ARM -var sku_Name_STATUS_ARM_Values = map[string]Sku_Name_STATUS_ARM{ - "premium": Sku_Name_STATUS_ARM_Premium, - "standard": Sku_Name_STATUS_ARM_Standard, -} - -// A rule governing the accessibility of a vault from a specific virtual network. -type VirtualNetworkRule_STATUS_ARM struct { - // Id: 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"` - - // IgnoreMissingVnetServiceEndpoint: Property to specify whether NRP will ignore the check if parent subnet has - // serviceEndpoints configured. - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` -} - -type Permissions_Certificates_STATUS_ARM string - -const ( - Permissions_Certificates_STATUS_ARM_Backup = Permissions_Certificates_STATUS_ARM("backup") - Permissions_Certificates_STATUS_ARM_Create = Permissions_Certificates_STATUS_ARM("create") - Permissions_Certificates_STATUS_ARM_Delete = Permissions_Certificates_STATUS_ARM("delete") - Permissions_Certificates_STATUS_ARM_Deleteissuers = Permissions_Certificates_STATUS_ARM("deleteissuers") - Permissions_Certificates_STATUS_ARM_Get = Permissions_Certificates_STATUS_ARM("get") - Permissions_Certificates_STATUS_ARM_Getissuers = Permissions_Certificates_STATUS_ARM("getissuers") - Permissions_Certificates_STATUS_ARM_Import = Permissions_Certificates_STATUS_ARM("import") - Permissions_Certificates_STATUS_ARM_List = Permissions_Certificates_STATUS_ARM("list") - Permissions_Certificates_STATUS_ARM_Listissuers = Permissions_Certificates_STATUS_ARM("listissuers") - Permissions_Certificates_STATUS_ARM_Managecontacts = Permissions_Certificates_STATUS_ARM("managecontacts") - Permissions_Certificates_STATUS_ARM_Manageissuers = Permissions_Certificates_STATUS_ARM("manageissuers") - Permissions_Certificates_STATUS_ARM_Purge = Permissions_Certificates_STATUS_ARM("purge") - Permissions_Certificates_STATUS_ARM_Recover = Permissions_Certificates_STATUS_ARM("recover") - Permissions_Certificates_STATUS_ARM_Restore = Permissions_Certificates_STATUS_ARM("restore") - Permissions_Certificates_STATUS_ARM_Setissuers = Permissions_Certificates_STATUS_ARM("setissuers") - Permissions_Certificates_STATUS_ARM_Update = Permissions_Certificates_STATUS_ARM("update") -) - -// Mapping from string to Permissions_Certificates_STATUS_ARM -var permissions_Certificates_STATUS_ARM_Values = map[string]Permissions_Certificates_STATUS_ARM{ - "backup": Permissions_Certificates_STATUS_ARM_Backup, - "create": Permissions_Certificates_STATUS_ARM_Create, - "delete": Permissions_Certificates_STATUS_ARM_Delete, - "deleteissuers": Permissions_Certificates_STATUS_ARM_Deleteissuers, - "get": Permissions_Certificates_STATUS_ARM_Get, - "getissuers": Permissions_Certificates_STATUS_ARM_Getissuers, - "import": Permissions_Certificates_STATUS_ARM_Import, - "list": Permissions_Certificates_STATUS_ARM_List, - "listissuers": Permissions_Certificates_STATUS_ARM_Listissuers, - "managecontacts": Permissions_Certificates_STATUS_ARM_Managecontacts, - "manageissuers": Permissions_Certificates_STATUS_ARM_Manageissuers, - "purge": Permissions_Certificates_STATUS_ARM_Purge, - "recover": Permissions_Certificates_STATUS_ARM_Recover, - "restore": Permissions_Certificates_STATUS_ARM_Restore, - "setissuers": Permissions_Certificates_STATUS_ARM_Setissuers, - "update": Permissions_Certificates_STATUS_ARM_Update, -} - -type Permissions_Keys_STATUS_ARM string - -const ( - Permissions_Keys_STATUS_ARM_Backup = Permissions_Keys_STATUS_ARM("backup") - Permissions_Keys_STATUS_ARM_Create = Permissions_Keys_STATUS_ARM("create") - Permissions_Keys_STATUS_ARM_Decrypt = Permissions_Keys_STATUS_ARM("decrypt") - Permissions_Keys_STATUS_ARM_Delete = Permissions_Keys_STATUS_ARM("delete") - Permissions_Keys_STATUS_ARM_Encrypt = Permissions_Keys_STATUS_ARM("encrypt") - Permissions_Keys_STATUS_ARM_Get = Permissions_Keys_STATUS_ARM("get") - Permissions_Keys_STATUS_ARM_Import = Permissions_Keys_STATUS_ARM("import") - Permissions_Keys_STATUS_ARM_List = Permissions_Keys_STATUS_ARM("list") - Permissions_Keys_STATUS_ARM_Purge = Permissions_Keys_STATUS_ARM("purge") - Permissions_Keys_STATUS_ARM_Recover = Permissions_Keys_STATUS_ARM("recover") - Permissions_Keys_STATUS_ARM_Release = Permissions_Keys_STATUS_ARM("release") - Permissions_Keys_STATUS_ARM_Restore = Permissions_Keys_STATUS_ARM("restore") - Permissions_Keys_STATUS_ARM_Sign = Permissions_Keys_STATUS_ARM("sign") - Permissions_Keys_STATUS_ARM_UnwrapKey = Permissions_Keys_STATUS_ARM("unwrapKey") - Permissions_Keys_STATUS_ARM_Update = Permissions_Keys_STATUS_ARM("update") - Permissions_Keys_STATUS_ARM_Verify = Permissions_Keys_STATUS_ARM("verify") - Permissions_Keys_STATUS_ARM_WrapKey = Permissions_Keys_STATUS_ARM("wrapKey") -) - -// Mapping from string to Permissions_Keys_STATUS_ARM -var permissions_Keys_STATUS_ARM_Values = map[string]Permissions_Keys_STATUS_ARM{ - "backup": Permissions_Keys_STATUS_ARM_Backup, - "create": Permissions_Keys_STATUS_ARM_Create, - "decrypt": Permissions_Keys_STATUS_ARM_Decrypt, - "delete": Permissions_Keys_STATUS_ARM_Delete, - "encrypt": Permissions_Keys_STATUS_ARM_Encrypt, - "get": Permissions_Keys_STATUS_ARM_Get, - "import": Permissions_Keys_STATUS_ARM_Import, - "list": Permissions_Keys_STATUS_ARM_List, - "purge": Permissions_Keys_STATUS_ARM_Purge, - "recover": Permissions_Keys_STATUS_ARM_Recover, - "release": Permissions_Keys_STATUS_ARM_Release, - "restore": Permissions_Keys_STATUS_ARM_Restore, - "sign": Permissions_Keys_STATUS_ARM_Sign, - "unwrapkey": Permissions_Keys_STATUS_ARM_UnwrapKey, - "update": Permissions_Keys_STATUS_ARM_Update, - "verify": Permissions_Keys_STATUS_ARM_Verify, - "wrapkey": Permissions_Keys_STATUS_ARM_WrapKey, -} - -type Permissions_Secrets_STATUS_ARM string - -const ( - Permissions_Secrets_STATUS_ARM_Backup = Permissions_Secrets_STATUS_ARM("backup") - Permissions_Secrets_STATUS_ARM_Delete = Permissions_Secrets_STATUS_ARM("delete") - Permissions_Secrets_STATUS_ARM_Get = Permissions_Secrets_STATUS_ARM("get") - Permissions_Secrets_STATUS_ARM_List = Permissions_Secrets_STATUS_ARM("list") - Permissions_Secrets_STATUS_ARM_Purge = Permissions_Secrets_STATUS_ARM("purge") - Permissions_Secrets_STATUS_ARM_Recover = Permissions_Secrets_STATUS_ARM("recover") - Permissions_Secrets_STATUS_ARM_Restore = Permissions_Secrets_STATUS_ARM("restore") - Permissions_Secrets_STATUS_ARM_Set = Permissions_Secrets_STATUS_ARM("set") -) - -// Mapping from string to Permissions_Secrets_STATUS_ARM -var permissions_Secrets_STATUS_ARM_Values = map[string]Permissions_Secrets_STATUS_ARM{ - "backup": Permissions_Secrets_STATUS_ARM_Backup, - "delete": Permissions_Secrets_STATUS_ARM_Delete, - "get": Permissions_Secrets_STATUS_ARM_Get, - "list": Permissions_Secrets_STATUS_ARM_List, - "purge": Permissions_Secrets_STATUS_ARM_Purge, - "recover": Permissions_Secrets_STATUS_ARM_Recover, - "restore": Permissions_Secrets_STATUS_ARM_Restore, - "set": Permissions_Secrets_STATUS_ARM_Set, -} - -type Permissions_Storage_STATUS_ARM string - -const ( - Permissions_Storage_STATUS_ARM_Backup = Permissions_Storage_STATUS_ARM("backup") - Permissions_Storage_STATUS_ARM_Delete = Permissions_Storage_STATUS_ARM("delete") - Permissions_Storage_STATUS_ARM_Deletesas = Permissions_Storage_STATUS_ARM("deletesas") - Permissions_Storage_STATUS_ARM_Get = Permissions_Storage_STATUS_ARM("get") - Permissions_Storage_STATUS_ARM_Getsas = Permissions_Storage_STATUS_ARM("getsas") - Permissions_Storage_STATUS_ARM_List = Permissions_Storage_STATUS_ARM("list") - Permissions_Storage_STATUS_ARM_Listsas = Permissions_Storage_STATUS_ARM("listsas") - Permissions_Storage_STATUS_ARM_Purge = Permissions_Storage_STATUS_ARM("purge") - Permissions_Storage_STATUS_ARM_Recover = Permissions_Storage_STATUS_ARM("recover") - Permissions_Storage_STATUS_ARM_Regeneratekey = Permissions_Storage_STATUS_ARM("regeneratekey") - Permissions_Storage_STATUS_ARM_Restore = Permissions_Storage_STATUS_ARM("restore") - Permissions_Storage_STATUS_ARM_Set = Permissions_Storage_STATUS_ARM("set") - Permissions_Storage_STATUS_ARM_Setsas = Permissions_Storage_STATUS_ARM("setsas") - Permissions_Storage_STATUS_ARM_Update = Permissions_Storage_STATUS_ARM("update") -) - -// Mapping from string to Permissions_Storage_STATUS_ARM -var permissions_Storage_STATUS_ARM_Values = map[string]Permissions_Storage_STATUS_ARM{ - "backup": Permissions_Storage_STATUS_ARM_Backup, - "delete": Permissions_Storage_STATUS_ARM_Delete, - "deletesas": Permissions_Storage_STATUS_ARM_Deletesas, - "get": Permissions_Storage_STATUS_ARM_Get, - "getsas": Permissions_Storage_STATUS_ARM_Getsas, - "list": Permissions_Storage_STATUS_ARM_List, - "listsas": Permissions_Storage_STATUS_ARM_Listsas, - "purge": Permissions_Storage_STATUS_ARM_Purge, - "recover": Permissions_Storage_STATUS_ARM_Recover, - "regeneratekey": Permissions_Storage_STATUS_ARM_Regeneratekey, - "restore": Permissions_Storage_STATUS_ARM_Restore, - "set": Permissions_Storage_STATUS_ARM_Set, - "setsas": Permissions_Storage_STATUS_ARM_Setsas, - "update": Permissions_Storage_STATUS_ARM_Update, -} - -// Private endpoint object properties. -type PrivateEndpoint_STATUS_ARM struct { - // Id: Full identifier of the private endpoint resource. - Id *string `json:"id,omitempty"` -} - -// The current provisioning state. -type PrivateEndpointConnectionProvisioningState_STATUS_ARM string - -const ( - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Creating = PrivateEndpointConnectionProvisioningState_STATUS_ARM("Creating") - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Deleting = PrivateEndpointConnectionProvisioningState_STATUS_ARM("Deleting") - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Disconnected = PrivateEndpointConnectionProvisioningState_STATUS_ARM("Disconnected") - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Failed = PrivateEndpointConnectionProvisioningState_STATUS_ARM("Failed") - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Succeeded = PrivateEndpointConnectionProvisioningState_STATUS_ARM("Succeeded") - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Updating = PrivateEndpointConnectionProvisioningState_STATUS_ARM("Updating") -) - -// Mapping from string to PrivateEndpointConnectionProvisioningState_STATUS_ARM -var privateEndpointConnectionProvisioningState_STATUS_ARM_Values = map[string]PrivateEndpointConnectionProvisioningState_STATUS_ARM{ - "creating": PrivateEndpointConnectionProvisioningState_STATUS_ARM_Creating, - "deleting": PrivateEndpointConnectionProvisioningState_STATUS_ARM_Deleting, - "disconnected": PrivateEndpointConnectionProvisioningState_STATUS_ARM_Disconnected, - "failed": PrivateEndpointConnectionProvisioningState_STATUS_ARM_Failed, - "succeeded": PrivateEndpointConnectionProvisioningState_STATUS_ARM_Succeeded, - "updating": PrivateEndpointConnectionProvisioningState_STATUS_ARM_Updating, -} - -// An object that represents the approval state of the private link connection. -type PrivateLinkServiceConnectionState_STATUS_ARM struct { - // ActionsRequired: A message indicating if changes on the service provider require any updates on the consumer. - ActionsRequired *PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM `json:"actionsRequired,omitempty"` - - // Description: The reason for approval or rejection. - Description *string `json:"description,omitempty"` - - // Status: Indicates whether the connection has been approved, rejected or removed by the key vault owner. - Status *PrivateEndpointServiceConnectionStatus_STATUS_ARM `json:"status,omitempty"` -} - -// The private endpoint connection status. -type PrivateEndpointServiceConnectionStatus_STATUS_ARM string - -const ( - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Approved = PrivateEndpointServiceConnectionStatus_STATUS_ARM("Approved") - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Disconnected = PrivateEndpointServiceConnectionStatus_STATUS_ARM("Disconnected") - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Pending = PrivateEndpointServiceConnectionStatus_STATUS_ARM("Pending") - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Rejected = PrivateEndpointServiceConnectionStatus_STATUS_ARM("Rejected") -) - -// Mapping from string to PrivateEndpointServiceConnectionStatus_STATUS_ARM -var privateEndpointServiceConnectionStatus_STATUS_ARM_Values = map[string]PrivateEndpointServiceConnectionStatus_STATUS_ARM{ - "approved": PrivateEndpointServiceConnectionStatus_STATUS_ARM_Approved, - "disconnected": PrivateEndpointServiceConnectionStatus_STATUS_ARM_Disconnected, - "pending": PrivateEndpointServiceConnectionStatus_STATUS_ARM_Pending, - "rejected": PrivateEndpointServiceConnectionStatus_STATUS_ARM_Rejected, -} - -type PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM string - -const PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM_None = PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM("None") - -// Mapping from string to PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM -var privateLinkServiceConnectionState_ActionsRequired_STATUS_ARM_Values = map[string]PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM{ - "none": PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM_None, -} diff --git a/v2/api/keyvault/v1api20210401preview/vault_status_arm_types_gen_test.go b/v2/api/keyvault/v1api20210401preview/vault_status_arm_types_gen_test.go deleted file mode 100644 index e19eed1f6c5..00000000000 --- a/v2/api/keyvault/v1api20210401preview/vault_status_arm_types_gen_test.go +++ /dev/null @@ -1,1008 +0,0 @@ -// Code generated by azure-service-operator-codegen. DO NOT EDIT. -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -package v1api20210401preview - -import ( - "encoding/json" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" - "github.com/kr/pretty" - "github.com/kylelemons/godebug/diff" - "github.com/leanovate/gopter" - "github.com/leanovate/gopter/gen" - "github.com/leanovate/gopter/prop" - "os" - "reflect" - "testing" -) - -func Test_AccessPolicyEntry_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of AccessPolicyEntry_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForAccessPolicyEntry_STATUS_ARM, AccessPolicyEntry_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForAccessPolicyEntry_STATUS_ARM runs a test to see if a specific instance of AccessPolicyEntry_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForAccessPolicyEntry_STATUS_ARM(subject AccessPolicyEntry_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual AccessPolicyEntry_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of AccessPolicyEntry_STATUS_ARM instances for property testing - lazily instantiated by -// AccessPolicyEntry_STATUS_ARMGenerator() -var accessPolicyEntry_STATUS_ARMGenerator gopter.Gen - -// AccessPolicyEntry_STATUS_ARMGenerator returns a generator of AccessPolicyEntry_STATUS_ARM instances for property testing. -// We first initialize accessPolicyEntry_STATUS_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func AccessPolicyEntry_STATUS_ARMGenerator() gopter.Gen { - if accessPolicyEntry_STATUS_ARMGenerator != nil { - return accessPolicyEntry_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM(generators) - accessPolicyEntry_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry_STATUS_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM(generators) - AddRelatedPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM(generators) - accessPolicyEntry_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry_STATUS_ARM{}), generators) - - return accessPolicyEntry_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM(gens map[string]gopter.Gen) { - gens["ApplicationId"] = gen.PtrOf(gen.AlphaString()) - gens["ObjectId"] = gen.PtrOf(gen.AlphaString()) - gens["TenantId"] = gen.PtrOf(gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Permissions"] = gen.PtrOf(Permissions_STATUS_ARMGenerator()) -} - -func Test_IPRule_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of IPRule_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForIPRule_STATUS_ARM, IPRule_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForIPRule_STATUS_ARM runs a test to see if a specific instance of IPRule_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForIPRule_STATUS_ARM(subject IPRule_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual IPRule_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of IPRule_STATUS_ARM instances for property testing - lazily instantiated by IPRule_STATUS_ARMGenerator() -var ipRule_STATUS_ARMGenerator gopter.Gen - -// IPRule_STATUS_ARMGenerator returns a generator of IPRule_STATUS_ARM instances for property testing. -func IPRule_STATUS_ARMGenerator() gopter.Gen { - if ipRule_STATUS_ARMGenerator != nil { - return ipRule_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForIPRule_STATUS_ARM(generators) - ipRule_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(IPRule_STATUS_ARM{}), generators) - - return ipRule_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForIPRule_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForIPRule_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Value"] = gen.PtrOf(gen.AlphaString()) -} - -func Test_NetworkRuleSet_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of NetworkRuleSet_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForNetworkRuleSet_STATUS_ARM, NetworkRuleSet_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForNetworkRuleSet_STATUS_ARM runs a test to see if a specific instance of NetworkRuleSet_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForNetworkRuleSet_STATUS_ARM(subject NetworkRuleSet_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual NetworkRuleSet_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of NetworkRuleSet_STATUS_ARM instances for property testing - lazily instantiated by -// NetworkRuleSet_STATUS_ARMGenerator() -var networkRuleSet_STATUS_ARMGenerator gopter.Gen - -// NetworkRuleSet_STATUS_ARMGenerator returns a generator of NetworkRuleSet_STATUS_ARM instances for property testing. -// We first initialize networkRuleSet_STATUS_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func NetworkRuleSet_STATUS_ARMGenerator() gopter.Gen { - if networkRuleSet_STATUS_ARMGenerator != nil { - return networkRuleSet_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(generators) - networkRuleSet_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(generators) - AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(generators) - networkRuleSet_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS_ARM{}), generators) - - return networkRuleSet_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Bypass"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_Bypass_STATUS_ARM_AzureServices, NetworkRuleSet_Bypass_STATUS_ARM_None)) - gens["DefaultAction"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_DefaultAction_STATUS_ARM_Allow, NetworkRuleSet_DefaultAction_STATUS_ARM_Deny)) -} - -// AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(gens map[string]gopter.Gen) { - gens["IpRules"] = gen.SliceOf(IPRule_STATUS_ARMGenerator()) - gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRule_STATUS_ARMGenerator()) -} - -func Test_Permissions_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of Permissions_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForPermissions_STATUS_ARM, Permissions_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForPermissions_STATUS_ARM runs a test to see if a specific instance of Permissions_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForPermissions_STATUS_ARM(subject Permissions_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual Permissions_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of Permissions_STATUS_ARM instances for property testing - lazily instantiated by -// Permissions_STATUS_ARMGenerator() -var permissions_STATUS_ARMGenerator gopter.Gen - -// Permissions_STATUS_ARMGenerator returns a generator of Permissions_STATUS_ARM instances for property testing. -func Permissions_STATUS_ARMGenerator() gopter.Gen { - if permissions_STATUS_ARMGenerator != nil { - return permissions_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPermissions_STATUS_ARM(generators) - permissions_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Permissions_STATUS_ARM{}), generators) - - return permissions_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForPermissions_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForPermissions_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Certificates"] = gen.SliceOf(gen.OneConstOf( - Permissions_Certificates_STATUS_ARM_Backup, - Permissions_Certificates_STATUS_ARM_Create, - Permissions_Certificates_STATUS_ARM_Delete, - Permissions_Certificates_STATUS_ARM_Deleteissuers, - Permissions_Certificates_STATUS_ARM_Get, - Permissions_Certificates_STATUS_ARM_Getissuers, - Permissions_Certificates_STATUS_ARM_Import, - Permissions_Certificates_STATUS_ARM_List, - Permissions_Certificates_STATUS_ARM_Listissuers, - Permissions_Certificates_STATUS_ARM_Managecontacts, - Permissions_Certificates_STATUS_ARM_Manageissuers, - Permissions_Certificates_STATUS_ARM_Purge, - Permissions_Certificates_STATUS_ARM_Recover, - Permissions_Certificates_STATUS_ARM_Restore, - Permissions_Certificates_STATUS_ARM_Setissuers, - Permissions_Certificates_STATUS_ARM_Update)) - gens["Keys"] = gen.SliceOf(gen.OneConstOf( - Permissions_Keys_STATUS_ARM_Backup, - Permissions_Keys_STATUS_ARM_Create, - Permissions_Keys_STATUS_ARM_Decrypt, - Permissions_Keys_STATUS_ARM_Delete, - Permissions_Keys_STATUS_ARM_Encrypt, - Permissions_Keys_STATUS_ARM_Get, - Permissions_Keys_STATUS_ARM_Import, - Permissions_Keys_STATUS_ARM_List, - Permissions_Keys_STATUS_ARM_Purge, - Permissions_Keys_STATUS_ARM_Recover, - Permissions_Keys_STATUS_ARM_Release, - Permissions_Keys_STATUS_ARM_Restore, - Permissions_Keys_STATUS_ARM_Sign, - Permissions_Keys_STATUS_ARM_UnwrapKey, - Permissions_Keys_STATUS_ARM_Update, - Permissions_Keys_STATUS_ARM_Verify, - Permissions_Keys_STATUS_ARM_WrapKey)) - gens["Secrets"] = gen.SliceOf(gen.OneConstOf( - Permissions_Secrets_STATUS_ARM_Backup, - Permissions_Secrets_STATUS_ARM_Delete, - Permissions_Secrets_STATUS_ARM_Get, - Permissions_Secrets_STATUS_ARM_List, - Permissions_Secrets_STATUS_ARM_Purge, - Permissions_Secrets_STATUS_ARM_Recover, - Permissions_Secrets_STATUS_ARM_Restore, - Permissions_Secrets_STATUS_ARM_Set)) - gens["Storage"] = gen.SliceOf(gen.OneConstOf( - Permissions_Storage_STATUS_ARM_Backup, - Permissions_Storage_STATUS_ARM_Delete, - Permissions_Storage_STATUS_ARM_Deletesas, - Permissions_Storage_STATUS_ARM_Get, - Permissions_Storage_STATUS_ARM_Getsas, - Permissions_Storage_STATUS_ARM_List, - Permissions_Storage_STATUS_ARM_Listsas, - Permissions_Storage_STATUS_ARM_Purge, - Permissions_Storage_STATUS_ARM_Recover, - Permissions_Storage_STATUS_ARM_Regeneratekey, - Permissions_Storage_STATUS_ARM_Restore, - Permissions_Storage_STATUS_ARM_Set, - Permissions_Storage_STATUS_ARM_Setsas, - Permissions_Storage_STATUS_ARM_Update)) -} - -func Test_PrivateEndpointConnectionItem_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of PrivateEndpointConnectionItem_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForPrivateEndpointConnectionItem_STATUS_ARM, PrivateEndpointConnectionItem_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForPrivateEndpointConnectionItem_STATUS_ARM runs a test to see if a specific instance of PrivateEndpointConnectionItem_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForPrivateEndpointConnectionItem_STATUS_ARM(subject PrivateEndpointConnectionItem_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual PrivateEndpointConnectionItem_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of PrivateEndpointConnectionItem_STATUS_ARM instances for property testing - lazily instantiated by -// PrivateEndpointConnectionItem_STATUS_ARMGenerator() -var privateEndpointConnectionItem_STATUS_ARMGenerator gopter.Gen - -// PrivateEndpointConnectionItem_STATUS_ARMGenerator returns a generator of PrivateEndpointConnectionItem_STATUS_ARM instances for property testing. -// We first initialize privateEndpointConnectionItem_STATUS_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func PrivateEndpointConnectionItem_STATUS_ARMGenerator() gopter.Gen { - if privateEndpointConnectionItem_STATUS_ARMGenerator != nil { - return privateEndpointConnectionItem_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM(generators) - privateEndpointConnectionItem_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionItem_STATUS_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM(generators) - AddRelatedPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM(generators) - privateEndpointConnectionItem_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionItem_STATUS_ARM{}), generators) - - return privateEndpointConnectionItem_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Etag"] = gen.PtrOf(gen.AlphaString()) - gens["Id"] = gen.PtrOf(gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Properties"] = gen.PtrOf(PrivateEndpointConnectionProperties_STATUS_ARMGenerator()) -} - -func Test_PrivateEndpointConnectionProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of PrivateEndpointConnectionProperties_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForPrivateEndpointConnectionProperties_STATUS_ARM, PrivateEndpointConnectionProperties_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForPrivateEndpointConnectionProperties_STATUS_ARM runs a test to see if a specific instance of PrivateEndpointConnectionProperties_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForPrivateEndpointConnectionProperties_STATUS_ARM(subject PrivateEndpointConnectionProperties_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual PrivateEndpointConnectionProperties_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of PrivateEndpointConnectionProperties_STATUS_ARM instances for property testing - lazily instantiated by -// PrivateEndpointConnectionProperties_STATUS_ARMGenerator() -var privateEndpointConnectionProperties_STATUS_ARMGenerator gopter.Gen - -// PrivateEndpointConnectionProperties_STATUS_ARMGenerator returns a generator of PrivateEndpointConnectionProperties_STATUS_ARM instances for property testing. -// We first initialize privateEndpointConnectionProperties_STATUS_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func PrivateEndpointConnectionProperties_STATUS_ARMGenerator() gopter.Gen { - if privateEndpointConnectionProperties_STATUS_ARMGenerator != nil { - return privateEndpointConnectionProperties_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM(generators) - privateEndpointConnectionProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionProperties_STATUS_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM(generators) - AddRelatedPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM(generators) - privateEndpointConnectionProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionProperties_STATUS_ARM{}), generators) - - return privateEndpointConnectionProperties_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM(gens map[string]gopter.Gen) { - gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf( - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Creating, - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Deleting, - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Disconnected, - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Failed, - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Succeeded, - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Updating)) -} - -// AddRelatedPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM(gens map[string]gopter.Gen) { - gens["PrivateEndpoint"] = gen.PtrOf(PrivateEndpoint_STATUS_ARMGenerator()) - gens["PrivateLinkServiceConnectionState"] = gen.PtrOf(PrivateLinkServiceConnectionState_STATUS_ARMGenerator()) -} - -func Test_PrivateEndpoint_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of PrivateEndpoint_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForPrivateEndpoint_STATUS_ARM, PrivateEndpoint_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForPrivateEndpoint_STATUS_ARM runs a test to see if a specific instance of PrivateEndpoint_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForPrivateEndpoint_STATUS_ARM(subject PrivateEndpoint_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual PrivateEndpoint_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of PrivateEndpoint_STATUS_ARM instances for property testing - lazily instantiated by -// PrivateEndpoint_STATUS_ARMGenerator() -var privateEndpoint_STATUS_ARMGenerator gopter.Gen - -// PrivateEndpoint_STATUS_ARMGenerator returns a generator of PrivateEndpoint_STATUS_ARM instances for property testing. -func PrivateEndpoint_STATUS_ARMGenerator() gopter.Gen { - if privateEndpoint_STATUS_ARMGenerator != nil { - return privateEndpoint_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPrivateEndpoint_STATUS_ARM(generators) - privateEndpoint_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateEndpoint_STATUS_ARM{}), generators) - - return privateEndpoint_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForPrivateEndpoint_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForPrivateEndpoint_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Id"] = gen.PtrOf(gen.AlphaString()) -} - -func Test_PrivateLinkServiceConnectionState_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of PrivateLinkServiceConnectionState_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForPrivateLinkServiceConnectionState_STATUS_ARM, PrivateLinkServiceConnectionState_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForPrivateLinkServiceConnectionState_STATUS_ARM runs a test to see if a specific instance of PrivateLinkServiceConnectionState_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForPrivateLinkServiceConnectionState_STATUS_ARM(subject PrivateLinkServiceConnectionState_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual PrivateLinkServiceConnectionState_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of PrivateLinkServiceConnectionState_STATUS_ARM instances for property testing - lazily instantiated by -// PrivateLinkServiceConnectionState_STATUS_ARMGenerator() -var privateLinkServiceConnectionState_STATUS_ARMGenerator gopter.Gen - -// PrivateLinkServiceConnectionState_STATUS_ARMGenerator returns a generator of PrivateLinkServiceConnectionState_STATUS_ARM instances for property testing. -func PrivateLinkServiceConnectionState_STATUS_ARMGenerator() gopter.Gen { - if privateLinkServiceConnectionState_STATUS_ARMGenerator != nil { - return privateLinkServiceConnectionState_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPrivateLinkServiceConnectionState_STATUS_ARM(generators) - privateLinkServiceConnectionState_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateLinkServiceConnectionState_STATUS_ARM{}), generators) - - return privateLinkServiceConnectionState_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForPrivateLinkServiceConnectionState_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForPrivateLinkServiceConnectionState_STATUS_ARM(gens map[string]gopter.Gen) { - gens["ActionsRequired"] = gen.PtrOf(gen.OneConstOf(PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM_None)) - gens["Description"] = gen.PtrOf(gen.AlphaString()) - gens["Status"] = gen.PtrOf(gen.OneConstOf( - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Approved, - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Disconnected, - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Pending, - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Rejected)) -} - -func Test_Sku_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of Sku_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForSku_STATUS_ARM, Sku_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForSku_STATUS_ARM runs a test to see if a specific instance of Sku_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForSku_STATUS_ARM(subject Sku_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual Sku_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of Sku_STATUS_ARM instances for property testing - lazily instantiated by Sku_STATUS_ARMGenerator() -var sku_STATUS_ARMGenerator gopter.Gen - -// Sku_STATUS_ARMGenerator returns a generator of Sku_STATUS_ARM instances for property testing. -func Sku_STATUS_ARMGenerator() gopter.Gen { - if sku_STATUS_ARMGenerator != nil { - return sku_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForSku_STATUS_ARM(generators) - sku_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Sku_STATUS_ARM{}), generators) - - return sku_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForSku_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForSku_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Family"] = gen.PtrOf(gen.OneConstOf(Sku_Family_STATUS_ARM_A)) - gens["Name"] = gen.PtrOf(gen.OneConstOf(Sku_Name_STATUS_ARM_Premium, Sku_Name_STATUS_ARM_Standard)) -} - -func Test_SystemData_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of SystemData_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForSystemData_STATUS_ARM, SystemData_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForSystemData_STATUS_ARM runs a test to see if a specific instance of SystemData_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForSystemData_STATUS_ARM(subject SystemData_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual SystemData_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of SystemData_STATUS_ARM instances for property testing - lazily instantiated by -// SystemData_STATUS_ARMGenerator() -var systemData_STATUS_ARMGenerator gopter.Gen - -// SystemData_STATUS_ARMGenerator returns a generator of SystemData_STATUS_ARM instances for property testing. -func SystemData_STATUS_ARMGenerator() gopter.Gen { - if systemData_STATUS_ARMGenerator != nil { - return systemData_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForSystemData_STATUS_ARM(generators) - systemData_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(SystemData_STATUS_ARM{}), generators) - - return systemData_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForSystemData_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForSystemData_STATUS_ARM(gens map[string]gopter.Gen) { - gens["CreatedAt"] = gen.PtrOf(gen.AlphaString()) - gens["CreatedBy"] = gen.PtrOf(gen.AlphaString()) - gens["CreatedByType"] = gen.PtrOf(gen.OneConstOf( - IdentityType_STATUS_ARM_Application, - IdentityType_STATUS_ARM_Key, - IdentityType_STATUS_ARM_ManagedIdentity, - IdentityType_STATUS_ARM_User)) - gens["LastModifiedAt"] = gen.PtrOf(gen.AlphaString()) - gens["LastModifiedBy"] = gen.PtrOf(gen.AlphaString()) - gens["LastModifiedByType"] = gen.PtrOf(gen.OneConstOf( - IdentityType_STATUS_ARM_Application, - IdentityType_STATUS_ARM_Key, - IdentityType_STATUS_ARM_ManagedIdentity, - IdentityType_STATUS_ARM_User)) -} - -func Test_VaultProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of VaultProperties_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForVaultProperties_STATUS_ARM, VaultProperties_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForVaultProperties_STATUS_ARM runs a test to see if a specific instance of VaultProperties_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForVaultProperties_STATUS_ARM(subject VaultProperties_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual VaultProperties_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of VaultProperties_STATUS_ARM instances for property testing - lazily instantiated by -// VaultProperties_STATUS_ARMGenerator() -var vaultProperties_STATUS_ARMGenerator gopter.Gen - -// VaultProperties_STATUS_ARMGenerator returns a generator of VaultProperties_STATUS_ARM instances for property testing. -// We first initialize vaultProperties_STATUS_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func VaultProperties_STATUS_ARMGenerator() gopter.Gen { - if vaultProperties_STATUS_ARMGenerator != nil { - return vaultProperties_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVaultProperties_STATUS_ARM(generators) - vaultProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(VaultProperties_STATUS_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVaultProperties_STATUS_ARM(generators) - AddRelatedPropertyGeneratorsForVaultProperties_STATUS_ARM(generators) - vaultProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(VaultProperties_STATUS_ARM{}), generators) - - return vaultProperties_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForVaultProperties_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForVaultProperties_STATUS_ARM(gens map[string]gopter.Gen) { - gens["CreateMode"] = gen.PtrOf(gen.OneConstOf( - VaultProperties_CreateMode_STATUS_ARM_CreateOrRecover, - VaultProperties_CreateMode_STATUS_ARM_Default, - VaultProperties_CreateMode_STATUS_ARM_PurgeThenCreate, - VaultProperties_CreateMode_STATUS_ARM_Recover)) - gens["EnablePurgeProtection"] = gen.PtrOf(gen.Bool()) - gens["EnableRbacAuthorization"] = gen.PtrOf(gen.Bool()) - gens["EnableSoftDelete"] = gen.PtrOf(gen.Bool()) - gens["EnabledForDeployment"] = gen.PtrOf(gen.Bool()) - gens["EnabledForDiskEncryption"] = gen.PtrOf(gen.Bool()) - gens["EnabledForTemplateDeployment"] = gen.PtrOf(gen.Bool()) - gens["HsmPoolResourceId"] = gen.PtrOf(gen.AlphaString()) - gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(VaultProperties_ProvisioningState_STATUS_ARM_RegisteringDns, VaultProperties_ProvisioningState_STATUS_ARM_Succeeded)) - gens["SoftDeleteRetentionInDays"] = gen.PtrOf(gen.Int()) - gens["TenantId"] = gen.PtrOf(gen.AlphaString()) - gens["VaultUri"] = gen.PtrOf(gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForVaultProperties_STATUS_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForVaultProperties_STATUS_ARM(gens map[string]gopter.Gen) { - gens["AccessPolicies"] = gen.SliceOf(AccessPolicyEntry_STATUS_ARMGenerator()) - gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSet_STATUS_ARMGenerator()) - gens["PrivateEndpointConnections"] = gen.SliceOf(PrivateEndpointConnectionItem_STATUS_ARMGenerator()) - gens["Sku"] = gen.PtrOf(Sku_STATUS_ARMGenerator()) -} - -func Test_Vault_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of Vault_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForVault_STATUS_ARM, Vault_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForVault_STATUS_ARM runs a test to see if a specific instance of Vault_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForVault_STATUS_ARM(subject Vault_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual Vault_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of Vault_STATUS_ARM instances for property testing - lazily instantiated by Vault_STATUS_ARMGenerator() -var vault_STATUS_ARMGenerator gopter.Gen - -// Vault_STATUS_ARMGenerator returns a generator of Vault_STATUS_ARM instances for property testing. -// We first initialize vault_STATUS_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func Vault_STATUS_ARMGenerator() gopter.Gen { - if vault_STATUS_ARMGenerator != nil { - return vault_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVault_STATUS_ARM(generators) - vault_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Vault_STATUS_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVault_STATUS_ARM(generators) - AddRelatedPropertyGeneratorsForVault_STATUS_ARM(generators) - vault_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Vault_STATUS_ARM{}), generators) - - return vault_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForVault_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForVault_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Id"] = gen.PtrOf(gen.AlphaString()) - gens["Location"] = gen.PtrOf(gen.AlphaString()) - gens["Name"] = gen.PtrOf(gen.AlphaString()) - gens["Tags"] = gen.MapOf( - gen.AlphaString(), - gen.AlphaString()) - gens["Type"] = gen.PtrOf(gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForVault_STATUS_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForVault_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Properties"] = gen.PtrOf(VaultProperties_STATUS_ARMGenerator()) - gens["SystemData"] = gen.PtrOf(SystemData_STATUS_ARMGenerator()) -} - -func Test_VirtualNetworkRule_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of VirtualNetworkRule_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule_STATUS_ARM, VirtualNetworkRule_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForVirtualNetworkRule_STATUS_ARM runs a test to see if a specific instance of VirtualNetworkRule_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForVirtualNetworkRule_STATUS_ARM(subject VirtualNetworkRule_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual VirtualNetworkRule_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of VirtualNetworkRule_STATUS_ARM instances for property testing - lazily instantiated by -// VirtualNetworkRule_STATUS_ARMGenerator() -var virtualNetworkRule_STATUS_ARMGenerator gopter.Gen - -// VirtualNetworkRule_STATUS_ARMGenerator returns a generator of VirtualNetworkRule_STATUS_ARM instances for property testing. -func VirtualNetworkRule_STATUS_ARMGenerator() gopter.Gen { - if virtualNetworkRule_STATUS_ARMGenerator != nil { - return virtualNetworkRule_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS_ARM(generators) - virtualNetworkRule_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule_STATUS_ARM{}), generators) - - return virtualNetworkRule_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Id"] = gen.PtrOf(gen.AlphaString()) - gens["IgnoreMissingVnetServiceEndpoint"] = gen.PtrOf(gen.Bool()) -} diff --git a/v2/api/keyvault/v1api20210401preview/vault_types_gen.go b/v2/api/keyvault/v1api20210401preview/vault_types_gen.go index 122033f59de..64caa6fa4e1 100644 --- a/v2/api/keyvault/v1api20210401preview/vault_types_gen.go +++ b/v2/api/keyvault/v1api20210401preview/vault_types_gen.go @@ -5,6 +5,7 @@ package v1api20210401preview import ( "fmt" + arm "github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20210401preview/arm" storage "github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20210401preview/storage" "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" @@ -376,7 +377,7 @@ func (vault *Vault_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDe if vault == nil { return nil, nil } - result := &Vault_Spec_ARM{} + result := &arm.Vault_Spec{} // Set property "Location": if vault.Location != nil { @@ -393,7 +394,7 @@ func (vault *Vault_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDe if err != nil { return nil, err } - properties := *properties_ARM.(*VaultProperties_ARM) + properties := *properties_ARM.(*arm.VaultProperties) result.Properties = &properties } @@ -409,14 +410,14 @@ func (vault *Vault_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDe // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (vault *Vault_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &Vault_Spec_ARM{} + return &arm.Vault_Spec{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (vault *Vault_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(Vault_Spec_ARM) + typedInput, ok := armInput.(arm.Vault_Spec) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Vault_Spec_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Vault_Spec, got %T", armInput) } // Set property "AzureName": @@ -680,14 +681,14 @@ var _ genruntime.FromARMConverter = &Vault_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (vault *Vault_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &Vault_STATUS_ARM{} + return &arm.Vault_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (vault *Vault_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(Vault_STATUS_ARM) + typedInput, ok := armInput.(arm.Vault_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Vault_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Vault_STATUS, got %T", armInput) } // no assignment for property "Conditions" @@ -882,14 +883,14 @@ var _ genruntime.FromARMConverter = &SystemData_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (data *SystemData_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &SystemData_STATUS_ARM{} + return &arm.SystemData_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (data *SystemData_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(SystemData_STATUS_ARM) + typedInput, ok := armInput.(arm.SystemData_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SystemData_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.SystemData_STATUS, got %T", armInput) } // Set property "CreatedAt": @@ -1089,7 +1090,7 @@ func (properties *VaultProperties) ConvertToARM(resolved genruntime.ConvertToARM if properties == nil { return nil, nil } - result := &VaultProperties_ARM{} + result := &arm.VaultProperties{} // Set property "AccessPolicies": for _, item := range properties.AccessPolicies { @@ -1097,14 +1098,14 @@ func (properties *VaultProperties) ConvertToARM(resolved genruntime.ConvertToARM if err != nil { return nil, err } - result.AccessPolicies = append(result.AccessPolicies, *item_ARM.(*AccessPolicyEntry_ARM)) + result.AccessPolicies = append(result.AccessPolicies, *item_ARM.(*arm.AccessPolicyEntry)) } // Set property "CreateMode": if properties.CreateMode != nil { var temp string temp = string(*properties.CreateMode) - createMode := VaultProperties_CreateMode_ARM(temp) + createMode := arm.VaultProperties_CreateMode(temp) result.CreateMode = &createMode } @@ -1150,7 +1151,7 @@ func (properties *VaultProperties) ConvertToARM(resolved genruntime.ConvertToARM if err != nil { return nil, err } - networkAcls := *networkAcls_ARM.(*NetworkRuleSet_ARM) + networkAcls := *networkAcls_ARM.(*arm.NetworkRuleSet) result.NetworkAcls = &networkAcls } @@ -1158,7 +1159,7 @@ func (properties *VaultProperties) ConvertToARM(resolved genruntime.ConvertToARM if properties.ProvisioningState != nil { var temp string temp = string(*properties.ProvisioningState) - provisioningState := VaultProperties_ProvisioningState_ARM(temp) + provisioningState := arm.VaultProperties_ProvisioningState(temp) result.ProvisioningState = &provisioningState } @@ -1168,7 +1169,7 @@ func (properties *VaultProperties) ConvertToARM(resolved genruntime.ConvertToARM if err != nil { return nil, err } - sku := *sku_ARM.(*Sku_ARM) + sku := *sku_ARM.(*arm.Sku) result.Sku = &sku } @@ -1202,14 +1203,14 @@ func (properties *VaultProperties) ConvertToARM(resolved genruntime.ConvertToARM // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (properties *VaultProperties) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &VaultProperties_ARM{} + return &arm.VaultProperties{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (properties *VaultProperties) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(VaultProperties_ARM) + typedInput, ok := armInput.(arm.VaultProperties) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VaultProperties_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VaultProperties, got %T", armInput) } // Set property "AccessPolicies": @@ -1670,14 +1671,14 @@ var _ genruntime.FromARMConverter = &VaultProperties_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (properties *VaultProperties_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &VaultProperties_STATUS_ARM{} + return &arm.VaultProperties_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (properties *VaultProperties_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(VaultProperties_STATUS_ARM) + typedInput, ok := armInput.(arm.VaultProperties_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VaultProperties_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VaultProperties_STATUS, got %T", armInput) } // Set property "AccessPolicies": @@ -2137,7 +2138,7 @@ func (entry *AccessPolicyEntry) ConvertToARM(resolved genruntime.ConvertToARMRes if entry == nil { return nil, nil } - result := &AccessPolicyEntry_ARM{} + result := &arm.AccessPolicyEntry{} // Set property "ApplicationId": if entry.ApplicationId != nil { @@ -2173,7 +2174,7 @@ func (entry *AccessPolicyEntry) ConvertToARM(resolved genruntime.ConvertToARMRes if err != nil { return nil, err } - permissions := *permissions_ARM.(*Permissions_ARM) + permissions := *permissions_ARM.(*arm.Permissions) result.Permissions = &permissions } @@ -2195,14 +2196,14 @@ func (entry *AccessPolicyEntry) ConvertToARM(resolved genruntime.ConvertToARMRes // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (entry *AccessPolicyEntry) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &AccessPolicyEntry_ARM{} + return &arm.AccessPolicyEntry{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (entry *AccessPolicyEntry) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(AccessPolicyEntry_ARM) + typedInput, ok := armInput.(arm.AccessPolicyEntry) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AccessPolicyEntry_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AccessPolicyEntry, got %T", armInput) } // Set property "ApplicationId": @@ -2398,14 +2399,14 @@ var _ genruntime.FromARMConverter = &AccessPolicyEntry_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (entry *AccessPolicyEntry_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &AccessPolicyEntry_STATUS_ARM{} + return &arm.AccessPolicyEntry_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (entry *AccessPolicyEntry_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(AccessPolicyEntry_STATUS_ARM) + typedInput, ok := armInput.(arm.AccessPolicyEntry_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AccessPolicyEntry_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AccessPolicyEntry_STATUS, got %T", armInput) } // Set property "ApplicationId": @@ -2548,13 +2549,13 @@ func (ruleSet *NetworkRuleSet) ConvertToARM(resolved genruntime.ConvertToARMReso if ruleSet == nil { return nil, nil } - result := &NetworkRuleSet_ARM{} + result := &arm.NetworkRuleSet{} // Set property "Bypass": if ruleSet.Bypass != nil { var temp string temp = string(*ruleSet.Bypass) - bypass := NetworkRuleSet_Bypass_ARM(temp) + bypass := arm.NetworkRuleSet_Bypass(temp) result.Bypass = &bypass } @@ -2562,7 +2563,7 @@ func (ruleSet *NetworkRuleSet) ConvertToARM(resolved genruntime.ConvertToARMReso if ruleSet.DefaultAction != nil { var temp string temp = string(*ruleSet.DefaultAction) - defaultAction := NetworkRuleSet_DefaultAction_ARM(temp) + defaultAction := arm.NetworkRuleSet_DefaultAction(temp) result.DefaultAction = &defaultAction } @@ -2572,7 +2573,7 @@ func (ruleSet *NetworkRuleSet) ConvertToARM(resolved genruntime.ConvertToARMReso if err != nil { return nil, err } - result.IpRules = append(result.IpRules, *item_ARM.(*IPRule_ARM)) + result.IpRules = append(result.IpRules, *item_ARM.(*arm.IPRule)) } // Set property "VirtualNetworkRules": @@ -2581,21 +2582,21 @@ func (ruleSet *NetworkRuleSet) ConvertToARM(resolved genruntime.ConvertToARMReso if err != nil { return nil, err } - result.VirtualNetworkRules = append(result.VirtualNetworkRules, *item_ARM.(*VirtualNetworkRule_ARM)) + result.VirtualNetworkRules = append(result.VirtualNetworkRules, *item_ARM.(*arm.VirtualNetworkRule)) } return result, nil } // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (ruleSet *NetworkRuleSet) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &NetworkRuleSet_ARM{} + return &arm.NetworkRuleSet{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (ruleSet *NetworkRuleSet) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(NetworkRuleSet_ARM) + typedInput, ok := armInput.(arm.NetworkRuleSet) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected NetworkRuleSet_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.NetworkRuleSet, got %T", armInput) } // Set property "Bypass": @@ -2788,14 +2789,14 @@ var _ genruntime.FromARMConverter = &NetworkRuleSet_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (ruleSet *NetworkRuleSet_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &NetworkRuleSet_STATUS_ARM{} + return &arm.NetworkRuleSet_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (ruleSet *NetworkRuleSet_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(NetworkRuleSet_STATUS_ARM) + typedInput, ok := armInput.(arm.NetworkRuleSet_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected NetworkRuleSet_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.NetworkRuleSet_STATUS, got %T", armInput) } // Set property "Bypass": @@ -2989,14 +2990,14 @@ var _ genruntime.FromARMConverter = &PrivateEndpointConnectionItem_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (item *PrivateEndpointConnectionItem_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &PrivateEndpointConnectionItem_STATUS_ARM{} + return &arm.PrivateEndpointConnectionItem_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (item *PrivateEndpointConnectionItem_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(PrivateEndpointConnectionItem_STATUS_ARM) + typedInput, ok := armInput.(arm.PrivateEndpointConnectionItem_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected PrivateEndpointConnectionItem_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.PrivateEndpointConnectionItem_STATUS, got %T", armInput) } // Set property "Etag": @@ -3172,13 +3173,13 @@ func (sku *Sku) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (i if sku == nil { return nil, nil } - result := &Sku_ARM{} + result := &arm.Sku{} // Set property "Family": if sku.Family != nil { var temp string temp = string(*sku.Family) - family := Sku_Family_ARM(temp) + family := arm.Sku_Family(temp) result.Family = &family } @@ -3186,7 +3187,7 @@ func (sku *Sku) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (i if sku.Name != nil { var temp string temp = string(*sku.Name) - name := Sku_Name_ARM(temp) + name := arm.Sku_Name(temp) result.Name = &name } return result, nil @@ -3194,14 +3195,14 @@ func (sku *Sku) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (i // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (sku *Sku) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &Sku_ARM{} + return &arm.Sku{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (sku *Sku) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(Sku_ARM) + typedInput, ok := armInput.(arm.Sku) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Sku_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Sku, got %T", armInput) } // Set property "Family": @@ -3294,14 +3295,14 @@ var _ genruntime.FromARMConverter = &Sku_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (sku *Sku_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &Sku_STATUS_ARM{} + return &arm.Sku_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (sku *Sku_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(Sku_STATUS_ARM) + typedInput, ok := armInput.(arm.Sku_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Sku_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Sku_STATUS, got %T", armInput) } // Set property "Family": @@ -3458,7 +3459,7 @@ func (rule *IPRule) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails if rule == nil { return nil, nil } - result := &IPRule_ARM{} + result := &arm.IPRule{} // Set property "Value": if rule.Value != nil { @@ -3470,14 +3471,14 @@ func (rule *IPRule) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (rule *IPRule) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &IPRule_ARM{} + return &arm.IPRule{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (rule *IPRule) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(IPRule_ARM) + typedInput, ok := armInput.(arm.IPRule) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected IPRule_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IPRule, got %T", armInput) } // Set property "Value": @@ -3530,14 +3531,14 @@ var _ genruntime.FromARMConverter = &IPRule_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (rule *IPRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &IPRule_STATUS_ARM{} + return &arm.IPRule_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (rule *IPRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(IPRule_STATUS_ARM) + typedInput, ok := armInput.(arm.IPRule_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected IPRule_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IPRule_STATUS, got %T", armInput) } // Set property "Value": @@ -3655,48 +3656,48 @@ func (permissions *Permissions) ConvertToARM(resolved genruntime.ConvertToARMRes if permissions == nil { return nil, nil } - result := &Permissions_ARM{} + result := &arm.Permissions{} // Set property "Certificates": for _, item := range permissions.Certificates { var temp string temp = string(item) - result.Certificates = append(result.Certificates, Permissions_Certificates_ARM(temp)) + result.Certificates = append(result.Certificates, arm.Permissions_Certificates(temp)) } // Set property "Keys": for _, item := range permissions.Keys { var temp string temp = string(item) - result.Keys = append(result.Keys, Permissions_Keys_ARM(temp)) + result.Keys = append(result.Keys, arm.Permissions_Keys(temp)) } // Set property "Secrets": for _, item := range permissions.Secrets { var temp string temp = string(item) - result.Secrets = append(result.Secrets, Permissions_Secrets_ARM(temp)) + result.Secrets = append(result.Secrets, arm.Permissions_Secrets(temp)) } // Set property "Storage": for _, item := range permissions.Storage { var temp string temp = string(item) - result.Storage = append(result.Storage, Permissions_Storage_ARM(temp)) + result.Storage = append(result.Storage, arm.Permissions_Storage(temp)) } return result, nil } // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (permissions *Permissions) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &Permissions_ARM{} + return &arm.Permissions{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (permissions *Permissions) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(Permissions_ARM) + typedInput, ok := armInput.(arm.Permissions) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Permissions_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Permissions, got %T", armInput) } // Set property "Certificates": @@ -3877,14 +3878,14 @@ var _ genruntime.FromARMConverter = &Permissions_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (permissions *Permissions_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &Permissions_STATUS_ARM{} + return &arm.Permissions_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (permissions *Permissions_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(Permissions_STATUS_ARM) + typedInput, ok := armInput.(arm.Permissions_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Permissions_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Permissions_STATUS, got %T", armInput) } // Set property "Certificates": @@ -4056,14 +4057,14 @@ var _ genruntime.FromARMConverter = &PrivateEndpoint_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (endpoint *PrivateEndpoint_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &PrivateEndpoint_STATUS_ARM{} + return &arm.PrivateEndpoint_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (endpoint *PrivateEndpoint_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(PrivateEndpoint_STATUS_ARM) + typedInput, ok := armInput.(arm.PrivateEndpoint_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected PrivateEndpoint_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.PrivateEndpoint_STATUS, got %T", armInput) } // Set property "Id": @@ -4143,14 +4144,14 @@ var _ genruntime.FromARMConverter = &PrivateLinkServiceConnectionState_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (state *PrivateLinkServiceConnectionState_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &PrivateLinkServiceConnectionState_STATUS_ARM{} + return &arm.PrivateLinkServiceConnectionState_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (state *PrivateLinkServiceConnectionState_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(PrivateLinkServiceConnectionState_STATUS_ARM) + typedInput, ok := armInput.(arm.PrivateLinkServiceConnectionState_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected PrivateLinkServiceConnectionState_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.PrivateLinkServiceConnectionState_STATUS, got %T", armInput) } // Set property "ActionsRequired": @@ -4307,7 +4308,7 @@ func (rule *VirtualNetworkRule) ConvertToARM(resolved genruntime.ConvertToARMRes if rule == nil { return nil, nil } - result := &VirtualNetworkRule_ARM{} + result := &arm.VirtualNetworkRule{} // Set property "Id": if rule.Reference != nil { @@ -4329,14 +4330,14 @@ func (rule *VirtualNetworkRule) ConvertToARM(resolved genruntime.ConvertToARMRes // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (rule *VirtualNetworkRule) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &VirtualNetworkRule_ARM{} + return &arm.VirtualNetworkRule{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (rule *VirtualNetworkRule) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(VirtualNetworkRule_ARM) + typedInput, ok := armInput.(arm.VirtualNetworkRule) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VirtualNetworkRule_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VirtualNetworkRule, got %T", armInput) } // Set property "IgnoreMissingVnetServiceEndpoint": @@ -4421,14 +4422,14 @@ var _ genruntime.FromARMConverter = &VirtualNetworkRule_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (rule *VirtualNetworkRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &VirtualNetworkRule_STATUS_ARM{} + return &arm.VirtualNetworkRule_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (rule *VirtualNetworkRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(VirtualNetworkRule_STATUS_ARM) + typedInput, ok := armInput.(arm.VirtualNetworkRule_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VirtualNetworkRule_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VirtualNetworkRule_STATUS, got %T", armInput) } // Set property "Id": diff --git a/v2/api/keyvault/v1api20210401preview/zz_generated.deepcopy.go b/v2/api/keyvault/v1api20210401preview/zz_generated.deepcopy.go index 00f1eaa5313..eef336d728a 100644 --- a/v2/api/keyvault/v1api20210401preview/zz_generated.deepcopy.go +++ b/v2/api/keyvault/v1api20210401preview/zz_generated.deepcopy.go @@ -65,41 +65,6 @@ func (in *AccessPolicyEntry) DeepCopy() *AccessPolicyEntry { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AccessPolicyEntry_ARM) DeepCopyInto(out *AccessPolicyEntry_ARM) { - *out = *in - if in.ApplicationId != nil { - in, out := &in.ApplicationId, &out.ApplicationId - *out = new(string) - **out = **in - } - if in.ObjectId != nil { - in, out := &in.ObjectId, &out.ObjectId - *out = new(string) - **out = **in - } - if in.Permissions != nil { - in, out := &in.Permissions, &out.Permissions - *out = new(Permissions_ARM) - (*in).DeepCopyInto(*out) - } - if in.TenantId != nil { - in, out := &in.TenantId, &out.TenantId - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessPolicyEntry_ARM. -func (in *AccessPolicyEntry_ARM) DeepCopy() *AccessPolicyEntry_ARM { - if in == nil { - return nil - } - out := new(AccessPolicyEntry_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AccessPolicyEntry_STATUS) DeepCopyInto(out *AccessPolicyEntry_STATUS) { *out = *in @@ -135,41 +100,6 @@ func (in *AccessPolicyEntry_STATUS) DeepCopy() *AccessPolicyEntry_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AccessPolicyEntry_STATUS_ARM) DeepCopyInto(out *AccessPolicyEntry_STATUS_ARM) { - *out = *in - if in.ApplicationId != nil { - in, out := &in.ApplicationId, &out.ApplicationId - *out = new(string) - **out = **in - } - if in.ObjectId != nil { - in, out := &in.ObjectId, &out.ObjectId - *out = new(string) - **out = **in - } - if in.Permissions != nil { - in, out := &in.Permissions, &out.Permissions - *out = new(Permissions_STATUS_ARM) - (*in).DeepCopyInto(*out) - } - if in.TenantId != nil { - in, out := &in.TenantId, &out.TenantId - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessPolicyEntry_STATUS_ARM. -func (in *AccessPolicyEntry_STATUS_ARM) DeepCopy() *AccessPolicyEntry_STATUS_ARM { - if in == nil { - return nil - } - out := new(AccessPolicyEntry_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IPRule) DeepCopyInto(out *IPRule) { *out = *in @@ -190,26 +120,6 @@ func (in *IPRule) DeepCopy() *IPRule { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPRule_ARM) DeepCopyInto(out *IPRule_ARM) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRule_ARM. -func (in *IPRule_ARM) DeepCopy() *IPRule_ARM { - if in == nil { - return nil - } - out := new(IPRule_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IPRule_STATUS) DeepCopyInto(out *IPRule_STATUS) { *out = *in @@ -230,26 +140,6 @@ func (in *IPRule_STATUS) DeepCopy() *IPRule_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPRule_STATUS_ARM) DeepCopyInto(out *IPRule_STATUS_ARM) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRule_STATUS_ARM. -func (in *IPRule_STATUS_ARM) DeepCopy() *IPRule_STATUS_ARM { - if in == nil { - return nil - } - out := new(IPRule_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NetworkRuleSet) DeepCopyInto(out *NetworkRuleSet) { *out = *in @@ -289,45 +179,6 @@ func (in *NetworkRuleSet) DeepCopy() *NetworkRuleSet { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkRuleSet_ARM) DeepCopyInto(out *NetworkRuleSet_ARM) { - *out = *in - if in.Bypass != nil { - in, out := &in.Bypass, &out.Bypass - *out = new(NetworkRuleSet_Bypass_ARM) - **out = **in - } - if in.DefaultAction != nil { - in, out := &in.DefaultAction, &out.DefaultAction - *out = new(NetworkRuleSet_DefaultAction_ARM) - **out = **in - } - if in.IpRules != nil { - in, out := &in.IpRules, &out.IpRules - *out = make([]IPRule_ARM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VirtualNetworkRules != nil { - in, out := &in.VirtualNetworkRules, &out.VirtualNetworkRules - *out = make([]VirtualNetworkRule_ARM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRuleSet_ARM. -func (in *NetworkRuleSet_ARM) DeepCopy() *NetworkRuleSet_ARM { - if in == nil { - return nil - } - out := new(NetworkRuleSet_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NetworkRuleSet_STATUS) DeepCopyInto(out *NetworkRuleSet_STATUS) { *out = *in @@ -367,45 +218,6 @@ func (in *NetworkRuleSet_STATUS) DeepCopy() *NetworkRuleSet_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkRuleSet_STATUS_ARM) DeepCopyInto(out *NetworkRuleSet_STATUS_ARM) { - *out = *in - if in.Bypass != nil { - in, out := &in.Bypass, &out.Bypass - *out = new(NetworkRuleSet_Bypass_STATUS_ARM) - **out = **in - } - if in.DefaultAction != nil { - in, out := &in.DefaultAction, &out.DefaultAction - *out = new(NetworkRuleSet_DefaultAction_STATUS_ARM) - **out = **in - } - if in.IpRules != nil { - in, out := &in.IpRules, &out.IpRules - *out = make([]IPRule_STATUS_ARM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VirtualNetworkRules != nil { - in, out := &in.VirtualNetworkRules, &out.VirtualNetworkRules - *out = make([]VirtualNetworkRule_STATUS_ARM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRuleSet_STATUS_ARM. -func (in *NetworkRuleSet_STATUS_ARM) DeepCopy() *NetworkRuleSet_STATUS_ARM { - if in == nil { - return nil - } - out := new(NetworkRuleSet_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Permissions) DeepCopyInto(out *Permissions) { *out = *in @@ -441,41 +253,6 @@ func (in *Permissions) DeepCopy() *Permissions { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Permissions_ARM) DeepCopyInto(out *Permissions_ARM) { - *out = *in - if in.Certificates != nil { - in, out := &in.Certificates, &out.Certificates - *out = make([]Permissions_Certificates_ARM, len(*in)) - copy(*out, *in) - } - if in.Keys != nil { - in, out := &in.Keys, &out.Keys - *out = make([]Permissions_Keys_ARM, len(*in)) - copy(*out, *in) - } - if in.Secrets != nil { - in, out := &in.Secrets, &out.Secrets - *out = make([]Permissions_Secrets_ARM, len(*in)) - copy(*out, *in) - } - if in.Storage != nil { - in, out := &in.Storage, &out.Storage - *out = make([]Permissions_Storage_ARM, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Permissions_ARM. -func (in *Permissions_ARM) DeepCopy() *Permissions_ARM { - if in == nil { - return nil - } - out := new(Permissions_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Permissions_STATUS) DeepCopyInto(out *Permissions_STATUS) { *out = *in @@ -511,41 +288,6 @@ func (in *Permissions_STATUS) DeepCopy() *Permissions_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Permissions_STATUS_ARM) DeepCopyInto(out *Permissions_STATUS_ARM) { - *out = *in - if in.Certificates != nil { - in, out := &in.Certificates, &out.Certificates - *out = make([]Permissions_Certificates_STATUS_ARM, len(*in)) - copy(*out, *in) - } - if in.Keys != nil { - in, out := &in.Keys, &out.Keys - *out = make([]Permissions_Keys_STATUS_ARM, len(*in)) - copy(*out, *in) - } - if in.Secrets != nil { - in, out := &in.Secrets, &out.Secrets - *out = make([]Permissions_Secrets_STATUS_ARM, len(*in)) - copy(*out, *in) - } - if in.Storage != nil { - in, out := &in.Storage, &out.Storage - *out = make([]Permissions_Storage_STATUS_ARM, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Permissions_STATUS_ARM. -func (in *Permissions_STATUS_ARM) DeepCopy() *Permissions_STATUS_ARM { - if in == nil { - return nil - } - out := new(Permissions_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PrivateEndpointConnectionItem_STATUS) DeepCopyInto(out *PrivateEndpointConnectionItem_STATUS) { *out = *in @@ -586,66 +328,6 @@ func (in *PrivateEndpointConnectionItem_STATUS) DeepCopy() *PrivateEndpointConne return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrivateEndpointConnectionItem_STATUS_ARM) DeepCopyInto(out *PrivateEndpointConnectionItem_STATUS_ARM) { - *out = *in - if in.Etag != nil { - in, out := &in.Etag, &out.Etag - *out = new(string) - **out = **in - } - if in.Id != nil { - in, out := &in.Id, &out.Id - *out = new(string) - **out = **in - } - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = new(PrivateEndpointConnectionProperties_STATUS_ARM) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateEndpointConnectionItem_STATUS_ARM. -func (in *PrivateEndpointConnectionItem_STATUS_ARM) DeepCopy() *PrivateEndpointConnectionItem_STATUS_ARM { - if in == nil { - return nil - } - out := new(PrivateEndpointConnectionItem_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrivateEndpointConnectionProperties_STATUS_ARM) DeepCopyInto(out *PrivateEndpointConnectionProperties_STATUS_ARM) { - *out = *in - if in.PrivateEndpoint != nil { - in, out := &in.PrivateEndpoint, &out.PrivateEndpoint - *out = new(PrivateEndpoint_STATUS_ARM) - (*in).DeepCopyInto(*out) - } - if in.PrivateLinkServiceConnectionState != nil { - in, out := &in.PrivateLinkServiceConnectionState, &out.PrivateLinkServiceConnectionState - *out = new(PrivateLinkServiceConnectionState_STATUS_ARM) - (*in).DeepCopyInto(*out) - } - if in.ProvisioningState != nil { - in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(PrivateEndpointConnectionProvisioningState_STATUS_ARM) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateEndpointConnectionProperties_STATUS_ARM. -func (in *PrivateEndpointConnectionProperties_STATUS_ARM) DeepCopy() *PrivateEndpointConnectionProperties_STATUS_ARM { - if in == nil { - return nil - } - out := new(PrivateEndpointConnectionProperties_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PrivateEndpoint_STATUS) DeepCopyInto(out *PrivateEndpoint_STATUS) { *out = *in @@ -666,26 +348,6 @@ func (in *PrivateEndpoint_STATUS) DeepCopy() *PrivateEndpoint_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrivateEndpoint_STATUS_ARM) DeepCopyInto(out *PrivateEndpoint_STATUS_ARM) { - *out = *in - if in.Id != nil { - in, out := &in.Id, &out.Id - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateEndpoint_STATUS_ARM. -func (in *PrivateEndpoint_STATUS_ARM) DeepCopy() *PrivateEndpoint_STATUS_ARM { - if in == nil { - return nil - } - out := new(PrivateEndpoint_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PrivateLinkServiceConnectionState_STATUS) DeepCopyInto(out *PrivateLinkServiceConnectionState_STATUS) { *out = *in @@ -716,36 +378,6 @@ func (in *PrivateLinkServiceConnectionState_STATUS) DeepCopy() *PrivateLinkServi return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrivateLinkServiceConnectionState_STATUS_ARM) DeepCopyInto(out *PrivateLinkServiceConnectionState_STATUS_ARM) { - *out = *in - if in.ActionsRequired != nil { - in, out := &in.ActionsRequired, &out.ActionsRequired - *out = new(PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM) - **out = **in - } - if in.Description != nil { - in, out := &in.Description, &out.Description - *out = new(string) - **out = **in - } - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(PrivateEndpointServiceConnectionStatus_STATUS_ARM) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateLinkServiceConnectionState_STATUS_ARM. -func (in *PrivateLinkServiceConnectionState_STATUS_ARM) DeepCopy() *PrivateLinkServiceConnectionState_STATUS_ARM { - if in == nil { - return nil - } - out := new(PrivateLinkServiceConnectionState_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Sku) DeepCopyInto(out *Sku) { *out = *in @@ -771,31 +403,6 @@ func (in *Sku) DeepCopy() *Sku { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Sku_ARM) DeepCopyInto(out *Sku_ARM) { - *out = *in - if in.Family != nil { - in, out := &in.Family, &out.Family - *out = new(Sku_Family_ARM) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(Sku_Name_ARM) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sku_ARM. -func (in *Sku_ARM) DeepCopy() *Sku_ARM { - if in == nil { - return nil - } - out := new(Sku_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Sku_STATUS) DeepCopyInto(out *Sku_STATUS) { *out = *in @@ -821,31 +428,6 @@ func (in *Sku_STATUS) DeepCopy() *Sku_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Sku_STATUS_ARM) DeepCopyInto(out *Sku_STATUS_ARM) { - *out = *in - if in.Family != nil { - in, out := &in.Family, &out.Family - *out = new(Sku_Family_STATUS_ARM) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(Sku_Name_STATUS_ARM) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sku_STATUS_ARM. -func (in *Sku_STATUS_ARM) DeepCopy() *Sku_STATUS_ARM { - if in == nil { - return nil - } - out := new(Sku_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SystemData_STATUS) DeepCopyInto(out *SystemData_STATUS) { *out = *in @@ -891,302 +473,78 @@ func (in *SystemData_STATUS) DeepCopy() *SystemData_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SystemData_STATUS_ARM) DeepCopyInto(out *SystemData_STATUS_ARM) { - *out = *in - if in.CreatedAt != nil { - in, out := &in.CreatedAt, &out.CreatedAt - *out = new(string) - **out = **in - } - if in.CreatedBy != nil { - in, out := &in.CreatedBy, &out.CreatedBy - *out = new(string) - **out = **in - } - if in.CreatedByType != nil { - in, out := &in.CreatedByType, &out.CreatedByType - *out = new(IdentityType_STATUS_ARM) - **out = **in - } - if in.LastModifiedAt != nil { - in, out := &in.LastModifiedAt, &out.LastModifiedAt - *out = new(string) - **out = **in - } - if in.LastModifiedBy != nil { - in, out := &in.LastModifiedBy, &out.LastModifiedBy - *out = new(string) - **out = **in - } - if in.LastModifiedByType != nil { - in, out := &in.LastModifiedByType, &out.LastModifiedByType - *out = new(IdentityType_STATUS_ARM) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemData_STATUS_ARM. -func (in *SystemData_STATUS_ARM) DeepCopy() *SystemData_STATUS_ARM { - if in == nil { - return nil - } - out := new(SystemData_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Vault) DeepCopyInto(out *Vault) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Vault. -func (in *Vault) DeepCopy() *Vault { - if in == nil { - return nil - } - out := new(Vault) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Vault) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultList) DeepCopyInto(out *VaultList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Vault, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultList. -func (in *VaultList) DeepCopy() *VaultList { - if in == nil { - return nil - } - out := new(VaultList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VaultList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultProperties) DeepCopyInto(out *VaultProperties) { - *out = *in - if in.AccessPolicies != nil { - in, out := &in.AccessPolicies, &out.AccessPolicies - *out = make([]AccessPolicyEntry, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.CreateMode != nil { - in, out := &in.CreateMode, &out.CreateMode - *out = new(VaultProperties_CreateMode) - **out = **in - } - if in.EnablePurgeProtection != nil { - in, out := &in.EnablePurgeProtection, &out.EnablePurgeProtection - *out = new(bool) - **out = **in - } - if in.EnableRbacAuthorization != nil { - in, out := &in.EnableRbacAuthorization, &out.EnableRbacAuthorization - *out = new(bool) - **out = **in - } - if in.EnableSoftDelete != nil { - in, out := &in.EnableSoftDelete, &out.EnableSoftDelete - *out = new(bool) - **out = **in - } - if in.EnabledForDeployment != nil { - in, out := &in.EnabledForDeployment, &out.EnabledForDeployment - *out = new(bool) - **out = **in - } - if in.EnabledForDiskEncryption != nil { - in, out := &in.EnabledForDiskEncryption, &out.EnabledForDiskEncryption - *out = new(bool) - **out = **in - } - if in.EnabledForTemplateDeployment != nil { - in, out := &in.EnabledForTemplateDeployment, &out.EnabledForTemplateDeployment - *out = new(bool) - **out = **in - } - if in.NetworkAcls != nil { - in, out := &in.NetworkAcls, &out.NetworkAcls - *out = new(NetworkRuleSet) - (*in).DeepCopyInto(*out) - } - if in.ProvisioningState != nil { - in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(VaultProperties_ProvisioningState) - **out = **in - } - if in.Sku != nil { - in, out := &in.Sku, &out.Sku - *out = new(Sku) - (*in).DeepCopyInto(*out) - } - if in.SoftDeleteRetentionInDays != nil { - in, out := &in.SoftDeleteRetentionInDays, &out.SoftDeleteRetentionInDays - *out = new(int) - **out = **in - } - if in.TenantId != nil { - in, out := &in.TenantId, &out.TenantId - *out = new(string) - **out = **in - } - if in.TenantIdFromConfig != nil { - in, out := &in.TenantIdFromConfig, &out.TenantIdFromConfig - *out = new(genruntime.ConfigMapReference) - **out = **in - } - if in.VaultUri != nil { - in, out := &in.VaultUri, &out.VaultUri - *out = new(string) - **out = **in - } + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultProperties. -func (in *VaultProperties) DeepCopy() *VaultProperties { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Vault. +func (in *Vault) DeepCopy() *Vault { if in == nil { return nil } - out := new(VaultProperties) + out := new(Vault) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Vault) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultProperties_ARM) DeepCopyInto(out *VaultProperties_ARM) { +func (in *VaultList) DeepCopyInto(out *VaultList) { *out = *in - if in.AccessPolicies != nil { - in, out := &in.AccessPolicies, &out.AccessPolicies - *out = make([]AccessPolicyEntry_ARM, len(*in)) + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Vault, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.CreateMode != nil { - in, out := &in.CreateMode, &out.CreateMode - *out = new(VaultProperties_CreateMode_ARM) - **out = **in - } - if in.EnablePurgeProtection != nil { - in, out := &in.EnablePurgeProtection, &out.EnablePurgeProtection - *out = new(bool) - **out = **in - } - if in.EnableRbacAuthorization != nil { - in, out := &in.EnableRbacAuthorization, &out.EnableRbacAuthorization - *out = new(bool) - **out = **in - } - if in.EnableSoftDelete != nil { - in, out := &in.EnableSoftDelete, &out.EnableSoftDelete - *out = new(bool) - **out = **in - } - if in.EnabledForDeployment != nil { - in, out := &in.EnabledForDeployment, &out.EnabledForDeployment - *out = new(bool) - **out = **in - } - if in.EnabledForDiskEncryption != nil { - in, out := &in.EnabledForDiskEncryption, &out.EnabledForDiskEncryption - *out = new(bool) - **out = **in - } - if in.EnabledForTemplateDeployment != nil { - in, out := &in.EnabledForTemplateDeployment, &out.EnabledForTemplateDeployment - *out = new(bool) - **out = **in - } - if in.NetworkAcls != nil { - in, out := &in.NetworkAcls, &out.NetworkAcls - *out = new(NetworkRuleSet_ARM) - (*in).DeepCopyInto(*out) - } - if in.ProvisioningState != nil { - in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(VaultProperties_ProvisioningState_ARM) - **out = **in - } - if in.Sku != nil { - in, out := &in.Sku, &out.Sku - *out = new(Sku_ARM) - (*in).DeepCopyInto(*out) - } - if in.SoftDeleteRetentionInDays != nil { - in, out := &in.SoftDeleteRetentionInDays, &out.SoftDeleteRetentionInDays - *out = new(int) - **out = **in - } - if in.TenantId != nil { - in, out := &in.TenantId, &out.TenantId - *out = new(string) - **out = **in - } - if in.VaultUri != nil { - in, out := &in.VaultUri, &out.VaultUri - *out = new(string) - **out = **in - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultProperties_ARM. -func (in *VaultProperties_ARM) DeepCopy() *VaultProperties_ARM { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultList. +func (in *VaultList) DeepCopy() *VaultList { if in == nil { return nil } - out := new(VaultProperties_ARM) + out := new(VaultList) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VaultList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultProperties_STATUS) DeepCopyInto(out *VaultProperties_STATUS) { +func (in *VaultProperties) DeepCopyInto(out *VaultProperties) { *out = *in if in.AccessPolicies != nil { in, out := &in.AccessPolicies, &out.AccessPolicies - *out = make([]AccessPolicyEntry_STATUS, len(*in)) + *out = make([]AccessPolicyEntry, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.CreateMode != nil { in, out := &in.CreateMode, &out.CreateMode - *out = new(VaultProperties_CreateMode_STATUS) + *out = new(VaultProperties_CreateMode) **out = **in } if in.EnablePurgeProtection != nil { @@ -1219,31 +577,19 @@ func (in *VaultProperties_STATUS) DeepCopyInto(out *VaultProperties_STATUS) { *out = new(bool) **out = **in } - if in.HsmPoolResourceId != nil { - in, out := &in.HsmPoolResourceId, &out.HsmPoolResourceId - *out = new(string) - **out = **in - } if in.NetworkAcls != nil { in, out := &in.NetworkAcls, &out.NetworkAcls - *out = new(NetworkRuleSet_STATUS) + *out = new(NetworkRuleSet) (*in).DeepCopyInto(*out) } - if in.PrivateEndpointConnections != nil { - in, out := &in.PrivateEndpointConnections, &out.PrivateEndpointConnections - *out = make([]PrivateEndpointConnectionItem_STATUS, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } if in.ProvisioningState != nil { in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(VaultProperties_ProvisioningState_STATUS) + *out = new(VaultProperties_ProvisioningState) **out = **in } if in.Sku != nil { in, out := &in.Sku, &out.Sku - *out = new(Sku_STATUS) + *out = new(Sku) (*in).DeepCopyInto(*out) } if in.SoftDeleteRetentionInDays != nil { @@ -1256,6 +602,11 @@ func (in *VaultProperties_STATUS) DeepCopyInto(out *VaultProperties_STATUS) { *out = new(string) **out = **in } + if in.TenantIdFromConfig != nil { + in, out := &in.TenantIdFromConfig, &out.TenantIdFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } if in.VaultUri != nil { in, out := &in.VaultUri, &out.VaultUri *out = new(string) @@ -1263,29 +614,29 @@ func (in *VaultProperties_STATUS) DeepCopyInto(out *VaultProperties_STATUS) { } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultProperties_STATUS. -func (in *VaultProperties_STATUS) DeepCopy() *VaultProperties_STATUS { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultProperties. +func (in *VaultProperties) DeepCopy() *VaultProperties { if in == nil { return nil } - out := new(VaultProperties_STATUS) + out := new(VaultProperties) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultProperties_STATUS_ARM) DeepCopyInto(out *VaultProperties_STATUS_ARM) { +func (in *VaultProperties_STATUS) DeepCopyInto(out *VaultProperties_STATUS) { *out = *in if in.AccessPolicies != nil { in, out := &in.AccessPolicies, &out.AccessPolicies - *out = make([]AccessPolicyEntry_STATUS_ARM, len(*in)) + *out = make([]AccessPolicyEntry_STATUS, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.CreateMode != nil { in, out := &in.CreateMode, &out.CreateMode - *out = new(VaultProperties_CreateMode_STATUS_ARM) + *out = new(VaultProperties_CreateMode_STATUS) **out = **in } if in.EnablePurgeProtection != nil { @@ -1325,24 +676,24 @@ func (in *VaultProperties_STATUS_ARM) DeepCopyInto(out *VaultProperties_STATUS_A } if in.NetworkAcls != nil { in, out := &in.NetworkAcls, &out.NetworkAcls - *out = new(NetworkRuleSet_STATUS_ARM) + *out = new(NetworkRuleSet_STATUS) (*in).DeepCopyInto(*out) } if in.PrivateEndpointConnections != nil { in, out := &in.PrivateEndpointConnections, &out.PrivateEndpointConnections - *out = make([]PrivateEndpointConnectionItem_STATUS_ARM, len(*in)) + *out = make([]PrivateEndpointConnectionItem_STATUS, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.ProvisioningState != nil { in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(VaultProperties_ProvisioningState_STATUS_ARM) + *out = new(VaultProperties_ProvisioningState_STATUS) **out = **in } if in.Sku != nil { in, out := &in.Sku, &out.Sku - *out = new(Sku_STATUS_ARM) + *out = new(Sku_STATUS) (*in).DeepCopyInto(*out) } if in.SoftDeleteRetentionInDays != nil { @@ -1362,12 +713,12 @@ func (in *VaultProperties_STATUS_ARM) DeepCopyInto(out *VaultProperties_STATUS_A } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultProperties_STATUS_ARM. -func (in *VaultProperties_STATUS_ARM) DeepCopy() *VaultProperties_STATUS_ARM { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultProperties_STATUS. +func (in *VaultProperties_STATUS) DeepCopy() *VaultProperties_STATUS { if in == nil { return nil } - out := new(VaultProperties_STATUS_ARM) + out := new(VaultProperties_STATUS) in.DeepCopyInto(out) return out } @@ -1431,58 +782,6 @@ func (in *Vault_STATUS) DeepCopy() *Vault_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Vault_STATUS_ARM) DeepCopyInto(out *Vault_STATUS_ARM) { - *out = *in - if in.Id != nil { - in, out := &in.Id, &out.Id - *out = new(string) - **out = **in - } - if in.Location != nil { - in, out := &in.Location, &out.Location - *out = new(string) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = new(VaultProperties_STATUS_ARM) - (*in).DeepCopyInto(*out) - } - if in.SystemData != nil { - in, out := &in.SystemData, &out.SystemData - *out = new(SystemData_STATUS_ARM) - (*in).DeepCopyInto(*out) - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Vault_STATUS_ARM. -func (in *Vault_STATUS_ARM) DeepCopy() *Vault_STATUS_ARM { - if in == nil { - return nil - } - out := new(Vault_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Vault_Spec) DeepCopyInto(out *Vault_Spec) { *out = *in @@ -1520,38 +819,6 @@ func (in *Vault_Spec) DeepCopy() *Vault_Spec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Vault_Spec_ARM) DeepCopyInto(out *Vault_Spec_ARM) { - *out = *in - if in.Location != nil { - in, out := &in.Location, &out.Location - *out = new(string) - **out = **in - } - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = new(VaultProperties_ARM) - (*in).DeepCopyInto(*out) - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Vault_Spec_ARM. -func (in *Vault_Spec_ARM) DeepCopy() *Vault_Spec_ARM { - if in == nil { - return nil - } - out := new(Vault_Spec_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualNetworkRule) DeepCopyInto(out *VirtualNetworkRule) { *out = *in @@ -1577,31 +844,6 @@ func (in *VirtualNetworkRule) DeepCopy() *VirtualNetworkRule { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualNetworkRule_ARM) DeepCopyInto(out *VirtualNetworkRule_ARM) { - *out = *in - if in.Id != nil { - in, out := &in.Id, &out.Id - *out = new(string) - **out = **in - } - if in.IgnoreMissingVnetServiceEndpoint != nil { - in, out := &in.IgnoreMissingVnetServiceEndpoint, &out.IgnoreMissingVnetServiceEndpoint - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualNetworkRule_ARM. -func (in *VirtualNetworkRule_ARM) DeepCopy() *VirtualNetworkRule_ARM { - if in == nil { - return nil - } - out := new(VirtualNetworkRule_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualNetworkRule_STATUS) DeepCopyInto(out *VirtualNetworkRule_STATUS) { *out = *in @@ -1626,28 +868,3 @@ func (in *VirtualNetworkRule_STATUS) DeepCopy() *VirtualNetworkRule_STATUS { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualNetworkRule_STATUS_ARM) DeepCopyInto(out *VirtualNetworkRule_STATUS_ARM) { - *out = *in - if in.Id != nil { - in, out := &in.Id, &out.Id - *out = new(string) - **out = **in - } - if in.IgnoreMissingVnetServiceEndpoint != nil { - in, out := &in.IgnoreMissingVnetServiceEndpoint, &out.IgnoreMissingVnetServiceEndpoint - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualNetworkRule_STATUS_ARM. -func (in *VirtualNetworkRule_STATUS_ARM) DeepCopy() *VirtualNetworkRule_STATUS_ARM { - if in == nil { - return nil - } - out := new(VirtualNetworkRule_STATUS_ARM) - in.DeepCopyInto(out) - return out -} diff --git a/v2/api/keyvault/v1api20230701/arm/structure.txt b/v2/api/keyvault/v1api20230701/arm/structure.txt new file mode 100644 index 00000000000..16ea53f4f3a --- /dev/null +++ b/v2/api/keyvault/v1api20230701/arm/structure.txt @@ -0,0 +1,267 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20230701/arm +------------------------------------------------------------------------- +Vault_STATUS: Object (7 properties) +├── Id: *string +├── Location: *string +├── Name: *string +├── Properties: *Object (17 properties) +│ ├── AccessPolicies: Object (4 properties)[] +│ │ ├── ApplicationId: *string +│ │ ├── ObjectId: *string +│ │ ├── Permissions: *Object (4 properties) +│ │ │ ├── Certificates: Enum (17 values)[] +│ │ │ │ ├── "all" +│ │ │ │ ├── "backup" +│ │ │ │ ├── "create" +│ │ │ │ ├── "delete" +│ │ │ │ ├── "deleteissuers" +│ │ │ │ ├── "get" +│ │ │ │ ├── "getissuers" +│ │ │ │ ├── "import" +│ │ │ │ ├── "list" +│ │ │ │ ├── "listissuers" +│ │ │ │ ├── "managecontacts" +│ │ │ │ ├── "manageissuers" +│ │ │ │ ├── "purge" +│ │ │ │ ├── "recover" +│ │ │ │ ├── "restore" +│ │ │ │ ├── "setissuers" +│ │ │ │ └── "update" +│ │ │ ├── Keys: Enum (21 values)[] +│ │ │ │ ├── "all" +│ │ │ │ ├── "backup" +│ │ │ │ ├── "create" +│ │ │ │ ├── "decrypt" +│ │ │ │ ├── "delete" +│ │ │ │ ├── "encrypt" +│ │ │ │ ├── "get" +│ │ │ │ ├── "getrotationpolicy" +│ │ │ │ ├── "import" +│ │ │ │ ├── "list" +│ │ │ │ ├── "purge" +│ │ │ │ ├── "recover" +│ │ │ │ ├── "release" +│ │ │ │ ├── "restore" +│ │ │ │ ├── "rotate" +│ │ │ │ ├── "setrotationpolicy" +│ │ │ │ ├── "sign" +│ │ │ │ ├── "unwrapKey" +│ │ │ │ ├── "update" +│ │ │ │ ├── "verify" +│ │ │ │ └── "wrapKey" +│ │ │ ├── Secrets: Enum (9 values)[] +│ │ │ │ ├── "all" +│ │ │ │ ├── "backup" +│ │ │ │ ├── "delete" +│ │ │ │ ├── "get" +│ │ │ │ ├── "list" +│ │ │ │ ├── "purge" +│ │ │ │ ├── "recover" +│ │ │ │ ├── "restore" +│ │ │ │ └── "set" +│ │ │ └── Storage: Enum (15 values)[] +│ │ │ ├── "all" +│ │ │ ├── "backup" +│ │ │ ├── "delete" +│ │ │ ├── "deletesas" +│ │ │ ├── "get" +│ │ │ ├── "getsas" +│ │ │ ├── "list" +│ │ │ ├── "listsas" +│ │ │ ├── "purge" +│ │ │ ├── "recover" +│ │ │ ├── "regeneratekey" +│ │ │ ├── "restore" +│ │ │ ├── "set" +│ │ │ ├── "setsas" +│ │ │ └── "update" +│ │ └── TenantId: *string +│ ├── CreateMode: *Enum (4 values) +│ │ ├── "createOrRecover" +│ │ ├── "default" +│ │ ├── "purgeThenCreate" +│ │ └── "recover" +│ ├── EnablePurgeProtection: *bool +│ ├── EnableRbacAuthorization: *bool +│ ├── EnableSoftDelete: *bool +│ ├── EnabledForDeployment: *bool +│ ├── EnabledForDiskEncryption: *bool +│ ├── EnabledForTemplateDeployment: *bool +│ ├── HsmPoolResourceId: *string +│ ├── NetworkAcls: *Object (4 properties) +│ │ ├── Bypass: *Enum (2 values) +│ │ │ ├── "AzureServices" +│ │ │ └── "None" +│ │ ├── DefaultAction: *Enum (2 values) +│ │ │ ├── "Allow" +│ │ │ └── "Deny" +│ │ ├── IpRules: Object (1 property)[] +│ │ │ └── Value: *string +│ │ └── VirtualNetworkRules: Object (2 properties)[] +│ │ ├── Id: *string +│ │ └── IgnoreMissingVnetServiceEndpoint: *bool +│ ├── PrivateEndpointConnections: Object (3 properties)[] +│ │ ├── Etag: *string +│ │ ├── Id: *string +│ │ └── Properties: *Object (3 properties) +│ │ ├── PrivateEndpoint: *Object (1 property) +│ │ │ └── Id: *string +│ │ ├── PrivateLinkServiceConnectionState: *Object (3 properties) +│ │ │ ├── ActionsRequired: *Enum (1 value) +│ │ │ │ └── "None" +│ │ │ ├── Description: *string +│ │ │ └── Status: *Enum (4 values) +│ │ │ ├── "Approved" +│ │ │ ├── "Disconnected" +│ │ │ ├── "Pending" +│ │ │ └── "Rejected" +│ │ └── ProvisioningState: *Enum (6 values) +│ │ ├── "Creating" +│ │ ├── "Deleting" +│ │ ├── "Disconnected" +│ │ ├── "Failed" +│ │ ├── "Succeeded" +│ │ └── "Updating" +│ ├── ProvisioningState: *Enum (2 values) +│ │ ├── "RegisteringDns" +│ │ └── "Succeeded" +│ ├── PublicNetworkAccess: *string +│ ├── Sku: *Object (2 properties) +│ │ ├── Family: *Enum (1 value) +│ │ │ └── "A" +│ │ └── Name: *Enum (2 values) +│ │ ├── "premium" +│ │ └── "standard" +│ ├── SoftDeleteRetentionInDays: *int +│ ├── TenantId: *string +│ └── VaultUri: *string +├── SystemData: *Object (6 properties) +│ ├── CreatedAt: *string +│ ├── CreatedBy: *string +│ ├── CreatedByType: *Enum (4 values) +│ │ ├── "Application" +│ │ ├── "Key" +│ │ ├── "ManagedIdentity" +│ │ └── "User" +│ ├── LastModifiedAt: *string +│ ├── LastModifiedBy: *string +│ └── LastModifiedByType: *Enum (4 values) +│ ├── "Application" +│ ├── "Key" +│ ├── "ManagedIdentity" +│ └── "User" +├── Tags: map[string]string +└── Type: *string +Vault_Spec: Object (4 properties) +├── Location: *string +├── Name: string +├── Properties: *Object (15 properties) +│ ├── AccessPolicies: Object (4 properties)[] +│ │ ├── ApplicationId: *string +│ │ ├── ObjectId: *string +│ │ ├── Permissions: *Object (4 properties) +│ │ │ ├── Certificates: Enum (17 values)[] +│ │ │ │ ├── "all" +│ │ │ │ ├── "backup" +│ │ │ │ ├── "create" +│ │ │ │ ├── "delete" +│ │ │ │ ├── "deleteissuers" +│ │ │ │ ├── "get" +│ │ │ │ ├── "getissuers" +│ │ │ │ ├── "import" +│ │ │ │ ├── "list" +│ │ │ │ ├── "listissuers" +│ │ │ │ ├── "managecontacts" +│ │ │ │ ├── "manageissuers" +│ │ │ │ ├── "purge" +│ │ │ │ ├── "recover" +│ │ │ │ ├── "restore" +│ │ │ │ ├── "setissuers" +│ │ │ │ └── "update" +│ │ │ ├── Keys: Enum (21 values)[] +│ │ │ │ ├── "all" +│ │ │ │ ├── "backup" +│ │ │ │ ├── "create" +│ │ │ │ ├── "decrypt" +│ │ │ │ ├── "delete" +│ │ │ │ ├── "encrypt" +│ │ │ │ ├── "get" +│ │ │ │ ├── "getrotationpolicy" +│ │ │ │ ├── "import" +│ │ │ │ ├── "list" +│ │ │ │ ├── "purge" +│ │ │ │ ├── "recover" +│ │ │ │ ├── "release" +│ │ │ │ ├── "restore" +│ │ │ │ ├── "rotate" +│ │ │ │ ├── "setrotationpolicy" +│ │ │ │ ├── "sign" +│ │ │ │ ├── "unwrapKey" +│ │ │ │ ├── "update" +│ │ │ │ ├── "verify" +│ │ │ │ └── "wrapKey" +│ │ │ ├── Secrets: Enum (9 values)[] +│ │ │ │ ├── "all" +│ │ │ │ ├── "backup" +│ │ │ │ ├── "delete" +│ │ │ │ ├── "get" +│ │ │ │ ├── "list" +│ │ │ │ ├── "purge" +│ │ │ │ ├── "recover" +│ │ │ │ ├── "restore" +│ │ │ │ └── "set" +│ │ │ └── Storage: Enum (15 values)[] +│ │ │ ├── "all" +│ │ │ ├── "backup" +│ │ │ ├── "delete" +│ │ │ ├── "deletesas" +│ │ │ ├── "get" +│ │ │ ├── "getsas" +│ │ │ ├── "list" +│ │ │ ├── "listsas" +│ │ │ ├── "purge" +│ │ │ ├── "recover" +│ │ │ ├── "regeneratekey" +│ │ │ ├── "restore" +│ │ │ ├── "set" +│ │ │ ├── "setsas" +│ │ │ └── "update" +│ │ └── TenantId: *string +│ ├── CreateMode: *Enum (4 values) +│ │ ├── "createOrRecover" +│ │ ├── "default" +│ │ ├── "purgeThenCreate" +│ │ └── "recover" +│ ├── EnablePurgeProtection: *bool +│ ├── EnableRbacAuthorization: *bool +│ ├── EnableSoftDelete: *bool +│ ├── EnabledForDeployment: *bool +│ ├── EnabledForDiskEncryption: *bool +│ ├── EnabledForTemplateDeployment: *bool +│ ├── NetworkAcls: *Object (4 properties) +│ │ ├── Bypass: *Enum (2 values) +│ │ │ ├── "AzureServices" +│ │ │ └── "None" +│ │ ├── DefaultAction: *Enum (2 values) +│ │ │ ├── "Allow" +│ │ │ └── "Deny" +│ │ ├── IpRules: Object (1 property)[] +│ │ │ └── Value: *string +│ │ └── VirtualNetworkRules: Object (2 properties)[] +│ │ ├── Id: *string +│ │ └── IgnoreMissingVnetServiceEndpoint: *bool +│ ├── ProvisioningState: *Enum (2 values) +│ │ ├── "RegisteringDns" +│ │ └── "Succeeded" +│ ├── PublicNetworkAccess: *string +│ ├── Sku: *Object (2 properties) +│ │ ├── Family: *Enum (1 value) +│ │ │ └── "A" +│ │ └── Name: *Enum (2 values) +│ │ ├── "premium" +│ │ └── "standard" +│ ├── SoftDeleteRetentionInDays: *int +│ ├── TenantId: *string +│ └── VaultUri: *string +└── Tags: map[string]string diff --git a/v2/api/keyvault/v1api20230701/arm/vault_spec_types_gen.go b/v2/api/keyvault/v1api20230701/arm/vault_spec_types_gen.go new file mode 100644 index 00000000000..adeedde0aef --- /dev/null +++ b/v2/api/keyvault/v1api20230701/arm/vault_spec_types_gen.go @@ -0,0 +1,422 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type Vault_Spec struct { + // Location: The supported Azure location where the key vault should be created. + Location *string `json:"location,omitempty"` + Name string `json:"name,omitempty"` + + // Properties: Properties of the vault + Properties *VaultProperties `json:"properties,omitempty"` + + // Tags: The tags that will be assigned to the key vault. + Tags map[string]string `json:"tags,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &Vault_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-07-01" +func (vault Vault_Spec) GetAPIVersion() string { + return "2023-07-01" +} + +// GetName returns the Name of the resource +func (vault *Vault_Spec) GetName() string { + return vault.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.KeyVault/vaults" +func (vault *Vault_Spec) GetType() string { + return "Microsoft.KeyVault/vaults" +} + +// Properties of the vault +type VaultProperties struct { + // AccessPolicies: An array of 0 to 1024 identities 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. When `createMode` is set to `recover`, access policies are not + // required. Otherwise, access policies are required. + AccessPolicies []AccessPolicyEntry `json:"accessPolicies,omitempty"` + + // CreateMode: The vault's create mode to indicate whether the vault need to be recovered or not. + CreateMode *VaultProperties_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"` + + // EnableRbacAuthorization: Property that controls how data actions are authorized. When true, the key vault will use Role + // Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties + // will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy + // stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value + // of false. Note that management actions are always authorized with RBAC. + EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"` + + // EnableSoftDelete: Property to specify whether the 'soft delete' functionality is enabled for this key vault. If it's not + // set to any value(true or false) when creating new key vault, it will be set to true by default. Once set to true, it + // cannot be reverted to false. + EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` + + // EnabledForDeployment: Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored + // as secrets from the key vault. + EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` + + // EnabledForDiskEncryption: Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the + // vault and unwrap keys. + 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"` + + // NetworkAcls: Rules governing the accessibility of the key vault from specific network locations. + NetworkAcls *NetworkRuleSet `json:"networkAcls,omitempty"` + + // ProvisioningState: Provisioning state of the vault. + ProvisioningState *VaultProperties_ProvisioningState `json:"provisioningState,omitempty"` + + // PublicNetworkAccess: Property to specify whether the vault will accept traffic from public internet. If set to + // 'disabled' all traffic except private endpoint traffic and that that originates from trusted services will be blocked. + // This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor the + // rules. + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + + // Sku: SKU details + Sku *Sku `json:"sku,omitempty"` + + // SoftDeleteRetentionInDays: softDelete data retention days. It accepts >=7 and <=90. + SoftDeleteRetentionInDays *int `json:"softDeleteRetentionInDays,omitempty"` + + // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. + TenantId *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"` + + // VaultUri: The URI of the vault for performing operations on keys and secrets. + VaultUri *string `json:"vaultUri,omitempty"` +} + +// 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 { + // ApplicationId: Application ID of the client making request on behalf of a principal + ApplicationId *string `json:"applicationId,omitempty" optionalConfigMapPair:"ApplicationId"` + + // ObjectId: The object ID of a user, service principal or security group in the Azure Active Directory tenant for the + // vault. The object ID must be unique for the list of access policies. + ObjectId *string `json:"objectId,omitempty" optionalConfigMapPair:"ObjectId"` + + // Permissions: Permissions the identity has for keys, secrets and certificates. + Permissions *Permissions `json:"permissions,omitempty"` + + // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. + TenantId *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"` +} + +// A set of rules governing the network accessibility of a vault. +type NetworkRuleSet struct { + // Bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the + // default is 'AzureServices'. + Bypass *NetworkRuleSet_Bypass `json:"bypass,omitempty"` + + // DefaultAction: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after + // the bypass property has been evaluated. + DefaultAction *NetworkRuleSet_DefaultAction `json:"defaultAction,omitempty"` + + // IpRules: The list of IP address rules. + IpRules []IPRule `json:"ipRules,omitempty"` + + // VirtualNetworkRules: The list of virtual network rules. + VirtualNetworkRules []VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` +} + +// SKU details +type Sku struct { + // Family: SKU family name + Family *Sku_Family `json:"family,omitempty"` + + // Name: SKU name to specify whether the key vault is a standard vault or a premium vault. + Name *Sku_Name `json:"name,omitempty"` +} + +// +kubebuilder:validation:Enum={"createOrRecover","default","purgeThenCreate","recover"} +type VaultProperties_CreateMode string + +const ( + VaultProperties_CreateMode_CreateOrRecover = VaultProperties_CreateMode("createOrRecover") + VaultProperties_CreateMode_Default = VaultProperties_CreateMode("default") + VaultProperties_CreateMode_PurgeThenCreate = VaultProperties_CreateMode("purgeThenCreate") + VaultProperties_CreateMode_Recover = VaultProperties_CreateMode("recover") +) + +// Mapping from string to VaultProperties_CreateMode +var vaultProperties_CreateMode_Values = map[string]VaultProperties_CreateMode{ + "createorrecover": VaultProperties_CreateMode_CreateOrRecover, + "default": VaultProperties_CreateMode_Default, + "purgethencreate": VaultProperties_CreateMode_PurgeThenCreate, + "recover": VaultProperties_CreateMode_Recover, +} + +// +kubebuilder:validation:Enum={"RegisteringDns","Succeeded"} +type VaultProperties_ProvisioningState string + +const ( + VaultProperties_ProvisioningState_RegisteringDns = VaultProperties_ProvisioningState("RegisteringDns") + VaultProperties_ProvisioningState_Succeeded = VaultProperties_ProvisioningState("Succeeded") +) + +// Mapping from string to VaultProperties_ProvisioningState +var vaultProperties_ProvisioningState_Values = map[string]VaultProperties_ProvisioningState{ + "registeringdns": VaultProperties_ProvisioningState_RegisteringDns, + "succeeded": VaultProperties_ProvisioningState_Succeeded, +} + +// A rule governing the accessibility of a vault from a specific ip address or ip range. +type IPRule struct { + // Value: 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). + Value *string `json:"value,omitempty"` +} + +// +kubebuilder:validation:Enum={"AzureServices","None"} +type NetworkRuleSet_Bypass string + +const ( + NetworkRuleSet_Bypass_AzureServices = NetworkRuleSet_Bypass("AzureServices") + NetworkRuleSet_Bypass_None = NetworkRuleSet_Bypass("None") +) + +// Mapping from string to NetworkRuleSet_Bypass +var networkRuleSet_Bypass_Values = map[string]NetworkRuleSet_Bypass{ + "azureservices": NetworkRuleSet_Bypass_AzureServices, + "none": NetworkRuleSet_Bypass_None, +} + +// +kubebuilder:validation:Enum={"Allow","Deny"} +type NetworkRuleSet_DefaultAction string + +const ( + NetworkRuleSet_DefaultAction_Allow = NetworkRuleSet_DefaultAction("Allow") + NetworkRuleSet_DefaultAction_Deny = NetworkRuleSet_DefaultAction("Deny") +) + +// Mapping from string to NetworkRuleSet_DefaultAction +var networkRuleSet_DefaultAction_Values = map[string]NetworkRuleSet_DefaultAction{ + "allow": NetworkRuleSet_DefaultAction_Allow, + "deny": NetworkRuleSet_DefaultAction_Deny, +} + +// Permissions the identity has for keys, secrets, certificates and storage. +type Permissions struct { + // Certificates: Permissions to certificates + Certificates []Permissions_Certificates `json:"certificates,omitempty"` + + // Keys: Permissions to keys + Keys []Permissions_Keys `json:"keys,omitempty"` + + // Secrets: Permissions to secrets + Secrets []Permissions_Secrets `json:"secrets,omitempty"` + + // Storage: Permissions to storage accounts + Storage []Permissions_Storage `json:"storage,omitempty"` +} + +// +kubebuilder:validation:Enum={"A"} +type Sku_Family string + +const Sku_Family_A = Sku_Family("A") + +// Mapping from string to Sku_Family +var sku_Family_Values = map[string]Sku_Family{ + "a": Sku_Family_A, +} + +// +kubebuilder:validation:Enum={"premium","standard"} +type Sku_Name string + +const ( + Sku_Name_Premium = Sku_Name("premium") + Sku_Name_Standard = Sku_Name("standard") +) + +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "premium": Sku_Name_Premium, + "standard": Sku_Name_Standard, +} + +// A rule governing the accessibility of a vault from a specific virtual network. +type VirtualNetworkRule struct { + Id *string `json:"id,omitempty"` + + // IgnoreMissingVnetServiceEndpoint: Property to specify whether NRP will ignore the check if parent subnet has + // serviceEndpoints configured. + IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` +} + +// +kubebuilder:validation:Enum={"all","backup","create","delete","deleteissuers","get","getissuers","import","list","listissuers","managecontacts","manageissuers","purge","recover","restore","setissuers","update"} +type Permissions_Certificates string + +const ( + Permissions_Certificates_All = Permissions_Certificates("all") + Permissions_Certificates_Backup = Permissions_Certificates("backup") + Permissions_Certificates_Create = Permissions_Certificates("create") + Permissions_Certificates_Delete = Permissions_Certificates("delete") + Permissions_Certificates_Deleteissuers = Permissions_Certificates("deleteissuers") + Permissions_Certificates_Get = Permissions_Certificates("get") + Permissions_Certificates_Getissuers = Permissions_Certificates("getissuers") + Permissions_Certificates_Import = Permissions_Certificates("import") + Permissions_Certificates_List = Permissions_Certificates("list") + Permissions_Certificates_Listissuers = Permissions_Certificates("listissuers") + Permissions_Certificates_Managecontacts = Permissions_Certificates("managecontacts") + Permissions_Certificates_Manageissuers = Permissions_Certificates("manageissuers") + Permissions_Certificates_Purge = Permissions_Certificates("purge") + Permissions_Certificates_Recover = Permissions_Certificates("recover") + Permissions_Certificates_Restore = Permissions_Certificates("restore") + Permissions_Certificates_Setissuers = Permissions_Certificates("setissuers") + Permissions_Certificates_Update = Permissions_Certificates("update") +) + +// Mapping from string to Permissions_Certificates +var permissions_Certificates_Values = map[string]Permissions_Certificates{ + "all": Permissions_Certificates_All, + "backup": Permissions_Certificates_Backup, + "create": Permissions_Certificates_Create, + "delete": Permissions_Certificates_Delete, + "deleteissuers": Permissions_Certificates_Deleteissuers, + "get": Permissions_Certificates_Get, + "getissuers": Permissions_Certificates_Getissuers, + "import": Permissions_Certificates_Import, + "list": Permissions_Certificates_List, + "listissuers": Permissions_Certificates_Listissuers, + "managecontacts": Permissions_Certificates_Managecontacts, + "manageissuers": Permissions_Certificates_Manageissuers, + "purge": Permissions_Certificates_Purge, + "recover": Permissions_Certificates_Recover, + "restore": Permissions_Certificates_Restore, + "setissuers": Permissions_Certificates_Setissuers, + "update": Permissions_Certificates_Update, +} + +// +kubebuilder:validation:Enum={"all","backup","create","decrypt","delete","encrypt","get","getrotationpolicy","import","list","purge","recover","release","restore","rotate","setrotationpolicy","sign","unwrapKey","update","verify","wrapKey"} +type Permissions_Keys string + +const ( + Permissions_Keys_All = Permissions_Keys("all") + Permissions_Keys_Backup = Permissions_Keys("backup") + Permissions_Keys_Create = Permissions_Keys("create") + Permissions_Keys_Decrypt = Permissions_Keys("decrypt") + Permissions_Keys_Delete = Permissions_Keys("delete") + Permissions_Keys_Encrypt = Permissions_Keys("encrypt") + Permissions_Keys_Get = Permissions_Keys("get") + Permissions_Keys_Getrotationpolicy = Permissions_Keys("getrotationpolicy") + Permissions_Keys_Import = Permissions_Keys("import") + Permissions_Keys_List = Permissions_Keys("list") + Permissions_Keys_Purge = Permissions_Keys("purge") + Permissions_Keys_Recover = Permissions_Keys("recover") + Permissions_Keys_Release = Permissions_Keys("release") + Permissions_Keys_Restore = Permissions_Keys("restore") + Permissions_Keys_Rotate = Permissions_Keys("rotate") + Permissions_Keys_Setrotationpolicy = Permissions_Keys("setrotationpolicy") + Permissions_Keys_Sign = Permissions_Keys("sign") + Permissions_Keys_UnwrapKey = Permissions_Keys("unwrapKey") + Permissions_Keys_Update = Permissions_Keys("update") + Permissions_Keys_Verify = Permissions_Keys("verify") + Permissions_Keys_WrapKey = Permissions_Keys("wrapKey") +) + +// Mapping from string to Permissions_Keys +var permissions_Keys_Values = map[string]Permissions_Keys{ + "all": Permissions_Keys_All, + "backup": Permissions_Keys_Backup, + "create": Permissions_Keys_Create, + "decrypt": Permissions_Keys_Decrypt, + "delete": Permissions_Keys_Delete, + "encrypt": Permissions_Keys_Encrypt, + "get": Permissions_Keys_Get, + "getrotationpolicy": Permissions_Keys_Getrotationpolicy, + "import": Permissions_Keys_Import, + "list": Permissions_Keys_List, + "purge": Permissions_Keys_Purge, + "recover": Permissions_Keys_Recover, + "release": Permissions_Keys_Release, + "restore": Permissions_Keys_Restore, + "rotate": Permissions_Keys_Rotate, + "setrotationpolicy": Permissions_Keys_Setrotationpolicy, + "sign": Permissions_Keys_Sign, + "unwrapkey": Permissions_Keys_UnwrapKey, + "update": Permissions_Keys_Update, + "verify": Permissions_Keys_Verify, + "wrapkey": Permissions_Keys_WrapKey, +} + +// +kubebuilder:validation:Enum={"all","backup","delete","get","list","purge","recover","restore","set"} +type Permissions_Secrets string + +const ( + Permissions_Secrets_All = Permissions_Secrets("all") + Permissions_Secrets_Backup = Permissions_Secrets("backup") + Permissions_Secrets_Delete = Permissions_Secrets("delete") + Permissions_Secrets_Get = Permissions_Secrets("get") + Permissions_Secrets_List = Permissions_Secrets("list") + Permissions_Secrets_Purge = Permissions_Secrets("purge") + Permissions_Secrets_Recover = Permissions_Secrets("recover") + Permissions_Secrets_Restore = Permissions_Secrets("restore") + Permissions_Secrets_Set = Permissions_Secrets("set") +) + +// Mapping from string to Permissions_Secrets +var permissions_Secrets_Values = map[string]Permissions_Secrets{ + "all": Permissions_Secrets_All, + "backup": Permissions_Secrets_Backup, + "delete": Permissions_Secrets_Delete, + "get": Permissions_Secrets_Get, + "list": Permissions_Secrets_List, + "purge": Permissions_Secrets_Purge, + "recover": Permissions_Secrets_Recover, + "restore": Permissions_Secrets_Restore, + "set": Permissions_Secrets_Set, +} + +// +kubebuilder:validation:Enum={"all","backup","delete","deletesas","get","getsas","list","listsas","purge","recover","regeneratekey","restore","set","setsas","update"} +type Permissions_Storage string + +const ( + Permissions_Storage_All = Permissions_Storage("all") + Permissions_Storage_Backup = Permissions_Storage("backup") + Permissions_Storage_Delete = Permissions_Storage("delete") + Permissions_Storage_Deletesas = Permissions_Storage("deletesas") + Permissions_Storage_Get = Permissions_Storage("get") + Permissions_Storage_Getsas = Permissions_Storage("getsas") + Permissions_Storage_List = Permissions_Storage("list") + Permissions_Storage_Listsas = Permissions_Storage("listsas") + Permissions_Storage_Purge = Permissions_Storage("purge") + Permissions_Storage_Recover = Permissions_Storage("recover") + Permissions_Storage_Regeneratekey = Permissions_Storage("regeneratekey") + Permissions_Storage_Restore = Permissions_Storage("restore") + Permissions_Storage_Set = Permissions_Storage("set") + Permissions_Storage_Setsas = Permissions_Storage("setsas") + Permissions_Storage_Update = Permissions_Storage("update") +) + +// Mapping from string to Permissions_Storage +var permissions_Storage_Values = map[string]Permissions_Storage{ + "all": Permissions_Storage_All, + "backup": Permissions_Storage_Backup, + "delete": Permissions_Storage_Delete, + "deletesas": Permissions_Storage_Deletesas, + "get": Permissions_Storage_Get, + "getsas": Permissions_Storage_Getsas, + "list": Permissions_Storage_List, + "listsas": Permissions_Storage_Listsas, + "purge": Permissions_Storage_Purge, + "recover": Permissions_Storage_Recover, + "regeneratekey": Permissions_Storage_Regeneratekey, + "restore": Permissions_Storage_Restore, + "set": Permissions_Storage_Set, + "setsas": Permissions_Storage_Setsas, + "update": Permissions_Storage_Update, +} diff --git a/v2/api/keyvault/v1api20230701/arm/vault_spec_types_gen_test.go b/v2/api/keyvault/v1api20230701/arm/vault_spec_types_gen_test.go new file mode 100644 index 00000000000..8afe113c783 --- /dev/null +++ b/v2/api/keyvault/v1api20230701/arm/vault_spec_types_gen_test.go @@ -0,0 +1,646 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_AccessPolicyEntry_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccessPolicyEntry via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccessPolicyEntry, AccessPolicyEntryGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccessPolicyEntry runs a test to see if a specific instance of AccessPolicyEntry round trips to JSON and back losslessly +func RunJSONSerializationTestForAccessPolicyEntry(subject AccessPolicyEntry) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccessPolicyEntry + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccessPolicyEntry instances for property testing - lazily instantiated by AccessPolicyEntryGenerator() +var accessPolicyEntryGenerator gopter.Gen + +// AccessPolicyEntryGenerator returns a generator of AccessPolicyEntry instances for property testing. +// We first initialize accessPolicyEntryGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func AccessPolicyEntryGenerator() gopter.Gen { + if accessPolicyEntryGenerator != nil { + return accessPolicyEntryGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicyEntry(generators) + accessPolicyEntryGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicyEntry(generators) + AddRelatedPropertyGeneratorsForAccessPolicyEntry(generators) + accessPolicyEntryGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry{}), generators) + + return accessPolicyEntryGenerator +} + +// AddIndependentPropertyGeneratorsForAccessPolicyEntry is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccessPolicyEntry(gens map[string]gopter.Gen) { + gens["ApplicationId"] = gen.PtrOf(gen.AlphaString()) + gens["ObjectId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForAccessPolicyEntry is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForAccessPolicyEntry(gens map[string]gopter.Gen) { + gens["Permissions"] = gen.PtrOf(PermissionsGenerator()) +} + +func Test_IPRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of IPRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIPRule, IPRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIPRule runs a test to see if a specific instance of IPRule round trips to JSON and back losslessly +func RunJSONSerializationTestForIPRule(subject IPRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual IPRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of IPRule instances for property testing - lazily instantiated by IPRuleGenerator() +var ipRuleGenerator gopter.Gen + +// IPRuleGenerator returns a generator of IPRule instances for property testing. +func IPRuleGenerator() gopter.Gen { + if ipRuleGenerator != nil { + return ipRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIPRule(generators) + ipRuleGenerator = gen.Struct(reflect.TypeOf(IPRule{}), generators) + + return ipRuleGenerator +} + +// AddIndependentPropertyGeneratorsForIPRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIPRule(gens map[string]gopter.Gen) { + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_NetworkRuleSet_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of NetworkRuleSet via JSON returns original", + prop.ForAll(RunJSONSerializationTestForNetworkRuleSet, NetworkRuleSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForNetworkRuleSet runs a test to see if a specific instance of NetworkRuleSet round trips to JSON and back losslessly +func RunJSONSerializationTestForNetworkRuleSet(subject NetworkRuleSet) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual NetworkRuleSet + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of NetworkRuleSet instances for property testing - lazily instantiated by NetworkRuleSetGenerator() +var networkRuleSetGenerator gopter.Gen + +// NetworkRuleSetGenerator returns a generator of NetworkRuleSet instances for property testing. +// We first initialize networkRuleSetGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func NetworkRuleSetGenerator() gopter.Gen { + if networkRuleSetGenerator != nil { + return networkRuleSetGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet(generators) + networkRuleSetGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet(generators) + AddRelatedPropertyGeneratorsForNetworkRuleSet(generators) + networkRuleSetGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet{}), generators) + + return networkRuleSetGenerator +} + +// AddIndependentPropertyGeneratorsForNetworkRuleSet is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForNetworkRuleSet(gens map[string]gopter.Gen) { + gens["Bypass"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_Bypass_AzureServices, NetworkRuleSet_Bypass_None)) + gens["DefaultAction"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_DefaultAction_Allow, NetworkRuleSet_DefaultAction_Deny)) +} + +// AddRelatedPropertyGeneratorsForNetworkRuleSet is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForNetworkRuleSet(gens map[string]gopter.Gen) { + gens["IpRules"] = gen.SliceOf(IPRuleGenerator()) + gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRuleGenerator()) +} + +func Test_Permissions_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Permissions via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPermissions, PermissionsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPermissions runs a test to see if a specific instance of Permissions round trips to JSON and back losslessly +func RunJSONSerializationTestForPermissions(subject Permissions) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Permissions + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Permissions instances for property testing - lazily instantiated by PermissionsGenerator() +var permissionsGenerator gopter.Gen + +// PermissionsGenerator returns a generator of Permissions instances for property testing. +func PermissionsGenerator() gopter.Gen { + if permissionsGenerator != nil { + return permissionsGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPermissions(generators) + permissionsGenerator = gen.Struct(reflect.TypeOf(Permissions{}), generators) + + return permissionsGenerator +} + +// AddIndependentPropertyGeneratorsForPermissions is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPermissions(gens map[string]gopter.Gen) { + gens["Certificates"] = gen.SliceOf(gen.OneConstOf( + Permissions_Certificates_All, + Permissions_Certificates_Backup, + Permissions_Certificates_Create, + Permissions_Certificates_Delete, + Permissions_Certificates_Deleteissuers, + Permissions_Certificates_Get, + Permissions_Certificates_Getissuers, + Permissions_Certificates_Import, + Permissions_Certificates_List, + Permissions_Certificates_Listissuers, + Permissions_Certificates_Managecontacts, + Permissions_Certificates_Manageissuers, + Permissions_Certificates_Purge, + Permissions_Certificates_Recover, + Permissions_Certificates_Restore, + Permissions_Certificates_Setissuers, + Permissions_Certificates_Update)) + gens["Keys"] = gen.SliceOf(gen.OneConstOf( + Permissions_Keys_All, + Permissions_Keys_Backup, + Permissions_Keys_Create, + Permissions_Keys_Decrypt, + Permissions_Keys_Delete, + Permissions_Keys_Encrypt, + Permissions_Keys_Get, + Permissions_Keys_Getrotationpolicy, + Permissions_Keys_Import, + Permissions_Keys_List, + Permissions_Keys_Purge, + Permissions_Keys_Recover, + Permissions_Keys_Release, + Permissions_Keys_Restore, + Permissions_Keys_Rotate, + Permissions_Keys_Setrotationpolicy, + Permissions_Keys_Sign, + Permissions_Keys_UnwrapKey, + Permissions_Keys_Update, + Permissions_Keys_Verify, + Permissions_Keys_WrapKey)) + gens["Secrets"] = gen.SliceOf(gen.OneConstOf( + Permissions_Secrets_All, + Permissions_Secrets_Backup, + Permissions_Secrets_Delete, + Permissions_Secrets_Get, + Permissions_Secrets_List, + Permissions_Secrets_Purge, + Permissions_Secrets_Recover, + Permissions_Secrets_Restore, + Permissions_Secrets_Set)) + gens["Storage"] = gen.SliceOf(gen.OneConstOf( + Permissions_Storage_All, + Permissions_Storage_Backup, + Permissions_Storage_Delete, + Permissions_Storage_Deletesas, + Permissions_Storage_Get, + Permissions_Storage_Getsas, + Permissions_Storage_List, + Permissions_Storage_Listsas, + Permissions_Storage_Purge, + Permissions_Storage_Recover, + Permissions_Storage_Regeneratekey, + Permissions_Storage_Restore, + Permissions_Storage_Set, + Permissions_Storage_Setsas, + Permissions_Storage_Update)) +} + +func Test_Sku_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Sku via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSku, SkuGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSku runs a test to see if a specific instance of Sku round trips to JSON and back losslessly +func RunJSONSerializationTestForSku(subject Sku) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Sku + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Sku instances for property testing - lazily instantiated by SkuGenerator() +var skuGenerator gopter.Gen + +// SkuGenerator returns a generator of Sku instances for property testing. +func SkuGenerator() gopter.Gen { + if skuGenerator != nil { + return skuGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSku(generators) + skuGenerator = gen.Struct(reflect.TypeOf(Sku{}), generators) + + return skuGenerator +} + +// AddIndependentPropertyGeneratorsForSku is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSku(gens map[string]gopter.Gen) { + gens["Family"] = gen.PtrOf(gen.OneConstOf(Sku_Family_A)) + gens["Name"] = gen.PtrOf(gen.OneConstOf(Sku_Name_Premium, Sku_Name_Standard)) +} + +func Test_VaultProperties_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VaultProperties via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVaultProperties, VaultPropertiesGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVaultProperties runs a test to see if a specific instance of VaultProperties round trips to JSON and back losslessly +func RunJSONSerializationTestForVaultProperties(subject VaultProperties) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VaultProperties + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VaultProperties instances for property testing - lazily instantiated by VaultPropertiesGenerator() +var vaultPropertiesGenerator gopter.Gen + +// VaultPropertiesGenerator returns a generator of VaultProperties instances for property testing. +// We first initialize vaultPropertiesGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func VaultPropertiesGenerator() gopter.Gen { + if vaultPropertiesGenerator != nil { + return vaultPropertiesGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVaultProperties(generators) + vaultPropertiesGenerator = gen.Struct(reflect.TypeOf(VaultProperties{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVaultProperties(generators) + AddRelatedPropertyGeneratorsForVaultProperties(generators) + vaultPropertiesGenerator = gen.Struct(reflect.TypeOf(VaultProperties{}), generators) + + return vaultPropertiesGenerator +} + +// AddIndependentPropertyGeneratorsForVaultProperties is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVaultProperties(gens map[string]gopter.Gen) { + gens["CreateMode"] = gen.PtrOf(gen.OneConstOf( + VaultProperties_CreateMode_CreateOrRecover, + VaultProperties_CreateMode_Default, + VaultProperties_CreateMode_PurgeThenCreate, + VaultProperties_CreateMode_Recover)) + gens["EnablePurgeProtection"] = gen.PtrOf(gen.Bool()) + gens["EnableRbacAuthorization"] = gen.PtrOf(gen.Bool()) + gens["EnableSoftDelete"] = gen.PtrOf(gen.Bool()) + gens["EnabledForDeployment"] = gen.PtrOf(gen.Bool()) + gens["EnabledForDiskEncryption"] = gen.PtrOf(gen.Bool()) + gens["EnabledForTemplateDeployment"] = gen.PtrOf(gen.Bool()) + gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(VaultProperties_ProvisioningState_RegisteringDns, VaultProperties_ProvisioningState_Succeeded)) + gens["PublicNetworkAccess"] = gen.PtrOf(gen.AlphaString()) + gens["SoftDeleteRetentionInDays"] = gen.PtrOf(gen.Int()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["VaultUri"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForVaultProperties is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForVaultProperties(gens map[string]gopter.Gen) { + gens["AccessPolicies"] = gen.SliceOf(AccessPolicyEntryGenerator()) + gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSetGenerator()) + gens["Sku"] = gen.PtrOf(SkuGenerator()) +} + +func Test_Vault_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Vault_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVault_Spec, Vault_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVault_Spec runs a test to see if a specific instance of Vault_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForVault_Spec(subject Vault_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Vault_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Vault_Spec instances for property testing - lazily instantiated by Vault_SpecGenerator() +var vault_SpecGenerator gopter.Gen + +// Vault_SpecGenerator returns a generator of Vault_Spec instances for property testing. +// We first initialize vault_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Vault_SpecGenerator() gopter.Gen { + if vault_SpecGenerator != nil { + return vault_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVault_Spec(generators) + vault_SpecGenerator = gen.Struct(reflect.TypeOf(Vault_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVault_Spec(generators) + AddRelatedPropertyGeneratorsForVault_Spec(generators) + vault_SpecGenerator = gen.Struct(reflect.TypeOf(Vault_Spec{}), generators) + + return vault_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForVault_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVault_Spec(gens map[string]gopter.Gen) { + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.AlphaString() + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForVault_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForVault_Spec(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(VaultPropertiesGenerator()) +} + +func Test_VirtualNetworkRule_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VirtualNetworkRule via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule, VirtualNetworkRuleGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVirtualNetworkRule runs a test to see if a specific instance of VirtualNetworkRule round trips to JSON and back losslessly +func RunJSONSerializationTestForVirtualNetworkRule(subject VirtualNetworkRule) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VirtualNetworkRule + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VirtualNetworkRule instances for property testing - lazily instantiated by VirtualNetworkRuleGenerator() +var virtualNetworkRuleGenerator gopter.Gen + +// VirtualNetworkRuleGenerator returns a generator of VirtualNetworkRule instances for property testing. +func VirtualNetworkRuleGenerator() gopter.Gen { + if virtualNetworkRuleGenerator != nil { + return virtualNetworkRuleGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVirtualNetworkRule(generators) + virtualNetworkRuleGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule{}), generators) + + return virtualNetworkRuleGenerator +} + +// AddIndependentPropertyGeneratorsForVirtualNetworkRule is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVirtualNetworkRule(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["IgnoreMissingVnetServiceEndpoint"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/keyvault/v1api20230701/arm/vault_status_types_gen.go b/v2/api/keyvault/v1api20230701/arm/vault_status_types_gen.go new file mode 100644 index 00000000000..9f52883c32b --- /dev/null +++ b/v2/api/keyvault/v1api20230701/arm/vault_status_types_gen.go @@ -0,0 +1,543 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +// Resource information with extended details. +type Vault_STATUS struct { + // Id: Fully qualified identifier of the key vault resource. + Id *string `json:"id,omitempty"` + + // Location: Azure location of the key vault resource. + Location *string `json:"location,omitempty"` + + // Name: Name of the key vault resource. + Name *string `json:"name,omitempty"` + + // Properties: Properties of the vault + Properties *VaultProperties_STATUS `json:"properties,omitempty"` + + // SystemData: System metadata for the key vault. + SystemData *SystemData_STATUS `json:"systemData,omitempty"` + + // Tags: Tags assigned to the key vault resource. + Tags map[string]string `json:"tags,omitempty"` + + // Type: Resource type of the key vault resource. + Type *string `json:"type,omitempty"` +} + +// Metadata pertaining to creation and last modification of the key vault resource. +type SystemData_STATUS struct { + // CreatedAt: The timestamp of the key vault resource creation (UTC). + CreatedAt *string `json:"createdAt,omitempty"` + + // CreatedBy: The identity that created the key vault resource. + CreatedBy *string `json:"createdBy,omitempty"` + + // CreatedByType: The type of identity that created the key vault resource. + CreatedByType *IdentityType_STATUS `json:"createdByType,omitempty"` + + // LastModifiedAt: The timestamp of the key vault resource last modification (UTC). + LastModifiedAt *string `json:"lastModifiedAt,omitempty"` + + // LastModifiedBy: The identity that last modified the key vault resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + + // LastModifiedByType: The type of identity that last modified the key vault resource. + LastModifiedByType *IdentityType_STATUS `json:"lastModifiedByType,omitempty"` +} + +// Properties of the vault +type VaultProperties_STATUS struct { + // AccessPolicies: An array of 0 to 1024 identities 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. When `createMode` is set to `recover`, access policies are not + // required. Otherwise, access policies are required. + AccessPolicies []AccessPolicyEntry_STATUS `json:"accessPolicies,omitempty"` + + // CreateMode: The vault's create mode to indicate whether the vault need to be recovered or not. + CreateMode *VaultProperties_CreateMode_STATUS `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"` + + // EnableRbacAuthorization: Property that controls how data actions are authorized. When true, the key vault will use Role + // Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties + // will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy + // stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value + // of false. Note that management actions are always authorized with RBAC. + EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"` + + // EnableSoftDelete: Property to specify whether the 'soft delete' functionality is enabled for this key vault. If it's not + // set to any value(true or false) when creating new key vault, it will be set to true by default. Once set to true, it + // cannot be reverted to false. + EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` + + // EnabledForDeployment: Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored + // as secrets from the key vault. + EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` + + // EnabledForDiskEncryption: Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the + // vault and unwrap keys. + 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"` + + // HsmPoolResourceId: The resource id of HSM Pool. + HsmPoolResourceId *string `json:"hsmPoolResourceId,omitempty"` + + // NetworkAcls: Rules governing the accessibility of the key vault from specific network locations. + NetworkAcls *NetworkRuleSet_STATUS `json:"networkAcls,omitempty"` + + // PrivateEndpointConnections: List of private endpoint connections associated with the key vault. + PrivateEndpointConnections []PrivateEndpointConnectionItem_STATUS `json:"privateEndpointConnections,omitempty"` + + // ProvisioningState: Provisioning state of the vault. + ProvisioningState *VaultProperties_ProvisioningState_STATUS `json:"provisioningState,omitempty"` + + // PublicNetworkAccess: Property to specify whether the vault will accept traffic from public internet. If set to + // 'disabled' all traffic except private endpoint traffic and that that originates from trusted services will be blocked. + // This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor the + // rules. + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + + // Sku: SKU details + Sku *Sku_STATUS `json:"sku,omitempty"` + + // SoftDeleteRetentionInDays: softDelete data retention days. It accepts >=7 and <=90. + SoftDeleteRetentionInDays *int `json:"softDeleteRetentionInDays,omitempty"` + + // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. + TenantId *string `json:"tenantId,omitempty"` + + // VaultUri: The URI of the vault for performing operations on keys and secrets. + VaultUri *string `json:"vaultUri,omitempty"` +} + +// 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_STATUS struct { + // ApplicationId: Application ID of the client making request on behalf of a principal + ApplicationId *string `json:"applicationId,omitempty"` + + // ObjectId: The object ID of a user, service principal or security group in the Azure Active Directory tenant for the + // vault. The object ID must be unique for the list of access policies. + ObjectId *string `json:"objectId,omitempty"` + + // Permissions: Permissions the identity has for keys, secrets and certificates. + Permissions *Permissions_STATUS `json:"permissions,omitempty"` + + // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. + TenantId *string `json:"tenantId,omitempty"` +} + +// The type of identity. +type IdentityType_STATUS string + +const ( + IdentityType_STATUS_Application = IdentityType_STATUS("Application") + IdentityType_STATUS_Key = IdentityType_STATUS("Key") + IdentityType_STATUS_ManagedIdentity = IdentityType_STATUS("ManagedIdentity") + IdentityType_STATUS_User = IdentityType_STATUS("User") +) + +// Mapping from string to IdentityType_STATUS +var identityType_STATUS_Values = map[string]IdentityType_STATUS{ + "application": IdentityType_STATUS_Application, + "key": IdentityType_STATUS_Key, + "managedidentity": IdentityType_STATUS_ManagedIdentity, + "user": IdentityType_STATUS_User, +} + +// A set of rules governing the network accessibility of a vault. +type NetworkRuleSet_STATUS struct { + // Bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the + // default is 'AzureServices'. + Bypass *NetworkRuleSet_Bypass_STATUS `json:"bypass,omitempty"` + + // DefaultAction: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after + // the bypass property has been evaluated. + DefaultAction *NetworkRuleSet_DefaultAction_STATUS `json:"defaultAction,omitempty"` + + // IpRules: The list of IP address rules. + IpRules []IPRule_STATUS `json:"ipRules,omitempty"` + + // VirtualNetworkRules: The list of virtual network rules. + VirtualNetworkRules []VirtualNetworkRule_STATUS `json:"virtualNetworkRules,omitempty"` +} + +// Private endpoint connection item. +type PrivateEndpointConnectionItem_STATUS struct { + // Etag: Modified whenever there is a change in the state of private endpoint connection. + Etag *string `json:"etag,omitempty"` + + // Id: Id of private endpoint connection. + Id *string `json:"id,omitempty"` + + // Properties: Private endpoint connection properties. + Properties *PrivateEndpointConnectionProperties_STATUS `json:"properties,omitempty"` +} + +// SKU details +type Sku_STATUS struct { + // Family: SKU family name + Family *Sku_Family_STATUS `json:"family,omitempty"` + + // Name: SKU name to specify whether the key vault is a standard vault or a premium vault. + Name *Sku_Name_STATUS `json:"name,omitempty"` +} + +type VaultProperties_CreateMode_STATUS string + +const ( + VaultProperties_CreateMode_STATUS_CreateOrRecover = VaultProperties_CreateMode_STATUS("createOrRecover") + VaultProperties_CreateMode_STATUS_Default = VaultProperties_CreateMode_STATUS("default") + VaultProperties_CreateMode_STATUS_PurgeThenCreate = VaultProperties_CreateMode_STATUS("purgeThenCreate") + VaultProperties_CreateMode_STATUS_Recover = VaultProperties_CreateMode_STATUS("recover") +) + +// Mapping from string to VaultProperties_CreateMode_STATUS +var vaultProperties_CreateMode_STATUS_Values = map[string]VaultProperties_CreateMode_STATUS{ + "createorrecover": VaultProperties_CreateMode_STATUS_CreateOrRecover, + "default": VaultProperties_CreateMode_STATUS_Default, + "purgethencreate": VaultProperties_CreateMode_STATUS_PurgeThenCreate, + "recover": VaultProperties_CreateMode_STATUS_Recover, +} + +type VaultProperties_ProvisioningState_STATUS string + +const ( + VaultProperties_ProvisioningState_STATUS_RegisteringDns = VaultProperties_ProvisioningState_STATUS("RegisteringDns") + VaultProperties_ProvisioningState_STATUS_Succeeded = VaultProperties_ProvisioningState_STATUS("Succeeded") +) + +// Mapping from string to VaultProperties_ProvisioningState_STATUS +var vaultProperties_ProvisioningState_STATUS_Values = map[string]VaultProperties_ProvisioningState_STATUS{ + "registeringdns": VaultProperties_ProvisioningState_STATUS_RegisteringDns, + "succeeded": VaultProperties_ProvisioningState_STATUS_Succeeded, +} + +// A rule governing the accessibility of a vault from a specific ip address or ip range. +type IPRule_STATUS struct { + // Value: 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). + Value *string `json:"value,omitempty"` +} + +type NetworkRuleSet_Bypass_STATUS string + +const ( + NetworkRuleSet_Bypass_STATUS_AzureServices = NetworkRuleSet_Bypass_STATUS("AzureServices") + NetworkRuleSet_Bypass_STATUS_None = NetworkRuleSet_Bypass_STATUS("None") +) + +// Mapping from string to NetworkRuleSet_Bypass_STATUS +var networkRuleSet_Bypass_STATUS_Values = map[string]NetworkRuleSet_Bypass_STATUS{ + "azureservices": NetworkRuleSet_Bypass_STATUS_AzureServices, + "none": NetworkRuleSet_Bypass_STATUS_None, +} + +type NetworkRuleSet_DefaultAction_STATUS string + +const ( + NetworkRuleSet_DefaultAction_STATUS_Allow = NetworkRuleSet_DefaultAction_STATUS("Allow") + NetworkRuleSet_DefaultAction_STATUS_Deny = NetworkRuleSet_DefaultAction_STATUS("Deny") +) + +// Mapping from string to NetworkRuleSet_DefaultAction_STATUS +var networkRuleSet_DefaultAction_STATUS_Values = map[string]NetworkRuleSet_DefaultAction_STATUS{ + "allow": NetworkRuleSet_DefaultAction_STATUS_Allow, + "deny": NetworkRuleSet_DefaultAction_STATUS_Deny, +} + +// Permissions the identity has for keys, secrets, certificates and storage. +type Permissions_STATUS struct { + // Certificates: Permissions to certificates + Certificates []Permissions_Certificates_STATUS `json:"certificates,omitempty"` + + // Keys: Permissions to keys + Keys []Permissions_Keys_STATUS `json:"keys,omitempty"` + + // Secrets: Permissions to secrets + Secrets []Permissions_Secrets_STATUS `json:"secrets,omitempty"` + + // Storage: Permissions to storage accounts + Storage []Permissions_Storage_STATUS `json:"storage,omitempty"` +} + +// Properties of the private endpoint connection resource. +type PrivateEndpointConnectionProperties_STATUS struct { + // PrivateEndpoint: Properties of the private endpoint object. + PrivateEndpoint *PrivateEndpoint_STATUS `json:"privateEndpoint,omitempty"` + + // PrivateLinkServiceConnectionState: Approval state of the private link connection. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState_STATUS `json:"privateLinkServiceConnectionState,omitempty"` + + // ProvisioningState: Provisioning state of the private endpoint connection. + ProvisioningState *PrivateEndpointConnectionProvisioningState_STATUS `json:"provisioningState,omitempty"` +} + +type Sku_Family_STATUS string + +const Sku_Family_STATUS_A = Sku_Family_STATUS("A") + +// Mapping from string to Sku_Family_STATUS +var sku_Family_STATUS_Values = map[string]Sku_Family_STATUS{ + "a": Sku_Family_STATUS_A, +} + +type Sku_Name_STATUS string + +const ( + Sku_Name_STATUS_Premium = Sku_Name_STATUS("premium") + Sku_Name_STATUS_Standard = Sku_Name_STATUS("standard") +) + +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "premium": Sku_Name_STATUS_Premium, + "standard": Sku_Name_STATUS_Standard, +} + +// A rule governing the accessibility of a vault from a specific virtual network. +type VirtualNetworkRule_STATUS struct { + // Id: 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"` + + // IgnoreMissingVnetServiceEndpoint: Property to specify whether NRP will ignore the check if parent subnet has + // serviceEndpoints configured. + IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` +} + +type Permissions_Certificates_STATUS string + +const ( + Permissions_Certificates_STATUS_All = Permissions_Certificates_STATUS("all") + Permissions_Certificates_STATUS_Backup = Permissions_Certificates_STATUS("backup") + Permissions_Certificates_STATUS_Create = Permissions_Certificates_STATUS("create") + Permissions_Certificates_STATUS_Delete = Permissions_Certificates_STATUS("delete") + Permissions_Certificates_STATUS_Deleteissuers = Permissions_Certificates_STATUS("deleteissuers") + Permissions_Certificates_STATUS_Get = Permissions_Certificates_STATUS("get") + Permissions_Certificates_STATUS_Getissuers = Permissions_Certificates_STATUS("getissuers") + Permissions_Certificates_STATUS_Import = Permissions_Certificates_STATUS("import") + Permissions_Certificates_STATUS_List = Permissions_Certificates_STATUS("list") + Permissions_Certificates_STATUS_Listissuers = Permissions_Certificates_STATUS("listissuers") + Permissions_Certificates_STATUS_Managecontacts = Permissions_Certificates_STATUS("managecontacts") + Permissions_Certificates_STATUS_Manageissuers = Permissions_Certificates_STATUS("manageissuers") + Permissions_Certificates_STATUS_Purge = Permissions_Certificates_STATUS("purge") + Permissions_Certificates_STATUS_Recover = Permissions_Certificates_STATUS("recover") + Permissions_Certificates_STATUS_Restore = Permissions_Certificates_STATUS("restore") + Permissions_Certificates_STATUS_Setissuers = Permissions_Certificates_STATUS("setissuers") + Permissions_Certificates_STATUS_Update = Permissions_Certificates_STATUS("update") +) + +// Mapping from string to Permissions_Certificates_STATUS +var permissions_Certificates_STATUS_Values = map[string]Permissions_Certificates_STATUS{ + "all": Permissions_Certificates_STATUS_All, + "backup": Permissions_Certificates_STATUS_Backup, + "create": Permissions_Certificates_STATUS_Create, + "delete": Permissions_Certificates_STATUS_Delete, + "deleteissuers": Permissions_Certificates_STATUS_Deleteissuers, + "get": Permissions_Certificates_STATUS_Get, + "getissuers": Permissions_Certificates_STATUS_Getissuers, + "import": Permissions_Certificates_STATUS_Import, + "list": Permissions_Certificates_STATUS_List, + "listissuers": Permissions_Certificates_STATUS_Listissuers, + "managecontacts": Permissions_Certificates_STATUS_Managecontacts, + "manageissuers": Permissions_Certificates_STATUS_Manageissuers, + "purge": Permissions_Certificates_STATUS_Purge, + "recover": Permissions_Certificates_STATUS_Recover, + "restore": Permissions_Certificates_STATUS_Restore, + "setissuers": Permissions_Certificates_STATUS_Setissuers, + "update": Permissions_Certificates_STATUS_Update, +} + +type Permissions_Keys_STATUS string + +const ( + Permissions_Keys_STATUS_All = Permissions_Keys_STATUS("all") + Permissions_Keys_STATUS_Backup = Permissions_Keys_STATUS("backup") + Permissions_Keys_STATUS_Create = Permissions_Keys_STATUS("create") + Permissions_Keys_STATUS_Decrypt = Permissions_Keys_STATUS("decrypt") + Permissions_Keys_STATUS_Delete = Permissions_Keys_STATUS("delete") + Permissions_Keys_STATUS_Encrypt = Permissions_Keys_STATUS("encrypt") + Permissions_Keys_STATUS_Get = Permissions_Keys_STATUS("get") + Permissions_Keys_STATUS_Getrotationpolicy = Permissions_Keys_STATUS("getrotationpolicy") + Permissions_Keys_STATUS_Import = Permissions_Keys_STATUS("import") + Permissions_Keys_STATUS_List = Permissions_Keys_STATUS("list") + Permissions_Keys_STATUS_Purge = Permissions_Keys_STATUS("purge") + Permissions_Keys_STATUS_Recover = Permissions_Keys_STATUS("recover") + Permissions_Keys_STATUS_Release = Permissions_Keys_STATUS("release") + Permissions_Keys_STATUS_Restore = Permissions_Keys_STATUS("restore") + Permissions_Keys_STATUS_Rotate = Permissions_Keys_STATUS("rotate") + Permissions_Keys_STATUS_Setrotationpolicy = Permissions_Keys_STATUS("setrotationpolicy") + Permissions_Keys_STATUS_Sign = Permissions_Keys_STATUS("sign") + Permissions_Keys_STATUS_UnwrapKey = Permissions_Keys_STATUS("unwrapKey") + Permissions_Keys_STATUS_Update = Permissions_Keys_STATUS("update") + Permissions_Keys_STATUS_Verify = Permissions_Keys_STATUS("verify") + Permissions_Keys_STATUS_WrapKey = Permissions_Keys_STATUS("wrapKey") +) + +// Mapping from string to Permissions_Keys_STATUS +var permissions_Keys_STATUS_Values = map[string]Permissions_Keys_STATUS{ + "all": Permissions_Keys_STATUS_All, + "backup": Permissions_Keys_STATUS_Backup, + "create": Permissions_Keys_STATUS_Create, + "decrypt": Permissions_Keys_STATUS_Decrypt, + "delete": Permissions_Keys_STATUS_Delete, + "encrypt": Permissions_Keys_STATUS_Encrypt, + "get": Permissions_Keys_STATUS_Get, + "getrotationpolicy": Permissions_Keys_STATUS_Getrotationpolicy, + "import": Permissions_Keys_STATUS_Import, + "list": Permissions_Keys_STATUS_List, + "purge": Permissions_Keys_STATUS_Purge, + "recover": Permissions_Keys_STATUS_Recover, + "release": Permissions_Keys_STATUS_Release, + "restore": Permissions_Keys_STATUS_Restore, + "rotate": Permissions_Keys_STATUS_Rotate, + "setrotationpolicy": Permissions_Keys_STATUS_Setrotationpolicy, + "sign": Permissions_Keys_STATUS_Sign, + "unwrapkey": Permissions_Keys_STATUS_UnwrapKey, + "update": Permissions_Keys_STATUS_Update, + "verify": Permissions_Keys_STATUS_Verify, + "wrapkey": Permissions_Keys_STATUS_WrapKey, +} + +type Permissions_Secrets_STATUS string + +const ( + Permissions_Secrets_STATUS_All = Permissions_Secrets_STATUS("all") + Permissions_Secrets_STATUS_Backup = Permissions_Secrets_STATUS("backup") + Permissions_Secrets_STATUS_Delete = Permissions_Secrets_STATUS("delete") + Permissions_Secrets_STATUS_Get = Permissions_Secrets_STATUS("get") + Permissions_Secrets_STATUS_List = Permissions_Secrets_STATUS("list") + Permissions_Secrets_STATUS_Purge = Permissions_Secrets_STATUS("purge") + Permissions_Secrets_STATUS_Recover = Permissions_Secrets_STATUS("recover") + Permissions_Secrets_STATUS_Restore = Permissions_Secrets_STATUS("restore") + Permissions_Secrets_STATUS_Set = Permissions_Secrets_STATUS("set") +) + +// Mapping from string to Permissions_Secrets_STATUS +var permissions_Secrets_STATUS_Values = map[string]Permissions_Secrets_STATUS{ + "all": Permissions_Secrets_STATUS_All, + "backup": Permissions_Secrets_STATUS_Backup, + "delete": Permissions_Secrets_STATUS_Delete, + "get": Permissions_Secrets_STATUS_Get, + "list": Permissions_Secrets_STATUS_List, + "purge": Permissions_Secrets_STATUS_Purge, + "recover": Permissions_Secrets_STATUS_Recover, + "restore": Permissions_Secrets_STATUS_Restore, + "set": Permissions_Secrets_STATUS_Set, +} + +type Permissions_Storage_STATUS string + +const ( + Permissions_Storage_STATUS_All = Permissions_Storage_STATUS("all") + Permissions_Storage_STATUS_Backup = Permissions_Storage_STATUS("backup") + Permissions_Storage_STATUS_Delete = Permissions_Storage_STATUS("delete") + Permissions_Storage_STATUS_Deletesas = Permissions_Storage_STATUS("deletesas") + Permissions_Storage_STATUS_Get = Permissions_Storage_STATUS("get") + Permissions_Storage_STATUS_Getsas = Permissions_Storage_STATUS("getsas") + Permissions_Storage_STATUS_List = Permissions_Storage_STATUS("list") + Permissions_Storage_STATUS_Listsas = Permissions_Storage_STATUS("listsas") + Permissions_Storage_STATUS_Purge = Permissions_Storage_STATUS("purge") + Permissions_Storage_STATUS_Recover = Permissions_Storage_STATUS("recover") + Permissions_Storage_STATUS_Regeneratekey = Permissions_Storage_STATUS("regeneratekey") + Permissions_Storage_STATUS_Restore = Permissions_Storage_STATUS("restore") + Permissions_Storage_STATUS_Set = Permissions_Storage_STATUS("set") + Permissions_Storage_STATUS_Setsas = Permissions_Storage_STATUS("setsas") + Permissions_Storage_STATUS_Update = Permissions_Storage_STATUS("update") +) + +// Mapping from string to Permissions_Storage_STATUS +var permissions_Storage_STATUS_Values = map[string]Permissions_Storage_STATUS{ + "all": Permissions_Storage_STATUS_All, + "backup": Permissions_Storage_STATUS_Backup, + "delete": Permissions_Storage_STATUS_Delete, + "deletesas": Permissions_Storage_STATUS_Deletesas, + "get": Permissions_Storage_STATUS_Get, + "getsas": Permissions_Storage_STATUS_Getsas, + "list": Permissions_Storage_STATUS_List, + "listsas": Permissions_Storage_STATUS_Listsas, + "purge": Permissions_Storage_STATUS_Purge, + "recover": Permissions_Storage_STATUS_Recover, + "regeneratekey": Permissions_Storage_STATUS_Regeneratekey, + "restore": Permissions_Storage_STATUS_Restore, + "set": Permissions_Storage_STATUS_Set, + "setsas": Permissions_Storage_STATUS_Setsas, + "update": Permissions_Storage_STATUS_Update, +} + +// Private endpoint object properties. +type PrivateEndpoint_STATUS struct { + // Id: Full identifier of the private endpoint resource. + Id *string `json:"id,omitempty"` +} + +// The current provisioning state. +type PrivateEndpointConnectionProvisioningState_STATUS string + +const ( + PrivateEndpointConnectionProvisioningState_STATUS_Creating = PrivateEndpointConnectionProvisioningState_STATUS("Creating") + PrivateEndpointConnectionProvisioningState_STATUS_Deleting = PrivateEndpointConnectionProvisioningState_STATUS("Deleting") + PrivateEndpointConnectionProvisioningState_STATUS_Disconnected = PrivateEndpointConnectionProvisioningState_STATUS("Disconnected") + PrivateEndpointConnectionProvisioningState_STATUS_Failed = PrivateEndpointConnectionProvisioningState_STATUS("Failed") + PrivateEndpointConnectionProvisioningState_STATUS_Succeeded = PrivateEndpointConnectionProvisioningState_STATUS("Succeeded") + PrivateEndpointConnectionProvisioningState_STATUS_Updating = PrivateEndpointConnectionProvisioningState_STATUS("Updating") +) + +// Mapping from string to PrivateEndpointConnectionProvisioningState_STATUS +var privateEndpointConnectionProvisioningState_STATUS_Values = map[string]PrivateEndpointConnectionProvisioningState_STATUS{ + "creating": PrivateEndpointConnectionProvisioningState_STATUS_Creating, + "deleting": PrivateEndpointConnectionProvisioningState_STATUS_Deleting, + "disconnected": PrivateEndpointConnectionProvisioningState_STATUS_Disconnected, + "failed": PrivateEndpointConnectionProvisioningState_STATUS_Failed, + "succeeded": PrivateEndpointConnectionProvisioningState_STATUS_Succeeded, + "updating": PrivateEndpointConnectionProvisioningState_STATUS_Updating, +} + +// An object that represents the approval state of the private link connection. +type PrivateLinkServiceConnectionState_STATUS struct { + // ActionsRequired: A message indicating if changes on the service provider require any updates on the consumer. + ActionsRequired *PrivateLinkServiceConnectionState_ActionsRequired_STATUS `json:"actionsRequired,omitempty"` + + // Description: The reason for approval or rejection. + Description *string `json:"description,omitempty"` + + // Status: Indicates whether the connection has been approved, rejected or removed by the key vault owner. + Status *PrivateEndpointServiceConnectionStatus_STATUS `json:"status,omitempty"` +} + +// The private endpoint connection status. +type PrivateEndpointServiceConnectionStatus_STATUS string + +const ( + PrivateEndpointServiceConnectionStatus_STATUS_Approved = PrivateEndpointServiceConnectionStatus_STATUS("Approved") + PrivateEndpointServiceConnectionStatus_STATUS_Disconnected = PrivateEndpointServiceConnectionStatus_STATUS("Disconnected") + PrivateEndpointServiceConnectionStatus_STATUS_Pending = PrivateEndpointServiceConnectionStatus_STATUS("Pending") + PrivateEndpointServiceConnectionStatus_STATUS_Rejected = PrivateEndpointServiceConnectionStatus_STATUS("Rejected") +) + +// Mapping from string to PrivateEndpointServiceConnectionStatus_STATUS +var privateEndpointServiceConnectionStatus_STATUS_Values = map[string]PrivateEndpointServiceConnectionStatus_STATUS{ + "approved": PrivateEndpointServiceConnectionStatus_STATUS_Approved, + "disconnected": PrivateEndpointServiceConnectionStatus_STATUS_Disconnected, + "pending": PrivateEndpointServiceConnectionStatus_STATUS_Pending, + "rejected": PrivateEndpointServiceConnectionStatus_STATUS_Rejected, +} + +type PrivateLinkServiceConnectionState_ActionsRequired_STATUS string + +const PrivateLinkServiceConnectionState_ActionsRequired_STATUS_None = PrivateLinkServiceConnectionState_ActionsRequired_STATUS("None") + +// Mapping from string to PrivateLinkServiceConnectionState_ActionsRequired_STATUS +var privateLinkServiceConnectionState_ActionsRequired_STATUS_Values = map[string]PrivateLinkServiceConnectionState_ActionsRequired_STATUS{ + "none": PrivateLinkServiceConnectionState_ActionsRequired_STATUS_None, +} diff --git a/v2/api/keyvault/v1api20230701/arm/vault_status_types_gen_test.go b/v2/api/keyvault/v1api20230701/arm/vault_status_types_gen_test.go new file mode 100644 index 00000000000..f26a7d68cc7 --- /dev/null +++ b/v2/api/keyvault/v1api20230701/arm/vault_status_types_gen_test.go @@ -0,0 +1,1014 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_AccessPolicyEntry_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of AccessPolicyEntry_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForAccessPolicyEntry_STATUS, AccessPolicyEntry_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForAccessPolicyEntry_STATUS runs a test to see if a specific instance of AccessPolicyEntry_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForAccessPolicyEntry_STATUS(subject AccessPolicyEntry_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual AccessPolicyEntry_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of AccessPolicyEntry_STATUS instances for property testing - lazily instantiated by +// AccessPolicyEntry_STATUSGenerator() +var accessPolicyEntry_STATUSGenerator gopter.Gen + +// AccessPolicyEntry_STATUSGenerator returns a generator of AccessPolicyEntry_STATUS instances for property testing. +// We first initialize accessPolicyEntry_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func AccessPolicyEntry_STATUSGenerator() gopter.Gen { + if accessPolicyEntry_STATUSGenerator != nil { + return accessPolicyEntry_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS(generators) + accessPolicyEntry_STATUSGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS(generators) + AddRelatedPropertyGeneratorsForAccessPolicyEntry_STATUS(generators) + accessPolicyEntry_STATUSGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry_STATUS{}), generators) + + return accessPolicyEntry_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS(gens map[string]gopter.Gen) { + gens["ApplicationId"] = gen.PtrOf(gen.AlphaString()) + gens["ObjectId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForAccessPolicyEntry_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForAccessPolicyEntry_STATUS(gens map[string]gopter.Gen) { + gens["Permissions"] = gen.PtrOf(Permissions_STATUSGenerator()) +} + +func Test_IPRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of IPRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForIPRule_STATUS, IPRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForIPRule_STATUS runs a test to see if a specific instance of IPRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForIPRule_STATUS(subject IPRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual IPRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of IPRule_STATUS instances for property testing - lazily instantiated by IPRule_STATUSGenerator() +var ipRule_STATUSGenerator gopter.Gen + +// IPRule_STATUSGenerator returns a generator of IPRule_STATUS instances for property testing. +func IPRule_STATUSGenerator() gopter.Gen { + if ipRule_STATUSGenerator != nil { + return ipRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForIPRule_STATUS(generators) + ipRule_STATUSGenerator = gen.Struct(reflect.TypeOf(IPRule_STATUS{}), generators) + + return ipRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForIPRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForIPRule_STATUS(gens map[string]gopter.Gen) { + gens["Value"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_NetworkRuleSet_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of NetworkRuleSet_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForNetworkRuleSet_STATUS, NetworkRuleSet_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForNetworkRuleSet_STATUS runs a test to see if a specific instance of NetworkRuleSet_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForNetworkRuleSet_STATUS(subject NetworkRuleSet_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual NetworkRuleSet_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of NetworkRuleSet_STATUS instances for property testing - lazily instantiated by +// NetworkRuleSet_STATUSGenerator() +var networkRuleSet_STATUSGenerator gopter.Gen + +// NetworkRuleSet_STATUSGenerator returns a generator of NetworkRuleSet_STATUS instances for property testing. +// We first initialize networkRuleSet_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func NetworkRuleSet_STATUSGenerator() gopter.Gen { + if networkRuleSet_STATUSGenerator != nil { + return networkRuleSet_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS(generators) + networkRuleSet_STATUSGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS(generators) + AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS(generators) + networkRuleSet_STATUSGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS{}), generators) + + return networkRuleSet_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS(gens map[string]gopter.Gen) { + gens["Bypass"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_Bypass_STATUS_AzureServices, NetworkRuleSet_Bypass_STATUS_None)) + gens["DefaultAction"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_DefaultAction_STATUS_Allow, NetworkRuleSet_DefaultAction_STATUS_Deny)) +} + +// AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS(gens map[string]gopter.Gen) { + gens["IpRules"] = gen.SliceOf(IPRule_STATUSGenerator()) + gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRule_STATUSGenerator()) +} + +func Test_Permissions_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Permissions_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPermissions_STATUS, Permissions_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPermissions_STATUS runs a test to see if a specific instance of Permissions_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForPermissions_STATUS(subject Permissions_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Permissions_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Permissions_STATUS instances for property testing - lazily instantiated by Permissions_STATUSGenerator() +var permissions_STATUSGenerator gopter.Gen + +// Permissions_STATUSGenerator returns a generator of Permissions_STATUS instances for property testing. +func Permissions_STATUSGenerator() gopter.Gen { + if permissions_STATUSGenerator != nil { + return permissions_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPermissions_STATUS(generators) + permissions_STATUSGenerator = gen.Struct(reflect.TypeOf(Permissions_STATUS{}), generators) + + return permissions_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForPermissions_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPermissions_STATUS(gens map[string]gopter.Gen) { + gens["Certificates"] = gen.SliceOf(gen.OneConstOf( + Permissions_Certificates_STATUS_All, + Permissions_Certificates_STATUS_Backup, + Permissions_Certificates_STATUS_Create, + Permissions_Certificates_STATUS_Delete, + Permissions_Certificates_STATUS_Deleteissuers, + Permissions_Certificates_STATUS_Get, + Permissions_Certificates_STATUS_Getissuers, + Permissions_Certificates_STATUS_Import, + Permissions_Certificates_STATUS_List, + Permissions_Certificates_STATUS_Listissuers, + Permissions_Certificates_STATUS_Managecontacts, + Permissions_Certificates_STATUS_Manageissuers, + Permissions_Certificates_STATUS_Purge, + Permissions_Certificates_STATUS_Recover, + Permissions_Certificates_STATUS_Restore, + Permissions_Certificates_STATUS_Setissuers, + Permissions_Certificates_STATUS_Update)) + gens["Keys"] = gen.SliceOf(gen.OneConstOf( + Permissions_Keys_STATUS_All, + Permissions_Keys_STATUS_Backup, + Permissions_Keys_STATUS_Create, + Permissions_Keys_STATUS_Decrypt, + Permissions_Keys_STATUS_Delete, + Permissions_Keys_STATUS_Encrypt, + Permissions_Keys_STATUS_Get, + Permissions_Keys_STATUS_Getrotationpolicy, + Permissions_Keys_STATUS_Import, + Permissions_Keys_STATUS_List, + Permissions_Keys_STATUS_Purge, + Permissions_Keys_STATUS_Recover, + Permissions_Keys_STATUS_Release, + Permissions_Keys_STATUS_Restore, + Permissions_Keys_STATUS_Rotate, + Permissions_Keys_STATUS_Setrotationpolicy, + Permissions_Keys_STATUS_Sign, + Permissions_Keys_STATUS_UnwrapKey, + Permissions_Keys_STATUS_Update, + Permissions_Keys_STATUS_Verify, + Permissions_Keys_STATUS_WrapKey)) + gens["Secrets"] = gen.SliceOf(gen.OneConstOf( + Permissions_Secrets_STATUS_All, + Permissions_Secrets_STATUS_Backup, + Permissions_Secrets_STATUS_Delete, + Permissions_Secrets_STATUS_Get, + Permissions_Secrets_STATUS_List, + Permissions_Secrets_STATUS_Purge, + Permissions_Secrets_STATUS_Recover, + Permissions_Secrets_STATUS_Restore, + Permissions_Secrets_STATUS_Set)) + gens["Storage"] = gen.SliceOf(gen.OneConstOf( + Permissions_Storage_STATUS_All, + Permissions_Storage_STATUS_Backup, + Permissions_Storage_STATUS_Delete, + Permissions_Storage_STATUS_Deletesas, + Permissions_Storage_STATUS_Get, + Permissions_Storage_STATUS_Getsas, + Permissions_Storage_STATUS_List, + Permissions_Storage_STATUS_Listsas, + Permissions_Storage_STATUS_Purge, + Permissions_Storage_STATUS_Recover, + Permissions_Storage_STATUS_Regeneratekey, + Permissions_Storage_STATUS_Restore, + Permissions_Storage_STATUS_Set, + Permissions_Storage_STATUS_Setsas, + Permissions_Storage_STATUS_Update)) +} + +func Test_PrivateEndpointConnectionItem_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of PrivateEndpointConnectionItem_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPrivateEndpointConnectionItem_STATUS, PrivateEndpointConnectionItem_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPrivateEndpointConnectionItem_STATUS runs a test to see if a specific instance of PrivateEndpointConnectionItem_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForPrivateEndpointConnectionItem_STATUS(subject PrivateEndpointConnectionItem_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual PrivateEndpointConnectionItem_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of PrivateEndpointConnectionItem_STATUS instances for property testing - lazily instantiated by +// PrivateEndpointConnectionItem_STATUSGenerator() +var privateEndpointConnectionItem_STATUSGenerator gopter.Gen + +// PrivateEndpointConnectionItem_STATUSGenerator returns a generator of PrivateEndpointConnectionItem_STATUS instances for property testing. +// We first initialize privateEndpointConnectionItem_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func PrivateEndpointConnectionItem_STATUSGenerator() gopter.Gen { + if privateEndpointConnectionItem_STATUSGenerator != nil { + return privateEndpointConnectionItem_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS(generators) + privateEndpointConnectionItem_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionItem_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS(generators) + AddRelatedPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS(generators) + privateEndpointConnectionItem_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionItem_STATUS{}), generators) + + return privateEndpointConnectionItem_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS(gens map[string]gopter.Gen) { + gens["Etag"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(PrivateEndpointConnectionProperties_STATUSGenerator()) +} + +func Test_PrivateEndpointConnectionProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of PrivateEndpointConnectionProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPrivateEndpointConnectionProperties_STATUS, PrivateEndpointConnectionProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPrivateEndpointConnectionProperties_STATUS runs a test to see if a specific instance of PrivateEndpointConnectionProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForPrivateEndpointConnectionProperties_STATUS(subject PrivateEndpointConnectionProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual PrivateEndpointConnectionProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of PrivateEndpointConnectionProperties_STATUS instances for property testing - lazily instantiated by +// PrivateEndpointConnectionProperties_STATUSGenerator() +var privateEndpointConnectionProperties_STATUSGenerator gopter.Gen + +// PrivateEndpointConnectionProperties_STATUSGenerator returns a generator of PrivateEndpointConnectionProperties_STATUS instances for property testing. +// We first initialize privateEndpointConnectionProperties_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func PrivateEndpointConnectionProperties_STATUSGenerator() gopter.Gen { + if privateEndpointConnectionProperties_STATUSGenerator != nil { + return privateEndpointConnectionProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS(generators) + privateEndpointConnectionProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionProperties_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS(generators) + AddRelatedPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS(generators) + privateEndpointConnectionProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionProperties_STATUS{}), generators) + + return privateEndpointConnectionProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS(gens map[string]gopter.Gen) { + gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf( + PrivateEndpointConnectionProvisioningState_STATUS_Creating, + PrivateEndpointConnectionProvisioningState_STATUS_Deleting, + PrivateEndpointConnectionProvisioningState_STATUS_Disconnected, + PrivateEndpointConnectionProvisioningState_STATUS_Failed, + PrivateEndpointConnectionProvisioningState_STATUS_Succeeded, + PrivateEndpointConnectionProvisioningState_STATUS_Updating)) +} + +// AddRelatedPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS(gens map[string]gopter.Gen) { + gens["PrivateEndpoint"] = gen.PtrOf(PrivateEndpoint_STATUSGenerator()) + gens["PrivateLinkServiceConnectionState"] = gen.PtrOf(PrivateLinkServiceConnectionState_STATUSGenerator()) +} + +func Test_PrivateEndpoint_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of PrivateEndpoint_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPrivateEndpoint_STATUS, PrivateEndpoint_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPrivateEndpoint_STATUS runs a test to see if a specific instance of PrivateEndpoint_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForPrivateEndpoint_STATUS(subject PrivateEndpoint_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual PrivateEndpoint_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of PrivateEndpoint_STATUS instances for property testing - lazily instantiated by +// PrivateEndpoint_STATUSGenerator() +var privateEndpoint_STATUSGenerator gopter.Gen + +// PrivateEndpoint_STATUSGenerator returns a generator of PrivateEndpoint_STATUS instances for property testing. +func PrivateEndpoint_STATUSGenerator() gopter.Gen { + if privateEndpoint_STATUSGenerator != nil { + return privateEndpoint_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateEndpoint_STATUS(generators) + privateEndpoint_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateEndpoint_STATUS{}), generators) + + return privateEndpoint_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForPrivateEndpoint_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPrivateEndpoint_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_PrivateLinkServiceConnectionState_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of PrivateLinkServiceConnectionState_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForPrivateLinkServiceConnectionState_STATUS, PrivateLinkServiceConnectionState_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForPrivateLinkServiceConnectionState_STATUS runs a test to see if a specific instance of PrivateLinkServiceConnectionState_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForPrivateLinkServiceConnectionState_STATUS(subject PrivateLinkServiceConnectionState_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual PrivateLinkServiceConnectionState_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of PrivateLinkServiceConnectionState_STATUS instances for property testing - lazily instantiated by +// PrivateLinkServiceConnectionState_STATUSGenerator() +var privateLinkServiceConnectionState_STATUSGenerator gopter.Gen + +// PrivateLinkServiceConnectionState_STATUSGenerator returns a generator of PrivateLinkServiceConnectionState_STATUS instances for property testing. +func PrivateLinkServiceConnectionState_STATUSGenerator() gopter.Gen { + if privateLinkServiceConnectionState_STATUSGenerator != nil { + return privateLinkServiceConnectionState_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForPrivateLinkServiceConnectionState_STATUS(generators) + privateLinkServiceConnectionState_STATUSGenerator = gen.Struct(reflect.TypeOf(PrivateLinkServiceConnectionState_STATUS{}), generators) + + return privateLinkServiceConnectionState_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForPrivateLinkServiceConnectionState_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForPrivateLinkServiceConnectionState_STATUS(gens map[string]gopter.Gen) { + gens["ActionsRequired"] = gen.PtrOf(gen.OneConstOf(PrivateLinkServiceConnectionState_ActionsRequired_STATUS_None)) + gens["Description"] = gen.PtrOf(gen.AlphaString()) + gens["Status"] = gen.PtrOf(gen.OneConstOf( + PrivateEndpointServiceConnectionStatus_STATUS_Approved, + PrivateEndpointServiceConnectionStatus_STATUS_Disconnected, + PrivateEndpointServiceConnectionStatus_STATUS_Pending, + PrivateEndpointServiceConnectionStatus_STATUS_Rejected)) +} + +func Test_Sku_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Sku_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSku_STATUS, Sku_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSku_STATUS runs a test to see if a specific instance of Sku_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSku_STATUS(subject Sku_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Sku_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Sku_STATUS instances for property testing - lazily instantiated by Sku_STATUSGenerator() +var sku_STATUSGenerator gopter.Gen + +// Sku_STATUSGenerator returns a generator of Sku_STATUS instances for property testing. +func Sku_STATUSGenerator() gopter.Gen { + if sku_STATUSGenerator != nil { + return sku_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSku_STATUS(generators) + sku_STATUSGenerator = gen.Struct(reflect.TypeOf(Sku_STATUS{}), generators) + + return sku_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSku_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSku_STATUS(gens map[string]gopter.Gen) { + gens["Family"] = gen.PtrOf(gen.OneConstOf(Sku_Family_STATUS_A)) + gens["Name"] = gen.PtrOf(gen.OneConstOf(Sku_Name_STATUS_Premium, Sku_Name_STATUS_Standard)) +} + +func Test_SystemData_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SystemData_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSystemData_STATUS, SystemData_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSystemData_STATUS runs a test to see if a specific instance of SystemData_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSystemData_STATUS(subject SystemData_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SystemData_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SystemData_STATUS instances for property testing - lazily instantiated by SystemData_STATUSGenerator() +var systemData_STATUSGenerator gopter.Gen + +// SystemData_STATUSGenerator returns a generator of SystemData_STATUS instances for property testing. +func SystemData_STATUSGenerator() gopter.Gen { + if systemData_STATUSGenerator != nil { + return systemData_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSystemData_STATUS(generators) + systemData_STATUSGenerator = gen.Struct(reflect.TypeOf(SystemData_STATUS{}), generators) + + return systemData_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSystemData_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSystemData_STATUS(gens map[string]gopter.Gen) { + gens["CreatedAt"] = gen.PtrOf(gen.AlphaString()) + gens["CreatedBy"] = gen.PtrOf(gen.AlphaString()) + gens["CreatedByType"] = gen.PtrOf(gen.OneConstOf( + IdentityType_STATUS_Application, + IdentityType_STATUS_Key, + IdentityType_STATUS_ManagedIdentity, + IdentityType_STATUS_User)) + gens["LastModifiedAt"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedBy"] = gen.PtrOf(gen.AlphaString()) + gens["LastModifiedByType"] = gen.PtrOf(gen.OneConstOf( + IdentityType_STATUS_Application, + IdentityType_STATUS_Key, + IdentityType_STATUS_ManagedIdentity, + IdentityType_STATUS_User)) +} + +func Test_VaultProperties_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VaultProperties_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVaultProperties_STATUS, VaultProperties_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVaultProperties_STATUS runs a test to see if a specific instance of VaultProperties_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForVaultProperties_STATUS(subject VaultProperties_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VaultProperties_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VaultProperties_STATUS instances for property testing - lazily instantiated by +// VaultProperties_STATUSGenerator() +var vaultProperties_STATUSGenerator gopter.Gen + +// VaultProperties_STATUSGenerator returns a generator of VaultProperties_STATUS instances for property testing. +// We first initialize vaultProperties_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func VaultProperties_STATUSGenerator() gopter.Gen { + if vaultProperties_STATUSGenerator != nil { + return vaultProperties_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVaultProperties_STATUS(generators) + vaultProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(VaultProperties_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVaultProperties_STATUS(generators) + AddRelatedPropertyGeneratorsForVaultProperties_STATUS(generators) + vaultProperties_STATUSGenerator = gen.Struct(reflect.TypeOf(VaultProperties_STATUS{}), generators) + + return vaultProperties_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForVaultProperties_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVaultProperties_STATUS(gens map[string]gopter.Gen) { + gens["CreateMode"] = gen.PtrOf(gen.OneConstOf( + VaultProperties_CreateMode_STATUS_CreateOrRecover, + VaultProperties_CreateMode_STATUS_Default, + VaultProperties_CreateMode_STATUS_PurgeThenCreate, + VaultProperties_CreateMode_STATUS_Recover)) + gens["EnablePurgeProtection"] = gen.PtrOf(gen.Bool()) + gens["EnableRbacAuthorization"] = gen.PtrOf(gen.Bool()) + gens["EnableSoftDelete"] = gen.PtrOf(gen.Bool()) + gens["EnabledForDeployment"] = gen.PtrOf(gen.Bool()) + gens["EnabledForDiskEncryption"] = gen.PtrOf(gen.Bool()) + gens["EnabledForTemplateDeployment"] = gen.PtrOf(gen.Bool()) + gens["HsmPoolResourceId"] = gen.PtrOf(gen.AlphaString()) + gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(VaultProperties_ProvisioningState_STATUS_RegisteringDns, VaultProperties_ProvisioningState_STATUS_Succeeded)) + gens["PublicNetworkAccess"] = gen.PtrOf(gen.AlphaString()) + gens["SoftDeleteRetentionInDays"] = gen.PtrOf(gen.Int()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["VaultUri"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForVaultProperties_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForVaultProperties_STATUS(gens map[string]gopter.Gen) { + gens["AccessPolicies"] = gen.SliceOf(AccessPolicyEntry_STATUSGenerator()) + gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSet_STATUSGenerator()) + gens["PrivateEndpointConnections"] = gen.SliceOf(PrivateEndpointConnectionItem_STATUSGenerator()) + gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator()) +} + +func Test_Vault_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of Vault_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVault_STATUS, Vault_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVault_STATUS runs a test to see if a specific instance of Vault_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForVault_STATUS(subject Vault_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual Vault_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of Vault_STATUS instances for property testing - lazily instantiated by Vault_STATUSGenerator() +var vault_STATUSGenerator gopter.Gen + +// Vault_STATUSGenerator returns a generator of Vault_STATUS instances for property testing. +// We first initialize vault_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func Vault_STATUSGenerator() gopter.Gen { + if vault_STATUSGenerator != nil { + return vault_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVault_STATUS(generators) + vault_STATUSGenerator = gen.Struct(reflect.TypeOf(Vault_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVault_STATUS(generators) + AddRelatedPropertyGeneratorsForVault_STATUS(generators) + vault_STATUSGenerator = gen.Struct(reflect.TypeOf(Vault_STATUS{}), generators) + + return vault_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForVault_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVault_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Tags"] = gen.MapOf( + gen.AlphaString(), + gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForVault_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForVault_STATUS(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(VaultProperties_STATUSGenerator()) + gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator()) +} + +func Test_VirtualNetworkRule_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of VirtualNetworkRule_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule_STATUS, VirtualNetworkRule_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForVirtualNetworkRule_STATUS runs a test to see if a specific instance of VirtualNetworkRule_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForVirtualNetworkRule_STATUS(subject VirtualNetworkRule_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual VirtualNetworkRule_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of VirtualNetworkRule_STATUS instances for property testing - lazily instantiated by +// VirtualNetworkRule_STATUSGenerator() +var virtualNetworkRule_STATUSGenerator gopter.Gen + +// VirtualNetworkRule_STATUSGenerator returns a generator of VirtualNetworkRule_STATUS instances for property testing. +func VirtualNetworkRule_STATUSGenerator() gopter.Gen { + if virtualNetworkRule_STATUSGenerator != nil { + return virtualNetworkRule_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS(generators) + virtualNetworkRule_STATUSGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule_STATUS{}), generators) + + return virtualNetworkRule_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["IgnoreMissingVnetServiceEndpoint"] = gen.PtrOf(gen.Bool()) +} diff --git a/v2/api/keyvault/v1api20230701/structure.txt b/v2/api/keyvault/v1api20230701/structure.txt index 22bc18a0bc1..e6c84458ac1 100644 --- a/v2/api/keyvault/v1api20230701/structure.txt +++ b/v2/api/keyvault/v1api20230701/structure.txt @@ -278,267 +278,3 @@ Vault: Resource │ └── "User" ├── Tags: map[string]string └── Type: *string -Vault_STATUS_ARM: Object (7 properties) -├── Id: *string -├── Location: *string -├── Name: *string -├── Properties: *Object (17 properties) -│ ├── AccessPolicies: Object (4 properties)[] -│ │ ├── ApplicationId: *string -│ │ ├── ObjectId: *string -│ │ ├── Permissions: *Object (4 properties) -│ │ │ ├── Certificates: Enum (17 values)[] -│ │ │ │ ├── "all" -│ │ │ │ ├── "backup" -│ │ │ │ ├── "create" -│ │ │ │ ├── "delete" -│ │ │ │ ├── "deleteissuers" -│ │ │ │ ├── "get" -│ │ │ │ ├── "getissuers" -│ │ │ │ ├── "import" -│ │ │ │ ├── "list" -│ │ │ │ ├── "listissuers" -│ │ │ │ ├── "managecontacts" -│ │ │ │ ├── "manageissuers" -│ │ │ │ ├── "purge" -│ │ │ │ ├── "recover" -│ │ │ │ ├── "restore" -│ │ │ │ ├── "setissuers" -│ │ │ │ └── "update" -│ │ │ ├── Keys: Enum (21 values)[] -│ │ │ │ ├── "all" -│ │ │ │ ├── "backup" -│ │ │ │ ├── "create" -│ │ │ │ ├── "decrypt" -│ │ │ │ ├── "delete" -│ │ │ │ ├── "encrypt" -│ │ │ │ ├── "get" -│ │ │ │ ├── "getrotationpolicy" -│ │ │ │ ├── "import" -│ │ │ │ ├── "list" -│ │ │ │ ├── "purge" -│ │ │ │ ├── "recover" -│ │ │ │ ├── "release" -│ │ │ │ ├── "restore" -│ │ │ │ ├── "rotate" -│ │ │ │ ├── "setrotationpolicy" -│ │ │ │ ├── "sign" -│ │ │ │ ├── "unwrapKey" -│ │ │ │ ├── "update" -│ │ │ │ ├── "verify" -│ │ │ │ └── "wrapKey" -│ │ │ ├── Secrets: Enum (9 values)[] -│ │ │ │ ├── "all" -│ │ │ │ ├── "backup" -│ │ │ │ ├── "delete" -│ │ │ │ ├── "get" -│ │ │ │ ├── "list" -│ │ │ │ ├── "purge" -│ │ │ │ ├── "recover" -│ │ │ │ ├── "restore" -│ │ │ │ └── "set" -│ │ │ └── Storage: Enum (15 values)[] -│ │ │ ├── "all" -│ │ │ ├── "backup" -│ │ │ ├── "delete" -│ │ │ ├── "deletesas" -│ │ │ ├── "get" -│ │ │ ├── "getsas" -│ │ │ ├── "list" -│ │ │ ├── "listsas" -│ │ │ ├── "purge" -│ │ │ ├── "recover" -│ │ │ ├── "regeneratekey" -│ │ │ ├── "restore" -│ │ │ ├── "set" -│ │ │ ├── "setsas" -│ │ │ └── "update" -│ │ └── TenantId: *string -│ ├── CreateMode: *Enum (4 values) -│ │ ├── "createOrRecover" -│ │ ├── "default" -│ │ ├── "purgeThenCreate" -│ │ └── "recover" -│ ├── EnablePurgeProtection: *bool -│ ├── EnableRbacAuthorization: *bool -│ ├── EnableSoftDelete: *bool -│ ├── EnabledForDeployment: *bool -│ ├── EnabledForDiskEncryption: *bool -│ ├── EnabledForTemplateDeployment: *bool -│ ├── HsmPoolResourceId: *string -│ ├── NetworkAcls: *Object (4 properties) -│ │ ├── Bypass: *Enum (2 values) -│ │ │ ├── "AzureServices" -│ │ │ └── "None" -│ │ ├── DefaultAction: *Enum (2 values) -│ │ │ ├── "Allow" -│ │ │ └── "Deny" -│ │ ├── IpRules: Object (1 property)[] -│ │ │ └── Value: *string -│ │ └── VirtualNetworkRules: Object (2 properties)[] -│ │ ├── Id: *string -│ │ └── IgnoreMissingVnetServiceEndpoint: *bool -│ ├── PrivateEndpointConnections: Object (3 properties)[] -│ │ ├── Etag: *string -│ │ ├── Id: *string -│ │ └── Properties: *Object (3 properties) -│ │ ├── PrivateEndpoint: *Object (1 property) -│ │ │ └── Id: *string -│ │ ├── PrivateLinkServiceConnectionState: *Object (3 properties) -│ │ │ ├── ActionsRequired: *Enum (1 value) -│ │ │ │ └── "None" -│ │ │ ├── Description: *string -│ │ │ └── Status: *Enum (4 values) -│ │ │ ├── "Approved" -│ │ │ ├── "Disconnected" -│ │ │ ├── "Pending" -│ │ │ └── "Rejected" -│ │ └── ProvisioningState: *Enum (6 values) -│ │ ├── "Creating" -│ │ ├── "Deleting" -│ │ ├── "Disconnected" -│ │ ├── "Failed" -│ │ ├── "Succeeded" -│ │ └── "Updating" -│ ├── ProvisioningState: *Enum (2 values) -│ │ ├── "RegisteringDns" -│ │ └── "Succeeded" -│ ├── PublicNetworkAccess: *string -│ ├── Sku: *Object (2 properties) -│ │ ├── Family: *Enum (1 value) -│ │ │ └── "A" -│ │ └── Name: *Enum (2 values) -│ │ ├── "premium" -│ │ └── "standard" -│ ├── SoftDeleteRetentionInDays: *int -│ ├── TenantId: *string -│ └── VaultUri: *string -├── SystemData: *Object (6 properties) -│ ├── CreatedAt: *string -│ ├── CreatedBy: *string -│ ├── CreatedByType: *Enum (4 values) -│ │ ├── "Application" -│ │ ├── "Key" -│ │ ├── "ManagedIdentity" -│ │ └── "User" -│ ├── LastModifiedAt: *string -│ ├── LastModifiedBy: *string -│ └── LastModifiedByType: *Enum (4 values) -│ ├── "Application" -│ ├── "Key" -│ ├── "ManagedIdentity" -│ └── "User" -├── Tags: map[string]string -└── Type: *string -Vault_Spec_ARM: Object (4 properties) -├── Location: *string -├── Name: string -├── Properties: *Object (15 properties) -│ ├── AccessPolicies: Object (4 properties)[] -│ │ ├── ApplicationId: *string -│ │ ├── ObjectId: *string -│ │ ├── Permissions: *Object (4 properties) -│ │ │ ├── Certificates: Enum (17 values)[] -│ │ │ │ ├── "all" -│ │ │ │ ├── "backup" -│ │ │ │ ├── "create" -│ │ │ │ ├── "delete" -│ │ │ │ ├── "deleteissuers" -│ │ │ │ ├── "get" -│ │ │ │ ├── "getissuers" -│ │ │ │ ├── "import" -│ │ │ │ ├── "list" -│ │ │ │ ├── "listissuers" -│ │ │ │ ├── "managecontacts" -│ │ │ │ ├── "manageissuers" -│ │ │ │ ├── "purge" -│ │ │ │ ├── "recover" -│ │ │ │ ├── "restore" -│ │ │ │ ├── "setissuers" -│ │ │ │ └── "update" -│ │ │ ├── Keys: Enum (21 values)[] -│ │ │ │ ├── "all" -│ │ │ │ ├── "backup" -│ │ │ │ ├── "create" -│ │ │ │ ├── "decrypt" -│ │ │ │ ├── "delete" -│ │ │ │ ├── "encrypt" -│ │ │ │ ├── "get" -│ │ │ │ ├── "getrotationpolicy" -│ │ │ │ ├── "import" -│ │ │ │ ├── "list" -│ │ │ │ ├── "purge" -│ │ │ │ ├── "recover" -│ │ │ │ ├── "release" -│ │ │ │ ├── "restore" -│ │ │ │ ├── "rotate" -│ │ │ │ ├── "setrotationpolicy" -│ │ │ │ ├── "sign" -│ │ │ │ ├── "unwrapKey" -│ │ │ │ ├── "update" -│ │ │ │ ├── "verify" -│ │ │ │ └── "wrapKey" -│ │ │ ├── Secrets: Enum (9 values)[] -│ │ │ │ ├── "all" -│ │ │ │ ├── "backup" -│ │ │ │ ├── "delete" -│ │ │ │ ├── "get" -│ │ │ │ ├── "list" -│ │ │ │ ├── "purge" -│ │ │ │ ├── "recover" -│ │ │ │ ├── "restore" -│ │ │ │ └── "set" -│ │ │ └── Storage: Enum (15 values)[] -│ │ │ ├── "all" -│ │ │ ├── "backup" -│ │ │ ├── "delete" -│ │ │ ├── "deletesas" -│ │ │ ├── "get" -│ │ │ ├── "getsas" -│ │ │ ├── "list" -│ │ │ ├── "listsas" -│ │ │ ├── "purge" -│ │ │ ├── "recover" -│ │ │ ├── "regeneratekey" -│ │ │ ├── "restore" -│ │ │ ├── "set" -│ │ │ ├── "setsas" -│ │ │ └── "update" -│ │ └── TenantId: *string -│ ├── CreateMode: *Enum (4 values) -│ │ ├── "createOrRecover" -│ │ ├── "default" -│ │ ├── "purgeThenCreate" -│ │ └── "recover" -│ ├── EnablePurgeProtection: *bool -│ ├── EnableRbacAuthorization: *bool -│ ├── EnableSoftDelete: *bool -│ ├── EnabledForDeployment: *bool -│ ├── EnabledForDiskEncryption: *bool -│ ├── EnabledForTemplateDeployment: *bool -│ ├── NetworkAcls: *Object (4 properties) -│ │ ├── Bypass: *Enum (2 values) -│ │ │ ├── "AzureServices" -│ │ │ └── "None" -│ │ ├── DefaultAction: *Enum (2 values) -│ │ │ ├── "Allow" -│ │ │ └── "Deny" -│ │ ├── IpRules: Object (1 property)[] -│ │ │ └── Value: *string -│ │ └── VirtualNetworkRules: Object (2 properties)[] -│ │ ├── Id: *string -│ │ └── IgnoreMissingVnetServiceEndpoint: *bool -│ ├── ProvisioningState: *Enum (2 values) -│ │ ├── "RegisteringDns" -│ │ └── "Succeeded" -│ ├── PublicNetworkAccess: *string -│ ├── Sku: *Object (2 properties) -│ │ ├── Family: *Enum (1 value) -│ │ │ └── "A" -│ │ └── Name: *Enum (2 values) -│ │ ├── "premium" -│ │ └── "standard" -│ ├── SoftDeleteRetentionInDays: *int -│ ├── TenantId: *string -│ └── VaultUri: *string -└── Tags: map[string]string diff --git a/v2/api/keyvault/v1api20230701/vault_spec_arm_types_gen.go b/v2/api/keyvault/v1api20230701/vault_spec_arm_types_gen.go deleted file mode 100644 index 12bb39b7b5b..00000000000 --- a/v2/api/keyvault/v1api20230701/vault_spec_arm_types_gen.go +++ /dev/null @@ -1,422 +0,0 @@ -// Code generated by azure-service-operator-codegen. DO NOT EDIT. -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -package v1api20230701 - -import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" - -type Vault_Spec_ARM struct { - // Location: The supported Azure location where the key vault should be created. - Location *string `json:"location,omitempty"` - Name string `json:"name,omitempty"` - - // Properties: Properties of the vault - Properties *VaultProperties_ARM `json:"properties,omitempty"` - - // Tags: The tags that will be assigned to the key vault. - Tags map[string]string `json:"tags,omitempty"` -} - -var _ genruntime.ARMResourceSpec = &Vault_Spec_ARM{} - -// GetAPIVersion returns the ARM API version of the resource. This is always "2023-07-01" -func (vault Vault_Spec_ARM) GetAPIVersion() string { - return "2023-07-01" -} - -// GetName returns the Name of the resource -func (vault *Vault_Spec_ARM) GetName() string { - return vault.Name -} - -// GetType returns the ARM Type of the resource. This is always "Microsoft.KeyVault/vaults" -func (vault *Vault_Spec_ARM) GetType() string { - return "Microsoft.KeyVault/vaults" -} - -// Properties of the vault -type VaultProperties_ARM struct { - // AccessPolicies: An array of 0 to 1024 identities 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. When `createMode` is set to `recover`, access policies are not - // required. Otherwise, access policies are required. - AccessPolicies []AccessPolicyEntry_ARM `json:"accessPolicies,omitempty"` - - // CreateMode: The vault's create mode to indicate whether the vault need to be recovered or not. - CreateMode *VaultProperties_CreateMode_ARM `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"` - - // EnableRbacAuthorization: Property that controls how data actions are authorized. When true, the key vault will use Role - // Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties - // will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy - // stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value - // of false. Note that management actions are always authorized with RBAC. - EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"` - - // EnableSoftDelete: Property to specify whether the 'soft delete' functionality is enabled for this key vault. If it's not - // set to any value(true or false) when creating new key vault, it will be set to true by default. Once set to true, it - // cannot be reverted to false. - EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` - - // EnabledForDeployment: Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored - // as secrets from the key vault. - EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` - - // EnabledForDiskEncryption: Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the - // vault and unwrap keys. - 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"` - - // NetworkAcls: Rules governing the accessibility of the key vault from specific network locations. - NetworkAcls *NetworkRuleSet_ARM `json:"networkAcls,omitempty"` - - // ProvisioningState: Provisioning state of the vault. - ProvisioningState *VaultProperties_ProvisioningState_ARM `json:"provisioningState,omitempty"` - - // PublicNetworkAccess: Property to specify whether the vault will accept traffic from public internet. If set to - // 'disabled' all traffic except private endpoint traffic and that that originates from trusted services will be blocked. - // This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor the - // rules. - PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` - - // Sku: SKU details - Sku *Sku_ARM `json:"sku,omitempty"` - - // SoftDeleteRetentionInDays: softDelete data retention days. It accepts >=7 and <=90. - SoftDeleteRetentionInDays *int `json:"softDeleteRetentionInDays,omitempty"` - - // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantId *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"` - - // VaultUri: The URI of the vault for performing operations on keys and secrets. - VaultUri *string `json:"vaultUri,omitempty"` -} - -// 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_ARM struct { - // ApplicationId: Application ID of the client making request on behalf of a principal - ApplicationId *string `json:"applicationId,omitempty" optionalConfigMapPair:"ApplicationId"` - - // ObjectId: The object ID of a user, service principal or security group in the Azure Active Directory tenant for the - // vault. The object ID must be unique for the list of access policies. - ObjectId *string `json:"objectId,omitempty" optionalConfigMapPair:"ObjectId"` - - // Permissions: Permissions the identity has for keys, secrets and certificates. - Permissions *Permissions_ARM `json:"permissions,omitempty"` - - // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantId *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"` -} - -// A set of rules governing the network accessibility of a vault. -type NetworkRuleSet_ARM struct { - // Bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the - // default is 'AzureServices'. - Bypass *NetworkRuleSet_Bypass_ARM `json:"bypass,omitempty"` - - // DefaultAction: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after - // the bypass property has been evaluated. - DefaultAction *NetworkRuleSet_DefaultAction_ARM `json:"defaultAction,omitempty"` - - // IpRules: The list of IP address rules. - IpRules []IPRule_ARM `json:"ipRules,omitempty"` - - // VirtualNetworkRules: The list of virtual network rules. - VirtualNetworkRules []VirtualNetworkRule_ARM `json:"virtualNetworkRules,omitempty"` -} - -// SKU details -type Sku_ARM struct { - // Family: SKU family name - Family *Sku_Family_ARM `json:"family,omitempty"` - - // Name: SKU name to specify whether the key vault is a standard vault or a premium vault. - Name *Sku_Name_ARM `json:"name,omitempty"` -} - -// +kubebuilder:validation:Enum={"createOrRecover","default","purgeThenCreate","recover"} -type VaultProperties_CreateMode_ARM string - -const ( - VaultProperties_CreateMode_ARM_CreateOrRecover = VaultProperties_CreateMode_ARM("createOrRecover") - VaultProperties_CreateMode_ARM_Default = VaultProperties_CreateMode_ARM("default") - VaultProperties_CreateMode_ARM_PurgeThenCreate = VaultProperties_CreateMode_ARM("purgeThenCreate") - VaultProperties_CreateMode_ARM_Recover = VaultProperties_CreateMode_ARM("recover") -) - -// Mapping from string to VaultProperties_CreateMode_ARM -var vaultProperties_CreateMode_ARM_Values = map[string]VaultProperties_CreateMode_ARM{ - "createorrecover": VaultProperties_CreateMode_ARM_CreateOrRecover, - "default": VaultProperties_CreateMode_ARM_Default, - "purgethencreate": VaultProperties_CreateMode_ARM_PurgeThenCreate, - "recover": VaultProperties_CreateMode_ARM_Recover, -} - -// +kubebuilder:validation:Enum={"RegisteringDns","Succeeded"} -type VaultProperties_ProvisioningState_ARM string - -const ( - VaultProperties_ProvisioningState_ARM_RegisteringDns = VaultProperties_ProvisioningState_ARM("RegisteringDns") - VaultProperties_ProvisioningState_ARM_Succeeded = VaultProperties_ProvisioningState_ARM("Succeeded") -) - -// Mapping from string to VaultProperties_ProvisioningState_ARM -var vaultProperties_ProvisioningState_ARM_Values = map[string]VaultProperties_ProvisioningState_ARM{ - "registeringdns": VaultProperties_ProvisioningState_ARM_RegisteringDns, - "succeeded": VaultProperties_ProvisioningState_ARM_Succeeded, -} - -// A rule governing the accessibility of a vault from a specific ip address or ip range. -type IPRule_ARM struct { - // Value: 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). - Value *string `json:"value,omitempty"` -} - -// +kubebuilder:validation:Enum={"AzureServices","None"} -type NetworkRuleSet_Bypass_ARM string - -const ( - NetworkRuleSet_Bypass_ARM_AzureServices = NetworkRuleSet_Bypass_ARM("AzureServices") - NetworkRuleSet_Bypass_ARM_None = NetworkRuleSet_Bypass_ARM("None") -) - -// Mapping from string to NetworkRuleSet_Bypass_ARM -var networkRuleSet_Bypass_ARM_Values = map[string]NetworkRuleSet_Bypass_ARM{ - "azureservices": NetworkRuleSet_Bypass_ARM_AzureServices, - "none": NetworkRuleSet_Bypass_ARM_None, -} - -// +kubebuilder:validation:Enum={"Allow","Deny"} -type NetworkRuleSet_DefaultAction_ARM string - -const ( - NetworkRuleSet_DefaultAction_ARM_Allow = NetworkRuleSet_DefaultAction_ARM("Allow") - NetworkRuleSet_DefaultAction_ARM_Deny = NetworkRuleSet_DefaultAction_ARM("Deny") -) - -// Mapping from string to NetworkRuleSet_DefaultAction_ARM -var networkRuleSet_DefaultAction_ARM_Values = map[string]NetworkRuleSet_DefaultAction_ARM{ - "allow": NetworkRuleSet_DefaultAction_ARM_Allow, - "deny": NetworkRuleSet_DefaultAction_ARM_Deny, -} - -// Permissions the identity has for keys, secrets, certificates and storage. -type Permissions_ARM struct { - // Certificates: Permissions to certificates - Certificates []Permissions_Certificates_ARM `json:"certificates,omitempty"` - - // Keys: Permissions to keys - Keys []Permissions_Keys_ARM `json:"keys,omitempty"` - - // Secrets: Permissions to secrets - Secrets []Permissions_Secrets_ARM `json:"secrets,omitempty"` - - // Storage: Permissions to storage accounts - Storage []Permissions_Storage_ARM `json:"storage,omitempty"` -} - -// +kubebuilder:validation:Enum={"A"} -type Sku_Family_ARM string - -const Sku_Family_ARM_A = Sku_Family_ARM("A") - -// Mapping from string to Sku_Family_ARM -var sku_Family_ARM_Values = map[string]Sku_Family_ARM{ - "a": Sku_Family_ARM_A, -} - -// +kubebuilder:validation:Enum={"premium","standard"} -type Sku_Name_ARM string - -const ( - Sku_Name_ARM_Premium = Sku_Name_ARM("premium") - Sku_Name_ARM_Standard = Sku_Name_ARM("standard") -) - -// Mapping from string to Sku_Name_ARM -var sku_Name_ARM_Values = map[string]Sku_Name_ARM{ - "premium": Sku_Name_ARM_Premium, - "standard": Sku_Name_ARM_Standard, -} - -// A rule governing the accessibility of a vault from a specific virtual network. -type VirtualNetworkRule_ARM struct { - Id *string `json:"id,omitempty"` - - // IgnoreMissingVnetServiceEndpoint: Property to specify whether NRP will ignore the check if parent subnet has - // serviceEndpoints configured. - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` -} - -// +kubebuilder:validation:Enum={"all","backup","create","delete","deleteissuers","get","getissuers","import","list","listissuers","managecontacts","manageissuers","purge","recover","restore","setissuers","update"} -type Permissions_Certificates_ARM string - -const ( - Permissions_Certificates_ARM_All = Permissions_Certificates_ARM("all") - Permissions_Certificates_ARM_Backup = Permissions_Certificates_ARM("backup") - Permissions_Certificates_ARM_Create = Permissions_Certificates_ARM("create") - Permissions_Certificates_ARM_Delete = Permissions_Certificates_ARM("delete") - Permissions_Certificates_ARM_Deleteissuers = Permissions_Certificates_ARM("deleteissuers") - Permissions_Certificates_ARM_Get = Permissions_Certificates_ARM("get") - Permissions_Certificates_ARM_Getissuers = Permissions_Certificates_ARM("getissuers") - Permissions_Certificates_ARM_Import = Permissions_Certificates_ARM("import") - Permissions_Certificates_ARM_List = Permissions_Certificates_ARM("list") - Permissions_Certificates_ARM_Listissuers = Permissions_Certificates_ARM("listissuers") - Permissions_Certificates_ARM_Managecontacts = Permissions_Certificates_ARM("managecontacts") - Permissions_Certificates_ARM_Manageissuers = Permissions_Certificates_ARM("manageissuers") - Permissions_Certificates_ARM_Purge = Permissions_Certificates_ARM("purge") - Permissions_Certificates_ARM_Recover = Permissions_Certificates_ARM("recover") - Permissions_Certificates_ARM_Restore = Permissions_Certificates_ARM("restore") - Permissions_Certificates_ARM_Setissuers = Permissions_Certificates_ARM("setissuers") - Permissions_Certificates_ARM_Update = Permissions_Certificates_ARM("update") -) - -// Mapping from string to Permissions_Certificates_ARM -var permissions_Certificates_ARM_Values = map[string]Permissions_Certificates_ARM{ - "all": Permissions_Certificates_ARM_All, - "backup": Permissions_Certificates_ARM_Backup, - "create": Permissions_Certificates_ARM_Create, - "delete": Permissions_Certificates_ARM_Delete, - "deleteissuers": Permissions_Certificates_ARM_Deleteissuers, - "get": Permissions_Certificates_ARM_Get, - "getissuers": Permissions_Certificates_ARM_Getissuers, - "import": Permissions_Certificates_ARM_Import, - "list": Permissions_Certificates_ARM_List, - "listissuers": Permissions_Certificates_ARM_Listissuers, - "managecontacts": Permissions_Certificates_ARM_Managecontacts, - "manageissuers": Permissions_Certificates_ARM_Manageissuers, - "purge": Permissions_Certificates_ARM_Purge, - "recover": Permissions_Certificates_ARM_Recover, - "restore": Permissions_Certificates_ARM_Restore, - "setissuers": Permissions_Certificates_ARM_Setissuers, - "update": Permissions_Certificates_ARM_Update, -} - -// +kubebuilder:validation:Enum={"all","backup","create","decrypt","delete","encrypt","get","getrotationpolicy","import","list","purge","recover","release","restore","rotate","setrotationpolicy","sign","unwrapKey","update","verify","wrapKey"} -type Permissions_Keys_ARM string - -const ( - Permissions_Keys_ARM_All = Permissions_Keys_ARM("all") - Permissions_Keys_ARM_Backup = Permissions_Keys_ARM("backup") - Permissions_Keys_ARM_Create = Permissions_Keys_ARM("create") - Permissions_Keys_ARM_Decrypt = Permissions_Keys_ARM("decrypt") - Permissions_Keys_ARM_Delete = Permissions_Keys_ARM("delete") - Permissions_Keys_ARM_Encrypt = Permissions_Keys_ARM("encrypt") - Permissions_Keys_ARM_Get = Permissions_Keys_ARM("get") - Permissions_Keys_ARM_Getrotationpolicy = Permissions_Keys_ARM("getrotationpolicy") - Permissions_Keys_ARM_Import = Permissions_Keys_ARM("import") - Permissions_Keys_ARM_List = Permissions_Keys_ARM("list") - Permissions_Keys_ARM_Purge = Permissions_Keys_ARM("purge") - Permissions_Keys_ARM_Recover = Permissions_Keys_ARM("recover") - Permissions_Keys_ARM_Release = Permissions_Keys_ARM("release") - Permissions_Keys_ARM_Restore = Permissions_Keys_ARM("restore") - Permissions_Keys_ARM_Rotate = Permissions_Keys_ARM("rotate") - Permissions_Keys_ARM_Setrotationpolicy = Permissions_Keys_ARM("setrotationpolicy") - Permissions_Keys_ARM_Sign = Permissions_Keys_ARM("sign") - Permissions_Keys_ARM_UnwrapKey = Permissions_Keys_ARM("unwrapKey") - Permissions_Keys_ARM_Update = Permissions_Keys_ARM("update") - Permissions_Keys_ARM_Verify = Permissions_Keys_ARM("verify") - Permissions_Keys_ARM_WrapKey = Permissions_Keys_ARM("wrapKey") -) - -// Mapping from string to Permissions_Keys_ARM -var permissions_Keys_ARM_Values = map[string]Permissions_Keys_ARM{ - "all": Permissions_Keys_ARM_All, - "backup": Permissions_Keys_ARM_Backup, - "create": Permissions_Keys_ARM_Create, - "decrypt": Permissions_Keys_ARM_Decrypt, - "delete": Permissions_Keys_ARM_Delete, - "encrypt": Permissions_Keys_ARM_Encrypt, - "get": Permissions_Keys_ARM_Get, - "getrotationpolicy": Permissions_Keys_ARM_Getrotationpolicy, - "import": Permissions_Keys_ARM_Import, - "list": Permissions_Keys_ARM_List, - "purge": Permissions_Keys_ARM_Purge, - "recover": Permissions_Keys_ARM_Recover, - "release": Permissions_Keys_ARM_Release, - "restore": Permissions_Keys_ARM_Restore, - "rotate": Permissions_Keys_ARM_Rotate, - "setrotationpolicy": Permissions_Keys_ARM_Setrotationpolicy, - "sign": Permissions_Keys_ARM_Sign, - "unwrapkey": Permissions_Keys_ARM_UnwrapKey, - "update": Permissions_Keys_ARM_Update, - "verify": Permissions_Keys_ARM_Verify, - "wrapkey": Permissions_Keys_ARM_WrapKey, -} - -// +kubebuilder:validation:Enum={"all","backup","delete","get","list","purge","recover","restore","set"} -type Permissions_Secrets_ARM string - -const ( - Permissions_Secrets_ARM_All = Permissions_Secrets_ARM("all") - Permissions_Secrets_ARM_Backup = Permissions_Secrets_ARM("backup") - Permissions_Secrets_ARM_Delete = Permissions_Secrets_ARM("delete") - Permissions_Secrets_ARM_Get = Permissions_Secrets_ARM("get") - Permissions_Secrets_ARM_List = Permissions_Secrets_ARM("list") - Permissions_Secrets_ARM_Purge = Permissions_Secrets_ARM("purge") - Permissions_Secrets_ARM_Recover = Permissions_Secrets_ARM("recover") - Permissions_Secrets_ARM_Restore = Permissions_Secrets_ARM("restore") - Permissions_Secrets_ARM_Set = Permissions_Secrets_ARM("set") -) - -// Mapping from string to Permissions_Secrets_ARM -var permissions_Secrets_ARM_Values = map[string]Permissions_Secrets_ARM{ - "all": Permissions_Secrets_ARM_All, - "backup": Permissions_Secrets_ARM_Backup, - "delete": Permissions_Secrets_ARM_Delete, - "get": Permissions_Secrets_ARM_Get, - "list": Permissions_Secrets_ARM_List, - "purge": Permissions_Secrets_ARM_Purge, - "recover": Permissions_Secrets_ARM_Recover, - "restore": Permissions_Secrets_ARM_Restore, - "set": Permissions_Secrets_ARM_Set, -} - -// +kubebuilder:validation:Enum={"all","backup","delete","deletesas","get","getsas","list","listsas","purge","recover","regeneratekey","restore","set","setsas","update"} -type Permissions_Storage_ARM string - -const ( - Permissions_Storage_ARM_All = Permissions_Storage_ARM("all") - Permissions_Storage_ARM_Backup = Permissions_Storage_ARM("backup") - Permissions_Storage_ARM_Delete = Permissions_Storage_ARM("delete") - Permissions_Storage_ARM_Deletesas = Permissions_Storage_ARM("deletesas") - Permissions_Storage_ARM_Get = Permissions_Storage_ARM("get") - Permissions_Storage_ARM_Getsas = Permissions_Storage_ARM("getsas") - Permissions_Storage_ARM_List = Permissions_Storage_ARM("list") - Permissions_Storage_ARM_Listsas = Permissions_Storage_ARM("listsas") - Permissions_Storage_ARM_Purge = Permissions_Storage_ARM("purge") - Permissions_Storage_ARM_Recover = Permissions_Storage_ARM("recover") - Permissions_Storage_ARM_Regeneratekey = Permissions_Storage_ARM("regeneratekey") - Permissions_Storage_ARM_Restore = Permissions_Storage_ARM("restore") - Permissions_Storage_ARM_Set = Permissions_Storage_ARM("set") - Permissions_Storage_ARM_Setsas = Permissions_Storage_ARM("setsas") - Permissions_Storage_ARM_Update = Permissions_Storage_ARM("update") -) - -// Mapping from string to Permissions_Storage_ARM -var permissions_Storage_ARM_Values = map[string]Permissions_Storage_ARM{ - "all": Permissions_Storage_ARM_All, - "backup": Permissions_Storage_ARM_Backup, - "delete": Permissions_Storage_ARM_Delete, - "deletesas": Permissions_Storage_ARM_Deletesas, - "get": Permissions_Storage_ARM_Get, - "getsas": Permissions_Storage_ARM_Getsas, - "list": Permissions_Storage_ARM_List, - "listsas": Permissions_Storage_ARM_Listsas, - "purge": Permissions_Storage_ARM_Purge, - "recover": Permissions_Storage_ARM_Recover, - "regeneratekey": Permissions_Storage_ARM_Regeneratekey, - "restore": Permissions_Storage_ARM_Restore, - "set": Permissions_Storage_ARM_Set, - "setsas": Permissions_Storage_ARM_Setsas, - "update": Permissions_Storage_ARM_Update, -} diff --git a/v2/api/keyvault/v1api20230701/vault_spec_arm_types_gen_test.go b/v2/api/keyvault/v1api20230701/vault_spec_arm_types_gen_test.go deleted file mode 100644 index 9c29c16c1f7..00000000000 --- a/v2/api/keyvault/v1api20230701/vault_spec_arm_types_gen_test.go +++ /dev/null @@ -1,649 +0,0 @@ -// Code generated by azure-service-operator-codegen. DO NOT EDIT. -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -package v1api20230701 - -import ( - "encoding/json" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" - "github.com/kr/pretty" - "github.com/kylelemons/godebug/diff" - "github.com/leanovate/gopter" - "github.com/leanovate/gopter/gen" - "github.com/leanovate/gopter/prop" - "os" - "reflect" - "testing" -) - -func Test_AccessPolicyEntry_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of AccessPolicyEntry_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForAccessPolicyEntry_ARM, AccessPolicyEntry_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForAccessPolicyEntry_ARM runs a test to see if a specific instance of AccessPolicyEntry_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForAccessPolicyEntry_ARM(subject AccessPolicyEntry_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual AccessPolicyEntry_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of AccessPolicyEntry_ARM instances for property testing - lazily instantiated by -// AccessPolicyEntry_ARMGenerator() -var accessPolicyEntry_ARMGenerator gopter.Gen - -// AccessPolicyEntry_ARMGenerator returns a generator of AccessPolicyEntry_ARM instances for property testing. -// We first initialize accessPolicyEntry_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func AccessPolicyEntry_ARMGenerator() gopter.Gen { - if accessPolicyEntry_ARMGenerator != nil { - return accessPolicyEntry_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForAccessPolicyEntry_ARM(generators) - accessPolicyEntry_ARMGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForAccessPolicyEntry_ARM(generators) - AddRelatedPropertyGeneratorsForAccessPolicyEntry_ARM(generators) - accessPolicyEntry_ARMGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry_ARM{}), generators) - - return accessPolicyEntry_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForAccessPolicyEntry_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForAccessPolicyEntry_ARM(gens map[string]gopter.Gen) { - gens["ApplicationId"] = gen.PtrOf(gen.AlphaString()) - gens["ObjectId"] = gen.PtrOf(gen.AlphaString()) - gens["TenantId"] = gen.PtrOf(gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForAccessPolicyEntry_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForAccessPolicyEntry_ARM(gens map[string]gopter.Gen) { - gens["Permissions"] = gen.PtrOf(Permissions_ARMGenerator()) -} - -func Test_IPRule_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of IPRule_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForIPRule_ARM, IPRule_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForIPRule_ARM runs a test to see if a specific instance of IPRule_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForIPRule_ARM(subject IPRule_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual IPRule_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of IPRule_ARM instances for property testing - lazily instantiated by IPRule_ARMGenerator() -var ipRule_ARMGenerator gopter.Gen - -// IPRule_ARMGenerator returns a generator of IPRule_ARM instances for property testing. -func IPRule_ARMGenerator() gopter.Gen { - if ipRule_ARMGenerator != nil { - return ipRule_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForIPRule_ARM(generators) - ipRule_ARMGenerator = gen.Struct(reflect.TypeOf(IPRule_ARM{}), generators) - - return ipRule_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForIPRule_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForIPRule_ARM(gens map[string]gopter.Gen) { - gens["Value"] = gen.PtrOf(gen.AlphaString()) -} - -func Test_NetworkRuleSet_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of NetworkRuleSet_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForNetworkRuleSet_ARM, NetworkRuleSet_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForNetworkRuleSet_ARM runs a test to see if a specific instance of NetworkRuleSet_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForNetworkRuleSet_ARM(subject NetworkRuleSet_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual NetworkRuleSet_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of NetworkRuleSet_ARM instances for property testing - lazily instantiated by NetworkRuleSet_ARMGenerator() -var networkRuleSet_ARMGenerator gopter.Gen - -// NetworkRuleSet_ARMGenerator returns a generator of NetworkRuleSet_ARM instances for property testing. -// We first initialize networkRuleSet_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func NetworkRuleSet_ARMGenerator() gopter.Gen { - if networkRuleSet_ARMGenerator != nil { - return networkRuleSet_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForNetworkRuleSet_ARM(generators) - networkRuleSet_ARMGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForNetworkRuleSet_ARM(generators) - AddRelatedPropertyGeneratorsForNetworkRuleSet_ARM(generators) - networkRuleSet_ARMGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_ARM{}), generators) - - return networkRuleSet_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForNetworkRuleSet_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForNetworkRuleSet_ARM(gens map[string]gopter.Gen) { - gens["Bypass"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_Bypass_ARM_AzureServices, NetworkRuleSet_Bypass_ARM_None)) - gens["DefaultAction"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_DefaultAction_ARM_Allow, NetworkRuleSet_DefaultAction_ARM_Deny)) -} - -// AddRelatedPropertyGeneratorsForNetworkRuleSet_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForNetworkRuleSet_ARM(gens map[string]gopter.Gen) { - gens["IpRules"] = gen.SliceOf(IPRule_ARMGenerator()) - gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRule_ARMGenerator()) -} - -func Test_Permissions_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of Permissions_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForPermissions_ARM, Permissions_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForPermissions_ARM runs a test to see if a specific instance of Permissions_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForPermissions_ARM(subject Permissions_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual Permissions_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of Permissions_ARM instances for property testing - lazily instantiated by Permissions_ARMGenerator() -var permissions_ARMGenerator gopter.Gen - -// Permissions_ARMGenerator returns a generator of Permissions_ARM instances for property testing. -func Permissions_ARMGenerator() gopter.Gen { - if permissions_ARMGenerator != nil { - return permissions_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPermissions_ARM(generators) - permissions_ARMGenerator = gen.Struct(reflect.TypeOf(Permissions_ARM{}), generators) - - return permissions_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForPermissions_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForPermissions_ARM(gens map[string]gopter.Gen) { - gens["Certificates"] = gen.SliceOf(gen.OneConstOf( - Permissions_Certificates_ARM_All, - Permissions_Certificates_ARM_Backup, - Permissions_Certificates_ARM_Create, - Permissions_Certificates_ARM_Delete, - Permissions_Certificates_ARM_Deleteissuers, - Permissions_Certificates_ARM_Get, - Permissions_Certificates_ARM_Getissuers, - Permissions_Certificates_ARM_Import, - Permissions_Certificates_ARM_List, - Permissions_Certificates_ARM_Listissuers, - Permissions_Certificates_ARM_Managecontacts, - Permissions_Certificates_ARM_Manageissuers, - Permissions_Certificates_ARM_Purge, - Permissions_Certificates_ARM_Recover, - Permissions_Certificates_ARM_Restore, - Permissions_Certificates_ARM_Setissuers, - Permissions_Certificates_ARM_Update)) - gens["Keys"] = gen.SliceOf(gen.OneConstOf( - Permissions_Keys_ARM_All, - Permissions_Keys_ARM_Backup, - Permissions_Keys_ARM_Create, - Permissions_Keys_ARM_Decrypt, - Permissions_Keys_ARM_Delete, - Permissions_Keys_ARM_Encrypt, - Permissions_Keys_ARM_Get, - Permissions_Keys_ARM_Getrotationpolicy, - Permissions_Keys_ARM_Import, - Permissions_Keys_ARM_List, - Permissions_Keys_ARM_Purge, - Permissions_Keys_ARM_Recover, - Permissions_Keys_ARM_Release, - Permissions_Keys_ARM_Restore, - Permissions_Keys_ARM_Rotate, - Permissions_Keys_ARM_Setrotationpolicy, - Permissions_Keys_ARM_Sign, - Permissions_Keys_ARM_UnwrapKey, - Permissions_Keys_ARM_Update, - Permissions_Keys_ARM_Verify, - Permissions_Keys_ARM_WrapKey)) - gens["Secrets"] = gen.SliceOf(gen.OneConstOf( - Permissions_Secrets_ARM_All, - Permissions_Secrets_ARM_Backup, - Permissions_Secrets_ARM_Delete, - Permissions_Secrets_ARM_Get, - Permissions_Secrets_ARM_List, - Permissions_Secrets_ARM_Purge, - Permissions_Secrets_ARM_Recover, - Permissions_Secrets_ARM_Restore, - Permissions_Secrets_ARM_Set)) - gens["Storage"] = gen.SliceOf(gen.OneConstOf( - Permissions_Storage_ARM_All, - Permissions_Storage_ARM_Backup, - Permissions_Storage_ARM_Delete, - Permissions_Storage_ARM_Deletesas, - Permissions_Storage_ARM_Get, - Permissions_Storage_ARM_Getsas, - Permissions_Storage_ARM_List, - Permissions_Storage_ARM_Listsas, - Permissions_Storage_ARM_Purge, - Permissions_Storage_ARM_Recover, - Permissions_Storage_ARM_Regeneratekey, - Permissions_Storage_ARM_Restore, - Permissions_Storage_ARM_Set, - Permissions_Storage_ARM_Setsas, - Permissions_Storage_ARM_Update)) -} - -func Test_Sku_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of Sku_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForSku_ARM, Sku_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForSku_ARM runs a test to see if a specific instance of Sku_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForSku_ARM(subject Sku_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual Sku_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of Sku_ARM instances for property testing - lazily instantiated by Sku_ARMGenerator() -var sku_ARMGenerator gopter.Gen - -// Sku_ARMGenerator returns a generator of Sku_ARM instances for property testing. -func Sku_ARMGenerator() gopter.Gen { - if sku_ARMGenerator != nil { - return sku_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForSku_ARM(generators) - sku_ARMGenerator = gen.Struct(reflect.TypeOf(Sku_ARM{}), generators) - - return sku_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForSku_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForSku_ARM(gens map[string]gopter.Gen) { - gens["Family"] = gen.PtrOf(gen.OneConstOf(Sku_Family_ARM_A)) - gens["Name"] = gen.PtrOf(gen.OneConstOf(Sku_Name_ARM_Premium, Sku_Name_ARM_Standard)) -} - -func Test_VaultProperties_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of VaultProperties_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForVaultProperties_ARM, VaultProperties_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForVaultProperties_ARM runs a test to see if a specific instance of VaultProperties_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForVaultProperties_ARM(subject VaultProperties_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual VaultProperties_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of VaultProperties_ARM instances for property testing - lazily instantiated by -// VaultProperties_ARMGenerator() -var vaultProperties_ARMGenerator gopter.Gen - -// VaultProperties_ARMGenerator returns a generator of VaultProperties_ARM instances for property testing. -// We first initialize vaultProperties_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func VaultProperties_ARMGenerator() gopter.Gen { - if vaultProperties_ARMGenerator != nil { - return vaultProperties_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVaultProperties_ARM(generators) - vaultProperties_ARMGenerator = gen.Struct(reflect.TypeOf(VaultProperties_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVaultProperties_ARM(generators) - AddRelatedPropertyGeneratorsForVaultProperties_ARM(generators) - vaultProperties_ARMGenerator = gen.Struct(reflect.TypeOf(VaultProperties_ARM{}), generators) - - return vaultProperties_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForVaultProperties_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForVaultProperties_ARM(gens map[string]gopter.Gen) { - gens["CreateMode"] = gen.PtrOf(gen.OneConstOf( - VaultProperties_CreateMode_ARM_CreateOrRecover, - VaultProperties_CreateMode_ARM_Default, - VaultProperties_CreateMode_ARM_PurgeThenCreate, - VaultProperties_CreateMode_ARM_Recover)) - gens["EnablePurgeProtection"] = gen.PtrOf(gen.Bool()) - gens["EnableRbacAuthorization"] = gen.PtrOf(gen.Bool()) - gens["EnableSoftDelete"] = gen.PtrOf(gen.Bool()) - gens["EnabledForDeployment"] = gen.PtrOf(gen.Bool()) - gens["EnabledForDiskEncryption"] = gen.PtrOf(gen.Bool()) - gens["EnabledForTemplateDeployment"] = gen.PtrOf(gen.Bool()) - gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(VaultProperties_ProvisioningState_ARM_RegisteringDns, VaultProperties_ProvisioningState_ARM_Succeeded)) - gens["PublicNetworkAccess"] = gen.PtrOf(gen.AlphaString()) - gens["SoftDeleteRetentionInDays"] = gen.PtrOf(gen.Int()) - gens["TenantId"] = gen.PtrOf(gen.AlphaString()) - gens["VaultUri"] = gen.PtrOf(gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForVaultProperties_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForVaultProperties_ARM(gens map[string]gopter.Gen) { - gens["AccessPolicies"] = gen.SliceOf(AccessPolicyEntry_ARMGenerator()) - gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSet_ARMGenerator()) - gens["Sku"] = gen.PtrOf(Sku_ARMGenerator()) -} - -func Test_Vault_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of Vault_Spec_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForVault_Spec_ARM, Vault_Spec_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForVault_Spec_ARM runs a test to see if a specific instance of Vault_Spec_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForVault_Spec_ARM(subject Vault_Spec_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual Vault_Spec_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of Vault_Spec_ARM instances for property testing - lazily instantiated by Vault_Spec_ARMGenerator() -var vault_Spec_ARMGenerator gopter.Gen - -// Vault_Spec_ARMGenerator returns a generator of Vault_Spec_ARM instances for property testing. -// We first initialize vault_Spec_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func Vault_Spec_ARMGenerator() gopter.Gen { - if vault_Spec_ARMGenerator != nil { - return vault_Spec_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVault_Spec_ARM(generators) - vault_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(Vault_Spec_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVault_Spec_ARM(generators) - AddRelatedPropertyGeneratorsForVault_Spec_ARM(generators) - vault_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(Vault_Spec_ARM{}), generators) - - return vault_Spec_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForVault_Spec_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForVault_Spec_ARM(gens map[string]gopter.Gen) { - gens["Location"] = gen.PtrOf(gen.AlphaString()) - gens["Name"] = gen.AlphaString() - gens["Tags"] = gen.MapOf( - gen.AlphaString(), - gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForVault_Spec_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForVault_Spec_ARM(gens map[string]gopter.Gen) { - gens["Properties"] = gen.PtrOf(VaultProperties_ARMGenerator()) -} - -func Test_VirtualNetworkRule_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 100 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of VirtualNetworkRule_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule_ARM, VirtualNetworkRule_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForVirtualNetworkRule_ARM runs a test to see if a specific instance of VirtualNetworkRule_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForVirtualNetworkRule_ARM(subject VirtualNetworkRule_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual VirtualNetworkRule_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of VirtualNetworkRule_ARM instances for property testing - lazily instantiated by -// VirtualNetworkRule_ARMGenerator() -var virtualNetworkRule_ARMGenerator gopter.Gen - -// VirtualNetworkRule_ARMGenerator returns a generator of VirtualNetworkRule_ARM instances for property testing. -func VirtualNetworkRule_ARMGenerator() gopter.Gen { - if virtualNetworkRule_ARMGenerator != nil { - return virtualNetworkRule_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVirtualNetworkRule_ARM(generators) - virtualNetworkRule_ARMGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule_ARM{}), generators) - - return virtualNetworkRule_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForVirtualNetworkRule_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForVirtualNetworkRule_ARM(gens map[string]gopter.Gen) { - gens["Id"] = gen.PtrOf(gen.AlphaString()) - gens["IgnoreMissingVnetServiceEndpoint"] = gen.PtrOf(gen.Bool()) -} diff --git a/v2/api/keyvault/v1api20230701/vault_status_arm_types_gen.go b/v2/api/keyvault/v1api20230701/vault_status_arm_types_gen.go deleted file mode 100644 index a866dd1cd74..00000000000 --- a/v2/api/keyvault/v1api20230701/vault_status_arm_types_gen.go +++ /dev/null @@ -1,543 +0,0 @@ -// Code generated by azure-service-operator-codegen. DO NOT EDIT. -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -package v1api20230701 - -// Resource information with extended details. -type Vault_STATUS_ARM struct { - // Id: Fully qualified identifier of the key vault resource. - Id *string `json:"id,omitempty"` - - // Location: Azure location of the key vault resource. - Location *string `json:"location,omitempty"` - - // Name: Name of the key vault resource. - Name *string `json:"name,omitempty"` - - // Properties: Properties of the vault - Properties *VaultProperties_STATUS_ARM `json:"properties,omitempty"` - - // SystemData: System metadata for the key vault. - SystemData *SystemData_STATUS_ARM `json:"systemData,omitempty"` - - // Tags: Tags assigned to the key vault resource. - Tags map[string]string `json:"tags,omitempty"` - - // Type: Resource type of the key vault resource. - Type *string `json:"type,omitempty"` -} - -// Metadata pertaining to creation and last modification of the key vault resource. -type SystemData_STATUS_ARM struct { - // CreatedAt: The timestamp of the key vault resource creation (UTC). - CreatedAt *string `json:"createdAt,omitempty"` - - // CreatedBy: The identity that created the key vault resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // CreatedByType: The type of identity that created the key vault resource. - CreatedByType *IdentityType_STATUS_ARM `json:"createdByType,omitempty"` - - // LastModifiedAt: The timestamp of the key vault resource last modification (UTC). - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - - // LastModifiedBy: The identity that last modified the key vault resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // LastModifiedByType: The type of identity that last modified the key vault resource. - LastModifiedByType *IdentityType_STATUS_ARM `json:"lastModifiedByType,omitempty"` -} - -// Properties of the vault -type VaultProperties_STATUS_ARM struct { - // AccessPolicies: An array of 0 to 1024 identities 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. When `createMode` is set to `recover`, access policies are not - // required. Otherwise, access policies are required. - AccessPolicies []AccessPolicyEntry_STATUS_ARM `json:"accessPolicies,omitempty"` - - // CreateMode: The vault's create mode to indicate whether the vault need to be recovered or not. - CreateMode *VaultProperties_CreateMode_STATUS_ARM `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"` - - // EnableRbacAuthorization: Property that controls how data actions are authorized. When true, the key vault will use Role - // Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties - // will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy - // stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value - // of false. Note that management actions are always authorized with RBAC. - EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"` - - // EnableSoftDelete: Property to specify whether the 'soft delete' functionality is enabled for this key vault. If it's not - // set to any value(true or false) when creating new key vault, it will be set to true by default. Once set to true, it - // cannot be reverted to false. - EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` - - // EnabledForDeployment: Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored - // as secrets from the key vault. - EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` - - // EnabledForDiskEncryption: Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the - // vault and unwrap keys. - 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"` - - // HsmPoolResourceId: The resource id of HSM Pool. - HsmPoolResourceId *string `json:"hsmPoolResourceId,omitempty"` - - // NetworkAcls: Rules governing the accessibility of the key vault from specific network locations. - NetworkAcls *NetworkRuleSet_STATUS_ARM `json:"networkAcls,omitempty"` - - // PrivateEndpointConnections: List of private endpoint connections associated with the key vault. - PrivateEndpointConnections []PrivateEndpointConnectionItem_STATUS_ARM `json:"privateEndpointConnections,omitempty"` - - // ProvisioningState: Provisioning state of the vault. - ProvisioningState *VaultProperties_ProvisioningState_STATUS_ARM `json:"provisioningState,omitempty"` - - // PublicNetworkAccess: Property to specify whether the vault will accept traffic from public internet. If set to - // 'disabled' all traffic except private endpoint traffic and that that originates from trusted services will be blocked. - // This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor the - // rules. - PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` - - // Sku: SKU details - Sku *Sku_STATUS_ARM `json:"sku,omitempty"` - - // SoftDeleteRetentionInDays: softDelete data retention days. It accepts >=7 and <=90. - SoftDeleteRetentionInDays *int `json:"softDeleteRetentionInDays,omitempty"` - - // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantId *string `json:"tenantId,omitempty"` - - // VaultUri: The URI of the vault for performing operations on keys and secrets. - VaultUri *string `json:"vaultUri,omitempty"` -} - -// 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_STATUS_ARM struct { - // ApplicationId: Application ID of the client making request on behalf of a principal - ApplicationId *string `json:"applicationId,omitempty"` - - // ObjectId: The object ID of a user, service principal or security group in the Azure Active Directory tenant for the - // vault. The object ID must be unique for the list of access policies. - ObjectId *string `json:"objectId,omitempty"` - - // Permissions: Permissions the identity has for keys, secrets and certificates. - Permissions *Permissions_STATUS_ARM `json:"permissions,omitempty"` - - // TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantId *string `json:"tenantId,omitempty"` -} - -// The type of identity. -type IdentityType_STATUS_ARM string - -const ( - IdentityType_STATUS_ARM_Application = IdentityType_STATUS_ARM("Application") - IdentityType_STATUS_ARM_Key = IdentityType_STATUS_ARM("Key") - IdentityType_STATUS_ARM_ManagedIdentity = IdentityType_STATUS_ARM("ManagedIdentity") - IdentityType_STATUS_ARM_User = IdentityType_STATUS_ARM("User") -) - -// Mapping from string to IdentityType_STATUS_ARM -var identityType_STATUS_ARM_Values = map[string]IdentityType_STATUS_ARM{ - "application": IdentityType_STATUS_ARM_Application, - "key": IdentityType_STATUS_ARM_Key, - "managedidentity": IdentityType_STATUS_ARM_ManagedIdentity, - "user": IdentityType_STATUS_ARM_User, -} - -// A set of rules governing the network accessibility of a vault. -type NetworkRuleSet_STATUS_ARM struct { - // Bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the - // default is 'AzureServices'. - Bypass *NetworkRuleSet_Bypass_STATUS_ARM `json:"bypass,omitempty"` - - // DefaultAction: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after - // the bypass property has been evaluated. - DefaultAction *NetworkRuleSet_DefaultAction_STATUS_ARM `json:"defaultAction,omitempty"` - - // IpRules: The list of IP address rules. - IpRules []IPRule_STATUS_ARM `json:"ipRules,omitempty"` - - // VirtualNetworkRules: The list of virtual network rules. - VirtualNetworkRules []VirtualNetworkRule_STATUS_ARM `json:"virtualNetworkRules,omitempty"` -} - -// Private endpoint connection item. -type PrivateEndpointConnectionItem_STATUS_ARM struct { - // Etag: Modified whenever there is a change in the state of private endpoint connection. - Etag *string `json:"etag,omitempty"` - - // Id: Id of private endpoint connection. - Id *string `json:"id,omitempty"` - - // Properties: Private endpoint connection properties. - Properties *PrivateEndpointConnectionProperties_STATUS_ARM `json:"properties,omitempty"` -} - -// SKU details -type Sku_STATUS_ARM struct { - // Family: SKU family name - Family *Sku_Family_STATUS_ARM `json:"family,omitempty"` - - // Name: SKU name to specify whether the key vault is a standard vault or a premium vault. - Name *Sku_Name_STATUS_ARM `json:"name,omitempty"` -} - -type VaultProperties_CreateMode_STATUS_ARM string - -const ( - VaultProperties_CreateMode_STATUS_ARM_CreateOrRecover = VaultProperties_CreateMode_STATUS_ARM("createOrRecover") - VaultProperties_CreateMode_STATUS_ARM_Default = VaultProperties_CreateMode_STATUS_ARM("default") - VaultProperties_CreateMode_STATUS_ARM_PurgeThenCreate = VaultProperties_CreateMode_STATUS_ARM("purgeThenCreate") - VaultProperties_CreateMode_STATUS_ARM_Recover = VaultProperties_CreateMode_STATUS_ARM("recover") -) - -// Mapping from string to VaultProperties_CreateMode_STATUS_ARM -var vaultProperties_CreateMode_STATUS_ARM_Values = map[string]VaultProperties_CreateMode_STATUS_ARM{ - "createorrecover": VaultProperties_CreateMode_STATUS_ARM_CreateOrRecover, - "default": VaultProperties_CreateMode_STATUS_ARM_Default, - "purgethencreate": VaultProperties_CreateMode_STATUS_ARM_PurgeThenCreate, - "recover": VaultProperties_CreateMode_STATUS_ARM_Recover, -} - -type VaultProperties_ProvisioningState_STATUS_ARM string - -const ( - VaultProperties_ProvisioningState_STATUS_ARM_RegisteringDns = VaultProperties_ProvisioningState_STATUS_ARM("RegisteringDns") - VaultProperties_ProvisioningState_STATUS_ARM_Succeeded = VaultProperties_ProvisioningState_STATUS_ARM("Succeeded") -) - -// Mapping from string to VaultProperties_ProvisioningState_STATUS_ARM -var vaultProperties_ProvisioningState_STATUS_ARM_Values = map[string]VaultProperties_ProvisioningState_STATUS_ARM{ - "registeringdns": VaultProperties_ProvisioningState_STATUS_ARM_RegisteringDns, - "succeeded": VaultProperties_ProvisioningState_STATUS_ARM_Succeeded, -} - -// A rule governing the accessibility of a vault from a specific ip address or ip range. -type IPRule_STATUS_ARM struct { - // Value: 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). - Value *string `json:"value,omitempty"` -} - -type NetworkRuleSet_Bypass_STATUS_ARM string - -const ( - NetworkRuleSet_Bypass_STATUS_ARM_AzureServices = NetworkRuleSet_Bypass_STATUS_ARM("AzureServices") - NetworkRuleSet_Bypass_STATUS_ARM_None = NetworkRuleSet_Bypass_STATUS_ARM("None") -) - -// Mapping from string to NetworkRuleSet_Bypass_STATUS_ARM -var networkRuleSet_Bypass_STATUS_ARM_Values = map[string]NetworkRuleSet_Bypass_STATUS_ARM{ - "azureservices": NetworkRuleSet_Bypass_STATUS_ARM_AzureServices, - "none": NetworkRuleSet_Bypass_STATUS_ARM_None, -} - -type NetworkRuleSet_DefaultAction_STATUS_ARM string - -const ( - NetworkRuleSet_DefaultAction_STATUS_ARM_Allow = NetworkRuleSet_DefaultAction_STATUS_ARM("Allow") - NetworkRuleSet_DefaultAction_STATUS_ARM_Deny = NetworkRuleSet_DefaultAction_STATUS_ARM("Deny") -) - -// Mapping from string to NetworkRuleSet_DefaultAction_STATUS_ARM -var networkRuleSet_DefaultAction_STATUS_ARM_Values = map[string]NetworkRuleSet_DefaultAction_STATUS_ARM{ - "allow": NetworkRuleSet_DefaultAction_STATUS_ARM_Allow, - "deny": NetworkRuleSet_DefaultAction_STATUS_ARM_Deny, -} - -// Permissions the identity has for keys, secrets, certificates and storage. -type Permissions_STATUS_ARM struct { - // Certificates: Permissions to certificates - Certificates []Permissions_Certificates_STATUS_ARM `json:"certificates,omitempty"` - - // Keys: Permissions to keys - Keys []Permissions_Keys_STATUS_ARM `json:"keys,omitempty"` - - // Secrets: Permissions to secrets - Secrets []Permissions_Secrets_STATUS_ARM `json:"secrets,omitempty"` - - // Storage: Permissions to storage accounts - Storage []Permissions_Storage_STATUS_ARM `json:"storage,omitempty"` -} - -// Properties of the private endpoint connection resource. -type PrivateEndpointConnectionProperties_STATUS_ARM struct { - // PrivateEndpoint: Properties of the private endpoint object. - PrivateEndpoint *PrivateEndpoint_STATUS_ARM `json:"privateEndpoint,omitempty"` - - // PrivateLinkServiceConnectionState: Approval state of the private link connection. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState_STATUS_ARM `json:"privateLinkServiceConnectionState,omitempty"` - - // ProvisioningState: Provisioning state of the private endpoint connection. - ProvisioningState *PrivateEndpointConnectionProvisioningState_STATUS_ARM `json:"provisioningState,omitempty"` -} - -type Sku_Family_STATUS_ARM string - -const Sku_Family_STATUS_ARM_A = Sku_Family_STATUS_ARM("A") - -// Mapping from string to Sku_Family_STATUS_ARM -var sku_Family_STATUS_ARM_Values = map[string]Sku_Family_STATUS_ARM{ - "a": Sku_Family_STATUS_ARM_A, -} - -type Sku_Name_STATUS_ARM string - -const ( - Sku_Name_STATUS_ARM_Premium = Sku_Name_STATUS_ARM("premium") - Sku_Name_STATUS_ARM_Standard = Sku_Name_STATUS_ARM("standard") -) - -// Mapping from string to Sku_Name_STATUS_ARM -var sku_Name_STATUS_ARM_Values = map[string]Sku_Name_STATUS_ARM{ - "premium": Sku_Name_STATUS_ARM_Premium, - "standard": Sku_Name_STATUS_ARM_Standard, -} - -// A rule governing the accessibility of a vault from a specific virtual network. -type VirtualNetworkRule_STATUS_ARM struct { - // Id: 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"` - - // IgnoreMissingVnetServiceEndpoint: Property to specify whether NRP will ignore the check if parent subnet has - // serviceEndpoints configured. - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` -} - -type Permissions_Certificates_STATUS_ARM string - -const ( - Permissions_Certificates_STATUS_ARM_All = Permissions_Certificates_STATUS_ARM("all") - Permissions_Certificates_STATUS_ARM_Backup = Permissions_Certificates_STATUS_ARM("backup") - Permissions_Certificates_STATUS_ARM_Create = Permissions_Certificates_STATUS_ARM("create") - Permissions_Certificates_STATUS_ARM_Delete = Permissions_Certificates_STATUS_ARM("delete") - Permissions_Certificates_STATUS_ARM_Deleteissuers = Permissions_Certificates_STATUS_ARM("deleteissuers") - Permissions_Certificates_STATUS_ARM_Get = Permissions_Certificates_STATUS_ARM("get") - Permissions_Certificates_STATUS_ARM_Getissuers = Permissions_Certificates_STATUS_ARM("getissuers") - Permissions_Certificates_STATUS_ARM_Import = Permissions_Certificates_STATUS_ARM("import") - Permissions_Certificates_STATUS_ARM_List = Permissions_Certificates_STATUS_ARM("list") - Permissions_Certificates_STATUS_ARM_Listissuers = Permissions_Certificates_STATUS_ARM("listissuers") - Permissions_Certificates_STATUS_ARM_Managecontacts = Permissions_Certificates_STATUS_ARM("managecontacts") - Permissions_Certificates_STATUS_ARM_Manageissuers = Permissions_Certificates_STATUS_ARM("manageissuers") - Permissions_Certificates_STATUS_ARM_Purge = Permissions_Certificates_STATUS_ARM("purge") - Permissions_Certificates_STATUS_ARM_Recover = Permissions_Certificates_STATUS_ARM("recover") - Permissions_Certificates_STATUS_ARM_Restore = Permissions_Certificates_STATUS_ARM("restore") - Permissions_Certificates_STATUS_ARM_Setissuers = Permissions_Certificates_STATUS_ARM("setissuers") - Permissions_Certificates_STATUS_ARM_Update = Permissions_Certificates_STATUS_ARM("update") -) - -// Mapping from string to Permissions_Certificates_STATUS_ARM -var permissions_Certificates_STATUS_ARM_Values = map[string]Permissions_Certificates_STATUS_ARM{ - "all": Permissions_Certificates_STATUS_ARM_All, - "backup": Permissions_Certificates_STATUS_ARM_Backup, - "create": Permissions_Certificates_STATUS_ARM_Create, - "delete": Permissions_Certificates_STATUS_ARM_Delete, - "deleteissuers": Permissions_Certificates_STATUS_ARM_Deleteissuers, - "get": Permissions_Certificates_STATUS_ARM_Get, - "getissuers": Permissions_Certificates_STATUS_ARM_Getissuers, - "import": Permissions_Certificates_STATUS_ARM_Import, - "list": Permissions_Certificates_STATUS_ARM_List, - "listissuers": Permissions_Certificates_STATUS_ARM_Listissuers, - "managecontacts": Permissions_Certificates_STATUS_ARM_Managecontacts, - "manageissuers": Permissions_Certificates_STATUS_ARM_Manageissuers, - "purge": Permissions_Certificates_STATUS_ARM_Purge, - "recover": Permissions_Certificates_STATUS_ARM_Recover, - "restore": Permissions_Certificates_STATUS_ARM_Restore, - "setissuers": Permissions_Certificates_STATUS_ARM_Setissuers, - "update": Permissions_Certificates_STATUS_ARM_Update, -} - -type Permissions_Keys_STATUS_ARM string - -const ( - Permissions_Keys_STATUS_ARM_All = Permissions_Keys_STATUS_ARM("all") - Permissions_Keys_STATUS_ARM_Backup = Permissions_Keys_STATUS_ARM("backup") - Permissions_Keys_STATUS_ARM_Create = Permissions_Keys_STATUS_ARM("create") - Permissions_Keys_STATUS_ARM_Decrypt = Permissions_Keys_STATUS_ARM("decrypt") - Permissions_Keys_STATUS_ARM_Delete = Permissions_Keys_STATUS_ARM("delete") - Permissions_Keys_STATUS_ARM_Encrypt = Permissions_Keys_STATUS_ARM("encrypt") - Permissions_Keys_STATUS_ARM_Get = Permissions_Keys_STATUS_ARM("get") - Permissions_Keys_STATUS_ARM_Getrotationpolicy = Permissions_Keys_STATUS_ARM("getrotationpolicy") - Permissions_Keys_STATUS_ARM_Import = Permissions_Keys_STATUS_ARM("import") - Permissions_Keys_STATUS_ARM_List = Permissions_Keys_STATUS_ARM("list") - Permissions_Keys_STATUS_ARM_Purge = Permissions_Keys_STATUS_ARM("purge") - Permissions_Keys_STATUS_ARM_Recover = Permissions_Keys_STATUS_ARM("recover") - Permissions_Keys_STATUS_ARM_Release = Permissions_Keys_STATUS_ARM("release") - Permissions_Keys_STATUS_ARM_Restore = Permissions_Keys_STATUS_ARM("restore") - Permissions_Keys_STATUS_ARM_Rotate = Permissions_Keys_STATUS_ARM("rotate") - Permissions_Keys_STATUS_ARM_Setrotationpolicy = Permissions_Keys_STATUS_ARM("setrotationpolicy") - Permissions_Keys_STATUS_ARM_Sign = Permissions_Keys_STATUS_ARM("sign") - Permissions_Keys_STATUS_ARM_UnwrapKey = Permissions_Keys_STATUS_ARM("unwrapKey") - Permissions_Keys_STATUS_ARM_Update = Permissions_Keys_STATUS_ARM("update") - Permissions_Keys_STATUS_ARM_Verify = Permissions_Keys_STATUS_ARM("verify") - Permissions_Keys_STATUS_ARM_WrapKey = Permissions_Keys_STATUS_ARM("wrapKey") -) - -// Mapping from string to Permissions_Keys_STATUS_ARM -var permissions_Keys_STATUS_ARM_Values = map[string]Permissions_Keys_STATUS_ARM{ - "all": Permissions_Keys_STATUS_ARM_All, - "backup": Permissions_Keys_STATUS_ARM_Backup, - "create": Permissions_Keys_STATUS_ARM_Create, - "decrypt": Permissions_Keys_STATUS_ARM_Decrypt, - "delete": Permissions_Keys_STATUS_ARM_Delete, - "encrypt": Permissions_Keys_STATUS_ARM_Encrypt, - "get": Permissions_Keys_STATUS_ARM_Get, - "getrotationpolicy": Permissions_Keys_STATUS_ARM_Getrotationpolicy, - "import": Permissions_Keys_STATUS_ARM_Import, - "list": Permissions_Keys_STATUS_ARM_List, - "purge": Permissions_Keys_STATUS_ARM_Purge, - "recover": Permissions_Keys_STATUS_ARM_Recover, - "release": Permissions_Keys_STATUS_ARM_Release, - "restore": Permissions_Keys_STATUS_ARM_Restore, - "rotate": Permissions_Keys_STATUS_ARM_Rotate, - "setrotationpolicy": Permissions_Keys_STATUS_ARM_Setrotationpolicy, - "sign": Permissions_Keys_STATUS_ARM_Sign, - "unwrapkey": Permissions_Keys_STATUS_ARM_UnwrapKey, - "update": Permissions_Keys_STATUS_ARM_Update, - "verify": Permissions_Keys_STATUS_ARM_Verify, - "wrapkey": Permissions_Keys_STATUS_ARM_WrapKey, -} - -type Permissions_Secrets_STATUS_ARM string - -const ( - Permissions_Secrets_STATUS_ARM_All = Permissions_Secrets_STATUS_ARM("all") - Permissions_Secrets_STATUS_ARM_Backup = Permissions_Secrets_STATUS_ARM("backup") - Permissions_Secrets_STATUS_ARM_Delete = Permissions_Secrets_STATUS_ARM("delete") - Permissions_Secrets_STATUS_ARM_Get = Permissions_Secrets_STATUS_ARM("get") - Permissions_Secrets_STATUS_ARM_List = Permissions_Secrets_STATUS_ARM("list") - Permissions_Secrets_STATUS_ARM_Purge = Permissions_Secrets_STATUS_ARM("purge") - Permissions_Secrets_STATUS_ARM_Recover = Permissions_Secrets_STATUS_ARM("recover") - Permissions_Secrets_STATUS_ARM_Restore = Permissions_Secrets_STATUS_ARM("restore") - Permissions_Secrets_STATUS_ARM_Set = Permissions_Secrets_STATUS_ARM("set") -) - -// Mapping from string to Permissions_Secrets_STATUS_ARM -var permissions_Secrets_STATUS_ARM_Values = map[string]Permissions_Secrets_STATUS_ARM{ - "all": Permissions_Secrets_STATUS_ARM_All, - "backup": Permissions_Secrets_STATUS_ARM_Backup, - "delete": Permissions_Secrets_STATUS_ARM_Delete, - "get": Permissions_Secrets_STATUS_ARM_Get, - "list": Permissions_Secrets_STATUS_ARM_List, - "purge": Permissions_Secrets_STATUS_ARM_Purge, - "recover": Permissions_Secrets_STATUS_ARM_Recover, - "restore": Permissions_Secrets_STATUS_ARM_Restore, - "set": Permissions_Secrets_STATUS_ARM_Set, -} - -type Permissions_Storage_STATUS_ARM string - -const ( - Permissions_Storage_STATUS_ARM_All = Permissions_Storage_STATUS_ARM("all") - Permissions_Storage_STATUS_ARM_Backup = Permissions_Storage_STATUS_ARM("backup") - Permissions_Storage_STATUS_ARM_Delete = Permissions_Storage_STATUS_ARM("delete") - Permissions_Storage_STATUS_ARM_Deletesas = Permissions_Storage_STATUS_ARM("deletesas") - Permissions_Storage_STATUS_ARM_Get = Permissions_Storage_STATUS_ARM("get") - Permissions_Storage_STATUS_ARM_Getsas = Permissions_Storage_STATUS_ARM("getsas") - Permissions_Storage_STATUS_ARM_List = Permissions_Storage_STATUS_ARM("list") - Permissions_Storage_STATUS_ARM_Listsas = Permissions_Storage_STATUS_ARM("listsas") - Permissions_Storage_STATUS_ARM_Purge = Permissions_Storage_STATUS_ARM("purge") - Permissions_Storage_STATUS_ARM_Recover = Permissions_Storage_STATUS_ARM("recover") - Permissions_Storage_STATUS_ARM_Regeneratekey = Permissions_Storage_STATUS_ARM("regeneratekey") - Permissions_Storage_STATUS_ARM_Restore = Permissions_Storage_STATUS_ARM("restore") - Permissions_Storage_STATUS_ARM_Set = Permissions_Storage_STATUS_ARM("set") - Permissions_Storage_STATUS_ARM_Setsas = Permissions_Storage_STATUS_ARM("setsas") - Permissions_Storage_STATUS_ARM_Update = Permissions_Storage_STATUS_ARM("update") -) - -// Mapping from string to Permissions_Storage_STATUS_ARM -var permissions_Storage_STATUS_ARM_Values = map[string]Permissions_Storage_STATUS_ARM{ - "all": Permissions_Storage_STATUS_ARM_All, - "backup": Permissions_Storage_STATUS_ARM_Backup, - "delete": Permissions_Storage_STATUS_ARM_Delete, - "deletesas": Permissions_Storage_STATUS_ARM_Deletesas, - "get": Permissions_Storage_STATUS_ARM_Get, - "getsas": Permissions_Storage_STATUS_ARM_Getsas, - "list": Permissions_Storage_STATUS_ARM_List, - "listsas": Permissions_Storage_STATUS_ARM_Listsas, - "purge": Permissions_Storage_STATUS_ARM_Purge, - "recover": Permissions_Storage_STATUS_ARM_Recover, - "regeneratekey": Permissions_Storage_STATUS_ARM_Regeneratekey, - "restore": Permissions_Storage_STATUS_ARM_Restore, - "set": Permissions_Storage_STATUS_ARM_Set, - "setsas": Permissions_Storage_STATUS_ARM_Setsas, - "update": Permissions_Storage_STATUS_ARM_Update, -} - -// Private endpoint object properties. -type PrivateEndpoint_STATUS_ARM struct { - // Id: Full identifier of the private endpoint resource. - Id *string `json:"id,omitempty"` -} - -// The current provisioning state. -type PrivateEndpointConnectionProvisioningState_STATUS_ARM string - -const ( - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Creating = PrivateEndpointConnectionProvisioningState_STATUS_ARM("Creating") - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Deleting = PrivateEndpointConnectionProvisioningState_STATUS_ARM("Deleting") - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Disconnected = PrivateEndpointConnectionProvisioningState_STATUS_ARM("Disconnected") - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Failed = PrivateEndpointConnectionProvisioningState_STATUS_ARM("Failed") - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Succeeded = PrivateEndpointConnectionProvisioningState_STATUS_ARM("Succeeded") - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Updating = PrivateEndpointConnectionProvisioningState_STATUS_ARM("Updating") -) - -// Mapping from string to PrivateEndpointConnectionProvisioningState_STATUS_ARM -var privateEndpointConnectionProvisioningState_STATUS_ARM_Values = map[string]PrivateEndpointConnectionProvisioningState_STATUS_ARM{ - "creating": PrivateEndpointConnectionProvisioningState_STATUS_ARM_Creating, - "deleting": PrivateEndpointConnectionProvisioningState_STATUS_ARM_Deleting, - "disconnected": PrivateEndpointConnectionProvisioningState_STATUS_ARM_Disconnected, - "failed": PrivateEndpointConnectionProvisioningState_STATUS_ARM_Failed, - "succeeded": PrivateEndpointConnectionProvisioningState_STATUS_ARM_Succeeded, - "updating": PrivateEndpointConnectionProvisioningState_STATUS_ARM_Updating, -} - -// An object that represents the approval state of the private link connection. -type PrivateLinkServiceConnectionState_STATUS_ARM struct { - // ActionsRequired: A message indicating if changes on the service provider require any updates on the consumer. - ActionsRequired *PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM `json:"actionsRequired,omitempty"` - - // Description: The reason for approval or rejection. - Description *string `json:"description,omitempty"` - - // Status: Indicates whether the connection has been approved, rejected or removed by the key vault owner. - Status *PrivateEndpointServiceConnectionStatus_STATUS_ARM `json:"status,omitempty"` -} - -// The private endpoint connection status. -type PrivateEndpointServiceConnectionStatus_STATUS_ARM string - -const ( - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Approved = PrivateEndpointServiceConnectionStatus_STATUS_ARM("Approved") - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Disconnected = PrivateEndpointServiceConnectionStatus_STATUS_ARM("Disconnected") - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Pending = PrivateEndpointServiceConnectionStatus_STATUS_ARM("Pending") - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Rejected = PrivateEndpointServiceConnectionStatus_STATUS_ARM("Rejected") -) - -// Mapping from string to PrivateEndpointServiceConnectionStatus_STATUS_ARM -var privateEndpointServiceConnectionStatus_STATUS_ARM_Values = map[string]PrivateEndpointServiceConnectionStatus_STATUS_ARM{ - "approved": PrivateEndpointServiceConnectionStatus_STATUS_ARM_Approved, - "disconnected": PrivateEndpointServiceConnectionStatus_STATUS_ARM_Disconnected, - "pending": PrivateEndpointServiceConnectionStatus_STATUS_ARM_Pending, - "rejected": PrivateEndpointServiceConnectionStatus_STATUS_ARM_Rejected, -} - -type PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM string - -const PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM_None = PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM("None") - -// Mapping from string to PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM -var privateLinkServiceConnectionState_ActionsRequired_STATUS_ARM_Values = map[string]PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM{ - "none": PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM_None, -} diff --git a/v2/api/keyvault/v1api20230701/vault_status_arm_types_gen_test.go b/v2/api/keyvault/v1api20230701/vault_status_arm_types_gen_test.go deleted file mode 100644 index 01e09dddbbb..00000000000 --- a/v2/api/keyvault/v1api20230701/vault_status_arm_types_gen_test.go +++ /dev/null @@ -1,1016 +0,0 @@ -// Code generated by azure-service-operator-codegen. DO NOT EDIT. -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -package v1api20230701 - -import ( - "encoding/json" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" - "github.com/kr/pretty" - "github.com/kylelemons/godebug/diff" - "github.com/leanovate/gopter" - "github.com/leanovate/gopter/gen" - "github.com/leanovate/gopter/prop" - "os" - "reflect" - "testing" -) - -func Test_AccessPolicyEntry_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of AccessPolicyEntry_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForAccessPolicyEntry_STATUS_ARM, AccessPolicyEntry_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForAccessPolicyEntry_STATUS_ARM runs a test to see if a specific instance of AccessPolicyEntry_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForAccessPolicyEntry_STATUS_ARM(subject AccessPolicyEntry_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual AccessPolicyEntry_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of AccessPolicyEntry_STATUS_ARM instances for property testing - lazily instantiated by -// AccessPolicyEntry_STATUS_ARMGenerator() -var accessPolicyEntry_STATUS_ARMGenerator gopter.Gen - -// AccessPolicyEntry_STATUS_ARMGenerator returns a generator of AccessPolicyEntry_STATUS_ARM instances for property testing. -// We first initialize accessPolicyEntry_STATUS_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func AccessPolicyEntry_STATUS_ARMGenerator() gopter.Gen { - if accessPolicyEntry_STATUS_ARMGenerator != nil { - return accessPolicyEntry_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM(generators) - accessPolicyEntry_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry_STATUS_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM(generators) - AddRelatedPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM(generators) - accessPolicyEntry_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(AccessPolicyEntry_STATUS_ARM{}), generators) - - return accessPolicyEntry_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM(gens map[string]gopter.Gen) { - gens["ApplicationId"] = gen.PtrOf(gen.AlphaString()) - gens["ObjectId"] = gen.PtrOf(gen.AlphaString()) - gens["TenantId"] = gen.PtrOf(gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForAccessPolicyEntry_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Permissions"] = gen.PtrOf(Permissions_STATUS_ARMGenerator()) -} - -func Test_IPRule_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of IPRule_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForIPRule_STATUS_ARM, IPRule_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForIPRule_STATUS_ARM runs a test to see if a specific instance of IPRule_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForIPRule_STATUS_ARM(subject IPRule_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual IPRule_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of IPRule_STATUS_ARM instances for property testing - lazily instantiated by IPRule_STATUS_ARMGenerator() -var ipRule_STATUS_ARMGenerator gopter.Gen - -// IPRule_STATUS_ARMGenerator returns a generator of IPRule_STATUS_ARM instances for property testing. -func IPRule_STATUS_ARMGenerator() gopter.Gen { - if ipRule_STATUS_ARMGenerator != nil { - return ipRule_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForIPRule_STATUS_ARM(generators) - ipRule_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(IPRule_STATUS_ARM{}), generators) - - return ipRule_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForIPRule_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForIPRule_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Value"] = gen.PtrOf(gen.AlphaString()) -} - -func Test_NetworkRuleSet_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of NetworkRuleSet_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForNetworkRuleSet_STATUS_ARM, NetworkRuleSet_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForNetworkRuleSet_STATUS_ARM runs a test to see if a specific instance of NetworkRuleSet_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForNetworkRuleSet_STATUS_ARM(subject NetworkRuleSet_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual NetworkRuleSet_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of NetworkRuleSet_STATUS_ARM instances for property testing - lazily instantiated by -// NetworkRuleSet_STATUS_ARMGenerator() -var networkRuleSet_STATUS_ARMGenerator gopter.Gen - -// NetworkRuleSet_STATUS_ARMGenerator returns a generator of NetworkRuleSet_STATUS_ARM instances for property testing. -// We first initialize networkRuleSet_STATUS_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func NetworkRuleSet_STATUS_ARMGenerator() gopter.Gen { - if networkRuleSet_STATUS_ARMGenerator != nil { - return networkRuleSet_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(generators) - networkRuleSet_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(generators) - AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(generators) - networkRuleSet_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(NetworkRuleSet_STATUS_ARM{}), generators) - - return networkRuleSet_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Bypass"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_Bypass_STATUS_ARM_AzureServices, NetworkRuleSet_Bypass_STATUS_ARM_None)) - gens["DefaultAction"] = gen.PtrOf(gen.OneConstOf(NetworkRuleSet_DefaultAction_STATUS_ARM_Allow, NetworkRuleSet_DefaultAction_STATUS_ARM_Deny)) -} - -// AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForNetworkRuleSet_STATUS_ARM(gens map[string]gopter.Gen) { - gens["IpRules"] = gen.SliceOf(IPRule_STATUS_ARMGenerator()) - gens["VirtualNetworkRules"] = gen.SliceOf(VirtualNetworkRule_STATUS_ARMGenerator()) -} - -func Test_Permissions_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of Permissions_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForPermissions_STATUS_ARM, Permissions_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForPermissions_STATUS_ARM runs a test to see if a specific instance of Permissions_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForPermissions_STATUS_ARM(subject Permissions_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual Permissions_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of Permissions_STATUS_ARM instances for property testing - lazily instantiated by -// Permissions_STATUS_ARMGenerator() -var permissions_STATUS_ARMGenerator gopter.Gen - -// Permissions_STATUS_ARMGenerator returns a generator of Permissions_STATUS_ARM instances for property testing. -func Permissions_STATUS_ARMGenerator() gopter.Gen { - if permissions_STATUS_ARMGenerator != nil { - return permissions_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPermissions_STATUS_ARM(generators) - permissions_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Permissions_STATUS_ARM{}), generators) - - return permissions_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForPermissions_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForPermissions_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Certificates"] = gen.SliceOf(gen.OneConstOf( - Permissions_Certificates_STATUS_ARM_All, - Permissions_Certificates_STATUS_ARM_Backup, - Permissions_Certificates_STATUS_ARM_Create, - Permissions_Certificates_STATUS_ARM_Delete, - Permissions_Certificates_STATUS_ARM_Deleteissuers, - Permissions_Certificates_STATUS_ARM_Get, - Permissions_Certificates_STATUS_ARM_Getissuers, - Permissions_Certificates_STATUS_ARM_Import, - Permissions_Certificates_STATUS_ARM_List, - Permissions_Certificates_STATUS_ARM_Listissuers, - Permissions_Certificates_STATUS_ARM_Managecontacts, - Permissions_Certificates_STATUS_ARM_Manageissuers, - Permissions_Certificates_STATUS_ARM_Purge, - Permissions_Certificates_STATUS_ARM_Recover, - Permissions_Certificates_STATUS_ARM_Restore, - Permissions_Certificates_STATUS_ARM_Setissuers, - Permissions_Certificates_STATUS_ARM_Update)) - gens["Keys"] = gen.SliceOf(gen.OneConstOf( - Permissions_Keys_STATUS_ARM_All, - Permissions_Keys_STATUS_ARM_Backup, - Permissions_Keys_STATUS_ARM_Create, - Permissions_Keys_STATUS_ARM_Decrypt, - Permissions_Keys_STATUS_ARM_Delete, - Permissions_Keys_STATUS_ARM_Encrypt, - Permissions_Keys_STATUS_ARM_Get, - Permissions_Keys_STATUS_ARM_Getrotationpolicy, - Permissions_Keys_STATUS_ARM_Import, - Permissions_Keys_STATUS_ARM_List, - Permissions_Keys_STATUS_ARM_Purge, - Permissions_Keys_STATUS_ARM_Recover, - Permissions_Keys_STATUS_ARM_Release, - Permissions_Keys_STATUS_ARM_Restore, - Permissions_Keys_STATUS_ARM_Rotate, - Permissions_Keys_STATUS_ARM_Setrotationpolicy, - Permissions_Keys_STATUS_ARM_Sign, - Permissions_Keys_STATUS_ARM_UnwrapKey, - Permissions_Keys_STATUS_ARM_Update, - Permissions_Keys_STATUS_ARM_Verify, - Permissions_Keys_STATUS_ARM_WrapKey)) - gens["Secrets"] = gen.SliceOf(gen.OneConstOf( - Permissions_Secrets_STATUS_ARM_All, - Permissions_Secrets_STATUS_ARM_Backup, - Permissions_Secrets_STATUS_ARM_Delete, - Permissions_Secrets_STATUS_ARM_Get, - Permissions_Secrets_STATUS_ARM_List, - Permissions_Secrets_STATUS_ARM_Purge, - Permissions_Secrets_STATUS_ARM_Recover, - Permissions_Secrets_STATUS_ARM_Restore, - Permissions_Secrets_STATUS_ARM_Set)) - gens["Storage"] = gen.SliceOf(gen.OneConstOf( - Permissions_Storage_STATUS_ARM_All, - Permissions_Storage_STATUS_ARM_Backup, - Permissions_Storage_STATUS_ARM_Delete, - Permissions_Storage_STATUS_ARM_Deletesas, - Permissions_Storage_STATUS_ARM_Get, - Permissions_Storage_STATUS_ARM_Getsas, - Permissions_Storage_STATUS_ARM_List, - Permissions_Storage_STATUS_ARM_Listsas, - Permissions_Storage_STATUS_ARM_Purge, - Permissions_Storage_STATUS_ARM_Recover, - Permissions_Storage_STATUS_ARM_Regeneratekey, - Permissions_Storage_STATUS_ARM_Restore, - Permissions_Storage_STATUS_ARM_Set, - Permissions_Storage_STATUS_ARM_Setsas, - Permissions_Storage_STATUS_ARM_Update)) -} - -func Test_PrivateEndpointConnectionItem_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of PrivateEndpointConnectionItem_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForPrivateEndpointConnectionItem_STATUS_ARM, PrivateEndpointConnectionItem_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForPrivateEndpointConnectionItem_STATUS_ARM runs a test to see if a specific instance of PrivateEndpointConnectionItem_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForPrivateEndpointConnectionItem_STATUS_ARM(subject PrivateEndpointConnectionItem_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual PrivateEndpointConnectionItem_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of PrivateEndpointConnectionItem_STATUS_ARM instances for property testing - lazily instantiated by -// PrivateEndpointConnectionItem_STATUS_ARMGenerator() -var privateEndpointConnectionItem_STATUS_ARMGenerator gopter.Gen - -// PrivateEndpointConnectionItem_STATUS_ARMGenerator returns a generator of PrivateEndpointConnectionItem_STATUS_ARM instances for property testing. -// We first initialize privateEndpointConnectionItem_STATUS_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func PrivateEndpointConnectionItem_STATUS_ARMGenerator() gopter.Gen { - if privateEndpointConnectionItem_STATUS_ARMGenerator != nil { - return privateEndpointConnectionItem_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM(generators) - privateEndpointConnectionItem_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionItem_STATUS_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM(generators) - AddRelatedPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM(generators) - privateEndpointConnectionItem_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionItem_STATUS_ARM{}), generators) - - return privateEndpointConnectionItem_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Etag"] = gen.PtrOf(gen.AlphaString()) - gens["Id"] = gen.PtrOf(gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForPrivateEndpointConnectionItem_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Properties"] = gen.PtrOf(PrivateEndpointConnectionProperties_STATUS_ARMGenerator()) -} - -func Test_PrivateEndpointConnectionProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of PrivateEndpointConnectionProperties_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForPrivateEndpointConnectionProperties_STATUS_ARM, PrivateEndpointConnectionProperties_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForPrivateEndpointConnectionProperties_STATUS_ARM runs a test to see if a specific instance of PrivateEndpointConnectionProperties_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForPrivateEndpointConnectionProperties_STATUS_ARM(subject PrivateEndpointConnectionProperties_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual PrivateEndpointConnectionProperties_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of PrivateEndpointConnectionProperties_STATUS_ARM instances for property testing - lazily instantiated by -// PrivateEndpointConnectionProperties_STATUS_ARMGenerator() -var privateEndpointConnectionProperties_STATUS_ARMGenerator gopter.Gen - -// PrivateEndpointConnectionProperties_STATUS_ARMGenerator returns a generator of PrivateEndpointConnectionProperties_STATUS_ARM instances for property testing. -// We first initialize privateEndpointConnectionProperties_STATUS_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func PrivateEndpointConnectionProperties_STATUS_ARMGenerator() gopter.Gen { - if privateEndpointConnectionProperties_STATUS_ARMGenerator != nil { - return privateEndpointConnectionProperties_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM(generators) - privateEndpointConnectionProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionProperties_STATUS_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM(generators) - AddRelatedPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM(generators) - privateEndpointConnectionProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateEndpointConnectionProperties_STATUS_ARM{}), generators) - - return privateEndpointConnectionProperties_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM(gens map[string]gopter.Gen) { - gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf( - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Creating, - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Deleting, - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Disconnected, - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Failed, - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Succeeded, - PrivateEndpointConnectionProvisioningState_STATUS_ARM_Updating)) -} - -// AddRelatedPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForPrivateEndpointConnectionProperties_STATUS_ARM(gens map[string]gopter.Gen) { - gens["PrivateEndpoint"] = gen.PtrOf(PrivateEndpoint_STATUS_ARMGenerator()) - gens["PrivateLinkServiceConnectionState"] = gen.PtrOf(PrivateLinkServiceConnectionState_STATUS_ARMGenerator()) -} - -func Test_PrivateEndpoint_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of PrivateEndpoint_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForPrivateEndpoint_STATUS_ARM, PrivateEndpoint_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForPrivateEndpoint_STATUS_ARM runs a test to see if a specific instance of PrivateEndpoint_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForPrivateEndpoint_STATUS_ARM(subject PrivateEndpoint_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual PrivateEndpoint_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of PrivateEndpoint_STATUS_ARM instances for property testing - lazily instantiated by -// PrivateEndpoint_STATUS_ARMGenerator() -var privateEndpoint_STATUS_ARMGenerator gopter.Gen - -// PrivateEndpoint_STATUS_ARMGenerator returns a generator of PrivateEndpoint_STATUS_ARM instances for property testing. -func PrivateEndpoint_STATUS_ARMGenerator() gopter.Gen { - if privateEndpoint_STATUS_ARMGenerator != nil { - return privateEndpoint_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPrivateEndpoint_STATUS_ARM(generators) - privateEndpoint_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateEndpoint_STATUS_ARM{}), generators) - - return privateEndpoint_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForPrivateEndpoint_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForPrivateEndpoint_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Id"] = gen.PtrOf(gen.AlphaString()) -} - -func Test_PrivateLinkServiceConnectionState_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of PrivateLinkServiceConnectionState_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForPrivateLinkServiceConnectionState_STATUS_ARM, PrivateLinkServiceConnectionState_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForPrivateLinkServiceConnectionState_STATUS_ARM runs a test to see if a specific instance of PrivateLinkServiceConnectionState_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForPrivateLinkServiceConnectionState_STATUS_ARM(subject PrivateLinkServiceConnectionState_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual PrivateLinkServiceConnectionState_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of PrivateLinkServiceConnectionState_STATUS_ARM instances for property testing - lazily instantiated by -// PrivateLinkServiceConnectionState_STATUS_ARMGenerator() -var privateLinkServiceConnectionState_STATUS_ARMGenerator gopter.Gen - -// PrivateLinkServiceConnectionState_STATUS_ARMGenerator returns a generator of PrivateLinkServiceConnectionState_STATUS_ARM instances for property testing. -func PrivateLinkServiceConnectionState_STATUS_ARMGenerator() gopter.Gen { - if privateLinkServiceConnectionState_STATUS_ARMGenerator != nil { - return privateLinkServiceConnectionState_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForPrivateLinkServiceConnectionState_STATUS_ARM(generators) - privateLinkServiceConnectionState_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(PrivateLinkServiceConnectionState_STATUS_ARM{}), generators) - - return privateLinkServiceConnectionState_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForPrivateLinkServiceConnectionState_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForPrivateLinkServiceConnectionState_STATUS_ARM(gens map[string]gopter.Gen) { - gens["ActionsRequired"] = gen.PtrOf(gen.OneConstOf(PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM_None)) - gens["Description"] = gen.PtrOf(gen.AlphaString()) - gens["Status"] = gen.PtrOf(gen.OneConstOf( - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Approved, - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Disconnected, - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Pending, - PrivateEndpointServiceConnectionStatus_STATUS_ARM_Rejected)) -} - -func Test_Sku_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of Sku_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForSku_STATUS_ARM, Sku_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForSku_STATUS_ARM runs a test to see if a specific instance of Sku_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForSku_STATUS_ARM(subject Sku_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual Sku_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of Sku_STATUS_ARM instances for property testing - lazily instantiated by Sku_STATUS_ARMGenerator() -var sku_STATUS_ARMGenerator gopter.Gen - -// Sku_STATUS_ARMGenerator returns a generator of Sku_STATUS_ARM instances for property testing. -func Sku_STATUS_ARMGenerator() gopter.Gen { - if sku_STATUS_ARMGenerator != nil { - return sku_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForSku_STATUS_ARM(generators) - sku_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Sku_STATUS_ARM{}), generators) - - return sku_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForSku_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForSku_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Family"] = gen.PtrOf(gen.OneConstOf(Sku_Family_STATUS_ARM_A)) - gens["Name"] = gen.PtrOf(gen.OneConstOf(Sku_Name_STATUS_ARM_Premium, Sku_Name_STATUS_ARM_Standard)) -} - -func Test_SystemData_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of SystemData_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForSystemData_STATUS_ARM, SystemData_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForSystemData_STATUS_ARM runs a test to see if a specific instance of SystemData_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForSystemData_STATUS_ARM(subject SystemData_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual SystemData_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of SystemData_STATUS_ARM instances for property testing - lazily instantiated by -// SystemData_STATUS_ARMGenerator() -var systemData_STATUS_ARMGenerator gopter.Gen - -// SystemData_STATUS_ARMGenerator returns a generator of SystemData_STATUS_ARM instances for property testing. -func SystemData_STATUS_ARMGenerator() gopter.Gen { - if systemData_STATUS_ARMGenerator != nil { - return systemData_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForSystemData_STATUS_ARM(generators) - systemData_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(SystemData_STATUS_ARM{}), generators) - - return systemData_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForSystemData_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForSystemData_STATUS_ARM(gens map[string]gopter.Gen) { - gens["CreatedAt"] = gen.PtrOf(gen.AlphaString()) - gens["CreatedBy"] = gen.PtrOf(gen.AlphaString()) - gens["CreatedByType"] = gen.PtrOf(gen.OneConstOf( - IdentityType_STATUS_ARM_Application, - IdentityType_STATUS_ARM_Key, - IdentityType_STATUS_ARM_ManagedIdentity, - IdentityType_STATUS_ARM_User)) - gens["LastModifiedAt"] = gen.PtrOf(gen.AlphaString()) - gens["LastModifiedBy"] = gen.PtrOf(gen.AlphaString()) - gens["LastModifiedByType"] = gen.PtrOf(gen.OneConstOf( - IdentityType_STATUS_ARM_Application, - IdentityType_STATUS_ARM_Key, - IdentityType_STATUS_ARM_ManagedIdentity, - IdentityType_STATUS_ARM_User)) -} - -func Test_VaultProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of VaultProperties_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForVaultProperties_STATUS_ARM, VaultProperties_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForVaultProperties_STATUS_ARM runs a test to see if a specific instance of VaultProperties_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForVaultProperties_STATUS_ARM(subject VaultProperties_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual VaultProperties_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of VaultProperties_STATUS_ARM instances for property testing - lazily instantiated by -// VaultProperties_STATUS_ARMGenerator() -var vaultProperties_STATUS_ARMGenerator gopter.Gen - -// VaultProperties_STATUS_ARMGenerator returns a generator of VaultProperties_STATUS_ARM instances for property testing. -// We first initialize vaultProperties_STATUS_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func VaultProperties_STATUS_ARMGenerator() gopter.Gen { - if vaultProperties_STATUS_ARMGenerator != nil { - return vaultProperties_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVaultProperties_STATUS_ARM(generators) - vaultProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(VaultProperties_STATUS_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVaultProperties_STATUS_ARM(generators) - AddRelatedPropertyGeneratorsForVaultProperties_STATUS_ARM(generators) - vaultProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(VaultProperties_STATUS_ARM{}), generators) - - return vaultProperties_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForVaultProperties_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForVaultProperties_STATUS_ARM(gens map[string]gopter.Gen) { - gens["CreateMode"] = gen.PtrOf(gen.OneConstOf( - VaultProperties_CreateMode_STATUS_ARM_CreateOrRecover, - VaultProperties_CreateMode_STATUS_ARM_Default, - VaultProperties_CreateMode_STATUS_ARM_PurgeThenCreate, - VaultProperties_CreateMode_STATUS_ARM_Recover)) - gens["EnablePurgeProtection"] = gen.PtrOf(gen.Bool()) - gens["EnableRbacAuthorization"] = gen.PtrOf(gen.Bool()) - gens["EnableSoftDelete"] = gen.PtrOf(gen.Bool()) - gens["EnabledForDeployment"] = gen.PtrOf(gen.Bool()) - gens["EnabledForDiskEncryption"] = gen.PtrOf(gen.Bool()) - gens["EnabledForTemplateDeployment"] = gen.PtrOf(gen.Bool()) - gens["HsmPoolResourceId"] = gen.PtrOf(gen.AlphaString()) - gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf(VaultProperties_ProvisioningState_STATUS_ARM_RegisteringDns, VaultProperties_ProvisioningState_STATUS_ARM_Succeeded)) - gens["PublicNetworkAccess"] = gen.PtrOf(gen.AlphaString()) - gens["SoftDeleteRetentionInDays"] = gen.PtrOf(gen.Int()) - gens["TenantId"] = gen.PtrOf(gen.AlphaString()) - gens["VaultUri"] = gen.PtrOf(gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForVaultProperties_STATUS_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForVaultProperties_STATUS_ARM(gens map[string]gopter.Gen) { - gens["AccessPolicies"] = gen.SliceOf(AccessPolicyEntry_STATUS_ARMGenerator()) - gens["NetworkAcls"] = gen.PtrOf(NetworkRuleSet_STATUS_ARMGenerator()) - gens["PrivateEndpointConnections"] = gen.SliceOf(PrivateEndpointConnectionItem_STATUS_ARMGenerator()) - gens["Sku"] = gen.PtrOf(Sku_STATUS_ARMGenerator()) -} - -func Test_Vault_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of Vault_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForVault_STATUS_ARM, Vault_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForVault_STATUS_ARM runs a test to see if a specific instance of Vault_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForVault_STATUS_ARM(subject Vault_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual Vault_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of Vault_STATUS_ARM instances for property testing - lazily instantiated by Vault_STATUS_ARMGenerator() -var vault_STATUS_ARMGenerator gopter.Gen - -// Vault_STATUS_ARMGenerator returns a generator of Vault_STATUS_ARM instances for property testing. -// We first initialize vault_STATUS_ARMGenerator with a simplified generator based on the -// fields with primitive types then replacing it with a more complex one that also handles complex fields -// to ensure any cycles in the object graph properly terminate. -func Vault_STATUS_ARMGenerator() gopter.Gen { - if vault_STATUS_ARMGenerator != nil { - return vault_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVault_STATUS_ARM(generators) - vault_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Vault_STATUS_ARM{}), generators) - - // The above call to gen.Struct() captures the map, so create a new one - generators = make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVault_STATUS_ARM(generators) - AddRelatedPropertyGeneratorsForVault_STATUS_ARM(generators) - vault_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Vault_STATUS_ARM{}), generators) - - return vault_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForVault_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForVault_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Id"] = gen.PtrOf(gen.AlphaString()) - gens["Location"] = gen.PtrOf(gen.AlphaString()) - gens["Name"] = gen.PtrOf(gen.AlphaString()) - gens["Tags"] = gen.MapOf( - gen.AlphaString(), - gen.AlphaString()) - gens["Type"] = gen.PtrOf(gen.AlphaString()) -} - -// AddRelatedPropertyGeneratorsForVault_STATUS_ARM is a factory method for creating gopter generators -func AddRelatedPropertyGeneratorsForVault_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Properties"] = gen.PtrOf(VaultProperties_STATUS_ARMGenerator()) - gens["SystemData"] = gen.PtrOf(SystemData_STATUS_ARMGenerator()) -} - -func Test_VirtualNetworkRule_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MinSuccessfulTests = 80 - parameters.MaxSize = 3 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of VirtualNetworkRule_STATUS_ARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForVirtualNetworkRule_STATUS_ARM, VirtualNetworkRule_STATUS_ARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForVirtualNetworkRule_STATUS_ARM runs a test to see if a specific instance of VirtualNetworkRule_STATUS_ARM round trips to JSON and back losslessly -func RunJSONSerializationTestForVirtualNetworkRule_STATUS_ARM(subject VirtualNetworkRule_STATUS_ARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual VirtualNetworkRule_STATUS_ARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of VirtualNetworkRule_STATUS_ARM instances for property testing - lazily instantiated by -// VirtualNetworkRule_STATUS_ARMGenerator() -var virtualNetworkRule_STATUS_ARMGenerator gopter.Gen - -// VirtualNetworkRule_STATUS_ARMGenerator returns a generator of VirtualNetworkRule_STATUS_ARM instances for property testing. -func VirtualNetworkRule_STATUS_ARMGenerator() gopter.Gen { - if virtualNetworkRule_STATUS_ARMGenerator != nil { - return virtualNetworkRule_STATUS_ARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS_ARM(generators) - virtualNetworkRule_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(VirtualNetworkRule_STATUS_ARM{}), generators) - - return virtualNetworkRule_STATUS_ARMGenerator -} - -// AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS_ARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForVirtualNetworkRule_STATUS_ARM(gens map[string]gopter.Gen) { - gens["Id"] = gen.PtrOf(gen.AlphaString()) - gens["IgnoreMissingVnetServiceEndpoint"] = gen.PtrOf(gen.Bool()) -} diff --git a/v2/api/keyvault/v1api20230701/vault_types_gen.go b/v2/api/keyvault/v1api20230701/vault_types_gen.go index 1180a8d5437..448d12c6e03 100644 --- a/v2/api/keyvault/v1api20230701/vault_types_gen.go +++ b/v2/api/keyvault/v1api20230701/vault_types_gen.go @@ -5,6 +5,7 @@ package v1api20230701 import ( "fmt" + arm "github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20230701/arm" storage "github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20230701/storage" "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" @@ -373,7 +374,7 @@ func (vault *Vault_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDe if vault == nil { return nil, nil } - result := &Vault_Spec_ARM{} + result := &arm.Vault_Spec{} // Set property "Location": if vault.Location != nil { @@ -390,7 +391,7 @@ func (vault *Vault_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDe if err != nil { return nil, err } - properties := *properties_ARM.(*VaultProperties_ARM) + properties := *properties_ARM.(*arm.VaultProperties) result.Properties = &properties } @@ -406,14 +407,14 @@ func (vault *Vault_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDe // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (vault *Vault_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &Vault_Spec_ARM{} + return &arm.Vault_Spec{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (vault *Vault_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(Vault_Spec_ARM) + typedInput, ok := armInput.(arm.Vault_Spec) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Vault_Spec_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Vault_Spec, got %T", armInput) } // Set property "AzureName": @@ -702,14 +703,14 @@ var _ genruntime.FromARMConverter = &Vault_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (vault *Vault_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &Vault_STATUS_ARM{} + return &arm.Vault_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (vault *Vault_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(Vault_STATUS_ARM) + typedInput, ok := armInput.(arm.Vault_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Vault_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Vault_STATUS, got %T", armInput) } // no assignment for property "Conditions" @@ -904,14 +905,14 @@ var _ genruntime.FromARMConverter = &SystemData_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (data *SystemData_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &SystemData_STATUS_ARM{} + return &arm.SystemData_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (data *SystemData_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(SystemData_STATUS_ARM) + typedInput, ok := armInput.(arm.SystemData_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SystemData_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.SystemData_STATUS, got %T", armInput) } // Set property "CreatedAt": @@ -1117,7 +1118,7 @@ func (properties *VaultProperties) ConvertToARM(resolved genruntime.ConvertToARM if properties == nil { return nil, nil } - result := &VaultProperties_ARM{} + result := &arm.VaultProperties{} // Set property "AccessPolicies": for _, item := range properties.AccessPolicies { @@ -1125,14 +1126,14 @@ func (properties *VaultProperties) ConvertToARM(resolved genruntime.ConvertToARM if err != nil { return nil, err } - result.AccessPolicies = append(result.AccessPolicies, *item_ARM.(*AccessPolicyEntry_ARM)) + result.AccessPolicies = append(result.AccessPolicies, *item_ARM.(*arm.AccessPolicyEntry)) } // Set property "CreateMode": if properties.CreateMode != nil { var temp string temp = string(*properties.CreateMode) - createMode := VaultProperties_CreateMode_ARM(temp) + createMode := arm.VaultProperties_CreateMode(temp) result.CreateMode = &createMode } @@ -1178,7 +1179,7 @@ func (properties *VaultProperties) ConvertToARM(resolved genruntime.ConvertToARM if err != nil { return nil, err } - networkAcls := *networkAcls_ARM.(*NetworkRuleSet_ARM) + networkAcls := *networkAcls_ARM.(*arm.NetworkRuleSet) result.NetworkAcls = &networkAcls } @@ -1186,7 +1187,7 @@ func (properties *VaultProperties) ConvertToARM(resolved genruntime.ConvertToARM if properties.ProvisioningState != nil { var temp string temp = string(*properties.ProvisioningState) - provisioningState := VaultProperties_ProvisioningState_ARM(temp) + provisioningState := arm.VaultProperties_ProvisioningState(temp) result.ProvisioningState = &provisioningState } @@ -1202,7 +1203,7 @@ func (properties *VaultProperties) ConvertToARM(resolved genruntime.ConvertToARM if err != nil { return nil, err } - sku := *sku_ARM.(*Sku_ARM) + sku := *sku_ARM.(*arm.Sku) result.Sku = &sku } @@ -1236,14 +1237,14 @@ func (properties *VaultProperties) ConvertToARM(resolved genruntime.ConvertToARM // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (properties *VaultProperties) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &VaultProperties_ARM{} + return &arm.VaultProperties{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (properties *VaultProperties) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(VaultProperties_ARM) + typedInput, ok := armInput.(arm.VaultProperties) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VaultProperties_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VaultProperties, got %T", armInput) } // Set property "AccessPolicies": @@ -1852,14 +1853,14 @@ var _ genruntime.FromARMConverter = &VaultProperties_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (properties *VaultProperties_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &VaultProperties_STATUS_ARM{} + return &arm.VaultProperties_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (properties *VaultProperties_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(VaultProperties_STATUS_ARM) + typedInput, ok := armInput.(arm.VaultProperties_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VaultProperties_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VaultProperties_STATUS, got %T", armInput) } // Set property "AccessPolicies": @@ -2331,7 +2332,7 @@ func (entry *AccessPolicyEntry) ConvertToARM(resolved genruntime.ConvertToARMRes if entry == nil { return nil, nil } - result := &AccessPolicyEntry_ARM{} + result := &arm.AccessPolicyEntry{} // Set property "ApplicationId": if entry.ApplicationId != nil { @@ -2367,7 +2368,7 @@ func (entry *AccessPolicyEntry) ConvertToARM(resolved genruntime.ConvertToARMRes if err != nil { return nil, err } - permissions := *permissions_ARM.(*Permissions_ARM) + permissions := *permissions_ARM.(*arm.Permissions) result.Permissions = &permissions } @@ -2389,14 +2390,14 @@ func (entry *AccessPolicyEntry) ConvertToARM(resolved genruntime.ConvertToARMRes // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (entry *AccessPolicyEntry) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &AccessPolicyEntry_ARM{} + return &arm.AccessPolicyEntry{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (entry *AccessPolicyEntry) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(AccessPolicyEntry_ARM) + typedInput, ok := armInput.(arm.AccessPolicyEntry) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AccessPolicyEntry_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AccessPolicyEntry, got %T", armInput) } // Set property "ApplicationId": @@ -2630,14 +2631,14 @@ var _ genruntime.FromARMConverter = &AccessPolicyEntry_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (entry *AccessPolicyEntry_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &AccessPolicyEntry_STATUS_ARM{} + return &arm.AccessPolicyEntry_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (entry *AccessPolicyEntry_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(AccessPolicyEntry_STATUS_ARM) + typedInput, ok := armInput.(arm.AccessPolicyEntry_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AccessPolicyEntry_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AccessPolicyEntry_STATUS, got %T", armInput) } // Set property "ApplicationId": @@ -2780,13 +2781,13 @@ func (ruleSet *NetworkRuleSet) ConvertToARM(resolved genruntime.ConvertToARMReso if ruleSet == nil { return nil, nil } - result := &NetworkRuleSet_ARM{} + result := &arm.NetworkRuleSet{} // Set property "Bypass": if ruleSet.Bypass != nil { var temp string temp = string(*ruleSet.Bypass) - bypass := NetworkRuleSet_Bypass_ARM(temp) + bypass := arm.NetworkRuleSet_Bypass(temp) result.Bypass = &bypass } @@ -2794,7 +2795,7 @@ func (ruleSet *NetworkRuleSet) ConvertToARM(resolved genruntime.ConvertToARMReso if ruleSet.DefaultAction != nil { var temp string temp = string(*ruleSet.DefaultAction) - defaultAction := NetworkRuleSet_DefaultAction_ARM(temp) + defaultAction := arm.NetworkRuleSet_DefaultAction(temp) result.DefaultAction = &defaultAction } @@ -2804,7 +2805,7 @@ func (ruleSet *NetworkRuleSet) ConvertToARM(resolved genruntime.ConvertToARMReso if err != nil { return nil, err } - result.IpRules = append(result.IpRules, *item_ARM.(*IPRule_ARM)) + result.IpRules = append(result.IpRules, *item_ARM.(*arm.IPRule)) } // Set property "VirtualNetworkRules": @@ -2813,21 +2814,21 @@ func (ruleSet *NetworkRuleSet) ConvertToARM(resolved genruntime.ConvertToARMReso if err != nil { return nil, err } - result.VirtualNetworkRules = append(result.VirtualNetworkRules, *item_ARM.(*VirtualNetworkRule_ARM)) + result.VirtualNetworkRules = append(result.VirtualNetworkRules, *item_ARM.(*arm.VirtualNetworkRule)) } return result, nil } // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (ruleSet *NetworkRuleSet) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &NetworkRuleSet_ARM{} + return &arm.NetworkRuleSet{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (ruleSet *NetworkRuleSet) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(NetworkRuleSet_ARM) + typedInput, ok := armInput.(arm.NetworkRuleSet) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected NetworkRuleSet_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.NetworkRuleSet, got %T", armInput) } // Set property "Bypass": @@ -3079,14 +3080,14 @@ var _ genruntime.FromARMConverter = &NetworkRuleSet_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (ruleSet *NetworkRuleSet_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &NetworkRuleSet_STATUS_ARM{} + return &arm.NetworkRuleSet_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (ruleSet *NetworkRuleSet_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(NetworkRuleSet_STATUS_ARM) + typedInput, ok := armInput.(arm.NetworkRuleSet_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected NetworkRuleSet_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.NetworkRuleSet_STATUS, got %T", armInput) } // Set property "Bypass": @@ -3280,14 +3281,14 @@ var _ genruntime.FromARMConverter = &PrivateEndpointConnectionItem_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (item *PrivateEndpointConnectionItem_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &PrivateEndpointConnectionItem_STATUS_ARM{} + return &arm.PrivateEndpointConnectionItem_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (item *PrivateEndpointConnectionItem_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(PrivateEndpointConnectionItem_STATUS_ARM) + typedInput, ok := armInput.(arm.PrivateEndpointConnectionItem_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected PrivateEndpointConnectionItem_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.PrivateEndpointConnectionItem_STATUS, got %T", armInput) } // Set property "Etag": @@ -3463,13 +3464,13 @@ func (sku *Sku) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (i if sku == nil { return nil, nil } - result := &Sku_ARM{} + result := &arm.Sku{} // Set property "Family": if sku.Family != nil { var temp string temp = string(*sku.Family) - family := Sku_Family_ARM(temp) + family := arm.Sku_Family(temp) result.Family = &family } @@ -3477,7 +3478,7 @@ func (sku *Sku) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (i if sku.Name != nil { var temp string temp = string(*sku.Name) - name := Sku_Name_ARM(temp) + name := arm.Sku_Name(temp) result.Name = &name } return result, nil @@ -3485,14 +3486,14 @@ func (sku *Sku) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (i // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (sku *Sku) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &Sku_ARM{} + return &arm.Sku{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (sku *Sku) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(Sku_ARM) + typedInput, ok := armInput.(arm.Sku) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Sku_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Sku, got %T", armInput) } // Set property "Family": @@ -3608,14 +3609,14 @@ var _ genruntime.FromARMConverter = &Sku_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (sku *Sku_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &Sku_STATUS_ARM{} + return &arm.Sku_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (sku *Sku_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(Sku_STATUS_ARM) + typedInput, ok := armInput.(arm.Sku_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Sku_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Sku_STATUS, got %T", armInput) } // Set property "Family": @@ -3772,7 +3773,7 @@ func (rule *IPRule) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails if rule == nil { return nil, nil } - result := &IPRule_ARM{} + result := &arm.IPRule{} // Set property "Value": if rule.Value != nil { @@ -3784,14 +3785,14 @@ func (rule *IPRule) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (rule *IPRule) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &IPRule_ARM{} + return &arm.IPRule{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (rule *IPRule) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(IPRule_ARM) + typedInput, ok := armInput.(arm.IPRule) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected IPRule_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IPRule, got %T", armInput) } // Set property "Value": @@ -3854,14 +3855,14 @@ var _ genruntime.FromARMConverter = &IPRule_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (rule *IPRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &IPRule_STATUS_ARM{} + return &arm.IPRule_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (rule *IPRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(IPRule_STATUS_ARM) + typedInput, ok := armInput.(arm.IPRule_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected IPRule_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IPRule_STATUS, got %T", armInput) } // Set property "Value": @@ -3979,48 +3980,48 @@ func (permissions *Permissions) ConvertToARM(resolved genruntime.ConvertToARMRes if permissions == nil { return nil, nil } - result := &Permissions_ARM{} + result := &arm.Permissions{} // Set property "Certificates": for _, item := range permissions.Certificates { var temp string temp = string(item) - result.Certificates = append(result.Certificates, Permissions_Certificates_ARM(temp)) + result.Certificates = append(result.Certificates, arm.Permissions_Certificates(temp)) } // Set property "Keys": for _, item := range permissions.Keys { var temp string temp = string(item) - result.Keys = append(result.Keys, Permissions_Keys_ARM(temp)) + result.Keys = append(result.Keys, arm.Permissions_Keys(temp)) } // Set property "Secrets": for _, item := range permissions.Secrets { var temp string temp = string(item) - result.Secrets = append(result.Secrets, Permissions_Secrets_ARM(temp)) + result.Secrets = append(result.Secrets, arm.Permissions_Secrets(temp)) } // Set property "Storage": for _, item := range permissions.Storage { var temp string temp = string(item) - result.Storage = append(result.Storage, Permissions_Storage_ARM(temp)) + result.Storage = append(result.Storage, arm.Permissions_Storage(temp)) } return result, nil } // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (permissions *Permissions) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &Permissions_ARM{} + return &arm.Permissions{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (permissions *Permissions) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(Permissions_ARM) + typedInput, ok := armInput.(arm.Permissions) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Permissions_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Permissions, got %T", armInput) } // Set property "Certificates": @@ -4264,14 +4265,14 @@ var _ genruntime.FromARMConverter = &Permissions_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (permissions *Permissions_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &Permissions_STATUS_ARM{} + return &arm.Permissions_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (permissions *Permissions_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(Permissions_STATUS_ARM) + typedInput, ok := armInput.(arm.Permissions_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Permissions_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Permissions_STATUS, got %T", armInput) } // Set property "Certificates": @@ -4443,14 +4444,14 @@ var _ genruntime.FromARMConverter = &PrivateEndpoint_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (endpoint *PrivateEndpoint_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &PrivateEndpoint_STATUS_ARM{} + return &arm.PrivateEndpoint_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (endpoint *PrivateEndpoint_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(PrivateEndpoint_STATUS_ARM) + typedInput, ok := armInput.(arm.PrivateEndpoint_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected PrivateEndpoint_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.PrivateEndpoint_STATUS, got %T", armInput) } // Set property "Id": @@ -4530,14 +4531,14 @@ var _ genruntime.FromARMConverter = &PrivateLinkServiceConnectionState_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (state *PrivateLinkServiceConnectionState_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &PrivateLinkServiceConnectionState_STATUS_ARM{} + return &arm.PrivateLinkServiceConnectionState_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (state *PrivateLinkServiceConnectionState_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(PrivateLinkServiceConnectionState_STATUS_ARM) + typedInput, ok := armInput.(arm.PrivateLinkServiceConnectionState_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected PrivateLinkServiceConnectionState_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.PrivateLinkServiceConnectionState_STATUS, got %T", armInput) } // Set property "ActionsRequired": @@ -4694,7 +4695,7 @@ func (rule *VirtualNetworkRule) ConvertToARM(resolved genruntime.ConvertToARMRes if rule == nil { return nil, nil } - result := &VirtualNetworkRule_ARM{} + result := &arm.VirtualNetworkRule{} // Set property "Id": if rule.Reference != nil { @@ -4716,14 +4717,14 @@ func (rule *VirtualNetworkRule) ConvertToARM(resolved genruntime.ConvertToARMRes // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (rule *VirtualNetworkRule) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &VirtualNetworkRule_ARM{} + return &arm.VirtualNetworkRule{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (rule *VirtualNetworkRule) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(VirtualNetworkRule_ARM) + typedInput, ok := armInput.(arm.VirtualNetworkRule) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VirtualNetworkRule_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VirtualNetworkRule, got %T", armInput) } // Set property "IgnoreMissingVnetServiceEndpoint": @@ -4831,14 +4832,14 @@ var _ genruntime.FromARMConverter = &VirtualNetworkRule_STATUS{} // NewEmptyARMValue returns an empty ARM value suitable for deserializing into func (rule *VirtualNetworkRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &VirtualNetworkRule_STATUS_ARM{} + return &arm.VirtualNetworkRule_STATUS{} } // PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object func (rule *VirtualNetworkRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(VirtualNetworkRule_STATUS_ARM) + typedInput, ok := armInput.(arm.VirtualNetworkRule_STATUS) if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VirtualNetworkRule_STATUS_ARM, got %T", armInput) + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VirtualNetworkRule_STATUS, got %T", armInput) } // Set property "Id": diff --git a/v2/api/keyvault/v1api20230701/zz_generated.deepcopy.go b/v2/api/keyvault/v1api20230701/zz_generated.deepcopy.go index ec56cfddbc4..0db53946765 100644 --- a/v2/api/keyvault/v1api20230701/zz_generated.deepcopy.go +++ b/v2/api/keyvault/v1api20230701/zz_generated.deepcopy.go @@ -65,41 +65,6 @@ func (in *AccessPolicyEntry) DeepCopy() *AccessPolicyEntry { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AccessPolicyEntry_ARM) DeepCopyInto(out *AccessPolicyEntry_ARM) { - *out = *in - if in.ApplicationId != nil { - in, out := &in.ApplicationId, &out.ApplicationId - *out = new(string) - **out = **in - } - if in.ObjectId != nil { - in, out := &in.ObjectId, &out.ObjectId - *out = new(string) - **out = **in - } - if in.Permissions != nil { - in, out := &in.Permissions, &out.Permissions - *out = new(Permissions_ARM) - (*in).DeepCopyInto(*out) - } - if in.TenantId != nil { - in, out := &in.TenantId, &out.TenantId - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessPolicyEntry_ARM. -func (in *AccessPolicyEntry_ARM) DeepCopy() *AccessPolicyEntry_ARM { - if in == nil { - return nil - } - out := new(AccessPolicyEntry_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AccessPolicyEntry_STATUS) DeepCopyInto(out *AccessPolicyEntry_STATUS) { *out = *in @@ -135,41 +100,6 @@ func (in *AccessPolicyEntry_STATUS) DeepCopy() *AccessPolicyEntry_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AccessPolicyEntry_STATUS_ARM) DeepCopyInto(out *AccessPolicyEntry_STATUS_ARM) { - *out = *in - if in.ApplicationId != nil { - in, out := &in.ApplicationId, &out.ApplicationId - *out = new(string) - **out = **in - } - if in.ObjectId != nil { - in, out := &in.ObjectId, &out.ObjectId - *out = new(string) - **out = **in - } - if in.Permissions != nil { - in, out := &in.Permissions, &out.Permissions - *out = new(Permissions_STATUS_ARM) - (*in).DeepCopyInto(*out) - } - if in.TenantId != nil { - in, out := &in.TenantId, &out.TenantId - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessPolicyEntry_STATUS_ARM. -func (in *AccessPolicyEntry_STATUS_ARM) DeepCopy() *AccessPolicyEntry_STATUS_ARM { - if in == nil { - return nil - } - out := new(AccessPolicyEntry_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IPRule) DeepCopyInto(out *IPRule) { *out = *in @@ -190,26 +120,6 @@ func (in *IPRule) DeepCopy() *IPRule { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPRule_ARM) DeepCopyInto(out *IPRule_ARM) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRule_ARM. -func (in *IPRule_ARM) DeepCopy() *IPRule_ARM { - if in == nil { - return nil - } - out := new(IPRule_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IPRule_STATUS) DeepCopyInto(out *IPRule_STATUS) { *out = *in @@ -230,26 +140,6 @@ func (in *IPRule_STATUS) DeepCopy() *IPRule_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPRule_STATUS_ARM) DeepCopyInto(out *IPRule_STATUS_ARM) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRule_STATUS_ARM. -func (in *IPRule_STATUS_ARM) DeepCopy() *IPRule_STATUS_ARM { - if in == nil { - return nil - } - out := new(IPRule_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NetworkRuleSet) DeepCopyInto(out *NetworkRuleSet) { *out = *in @@ -289,45 +179,6 @@ func (in *NetworkRuleSet) DeepCopy() *NetworkRuleSet { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkRuleSet_ARM) DeepCopyInto(out *NetworkRuleSet_ARM) { - *out = *in - if in.Bypass != nil { - in, out := &in.Bypass, &out.Bypass - *out = new(NetworkRuleSet_Bypass_ARM) - **out = **in - } - if in.DefaultAction != nil { - in, out := &in.DefaultAction, &out.DefaultAction - *out = new(NetworkRuleSet_DefaultAction_ARM) - **out = **in - } - if in.IpRules != nil { - in, out := &in.IpRules, &out.IpRules - *out = make([]IPRule_ARM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VirtualNetworkRules != nil { - in, out := &in.VirtualNetworkRules, &out.VirtualNetworkRules - *out = make([]VirtualNetworkRule_ARM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRuleSet_ARM. -func (in *NetworkRuleSet_ARM) DeepCopy() *NetworkRuleSet_ARM { - if in == nil { - return nil - } - out := new(NetworkRuleSet_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NetworkRuleSet_STATUS) DeepCopyInto(out *NetworkRuleSet_STATUS) { *out = *in @@ -367,45 +218,6 @@ func (in *NetworkRuleSet_STATUS) DeepCopy() *NetworkRuleSet_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkRuleSet_STATUS_ARM) DeepCopyInto(out *NetworkRuleSet_STATUS_ARM) { - *out = *in - if in.Bypass != nil { - in, out := &in.Bypass, &out.Bypass - *out = new(NetworkRuleSet_Bypass_STATUS_ARM) - **out = **in - } - if in.DefaultAction != nil { - in, out := &in.DefaultAction, &out.DefaultAction - *out = new(NetworkRuleSet_DefaultAction_STATUS_ARM) - **out = **in - } - if in.IpRules != nil { - in, out := &in.IpRules, &out.IpRules - *out = make([]IPRule_STATUS_ARM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VirtualNetworkRules != nil { - in, out := &in.VirtualNetworkRules, &out.VirtualNetworkRules - *out = make([]VirtualNetworkRule_STATUS_ARM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRuleSet_STATUS_ARM. -func (in *NetworkRuleSet_STATUS_ARM) DeepCopy() *NetworkRuleSet_STATUS_ARM { - if in == nil { - return nil - } - out := new(NetworkRuleSet_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Permissions) DeepCopyInto(out *Permissions) { *out = *in @@ -441,41 +253,6 @@ func (in *Permissions) DeepCopy() *Permissions { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Permissions_ARM) DeepCopyInto(out *Permissions_ARM) { - *out = *in - if in.Certificates != nil { - in, out := &in.Certificates, &out.Certificates - *out = make([]Permissions_Certificates_ARM, len(*in)) - copy(*out, *in) - } - if in.Keys != nil { - in, out := &in.Keys, &out.Keys - *out = make([]Permissions_Keys_ARM, len(*in)) - copy(*out, *in) - } - if in.Secrets != nil { - in, out := &in.Secrets, &out.Secrets - *out = make([]Permissions_Secrets_ARM, len(*in)) - copy(*out, *in) - } - if in.Storage != nil { - in, out := &in.Storage, &out.Storage - *out = make([]Permissions_Storage_ARM, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Permissions_ARM. -func (in *Permissions_ARM) DeepCopy() *Permissions_ARM { - if in == nil { - return nil - } - out := new(Permissions_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Permissions_STATUS) DeepCopyInto(out *Permissions_STATUS) { *out = *in @@ -511,41 +288,6 @@ func (in *Permissions_STATUS) DeepCopy() *Permissions_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Permissions_STATUS_ARM) DeepCopyInto(out *Permissions_STATUS_ARM) { - *out = *in - if in.Certificates != nil { - in, out := &in.Certificates, &out.Certificates - *out = make([]Permissions_Certificates_STATUS_ARM, len(*in)) - copy(*out, *in) - } - if in.Keys != nil { - in, out := &in.Keys, &out.Keys - *out = make([]Permissions_Keys_STATUS_ARM, len(*in)) - copy(*out, *in) - } - if in.Secrets != nil { - in, out := &in.Secrets, &out.Secrets - *out = make([]Permissions_Secrets_STATUS_ARM, len(*in)) - copy(*out, *in) - } - if in.Storage != nil { - in, out := &in.Storage, &out.Storage - *out = make([]Permissions_Storage_STATUS_ARM, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Permissions_STATUS_ARM. -func (in *Permissions_STATUS_ARM) DeepCopy() *Permissions_STATUS_ARM { - if in == nil { - return nil - } - out := new(Permissions_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PrivateEndpointConnectionItem_STATUS) DeepCopyInto(out *PrivateEndpointConnectionItem_STATUS) { *out = *in @@ -587,171 +329,61 @@ func (in *PrivateEndpointConnectionItem_STATUS) DeepCopy() *PrivateEndpointConne } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrivateEndpointConnectionItem_STATUS_ARM) DeepCopyInto(out *PrivateEndpointConnectionItem_STATUS_ARM) { +func (in *PrivateEndpoint_STATUS) DeepCopyInto(out *PrivateEndpoint_STATUS) { *out = *in - if in.Etag != nil { - in, out := &in.Etag, &out.Etag - *out = new(string) - **out = **in - } if in.Id != nil { in, out := &in.Id, &out.Id *out = new(string) **out = **in } - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = new(PrivateEndpointConnectionProperties_STATUS_ARM) - (*in).DeepCopyInto(*out) - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateEndpointConnectionItem_STATUS_ARM. -func (in *PrivateEndpointConnectionItem_STATUS_ARM) DeepCopy() *PrivateEndpointConnectionItem_STATUS_ARM { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateEndpoint_STATUS. +func (in *PrivateEndpoint_STATUS) DeepCopy() *PrivateEndpoint_STATUS { if in == nil { return nil } - out := new(PrivateEndpointConnectionItem_STATUS_ARM) + out := new(PrivateEndpoint_STATUS) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrivateEndpointConnectionProperties_STATUS_ARM) DeepCopyInto(out *PrivateEndpointConnectionProperties_STATUS_ARM) { +func (in *PrivateLinkServiceConnectionState_STATUS) DeepCopyInto(out *PrivateLinkServiceConnectionState_STATUS) { *out = *in - if in.PrivateEndpoint != nil { - in, out := &in.PrivateEndpoint, &out.PrivateEndpoint - *out = new(PrivateEndpoint_STATUS_ARM) - (*in).DeepCopyInto(*out) + if in.ActionsRequired != nil { + in, out := &in.ActionsRequired, &out.ActionsRequired + *out = new(PrivateLinkServiceConnectionState_ActionsRequired_STATUS) + **out = **in } - if in.PrivateLinkServiceConnectionState != nil { - in, out := &in.PrivateLinkServiceConnectionState, &out.PrivateLinkServiceConnectionState - *out = new(PrivateLinkServiceConnectionState_STATUS_ARM) - (*in).DeepCopyInto(*out) + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in } - if in.ProvisioningState != nil { - in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(PrivateEndpointConnectionProvisioningState_STATUS_ARM) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(PrivateEndpointServiceConnectionStatus_STATUS) **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateEndpointConnectionProperties_STATUS_ARM. -func (in *PrivateEndpointConnectionProperties_STATUS_ARM) DeepCopy() *PrivateEndpointConnectionProperties_STATUS_ARM { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateLinkServiceConnectionState_STATUS. +func (in *PrivateLinkServiceConnectionState_STATUS) DeepCopy() *PrivateLinkServiceConnectionState_STATUS { if in == nil { return nil } - out := new(PrivateEndpointConnectionProperties_STATUS_ARM) + out := new(PrivateLinkServiceConnectionState_STATUS) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrivateEndpoint_STATUS) DeepCopyInto(out *PrivateEndpoint_STATUS) { +func (in *Sku) DeepCopyInto(out *Sku) { *out = *in - if in.Id != nil { - in, out := &in.Id, &out.Id - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateEndpoint_STATUS. -func (in *PrivateEndpoint_STATUS) DeepCopy() *PrivateEndpoint_STATUS { - if in == nil { - return nil - } - out := new(PrivateEndpoint_STATUS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrivateEndpoint_STATUS_ARM) DeepCopyInto(out *PrivateEndpoint_STATUS_ARM) { - *out = *in - if in.Id != nil { - in, out := &in.Id, &out.Id - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateEndpoint_STATUS_ARM. -func (in *PrivateEndpoint_STATUS_ARM) DeepCopy() *PrivateEndpoint_STATUS_ARM { - if in == nil { - return nil - } - out := new(PrivateEndpoint_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrivateLinkServiceConnectionState_STATUS) DeepCopyInto(out *PrivateLinkServiceConnectionState_STATUS) { - *out = *in - if in.ActionsRequired != nil { - in, out := &in.ActionsRequired, &out.ActionsRequired - *out = new(PrivateLinkServiceConnectionState_ActionsRequired_STATUS) - **out = **in - } - if in.Description != nil { - in, out := &in.Description, &out.Description - *out = new(string) - **out = **in - } - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(PrivateEndpointServiceConnectionStatus_STATUS) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateLinkServiceConnectionState_STATUS. -func (in *PrivateLinkServiceConnectionState_STATUS) DeepCopy() *PrivateLinkServiceConnectionState_STATUS { - if in == nil { - return nil - } - out := new(PrivateLinkServiceConnectionState_STATUS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrivateLinkServiceConnectionState_STATUS_ARM) DeepCopyInto(out *PrivateLinkServiceConnectionState_STATUS_ARM) { - *out = *in - if in.ActionsRequired != nil { - in, out := &in.ActionsRequired, &out.ActionsRequired - *out = new(PrivateLinkServiceConnectionState_ActionsRequired_STATUS_ARM) - **out = **in - } - if in.Description != nil { - in, out := &in.Description, &out.Description - *out = new(string) - **out = **in - } - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(PrivateEndpointServiceConnectionStatus_STATUS_ARM) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateLinkServiceConnectionState_STATUS_ARM. -func (in *PrivateLinkServiceConnectionState_STATUS_ARM) DeepCopy() *PrivateLinkServiceConnectionState_STATUS_ARM { - if in == nil { - return nil - } - out := new(PrivateLinkServiceConnectionState_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Sku) DeepCopyInto(out *Sku) { - *out = *in - if in.Family != nil { - in, out := &in.Family, &out.Family - *out = new(Sku_Family) + if in.Family != nil { + in, out := &in.Family, &out.Family + *out = new(Sku_Family) **out = **in } if in.Name != nil { @@ -771,31 +403,6 @@ func (in *Sku) DeepCopy() *Sku { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Sku_ARM) DeepCopyInto(out *Sku_ARM) { - *out = *in - if in.Family != nil { - in, out := &in.Family, &out.Family - *out = new(Sku_Family_ARM) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(Sku_Name_ARM) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sku_ARM. -func (in *Sku_ARM) DeepCopy() *Sku_ARM { - if in == nil { - return nil - } - out := new(Sku_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Sku_STATUS) DeepCopyInto(out *Sku_STATUS) { *out = *in @@ -820,383 +427,124 @@ func (in *Sku_STATUS) DeepCopy() *Sku_STATUS { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Sku_STATUS_ARM) DeepCopyInto(out *Sku_STATUS_ARM) { - *out = *in - if in.Family != nil { - in, out := &in.Family, &out.Family - *out = new(Sku_Family_STATUS_ARM) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(Sku_Name_STATUS_ARM) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sku_STATUS_ARM. -func (in *Sku_STATUS_ARM) DeepCopy() *Sku_STATUS_ARM { - if in == nil { - return nil - } - out := new(Sku_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SystemData_STATUS) DeepCopyInto(out *SystemData_STATUS) { - *out = *in - if in.CreatedAt != nil { - in, out := &in.CreatedAt, &out.CreatedAt - *out = new(string) - **out = **in - } - if in.CreatedBy != nil { - in, out := &in.CreatedBy, &out.CreatedBy - *out = new(string) - **out = **in - } - if in.CreatedByType != nil { - in, out := &in.CreatedByType, &out.CreatedByType - *out = new(IdentityType_STATUS) - **out = **in - } - if in.LastModifiedAt != nil { - in, out := &in.LastModifiedAt, &out.LastModifiedAt - *out = new(string) - **out = **in - } - if in.LastModifiedBy != nil { - in, out := &in.LastModifiedBy, &out.LastModifiedBy - *out = new(string) - **out = **in - } - if in.LastModifiedByType != nil { - in, out := &in.LastModifiedByType, &out.LastModifiedByType - *out = new(IdentityType_STATUS) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemData_STATUS. -func (in *SystemData_STATUS) DeepCopy() *SystemData_STATUS { - if in == nil { - return nil - } - out := new(SystemData_STATUS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SystemData_STATUS_ARM) DeepCopyInto(out *SystemData_STATUS_ARM) { - *out = *in - if in.CreatedAt != nil { - in, out := &in.CreatedAt, &out.CreatedAt - *out = new(string) - **out = **in - } - if in.CreatedBy != nil { - in, out := &in.CreatedBy, &out.CreatedBy - *out = new(string) - **out = **in - } - if in.CreatedByType != nil { - in, out := &in.CreatedByType, &out.CreatedByType - *out = new(IdentityType_STATUS_ARM) - **out = **in - } - if in.LastModifiedAt != nil { - in, out := &in.LastModifiedAt, &out.LastModifiedAt - *out = new(string) - **out = **in - } - if in.LastModifiedBy != nil { - in, out := &in.LastModifiedBy, &out.LastModifiedBy - *out = new(string) - **out = **in - } - if in.LastModifiedByType != nil { - in, out := &in.LastModifiedByType, &out.LastModifiedByType - *out = new(IdentityType_STATUS_ARM) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemData_STATUS_ARM. -func (in *SystemData_STATUS_ARM) DeepCopy() *SystemData_STATUS_ARM { - if in == nil { - return nil - } - out := new(SystemData_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Vault) DeepCopyInto(out *Vault) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Vault. -func (in *Vault) DeepCopy() *Vault { - if in == nil { - return nil - } - out := new(Vault) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Vault) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultList) DeepCopyInto(out *VaultList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Vault, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultList. -func (in *VaultList) DeepCopy() *VaultList { - if in == nil { - return nil - } - out := new(VaultList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VaultList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultProperties) DeepCopyInto(out *VaultProperties) { - *out = *in - if in.AccessPolicies != nil { - in, out := &in.AccessPolicies, &out.AccessPolicies - *out = make([]AccessPolicyEntry, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.CreateMode != nil { - in, out := &in.CreateMode, &out.CreateMode - *out = new(VaultProperties_CreateMode) - **out = **in - } - if in.EnablePurgeProtection != nil { - in, out := &in.EnablePurgeProtection, &out.EnablePurgeProtection - *out = new(bool) - **out = **in - } - if in.EnableRbacAuthorization != nil { - in, out := &in.EnableRbacAuthorization, &out.EnableRbacAuthorization - *out = new(bool) - **out = **in - } - if in.EnableSoftDelete != nil { - in, out := &in.EnableSoftDelete, &out.EnableSoftDelete - *out = new(bool) - **out = **in - } - if in.EnabledForDeployment != nil { - in, out := &in.EnabledForDeployment, &out.EnabledForDeployment - *out = new(bool) - **out = **in - } - if in.EnabledForDiskEncryption != nil { - in, out := &in.EnabledForDiskEncryption, &out.EnabledForDiskEncryption - *out = new(bool) - **out = **in - } - if in.EnabledForTemplateDeployment != nil { - in, out := &in.EnabledForTemplateDeployment, &out.EnabledForTemplateDeployment - *out = new(bool) - **out = **in - } - if in.NetworkAcls != nil { - in, out := &in.NetworkAcls, &out.NetworkAcls - *out = new(NetworkRuleSet) - (*in).DeepCopyInto(*out) - } - if in.ProvisioningState != nil { - in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(VaultProperties_ProvisioningState) - **out = **in - } - if in.PublicNetworkAccess != nil { - in, out := &in.PublicNetworkAccess, &out.PublicNetworkAccess - *out = new(string) - **out = **in - } - if in.Sku != nil { - in, out := &in.Sku, &out.Sku - *out = new(Sku) - (*in).DeepCopyInto(*out) - } - if in.SoftDeleteRetentionInDays != nil { - in, out := &in.SoftDeleteRetentionInDays, &out.SoftDeleteRetentionInDays - *out = new(int) - **out = **in - } - if in.TenantId != nil { - in, out := &in.TenantId, &out.TenantId - *out = new(string) - **out = **in - } - if in.TenantIdFromConfig != nil { - in, out := &in.TenantIdFromConfig, &out.TenantIdFromConfig - *out = new(genruntime.ConfigMapReference) - **out = **in - } - if in.VaultUri != nil { - in, out := &in.VaultUri, &out.VaultUri - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultProperties. -func (in *VaultProperties) DeepCopy() *VaultProperties { - if in == nil { - return nil - } - out := new(VaultProperties) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultProperties_ARM) DeepCopyInto(out *VaultProperties_ARM) { - *out = *in - if in.AccessPolicies != nil { - in, out := &in.AccessPolicies, &out.AccessPolicies - *out = make([]AccessPolicyEntry_ARM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.CreateMode != nil { - in, out := &in.CreateMode, &out.CreateMode - *out = new(VaultProperties_CreateMode_ARM) - **out = **in - } - if in.EnablePurgeProtection != nil { - in, out := &in.EnablePurgeProtection, &out.EnablePurgeProtection - *out = new(bool) - **out = **in - } - if in.EnableRbacAuthorization != nil { - in, out := &in.EnableRbacAuthorization, &out.EnableRbacAuthorization - *out = new(bool) - **out = **in - } - if in.EnableSoftDelete != nil { - in, out := &in.EnableSoftDelete, &out.EnableSoftDelete - *out = new(bool) - **out = **in - } - if in.EnabledForDeployment != nil { - in, out := &in.EnabledForDeployment, &out.EnabledForDeployment - *out = new(bool) - **out = **in - } - if in.EnabledForDiskEncryption != nil { - in, out := &in.EnabledForDiskEncryption, &out.EnabledForDiskEncryption - *out = new(bool) - **out = **in - } - if in.EnabledForTemplateDeployment != nil { - in, out := &in.EnabledForTemplateDeployment, &out.EnabledForTemplateDeployment - *out = new(bool) - **out = **in - } - if in.NetworkAcls != nil { - in, out := &in.NetworkAcls, &out.NetworkAcls - *out = new(NetworkRuleSet_ARM) - (*in).DeepCopyInto(*out) - } - if in.ProvisioningState != nil { - in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(VaultProperties_ProvisioningState_ARM) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SystemData_STATUS) DeepCopyInto(out *SystemData_STATUS) { + *out = *in + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) **out = **in } - if in.PublicNetworkAccess != nil { - in, out := &in.PublicNetworkAccess, &out.PublicNetworkAccess + if in.CreatedBy != nil { + in, out := &in.CreatedBy, &out.CreatedBy *out = new(string) **out = **in } - if in.Sku != nil { - in, out := &in.Sku, &out.Sku - *out = new(Sku_ARM) - (*in).DeepCopyInto(*out) - } - if in.SoftDeleteRetentionInDays != nil { - in, out := &in.SoftDeleteRetentionInDays, &out.SoftDeleteRetentionInDays - *out = new(int) + if in.CreatedByType != nil { + in, out := &in.CreatedByType, &out.CreatedByType + *out = new(IdentityType_STATUS) **out = **in } - if in.TenantId != nil { - in, out := &in.TenantId, &out.TenantId + if in.LastModifiedAt != nil { + in, out := &in.LastModifiedAt, &out.LastModifiedAt *out = new(string) **out = **in } - if in.VaultUri != nil { - in, out := &in.VaultUri, &out.VaultUri + if in.LastModifiedBy != nil { + in, out := &in.LastModifiedBy, &out.LastModifiedBy *out = new(string) **out = **in } + if in.LastModifiedByType != nil { + in, out := &in.LastModifiedByType, &out.LastModifiedByType + *out = new(IdentityType_STATUS) + **out = **in + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultProperties_ARM. -func (in *VaultProperties_ARM) DeepCopy() *VaultProperties_ARM { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemData_STATUS. +func (in *SystemData_STATUS) DeepCopy() *SystemData_STATUS { if in == nil { return nil } - out := new(VaultProperties_ARM) + out := new(SystemData_STATUS) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultProperties_STATUS) DeepCopyInto(out *VaultProperties_STATUS) { +func (in *Vault) DeepCopyInto(out *Vault) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Vault. +func (in *Vault) DeepCopy() *Vault { + if in == nil { + return nil + } + out := new(Vault) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Vault) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VaultList) DeepCopyInto(out *VaultList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Vault, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultList. +func (in *VaultList) DeepCopy() *VaultList { + if in == nil { + return nil + } + out := new(VaultList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VaultList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VaultProperties) DeepCopyInto(out *VaultProperties) { *out = *in if in.AccessPolicies != nil { in, out := &in.AccessPolicies, &out.AccessPolicies - *out = make([]AccessPolicyEntry_STATUS, len(*in)) + *out = make([]AccessPolicyEntry, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.CreateMode != nil { in, out := &in.CreateMode, &out.CreateMode - *out = new(VaultProperties_CreateMode_STATUS) + *out = new(VaultProperties_CreateMode) **out = **in } if in.EnablePurgeProtection != nil { @@ -1229,26 +577,14 @@ func (in *VaultProperties_STATUS) DeepCopyInto(out *VaultProperties_STATUS) { *out = new(bool) **out = **in } - if in.HsmPoolResourceId != nil { - in, out := &in.HsmPoolResourceId, &out.HsmPoolResourceId - *out = new(string) - **out = **in - } if in.NetworkAcls != nil { in, out := &in.NetworkAcls, &out.NetworkAcls - *out = new(NetworkRuleSet_STATUS) + *out = new(NetworkRuleSet) (*in).DeepCopyInto(*out) } - if in.PrivateEndpointConnections != nil { - in, out := &in.PrivateEndpointConnections, &out.PrivateEndpointConnections - *out = make([]PrivateEndpointConnectionItem_STATUS, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } if in.ProvisioningState != nil { in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(VaultProperties_ProvisioningState_STATUS) + *out = new(VaultProperties_ProvisioningState) **out = **in } if in.PublicNetworkAccess != nil { @@ -1258,7 +594,7 @@ func (in *VaultProperties_STATUS) DeepCopyInto(out *VaultProperties_STATUS) { } if in.Sku != nil { in, out := &in.Sku, &out.Sku - *out = new(Sku_STATUS) + *out = new(Sku) (*in).DeepCopyInto(*out) } if in.SoftDeleteRetentionInDays != nil { @@ -1271,6 +607,11 @@ func (in *VaultProperties_STATUS) DeepCopyInto(out *VaultProperties_STATUS) { *out = new(string) **out = **in } + if in.TenantIdFromConfig != nil { + in, out := &in.TenantIdFromConfig, &out.TenantIdFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } if in.VaultUri != nil { in, out := &in.VaultUri, &out.VaultUri *out = new(string) @@ -1278,29 +619,29 @@ func (in *VaultProperties_STATUS) DeepCopyInto(out *VaultProperties_STATUS) { } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultProperties_STATUS. -func (in *VaultProperties_STATUS) DeepCopy() *VaultProperties_STATUS { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultProperties. +func (in *VaultProperties) DeepCopy() *VaultProperties { if in == nil { return nil } - out := new(VaultProperties_STATUS) + out := new(VaultProperties) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VaultProperties_STATUS_ARM) DeepCopyInto(out *VaultProperties_STATUS_ARM) { +func (in *VaultProperties_STATUS) DeepCopyInto(out *VaultProperties_STATUS) { *out = *in if in.AccessPolicies != nil { in, out := &in.AccessPolicies, &out.AccessPolicies - *out = make([]AccessPolicyEntry_STATUS_ARM, len(*in)) + *out = make([]AccessPolicyEntry_STATUS, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.CreateMode != nil { in, out := &in.CreateMode, &out.CreateMode - *out = new(VaultProperties_CreateMode_STATUS_ARM) + *out = new(VaultProperties_CreateMode_STATUS) **out = **in } if in.EnablePurgeProtection != nil { @@ -1340,19 +681,19 @@ func (in *VaultProperties_STATUS_ARM) DeepCopyInto(out *VaultProperties_STATUS_A } if in.NetworkAcls != nil { in, out := &in.NetworkAcls, &out.NetworkAcls - *out = new(NetworkRuleSet_STATUS_ARM) + *out = new(NetworkRuleSet_STATUS) (*in).DeepCopyInto(*out) } if in.PrivateEndpointConnections != nil { in, out := &in.PrivateEndpointConnections, &out.PrivateEndpointConnections - *out = make([]PrivateEndpointConnectionItem_STATUS_ARM, len(*in)) + *out = make([]PrivateEndpointConnectionItem_STATUS, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.ProvisioningState != nil { in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(VaultProperties_ProvisioningState_STATUS_ARM) + *out = new(VaultProperties_ProvisioningState_STATUS) **out = **in } if in.PublicNetworkAccess != nil { @@ -1362,7 +703,7 @@ func (in *VaultProperties_STATUS_ARM) DeepCopyInto(out *VaultProperties_STATUS_A } if in.Sku != nil { in, out := &in.Sku, &out.Sku - *out = new(Sku_STATUS_ARM) + *out = new(Sku_STATUS) (*in).DeepCopyInto(*out) } if in.SoftDeleteRetentionInDays != nil { @@ -1382,12 +723,12 @@ func (in *VaultProperties_STATUS_ARM) DeepCopyInto(out *VaultProperties_STATUS_A } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultProperties_STATUS_ARM. -func (in *VaultProperties_STATUS_ARM) DeepCopy() *VaultProperties_STATUS_ARM { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VaultProperties_STATUS. +func (in *VaultProperties_STATUS) DeepCopy() *VaultProperties_STATUS { if in == nil { return nil } - out := new(VaultProperties_STATUS_ARM) + out := new(VaultProperties_STATUS) in.DeepCopyInto(out) return out } @@ -1451,58 +792,6 @@ func (in *Vault_STATUS) DeepCopy() *Vault_STATUS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Vault_STATUS_ARM) DeepCopyInto(out *Vault_STATUS_ARM) { - *out = *in - if in.Id != nil { - in, out := &in.Id, &out.Id - *out = new(string) - **out = **in - } - if in.Location != nil { - in, out := &in.Location, &out.Location - *out = new(string) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = new(VaultProperties_STATUS_ARM) - (*in).DeepCopyInto(*out) - } - if in.SystemData != nil { - in, out := &in.SystemData, &out.SystemData - *out = new(SystemData_STATUS_ARM) - (*in).DeepCopyInto(*out) - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Vault_STATUS_ARM. -func (in *Vault_STATUS_ARM) DeepCopy() *Vault_STATUS_ARM { - if in == nil { - return nil - } - out := new(Vault_STATUS_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Vault_Spec) DeepCopyInto(out *Vault_Spec) { *out = *in @@ -1540,38 +829,6 @@ func (in *Vault_Spec) DeepCopy() *Vault_Spec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Vault_Spec_ARM) DeepCopyInto(out *Vault_Spec_ARM) { - *out = *in - if in.Location != nil { - in, out := &in.Location, &out.Location - *out = new(string) - **out = **in - } - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = new(VaultProperties_ARM) - (*in).DeepCopyInto(*out) - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Vault_Spec_ARM. -func (in *Vault_Spec_ARM) DeepCopy() *Vault_Spec_ARM { - if in == nil { - return nil - } - out := new(Vault_Spec_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualNetworkRule) DeepCopyInto(out *VirtualNetworkRule) { *out = *in @@ -1597,31 +854,6 @@ func (in *VirtualNetworkRule) DeepCopy() *VirtualNetworkRule { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualNetworkRule_ARM) DeepCopyInto(out *VirtualNetworkRule_ARM) { - *out = *in - if in.Id != nil { - in, out := &in.Id, &out.Id - *out = new(string) - **out = **in - } - if in.IgnoreMissingVnetServiceEndpoint != nil { - in, out := &in.IgnoreMissingVnetServiceEndpoint, &out.IgnoreMissingVnetServiceEndpoint - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualNetworkRule_ARM. -func (in *VirtualNetworkRule_ARM) DeepCopy() *VirtualNetworkRule_ARM { - if in == nil { - return nil - } - out := new(VirtualNetworkRule_ARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualNetworkRule_STATUS) DeepCopyInto(out *VirtualNetworkRule_STATUS) { *out = *in @@ -1646,28 +878,3 @@ func (in *VirtualNetworkRule_STATUS) DeepCopy() *VirtualNetworkRule_STATUS { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualNetworkRule_STATUS_ARM) DeepCopyInto(out *VirtualNetworkRule_STATUS_ARM) { - *out = *in - if in.Id != nil { - in, out := &in.Id, &out.Id - *out = new(string) - **out = **in - } - if in.IgnoreMissingVnetServiceEndpoint != nil { - in, out := &in.IgnoreMissingVnetServiceEndpoint, &out.IgnoreMissingVnetServiceEndpoint - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualNetworkRule_STATUS_ARM. -func (in *VirtualNetworkRule_STATUS_ARM) DeepCopy() *VirtualNetworkRule_STATUS_ARM { - if in == nil { - return nil - } - out := new(VirtualNetworkRule_STATUS_ARM) - in.DeepCopyInto(out) - return out -} diff --git a/v2/tools/generator/internal/astmodel/type_name.go b/v2/tools/generator/internal/astmodel/type_name.go index 3df8443a9f8..960a91f8938 100644 --- a/v2/tools/generator/internal/astmodel/type_name.go +++ b/v2/tools/generator/internal/astmodel/type_name.go @@ -45,7 +45,6 @@ var armPackageDenyList = set.Make( "eventgrid", "eventhub", "insights", - "keyvault", "kubernetesconfiguration", "machinelearningservices", "managedidentity",