// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package arm

// disk encryption set resource.
type DiskEncryptionSet_STATUS struct {
	// Id: Resource Id
	Id *string `json:"id,omitempty"`

	// Identity: The managed identity for the disk encryption set. It should be given permission on the key vault before it can
	// be used  to encrypt disks.
	Identity *EncryptionSetIdentity_STATUS `json:"identity,omitempty"`

	// Location: Resource location
	Location *string `json:"location,omitempty"`

	// Name: Resource name
	Name       *string                         `json:"name,omitempty"`
	Properties *EncryptionSetProperties_STATUS `json:"properties,omitempty"`

	// Tags: Resource tags
	Tags map[string]string `json:"tags,omitempty"`

	// Type: Resource type
	Type *string `json:"type,omitempty"`
}

// The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used
// to encrypt disks.
type EncryptionSetIdentity_STATUS struct {
	// PrincipalId: The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the
	// x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity
	PrincipalId *string `json:"principalId,omitempty"`

	// TenantId: The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the
	// x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity
	TenantId *string `json:"tenantId,omitempty"`

	// Type: The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations.
	// Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active
	// Directory tenant; it will cause the encrypted resources to lose access to the keys.
	Type *EncryptionSetIdentity_Type_STATUS `json:"type,omitempty"`

	// UserAssignedIdentities: The list of user identities associated with the disk encryption set. The user identity
	// dictionary key references will be ARM resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities map[string]UserAssignedIdentitiesValue_STATUS `json:"userAssignedIdentities,omitempty"`
}

type EncryptionSetProperties_STATUS struct {
	// ActiveKey: The key vault key which is currently used by this disk encryption set.
	ActiveKey *KeyForDiskEncryptionSet_STATUS `json:"activeKey,omitempty"`

	// AutoKeyRotationError: The error that was encountered during auto-key rotation. If an error is present, then auto-key
	// rotation will not be attempted until the error on this disk encryption set is fixed.
	AutoKeyRotationError *ApiError_STATUS `json:"autoKeyRotationError,omitempty"`

	// EncryptionType: The type of key used to encrypt the data of the disk.
	EncryptionType *DiskEncryptionSetType_STATUS `json:"encryptionType,omitempty"`

	// FederatedClientId: Multi-tenant application client id to access key vault in a different tenant. Setting the value to
	// 'None' will clear the property.
	FederatedClientId *string `json:"federatedClientId,omitempty"`

	// LastKeyRotationTimestamp: The time when the active key of this disk encryption set was updated.
	LastKeyRotationTimestamp *string `json:"lastKeyRotationTimestamp,omitempty"`

	// PreviousKeys: A readonly collection of key vault keys previously used by this disk encryption set while a key rotation
	// is in progress. It will be empty if there is no ongoing key rotation.
	PreviousKeys []KeyForDiskEncryptionSet_STATUS `json:"previousKeys,omitempty"`

	// ProvisioningState: The disk encryption set provisioning state.
	ProvisioningState *string `json:"provisioningState,omitempty"`

	// RotationToLatestKeyVersionEnabled: Set this flag to true to enable auto-updating of this disk encryption set to the
	// latest key version.
	RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"`
}

// Api error.
type ApiError_STATUS struct {
	// Code: The error code.
	Code *string `json:"code,omitempty"`

	// Details: The Api error details
	Details []ApiErrorBase_STATUS `json:"details,omitempty"`

	// Innererror: The Api inner error
	Innererror *InnerError_STATUS `json:"innererror,omitempty"`

	// Message: The error message.
	Message *string `json:"message,omitempty"`

	// Target: The target of the particular error.
	Target *string `json:"target,omitempty"`
}

// The type of key used to encrypt the data of the disk.
type DiskEncryptionSetType_STATUS string

const (
	DiskEncryptionSetType_STATUS_ConfidentialVmEncryptedWithCustomerKey      = DiskEncryptionSetType_STATUS("ConfidentialVmEncryptedWithCustomerKey")
	DiskEncryptionSetType_STATUS_EncryptionAtRestWithCustomerKey             = DiskEncryptionSetType_STATUS("EncryptionAtRestWithCustomerKey")
	DiskEncryptionSetType_STATUS_EncryptionAtRestWithPlatformAndCustomerKeys = DiskEncryptionSetType_STATUS("EncryptionAtRestWithPlatformAndCustomerKeys")
)

// Mapping from string to DiskEncryptionSetType_STATUS
var diskEncryptionSetType_STATUS_Values = map[string]DiskEncryptionSetType_STATUS{
	"confidentialvmencryptedwithcustomerkey":      DiskEncryptionSetType_STATUS_ConfidentialVmEncryptedWithCustomerKey,
	"encryptionatrestwithcustomerkey":             DiskEncryptionSetType_STATUS_EncryptionAtRestWithCustomerKey,
	"encryptionatrestwithplatformandcustomerkeys": DiskEncryptionSetType_STATUS_EncryptionAtRestWithPlatformAndCustomerKeys,
}

type EncryptionSetIdentity_Type_STATUS string

const (
	EncryptionSetIdentity_Type_STATUS_None                       = EncryptionSetIdentity_Type_STATUS("None")
	EncryptionSetIdentity_Type_STATUS_SystemAssigned             = EncryptionSetIdentity_Type_STATUS("SystemAssigned")
	EncryptionSetIdentity_Type_STATUS_SystemAssignedUserAssigned = EncryptionSetIdentity_Type_STATUS("SystemAssigned, UserAssigned")
	EncryptionSetIdentity_Type_STATUS_UserAssigned               = EncryptionSetIdentity_Type_STATUS("UserAssigned")
)

// Mapping from string to EncryptionSetIdentity_Type_STATUS
var encryptionSetIdentity_Type_STATUS_Values = map[string]EncryptionSetIdentity_Type_STATUS{
	"none":                         EncryptionSetIdentity_Type_STATUS_None,
	"systemassigned":               EncryptionSetIdentity_Type_STATUS_SystemAssigned,
	"systemassigned, userassigned": EncryptionSetIdentity_Type_STATUS_SystemAssignedUserAssigned,
	"userassigned":                 EncryptionSetIdentity_Type_STATUS_UserAssigned,
}

// Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots
type KeyForDiskEncryptionSet_STATUS struct {
	// KeyUrl: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of
	// rotationToLatestKeyVersionEnabled value.
	KeyUrl *string `json:"keyUrl,omitempty"`

	// SourceVault: Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if
	// the KeyVault subscription is not the same as the Disk Encryption Set subscription.
	SourceVault *SourceVault_STATUS `json:"sourceVault,omitempty"`
}

type UserAssignedIdentitiesValue_STATUS struct {
	// ClientId: The client id of user assigned identity.
	ClientId *string `json:"clientId,omitempty"`

	// PrincipalId: The principal id of user assigned identity.
	PrincipalId *string `json:"principalId,omitempty"`
}

// Api error base.
type ApiErrorBase_STATUS struct {
	// Code: The error code.
	Code *string `json:"code,omitempty"`

	// Message: The error message.
	Message *string `json:"message,omitempty"`

	// Target: The target of the particular error.
	Target *string `json:"target,omitempty"`
}

// Inner error details.
type InnerError_STATUS struct {
	// Errordetail: The internal error message or exception dump.
	Errordetail *string `json:"errordetail,omitempty"`

	// Exceptiontype: The exception type.
	Exceptiontype *string `json:"exceptiontype,omitempty"`
}

// The vault id is an Azure Resource Manager Resource id in the form
// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
type SourceVault_STATUS struct {
	// Id: Resource Id
	Id *string `json:"id,omitempty"`
}
