// 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 ManagedEnvironment_Spec struct {
	// Kind: Kind of the Environment.
	Kind *string `json:"kind,omitempty"`

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

	// Properties: Managed environment resource specific properties
	Properties *ManagedEnvironment_Properties_Spec `json:"properties,omitempty"`

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

var _ genruntime.ARMResourceSpec = &ManagedEnvironment_Spec{}

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.App/managedEnvironments"
func (environment *ManagedEnvironment_Spec) GetType() string {
	return "Microsoft.App/managedEnvironments"
}

type ManagedEnvironment_Properties_Spec struct {
	// AppLogsConfiguration: Cluster configuration which enables the log daemon to export app logs to configured destination.
	AppLogsConfiguration *AppLogsConfiguration `json:"appLogsConfiguration,omitempty"`

	// CustomDomainConfiguration: Custom domain configuration for the environment
	CustomDomainConfiguration *CustomDomainConfiguration `json:"customDomainConfiguration,omitempty"`

	// DaprAIConnectionString: Application Insights connection string used by Dapr to export Service to Service communication
	// telemetry
	DaprAIConnectionString *string `json:"daprAIConnectionString,omitempty"`

	// DaprAIInstrumentationKey: Azure Monitor instrumentation key used by Dapr to export Service to Service communication
	// telemetry
	DaprAIInstrumentationKey *string `json:"daprAIInstrumentationKey,omitempty"`

	// InfrastructureResourceGroup: Name of the platform-managed resource group created for the Managed Environment to host
	// infrastructure resources. If a subnet ID is provided, this resource group will be created in the same subscription as
	// the subnet.
	InfrastructureResourceGroup *string `json:"infrastructureResourceGroup,omitempty"`

	// PeerAuthentication: Peer authentication settings for the Managed Environment
	PeerAuthentication *ManagedEnvironment_Properties_PeerAuthentication_Spec `json:"peerAuthentication,omitempty"`

	// PeerTrafficConfiguration: Peer traffic settings for the Managed Environment
	PeerTrafficConfiguration *ManagedEnvironment_Properties_PeerTrafficConfiguration_Spec `json:"peerTrafficConfiguration,omitempty"`

	// VnetConfiguration: Vnet configuration for the environment
	VnetConfiguration *VnetConfiguration `json:"vnetConfiguration,omitempty"`

	// WorkloadProfiles: Workload profiles configured for the Managed Environment.
	WorkloadProfiles []WorkloadProfile `json:"workloadProfiles,omitempty"`

	// ZoneRedundant: Whether or not this Managed Environment is zone-redundant.
	ZoneRedundant *bool `json:"zoneRedundant,omitempty"`
}

// Configuration of application logs
type AppLogsConfiguration struct {
	// Destination: Logs destination, can be 'log-analytics', 'azure-monitor' or 'none'
	Destination *string `json:"destination,omitempty"`

	// LogAnalyticsConfiguration: Log Analytics configuration, must only be provided when destination is configured as
	// 'log-analytics'
	LogAnalyticsConfiguration *LogAnalyticsConfiguration `json:"logAnalyticsConfiguration,omitempty"`
}

// Configuration properties for apps environment custom domain
type CustomDomainConfiguration struct {
	// CertificatePassword: Certificate password
	CertificatePassword *string `json:"certificatePassword,omitempty"`

	// CertificateValue: PFX or PEM blob
	CertificateValue *string `json:"certificateValue,omitempty"`

	// DnsSuffix: Dns suffix for the environment domain
	DnsSuffix *string `json:"dnsSuffix,omitempty"`
}

type ManagedEnvironment_Properties_PeerAuthentication_Spec struct {
	// Mtls: Mutual TLS authentication settings for the Managed Environment
	Mtls *Mtls `json:"mtls,omitempty"`
}

type ManagedEnvironment_Properties_PeerTrafficConfiguration_Spec struct {
	// Encryption: Peer traffic encryption settings for the Managed Environment
	Encryption *ManagedEnvironment_Properties_PeerTrafficConfiguration_Encryption_Spec `json:"encryption,omitempty"`
}

// Configuration properties for apps environment to join a Virtual Network
type VnetConfiguration struct {
	// DockerBridgeCidr: CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other
	// provided IP ranges.
	DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"`

	// InfrastructureSubnetId: Resource ID of a subnet for infrastructure components. Must not overlap with any other provided
	// IP ranges.
	InfrastructureSubnetId *string `json:"infrastructureSubnetId,omitempty"`

	// Internal: Boolean indicating the environment only has an internal load balancer. These environments do not have a public
	// static IP resource. They must provide infrastructureSubnetId if enabling this property
	Internal *bool `json:"internal,omitempty"`

	// PlatformReservedCidr: IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must
	// not overlap with any other provided IP ranges.
	PlatformReservedCidr *string `json:"platformReservedCidr,omitempty"`

	// PlatformReservedDnsIP:  An IP address from the IP range defined by platformReservedCidr that will be reserved for the
	// internal DNS server.
	PlatformReservedDnsIP *string `json:"platformReservedDnsIP,omitempty"`
}

// Workload profile to scope container app execution.
type WorkloadProfile struct {
	// MaximumCount: The maximum capacity.
	MaximumCount *int `json:"maximumCount,omitempty"`

	// MinimumCount: The minimum capacity.
	MinimumCount *int `json:"minimumCount,omitempty"`

	// Name: Workload profile type for the workloads to run on.
	Name *string `json:"name,omitempty"`

	// WorkloadProfileType: Workload profile type for the workloads to run on.
	WorkloadProfileType *string `json:"workloadProfileType,omitempty"`
}

// Log Analytics configuration, must only be provided when destination is configured as 'log-analytics'
type LogAnalyticsConfiguration struct {
	// CustomerId: Log analytics customer id
	CustomerId *string `json:"customerId,omitempty"`

	// SharedKey: Log analytics customer key
	SharedKey *string `json:"sharedKey,omitempty"`
}

type ManagedEnvironment_Properties_PeerTrafficConfiguration_Encryption_Spec struct {
	// Enabled: Boolean indicating whether the peer traffic encryption is enabled
	Enabled *bool `json:"enabled,omitempty"`
}

// Configuration properties for mutual TLS authentication
type Mtls struct {
	// Enabled: Boolean indicating whether the mutual TLS authentication is enabled
	Enabled *bool `json:"enabled,omitempty"`
}
