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

import (
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/core"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets"
	"github.com/rotisserie/eris"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
)

// +kubebuilder:rbac:groups=documentdb.azure.com,resources=databaseaccounts,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=documentdb.azure.com,resources={databaseaccounts/status,databaseaccounts/finalizers},verbs=get;update;patch

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,documentdb}
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity"
// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason"
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message"
// Storage version of v1api20240815.DatabaseAccount
// Generator information:
// - Generated from: /cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-08-15/cosmos-db.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}
type DatabaseAccount struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              DatabaseAccount_Spec   `json:"spec,omitempty"`
	Status            DatabaseAccount_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &DatabaseAccount{}

// GetConditions returns the conditions of the resource
func (account *DatabaseAccount) GetConditions() conditions.Conditions {
	return account.Status.Conditions
}

// SetConditions sets the conditions on the resource status
func (account *DatabaseAccount) SetConditions(conditions conditions.Conditions) {
	account.Status.Conditions = conditions
}

var _ configmaps.Exporter = &DatabaseAccount{}

// ConfigMapDestinationExpressions returns the Spec.OperatorSpec.ConfigMapExpressions property
func (account *DatabaseAccount) ConfigMapDestinationExpressions() []*core.DestinationExpression {
	if account.Spec.OperatorSpec == nil {
		return nil
	}
	return account.Spec.OperatorSpec.ConfigMapExpressions
}

var _ secrets.Exporter = &DatabaseAccount{}

// SecretDestinationExpressions returns the Spec.OperatorSpec.SecretExpressions property
func (account *DatabaseAccount) SecretDestinationExpressions() []*core.DestinationExpression {
	if account.Spec.OperatorSpec == nil {
		return nil
	}
	return account.Spec.OperatorSpec.SecretExpressions
}

var _ genruntime.KubernetesResource = &DatabaseAccount{}

// AzureName returns the Azure name of the resource
func (account *DatabaseAccount) AzureName() string {
	return account.Spec.AzureName
}

// GetAPIVersion returns the ARM API version of the resource. This is always "2024-08-15"
func (account DatabaseAccount) GetAPIVersion() string {
	return "2024-08-15"
}

// GetResourceScope returns the scope of the resource
func (account *DatabaseAccount) GetResourceScope() genruntime.ResourceScope {
	return genruntime.ResourceScopeResourceGroup
}

// GetSpec returns the specification of this resource
func (account *DatabaseAccount) GetSpec() genruntime.ConvertibleSpec {
	return &account.Spec
}

// GetStatus returns the status of this resource
func (account *DatabaseAccount) GetStatus() genruntime.ConvertibleStatus {
	return &account.Status
}

// GetSupportedOperations returns the operations supported by the resource
func (account *DatabaseAccount) GetSupportedOperations() []genruntime.ResourceOperation {
	return []genruntime.ResourceOperation{
		genruntime.ResourceOperationDelete,
		genruntime.ResourceOperationGet,
		genruntime.ResourceOperationPut,
	}
}

// GetType returns the ARM Type of the resource. This is always "Microsoft.DocumentDB/databaseAccounts"
func (account *DatabaseAccount) GetType() string {
	return "Microsoft.DocumentDB/databaseAccounts"
}

// NewEmptyStatus returns a new empty (blank) status
func (account *DatabaseAccount) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &DatabaseAccount_STATUS{}
}

// Owner returns the ResourceReference of the owner
func (account *DatabaseAccount) Owner() *genruntime.ResourceReference {
	if account.Spec.Owner == nil {
		return nil
	}

	group, kind := genruntime.LookupOwnerGroupKind(account.Spec)
	return account.Spec.Owner.AsResourceReference(group, kind)
}

// SetStatus sets the status of this resource
func (account *DatabaseAccount) SetStatus(status genruntime.ConvertibleStatus) error {
	// If we have exactly the right type of status, assign it
	if st, ok := status.(*DatabaseAccount_STATUS); ok {
		account.Status = *st
		return nil
	}

	// Convert status to required version
	var st DatabaseAccount_STATUS
	err := status.ConvertStatusTo(&st)
	if err != nil {
		return eris.Wrap(err, "failed to convert status")
	}

	account.Status = st
	return nil
}

// Hub marks that this DatabaseAccount is the hub type for conversion
func (account *DatabaseAccount) Hub() {}

// OriginalGVK returns a GroupValueKind for the original API version used to create the resource
func (account *DatabaseAccount) OriginalGVK() *schema.GroupVersionKind {
	return &schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: account.Spec.OriginalVersion,
		Kind:    "DatabaseAccount",
	}
}

// +kubebuilder:object:root=true
// Storage version of v1api20240815.DatabaseAccount
// Generator information:
// - Generated from: /cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2024-08-15/cosmos-db.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}
type DatabaseAccountList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DatabaseAccount `json:"items"`
}

// Storage version of v1api20240815.APIVersion
// +kubebuilder:validation:Enum={"2024-08-15"}
type APIVersion string

const APIVersion_Value = APIVersion("2024-08-15")

// Storage version of v1api20240815.DatabaseAccount_Spec
type DatabaseAccount_Spec struct {
	AnalyticalStorageConfiguration *AnalyticalStorageConfiguration `json:"analyticalStorageConfiguration,omitempty"`
	ApiProperties                  *ApiProperties                  `json:"apiProperties,omitempty"`

	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName                          string                         `json:"azureName,omitempty"`
	BackupPolicy                       *BackupPolicy                  `json:"backupPolicy,omitempty"`
	Capabilities                       []Capability                   `json:"capabilities,omitempty"`
	Capacity                           *Capacity                      `json:"capacity,omitempty"`
	ConnectorOffer                     *string                        `json:"connectorOffer,omitempty"`
	ConsistencyPolicy                  *ConsistencyPolicy             `json:"consistencyPolicy,omitempty"`
	Cors                               []CorsPolicy                   `json:"cors,omitempty"`
	CreateMode                         *string                        `json:"createMode,omitempty"`
	DatabaseAccountOfferType           *string                        `json:"databaseAccountOfferType,omitempty"`
	DefaultIdentity                    *string                        `json:"defaultIdentity,omitempty"`
	DisableKeyBasedMetadataWriteAccess *bool                          `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
	DisableLocalAuth                   *bool                          `json:"disableLocalAuth,omitempty"`
	EnableAnalyticalStorage            *bool                          `json:"enableAnalyticalStorage,omitempty"`
	EnableAutomaticFailover            *bool                          `json:"enableAutomaticFailover,omitempty"`
	EnableBurstCapacity                *bool                          `json:"enableBurstCapacity,omitempty"`
	EnableCassandraConnector           *bool                          `json:"enableCassandraConnector,omitempty"`
	EnableFreeTier                     *bool                          `json:"enableFreeTier,omitempty"`
	EnableMultipleWriteLocations       *bool                          `json:"enableMultipleWriteLocations,omitempty"`
	EnablePartitionMerge               *bool                          `json:"enablePartitionMerge,omitempty"`
	Identity                           *ManagedServiceIdentity        `json:"identity,omitempty"`
	IpRules                            []IpAddressOrRange             `json:"ipRules,omitempty"`
	IsVirtualNetworkFilterEnabled      *bool                          `json:"isVirtualNetworkFilterEnabled,omitempty"`
	KeyVaultKeyUri                     *string                        `json:"keyVaultKeyUri,omitempty"`
	Kind                               *string                        `json:"kind,omitempty"`
	Location                           *string                        `json:"location,omitempty"`
	Locations                          []Location                     `json:"locations,omitempty"`
	MinimalTlsVersion                  *string                        `json:"minimalTlsVersion,omitempty"`
	NetworkAclBypass                   *string                        `json:"networkAclBypass,omitempty"`
	NetworkAclBypassResourceReferences []genruntime.ResourceReference `armReference:"NetworkAclBypassResourceIds" json:"networkAclBypassResourceReferences,omitempty"`
	OperatorSpec                       *DatabaseAccountOperatorSpec   `json:"operatorSpec,omitempty"`
	OriginalVersion                    string                         `json:"originalVersion,omitempty"`

	// +kubebuilder:validation:Required
	// Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also
	// controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a
	// reference to a resources.azure.com/ResourceGroup resource
	Owner               *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"`
	PropertyBag         genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	PublicNetworkAccess *string                            `json:"publicNetworkAccess,omitempty"`
	RestoreParameters   *RestoreParameters                 `json:"restoreParameters,omitempty"`
	Tags                map[string]string                  `json:"tags,omitempty"`
	VirtualNetworkRules []VirtualNetworkRule               `json:"virtualNetworkRules,omitempty"`
}

var _ genruntime.ConvertibleSpec = &DatabaseAccount_Spec{}

// ConvertSpecFrom populates our DatabaseAccount_Spec from the provided source
func (account *DatabaseAccount_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error {
	if source == account {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return source.ConvertSpecTo(account)
}

// ConvertSpecTo populates the provided destination from our DatabaseAccount_Spec
func (account *DatabaseAccount_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error {
	if destination == account {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return destination.ConvertSpecFrom(account)
}

// Storage version of v1api20240815.DatabaseAccount_STATUS
type DatabaseAccount_STATUS struct {
	AnalyticalStorageConfiguration     *AnalyticalStorageConfiguration_STATUS `json:"analyticalStorageConfiguration,omitempty"`
	ApiProperties                      *ApiProperties_STATUS                  `json:"apiProperties,omitempty"`
	BackupPolicy                       *BackupPolicy_STATUS                   `json:"backupPolicy,omitempty"`
	Capabilities                       []Capability_STATUS                    `json:"capabilities,omitempty"`
	Capacity                           *Capacity_STATUS                       `json:"capacity,omitempty"`
	Conditions                         []conditions.Condition                 `json:"conditions,omitempty"`
	ConnectorOffer                     *string                                `json:"connectorOffer,omitempty"`
	ConsistencyPolicy                  *ConsistencyPolicy_STATUS              `json:"consistencyPolicy,omitempty"`
	Cors                               []CorsPolicy_STATUS                    `json:"cors,omitempty"`
	CreateMode                         *string                                `json:"createMode,omitempty"`
	CustomerManagedKeyStatus           *string                                `json:"customerManagedKeyStatus,omitempty"`
	DatabaseAccountOfferType           *string                                `json:"databaseAccountOfferType,omitempty"`
	DefaultIdentity                    *string                                `json:"defaultIdentity,omitempty"`
	DisableKeyBasedMetadataWriteAccess *bool                                  `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
	DisableLocalAuth                   *bool                                  `json:"disableLocalAuth,omitempty"`
	DocumentEndpoint                   *string                                `json:"documentEndpoint,omitempty"`
	EnableAnalyticalStorage            *bool                                  `json:"enableAnalyticalStorage,omitempty"`
	EnableAutomaticFailover            *bool                                  `json:"enableAutomaticFailover,omitempty"`
	EnableBurstCapacity                *bool                                  `json:"enableBurstCapacity,omitempty"`
	EnableCassandraConnector           *bool                                  `json:"enableCassandraConnector,omitempty"`
	EnableFreeTier                     *bool                                  `json:"enableFreeTier,omitempty"`
	EnableMultipleWriteLocations       *bool                                  `json:"enableMultipleWriteLocations,omitempty"`
	EnablePartitionMerge               *bool                                  `json:"enablePartitionMerge,omitempty"`
	FailoverPolicies                   []FailoverPolicy_STATUS                `json:"failoverPolicies,omitempty"`
	Id                                 *string                                `json:"id,omitempty"`
	Identity                           *ManagedServiceIdentity_STATUS         `json:"identity,omitempty"`
	InstanceId                         *string                                `json:"instanceId,omitempty"`
	IpRules                            []IpAddressOrRange_STATUS              `json:"ipRules,omitempty"`
	IsVirtualNetworkFilterEnabled      *bool                                  `json:"isVirtualNetworkFilterEnabled,omitempty"`
	KeyVaultKeyUri                     *string                                `json:"keyVaultKeyUri,omitempty"`
	KeysMetadata                       *DatabaseAccountKeysMetadata_STATUS    `json:"keysMetadata,omitempty"`
	Kind                               *string                                `json:"kind,omitempty"`
	Location                           *string                                `json:"location,omitempty"`
	Locations                          []Location_STATUS                      `json:"locations,omitempty"`
	MinimalTlsVersion                  *string                                `json:"minimalTlsVersion,omitempty"`
	Name                               *string                                `json:"name,omitempty"`
	NetworkAclBypass                   *string                                `json:"networkAclBypass,omitempty"`
	NetworkAclBypassResourceIds        []string                               `json:"networkAclBypassResourceIds,omitempty"`
	PrivateEndpointConnections         []PrivateEndpointConnection_STATUS     `json:"privateEndpointConnections,omitempty"`
	PropertyBag                        genruntime.PropertyBag                 `json:"$propertyBag,omitempty"`
	ProvisioningState                  *string                                `json:"provisioningState,omitempty"`
	PublicNetworkAccess                *string                                `json:"publicNetworkAccess,omitempty"`
	ReadLocations                      []Location_STATUS                      `json:"readLocations,omitempty"`
	RestoreParameters                  *RestoreParameters_STATUS              `json:"restoreParameters,omitempty"`
	SystemData                         *SystemData_STATUS                     `json:"systemData,omitempty"`
	Tags                               map[string]string                      `json:"tags,omitempty"`
	Type                               *string                                `json:"type,omitempty"`
	VirtualNetworkRules                []VirtualNetworkRule_STATUS            `json:"virtualNetworkRules,omitempty"`
	WriteLocations                     []Location_STATUS                      `json:"writeLocations,omitempty"`
}

var _ genruntime.ConvertibleStatus = &DatabaseAccount_STATUS{}

// ConvertStatusFrom populates our DatabaseAccount_STATUS from the provided source
func (account *DatabaseAccount_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error {
	if source == account {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return source.ConvertStatusTo(account)
}

// ConvertStatusTo populates the provided destination from our DatabaseAccount_STATUS
func (account *DatabaseAccount_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error {
	if destination == account {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return destination.ConvertStatusFrom(account)
}

// Storage version of v1api20240815.AnalyticalStorageConfiguration
// Analytical storage specific properties.
type AnalyticalStorageConfiguration struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SchemaType  *string                `json:"schemaType,omitempty"`
}

// Storage version of v1api20240815.AnalyticalStorageConfiguration_STATUS
// Analytical storage specific properties.
type AnalyticalStorageConfiguration_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SchemaType  *string                `json:"schemaType,omitempty"`
}

// Storage version of v1api20240815.ApiProperties
type ApiProperties struct {
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ServerVersion *string                `json:"serverVersion,omitempty"`
}

// Storage version of v1api20240815.ApiProperties_STATUS
type ApiProperties_STATUS struct {
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ServerVersion *string                `json:"serverVersion,omitempty"`
}

// Storage version of v1api20240815.BackupPolicy
type BackupPolicy struct {
	Continuous  *ContinuousModeBackupPolicy `json:"continuous,omitempty"`
	Periodic    *PeriodicModeBackupPolicy   `json:"periodic,omitempty"`
	PropertyBag genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.BackupPolicy_STATUS
type BackupPolicy_STATUS struct {
	Continuous  *ContinuousModeBackupPolicy_STATUS `json:"continuous,omitempty"`
	Periodic    *PeriodicModeBackupPolicy_STATUS   `json:"periodic,omitempty"`
	PropertyBag genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.Capability
// Cosmos DB capability object
type Capability struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.Capability_STATUS
// Cosmos DB capability object
type Capability_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.Capacity
// The object that represents all properties related to capacity enforcement on an account.
type Capacity struct {
	PropertyBag          genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TotalThroughputLimit *int                   `json:"totalThroughputLimit,omitempty"`
}

// Storage version of v1api20240815.Capacity_STATUS
// The object that represents all properties related to capacity enforcement on an account.
type Capacity_STATUS struct {
	PropertyBag          genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TotalThroughputLimit *int                   `json:"totalThroughputLimit,omitempty"`
}

// Storage version of v1api20240815.ConsistencyPolicy
// The consistency policy for the Cosmos DB database account.
type ConsistencyPolicy struct {
	DefaultConsistencyLevel *string                `json:"defaultConsistencyLevel,omitempty"`
	MaxIntervalInSeconds    *int                   `json:"maxIntervalInSeconds,omitempty"`
	MaxStalenessPrefix      *int                   `json:"maxStalenessPrefix,omitempty"`
	PropertyBag             genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.ConsistencyPolicy_STATUS
// The consistency policy for the Cosmos DB database account.
type ConsistencyPolicy_STATUS struct {
	DefaultConsistencyLevel *string                `json:"defaultConsistencyLevel,omitempty"`
	MaxIntervalInSeconds    *int                   `json:"maxIntervalInSeconds,omitempty"`
	MaxStalenessPrefix      *int                   `json:"maxStalenessPrefix,omitempty"`
	PropertyBag             genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.CorsPolicy
// The CORS policy for the Cosmos DB database account.
type CorsPolicy struct {
	AllowedHeaders  *string                `json:"allowedHeaders,omitempty"`
	AllowedMethods  *string                `json:"allowedMethods,omitempty"`
	AllowedOrigins  *string                `json:"allowedOrigins,omitempty"`
	ExposedHeaders  *string                `json:"exposedHeaders,omitempty"`
	MaxAgeInSeconds *int                   `json:"maxAgeInSeconds,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.CorsPolicy_STATUS
// The CORS policy for the Cosmos DB database account.
type CorsPolicy_STATUS struct {
	AllowedHeaders  *string                `json:"allowedHeaders,omitempty"`
	AllowedMethods  *string                `json:"allowedMethods,omitempty"`
	AllowedOrigins  *string                `json:"allowedOrigins,omitempty"`
	ExposedHeaders  *string                `json:"exposedHeaders,omitempty"`
	MaxAgeInSeconds *int                   `json:"maxAgeInSeconds,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.DatabaseAccountKeysMetadata_STATUS
// The metadata related to each access key for the given Cosmos DB database account.
type DatabaseAccountKeysMetadata_STATUS struct {
	PrimaryMasterKey           *AccountKeyMetadata_STATUS `json:"primaryMasterKey,omitempty"`
	PrimaryReadonlyMasterKey   *AccountKeyMetadata_STATUS `json:"primaryReadonlyMasterKey,omitempty"`
	PropertyBag                genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
	SecondaryMasterKey         *AccountKeyMetadata_STATUS `json:"secondaryMasterKey,omitempty"`
	SecondaryReadonlyMasterKey *AccountKeyMetadata_STATUS `json:"secondaryReadonlyMasterKey,omitempty"`
}

// Storage version of v1api20240815.DatabaseAccountOperatorSpec
// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure
type DatabaseAccountOperatorSpec struct {
	ConfigMapExpressions []*core.DestinationExpression   `json:"configMapExpressions,omitempty"`
	PropertyBag          genruntime.PropertyBag          `json:"$propertyBag,omitempty"`
	SecretExpressions    []*core.DestinationExpression   `json:"secretExpressions,omitempty"`
	Secrets              *DatabaseAccountOperatorSecrets `json:"secrets,omitempty"`
}

// Storage version of v1api20240815.FailoverPolicy_STATUS
// The failover policy for a given region of a database account.
type FailoverPolicy_STATUS struct {
	FailoverPriority *int                   `json:"failoverPriority,omitempty"`
	Id               *string                `json:"id,omitempty"`
	LocationName     *string                `json:"locationName,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.IpAddressOrRange
// IpAddressOrRange object
type IpAddressOrRange struct {
	IpAddressOrRange *string                `json:"ipAddressOrRange,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.IpAddressOrRange_STATUS
// IpAddressOrRange object
type IpAddressOrRange_STATUS struct {
	IpAddressOrRange *string                `json:"ipAddressOrRange,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.Location
// A region in which the Azure Cosmos DB database account is deployed.
type Location struct {
	FailoverPriority *int                   `json:"failoverPriority,omitempty"`
	IsZoneRedundant  *bool                  `json:"isZoneRedundant,omitempty"`
	LocationName     *string                `json:"locationName,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.Location_STATUS
// A region in which the Azure Cosmos DB database account is deployed.
type Location_STATUS struct {
	DocumentEndpoint  *string                `json:"documentEndpoint,omitempty"`
	FailoverPriority  *int                   `json:"failoverPriority,omitempty"`
	Id                *string                `json:"id,omitempty"`
	IsZoneRedundant   *bool                  `json:"isZoneRedundant,omitempty"`
	LocationName      *string                `json:"locationName,omitempty"`
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ProvisioningState *string                `json:"provisioningState,omitempty"`
}

// Storage version of v1api20240815.ManagedServiceIdentity
// Identity for the resource.
type ManagedServiceIdentity struct {
	PropertyBag            genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	Type                   *string                       `json:"type,omitempty"`
	UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

// Storage version of v1api20240815.ManagedServiceIdentity_STATUS
// Identity for the resource.
type ManagedServiceIdentity_STATUS struct {
	PrincipalId            *string                                                         `json:"principalId,omitempty"`
	PropertyBag            genruntime.PropertyBag                                          `json:"$propertyBag,omitempty"`
	TenantId               *string                                                         `json:"tenantId,omitempty"`
	Type                   *string                                                         `json:"type,omitempty"`
	UserAssignedIdentities map[string]ManagedServiceIdentity_UserAssignedIdentities_STATUS `json:"userAssignedIdentities,omitempty"`
}

// Storage version of v1api20240815.PrivateEndpointConnection_STATUS
// A private endpoint connection
type PrivateEndpointConnection_STATUS struct {
	Id          *string                `json:"id,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.RestoreParameters
// Parameters to indicate the information about the restore.
type RestoreParameters struct {
	DatabasesToRestore        []DatabaseRestoreResource        `json:"databasesToRestore,omitempty"`
	GremlinDatabasesToRestore []GremlinDatabaseRestoreResource `json:"gremlinDatabasesToRestore,omitempty"`
	PropertyBag               genruntime.PropertyBag           `json:"$propertyBag,omitempty"`
	RestoreMode               *string                          `json:"restoreMode,omitempty"`
	RestoreSource             *string                          `json:"restoreSource,omitempty"`
	RestoreTimestampInUtc     *string                          `json:"restoreTimestampInUtc,omitempty"`
	RestoreWithTtlDisabled    *bool                            `json:"restoreWithTtlDisabled,omitempty"`
	TablesToRestore           []string                         `json:"tablesToRestore,omitempty"`
}

// Storage version of v1api20240815.RestoreParameters_STATUS
// Parameters to indicate the information about the restore.
type RestoreParameters_STATUS struct {
	DatabasesToRestore        []DatabaseRestoreResource_STATUS        `json:"databasesToRestore,omitempty"`
	GremlinDatabasesToRestore []GremlinDatabaseRestoreResource_STATUS `json:"gremlinDatabasesToRestore,omitempty"`
	PropertyBag               genruntime.PropertyBag                  `json:"$propertyBag,omitempty"`
	RestoreMode               *string                                 `json:"restoreMode,omitempty"`
	RestoreSource             *string                                 `json:"restoreSource,omitempty"`
	RestoreTimestampInUtc     *string                                 `json:"restoreTimestampInUtc,omitempty"`
	RestoreWithTtlDisabled    *bool                                   `json:"restoreWithTtlDisabled,omitempty"`
	TablesToRestore           []string                                `json:"tablesToRestore,omitempty"`
}

// Storage version of v1api20240815.SystemData_STATUS
// Metadata pertaining to creation and last modification of the resource.
type SystemData_STATUS struct {
	CreatedAt          *string                `json:"createdAt,omitempty"`
	CreatedBy          *string                `json:"createdBy,omitempty"`
	CreatedByType      *string                `json:"createdByType,omitempty"`
	LastModifiedAt     *string                `json:"lastModifiedAt,omitempty"`
	LastModifiedBy     *string                `json:"lastModifiedBy,omitempty"`
	LastModifiedByType *string                `json:"lastModifiedByType,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.VirtualNetworkRule
// Virtual Network ACL Rule object
type VirtualNetworkRule struct {
	IgnoreMissingVNetServiceEndpoint *bool                  `json:"ignoreMissingVNetServiceEndpoint,omitempty"`
	PropertyBag                      genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// Reference: Resource ID of a subnet, for example:
	// /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
	Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
}

// Storage version of v1api20240815.VirtualNetworkRule_STATUS
// Virtual Network ACL Rule object
type VirtualNetworkRule_STATUS struct {
	Id                               *string                `json:"id,omitempty"`
	IgnoreMissingVNetServiceEndpoint *bool                  `json:"ignoreMissingVNetServiceEndpoint,omitempty"`
	PropertyBag                      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.AccountKeyMetadata_STATUS
// The metadata related to an access key for a given database account.
type AccountKeyMetadata_STATUS struct {
	GenerationTime *string                `json:"generationTime,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.ContinuousModeBackupPolicy
type ContinuousModeBackupPolicy struct {
	ContinuousModeProperties *ContinuousModeProperties   `json:"continuousModeProperties,omitempty"`
	MigrationState           *BackupPolicyMigrationState `json:"migrationState,omitempty"`
	PropertyBag              genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	Type                     *string                     `json:"type,omitempty"`
}

// Storage version of v1api20240815.ContinuousModeBackupPolicy_STATUS
type ContinuousModeBackupPolicy_STATUS struct {
	ContinuousModeProperties *ContinuousModeProperties_STATUS   `json:"continuousModeProperties,omitempty"`
	MigrationState           *BackupPolicyMigrationState_STATUS `json:"migrationState,omitempty"`
	PropertyBag              genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	Type                     *string                            `json:"type,omitempty"`
}

// Storage version of v1api20240815.DatabaseAccountOperatorSecrets
type DatabaseAccountOperatorSecrets struct {
	DocumentEndpoint           *genruntime.SecretDestination `json:"documentEndpoint,omitempty"`
	PrimaryMasterKey           *genruntime.SecretDestination `json:"primaryMasterKey,omitempty"`
	PrimaryReadonlyMasterKey   *genruntime.SecretDestination `json:"primaryReadonlyMasterKey,omitempty"`
	PropertyBag                genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	SecondaryMasterKey         *genruntime.SecretDestination `json:"secondaryMasterKey,omitempty"`
	SecondaryReadonlyMasterKey *genruntime.SecretDestination `json:"secondaryReadonlyMasterKey,omitempty"`
}

// Storage version of v1api20240815.DatabaseRestoreResource
// Specific Databases to restore.
type DatabaseRestoreResource struct {
	CollectionNames []string               `json:"collectionNames,omitempty"`
	DatabaseName    *string                `json:"databaseName,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.DatabaseRestoreResource_STATUS
// Specific Databases to restore.
type DatabaseRestoreResource_STATUS struct {
	CollectionNames []string               `json:"collectionNames,omitempty"`
	DatabaseName    *string                `json:"databaseName,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.GremlinDatabaseRestoreResource
// Specific Gremlin Databases to restore.
type GremlinDatabaseRestoreResource struct {
	DatabaseName *string                `json:"databaseName,omitempty"`
	GraphNames   []string               `json:"graphNames,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.GremlinDatabaseRestoreResource_STATUS
// Specific Gremlin Databases to restore.
type GremlinDatabaseRestoreResource_STATUS struct {
	DatabaseName *string                `json:"databaseName,omitempty"`
	GraphNames   []string               `json:"graphNames,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.ManagedServiceIdentity_UserAssignedIdentities_STATUS
type ManagedServiceIdentity_UserAssignedIdentities_STATUS struct {
	ClientId    *string                `json:"clientId,omitempty"`
	PrincipalId *string                `json:"principalId,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.PeriodicModeBackupPolicy
type PeriodicModeBackupPolicy struct {
	MigrationState         *BackupPolicyMigrationState `json:"migrationState,omitempty"`
	PeriodicModeProperties *PeriodicModeProperties     `json:"periodicModeProperties,omitempty"`
	PropertyBag            genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	Type                   *string                     `json:"type,omitempty"`
}

// Storage version of v1api20240815.PeriodicModeBackupPolicy_STATUS
type PeriodicModeBackupPolicy_STATUS struct {
	MigrationState         *BackupPolicyMigrationState_STATUS `json:"migrationState,omitempty"`
	PeriodicModeProperties *PeriodicModeProperties_STATUS     `json:"periodicModeProperties,omitempty"`
	PropertyBag            genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	Type                   *string                            `json:"type,omitempty"`
}

// Storage version of v1api20240815.UserAssignedIdentityDetails
// Information about the user assigned identity for the resource
type UserAssignedIdentityDetails struct {
	PropertyBag genruntime.PropertyBag       `json:"$propertyBag,omitempty"`
	Reference   genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"`
}

// Storage version of v1api20240815.BackupPolicyMigrationState
// The object representing the state of the migration between the backup policies.
type BackupPolicyMigrationState struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StartTime   *string                `json:"startTime,omitempty"`
	Status      *string                `json:"status,omitempty"`
	TargetType  *string                `json:"targetType,omitempty"`
}

// Storage version of v1api20240815.BackupPolicyMigrationState_STATUS
// The object representing the state of the migration between the backup policies.
type BackupPolicyMigrationState_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StartTime   *string                `json:"startTime,omitempty"`
	Status      *string                `json:"status,omitempty"`
	TargetType  *string                `json:"targetType,omitempty"`
}

// Storage version of v1api20240815.ContinuousModeProperties
// Configuration values for periodic mode backup
type ContinuousModeProperties struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tier        *string                `json:"tier,omitempty"`
}

// Storage version of v1api20240815.ContinuousModeProperties_STATUS
// Configuration values for periodic mode backup
type ContinuousModeProperties_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tier        *string                `json:"tier,omitempty"`
}

// Storage version of v1api20240815.PeriodicModeProperties
// Configuration values for periodic mode backup
type PeriodicModeProperties struct {
	BackupIntervalInMinutes        *int                   `json:"backupIntervalInMinutes,omitempty"`
	BackupRetentionIntervalInHours *int                   `json:"backupRetentionIntervalInHours,omitempty"`
	BackupStorageRedundancy        *string                `json:"backupStorageRedundancy,omitempty"`
	PropertyBag                    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240815.PeriodicModeProperties_STATUS
// Configuration values for periodic mode backup
type PeriodicModeProperties_STATUS struct {
	BackupIntervalInMinutes        *int                   `json:"backupIntervalInMinutes,omitempty"`
	BackupRetentionIntervalInHours *int                   `json:"backupRetentionIntervalInHours,omitempty"`
	BackupStorageRedundancy        *string                `json:"backupStorageRedundancy,omitempty"`
	PropertyBag                    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

func init() {
	SchemeBuilder.Register(&DatabaseAccount{}, &DatabaseAccountList{})
}
