// 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=dataprotection.azure.com,resources=backupvaultsbackuppolicies,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=dataprotection.azure.com,resources={backupvaultsbackuppolicies/status,backupvaultsbackuppolicies/finalizers},verbs=get;update;patch

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,dataprotection}
// +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 v1api20231101.BackupVaultsBackupPolicy
// Generator information:
// - Generated from: /dataprotection/resource-manager/Microsoft.DataProtection/DataProtection/stable/2023-11-01/dataprotection.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}
type BackupVaultsBackupPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              BackupVaultsBackupPolicy_Spec   `json:"spec,omitempty"`
	Status            BackupVaultsBackupPolicy_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &BackupVaultsBackupPolicy{}

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

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

var _ configmaps.Exporter = &BackupVaultsBackupPolicy{}

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

var _ secrets.Exporter = &BackupVaultsBackupPolicy{}

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

var _ genruntime.KubernetesResource = &BackupVaultsBackupPolicy{}

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

// GetAPIVersion returns the ARM API version of the resource. This is always "2023-11-01"
func (policy BackupVaultsBackupPolicy) GetAPIVersion() string {
	return "2023-11-01"
}

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.DataProtection/backupVaults/backupPolicies"
func (policy *BackupVaultsBackupPolicy) GetType() string {
	return "Microsoft.DataProtection/backupVaults/backupPolicies"
}

// NewEmptyStatus returns a new empty (blank) status
func (policy *BackupVaultsBackupPolicy) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &BackupVaultsBackupPolicy_STATUS{}
}

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

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

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

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

	policy.Status = st
	return nil
}

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

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

// +kubebuilder:object:root=true
// Storage version of v1api20231101.BackupVaultsBackupPolicy
// Generator information:
// - Generated from: /dataprotection/resource-manager/Microsoft.DataProtection/DataProtection/stable/2023-11-01/dataprotection.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}
type BackupVaultsBackupPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []BackupVaultsBackupPolicy `json:"items"`
}

// Storage version of v1api20231101.BackupVaultsBackupPolicy_Spec
type BackupVaultsBackupPolicy_Spec struct {
	// 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"`
	OperatorSpec    *BackupVaultsBackupPolicyOperatorSpec `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 dataprotection.azure.com/BackupVault resource
	Owner       *genruntime.KnownResourceReference `group:"dataprotection.azure.com" json:"owner,omitempty" kind:"BackupVault"`
	Properties  *BaseBackupPolicy                  `json:"properties,omitempty"`
	PropertyBag genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
}

var _ genruntime.ConvertibleSpec = &BackupVaultsBackupPolicy_Spec{}

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

	return source.ConvertSpecTo(policy)
}

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

	return destination.ConvertSpecFrom(policy)
}

// Storage version of v1api20231101.BackupVaultsBackupPolicy_STATUS
type BackupVaultsBackupPolicy_STATUS struct {
	Conditions  []conditions.Condition   `json:"conditions,omitempty"`
	Id          *string                  `json:"id,omitempty"`
	Name        *string                  `json:"name,omitempty"`
	Properties  *BaseBackupPolicy_STATUS `json:"properties,omitempty"`
	PropertyBag genruntime.PropertyBag   `json:"$propertyBag,omitempty"`
	SystemData  *SystemData_STATUS       `json:"systemData,omitempty"`
	Type        *string                  `json:"type,omitempty"`
}

var _ genruntime.ConvertibleStatus = &BackupVaultsBackupPolicy_STATUS{}

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

	return source.ConvertStatusTo(policy)
}

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

	return destination.ConvertStatusFrom(policy)
}

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

// Storage version of v1api20231101.BaseBackupPolicy
type BaseBackupPolicy struct {
	BackupPolicy *BackupPolicy          `json:"backupPolicy,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.BaseBackupPolicy_STATUS
type BaseBackupPolicy_STATUS struct {
	BackupPolicy *BackupPolicy_STATUS   `json:"backupPolicy,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.BackupPolicy
type BackupPolicy struct {
	DatasourceTypes []string               `json:"datasourceTypes,omitempty"`
	ObjectType      *string                `json:"objectType,omitempty"`
	PolicyRules     []BasePolicyRule       `json:"policyRules,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.BackupPolicy_STATUS
type BackupPolicy_STATUS struct {
	DatasourceTypes []string                `json:"datasourceTypes,omitempty"`
	ObjectType      *string                 `json:"objectType,omitempty"`
	PolicyRules     []BasePolicyRule_STATUS `json:"policyRules,omitempty"`
	PropertyBag     genruntime.PropertyBag  `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.BasePolicyRule
type BasePolicyRule struct {
	AzureBackup    *AzureBackupRule       `json:"azureBackupRule,omitempty"`
	AzureRetention *AzureRetentionRule    `json:"azureRetentionRule,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.BasePolicyRule_STATUS
type BasePolicyRule_STATUS struct {
	AzureBackup    *AzureBackupRule_STATUS    `json:"azureBackupRule,omitempty"`
	AzureRetention *AzureRetentionRule_STATUS `json:"azureRetentionRule,omitempty"`
	PropertyBag    genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.AzureBackupRule
type AzureBackupRule struct {
	BackupParameters *BackupParameters      `json:"backupParameters,omitempty"`
	DataStore        *DataStoreInfoBase     `json:"dataStore,omitempty"`
	Name             *string                `json:"name,omitempty"`
	ObjectType       *string                `json:"objectType,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Trigger          *TriggerContext        `json:"trigger,omitempty"`
}

// Storage version of v1api20231101.AzureBackupRule_STATUS
type AzureBackupRule_STATUS struct {
	BackupParameters *BackupParameters_STATUS  `json:"backupParameters,omitempty"`
	DataStore        *DataStoreInfoBase_STATUS `json:"dataStore,omitempty"`
	Name             *string                   `json:"name,omitempty"`
	ObjectType       *string                   `json:"objectType,omitempty"`
	PropertyBag      genruntime.PropertyBag    `json:"$propertyBag,omitempty"`
	Trigger          *TriggerContext_STATUS    `json:"trigger,omitempty"`
}

// Storage version of v1api20231101.AzureRetentionRule
type AzureRetentionRule struct {
	IsDefault   *bool                  `json:"isDefault,omitempty"`
	Lifecycles  []SourceLifeCycle      `json:"lifecycles,omitempty"`
	Name        *string                `json:"name,omitempty"`
	ObjectType  *string                `json:"objectType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.AzureRetentionRule_STATUS
type AzureRetentionRule_STATUS struct {
	IsDefault   *bool                    `json:"isDefault,omitempty"`
	Lifecycles  []SourceLifeCycle_STATUS `json:"lifecycles,omitempty"`
	Name        *string                  `json:"name,omitempty"`
	ObjectType  *string                  `json:"objectType,omitempty"`
	PropertyBag genruntime.PropertyBag   `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.BackupParameters
type BackupParameters struct {
	AzureBackupParams *AzureBackupParams     `json:"azureBackupParams,omitempty"`
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.BackupParameters_STATUS
type BackupParameters_STATUS struct {
	AzureBackupParams *AzureBackupParams_STATUS `json:"azureBackupParams,omitempty"`
	PropertyBag       genruntime.PropertyBag    `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.DataStoreInfoBase
// DataStoreInfo base
type DataStoreInfoBase struct {
	DataStoreType *string                `json:"dataStoreType,omitempty"`
	ObjectType    *string                `json:"objectType,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.DataStoreInfoBase_STATUS
// DataStoreInfo base
type DataStoreInfoBase_STATUS struct {
	DataStoreType *string                `json:"dataStoreType,omitempty"`
	ObjectType    *string                `json:"objectType,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.SourceLifeCycle
// Source LifeCycle
type SourceLifeCycle struct {
	DeleteAfter                 *DeleteOption          `json:"deleteAfter,omitempty"`
	PropertyBag                 genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SourceDataStore             *DataStoreInfoBase     `json:"sourceDataStore,omitempty"`
	TargetDataStoreCopySettings []TargetCopySetting    `json:"targetDataStoreCopySettings,omitempty"`
}

// Storage version of v1api20231101.SourceLifeCycle_STATUS
// Source LifeCycle
type SourceLifeCycle_STATUS struct {
	DeleteAfter                 *DeleteOption_STATUS       `json:"deleteAfter,omitempty"`
	PropertyBag                 genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
	SourceDataStore             *DataStoreInfoBase_STATUS  `json:"sourceDataStore,omitempty"`
	TargetDataStoreCopySettings []TargetCopySetting_STATUS `json:"targetDataStoreCopySettings,omitempty"`
}

// Storage version of v1api20231101.TriggerContext
type TriggerContext struct {
	Adhoc       *AdhocBasedTriggerContext    `json:"adhocBasedTriggerContext,omitempty"`
	PropertyBag genruntime.PropertyBag       `json:"$propertyBag,omitempty"`
	Schedule    *ScheduleBasedTriggerContext `json:"scheduleBasedTriggerContext,omitempty"`
}

// Storage version of v1api20231101.TriggerContext_STATUS
type TriggerContext_STATUS struct {
	Adhoc       *AdhocBasedTriggerContext_STATUS    `json:"adhocBasedTriggerContext,omitempty"`
	PropertyBag genruntime.PropertyBag              `json:"$propertyBag,omitempty"`
	Schedule    *ScheduleBasedTriggerContext_STATUS `json:"scheduleBasedTriggerContext,omitempty"`
}

// Storage version of v1api20231101.AdhocBasedTriggerContext
type AdhocBasedTriggerContext struct {
	ObjectType      *string                    `json:"objectType,omitempty"`
	PropertyBag     genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
	TaggingCriteria *AdhocBasedTaggingCriteria `json:"taggingCriteria,omitempty"`
}

// Storage version of v1api20231101.AdhocBasedTriggerContext_STATUS
type AdhocBasedTriggerContext_STATUS struct {
	ObjectType      *string                           `json:"objectType,omitempty"`
	PropertyBag     genruntime.PropertyBag            `json:"$propertyBag,omitempty"`
	TaggingCriteria *AdhocBasedTaggingCriteria_STATUS `json:"taggingCriteria,omitempty"`
}

// Storage version of v1api20231101.AzureBackupParams
type AzureBackupParams struct {
	BackupType  *string                `json:"backupType,omitempty"`
	ObjectType  *string                `json:"objectType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.AzureBackupParams_STATUS
type AzureBackupParams_STATUS struct {
	BackupType  *string                `json:"backupType,omitempty"`
	ObjectType  *string                `json:"objectType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.DeleteOption
type DeleteOption struct {
	AbsoluteDeleteOption *AbsoluteDeleteOption  `json:"absoluteDeleteOption,omitempty"`
	PropertyBag          genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.DeleteOption_STATUS
type DeleteOption_STATUS struct {
	AbsoluteDeleteOption *AbsoluteDeleteOption_STATUS `json:"absoluteDeleteOption,omitempty"`
	PropertyBag          genruntime.PropertyBag       `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.ScheduleBasedTriggerContext
type ScheduleBasedTriggerContext struct {
	ObjectType      *string                `json:"objectType,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Schedule        *BackupSchedule        `json:"schedule,omitempty"`
	TaggingCriteria []TaggingCriteria      `json:"taggingCriteria,omitempty"`
}

// Storage version of v1api20231101.ScheduleBasedTriggerContext_STATUS
type ScheduleBasedTriggerContext_STATUS struct {
	ObjectType      *string                  `json:"objectType,omitempty"`
	PropertyBag     genruntime.PropertyBag   `json:"$propertyBag,omitempty"`
	Schedule        *BackupSchedule_STATUS   `json:"schedule,omitempty"`
	TaggingCriteria []TaggingCriteria_STATUS `json:"taggingCriteria,omitempty"`
}

// Storage version of v1api20231101.TargetCopySetting
// Target copy settings
type TargetCopySetting struct {
	CopyAfter   *CopyOption            `json:"copyAfter,omitempty"`
	DataStore   *DataStoreInfoBase     `json:"dataStore,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.TargetCopySetting_STATUS
// Target copy settings
type TargetCopySetting_STATUS struct {
	CopyAfter   *CopyOption_STATUS        `json:"copyAfter,omitempty"`
	DataStore   *DataStoreInfoBase_STATUS `json:"dataStore,omitempty"`
	PropertyBag genruntime.PropertyBag    `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.AbsoluteDeleteOption
type AbsoluteDeleteOption struct {
	Duration    *string                `json:"duration,omitempty"`
	ObjectType  *string                `json:"objectType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.AbsoluteDeleteOption_STATUS
type AbsoluteDeleteOption_STATUS struct {
	Duration    *string                `json:"duration,omitempty"`
	ObjectType  *string                `json:"objectType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.AdhocBasedTaggingCriteria
// Adhoc backup tagging criteria
type AdhocBasedTaggingCriteria struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TagInfo     *RetentionTag          `json:"tagInfo,omitempty"`
}

// Storage version of v1api20231101.AdhocBasedTaggingCriteria_STATUS
// Adhoc backup tagging criteria
type AdhocBasedTaggingCriteria_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TagInfo     *RetentionTag_STATUS   `json:"tagInfo,omitempty"`
}

// Storage version of v1api20231101.BackupSchedule
// Schedule for backup
type BackupSchedule struct {
	PropertyBag            genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RepeatingTimeIntervals []string               `json:"repeatingTimeIntervals,omitempty"`
	TimeZone               *string                `json:"timeZone,omitempty"`
}

// Storage version of v1api20231101.BackupSchedule_STATUS
// Schedule for backup
type BackupSchedule_STATUS struct {
	PropertyBag            genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RepeatingTimeIntervals []string               `json:"repeatingTimeIntervals,omitempty"`
	TimeZone               *string                `json:"timeZone,omitempty"`
}

// Storage version of v1api20231101.CopyOption
type CopyOption struct {
	CopyOnExpiry  *CopyOnExpiryOption    `json:"copyOnExpiryOption,omitempty"`
	CustomCopy    *CustomCopyOption      `json:"customCopyOption,omitempty"`
	ImmediateCopy *ImmediateCopyOption   `json:"immediateCopyOption,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.CopyOption_STATUS
type CopyOption_STATUS struct {
	CopyOnExpiry  *CopyOnExpiryOption_STATUS  `json:"copyOnExpiryOption,omitempty"`
	CustomCopy    *CustomCopyOption_STATUS    `json:"customCopyOption,omitempty"`
	ImmediateCopy *ImmediateCopyOption_STATUS `json:"immediateCopyOption,omitempty"`
	PropertyBag   genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.TaggingCriteria
// Tagging criteria
type TaggingCriteria struct {
	Criteria        []BackupCriteria       `json:"criteria,omitempty"`
	IsDefault       *bool                  `json:"isDefault,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TagInfo         *RetentionTag          `json:"tagInfo,omitempty"`
	TaggingPriority *int                   `json:"taggingPriority,omitempty"`
}

// Storage version of v1api20231101.TaggingCriteria_STATUS
// Tagging criteria
type TaggingCriteria_STATUS struct {
	Criteria        []BackupCriteria_STATUS `json:"criteria,omitempty"`
	IsDefault       *bool                   `json:"isDefault,omitempty"`
	PropertyBag     genruntime.PropertyBag  `json:"$propertyBag,omitempty"`
	TagInfo         *RetentionTag_STATUS    `json:"tagInfo,omitempty"`
	TaggingPriority *int                    `json:"taggingPriority,omitempty"`
}

// Storage version of v1api20231101.BackupCriteria
type BackupCriteria struct {
	PropertyBag                 genruntime.PropertyBag       `json:"$propertyBag,omitempty"`
	ScheduleBasedBackupCriteria *ScheduleBasedBackupCriteria `json:"scheduleBasedBackupCriteria,omitempty"`
}

// Storage version of v1api20231101.BackupCriteria_STATUS
type BackupCriteria_STATUS struct {
	PropertyBag                 genruntime.PropertyBag              `json:"$propertyBag,omitempty"`
	ScheduleBasedBackupCriteria *ScheduleBasedBackupCriteria_STATUS `json:"scheduleBasedBackupCriteria,omitempty"`
}

// Storage version of v1api20231101.CopyOnExpiryOption
type CopyOnExpiryOption struct {
	ObjectType  *string                `json:"objectType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.CopyOnExpiryOption_STATUS
type CopyOnExpiryOption_STATUS struct {
	ObjectType  *string                `json:"objectType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.CustomCopyOption
type CustomCopyOption struct {
	Duration    *string                `json:"duration,omitempty"`
	ObjectType  *string                `json:"objectType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.CustomCopyOption_STATUS
type CustomCopyOption_STATUS struct {
	Duration    *string                `json:"duration,omitempty"`
	ObjectType  *string                `json:"objectType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.ImmediateCopyOption
type ImmediateCopyOption struct {
	ObjectType  *string                `json:"objectType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.ImmediateCopyOption_STATUS
type ImmediateCopyOption_STATUS struct {
	ObjectType  *string                `json:"objectType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.RetentionTag
// Retention tag
type RetentionTag struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TagName     *string                `json:"tagName,omitempty"`
}

// Storage version of v1api20231101.RetentionTag_STATUS
// Retention tag
type RetentionTag_STATUS struct {
	ETag        *string                `json:"eTag,omitempty"`
	Id          *string                `json:"id,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TagName     *string                `json:"tagName,omitempty"`
}

// Storage version of v1api20231101.ScheduleBasedBackupCriteria
type ScheduleBasedBackupCriteria struct {
	AbsoluteCriteria []string               `json:"absoluteCriteria,omitempty"`
	DaysOfMonth      []Day                  `json:"daysOfMonth,omitempty"`
	DaysOfTheWeek    []string               `json:"daysOfTheWeek,omitempty"`
	MonthsOfYear     []string               `json:"monthsOfYear,omitempty"`
	ObjectType       *string                `json:"objectType,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ScheduleTimes    []string               `json:"scheduleTimes,omitempty"`
	WeeksOfTheMonth  []string               `json:"weeksOfTheMonth,omitempty"`
}

// Storage version of v1api20231101.ScheduleBasedBackupCriteria_STATUS
type ScheduleBasedBackupCriteria_STATUS struct {
	AbsoluteCriteria []string               `json:"absoluteCriteria,omitempty"`
	DaysOfMonth      []Day_STATUS           `json:"daysOfMonth,omitempty"`
	DaysOfTheWeek    []string               `json:"daysOfTheWeek,omitempty"`
	MonthsOfYear     []string               `json:"monthsOfYear,omitempty"`
	ObjectType       *string                `json:"objectType,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ScheduleTimes    []string               `json:"scheduleTimes,omitempty"`
	WeeksOfTheMonth  []string               `json:"weeksOfTheMonth,omitempty"`
}

// Storage version of v1api20231101.Day
// Day of the week
type Day struct {
	Date        *int                   `json:"date,omitempty"`
	IsLast      *bool                  `json:"isLast,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231101.Day_STATUS
// Day of the week
type Day_STATUS struct {
	Date        *int                   `json:"date,omitempty"`
	IsLast      *bool                  `json:"isLast,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

func init() {
	SchemeBuilder.Register(&BackupVaultsBackupPolicy{}, &BackupVaultsBackupPolicyList{})
}
