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

import (
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/core"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets"
	"github.com/rotisserie/eris"
	"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
)

// +kubebuilder:rbac:groups=insights.azure.com,resources=datacollectionrules,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=insights.azure.com,resources={datacollectionrules/status,datacollectionrules/finalizers},verbs=get;update;patch

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,insights}
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity"
// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason"
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message"
// Storage version of v1api20230311.DataCollectionRule
// Generator information:
// - Generated from: /monitor/resource-manager/Microsoft.Insights/stable/2023-03-11/dataCollectionRules_API.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}
type DataCollectionRule struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              DataCollectionRule_Spec           `json:"spec,omitempty"`
	Status            DataCollectionRuleResource_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &DataCollectionRule{}

// GetConditions returns the conditions of the resource
func (rule *DataCollectionRule) GetConditions() conditions.Conditions {
	return rule.Status.Conditions
}

// SetConditions sets the conditions on the resource status
func (rule *DataCollectionRule) SetConditions(conditions conditions.Conditions) {
	rule.Status.Conditions = conditions
}

var _ configmaps.Exporter = &DataCollectionRule{}

// ConfigMapDestinationExpressions returns the Spec.OperatorSpec.ConfigMapExpressions property
func (rule *DataCollectionRule) ConfigMapDestinationExpressions() []*core.DestinationExpression {
	if rule.Spec.OperatorSpec == nil {
		return nil
	}
	return rule.Spec.OperatorSpec.ConfigMapExpressions
}

var _ secrets.Exporter = &DataCollectionRule{}

// SecretDestinationExpressions returns the Spec.OperatorSpec.SecretExpressions property
func (rule *DataCollectionRule) SecretDestinationExpressions() []*core.DestinationExpression {
	if rule.Spec.OperatorSpec == nil {
		return nil
	}
	return rule.Spec.OperatorSpec.SecretExpressions
}

var _ genruntime.KubernetesResource = &DataCollectionRule{}

// AzureName returns the Azure name of the resource
func (rule *DataCollectionRule) AzureName() string {
	return rule.Spec.AzureName
}

// GetAPIVersion returns the ARM API version of the resource. This is always "2023-03-11"
func (rule DataCollectionRule) GetAPIVersion() string {
	return "2023-03-11"
}

// GetResourceScope returns the scope of the resource
func (rule *DataCollectionRule) GetResourceScope() genruntime.ResourceScope {
	return genruntime.ResourceScopeResourceGroup
}

// GetSpec returns the specification of this resource
func (rule *DataCollectionRule) GetSpec() genruntime.ConvertibleSpec {
	return &rule.Spec
}

// GetStatus returns the status of this resource
func (rule *DataCollectionRule) GetStatus() genruntime.ConvertibleStatus {
	return &rule.Status
}

// GetSupportedOperations returns the operations supported by the resource
func (rule *DataCollectionRule) GetSupportedOperations() []genruntime.ResourceOperation {
	return []genruntime.ResourceOperation{
		genruntime.ResourceOperationDelete,
		genruntime.ResourceOperationGet,
		genruntime.ResourceOperationPut,
	}
}

// GetType returns the ARM Type of the resource. This is always "Microsoft.Insights/dataCollectionRules"
func (rule *DataCollectionRule) GetType() string {
	return "Microsoft.Insights/dataCollectionRules"
}

// NewEmptyStatus returns a new empty (blank) status
func (rule *DataCollectionRule) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &DataCollectionRuleResource_STATUS{}
}

// Owner returns the ResourceReference of the owner
func (rule *DataCollectionRule) Owner() *genruntime.ResourceReference {
	if rule.Spec.Owner == nil {
		return nil
	}

	group, kind := genruntime.LookupOwnerGroupKind(rule.Spec)
	return rule.Spec.Owner.AsResourceReference(group, kind)
}

// SetStatus sets the status of this resource
func (rule *DataCollectionRule) SetStatus(status genruntime.ConvertibleStatus) error {
	// If we have exactly the right type of status, assign it
	if st, ok := status.(*DataCollectionRuleResource_STATUS); ok {
		rule.Status = *st
		return nil
	}

	// Convert status to required version
	var st DataCollectionRuleResource_STATUS
	err := status.ConvertStatusTo(&st)
	if err != nil {
		return eris.Wrap(err, "failed to convert status")
	}

	rule.Status = st
	return nil
}

// Hub marks that this DataCollectionRule is the hub type for conversion
func (rule *DataCollectionRule) Hub() {}

// OriginalGVK returns a GroupValueKind for the original API version used to create the resource
func (rule *DataCollectionRule) OriginalGVK() *schema.GroupVersionKind {
	return &schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: rule.Spec.OriginalVersion,
		Kind:    "DataCollectionRule",
	}
}

// +kubebuilder:object:root=true
// Storage version of v1api20230311.DataCollectionRule
// Generator information:
// - Generated from: /monitor/resource-manager/Microsoft.Insights/stable/2023-03-11/dataCollectionRules_API.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}
type DataCollectionRuleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DataCollectionRule `json:"items"`
}

// Storage version of v1api20230311.DataCollectionRule_Spec
type DataCollectionRule_Spec struct {
	AgentSettings *AgentSettingsSpec `json:"agentSettings,omitempty"`

	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName string `json:"azureName,omitempty"`

	// DataCollectionEndpointReference: The resource ID of the data collection endpoint that this rule can be used with.
	DataCollectionEndpointReference *genruntime.ResourceReference   `armReference:"DataCollectionEndpointId" json:"dataCollectionEndpointReference,omitempty"`
	DataFlows                       []DataFlow                      `json:"dataFlows,omitempty"`
	DataSources                     *DataSourcesSpec                `json:"dataSources,omitempty"`
	Description                     *string                         `json:"description,omitempty"`
	Destinations                    *DestinationsSpec               `json:"destinations,omitempty"`
	Identity                        *ManagedServiceIdentity         `json:"identity,omitempty"`
	Kind                            *string                         `json:"kind,omitempty"`
	Location                        *string                         `json:"location,omitempty"`
	OperatorSpec                    *DataCollectionRuleOperatorSpec `json:"operatorSpec,omitempty"`
	OriginalVersion                 string                          `json:"originalVersion,omitempty"`

	// +kubebuilder:validation:Required
	// Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also
	// controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a
	// reference to a resources.azure.com/ResourceGroup resource
	Owner              *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"`
	PropertyBag        genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	References         *ReferencesSpec                    `json:"references,omitempty"`
	StreamDeclarations map[string]StreamDeclaration       `json:"streamDeclarations,omitempty"`
	Tags               map[string]string                  `json:"tags,omitempty"`
}

var _ genruntime.ConvertibleSpec = &DataCollectionRule_Spec{}

// ConvertSpecFrom populates our DataCollectionRule_Spec from the provided source
func (rule *DataCollectionRule_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error {
	if source == rule {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return source.ConvertSpecTo(rule)
}

// ConvertSpecTo populates the provided destination from our DataCollectionRule_Spec
func (rule *DataCollectionRule_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error {
	if destination == rule {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return destination.ConvertSpecFrom(rule)
}

// Storage version of v1api20230311.DataCollectionRuleResource_STATUS
// Definition of ARM tracked top level resource.
type DataCollectionRuleResource_STATUS struct {
	AgentSettings            *AgentSettingsSpec_STATUS           `json:"agentSettings,omitempty"`
	Conditions               []conditions.Condition              `json:"conditions,omitempty"`
	DataCollectionEndpointId *string                             `json:"dataCollectionEndpointId,omitempty"`
	DataFlows                []DataFlow_STATUS                   `json:"dataFlows,omitempty"`
	DataSources              *DataSourcesSpec_STATUS             `json:"dataSources,omitempty"`
	Description              *string                             `json:"description,omitempty"`
	Destinations             *DestinationsSpec_STATUS            `json:"destinations,omitempty"`
	Endpoints                *EndpointsSpec_STATUS               `json:"endpoints,omitempty"`
	Etag                     *string                             `json:"etag,omitempty"`
	Id                       *string                             `json:"id,omitempty"`
	Identity                 *ManagedServiceIdentity_STATUS      `json:"identity,omitempty"`
	ImmutableId              *string                             `json:"immutableId,omitempty"`
	Kind                     *string                             `json:"kind,omitempty"`
	Location                 *string                             `json:"location,omitempty"`
	Metadata                 *Metadata_STATUS                    `json:"metadata,omitempty"`
	Name                     *string                             `json:"name,omitempty"`
	PropertyBag              genruntime.PropertyBag              `json:"$propertyBag,omitempty"`
	ProvisioningState        *string                             `json:"provisioningState,omitempty"`
	References               *ReferencesSpec_STATUS              `json:"references,omitempty"`
	StreamDeclarations       map[string]StreamDeclaration_STATUS `json:"streamDeclarations,omitempty"`
	SystemData               *SystemData_STATUS                  `json:"systemData,omitempty"`
	Tags                     map[string]string                   `json:"tags,omitempty"`
	Type                     *string                             `json:"type,omitempty"`
}

var _ genruntime.ConvertibleStatus = &DataCollectionRuleResource_STATUS{}

// ConvertStatusFrom populates our DataCollectionRuleResource_STATUS from the provided source
func (resource *DataCollectionRuleResource_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error {
	if source == resource {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return source.ConvertStatusTo(resource)
}

// ConvertStatusTo populates the provided destination from our DataCollectionRuleResource_STATUS
func (resource *DataCollectionRuleResource_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error {
	if destination == resource {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return destination.ConvertStatusFrom(resource)
}

// Storage version of v1api20230311.AgentSettingsSpec
// An agent setting
type AgentSettingsSpec struct {
	Logs        []AgentSetting         `json:"logs,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.AgentSettingsSpec_STATUS
// An agent setting
type AgentSettingsSpec_STATUS struct {
	Logs        []AgentSetting_STATUS  `json:"logs,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.DataCollectionRuleOperatorSpec
// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure
type DataCollectionRuleOperatorSpec struct {
	ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"`
	PropertyBag          genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	SecretExpressions    []*core.DestinationExpression `json:"secretExpressions,omitempty"`
}

// Storage version of v1api20230311.DataFlow
// Definition of which streams are sent to which destinations.
type DataFlow struct {
	BuiltInTransform *string                `json:"builtInTransform,omitempty"`
	CaptureOverflow  *bool                  `json:"captureOverflow,omitempty"`
	Destinations     []string               `json:"destinations,omitempty"`
	OutputStream     *string                `json:"outputStream,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams          []string               `json:"streams,omitempty"`
	TransformKql     *string                `json:"transformKql,omitempty"`
}

// Storage version of v1api20230311.DataFlow_STATUS
// Definition of which streams are sent to which destinations.
type DataFlow_STATUS struct {
	BuiltInTransform *string                `json:"builtInTransform,omitempty"`
	CaptureOverflow  *bool                  `json:"captureOverflow,omitempty"`
	Destinations     []string               `json:"destinations,omitempty"`
	OutputStream     *string                `json:"outputStream,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams          []string               `json:"streams,omitempty"`
	TransformKql     *string                `json:"transformKql,omitempty"`
}

// Storage version of v1api20230311.DataSourcesSpec
// Specification of data sources that will be collected.
type DataSourcesSpec struct {
	DataImports         *DataImportSources              `json:"dataImports,omitempty"`
	Extensions          []ExtensionDataSource           `json:"extensions,omitempty"`
	IisLogs             []IisLogsDataSource             `json:"iisLogs,omitempty"`
	LogFiles            []LogFilesDataSource            `json:"logFiles,omitempty"`
	PerformanceCounters []PerfCounterDataSource         `json:"performanceCounters,omitempty"`
	PlatformTelemetry   []PlatformTelemetryDataSource   `json:"platformTelemetry,omitempty"`
	PrometheusForwarder []PrometheusForwarderDataSource `json:"prometheusForwarder,omitempty"`
	PropertyBag         genruntime.PropertyBag          `json:"$propertyBag,omitempty"`
	Syslog              []SyslogDataSource              `json:"syslog,omitempty"`
	WindowsEventLogs    []WindowsEventLogDataSource     `json:"windowsEventLogs,omitempty"`
	WindowsFirewallLogs []WindowsFirewallLogsDataSource `json:"windowsFirewallLogs,omitempty"`
}

// Storage version of v1api20230311.DataSourcesSpec_STATUS
// Specification of data sources that will be collected.
type DataSourcesSpec_STATUS struct {
	DataImports         *DataImportSources_STATUS              `json:"dataImports,omitempty"`
	Extensions          []ExtensionDataSource_STATUS           `json:"extensions,omitempty"`
	IisLogs             []IisLogsDataSource_STATUS             `json:"iisLogs,omitempty"`
	LogFiles            []LogFilesDataSource_STATUS            `json:"logFiles,omitempty"`
	PerformanceCounters []PerfCounterDataSource_STATUS         `json:"performanceCounters,omitempty"`
	PlatformTelemetry   []PlatformTelemetryDataSource_STATUS   `json:"platformTelemetry,omitempty"`
	PrometheusForwarder []PrometheusForwarderDataSource_STATUS `json:"prometheusForwarder,omitempty"`
	PropertyBag         genruntime.PropertyBag                 `json:"$propertyBag,omitempty"`
	Syslog              []SyslogDataSource_STATUS              `json:"syslog,omitempty"`
	WindowsEventLogs    []WindowsEventLogDataSource_STATUS     `json:"windowsEventLogs,omitempty"`
	WindowsFirewallLogs []WindowsFirewallLogsDataSource_STATUS `json:"windowsFirewallLogs,omitempty"`
}

// Storage version of v1api20230311.DestinationsSpec
// Specification of destinations that can be used in data flows.
type DestinationsSpec struct {
	AzureDataExplorer   []AdxDestination                `json:"azureDataExplorer,omitempty"`
	AzureMonitorMetrics *AzureMonitorMetricsDestination `json:"azureMonitorMetrics,omitempty"`
	EventHubs           []EventHubDestination           `json:"eventHubs,omitempty"`
	EventHubsDirect     []EventHubDirectDestination     `json:"eventHubsDirect,omitempty"`
	LogAnalytics        []LogAnalyticsDestination       `json:"logAnalytics,omitempty"`
	MicrosoftFabric     []MicrosoftFabricDestination    `json:"microsoftFabric,omitempty"`
	MonitoringAccounts  []MonitoringAccountDestination  `json:"monitoringAccounts,omitempty"`
	PropertyBag         genruntime.PropertyBag          `json:"$propertyBag,omitempty"`
	StorageAccounts     []StorageBlobDestination        `json:"storageAccounts,omitempty"`
	StorageBlobsDirect  []StorageBlobDestination        `json:"storageBlobsDirect,omitempty"`
	StorageTablesDirect []StorageTableDestination       `json:"storageTablesDirect,omitempty"`
}

// Storage version of v1api20230311.DestinationsSpec_STATUS
// Specification of destinations that can be used in data flows.
type DestinationsSpec_STATUS struct {
	AzureDataExplorer   []AdxDestination_STATUS                `json:"azureDataExplorer,omitempty"`
	AzureMonitorMetrics *AzureMonitorMetricsDestination_STATUS `json:"azureMonitorMetrics,omitempty"`
	EventHubs           []EventHubDestination_STATUS           `json:"eventHubs,omitempty"`
	EventHubsDirect     []EventHubDirectDestination_STATUS     `json:"eventHubsDirect,omitempty"`
	LogAnalytics        []LogAnalyticsDestination_STATUS       `json:"logAnalytics,omitempty"`
	MicrosoftFabric     []MicrosoftFabricDestination_STATUS    `json:"microsoftFabric,omitempty"`
	MonitoringAccounts  []MonitoringAccountDestination_STATUS  `json:"monitoringAccounts,omitempty"`
	PropertyBag         genruntime.PropertyBag                 `json:"$propertyBag,omitempty"`
	StorageAccounts     []StorageBlobDestination_STATUS        `json:"storageAccounts,omitempty"`
	StorageBlobsDirect  []StorageBlobDestination_STATUS        `json:"storageBlobsDirect,omitempty"`
	StorageTablesDirect []StorageTableDestination_STATUS       `json:"storageTablesDirect,omitempty"`
}

// Storage version of v1api20230311.EndpointsSpec_STATUS
// This defines all the ingestion endpoints that can be used by this rule
type EndpointsSpec_STATUS struct {
	LogsIngestion    *string                `json:"logsIngestion,omitempty"`
	MetricsIngestion *string                `json:"metricsIngestion,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.ReferencesSpec
// This section defines all the references that may be used in other sections of the DCR
type ReferencesSpec struct {
	EnrichmentData *EnrichmentData        `json:"enrichmentData,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.ReferencesSpec_STATUS
// This section defines all the references that may be used in other sections of the DCR
type ReferencesSpec_STATUS struct {
	EnrichmentData *EnrichmentData_STATUS `json:"enrichmentData,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.StreamDeclaration
// Declaration of a custom stream.
type StreamDeclaration struct {
	Columns     []ColumnDefinition     `json:"columns,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.StreamDeclaration_STATUS
// Declaration of a custom stream.
type StreamDeclaration_STATUS struct {
	Columns     []ColumnDefinition_STATUS `json:"columns,omitempty"`
	PropertyBag genruntime.PropertyBag    `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.AdxDestination
// Azure Data Explorer (Adx) destination.
type AdxDestination struct {
	DatabaseName *string                `json:"databaseName,omitempty"`
	Name         *string                `json:"name,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// ResourceReference: The ARM resource id of the Adx resource.
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`
}

// Storage version of v1api20230311.AdxDestination_STATUS
// Azure Data Explorer (Adx) destination.
type AdxDestination_STATUS struct {
	DatabaseName *string                `json:"databaseName,omitempty"`
	IngestionUri *string                `json:"ingestionUri,omitempty"`
	Name         *string                `json:"name,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ResourceId   *string                `json:"resourceId,omitempty"`
}

// Storage version of v1api20230311.AgentSetting
// A setting used to control an agent behavior on a host machine
type AgentSetting struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Value       *string                `json:"value,omitempty"`
}

// Storage version of v1api20230311.AgentSetting_STATUS
// A setting used to control an agent behavior on a host machine
type AgentSetting_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Value       *string                `json:"value,omitempty"`
}

// Storage version of v1api20230311.AzureMonitorMetricsDestination
// Azure Monitor Metrics destination.
type AzureMonitorMetricsDestination struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.AzureMonitorMetricsDestination_STATUS
// Azure Monitor Metrics destination.
type AzureMonitorMetricsDestination_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.ColumnDefinition
// Definition of custom data column.
type ColumnDefinition struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type        *string                `json:"type,omitempty"`
}

// Storage version of v1api20230311.ColumnDefinition_STATUS
// Definition of custom data column.
type ColumnDefinition_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type        *string                `json:"type,omitempty"`
}

// Storage version of v1api20230311.DataImportSources
type DataImportSources struct {
	EventHub    *EventHubDataSource    `json:"eventHub,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.DataImportSources_STATUS
type DataImportSources_STATUS struct {
	EventHub    *EventHubDataSource_STATUS `json:"eventHub,omitempty"`
	PropertyBag genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.EnrichmentData
// All the enrichment data sources referenced in data flows
type EnrichmentData struct {
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StorageBlobs []StorageBlob          `json:"storageBlobs,omitempty"`
}

// Storage version of v1api20230311.EnrichmentData_STATUS
// All the enrichment data sources referenced in data flows
type EnrichmentData_STATUS struct {
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StorageBlobs []StorageBlob_STATUS   `json:"storageBlobs,omitempty"`
}

// Storage version of v1api20230311.EventHubDestination
type EventHubDestination struct {
	// EventHubResourceReference: The resource ID of the event hub.
	EventHubResourceReference *genruntime.ResourceReference `armReference:"EventHubResourceId" json:"eventHubResourceReference,omitempty"`
	Name                      *string                       `json:"name,omitempty"`
	PropertyBag               genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.EventHubDestination_STATUS
type EventHubDestination_STATUS struct {
	EventHubResourceId *string                `json:"eventHubResourceId,omitempty"`
	Name               *string                `json:"name,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.EventHubDirectDestination
type EventHubDirectDestination struct {
	// EventHubResourceReference: The resource ID of the event hub.
	EventHubResourceReference *genruntime.ResourceReference `armReference:"EventHubResourceId" json:"eventHubResourceReference,omitempty"`
	Name                      *string                       `json:"name,omitempty"`
	PropertyBag               genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.EventHubDirectDestination_STATUS
type EventHubDirectDestination_STATUS struct {
	EventHubResourceId *string                `json:"eventHubResourceId,omitempty"`
	Name               *string                `json:"name,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.ExtensionDataSource
// Definition of which data will be collected from a separate VM extension that integrates with the Azure Monitor
// Agent.
// Collected from either Windows and Linux machines, depending on which extension is defined.
type ExtensionDataSource struct {
	ExtensionName     *string                `json:"extensionName,omitempty"`
	ExtensionSettings map[string]v1.JSON     `json:"extensionSettings,omitempty"`
	InputDataSources  []string               `json:"inputDataSources,omitempty"`
	Name              *string                `json:"name,omitempty"`
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams           []string               `json:"streams,omitempty"`
}

// Storage version of v1api20230311.ExtensionDataSource_STATUS
// Definition of which data will be collected from a separate VM extension that integrates with the Azure Monitor
// Agent.
// Collected from either Windows and Linux machines, depending on which extension is defined.
type ExtensionDataSource_STATUS struct {
	ExtensionName     *string                `json:"extensionName,omitempty"`
	ExtensionSettings map[string]v1.JSON     `json:"extensionSettings,omitempty"`
	InputDataSources  []string               `json:"inputDataSources,omitempty"`
	Name              *string                `json:"name,omitempty"`
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams           []string               `json:"streams,omitempty"`
}

// Storage version of v1api20230311.IisLogsDataSource
// Enables IIS logs to be collected by this data collection rule.
type IisLogsDataSource struct {
	LogDirectories []string               `json:"logDirectories,omitempty"`
	Name           *string                `json:"name,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams        []string               `json:"streams,omitempty"`
	TransformKql   *string                `json:"transformKql,omitempty"`
}

// Storage version of v1api20230311.IisLogsDataSource_STATUS
// Enables IIS logs to be collected by this data collection rule.
type IisLogsDataSource_STATUS struct {
	LogDirectories []string               `json:"logDirectories,omitempty"`
	Name           *string                `json:"name,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams        []string               `json:"streams,omitempty"`
	TransformKql   *string                `json:"transformKql,omitempty"`
}

// Storage version of v1api20230311.LogAnalyticsDestination
// Log Analytics destination.
type LogAnalyticsDestination struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// WorkspaceResourceReference: The resource ID of the Log Analytics workspace.
	WorkspaceResourceReference *genruntime.ResourceReference `armReference:"WorkspaceResourceId" json:"workspaceResourceReference,omitempty"`
}

// Storage version of v1api20230311.LogAnalyticsDestination_STATUS
// Log Analytics destination.
type LogAnalyticsDestination_STATUS struct {
	Name                *string                `json:"name,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	WorkspaceId         *string                `json:"workspaceId,omitempty"`
	WorkspaceResourceId *string                `json:"workspaceResourceId,omitempty"`
}

// Storage version of v1api20230311.LogFilesDataSource
// Definition of which custom log files will be collected by this data collection rule
type LogFilesDataSource struct {
	FilePatterns []string               `json:"filePatterns,omitempty"`
	Format       *string                `json:"format,omitempty"`
	Name         *string                `json:"name,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Settings     *LogFileSettings       `json:"settings,omitempty"`
	Streams      []string               `json:"streams,omitempty"`
	TransformKql *string                `json:"transformKql,omitempty"`
}

// Storage version of v1api20230311.LogFilesDataSource_STATUS
// Definition of which custom log files will be collected by this data collection rule
type LogFilesDataSource_STATUS struct {
	FilePatterns []string                `json:"filePatterns,omitempty"`
	Format       *string                 `json:"format,omitempty"`
	Name         *string                 `json:"name,omitempty"`
	PropertyBag  genruntime.PropertyBag  `json:"$propertyBag,omitempty"`
	Settings     *LogFileSettings_STATUS `json:"settings,omitempty"`
	Streams      []string                `json:"streams,omitempty"`
	TransformKql *string                 `json:"transformKql,omitempty"`
}

// Storage version of v1api20230311.MicrosoftFabricDestination
// Microsoft Fabric destination (non-Azure).
type MicrosoftFabricDestination struct {
	ArtifactId   *string                `json:"artifactId,omitempty"`
	DatabaseName *string                `json:"databaseName,omitempty"`
	IngestionUri *string                `json:"ingestionUri,omitempty"`
	Name         *string                `json:"name,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TenantId     *string                `json:"tenantId,omitempty"`
}

// Storage version of v1api20230311.MicrosoftFabricDestination_STATUS
// Microsoft Fabric destination (non-Azure).
type MicrosoftFabricDestination_STATUS struct {
	ArtifactId   *string                `json:"artifactId,omitempty"`
	DatabaseName *string                `json:"databaseName,omitempty"`
	IngestionUri *string                `json:"ingestionUri,omitempty"`
	Name         *string                `json:"name,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TenantId     *string                `json:"tenantId,omitempty"`
}

// Storage version of v1api20230311.MonitoringAccountDestination
// Monitoring account destination.
type MonitoringAccountDestination struct {
	// AccountResourceReference: The resource ID of the monitoring account.
	AccountResourceReference *genruntime.ResourceReference `armReference:"AccountResourceId" json:"accountResourceReference,omitempty"`
	Name                     *string                       `json:"name,omitempty"`
	PropertyBag              genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.MonitoringAccountDestination_STATUS
// Monitoring account destination.
type MonitoringAccountDestination_STATUS struct {
	AccountId         *string                `json:"accountId,omitempty"`
	AccountResourceId *string                `json:"accountResourceId,omitempty"`
	Name              *string                `json:"name,omitempty"`
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230311.PerfCounterDataSource
// Definition of which performance counters will be collected and how they will be collected by this data collection
// rule.
// Collected from both Windows and Linux machines where the counter is present.
type PerfCounterDataSource struct {
	CounterSpecifiers          []string               `json:"counterSpecifiers,omitempty"`
	Name                       *string                `json:"name,omitempty"`
	PropertyBag                genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SamplingFrequencyInSeconds *int                   `json:"samplingFrequencyInSeconds,omitempty"`
	Streams                    []string               `json:"streams,omitempty"`
	TransformKql               *string                `json:"transformKql,omitempty"`
}

// Storage version of v1api20230311.PerfCounterDataSource_STATUS
// Definition of which performance counters will be collected and how they will be collected by this data collection
// rule.
// Collected from both Windows and Linux machines where the counter is present.
type PerfCounterDataSource_STATUS struct {
	CounterSpecifiers          []string               `json:"counterSpecifiers,omitempty"`
	Name                       *string                `json:"name,omitempty"`
	PropertyBag                genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SamplingFrequencyInSeconds *int                   `json:"samplingFrequencyInSeconds,omitempty"`
	Streams                    []string               `json:"streams,omitempty"`
	TransformKql               *string                `json:"transformKql,omitempty"`
}

// Storage version of v1api20230311.PlatformTelemetryDataSource
// Definition of platform telemetry data source configuration
type PlatformTelemetryDataSource struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams     []string               `json:"streams,omitempty"`
}

// Storage version of v1api20230311.PlatformTelemetryDataSource_STATUS
// Definition of platform telemetry data source configuration
type PlatformTelemetryDataSource_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams     []string               `json:"streams,omitempty"`
}

// Storage version of v1api20230311.PrometheusForwarderDataSource
// Definition of Prometheus metrics forwarding configuration.
type PrometheusForwarderDataSource struct {
	LabelIncludeFilter map[string]string      `json:"labelIncludeFilter,omitempty"`
	Name               *string                `json:"name,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams            []string               `json:"streams,omitempty"`
}

// Storage version of v1api20230311.PrometheusForwarderDataSource_STATUS
// Definition of Prometheus metrics forwarding configuration.
type PrometheusForwarderDataSource_STATUS struct {
	LabelIncludeFilter map[string]string      `json:"labelIncludeFilter,omitempty"`
	Name               *string                `json:"name,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams            []string               `json:"streams,omitempty"`
}

// Storage version of v1api20230311.StorageBlobDestination
type StorageBlobDestination struct {
	ContainerName *string                `json:"containerName,omitempty"`
	Name          *string                `json:"name,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// StorageAccountResourceReference: The resource ID of the storage account.
	StorageAccountResourceReference *genruntime.ResourceReference `armReference:"StorageAccountResourceId" json:"storageAccountResourceReference,omitempty"`
}

// Storage version of v1api20230311.StorageBlobDestination_STATUS
type StorageBlobDestination_STATUS struct {
	ContainerName            *string                `json:"containerName,omitempty"`
	Name                     *string                `json:"name,omitempty"`
	PropertyBag              genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StorageAccountResourceId *string                `json:"storageAccountResourceId,omitempty"`
}

// Storage version of v1api20230311.StorageTableDestination
type StorageTableDestination struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// StorageAccountResourceReference: The resource ID of the storage account.
	StorageAccountResourceReference *genruntime.ResourceReference `armReference:"StorageAccountResourceId" json:"storageAccountResourceReference,omitempty"`
	TableName                       *string                       `json:"tableName,omitempty"`
}

// Storage version of v1api20230311.StorageTableDestination_STATUS
type StorageTableDestination_STATUS struct {
	Name                     *string                `json:"name,omitempty"`
	PropertyBag              genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StorageAccountResourceId *string                `json:"storageAccountResourceId,omitempty"`
	TableName                *string                `json:"tableName,omitempty"`
}

// Storage version of v1api20230311.SyslogDataSource
// Definition of which syslog data will be collected and how it will be collected.
// Only collected from Linux machines.
type SyslogDataSource struct {
	FacilityNames []string               `json:"facilityNames,omitempty"`
	LogLevels     []string               `json:"logLevels,omitempty"`
	Name          *string                `json:"name,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams       []string               `json:"streams,omitempty"`
	TransformKql  *string                `json:"transformKql,omitempty"`
}

// Storage version of v1api20230311.SyslogDataSource_STATUS
// Definition of which syslog data will be collected and how it will be collected.
// Only collected from Linux machines.
type SyslogDataSource_STATUS struct {
	FacilityNames []string               `json:"facilityNames,omitempty"`
	LogLevels     []string               `json:"logLevels,omitempty"`
	Name          *string                `json:"name,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams       []string               `json:"streams,omitempty"`
	TransformKql  *string                `json:"transformKql,omitempty"`
}

// Storage version of v1api20230311.WindowsEventLogDataSource
// Definition of which Windows Event Log events will be collected and how they will be collected.
// Only collected from
// Windows machines.
type WindowsEventLogDataSource struct {
	Name         *string                `json:"name,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams      []string               `json:"streams,omitempty"`
	TransformKql *string                `json:"transformKql,omitempty"`
	XPathQueries []string               `json:"xPathQueries,omitempty"`
}

// Storage version of v1api20230311.WindowsEventLogDataSource_STATUS
// Definition of which Windows Event Log events will be collected and how they will be collected.
// Only collected from
// Windows machines.
type WindowsEventLogDataSource_STATUS struct {
	Name         *string                `json:"name,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams      []string               `json:"streams,omitempty"`
	TransformKql *string                `json:"transformKql,omitempty"`
	XPathQueries []string               `json:"xPathQueries,omitempty"`
}

// Storage version of v1api20230311.WindowsFirewallLogsDataSource
// Enables Firewall logs to be collected by this data collection rule.
type WindowsFirewallLogsDataSource struct {
	Name          *string                `json:"name,omitempty"`
	ProfileFilter []string               `json:"profileFilter,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams       []string               `json:"streams,omitempty"`
}

// Storage version of v1api20230311.WindowsFirewallLogsDataSource_STATUS
// Enables Firewall logs to be collected by this data collection rule.
type WindowsFirewallLogsDataSource_STATUS struct {
	Name          *string                `json:"name,omitempty"`
	ProfileFilter []string               `json:"profileFilter,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Streams       []string               `json:"streams,omitempty"`
}

// Storage version of v1api20230311.EventHubDataSource
type EventHubDataSource struct {
	ConsumerGroup *string                `json:"consumerGroup,omitempty"`
	Name          *string                `json:"name,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Stream        *string                `json:"stream,omitempty"`
}

// Storage version of v1api20230311.EventHubDataSource_STATUS
type EventHubDataSource_STATUS struct {
	ConsumerGroup *string                `json:"consumerGroup,omitempty"`
	Name          *string                `json:"name,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Stream        *string                `json:"stream,omitempty"`
}

// Storage version of v1api20230311.LogFileSettings
// Settings for different log file formats
type LogFileSettings struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Text        *LogFileTextSettings   `json:"text,omitempty"`
}

// Storage version of v1api20230311.LogFileSettings_STATUS
// Settings for different log file formats
type LogFileSettings_STATUS struct {
	PropertyBag genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	Text        *LogFileTextSettings_STATUS `json:"text,omitempty"`
}

// Storage version of v1api20230311.StorageBlob
type StorageBlob struct {
	BlobUrl     *string                `json:"blobUrl,omitempty"`
	LookupType  *string                `json:"lookupType,omitempty"`
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// ResourceReference: Resource Id of the storage account that hosts the blob
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`
}

// Storage version of v1api20230311.StorageBlob_STATUS
type StorageBlob_STATUS struct {
	BlobUrl     *string                `json:"blobUrl,omitempty"`
	LookupType  *string                `json:"lookupType,omitempty"`
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ResourceId  *string                `json:"resourceId,omitempty"`
}

// Storage version of v1api20230311.LogFileTextSettings
// Settings for text log files
type LogFileTextSettings struct {
	PropertyBag                genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RecordStartTimestampFormat *string                `json:"recordStartTimestampFormat,omitempty"`
}

// Storage version of v1api20230311.LogFileTextSettings_STATUS
// Settings for text log files
type LogFileTextSettings_STATUS struct {
	PropertyBag                genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RecordStartTimestampFormat *string                `json:"recordStartTimestampFormat,omitempty"`
}

func init() {
	SchemeBuilder.Register(&DataCollectionRule{}, &DataCollectionRuleList{})
}
