// 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 MongodbDatabaseCollectionThroughputSetting_Spec struct {
	// Location: The location of the resource group to which the resource belongs.
	Location *string `json:"location,omitempty"`
	Name     string  `json:"name,omitempty"`

	// Properties: Properties to update Azure Cosmos DB resource throughput.
	Properties *ThroughputSettingsUpdateProperties `json:"properties,omitempty"`
	Tags       map[string]string                   `json:"tags,omitempty"`
}

var _ genruntime.ARMResourceSpec = &MongodbDatabaseCollectionThroughputSetting_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2021-05-15"
func (setting MongodbDatabaseCollectionThroughputSetting_Spec) GetAPIVersion() string {
	return "2021-05-15"
}

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings"
func (setting *MongodbDatabaseCollectionThroughputSetting_Spec) GetType() string {
	return "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections/throughputSettings"
}

// Properties to update Azure Cosmos DB resource throughput.
type ThroughputSettingsUpdateProperties struct {
	// Resource: The standard JSON format of a resource throughput
	Resource *ThroughputSettingsResource `json:"resource,omitempty"`
}

// Cosmos DB resource throughput object. Either throughput is required or autoscaleSettings is required, but not both.
type ThroughputSettingsResource struct {
	// AutoscaleSettings: Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is
	// required, but not both.
	AutoscaleSettings *AutoscaleSettingsResource `json:"autoscaleSettings,omitempty"`

	// Throughput: Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required,
	// but not both.
	Throughput *int `json:"throughput,omitempty"`
}

// Cosmos DB provisioned throughput settings object
type AutoscaleSettingsResource struct {
	// AutoUpgradePolicy: Cosmos DB resource auto-upgrade policy
	AutoUpgradePolicy *AutoUpgradePolicyResource `json:"autoUpgradePolicy,omitempty"`

	// MaxThroughput: Represents maximum throughput container can scale up to.
	MaxThroughput *int `json:"maxThroughput,omitempty"`
}

// Cosmos DB resource auto-upgrade policy
type AutoUpgradePolicyResource struct {
	// ThroughputPolicy: Represents throughput policy which service must adhere to for auto-upgrade
	ThroughputPolicy *ThroughputPolicyResource `json:"throughputPolicy,omitempty"`
}

// Cosmos DB resource throughput policy
type ThroughputPolicyResource struct {
	// IncrementPercent: Represents the percentage by which throughput can increase every time throughput policy kicks in.
	IncrementPercent *int `json:"incrementPercent,omitempty"`

	// IsEnabled: Determines whether the ThroughputPolicy is active or not
	IsEnabled *bool `json:"isEnabled,omitempty"`
}
