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

import "github.com/Azure/azure-service-operator/v2/pkg/genruntime"

type MongoCluster_Spec struct {
	// Location: The geo-location where the resource lives
	Location *string `json:"location,omitempty"`
	Name     string  `json:"name,omitempty"`

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

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

var _ genruntime.ARMResourceSpec = &MongoCluster_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2024-07-01"
func (cluster MongoCluster_Spec) GetAPIVersion() string {
	return "2024-07-01"
}

// GetName returns the Name of the resource
func (cluster *MongoCluster_Spec) GetName() string {
	return cluster.Name
}

// GetType returns the ARM Type of the resource. This is always "Microsoft.DocumentDB/mongoClusters"
func (cluster *MongoCluster_Spec) GetType() string {
	return "Microsoft.DocumentDB/mongoClusters"
}

// The properties of a mongo cluster.
type MongoClusterProperties struct {
	// Administrator: The local administrator properties for the mongo cluster.
	Administrator *AdministratorProperties `json:"administrator,omitempty"`

	// Compute: The compute properties of the mongo cluster.
	Compute *ComputeProperties `json:"compute,omitempty"`

	// CreateMode: The mode to create a mongo cluster.
	CreateMode *CreateMode `json:"createMode,omitempty"`

	// HighAvailability: The high availability properties of the mongo cluster.
	HighAvailability *HighAvailabilityProperties `json:"highAvailability,omitempty"`

	// PreviewFeatures: List of private endpoint connections.
	PreviewFeatures []PreviewFeature `json:"previewFeatures,omitempty"`

	// PublicNetworkAccess: Whether or not public endpoint access is allowed for this mongo cluster.
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// ReplicaParameters: The parameters to create a replica mongo cluster.
	ReplicaParameters *MongoClusterReplicaParameters `json:"replicaParameters,omitempty"`

	// RestoreParameters: The parameters to create a point-in-time restore mongo cluster.
	RestoreParameters *MongoClusterRestoreParameters `json:"restoreParameters,omitempty"`

	// ServerVersion: The Mongo DB server version. Defaults to the latest available version if not specified.
	ServerVersion *string `json:"serverVersion,omitempty"`

	// Sharding: The sharding properties of the mongo cluster.
	Sharding *ShardingProperties `json:"sharding,omitempty"`

	// Storage: The storage properties of the mongo cluster.
	Storage *StorageProperties `json:"storage,omitempty"`
}

// The local administrator login properties.
type AdministratorProperties struct {
	// Password: The administrator password.
	Password *string `json:"password,omitempty"`

	// UserName: The administrator user name.
	UserName *string `json:"userName,omitempty"`
}

// The compute properties of the cluster. This includes the virtual-cores/memory and scaling options applied to servers in
// the cluster.
type ComputeProperties struct {
	// Tier: The compute tier to assign to the cluster, where each tier maps to a virtual-core and memory size. Example values:
	// 'M30', 'M40'.
	Tier *string `json:"tier,omitempty"`
}

// The mode that the Mongo Cluster is created with.
// +kubebuilder:validation:Enum={"Default","GeoReplica","PointInTimeRestore","Replica"}
type CreateMode string

const (
	CreateMode_Default            = CreateMode("Default")
	CreateMode_GeoReplica         = CreateMode("GeoReplica")
	CreateMode_PointInTimeRestore = CreateMode("PointInTimeRestore")
	CreateMode_Replica            = CreateMode("Replica")
)

// Mapping from string to CreateMode
var createMode_Values = map[string]CreateMode{
	"default":            CreateMode_Default,
	"georeplica":         CreateMode_GeoReplica,
	"pointintimerestore": CreateMode_PointInTimeRestore,
	"replica":            CreateMode_Replica,
}

// The high availability properties of the cluster.
type HighAvailabilityProperties struct {
	// TargetMode: The target high availability mode requested for the cluster.
	TargetMode *HighAvailabilityMode `json:"targetMode,omitempty"`
}

// Parameters used for replica operations.
type MongoClusterReplicaParameters struct {
	// SourceLocation: The location of the source cluster
	SourceLocation *string `json:"sourceLocation,omitempty"`

	// SourceResourceId: The id of the replication source cluster.
	SourceResourceId *string `json:"sourceResourceId,omitempty"`
}

// Parameters used for restore operations
type MongoClusterRestoreParameters struct {
	// PointInTimeUTC: UTC point in time to restore a mongo cluster
	PointInTimeUTC *string `json:"pointInTimeUTC,omitempty"`

	// SourceResourceId: Resource ID to locate the source cluster to restore
	SourceResourceId *string `json:"sourceResourceId,omitempty"`
}

// Preview features that can be enabled on a mongo cluster.
// +kubebuilder:validation:Enum={"GeoReplicas"}
type PreviewFeature string

const PreviewFeature_GeoReplicas = PreviewFeature("GeoReplicas")

// Mapping from string to PreviewFeature
var previewFeature_Values = map[string]PreviewFeature{
	"georeplicas": PreviewFeature_GeoReplicas,
}

// Whether or not public endpoint access is allowed for this Mongo cluster.  Value is optional and default value is
// 'Enabled'
// +kubebuilder:validation:Enum={"Disabled","Enabled"}
type PublicNetworkAccess string

const (
	PublicNetworkAccess_Disabled = PublicNetworkAccess("Disabled")
	PublicNetworkAccess_Enabled  = PublicNetworkAccess("Enabled")
)

// Mapping from string to PublicNetworkAccess
var publicNetworkAccess_Values = map[string]PublicNetworkAccess{
	"disabled": PublicNetworkAccess_Disabled,
	"enabled":  PublicNetworkAccess_Enabled,
}

// The sharding properties of the cluster. This includes the shard count and scaling options for the cluster.
type ShardingProperties struct {
	// ShardCount: Number of shards to provision on the cluster.
	ShardCount *int `json:"shardCount,omitempty"`
}

// The storage properties of the cluster. This includes the data storage size and scaling applied to servers in the cluster.
type StorageProperties struct {
	// SizeGb: The size of the data disk assigned to each server.
	SizeGb *int `json:"sizeGb,omitempty"`
}

// The high availability modes for a cluster.
// +kubebuilder:validation:Enum={"Disabled","SameZone","ZoneRedundantPreferred"}
type HighAvailabilityMode string

const (
	HighAvailabilityMode_Disabled               = HighAvailabilityMode("Disabled")
	HighAvailabilityMode_SameZone               = HighAvailabilityMode("SameZone")
	HighAvailabilityMode_ZoneRedundantPreferred = HighAvailabilityMode("ZoneRedundantPreferred")
)

// Mapping from string to HighAvailabilityMode
var highAvailabilityMode_Values = map[string]HighAvailabilityMode{
	"disabled":               HighAvailabilityMode_Disabled,
	"samezone":               HighAvailabilityMode_SameZone,
	"zoneredundantpreferred": HighAvailabilityMode_ZoneRedundantPreferred,
}
