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

type ScheduledQueryRule_STATUS struct {
	// Etag: The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per
	// the normal etag convention.  Entity tags are used for comparing two or more entities from the same requested resource.
	// HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and
	// If-Range (section 14.27) header fields.
	Etag *string `json:"etag,omitempty"`

	// Id: Fully qualified resource ID for the resource. Ex -
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	Id *string `json:"id,omitempty"`

	// Identity: The identity of the resource.
	Identity *Identity_STATUS `json:"identity,omitempty"`

	// Kind: Indicates the type of scheduled query rule. The default is LogAlert.
	Kind *ScheduledQueryRule_Kind_STATUS `json:"kind,omitempty"`

	// Location: The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Name: The name of the resource
	Name *string `json:"name,omitempty"`

	// Properties: The rule properties of the resource.
	Properties *ScheduledQueryRuleProperties_STATUS `json:"properties,omitempty"`

	// SystemData: SystemData of ScheduledQueryRule.
	SystemData *SystemData_STATUS `json:"systemData,omitempty"`

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

	// Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty"`
}

// Identity for the resource.
type Identity_STATUS struct {
	// PrincipalId: The principal ID of resource identity.
	PrincipalId *string `json:"principalId,omitempty"`

	// TenantId: The tenant ID of resource.
	TenantId *string `json:"tenantId,omitempty"`

	// Type: Type of managed service identity.
	Type *Identity_Type_STATUS `json:"type,omitempty"`

	// UserAssignedIdentities: The list of user identities associated with the resource. The user identity dictionary key
	// references will be ARM resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities map[string]UserIdentityProperties_STATUS `json:"userAssignedIdentities,omitempty"`
}

type ScheduledQueryRule_Kind_STATUS string

const (
	ScheduledQueryRule_Kind_STATUS_EventLogAlert = ScheduledQueryRule_Kind_STATUS("EventLogAlert")
	ScheduledQueryRule_Kind_STATUS_LogAlert      = ScheduledQueryRule_Kind_STATUS("LogAlert")
	ScheduledQueryRule_Kind_STATUS_LogToMetric   = ScheduledQueryRule_Kind_STATUS("LogToMetric")
)

// Mapping from string to ScheduledQueryRule_Kind_STATUS
var scheduledQueryRule_Kind_STATUS_Values = map[string]ScheduledQueryRule_Kind_STATUS{
	"eventlogalert": ScheduledQueryRule_Kind_STATUS_EventLogAlert,
	"logalert":      ScheduledQueryRule_Kind_STATUS_LogAlert,
	"logtometric":   ScheduledQueryRule_Kind_STATUS_LogToMetric,
}

// scheduled query rule Definition
type ScheduledQueryRuleProperties_STATUS struct {
	// Actions: Actions to invoke when the alert fires.
	Actions *Actions_STATUS `json:"actions,omitempty"`

	// AutoMitigate: The flag that indicates whether the alert should be automatically resolved or not. The default is true.
	// Relevant only for rules of the kind LogAlert.
	AutoMitigate *bool `json:"autoMitigate,omitempty"`

	// CheckWorkspaceAlertsStorageConfigured: The flag which indicates whether this scheduled query rule should be stored in
	// the customer's storage. The default is false. Relevant only for rules of the kind LogAlert.
	CheckWorkspaceAlertsStorageConfigured *bool `json:"checkWorkspaceAlertsStorageConfigured,omitempty"`

	// CreatedWithApiVersion: The api-version used when creating this alert rule
	CreatedWithApiVersion *string `json:"createdWithApiVersion,omitempty"`

	// Criteria: The rule criteria that defines the conditions of the scheduled query rule.
	Criteria *ScheduledQueryRuleCriteria_STATUS `json:"criteria,omitempty"`

	// Description: The description of the scheduled query rule.
	Description *string `json:"description,omitempty"`

	// DisplayName: The display name of the alert rule
	DisplayName *string `json:"displayName,omitempty"`

	// Enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false
	Enabled *bool `json:"enabled,omitempty"`

	// EvaluationFrequency: How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant
	// and required only for rules of the kind LogAlert.
	EvaluationFrequency *string `json:"evaluationFrequency,omitempty"`

	// IsLegacyLogAnalyticsRule: True if alert rule is legacy Log Analytic rule
	IsLegacyLogAnalyticsRule *bool `json:"isLegacyLogAnalyticsRule,omitempty"`

	// IsWorkspaceAlertsStorageConfigured: The flag which indicates whether this scheduled query rule has been configured to be
	// stored in the customer's storage. The default is false.
	IsWorkspaceAlertsStorageConfigured *bool `json:"isWorkspaceAlertsStorageConfigured,omitempty"`

	// MuteActionsDuration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired.
	// Relevant only for rules of the kind LogAlert.
	MuteActionsDuration *string `json:"muteActionsDuration,omitempty"`

	// OverrideQueryTimeRange: If specified then overrides the query time range (default is
	// WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
	OverrideQueryTimeRange *string `json:"overrideQueryTimeRange,omitempty"`

	// ResolveConfiguration: Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert.
	ResolveConfiguration *RuleResolveConfiguration_STATUS `json:"resolveConfiguration,omitempty"`

	// Scopes: The list of resource id's that this scheduled query rule is scoped to.
	Scopes []string `json:"scopes,omitempty"`

	// Severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only
	// for rules of the kind LogAlert.
	Severity *ScheduledQueryRuleProperties_Severity_STATUS `json:"severity,omitempty"`

	// SkipQueryValidation: The flag which indicates whether the provided query should be validated or not. The default is
	// false. Relevant only for rules of the kind LogAlert.
	SkipQueryValidation *bool `json:"skipQueryValidation,omitempty"`

	// TargetResourceTypes: List of resource type of the target resource(s) on which the alert is created/updated. For example
	// if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert
	// will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of
	// the kind LogAlert
	TargetResourceTypes []string `json:"targetResourceTypes,omitempty"`

	// WindowSize: The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size).
	// Relevant and required only for rules of the kind LogAlert.
	WindowSize *string `json:"windowSize,omitempty"`
}

// Metadata pertaining to creation and last modification of the resource.
type SystemData_STATUS struct {
	// CreatedAt: The timestamp of resource creation (UTC).
	CreatedAt *string `json:"createdAt,omitempty"`

	// CreatedBy: The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// CreatedByType: The type of identity that created the resource.
	CreatedByType *SystemData_CreatedByType_STATUS `json:"createdByType,omitempty"`

	// LastModifiedAt: The timestamp of resource last modification (UTC)
	LastModifiedAt *string `json:"lastModifiedAt,omitempty"`

	// LastModifiedBy: The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// LastModifiedByType: The type of identity that last modified the resource.
	LastModifiedByType *SystemData_LastModifiedByType_STATUS `json:"lastModifiedByType,omitempty"`
}

// Actions to invoke when the alert fires.
type Actions_STATUS struct {
	// ActionGroups: Action Group resource Ids to invoke when the alert fires.
	ActionGroups []string `json:"actionGroups,omitempty"`

	// ActionProperties: The properties of an action properties.
	ActionProperties map[string]string `json:"actionProperties,omitempty"`

	// CustomProperties: The properties of an alert payload.
	CustomProperties map[string]string `json:"customProperties,omitempty"`
}

type Identity_Type_STATUS string

const (
	Identity_Type_STATUS_None           = Identity_Type_STATUS("None")
	Identity_Type_STATUS_SystemAssigned = Identity_Type_STATUS("SystemAssigned")
	Identity_Type_STATUS_UserAssigned   = Identity_Type_STATUS("UserAssigned")
)

// Mapping from string to Identity_Type_STATUS
var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{
	"none":           Identity_Type_STATUS_None,
	"systemassigned": Identity_Type_STATUS_SystemAssigned,
	"userassigned":   Identity_Type_STATUS_UserAssigned,
}

// TBD. Relevant only for rules of the kind LogAlert.
type RuleResolveConfiguration_STATUS struct {
	// AutoResolved: The flag that indicates whether or not to auto resolve a fired alert.
	AutoResolved *bool `json:"autoResolved,omitempty"`

	// TimeToResolve: The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented
	// in ISO 8601 duration format.
	TimeToResolve *string `json:"timeToResolve,omitempty"`
}

// The rule criteria that defines the conditions of the scheduled query rule.
type ScheduledQueryRuleCriteria_STATUS struct {
	// AllOf: A list of conditions to evaluate against the specified scopes
	AllOf []Condition_STATUS `json:"allOf,omitempty"`
}

type ScheduledQueryRuleProperties_Severity_STATUS int

const (
	ScheduledQueryRuleProperties_Severity_STATUS_0 = ScheduledQueryRuleProperties_Severity_STATUS(0)
	ScheduledQueryRuleProperties_Severity_STATUS_1 = ScheduledQueryRuleProperties_Severity_STATUS(1)
	ScheduledQueryRuleProperties_Severity_STATUS_2 = ScheduledQueryRuleProperties_Severity_STATUS(2)
	ScheduledQueryRuleProperties_Severity_STATUS_3 = ScheduledQueryRuleProperties_Severity_STATUS(3)
	ScheduledQueryRuleProperties_Severity_STATUS_4 = ScheduledQueryRuleProperties_Severity_STATUS(4)
)

type SystemData_CreatedByType_STATUS string

const (
	SystemData_CreatedByType_STATUS_Application     = SystemData_CreatedByType_STATUS("Application")
	SystemData_CreatedByType_STATUS_Key             = SystemData_CreatedByType_STATUS("Key")
	SystemData_CreatedByType_STATUS_ManagedIdentity = SystemData_CreatedByType_STATUS("ManagedIdentity")
	SystemData_CreatedByType_STATUS_User            = SystemData_CreatedByType_STATUS("User")
)

// Mapping from string to SystemData_CreatedByType_STATUS
var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{
	"application":     SystemData_CreatedByType_STATUS_Application,
	"key":             SystemData_CreatedByType_STATUS_Key,
	"managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity,
	"user":            SystemData_CreatedByType_STATUS_User,
}

type SystemData_LastModifiedByType_STATUS string

const (
	SystemData_LastModifiedByType_STATUS_Application     = SystemData_LastModifiedByType_STATUS("Application")
	SystemData_LastModifiedByType_STATUS_Key             = SystemData_LastModifiedByType_STATUS("Key")
	SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity")
	SystemData_LastModifiedByType_STATUS_User            = SystemData_LastModifiedByType_STATUS("User")
)

// Mapping from string to SystemData_LastModifiedByType_STATUS
var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{
	"application":     SystemData_LastModifiedByType_STATUS_Application,
	"key":             SystemData_LastModifiedByType_STATUS_Key,
	"managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity,
	"user":            SystemData_LastModifiedByType_STATUS_User,
}

// User assigned identity properties.
type UserIdentityProperties_STATUS struct {
	// ClientId: The client id of user assigned identity.
	ClientId *string `json:"clientId,omitempty"`

	// PrincipalId: The principal id of user assigned identity.
	PrincipalId *string `json:"principalId,omitempty"`
}

// A condition of the scheduled query rule.
type Condition_STATUS struct {
	// AlertSensitivity: The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'.
	// This will affect how tight the threshold is to the metric series pattern. Relevant and required only for dynamic
	// threshold rules of the kind LogAlert.
	AlertSensitivity *string `json:"alertSensitivity,omitempty"`

	// CriterionType: Specifies the type of threshold criteria
	CriterionType *Condition_CriterionType_STATUS `json:"criterionType,omitempty"`

	// Dimensions: List of Dimensions conditions
	Dimensions []Dimension_STATUS `json:"dimensions,omitempty"`

	// FailingPeriods: The minimum number of violations required within the selected lookback time window required to raise an
	// alert. Relevant only for rules of the kind LogAlert.
	FailingPeriods *Condition_FailingPeriods_STATUS `json:"failingPeriods,omitempty"`

	// IgnoreDataBefore: Use this option to set the date from which to start learning the metric historical data and calculate
	// the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
	IgnoreDataBefore *string `json:"ignoreDataBefore,omitempty"`

	// MetricMeasureColumn: The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
	MetricMeasureColumn *string `json:"metricMeasureColumn,omitempty"`

	// MetricName: The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
	MetricName *string `json:"metricName,omitempty"`

	// Operator: The criteria operator. Relevant and required only for rules of the kind LogAlert.
	Operator *Condition_Operator_STATUS `json:"operator,omitempty"`

	// Query: Log query alert
	Query *string `json:"query,omitempty"`

	// ResourceIdColumn: The column containing the resource id. The content of the column must be a uri formatted as resource
	// id. Relevant only for rules of the kind LogAlert.
	ResourceIdColumn *string `json:"resourceIdColumn,omitempty"`

	// Threshold: the criteria threshold value that activates the alert. Relevant and required only for static threshold rules
	// of the kind LogAlert.
	Threshold *float64 `json:"threshold,omitempty"`

	// TimeAggregation: Aggregation type. Relevant and required only for rules of the kind LogAlert.
	TimeAggregation *Condition_TimeAggregation_STATUS `json:"timeAggregation,omitempty"`
}

type Condition_CriterionType_STATUS string

const (
	Condition_CriterionType_STATUS_DynamicThresholdCriterion = Condition_CriterionType_STATUS("DynamicThresholdCriterion")
	Condition_CriterionType_STATUS_StaticThresholdCriterion  = Condition_CriterionType_STATUS("StaticThresholdCriterion")
)

// Mapping from string to Condition_CriterionType_STATUS
var condition_CriterionType_STATUS_Values = map[string]Condition_CriterionType_STATUS{
	"dynamicthresholdcriterion": Condition_CriterionType_STATUS_DynamicThresholdCriterion,
	"staticthresholdcriterion":  Condition_CriterionType_STATUS_StaticThresholdCriterion,
}

type Condition_FailingPeriods_STATUS struct {
	// MinFailingPeriodsToAlert: The number of violations to trigger an alert. Should be smaller or equal to
	// numberOfEvaluationPeriods. Default value is 1
	MinFailingPeriodsToAlert *int `json:"minFailingPeriodsToAlert,omitempty"`

	// NumberOfEvaluationPeriods: The number of aggregated lookback points. The lookback time window is calculated based on the
	// aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
	NumberOfEvaluationPeriods *int `json:"numberOfEvaluationPeriods,omitempty"`
}

type Condition_Operator_STATUS string

const (
	Condition_Operator_STATUS_Equals             = Condition_Operator_STATUS("Equals")
	Condition_Operator_STATUS_GreaterOrLessThan  = Condition_Operator_STATUS("GreaterOrLessThan")
	Condition_Operator_STATUS_GreaterThan        = Condition_Operator_STATUS("GreaterThan")
	Condition_Operator_STATUS_GreaterThanOrEqual = Condition_Operator_STATUS("GreaterThanOrEqual")
	Condition_Operator_STATUS_LessThan           = Condition_Operator_STATUS("LessThan")
	Condition_Operator_STATUS_LessThanOrEqual    = Condition_Operator_STATUS("LessThanOrEqual")
)

// Mapping from string to Condition_Operator_STATUS
var condition_Operator_STATUS_Values = map[string]Condition_Operator_STATUS{
	"equals":             Condition_Operator_STATUS_Equals,
	"greaterorlessthan":  Condition_Operator_STATUS_GreaterOrLessThan,
	"greaterthan":        Condition_Operator_STATUS_GreaterThan,
	"greaterthanorequal": Condition_Operator_STATUS_GreaterThanOrEqual,
	"lessthan":           Condition_Operator_STATUS_LessThan,
	"lessthanorequal":    Condition_Operator_STATUS_LessThanOrEqual,
}

type Condition_TimeAggregation_STATUS string

const (
	Condition_TimeAggregation_STATUS_Average = Condition_TimeAggregation_STATUS("Average")
	Condition_TimeAggregation_STATUS_Count   = Condition_TimeAggregation_STATUS("Count")
	Condition_TimeAggregation_STATUS_Maximum = Condition_TimeAggregation_STATUS("Maximum")
	Condition_TimeAggregation_STATUS_Minimum = Condition_TimeAggregation_STATUS("Minimum")
	Condition_TimeAggregation_STATUS_Total   = Condition_TimeAggregation_STATUS("Total")
)

// Mapping from string to Condition_TimeAggregation_STATUS
var condition_TimeAggregation_STATUS_Values = map[string]Condition_TimeAggregation_STATUS{
	"average": Condition_TimeAggregation_STATUS_Average,
	"count":   Condition_TimeAggregation_STATUS_Count,
	"maximum": Condition_TimeAggregation_STATUS_Maximum,
	"minimum": Condition_TimeAggregation_STATUS_Minimum,
	"total":   Condition_TimeAggregation_STATUS_Total,
}

// Dimension splitting and filtering definition
type Dimension_STATUS struct {
	// Name: Name of the dimension
	Name *string `json:"name,omitempty"`

	// Operator: Operator for dimension values
	Operator *Dimension_Operator_STATUS `json:"operator,omitempty"`

	// Values: List of dimension values
	Values []string `json:"values,omitempty"`
}

type Dimension_Operator_STATUS string

const (
	Dimension_Operator_STATUS_Exclude = Dimension_Operator_STATUS("Exclude")
	Dimension_Operator_STATUS_Include = Dimension_Operator_STATUS("Include")
)

// Mapping from string to Dimension_Operator_STATUS
var dimension_Operator_STATUS_Values = map[string]Dimension_Operator_STATUS{
	"exclude": Dimension_Operator_STATUS_Exclude,
	"include": Dimension_Operator_STATUS_Include,
}
