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

import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"

type FleetsUpdateRun_STATUS struct {
	// ETag: If eTag is provided in the response body, it may also be provided as a header per the normal etag convention.
	// Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in
	// the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header
	// fields.
	ETag *string `json:"eTag,omitempty"`

	// Id: Fully qualified resource ID for the resource. Ex -
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	Id *string `json:"id,omitempty"`

	// Name: The name of the resource
	Name *string `json:"name,omitempty"`

	// Properties: The resource-specific properties for this resource.
	Properties *UpdateRunProperties_STATUS `json:"properties,omitempty"`

	// SystemData: Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData_STATUS `json:"systemData,omitempty"`

	// Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty"`
}

// The properties of the UpdateRun.
type UpdateRunProperties_STATUS struct {
	// ManagedClusterUpdate: The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be
	// modified until the run is started.
	ManagedClusterUpdate *ManagedClusterUpdate_STATUS `json:"managedClusterUpdate,omitempty"`

	// ProvisioningState: The provisioning state of the UpdateRun resource.
	ProvisioningState *UpdateRunProvisioningState_STATUS `json:"provisioningState,omitempty"`

	// Status: The status of the UpdateRun.
	Status *UpdateRunStatus_STATUS `json:"status,omitempty"`

	// Strategy: The strategy defines the order in which the clusters will be updated.
	// If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single
	// UpdateGroup targeting all members.
	// The strategy of the UpdateRun can be modified until the run is started.
	Strategy *UpdateRunStrategy_STATUS `json:"strategy,omitempty"`
}

// The update to be applied to the ManagedClusters.
type ManagedClusterUpdate_STATUS struct {
	// Upgrade: The upgrade to apply to the ManagedClusters.
	Upgrade *ManagedClusterUpgradeSpec_STATUS `json:"upgrade,omitempty"`
}

// The provisioning state of the UpdateRun resource.
type UpdateRunProvisioningState_STATUS string

const (
	UpdateRunProvisioningState_STATUS_Canceled  = UpdateRunProvisioningState_STATUS("Canceled")
	UpdateRunProvisioningState_STATUS_Failed    = UpdateRunProvisioningState_STATUS("Failed")
	UpdateRunProvisioningState_STATUS_Succeeded = UpdateRunProvisioningState_STATUS("Succeeded")
)

// Mapping from string to UpdateRunProvisioningState_STATUS
var updateRunProvisioningState_STATUS_Values = map[string]UpdateRunProvisioningState_STATUS{
	"canceled":  UpdateRunProvisioningState_STATUS_Canceled,
	"failed":    UpdateRunProvisioningState_STATUS_Failed,
	"succeeded": UpdateRunProvisioningState_STATUS_Succeeded,
}

// The status of a UpdateRun.
type UpdateRunStatus_STATUS struct {
	// Stages: The stages composing an update run. Stages are run sequentially withing an UpdateRun.
	Stages []UpdateStageStatus_STATUS `json:"stages"`

	// Status: The status of the UpdateRun.
	Status *UpdateStatus_STATUS `json:"status,omitempty"`
}

// Defines the update sequence of the clusters via stages and groups.
// Stages within a run are executed sequentially one
// after another.
// Groups within a stage are executed in parallel.
// Member clusters within a group are updated sequentially
// one after another.
// A valid strategy contains no duplicate groups within or across stages.
type UpdateRunStrategy_STATUS struct {
	// Stages: The list of stages that compose this update run. Min size: 1.
	Stages []UpdateStage_STATUS `json:"stages"`
}

// The upgrade to apply to a ManagedCluster.
type ManagedClusterUpgradeSpec_STATUS struct {
	// KubernetesVersion: The Kubernetes version to upgrade the member clusters to.
	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`

	// Type: ManagedClusterUpgradeType is the type of upgrade to be applied.
	Type *ManagedClusterUpgradeType_STATUS `json:"type,omitempty"`
}

// Defines a stage which contains the groups to update and the steps to take (e.g., wait for a time period) before starting
// the next stage.
type UpdateStage_STATUS struct {
	// AfterStageWaitInSeconds: The time in seconds to wait at the end of this stage before starting the next one. Defaults to
	// 0 seconds if unspecified.
	AfterStageWaitInSeconds *int `json:"afterStageWaitInSeconds,omitempty"`

	// Groups: Defines the groups to be executed in parallel in this stage. Duplicate groups are not allowed. Min size: 1.
	Groups []UpdateGroup_STATUS `json:"groups"`

	// Name: The name of the stage. Must be unique within the UpdateRun.
	Name *string `json:"name,omitempty"`
}

// The status of a UpdateStage.
type UpdateStageStatus_STATUS struct {
	// AfterStageWaitStatus: The status of the wait period configured on the UpdateStage.
	AfterStageWaitStatus *WaitStatus_STATUS `json:"afterStageWaitStatus,omitempty"`

	// Groups: The list of groups to be updated as part of this UpdateStage.
	Groups []UpdateGroupStatus_STATUS `json:"groups"`

	// Name: The name of the UpdateStage.
	Name *string `json:"name,omitempty"`

	// Status: The status of the UpdateStage.
	Status *UpdateStatus_STATUS `json:"status,omitempty"`
}

// The status for an operation or group of operations.
type UpdateStatus_STATUS struct {
	// CompletedTime: The time the operation or group was completed.
	CompletedTime *string `json:"completedTime,omitempty"`

	// Error: The error details when a failure is encountered.
	Error *ErrorDetail_STATUS `json:"error,omitempty"`

	// StartTime: The time the operation or group was started.
	StartTime *string `json:"startTime,omitempty"`

	// State: The State of the operation or group.
	State *UpdateState_STATUS `json:"state,omitempty"`
}

// The error detail.
type ErrorDetail_STATUS struct {
	// AdditionalInfo: The error additional info.
	AdditionalInfo []ErrorAdditionalInfo_STATUS `json:"additionalInfo"`

	// Code: The error code.
	Code *string `json:"code,omitempty"`

	// Details: The error details.
	Details []ErrorDetail_STATUS_Unrolled `json:"details"`

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

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

// The type of upgrade to perform when targeting ManagedClusters.
type ManagedClusterUpgradeType_STATUS string

const (
	ManagedClusterUpgradeType_STATUS_Full          = ManagedClusterUpgradeType_STATUS("Full")
	ManagedClusterUpgradeType_STATUS_NodeImageOnly = ManagedClusterUpgradeType_STATUS("NodeImageOnly")
)

// Mapping from string to ManagedClusterUpgradeType_STATUS
var managedClusterUpgradeType_STATUS_Values = map[string]ManagedClusterUpgradeType_STATUS{
	"full":          ManagedClusterUpgradeType_STATUS_Full,
	"nodeimageonly": ManagedClusterUpgradeType_STATUS_NodeImageOnly,
}

// A group to be updated.
type UpdateGroup_STATUS struct {
	// Name: Name of the group.
	// It must match a group name of an existing fleet member.
	Name *string `json:"name,omitempty"`
}

// The status of a UpdateGroup.
type UpdateGroupStatus_STATUS struct {
	// Members: The list of member this UpdateGroup updates.
	Members []MemberUpdateStatus_STATUS `json:"members"`

	// Name: The name of the UpdateGroup.
	Name *string `json:"name,omitempty"`

	// Status: The status of the UpdateGroup.
	Status *UpdateStatus_STATUS `json:"status,omitempty"`
}

// The state of the UpdateRun, UpdateStage, UpdateGroup, or MemberUpdate.
type UpdateState_STATUS string

const (
	UpdateState_STATUS_Completed  = UpdateState_STATUS("Completed")
	UpdateState_STATUS_Failed     = UpdateState_STATUS("Failed")
	UpdateState_STATUS_NotStarted = UpdateState_STATUS("NotStarted")
	UpdateState_STATUS_Pending    = UpdateState_STATUS("Pending")
	UpdateState_STATUS_Running    = UpdateState_STATUS("Running")
	UpdateState_STATUS_Stopped    = UpdateState_STATUS("Stopped")
	UpdateState_STATUS_Stopping   = UpdateState_STATUS("Stopping")
)

// Mapping from string to UpdateState_STATUS
var updateState_STATUS_Values = map[string]UpdateState_STATUS{
	"completed":  UpdateState_STATUS_Completed,
	"failed":     UpdateState_STATUS_Failed,
	"notstarted": UpdateState_STATUS_NotStarted,
	"pending":    UpdateState_STATUS_Pending,
	"running":    UpdateState_STATUS_Running,
	"stopped":    UpdateState_STATUS_Stopped,
	"stopping":   UpdateState_STATUS_Stopping,
}

// The status of the wait duration.
type WaitStatus_STATUS struct {
	// Status: The status of the wait duration.
	Status *UpdateStatus_STATUS `json:"status,omitempty"`

	// WaitDurationInSeconds: The wait duration configured in seconds.
	WaitDurationInSeconds *int `json:"waitDurationInSeconds,omitempty"`
}

// The resource management error additional info.
type ErrorAdditionalInfo_STATUS struct {
	// Info: The additional info.
	Info map[string]v1.JSON `json:"info"`

	// Type: The additional info type.
	Type *string `json:"type,omitempty"`
}

type ErrorDetail_STATUS_Unrolled struct {
	// AdditionalInfo: The error additional info.
	AdditionalInfo []ErrorAdditionalInfo_STATUS `json:"additionalInfo"`

	// Code: The error code.
	Code *string `json:"code,omitempty"`

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

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

// The status of a member update operation.
type MemberUpdateStatus_STATUS struct {
	// ClusterResourceId: The Azure resource id of the target Kubernetes cluster.
	ClusterResourceId *string `json:"clusterResourceId,omitempty"`

	// Name: The name of the FleetMember.
	Name *string `json:"name,omitempty"`

	// OperationId: The operation resource id of the latest attempt to perform the operation.
	OperationId *string `json:"operationId,omitempty"`

	// Status: The status of the MemberUpdate operation.
	Status *UpdateStatus_STATUS `json:"status,omitempty"`
}
