// Package controllers_config provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
package controllers_config

import (
	core "github.com/meshery/schemas/models/core"
)

// Defines values for MeshSyncWatchedResourceEvents.
const (
	ADDED    MeshSyncWatchedResourceEvents = "ADDED"
	DELETED  MeshSyncWatchedResourceEvents = "DELETED"
	MODIFIED MeshSyncWatchedResourceEvents = "MODIFIED"
)

// Defines values for MesheryBrokerServiceConfigType.
const (
	ClusterIP    MesheryBrokerServiceConfigType = "ClusterIP"
	LoadBalancer MesheryBrokerServiceConfigType = "LoadBalancer"
	NodePort     MesheryBrokerServiceConfigType = "NodePort"
)

// Defines values for MesheryOperatorConfigDeploymentMode.
const (
	Embedded MesheryOperatorConfigDeploymentMode = "embedded"
	Operator MesheryOperatorConfigDeploymentMode = "operator"
)

// ConnectionControllersConfig Layered view of the controllers configuration for a single Kubernetes connection. Exposes each precedence layer so clients can indicate, per field, whether the effective value is inherited from the server-wide default or overridden on the connection.
type ConnectionControllersConfig struct {
	// Override Deployment and runtime configuration for the Meshery controllers that manage a Kubernetes connection: Meshery Operator, MeshSync, and Meshery Broker. The same document shape is used at two layers. As a server-wide default it declares how Meshery Server deploys and configures the controllers for every managed cluster. As a per-connection override, stored in the connection's metadata, it overrides the server-wide default for a single connection. Every configuration field is optional: an absent field inherits the value from the next layer (per-connection override, then server-wide default, then built-in default). The only required field is the server-stamped schemaVersion discriminator, which identifies the document revision for future migrations. Learn more at https://docs.meshery.io/concepts/architecture
	Override *MesheryControllersConfig `json:"override,omitempty" yaml:"override,omitempty"`

	// Default Deployment and runtime configuration for the Meshery controllers that manage a Kubernetes connection: Meshery Operator, MeshSync, and Meshery Broker. The same document shape is used at two layers. As a server-wide default it declares how Meshery Server deploys and configures the controllers for every managed cluster. As a per-connection override, stored in the connection's metadata, it overrides the server-wide default for a single connection. Every configuration field is optional: an absent field inherits the value from the next layer (per-connection override, then server-wide default, then built-in default). The only required field is the server-stamped schemaVersion discriminator, which identifies the document revision for future migrations. Learn more at https://docs.meshery.io/concepts/architecture
	Default *MesheryControllersConfig `json:"default,omitempty" yaml:"default,omitempty"`

	// Effective Deployment and runtime configuration for the Meshery controllers that manage a Kubernetes connection: Meshery Operator, MeshSync, and Meshery Broker. The same document shape is used at two layers. As a server-wide default it declares how Meshery Server deploys and configures the controllers for every managed cluster. As a per-connection override, stored in the connection's metadata, it overrides the server-wide default for a single connection. Every configuration field is optional: an absent field inherits the value from the next layer (per-connection override, then server-wide default, then built-in default). The only required field is the server-stamped schemaVersion discriminator, which identifies the document revision for future migrations. Learn more at https://docs.meshery.io/concepts/architecture
	Effective MesheryControllersConfig `json:"effective" yaml:"effective"`
}

// MeshSyncConfig Configuration for the MeshSync agent that discovers and synchronizes cluster state. In operator deployment mode these settings are applied through the MeshSync custom resource and the MeshSync Deployment on the managed cluster; in embedded mode the applicable settings are passed to the in-process MeshSync run.
type MeshSyncConfig struct {
	// Version MeshSync image tag to run (for example "v1.0.2" or "stable-latest"). Applies to operator deployment mode only; in embedded mode MeshSync runs at the version compiled into Meshery Server. Secret redaction and broker content deduplication require MeshSync v1.0.2 or newer.
	Version *string `json:"version,omitempty" yaml:"version,omitempty"`

	// Replicas Number of MeshSync replicas (MeshSync custom resource spec.size). Applies to operator deployment mode only.
	Replicas *int `json:"replicas,omitempty" yaml:"replicas,omitempty"`

	// WatchList Discovery scope for MeshSync. At most one of whitelist or blacklist may be set (enforced by this schema and by MeshSync itself): a whitelist watches only the listed resource types with the listed event types, while a blacklist watches MeshSync's default resource set minus the listed resource types. When both are empty or absent, MeshSync watches its built-in default resource set. Applied through the MeshSync custom resource; MeshSync reads it at startup, so changes trigger a MeshSync restart.
	WatchList *MeshSyncWatchList `json:"watchList,omitempty" yaml:"watchList,omitempty"`

	// OutputNamespaces Namespaces whose resources MeshSync publishes. Empty or absent publishes resources from all namespaces. Discovery scope is unaffected; this filters only what is published.
	OutputNamespaces []string `json:"outputNamespaces,omitempty" yaml:"outputNamespaces,omitempty"`

	// OutputResources Resource types MeshSync publishes (lowercase Kubernetes kinds, for example "pod" or "deployment"). Empty or absent publishes all discovered resource types. Discovery scope is unaffected; this filters only what is published.
	OutputResources []string `json:"outputResources,omitempty" yaml:"outputResources,omitempty"`

	// RedactSecrets When true, MeshSync redacts Kubernetes Secret data values (keys are preserved) before publishing. Requires MeshSync v1.0.2 or newer. Off by default; enabling is recommended when Secrets are within the discovery scope.
	RedactSecrets *bool `json:"redactSecrets,omitempty" yaml:"redactSecrets,omitempty"`

	// BrokerContentDedup When true, MeshSync suppresses byte-identical republishes of a resource to the broker. Requires MeshSync v1.0.2 or newer. Off by default.
	BrokerContentDedup *bool `json:"brokerContentDedup,omitempty" yaml:"brokerContentDedup,omitempty"`

	// DebugLogging When true, MeshSync runs with debug-level logging (DEBUG environment variable).
	DebugLogging *bool `json:"debugLogging,omitempty" yaml:"debugLogging,omitempty"`
}

// MeshSyncWatchList Discovery scope for MeshSync. At most one of whitelist or blacklist may be set (enforced by this schema and by MeshSync itself): a whitelist watches only the listed resource types with the listed event types, while a blacklist watches MeshSync's default resource set minus the listed resource types. When both are empty or absent, MeshSync watches its built-in default resource set. Applied through the MeshSync custom resource; MeshSync reads it at startup, so changes trigger a MeshSync restart.
type MeshSyncWatchList struct {
	// Whitelist Resource types MeshSync watches, each with the event types to subscribe to. Mutually exclusive with blacklist.
	Whitelist []MeshSyncWatchedResource `json:"whitelist,omitempty" yaml:"whitelist,omitempty"`

	// Blacklist Resource types excluded from MeshSync's default discovery scope, in "<plural>.<version>.<group>" form (for example "pods.v1." or "deployments.v1.apps"). Mutually exclusive with whitelist.
	Blacklist []string `json:"blacklist,omitempty" yaml:"blacklist,omitempty"`
}

// MeshSyncWatchedResource A single watched Kubernetes resource type and the event types MeshSync subscribes to for it.
type MeshSyncWatchedResource struct {
	// Resource Resource key in "<plural>.<version>.<group>" form (for example "pods.v1." for core-group pods or "deployments.v1.apps").
	Resource string `json:"resource" yaml:"resource"`

	// Events Event types to subscribe to for this resource. Empty or absent subscribes to all event types.
	Events []MeshSyncWatchedResourceEvents `json:"events,omitempty" yaml:"events,omitempty"`
}

// MeshSyncWatchedResourceEvents A single Kubernetes watch event type.
type MeshSyncWatchedResourceEvents string

// MesheryBrokerConfig Configuration for the Meshery Broker (NATS) that MeshSync publishes to. Applies to operator deployment mode only: the settings are applied through the Broker custom resource on the managed cluster. In embedded mode no broker is installed; MeshSync publishes over an in-process channel inside Meshery Server.
type MesheryBrokerConfig struct {
	// Version NATS server image tag to run (Broker custom resource spec.version). When absent, the operator's bundled default NATS version is used.
	Version *string `json:"version,omitempty" yaml:"version,omitempty"`

	// Replicas Number of NATS server replicas (Broker custom resource spec.size).
	Replicas *int `json:"replicas,omitempty" yaml:"replicas,omitempty"`

	// Service Networking configuration for the broker's client-facing Kubernetes Service (Broker custom resource spec.service). Every field reconciles in place: the operator updates the live Service and re-derives the broker endpoint without recreating broker pods.
	Service *MesheryBrokerServiceConfig `json:"service,omitempty" yaml:"service,omitempty"`
}

// MesheryBrokerServiceConfig Networking configuration for the broker's client-facing Kubernetes Service (Broker custom resource spec.service). Every field reconciles in place: the operator updates the live Service and re-derives the broker endpoint without recreating broker pods.
type MesheryBrokerServiceConfig struct {
	// Type Kubernetes Service type for client access. When absent the broker stays cluster-internal (ClusterIP). LoadBalancer acquires a cloud load-balancer address; NodePort exposes the broker on node IPs.
	Type *MesheryBrokerServiceConfigType `json:"type,omitempty" yaml:"type,omitempty"`

	// Annotations Annotations merged onto the client Service (cloud load-balancer hints, MetalLB address pools, internal-LB switches).
	Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`

	// LoadBalancerClass Load-balancer implementation to use. Valid only when type is LoadBalancer.
	LoadBalancerClass *string `json:"loadBalancerClass,omitempty" yaml:"loadBalancerClass,omitempty"`

	// LoadBalancerSourceRanges CIDR ranges allowed to reach the broker. Valid only when type is LoadBalancer.
	LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" yaml:"loadBalancerSourceRanges,omitempty"`

	// ExternalEndpointOverride Pins the advertised external broker endpoint as "host:port" when auto-derivation is undesirable: an ingress or gateway in front of the broker, an air-gapped topology, or NAT. The nats:// scheme is added by consumers.
	ExternalEndpointOverride *string `json:"externalEndpointOverride,omitempty" yaml:"externalEndpointOverride,omitempty"`
}

// MesheryBrokerServiceConfigType Kubernetes Service type for client access. When absent the broker stays cluster-internal (ClusterIP). LoadBalancer acquires a cloud load-balancer address; NodePort exposes the broker on node IPs.
type MesheryBrokerServiceConfigType string

// MesheryControllersConfig Deployment and runtime configuration for the Meshery controllers that manage a Kubernetes connection: Meshery Operator, MeshSync, and Meshery Broker. The same document shape is used at two layers. As a server-wide default it declares how Meshery Server deploys and configures the controllers for every managed cluster. As a per-connection override, stored in the connection's metadata, it overrides the server-wide default for a single connection. Every configuration field is optional: an absent field inherits the value from the next layer (per-connection override, then server-wide default, then built-in default). The only required field is the server-stamped schemaVersion discriminator, which identifies the document revision for future migrations. Learn more at https://docs.meshery.io/concepts/architecture
type MesheryControllersConfig struct {
	// SchemaVersion API version of the object, optionally prefixed with an API group (e.g. "group.example.io/v1beta1" or bare "v1beta1").
	SchemaVersion core.VersionString `json:"schemaVersion" yaml:"schemaVersion"`

	// Operator Configuration for the Meshery Operator on a managed cluster. The operator deploys and reconciles MeshSync and Meshery Broker; in embedded mode no operator is installed and MeshSync runs in-process inside Meshery Server.
	Operator *MesheryOperatorConfig `json:"operator,omitempty" yaml:"operator,omitempty"`

	// Meshsync Configuration for the MeshSync agent that discovers and synchronizes cluster state. In operator deployment mode these settings are applied through the MeshSync custom resource and the MeshSync Deployment on the managed cluster; in embedded mode the applicable settings are passed to the in-process MeshSync run.
	Meshsync *MeshSyncConfig `json:"meshsync,omitempty" yaml:"meshsync,omitempty"`

	// Broker Configuration for the Meshery Broker (NATS) that MeshSync publishes to. Applies to operator deployment mode only: the settings are applied through the Broker custom resource on the managed cluster. In embedded mode no broker is installed; MeshSync publishes over an in-process channel inside Meshery Server.
	Broker *MesheryBrokerConfig `json:"broker,omitempty" yaml:"broker,omitempty"`
}

// MesheryControllersConfigPayload Client-settable controllers configuration document, used as the body of update requests at both layers (server-wide defaults and per-connection override). Identical to MesheryControllersConfig minus the server-stamped schemaVersion. Every field is optional: an absent field inherits from the next precedence layer, and an empty document clears the layer entirely.
type MesheryControllersConfigPayload struct {
	// Operator Configuration for the Meshery Operator on a managed cluster. The operator deploys and reconciles MeshSync and Meshery Broker; in embedded mode no operator is installed and MeshSync runs in-process inside Meshery Server.
	Operator *MesheryOperatorConfig `json:"operator,omitempty" yaml:"operator,omitempty"`

	// Meshsync Configuration for the MeshSync agent that discovers and synchronizes cluster state. In operator deployment mode these settings are applied through the MeshSync custom resource and the MeshSync Deployment on the managed cluster; in embedded mode the applicable settings are passed to the in-process MeshSync run.
	Meshsync *MeshSyncConfig `json:"meshsync,omitempty" yaml:"meshsync,omitempty"`

	// Broker Configuration for the Meshery Broker (NATS) that MeshSync publishes to. Applies to operator deployment mode only: the settings are applied through the Broker custom resource on the managed cluster. In embedded mode no broker is installed; MeshSync publishes over an in-process channel inside Meshery Server.
	Broker *MesheryBrokerConfig `json:"broker,omitempty" yaml:"broker,omitempty"`
}

// MesheryOperatorConfig Configuration for the Meshery Operator on a managed cluster. The operator deploys and reconciles MeshSync and Meshery Broker; in embedded mode no operator is installed and MeshSync runs in-process inside Meshery Server.
type MesheryOperatorConfig struct {
	// DeploymentMode How MeshSync is deployed for the connection. "operator" installs Meshery Operator into the cluster, which runs MeshSync and Meshery Broker there; "embedded" runs MeshSync in-process inside Meshery Server and installs nothing into the cluster.
	DeploymentMode *MesheryOperatorConfigDeploymentMode `json:"deploymentMode,omitempty" yaml:"deploymentMode,omitempty"`

	// Version Meshery Operator Helm chart version to deploy. When absent, the operator version tracks the Meshery Server release.
	Version *string `json:"version,omitempty" yaml:"version,omitempty"`
}

// MesheryOperatorConfigDeploymentMode How MeshSync is deployed for the connection. "operator" installs Meshery Operator into the cluster, which runs MeshSync and Meshery Broker there; "embedded" runs MeshSync in-process inside Meshery Server and installs nothing into the cluster.
type MesheryOperatorConfigDeploymentMode string

// ConnectionId A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
type ConnectionId = core.Uuid

// ControllersConfigPayload Client-settable controllers configuration document, used as the body of update requests at both layers (server-wide defaults and per-connection override). Identical to MesheryControllersConfig minus the server-stamped schemaVersion. Every field is optional: an absent field inherits from the next precedence layer, and an empty document clears the layer entirely.
type ControllersConfigPayload = MesheryControllersConfigPayload
