// 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 FirewallPolicy_Spec struct {
	// Identity: The identity of the firewall policy.
	Identity *ManagedServiceIdentity `json:"identity,omitempty"`

	// Location: Resource location.
	Location *string `json:"location,omitempty"`
	Name     string  `json:"name,omitempty"`

	// Properties: Properties of the firewall policy.
	Properties *FirewallPolicyPropertiesFormat `json:"properties,omitempty"`

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

var _ genruntime.ARMResourceSpec = &FirewallPolicy_Spec{}

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Network/firewallPolicies"
func (policy *FirewallPolicy_Spec) GetType() string {
	return "Microsoft.Network/firewallPolicies"
}

// Firewall Policy definition.
type FirewallPolicyPropertiesFormat struct {
	// BasePolicy: The parent firewall policy from which rules are inherited.
	BasePolicy *SubResource `json:"basePolicy,omitempty"`

	// DnsSettings: DNS Proxy Settings definition.
	DnsSettings *DnsSettings `json:"dnsSettings,omitempty"`

	// ExplicitProxy: Explicit Proxy Settings definition.
	ExplicitProxy *ExplicitProxy `json:"explicitProxy,omitempty"`

	// Insights: Insights on Firewall Policy.
	Insights *FirewallPolicyInsights `json:"insights,omitempty"`

	// IntrusionDetection: The configuration for Intrusion detection.
	IntrusionDetection *FirewallPolicyIntrusionDetection `json:"intrusionDetection,omitempty"`

	// Sku: The Firewall Policy SKU.
	Sku *FirewallPolicySku `json:"sku,omitempty"`

	// Snat: The private IP addresses/IP ranges to which traffic will not be SNAT.
	Snat *FirewallPolicySNAT `json:"snat,omitempty"`

	// Sql: SQL Settings definition.
	Sql *FirewallPolicySQL `json:"sql,omitempty"`

	// ThreatIntelMode: The operation mode for Threat Intelligence.
	ThreatIntelMode *AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`

	// ThreatIntelWhitelist: ThreatIntel Whitelist for Firewall Policy.
	ThreatIntelWhitelist *FirewallPolicyThreatIntelWhitelist `json:"threatIntelWhitelist,omitempty"`

	// TransportSecurity: TLS Configuration definition.
	TransportSecurity *FirewallPolicyTransportSecurity `json:"transportSecurity,omitempty"`
}

// Identity for the resource.
type ManagedServiceIdentity struct {
	// Type: The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly
	// created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual
	// machine.
	Type                   *ManagedServiceIdentity_Type           `json:"type,omitempty"`
	UserAssignedIdentities map[string]UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

// DNS Proxy Settings in Firewall Policy.
type DnsSettings struct {
	// EnableProxy: Enable DNS Proxy on Firewalls attached to the Firewall Policy.
	EnableProxy *bool `json:"enableProxy,omitempty"`

	// RequireProxyForNetworkRules: FQDNs in Network Rules are supported when set to true.
	RequireProxyForNetworkRules *bool `json:"requireProxyForNetworkRules,omitempty"`

	// Servers: List of Custom DNS Servers.
	Servers []string `json:"servers,omitempty"`
}

// Explicit Proxy Settings in Firewall Policy.
type ExplicitProxy struct {
	// EnableExplicitProxy: When set to true, explicit proxy mode is enabled.
	EnableExplicitProxy *bool `json:"enableExplicitProxy,omitempty"`

	// EnablePacFile: When set to true, pac file port and url needs to be provided.
	EnablePacFile *bool `json:"enablePacFile,omitempty"`

	// HttpPort: Port number for explicit proxy http protocol, cannot be greater than 64000.
	HttpPort *int `json:"httpPort,omitempty"`

	// HttpsPort: Port number for explicit proxy https protocol, cannot be greater than 64000.
	HttpsPort *int `json:"httpsPort,omitempty"`

	// PacFile: SAS URL for PAC file.
	PacFile *string `json:"pacFile,omitempty"`

	// PacFilePort: Port number for firewall to serve PAC file.
	PacFilePort *int `json:"pacFilePort,omitempty"`
}

// Firewall Policy Insights.
type FirewallPolicyInsights struct {
	// IsEnabled: A flag to indicate if the insights are enabled on the policy.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// LogAnalyticsResources: Workspaces needed to configure the Firewall Policy Insights.
	LogAnalyticsResources *FirewallPolicyLogAnalyticsResources `json:"logAnalyticsResources,omitempty"`

	// RetentionDays: Number of days the insights should be enabled on the policy.
	RetentionDays *int `json:"retentionDays,omitempty"`
}

// Configuration for intrusion detection mode and rules.
type FirewallPolicyIntrusionDetection struct {
	// Configuration: Intrusion detection configuration properties.
	Configuration *FirewallPolicyIntrusionDetectionConfiguration `json:"configuration,omitempty"`

	// Mode: Intrusion detection general state. When attached to a parent policy, the firewall's effective IDPS mode is the
	// stricter mode of the two.
	Mode *FirewallPolicyIntrusionDetectionStateOptions `json:"mode,omitempty"`

	// Profile: IDPS profile name. When attached to a parent policy, the firewall's effective profile is the profile name of
	// the parent policy.
	Profile *FirewallPolicyIntrusionDetectionProfileOptions `json:"profile,omitempty"`
}

// SKU of Firewall policy.
type FirewallPolicySku struct {
	// Tier: Tier of Firewall Policy.
	Tier *FirewallPolicySku_Tier `json:"tier,omitempty"`
}

// The private IP addresses/IP ranges to which traffic will not be SNAT.
type FirewallPolicySNAT struct {
	// AutoLearnPrivateRanges: The operation mode for automatically learning private ranges to not be SNAT
	AutoLearnPrivateRanges *FirewallPolicySNAT_AutoLearnPrivateRanges `json:"autoLearnPrivateRanges,omitempty"`

	// PrivateRanges: List of private IP addresses/IP address ranges to not be SNAT.
	PrivateRanges []string `json:"privateRanges,omitempty"`
}

// SQL Settings in Firewall Policy.
type FirewallPolicySQL struct {
	// AllowSqlRedirect: A flag to indicate if SQL Redirect traffic filtering is enabled. Turning on the flag requires no rule
	// using port 11000-11999.
	AllowSqlRedirect *bool `json:"allowSqlRedirect,omitempty"`
}

// ThreatIntel Whitelist for Firewall Policy.
type FirewallPolicyThreatIntelWhitelist struct {
	// Fqdns: List of FQDNs for the ThreatIntel Whitelist.
	Fqdns []string `json:"fqdns,omitempty"`

	// IpAddresses: List of IP addresses for the ThreatIntel Whitelist.
	IpAddresses []string `json:"ipAddresses,omitempty"`
}

// Configuration needed to perform TLS termination & initiation.
type FirewallPolicyTransportSecurity struct {
	// CertificateAuthority: The CA used for intermediate CA generation.
	CertificateAuthority *FirewallPolicyCertificateAuthority `json:"certificateAuthority,omitempty"`
}

// +kubebuilder:validation:Enum={"None","SystemAssigned","SystemAssigned, UserAssigned","UserAssigned"}
type ManagedServiceIdentity_Type string

const (
	ManagedServiceIdentity_Type_None                       = ManagedServiceIdentity_Type("None")
	ManagedServiceIdentity_Type_SystemAssigned             = ManagedServiceIdentity_Type("SystemAssigned")
	ManagedServiceIdentity_Type_SystemAssignedUserAssigned = ManagedServiceIdentity_Type("SystemAssigned, UserAssigned")
	ManagedServiceIdentity_Type_UserAssigned               = ManagedServiceIdentity_Type("UserAssigned")
)

// Mapping from string to ManagedServiceIdentity_Type
var managedServiceIdentity_Type_Values = map[string]ManagedServiceIdentity_Type{
	"none":                         ManagedServiceIdentity_Type_None,
	"systemassigned":               ManagedServiceIdentity_Type_SystemAssigned,
	"systemassigned, userassigned": ManagedServiceIdentity_Type_SystemAssignedUserAssigned,
	"userassigned":                 ManagedServiceIdentity_Type_UserAssigned,
}

// Information about the user assigned identity for the resource
type UserAssignedIdentityDetails struct {
}

// Trusted Root certificates properties for tls.
type FirewallPolicyCertificateAuthority struct {
	// KeyVaultSecretId: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
	KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"`

	// Name: Name of the CA certificate.
	Name *string `json:"name,omitempty"`
}

// The operation for configuring intrusion detection.
type FirewallPolicyIntrusionDetectionConfiguration struct {
	// BypassTrafficSettings: List of rules for traffic to bypass.
	BypassTrafficSettings []FirewallPolicyIntrusionDetectionBypassTrafficSpecifications `json:"bypassTrafficSettings,omitempty"`

	// PrivateRanges: IDPS Private IP address ranges are used to identify traffic direction (i.e. inbound, outbound, etc.). By
	// default, only ranges defined by IANA RFC 1918 are considered private IP addresses. To modify default ranges, specify
	// your Private IP address ranges with this property
	PrivateRanges []string `json:"privateRanges,omitempty"`

	// SignatureOverrides: List of specific signatures states.
	SignatureOverrides []FirewallPolicyIntrusionDetectionSignatureSpecification `json:"signatureOverrides,omitempty"`
}

// Possible Intrusion Detection profile values.
// +kubebuilder:validation:Enum={"Advanced","Basic","Extended","Standard"}
type FirewallPolicyIntrusionDetectionProfileOptions string

const (
	FirewallPolicyIntrusionDetectionProfileOptions_Advanced = FirewallPolicyIntrusionDetectionProfileOptions("Advanced")
	FirewallPolicyIntrusionDetectionProfileOptions_Basic    = FirewallPolicyIntrusionDetectionProfileOptions("Basic")
	FirewallPolicyIntrusionDetectionProfileOptions_Extended = FirewallPolicyIntrusionDetectionProfileOptions("Extended")
	FirewallPolicyIntrusionDetectionProfileOptions_Standard = FirewallPolicyIntrusionDetectionProfileOptions("Standard")
)

// Mapping from string to FirewallPolicyIntrusionDetectionProfileOptions
var firewallPolicyIntrusionDetectionProfileOptions_Values = map[string]FirewallPolicyIntrusionDetectionProfileOptions{
	"advanced": FirewallPolicyIntrusionDetectionProfileOptions_Advanced,
	"basic":    FirewallPolicyIntrusionDetectionProfileOptions_Basic,
	"extended": FirewallPolicyIntrusionDetectionProfileOptions_Extended,
	"standard": FirewallPolicyIntrusionDetectionProfileOptions_Standard,
}

// Possible state values.
// +kubebuilder:validation:Enum={"Alert","Deny","Off"}
type FirewallPolicyIntrusionDetectionStateOptions string

const (
	FirewallPolicyIntrusionDetectionStateOptions_Alert = FirewallPolicyIntrusionDetectionStateOptions("Alert")
	FirewallPolicyIntrusionDetectionStateOptions_Deny  = FirewallPolicyIntrusionDetectionStateOptions("Deny")
	FirewallPolicyIntrusionDetectionStateOptions_Off   = FirewallPolicyIntrusionDetectionStateOptions("Off")
)

// Mapping from string to FirewallPolicyIntrusionDetectionStateOptions
var firewallPolicyIntrusionDetectionStateOptions_Values = map[string]FirewallPolicyIntrusionDetectionStateOptions{
	"alert": FirewallPolicyIntrusionDetectionStateOptions_Alert,
	"deny":  FirewallPolicyIntrusionDetectionStateOptions_Deny,
	"off":   FirewallPolicyIntrusionDetectionStateOptions_Off,
}

// Log Analytics Resources for Firewall Policy Insights.
type FirewallPolicyLogAnalyticsResources struct {
	// DefaultWorkspaceId: The default workspace Id for Firewall Policy Insights.
	DefaultWorkspaceId *SubResource `json:"defaultWorkspaceId,omitempty"`

	// Workspaces: List of workspaces for Firewall Policy Insights.
	Workspaces []FirewallPolicyLogAnalyticsWorkspace `json:"workspaces,omitempty"`
}

// +kubebuilder:validation:Enum={"Basic","Premium","Standard"}
type FirewallPolicySku_Tier string

const (
	FirewallPolicySku_Tier_Basic    = FirewallPolicySku_Tier("Basic")
	FirewallPolicySku_Tier_Premium  = FirewallPolicySku_Tier("Premium")
	FirewallPolicySku_Tier_Standard = FirewallPolicySku_Tier("Standard")
)

// Mapping from string to FirewallPolicySku_Tier
var firewallPolicySku_Tier_Values = map[string]FirewallPolicySku_Tier{
	"basic":    FirewallPolicySku_Tier_Basic,
	"premium":  FirewallPolicySku_Tier_Premium,
	"standard": FirewallPolicySku_Tier_Standard,
}

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

const (
	FirewallPolicySNAT_AutoLearnPrivateRanges_Disabled = FirewallPolicySNAT_AutoLearnPrivateRanges("Disabled")
	FirewallPolicySNAT_AutoLearnPrivateRanges_Enabled  = FirewallPolicySNAT_AutoLearnPrivateRanges("Enabled")
)

// Mapping from string to FirewallPolicySNAT_AutoLearnPrivateRanges
var firewallPolicySNAT_AutoLearnPrivateRanges_Values = map[string]FirewallPolicySNAT_AutoLearnPrivateRanges{
	"disabled": FirewallPolicySNAT_AutoLearnPrivateRanges_Disabled,
	"enabled":  FirewallPolicySNAT_AutoLearnPrivateRanges_Enabled,
}

// Intrusion detection bypass traffic specification.
type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications struct {
	// Description: Description of the bypass traffic rule.
	Description *string `json:"description,omitempty"`

	// DestinationAddresses: List of destination IP addresses or ranges for this rule.
	DestinationAddresses []string `json:"destinationAddresses,omitempty"`

	// DestinationIpGroups: List of destination IpGroups for this rule.
	DestinationIpGroups []string `json:"destinationIpGroups,omitempty"`

	// DestinationPorts: List of destination ports or ranges.
	DestinationPorts []string `json:"destinationPorts,omitempty"`

	// Name: Name of the bypass traffic rule.
	Name *string `json:"name,omitempty"`

	// Protocol: The rule bypass protocol.
	Protocol *FirewallPolicyIntrusionDetectionBypassTrafficProtocol `json:"protocol,omitempty"`

	// SourceAddresses: List of source IP addresses or ranges for this rule.
	SourceAddresses []string `json:"sourceAddresses,omitempty"`

	// SourceIpGroups: List of source IpGroups for this rule.
	SourceIpGroups []string `json:"sourceIpGroups,omitempty"`
}

// Intrusion detection signatures specification states.
type FirewallPolicyIntrusionDetectionSignatureSpecification struct {
	// Id: Signature id.
	Id *string `json:"id,omitempty"`

	// Mode: The signature state.
	Mode *FirewallPolicyIntrusionDetectionStateOptions `json:"mode,omitempty"`
}

// Log Analytics Workspace for Firewall Policy Insights.
type FirewallPolicyLogAnalyticsWorkspace struct {
	// Region: Region to configure the Workspace.
	Region *string `json:"region,omitempty"`

	// WorkspaceId: The workspace Id for Firewall Policy Insights.
	WorkspaceId *SubResource `json:"workspaceId,omitempty"`
}

// Possible intrusion detection bypass traffic protocols.
// +kubebuilder:validation:Enum={"ANY","ICMP","TCP","UDP"}
type FirewallPolicyIntrusionDetectionBypassTrafficProtocol string

const (
	FirewallPolicyIntrusionDetectionBypassTrafficProtocol_ANY  = FirewallPolicyIntrusionDetectionBypassTrafficProtocol("ANY")
	FirewallPolicyIntrusionDetectionBypassTrafficProtocol_ICMP = FirewallPolicyIntrusionDetectionBypassTrafficProtocol("ICMP")
	FirewallPolicyIntrusionDetectionBypassTrafficProtocol_TCP  = FirewallPolicyIntrusionDetectionBypassTrafficProtocol("TCP")
	FirewallPolicyIntrusionDetectionBypassTrafficProtocol_UDP  = FirewallPolicyIntrusionDetectionBypassTrafficProtocol("UDP")
)

// Mapping from string to FirewallPolicyIntrusionDetectionBypassTrafficProtocol
var firewallPolicyIntrusionDetectionBypassTrafficProtocol_Values = map[string]FirewallPolicyIntrusionDetectionBypassTrafficProtocol{
	"any":  FirewallPolicyIntrusionDetectionBypassTrafficProtocol_ANY,
	"icmp": FirewallPolicyIntrusionDetectionBypassTrafficProtocol_ICMP,
	"tcp":  FirewallPolicyIntrusionDetectionBypassTrafficProtocol_TCP,
	"udp":  FirewallPolicyIntrusionDetectionBypassTrafficProtocol_UDP,
}
