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

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

var _ genruntime.ARMResourceSpec = &ServersSecurityAlertPolicy_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2021-11-01"
func (policy ServersSecurityAlertPolicy_Spec) GetAPIVersion() string {
	return "2021-11-01"
}

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Sql/servers/securityAlertPolicies"
func (policy *ServersSecurityAlertPolicy_Spec) GetType() string {
	return "Microsoft.Sql/servers/securityAlertPolicies"
}

// Properties of a security alert policy.
type ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties struct {
	// DisabledAlerts: Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection,
	// Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force
	DisabledAlerts []string `json:"disabledAlerts,omitempty"`

	// EmailAccountAdmins: Specifies that the alert is sent to the account administrators.
	EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"`

	// EmailAddresses: Specifies an array of e-mail addresses to which the alert is sent.
	EmailAddresses []string `json:"emailAddresses,omitempty"`

	// RetentionDays: Specifies the number of days to keep in the Threat Detection audit logs.
	RetentionDays *int `json:"retentionDays,omitempty"`

	// State: Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the
	// specific database.
	State *ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State `json:"state,omitempty"`

	// StorageAccountAccessKey: Specifies the identifier key of the Threat Detection audit storage account.
	StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`

	// StorageEndpoint: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage
	// will hold all Threat Detection audit logs.
	StorageEndpoint *string `json:"storageEndpoint,omitempty"`
}

// +kubebuilder:validation:Enum={"Disabled","Enabled"}
type ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State string

const (
	ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Disabled = ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State("Disabled")
	ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Enabled  = ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State("Enabled")
)

// Mapping from string to ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State
var serverSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Values = map[string]ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State{
	"disabled": ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Disabled,
	"enabled":  ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Enabled,
}
