// 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"
	"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
)

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

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,containerinstance}
// +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 v1api20211001.ContainerGroup
// Generator information:
// - Generated from: /containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2021-10-01/containerInstance.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}
type ContainerGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ContainerGroup_Spec   `json:"spec,omitempty"`
	Status            ContainerGroup_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &ContainerGroup{}

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

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

var _ configmaps.Exporter = &ContainerGroup{}

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

var _ secrets.Exporter = &ContainerGroup{}

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

var _ genruntime.KubernetesResource = &ContainerGroup{}

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

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

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.ContainerInstance/containerGroups"
func (group *ContainerGroup) GetType() string {
	return "Microsoft.ContainerInstance/containerGroups"
}

// NewEmptyStatus returns a new empty (blank) status
func (group *ContainerGroup) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &ContainerGroup_STATUS{}
}

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

	ownerGroup, ownerKind := genruntime.LookupOwnerGroupKind(group.Spec)
	return group.Spec.Owner.AsResourceReference(ownerGroup, ownerKind)
}

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

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

	group.Status = st
	return nil
}

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

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

// +kubebuilder:object:root=true
// Storage version of v1api20211001.ContainerGroup
// Generator information:
// - Generated from: /containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance/stable/2021-10-01/containerInstance.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}
type ContainerGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ContainerGroup `json:"items"`
}

// Storage version of v1api20211001.APIVersion
// +kubebuilder:validation:Enum={"2021-10-01"}
type APIVersion string

const APIVersion_Value = APIVersion("2021-10-01")

// Storage version of v1api20211001.ContainerGroup_Spec
type ContainerGroup_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"`
	Containers               []Container                 `json:"containers,omitempty"`
	Diagnostics              *ContainerGroupDiagnostics  `json:"diagnostics,omitempty"`
	DnsConfig                *DnsConfiguration           `json:"dnsConfig,omitempty"`
	EncryptionProperties     *EncryptionProperties       `json:"encryptionProperties,omitempty"`
	Identity                 *ContainerGroupIdentity     `json:"identity,omitempty"`
	ImageRegistryCredentials []ImageRegistryCredential   `json:"imageRegistryCredentials,omitempty"`
	InitContainers           []InitContainerDefinition   `json:"initContainers,omitempty"`
	IpAddress                *IpAddress                  `json:"ipAddress,omitempty"`
	Location                 *string                     `json:"location,omitempty"`
	OperatorSpec             *ContainerGroupOperatorSpec `json:"operatorSpec,omitempty"`
	OriginalVersion          string                      `json:"originalVersion,omitempty"`
	OsType                   *string                     `json:"osType,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"`
	RestartPolicy *string                            `json:"restartPolicy,omitempty"`
	Sku           *string                            `json:"sku,omitempty"`
	SubnetIds     []ContainerGroupSubnetId           `json:"subnetIds,omitempty"`
	Tags          map[string]string                  `json:"tags,omitempty"`
	Volumes       []Volume                           `json:"volumes,omitempty"`
	Zones         []string                           `json:"zones,omitempty"`
}

var _ genruntime.ConvertibleSpec = &ContainerGroup_Spec{}

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

	return source.ConvertSpecTo(group)
}

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

	return destination.ConvertSpecFrom(group)
}

// Storage version of v1api20211001.ContainerGroup_STATUS
// A container group.
type ContainerGroup_STATUS struct {
	Conditions               []conditions.Condition                         `json:"conditions,omitempty"`
	Containers               []Container_STATUS                             `json:"containers,omitempty"`
	Diagnostics              *ContainerGroupDiagnostics_STATUS              `json:"diagnostics,omitempty"`
	DnsConfig                *DnsConfiguration_STATUS                       `json:"dnsConfig,omitempty"`
	EncryptionProperties     *EncryptionProperties_STATUS                   `json:"encryptionProperties,omitempty"`
	Id                       *string                                        `json:"id,omitempty"`
	Identity                 *ContainerGroupIdentity_STATUS                 `json:"identity,omitempty"`
	ImageRegistryCredentials []ImageRegistryCredential_STATUS               `json:"imageRegistryCredentials,omitempty"`
	InitContainers           []InitContainerDefinition_STATUS               `json:"initContainers,omitempty"`
	InstanceView             *ContainerGroup_Properties_InstanceView_STATUS `json:"instanceView,omitempty"`
	IpAddress                *IpAddress_STATUS                              `json:"ipAddress,omitempty"`
	Location                 *string                                        `json:"location,omitempty"`
	Name                     *string                                        `json:"name,omitempty"`
	OsType                   *string                                        `json:"osType,omitempty"`
	PropertyBag              genruntime.PropertyBag                         `json:"$propertyBag,omitempty"`
	ProvisioningState        *string                                        `json:"provisioningState,omitempty"`
	RestartPolicy            *string                                        `json:"restartPolicy,omitempty"`
	Sku                      *string                                        `json:"sku,omitempty"`
	SubnetIds                []ContainerGroupSubnetId_STATUS                `json:"subnetIds,omitempty"`
	Tags                     map[string]string                              `json:"tags,omitempty"`
	Type                     *string                                        `json:"type,omitempty"`
	Volumes                  []Volume_STATUS                                `json:"volumes,omitempty"`
	Zones                    []string                                       `json:"zones,omitempty"`
}

var _ genruntime.ConvertibleStatus = &ContainerGroup_STATUS{}

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

	return source.ConvertStatusTo(group)
}

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

	return destination.ConvertStatusFrom(group)
}

// Storage version of v1api20211001.Container
// A container instance.
type Container struct {
	Command              []string               `json:"command,omitempty"`
	EnvironmentVariables []EnvironmentVariable  `json:"environmentVariables,omitempty"`
	Image                *string                `json:"image,omitempty"`
	LivenessProbe        *ContainerProbe        `json:"livenessProbe,omitempty"`
	Name                 *string                `json:"name,omitempty"`
	Ports                []ContainerPort        `json:"ports,omitempty"`
	PropertyBag          genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ReadinessProbe       *ContainerProbe        `json:"readinessProbe,omitempty"`
	Resources            *ResourceRequirements  `json:"resources,omitempty"`
	VolumeMounts         []VolumeMount          `json:"volumeMounts,omitempty"`
}

// Storage version of v1api20211001.Container_STATUS
// A container instance.
type Container_STATUS struct {
	Command              []string                                 `json:"command,omitempty"`
	EnvironmentVariables []EnvironmentVariable_STATUS             `json:"environmentVariables,omitempty"`
	Image                *string                                  `json:"image,omitempty"`
	InstanceView         *ContainerProperties_InstanceView_STATUS `json:"instanceView,omitempty"`
	LivenessProbe        *ContainerProbe_STATUS                   `json:"livenessProbe,omitempty"`
	Name                 *string                                  `json:"name,omitempty"`
	Ports                []ContainerPort_STATUS                   `json:"ports,omitempty"`
	PropertyBag          genruntime.PropertyBag                   `json:"$propertyBag,omitempty"`
	ReadinessProbe       *ContainerProbe_STATUS                   `json:"readinessProbe,omitempty"`
	Resources            *ResourceRequirements_STATUS             `json:"resources,omitempty"`
	VolumeMounts         []VolumeMount_STATUS                     `json:"volumeMounts,omitempty"`
}

// Storage version of v1api20211001.ContainerGroup_Properties_InstanceView_STATUS
type ContainerGroup_Properties_InstanceView_STATUS struct {
	Events      []Event_STATUS         `json:"events,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	State       *string                `json:"state,omitempty"`
}

// Storage version of v1api20211001.ContainerGroupDiagnostics
// Container group diagnostic information.
type ContainerGroupDiagnostics struct {
	LogAnalytics *LogAnalytics          `json:"logAnalytics,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20211001.ContainerGroupDiagnostics_STATUS
// Container group diagnostic information.
type ContainerGroupDiagnostics_STATUS struct {
	LogAnalytics *LogAnalytics_STATUS   `json:"logAnalytics,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

// Storage version of v1api20211001.ContainerGroupIdentity_STATUS
// Identity for the container group.
type ContainerGroupIdentity_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]UserAssignedIdentities_STATUS `json:"userAssignedIdentities,omitempty"`
}

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

// Storage version of v1api20211001.ContainerGroupSubnetId
// Container group subnet information.
type ContainerGroupSubnetId struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// +kubebuilder:validation:Required
	// Reference: Resource ID of virtual network and subnet.
	Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
}

// Storage version of v1api20211001.ContainerGroupSubnetId_STATUS
// Container group subnet information.
type ContainerGroupSubnetId_STATUS struct {
	Id          *string                `json:"id,omitempty"`
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20211001.DnsConfiguration
// DNS configuration for the container group.
type DnsConfiguration struct {
	NameServers   []string               `json:"nameServers,omitempty"`
	Options       *string                `json:"options,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SearchDomains *string                `json:"searchDomains,omitempty"`
}

// Storage version of v1api20211001.DnsConfiguration_STATUS
// DNS configuration for the container group.
type DnsConfiguration_STATUS struct {
	NameServers   []string               `json:"nameServers,omitempty"`
	Options       *string                `json:"options,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SearchDomains *string                `json:"searchDomains,omitempty"`
}

// Storage version of v1api20211001.EncryptionProperties
// The container group encryption properties.
type EncryptionProperties struct {
	KeyName      *string                `json:"keyName,omitempty"`
	KeyVersion   *string                `json:"keyVersion,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	VaultBaseUrl *string                `json:"vaultBaseUrl,omitempty"`
}

// Storage version of v1api20211001.EncryptionProperties_STATUS
// The container group encryption properties.
type EncryptionProperties_STATUS struct {
	KeyName      *string                `json:"keyName,omitempty"`
	KeyVersion   *string                `json:"keyVersion,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	VaultBaseUrl *string                `json:"vaultBaseUrl,omitempty"`
}

// Storage version of v1api20211001.ImageRegistryCredential
// Image registry credential.
type ImageRegistryCredential struct {
	Identity    *string                     `json:"identity,omitempty"`
	IdentityUrl *string                     `json:"identityUrl,omitempty"`
	Password    *genruntime.SecretReference `json:"password,omitempty"`
	PropertyBag genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	Server      *string                     `json:"server,omitempty"`
	Username    *string                     `json:"username,omitempty"`
}

// Storage version of v1api20211001.ImageRegistryCredential_STATUS
// Image registry credential.
type ImageRegistryCredential_STATUS struct {
	Identity    *string                `json:"identity,omitempty"`
	IdentityUrl *string                `json:"identityUrl,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Server      *string                `json:"server,omitempty"`
	Username    *string                `json:"username,omitempty"`
}

// Storage version of v1api20211001.InitContainerDefinition
// The init container definition.
type InitContainerDefinition struct {
	Command              []string               `json:"command,omitempty"`
	EnvironmentVariables []EnvironmentVariable  `json:"environmentVariables,omitempty"`
	Image                *string                `json:"image,omitempty"`
	Name                 *string                `json:"name,omitempty"`
	PropertyBag          genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	VolumeMounts         []VolumeMount          `json:"volumeMounts,omitempty"`
}

// Storage version of v1api20211001.InitContainerDefinition_STATUS
// The init container definition.
type InitContainerDefinition_STATUS struct {
	Command              []string                                               `json:"command,omitempty"`
	EnvironmentVariables []EnvironmentVariable_STATUS                           `json:"environmentVariables,omitempty"`
	Image                *string                                                `json:"image,omitempty"`
	InstanceView         *InitContainerPropertiesDefinition_InstanceView_STATUS `json:"instanceView,omitempty"`
	Name                 *string                                                `json:"name,omitempty"`
	PropertyBag          genruntime.PropertyBag                                 `json:"$propertyBag,omitempty"`
	VolumeMounts         []VolumeMount_STATUS                                   `json:"volumeMounts,omitempty"`
}

// Storage version of v1api20211001.IpAddress
// IP address for the container group.
type IpAddress struct {
	AutoGeneratedDomainNameLabelScope *string                `json:"autoGeneratedDomainNameLabelScope,omitempty"`
	DnsNameLabel                      *string                `json:"dnsNameLabel,omitempty"`
	Ip                                *string                `json:"ip,omitempty"`
	Ports                             []Port                 `json:"ports,omitempty"`
	PropertyBag                       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type                              *string                `json:"type,omitempty"`
}

// Storage version of v1api20211001.IpAddress_STATUS
// IP address for the container group.
type IpAddress_STATUS struct {
	AutoGeneratedDomainNameLabelScope *string                `json:"autoGeneratedDomainNameLabelScope,omitempty"`
	DnsNameLabel                      *string                `json:"dnsNameLabel,omitempty"`
	Fqdn                              *string                `json:"fqdn,omitempty"`
	Ip                                *string                `json:"ip,omitempty"`
	Ports                             []Port_STATUS          `json:"ports,omitempty"`
	PropertyBag                       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type                              *string                `json:"type,omitempty"`
}

// Storage version of v1api20211001.Volume
// The properties of the volume.
type Volume struct {
	AzureFile   *AzureFileVolume       `json:"azureFile,omitempty"`
	EmptyDir    map[string]v1.JSON     `json:"emptyDir,omitempty"`
	GitRepo     *GitRepoVolume         `json:"gitRepo,omitempty"`
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Secret      map[string]string      `json:"secret,omitempty"`
}

// Storage version of v1api20211001.Volume_STATUS
// The properties of the volume.
type Volume_STATUS struct {
	AzureFile   *AzureFileVolume_STATUS `json:"azureFile,omitempty"`
	EmptyDir    map[string]v1.JSON      `json:"emptyDir,omitempty"`
	GitRepo     *GitRepoVolume_STATUS   `json:"gitRepo,omitempty"`
	Name        *string                 `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag  `json:"$propertyBag,omitempty"`
	Secret      map[string]string       `json:"secret,omitempty"`
}

// Storage version of v1api20211001.AzureFileVolume
// The properties of the Azure File volume. Azure File shares are mounted as volumes.
type AzureFileVolume struct {
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ReadOnly           *bool                  `json:"readOnly,omitempty"`
	ShareName          *string                `json:"shareName,omitempty"`
	StorageAccountKey  *string                `json:"storageAccountKey,omitempty"`
	StorageAccountName *string                `json:"storageAccountName,omitempty"`
}

// Storage version of v1api20211001.AzureFileVolume_STATUS
// The properties of the Azure File volume. Azure File shares are mounted as volumes.
type AzureFileVolume_STATUS struct {
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ReadOnly           *bool                  `json:"readOnly,omitempty"`
	ShareName          *string                `json:"shareName,omitempty"`
	StorageAccountKey  *string                `json:"storageAccountKey,omitempty"`
	StorageAccountName *string                `json:"storageAccountName,omitempty"`
}

// Storage version of v1api20211001.ContainerPort
// The port exposed on the container instance.
type ContainerPort struct {
	Port        *int                   `json:"port,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Protocol    *string                `json:"protocol,omitempty"`
}

// Storage version of v1api20211001.ContainerPort_STATUS
// The port exposed on the container instance.
type ContainerPort_STATUS struct {
	Port        *int                   `json:"port,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Protocol    *string                `json:"protocol,omitempty"`
}

// Storage version of v1api20211001.ContainerProbe
// The container probe, for liveness or readiness
type ContainerProbe struct {
	Exec                *ContainerExec         `json:"exec,omitempty"`
	FailureThreshold    *int                   `json:"failureThreshold,omitempty"`
	HttpGet             *ContainerHttpGet      `json:"httpGet,omitempty"`
	InitialDelaySeconds *int                   `json:"initialDelaySeconds,omitempty"`
	PeriodSeconds       *int                   `json:"periodSeconds,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SuccessThreshold    *int                   `json:"successThreshold,omitempty"`
	TimeoutSeconds      *int                   `json:"timeoutSeconds,omitempty"`
}

// Storage version of v1api20211001.ContainerProbe_STATUS
// The container probe, for liveness or readiness
type ContainerProbe_STATUS struct {
	Exec                *ContainerExec_STATUS    `json:"exec,omitempty"`
	FailureThreshold    *int                     `json:"failureThreshold,omitempty"`
	HttpGet             *ContainerHttpGet_STATUS `json:"httpGet,omitempty"`
	InitialDelaySeconds *int                     `json:"initialDelaySeconds,omitempty"`
	PeriodSeconds       *int                     `json:"periodSeconds,omitempty"`
	PropertyBag         genruntime.PropertyBag   `json:"$propertyBag,omitempty"`
	SuccessThreshold    *int                     `json:"successThreshold,omitempty"`
	TimeoutSeconds      *int                     `json:"timeoutSeconds,omitempty"`
}

// Storage version of v1api20211001.ContainerProperties_InstanceView_STATUS
type ContainerProperties_InstanceView_STATUS struct {
	CurrentState  *ContainerState_STATUS `json:"currentState,omitempty"`
	Events        []Event_STATUS         `json:"events,omitempty"`
	PreviousState *ContainerState_STATUS `json:"previousState,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RestartCount  *int                   `json:"restartCount,omitempty"`
}

// Storage version of v1api20211001.EnvironmentVariable
// The environment variable to set within the container instance.
type EnvironmentVariable struct {
	Name        *string                     `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	SecureValue *genruntime.SecretReference `json:"secureValue,omitempty"`
	Value       *string                     `json:"value,omitempty"`
}

// Storage version of v1api20211001.EnvironmentVariable_STATUS
// The environment variable to set within the container instance.
type EnvironmentVariable_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Value       *string                `json:"value,omitempty"`
}

// Storage version of v1api20211001.Event_STATUS
// A container group or container instance event.
type Event_STATUS struct {
	Count          *int                   `json:"count,omitempty"`
	FirstTimestamp *string                `json:"firstTimestamp,omitempty"`
	LastTimestamp  *string                `json:"lastTimestamp,omitempty"`
	Message        *string                `json:"message,omitempty"`
	Name           *string                `json:"name,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type           *string                `json:"type,omitempty"`
}

// Storage version of v1api20211001.GitRepoVolume
// Represents a volume that is populated with the contents of a git repository
type GitRepoVolume struct {
	Directory   *string                `json:"directory,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Repository  *string                `json:"repository,omitempty"`
	Revision    *string                `json:"revision,omitempty"`
}

// Storage version of v1api20211001.GitRepoVolume_STATUS
// Represents a volume that is populated with the contents of a git repository
type GitRepoVolume_STATUS struct {
	Directory   *string                `json:"directory,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Repository  *string                `json:"repository,omitempty"`
	Revision    *string                `json:"revision,omitempty"`
}

// Storage version of v1api20211001.InitContainerPropertiesDefinition_InstanceView_STATUS
type InitContainerPropertiesDefinition_InstanceView_STATUS struct {
	CurrentState  *ContainerState_STATUS `json:"currentState,omitempty"`
	Events        []Event_STATUS         `json:"events,omitempty"`
	PreviousState *ContainerState_STATUS `json:"previousState,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RestartCount  *int                   `json:"restartCount,omitempty"`
}

// Storage version of v1api20211001.LogAnalytics
// Container group log analytics information.
type LogAnalytics struct {
	LogType      *string                     `json:"logType,omitempty"`
	Metadata     map[string]string           `json:"metadata,omitempty"`
	PropertyBag  genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	WorkspaceId  *string                     `json:"workspaceId,omitempty"`
	WorkspaceKey *genruntime.SecretReference `json:"workspaceKey,omitempty"`

	// WorkspaceResourceReference: The workspace resource id for log analytics
	WorkspaceResourceReference *genruntime.ResourceReference `armReference:"WorkspaceResourceId" json:"workspaceResourceReference,omitempty"`
}

// Storage version of v1api20211001.LogAnalytics_STATUS
// Container group log analytics information.
type LogAnalytics_STATUS struct {
	LogType     *string                `json:"logType,omitempty"`
	Metadata    map[string]string      `json:"metadata,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	WorkspaceId *string                `json:"workspaceId,omitempty"`
}

// Storage version of v1api20211001.Port
// The port exposed on the container group.
type Port struct {
	Port        *int                   `json:"port,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Protocol    *string                `json:"protocol,omitempty"`
}

// Storage version of v1api20211001.Port_STATUS
// The port exposed on the container group.
type Port_STATUS struct {
	Port        *int                   `json:"port,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Protocol    *string                `json:"protocol,omitempty"`
}

// Storage version of v1api20211001.ResourceRequirements
// The resource requirements.
type ResourceRequirements struct {
	Limits      *ResourceLimits        `json:"limits,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Requests    *ResourceRequests      `json:"requests,omitempty"`
}

// Storage version of v1api20211001.ResourceRequirements_STATUS
// The resource requirements.
type ResourceRequirements_STATUS struct {
	Limits      *ResourceLimits_STATUS   `json:"limits,omitempty"`
	PropertyBag genruntime.PropertyBag   `json:"$propertyBag,omitempty"`
	Requests    *ResourceRequests_STATUS `json:"requests,omitempty"`
}

// Storage version of v1api20211001.UserAssignedIdentities_STATUS
// The list of user identities associated with the container group. The user identity dictionary key references will be ARM
// resource ids in the form:
// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
type UserAssignedIdentities_STATUS struct {
	ClientId    *string                `json:"clientId,omitempty"`
	PrincipalId *string                `json:"principalId,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20211001.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 v1api20211001.VolumeMount
// The properties of the volume mount.
type VolumeMount struct {
	MountPath   *string                `json:"mountPath,omitempty"`
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ReadOnly    *bool                  `json:"readOnly,omitempty"`
}

// Storage version of v1api20211001.VolumeMount_STATUS
// The properties of the volume mount.
type VolumeMount_STATUS struct {
	MountPath   *string                `json:"mountPath,omitempty"`
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ReadOnly    *bool                  `json:"readOnly,omitempty"`
}

// Storage version of v1api20211001.ContainerExec
// The container execution command, for liveness or readiness probe
type ContainerExec struct {
	Command     []string               `json:"command,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20211001.ContainerExec_STATUS
// The container execution command, for liveness or readiness probe
type ContainerExec_STATUS struct {
	Command     []string               `json:"command,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20211001.ContainerHttpGet
// The container Http Get settings, for liveness or readiness probe
type ContainerHttpGet struct {
	HttpHeaders []HttpHeader           `json:"httpHeaders,omitempty"`
	Path        *string                `json:"path,omitempty"`
	Port        *int                   `json:"port,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Scheme      *string                `json:"scheme,omitempty"`
}

// Storage version of v1api20211001.ContainerHttpGet_STATUS
// The container Http Get settings, for liveness or readiness probe
type ContainerHttpGet_STATUS struct {
	HttpHeaders []HttpHeader_STATUS    `json:"httpHeaders,omitempty"`
	Path        *string                `json:"path,omitempty"`
	Port        *int                   `json:"port,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Scheme      *string                `json:"scheme,omitempty"`
}

// Storage version of v1api20211001.ContainerState_STATUS
// The container instance state.
type ContainerState_STATUS struct {
	DetailStatus *string                `json:"detailStatus,omitempty"`
	ExitCode     *int                   `json:"exitCode,omitempty"`
	FinishTime   *string                `json:"finishTime,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StartTime    *string                `json:"startTime,omitempty"`
	State        *string                `json:"state,omitempty"`
}

// Storage version of v1api20211001.ResourceLimits
// The resource limits.
type ResourceLimits struct {
	Cpu         *float64               `json:"cpu,omitempty"`
	Gpu         *GpuResource           `json:"gpu,omitempty"`
	MemoryInGB  *float64               `json:"memoryInGB,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20211001.ResourceLimits_STATUS
// The resource limits.
type ResourceLimits_STATUS struct {
	Cpu         *float64               `json:"cpu,omitempty"`
	Gpu         *GpuResource_STATUS    `json:"gpu,omitempty"`
	MemoryInGB  *float64               `json:"memoryInGB,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20211001.ResourceRequests
// The resource requests.
type ResourceRequests struct {
	Cpu         *float64               `json:"cpu,omitempty"`
	Gpu         *GpuResource           `json:"gpu,omitempty"`
	MemoryInGB  *float64               `json:"memoryInGB,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20211001.ResourceRequests_STATUS
// The resource requests.
type ResourceRequests_STATUS struct {
	Cpu         *float64               `json:"cpu,omitempty"`
	Gpu         *GpuResource_STATUS    `json:"gpu,omitempty"`
	MemoryInGB  *float64               `json:"memoryInGB,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20211001.GpuResource
// The GPU resource.
type GpuResource struct {
	Count       *int                   `json:"count,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Sku         *string                `json:"sku,omitempty"`
}

// Storage version of v1api20211001.GpuResource_STATUS
// The GPU resource.
type GpuResource_STATUS struct {
	Count       *int                   `json:"count,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Sku         *string                `json:"sku,omitempty"`
}

// Storage version of v1api20211001.HttpHeader
// The HTTP header.
type HttpHeader struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Value       *string                `json:"value,omitempty"`
}

// Storage version of v1api20211001.HttpHeader_STATUS
// The HTTP header.
type HttpHeader_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Value       *string                `json:"value,omitempty"`
}

func init() {
	SchemeBuilder.Register(&ContainerGroup{}, &ContainerGroupList{})
}
