// 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 NetworkWatchersFlowLog_Spec struct {
	// Identity: FlowLog resource Managed Identity
	Identity *ManagedServiceIdentity `json:"identity,omitempty"`

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

	// Properties: Properties of the flow log.
	Properties *FlowLogPropertiesFormat `json:"properties,omitempty"`

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

var _ genruntime.ARMResourceSpec = &NetworkWatchersFlowLog_Spec{}

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Network/networkWatchers/flowLogs"
func (flowLog *NetworkWatchersFlowLog_Spec) GetType() string {
	return "Microsoft.Network/networkWatchers/flowLogs"
}

// Parameters that define the configuration of flow log.
type FlowLogPropertiesFormat struct {
	// Enabled: Flag to enable/disable flow logging.
	Enabled *bool `json:"enabled,omitempty"`

	// EnabledFilteringCriteria: Optional field to filter network traffic logs based on SrcIP, SrcPort, DstIP, DstPort,
	// Protocol, Encryption, Direction and Action. If not specified, all network traffic will be logged.
	EnabledFilteringCriteria *string `json:"enabledFilteringCriteria,omitempty"`

	// FlowAnalyticsConfiguration: Parameters that define the configuration of traffic analytics.
	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`

	// Format: Parameters that define the flow log format.
	Format *FlowLogFormatParameters `json:"format,omitempty"`

	// RetentionPolicy: Parameters that define the retention policy for flow log.
	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`

	// StorageId: ID of the storage account which is used to store the flow log.
	StorageId *string `json:"storageId,omitempty"`

	// TargetResourceId: ID of network security group to which flow log will be applied.
	TargetResourceId *string `json:"targetResourceId,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"`
}

// Parameters that define the flow log format.
type FlowLogFormatParameters struct {
	// Type: The file type of flow log.
	Type *FlowLogFormatParameters_Type `json:"type,omitempty"`

	// Version: The version (revision) of the flow log.
	Version *int `json:"version,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,
}

// Parameters that define the retention policy for flow log.
type RetentionPolicyParameters struct {
	// Days: Number of days to retain flow log records.
	Days *int `json:"days,omitempty"`

	// Enabled: Flag to enable/disable retention.
	Enabled *bool `json:"enabled,omitempty"`
}

// Parameters that define the configuration of traffic analytics.
type TrafficAnalyticsProperties struct {
	// NetworkWatcherFlowAnalyticsConfiguration: Parameters that define the configuration of traffic analytics.
	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
}

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

// +kubebuilder:validation:Enum={"JSON"}
type FlowLogFormatParameters_Type string

const FlowLogFormatParameters_Type_JSON = FlowLogFormatParameters_Type("JSON")

// Mapping from string to FlowLogFormatParameters_Type
var flowLogFormatParameters_Type_Values = map[string]FlowLogFormatParameters_Type{
	"json": FlowLogFormatParameters_Type_JSON,
}

// Parameters that define the configuration of traffic analytics.
type TrafficAnalyticsConfigurationProperties struct {
	// Enabled: Flag to enable/disable traffic analytics.
	Enabled *bool `json:"enabled,omitempty"`

	// TrafficAnalyticsInterval: The interval in minutes which would decide how frequently TA service should do flow analytics.
	TrafficAnalyticsInterval *int `json:"trafficAnalyticsInterval,omitempty"`

	// WorkspaceRegion: The location of the attached workspace.
	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`

	// WorkspaceResourceId: Resource Id of the attached workspace.
	WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"`
}
