// 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 SqlDatabaseContainerTrigger_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 create and update Azure Cosmos DB trigger.
	Properties *SqlTriggerCreateUpdateProperties `json:"properties,omitempty"`
	Tags       map[string]string                 `json:"tags,omitempty"`
}

var _ genruntime.ARMResourceSpec = &SqlDatabaseContainerTrigger_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2023-11-15"
func (trigger SqlDatabaseContainerTrigger_Spec) GetAPIVersion() string {
	return "2023-11-15"
}

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/triggers"
func (trigger *SqlDatabaseContainerTrigger_Spec) GetType() string {
	return "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/triggers"
}

// Properties to create and update Azure Cosmos DB trigger.
type SqlTriggerCreateUpdateProperties struct {
	// Options: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the
	// request.
	Options *CreateUpdateOptions `json:"options,omitempty"`

	// Resource: The standard JSON format of a trigger
	Resource *SqlTriggerResource `json:"resource,omitempty"`
}

// Cosmos DB SQL trigger resource object
type SqlTriggerResource struct {
	// Body: Body of the Trigger
	Body *string `json:"body,omitempty"`

	// Id: Name of the Cosmos DB SQL trigger
	Id *string `json:"id,omitempty"`

	// TriggerOperation: The operation the trigger is associated with
	TriggerOperation *SqlTriggerResource_TriggerOperation `json:"triggerOperation,omitempty"`

	// TriggerType: Type of the Trigger
	TriggerType *SqlTriggerResource_TriggerType `json:"triggerType,omitempty"`
}

// +kubebuilder:validation:Enum={"All","Create","Delete","Replace","Update"}
type SqlTriggerResource_TriggerOperation string

const (
	SqlTriggerResource_TriggerOperation_All     = SqlTriggerResource_TriggerOperation("All")
	SqlTriggerResource_TriggerOperation_Create  = SqlTriggerResource_TriggerOperation("Create")
	SqlTriggerResource_TriggerOperation_Delete  = SqlTriggerResource_TriggerOperation("Delete")
	SqlTriggerResource_TriggerOperation_Replace = SqlTriggerResource_TriggerOperation("Replace")
	SqlTriggerResource_TriggerOperation_Update  = SqlTriggerResource_TriggerOperation("Update")
)

// Mapping from string to SqlTriggerResource_TriggerOperation
var sqlTriggerResource_TriggerOperation_Values = map[string]SqlTriggerResource_TriggerOperation{
	"all":     SqlTriggerResource_TriggerOperation_All,
	"create":  SqlTriggerResource_TriggerOperation_Create,
	"delete":  SqlTriggerResource_TriggerOperation_Delete,
	"replace": SqlTriggerResource_TriggerOperation_Replace,
	"update":  SqlTriggerResource_TriggerOperation_Update,
}

// +kubebuilder:validation:Enum={"Post","Pre"}
type SqlTriggerResource_TriggerType string

const (
	SqlTriggerResource_TriggerType_Post = SqlTriggerResource_TriggerType("Post")
	SqlTriggerResource_TriggerType_Pre  = SqlTriggerResource_TriggerType("Pre")
)

// Mapping from string to SqlTriggerResource_TriggerType
var sqlTriggerResource_TriggerType_Values = map[string]SqlTriggerResource_TriggerType{
	"post": SqlTriggerResource_TriggerType_Post,
	"pre":  SqlTriggerResource_TriggerType_Pre,
}
