// 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 BatchAccount_Spec struct {
	// Identity: The identity of the Batch account.
	Identity *BatchAccountIdentity `json:"identity,omitempty"`

	// Location: The region in which to create the account.
	Location *string `json:"location,omitempty"`
	Name     string  `json:"name,omitempty"`

	// Properties: The properties of the Batch account.
	Properties *BatchAccountCreateProperties `json:"properties,omitempty"`

	// Tags: The user-specified tags associated with the account.
	Tags map[string]string `json:"tags,omitempty"`
}

var _ genruntime.ARMResourceSpec = &BatchAccount_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2021-01-01"
func (account BatchAccount_Spec) GetAPIVersion() string {
	return "2021-01-01"
}

// GetName returns the Name of the resource
func (account *BatchAccount_Spec) GetName() string {
	return account.Name
}

// GetType returns the ARM Type of the resource. This is always "Microsoft.Batch/batchAccounts"
func (account *BatchAccount_Spec) GetType() string {
	return "Microsoft.Batch/batchAccounts"
}

// The properties of a Batch account.
type BatchAccountCreateProperties struct {
	// AutoStorage: The properties related to the auto-storage account.
	AutoStorage *AutoStorageBaseProperties `json:"autoStorage,omitempty"`

	// Encryption: Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using
	// a Microsoft managed key. For additional control, a customer-managed key can be used instead.
	Encryption *EncryptionProperties `json:"encryption,omitempty"`

	// KeyVaultReference: A reference to the Azure key vault associated with the Batch account.
	KeyVaultReference *KeyVaultReference `json:"keyVaultReference,omitempty"`

	// PoolAllocationMode: The pool allocation mode also affects how clients may authenticate to the Batch Service API. If the
	// mode is BatchService, clients may authenticate using access keys or Azure Active Directory. If the mode is
	// UserSubscription, clients must use Azure Active Directory. The default is BatchService.
	PoolAllocationMode *PoolAllocationMode `json:"poolAllocationMode,omitempty"`

	// PublicNetworkAccess: If not specified, the default value is 'enabled'.
	PublicNetworkAccess *PublicNetworkAccessType `json:"publicNetworkAccess,omitempty"`
}

// The identity of the Batch account, if configured. This is only used when the user specifies 'Microsoft.KeyVault' as
// their Batch account encryption configuration.
type BatchAccountIdentity struct {
	// Type: The type of identity used for the Batch account.
	Type                   *BatchAccountIdentity_Type             `json:"type,omitempty"`
	UserAssignedIdentities map[string]UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

// The properties related to the auto-storage account.
type AutoStorageBaseProperties struct {
	// StorageAccountId: The resource ID of the storage account to be used for auto-storage account.
	StorageAccountId *string `json:"storageAccountId,omitempty"`
}

// +kubebuilder:validation:Enum={"None","SystemAssigned","UserAssigned"}
type BatchAccountIdentity_Type string

const (
	BatchAccountIdentity_Type_None           = BatchAccountIdentity_Type("None")
	BatchAccountIdentity_Type_SystemAssigned = BatchAccountIdentity_Type("SystemAssigned")
	BatchAccountIdentity_Type_UserAssigned   = BatchAccountIdentity_Type("UserAssigned")
)

// Mapping from string to BatchAccountIdentity_Type
var batchAccountIdentity_Type_Values = map[string]BatchAccountIdentity_Type{
	"none":           BatchAccountIdentity_Type_None,
	"systemassigned": BatchAccountIdentity_Type_SystemAssigned,
	"userassigned":   BatchAccountIdentity_Type_UserAssigned,
}

// Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft
// managed key. For additional control, a customer-managed key can be used instead.
type EncryptionProperties struct {
	// KeySource: Type of the key source.
	KeySource *EncryptionProperties_KeySource `json:"keySource,omitempty"`

	// KeyVaultProperties: Additional details when using Microsoft.KeyVault
	KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"`
}

// Identifies the Azure key vault associated with a Batch account.
type KeyVaultReference struct {
	// Id: The resource ID of the Azure key vault associated with the Batch account.
	Id *string `json:"id,omitempty"`

	// Url: The URL of the Azure key vault associated with the Batch account.
	Url *string `json:"url,omitempty"`
}

// The allocation mode for creating pools in the Batch account.
// +kubebuilder:validation:Enum={"BatchService","UserSubscription"}
type PoolAllocationMode string

const (
	PoolAllocationMode_BatchService     = PoolAllocationMode("BatchService")
	PoolAllocationMode_UserSubscription = PoolAllocationMode("UserSubscription")
)

// Mapping from string to PoolAllocationMode
var poolAllocationMode_Values = map[string]PoolAllocationMode{
	"batchservice":     PoolAllocationMode_BatchService,
	"usersubscription": PoolAllocationMode_UserSubscription,
}

// The network access type for operating on the resources in the Batch account.
// +kubebuilder:validation:Enum={"Disabled","Enabled"}
type PublicNetworkAccessType string

const (
	PublicNetworkAccessType_Disabled = PublicNetworkAccessType("Disabled")
	PublicNetworkAccessType_Enabled  = PublicNetworkAccessType("Enabled")
)

// Mapping from string to PublicNetworkAccessType
var publicNetworkAccessType_Values = map[string]PublicNetworkAccessType{
	"disabled": PublicNetworkAccessType_Disabled,
	"enabled":  PublicNetworkAccessType_Enabled,
}

// Information about the user assigned identity for the resource
type UserAssignedIdentityDetails struct {
}

// +kubebuilder:validation:Enum={"Microsoft.Batch","Microsoft.KeyVault"}
type EncryptionProperties_KeySource string

const (
	EncryptionProperties_KeySource_MicrosoftBatch    = EncryptionProperties_KeySource("Microsoft.Batch")
	EncryptionProperties_KeySource_MicrosoftKeyVault = EncryptionProperties_KeySource("Microsoft.KeyVault")
)

// Mapping from string to EncryptionProperties_KeySource
var encryptionProperties_KeySource_Values = map[string]EncryptionProperties_KeySource{
	"microsoft.batch":    EncryptionProperties_KeySource_MicrosoftBatch,
	"microsoft.keyvault": EncryptionProperties_KeySource_MicrosoftKeyVault,
}

// KeyVault configuration when using an encryption KeySource of Microsoft.KeyVault.
type KeyVaultProperties struct {
	// KeyIdentifier: Full path to the versioned secret. Example
	// https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. To be usable the following
	// prerequisites must be met:
	// The Batch Account has a System Assigned identity
	// The account identity has been granted Key/Get, Key/Unwrap and Key/Wrap permissions
	// The KeyVault has soft-delete and purge protection enabled
	KeyIdentifier *string `json:"keyIdentifier,omitempty"`
}
