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

type ServersFailoverGroup_STATUS struct {
	// Id: Resource ID.
	Id *string `json:"id,omitempty"`

	// Location: Resource location.
	Location *string `json:"location,omitempty"`

	// Name: Resource name.
	Name *string `json:"name,omitempty"`

	// Properties: Resource properties.
	Properties *FailoverGroupProperties_STATUS `json:"properties,omitempty"`

	// Tags: Resource tags.
	Tags map[string]string `json:"tags,omitempty"`

	// Type: Resource type.
	Type *string `json:"type,omitempty"`
}

// Properties of a failover group.
type FailoverGroupProperties_STATUS struct {
	// Databases: List of databases in the failover group.
	Databases []string `json:"databases,omitempty"`

	// PartnerServers: List of partner server information for the failover group.
	PartnerServers []PartnerInfo_STATUS `json:"partnerServers,omitempty"`

	// ReadOnlyEndpoint: Read-only endpoint of the failover group instance.
	ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint_STATUS `json:"readOnlyEndpoint,omitempty"`

	// ReadWriteEndpoint: Read-write endpoint of the failover group instance.
	ReadWriteEndpoint *FailoverGroupReadWriteEndpoint_STATUS `json:"readWriteEndpoint,omitempty"`

	// ReplicationRole: Local replication role of the failover group instance.
	ReplicationRole *FailoverGroupProperties_ReplicationRole_STATUS `json:"replicationRole,omitempty"`

	// ReplicationState: Replication state of the failover group instance.
	ReplicationState *string `json:"replicationState,omitempty"`
}

type FailoverGroupProperties_ReplicationRole_STATUS string

const (
	FailoverGroupProperties_ReplicationRole_STATUS_Primary   = FailoverGroupProperties_ReplicationRole_STATUS("Primary")
	FailoverGroupProperties_ReplicationRole_STATUS_Secondary = FailoverGroupProperties_ReplicationRole_STATUS("Secondary")
)

// Mapping from string to FailoverGroupProperties_ReplicationRole_STATUS
var failoverGroupProperties_ReplicationRole_STATUS_Values = map[string]FailoverGroupProperties_ReplicationRole_STATUS{
	"primary":   FailoverGroupProperties_ReplicationRole_STATUS_Primary,
	"secondary": FailoverGroupProperties_ReplicationRole_STATUS_Secondary,
}

// Read-only endpoint of the failover group instance.
type FailoverGroupReadOnlyEndpoint_STATUS struct {
	// FailoverPolicy: Failover policy of the read-only endpoint for the failover group.
	FailoverPolicy *FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS `json:"failoverPolicy,omitempty"`
}

// Read-write endpoint of the failover group instance.
type FailoverGroupReadWriteEndpoint_STATUS struct {
	// FailoverPolicy: Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then
	// failoverWithDataLossGracePeriodMinutes is required.
	FailoverPolicy *FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS `json:"failoverPolicy,omitempty"`

	// FailoverWithDataLossGracePeriodMinutes: Grace period before failover with data loss is attempted for the read-write
	// endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
	FailoverWithDataLossGracePeriodMinutes *int `json:"failoverWithDataLossGracePeriodMinutes,omitempty"`
}

// Partner server information for the failover group.
type PartnerInfo_STATUS struct {
	// Id: Resource identifier of the partner server.
	Id *string `json:"id,omitempty"`

	// Location: Geo location of the partner server.
	Location *string `json:"location,omitempty"`

	// ReplicationRole: Replication role of the partner server.
	ReplicationRole *PartnerInfo_ReplicationRole_STATUS `json:"replicationRole,omitempty"`
}

type FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS string

const (
	FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS_Disabled = FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS("Disabled")
	FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS_Enabled  = FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS("Enabled")
)

// Mapping from string to FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS
var failoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS_Values = map[string]FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS{
	"disabled": FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS_Disabled,
	"enabled":  FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS_Enabled,
}

type FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS string

const (
	FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS_Automatic = FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS("Automatic")
	FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS_Manual    = FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS("Manual")
)

// Mapping from string to FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS
var failoverGroupReadWriteEndpoint_FailoverPolicy_STATUS_Values = map[string]FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS{
	"automatic": FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS_Automatic,
	"manual":    FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS_Manual,
}

type PartnerInfo_ReplicationRole_STATUS string

const (
	PartnerInfo_ReplicationRole_STATUS_Primary   = PartnerInfo_ReplicationRole_STATUS("Primary")
	PartnerInfo_ReplicationRole_STATUS_Secondary = PartnerInfo_ReplicationRole_STATUS("Secondary")
)

// Mapping from string to PartnerInfo_ReplicationRole_STATUS
var partnerInfo_ReplicationRole_STATUS_Values = map[string]PartnerInfo_ReplicationRole_STATUS{
	"primary":   PartnerInfo_ReplicationRole_STATUS_Primary,
	"secondary": PartnerInfo_ReplicationRole_STATUS_Secondary,
}
