// 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 PrincipalAssignment_Spec struct {
	Name string `json:"name,omitempty"`

	// Properties: The database principal.
	Properties *DatabasePrincipalProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &PrincipalAssignment_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2024-04-13"
func (assignment PrincipalAssignment_Spec) GetAPIVersion() string {
	return "2024-04-13"
}

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Kusto/clusters/databases/principalAssignments"
func (assignment *PrincipalAssignment_Spec) GetType() string {
	return "Microsoft.Kusto/clusters/databases/principalAssignments"
}

// A class representing database principal property.
type DatabasePrincipalProperties struct {
	// PrincipalId: The principal ID assigned to the database principal. It can be a user email, application ID, or security
	// group name.
	PrincipalId *string `json:"principalId,omitempty" optionalConfigMapPair:"PrincipalId"`

	// PrincipalType: Principal type.
	PrincipalType *DatabasePrincipalProperties_PrincipalType `json:"principalType,omitempty"`

	// Role: Database principal role.
	Role *DatabasePrincipalProperties_Role `json:"role,omitempty"`

	// TenantId: The tenant id of the principal
	TenantId *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"`
}

// +kubebuilder:validation:Enum={"App","Group","User"}
type DatabasePrincipalProperties_PrincipalType string

const (
	DatabasePrincipalProperties_PrincipalType_App   = DatabasePrincipalProperties_PrincipalType("App")
	DatabasePrincipalProperties_PrincipalType_Group = DatabasePrincipalProperties_PrincipalType("Group")
	DatabasePrincipalProperties_PrincipalType_User  = DatabasePrincipalProperties_PrincipalType("User")
)

// Mapping from string to DatabasePrincipalProperties_PrincipalType
var databasePrincipalProperties_PrincipalType_Values = map[string]DatabasePrincipalProperties_PrincipalType{
	"app":   DatabasePrincipalProperties_PrincipalType_App,
	"group": DatabasePrincipalProperties_PrincipalType_Group,
	"user":  DatabasePrincipalProperties_PrincipalType_User,
}

// +kubebuilder:validation:Enum={"Admin","Ingestor","Monitor","UnrestrictedViewer","User","Viewer"}
type DatabasePrincipalProperties_Role string

const (
	DatabasePrincipalProperties_Role_Admin              = DatabasePrincipalProperties_Role("Admin")
	DatabasePrincipalProperties_Role_Ingestor           = DatabasePrincipalProperties_Role("Ingestor")
	DatabasePrincipalProperties_Role_Monitor            = DatabasePrincipalProperties_Role("Monitor")
	DatabasePrincipalProperties_Role_UnrestrictedViewer = DatabasePrincipalProperties_Role("UnrestrictedViewer")
	DatabasePrincipalProperties_Role_User               = DatabasePrincipalProperties_Role("User")
	DatabasePrincipalProperties_Role_Viewer             = DatabasePrincipalProperties_Role("Viewer")
)

// Mapping from string to DatabasePrincipalProperties_Role
var databasePrincipalProperties_Role_Values = map[string]DatabasePrincipalProperties_Role{
	"admin":              DatabasePrincipalProperties_Role_Admin,
	"ingestor":           DatabasePrincipalProperties_Role_Ingestor,
	"monitor":            DatabasePrincipalProperties_Role_Monitor,
	"unrestrictedviewer": DatabasePrincipalProperties_Role_UnrestrictedViewer,
	"user":               DatabasePrincipalProperties_Role_User,
	"viewer":             DatabasePrincipalProperties_Role_Viewer,
}
