// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium


// This file was autogenerated by go-to-protobuf. Do not edit it manually!

syntax = "proto2";

package github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1;

import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";

// Package-wide variables from generator "generated".
option go_package = "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1";

// Condition contains details for one aspect of the current state of this API Resource.
// ---
// This struct is intended for direct use as an array at the field path .status.conditions.  For example,
//
// 	type FooStatus struct{
// 	    // Represents the observations of a foo's current state.
// 	    // Known .status.conditions.type are: "Available", "Progressing", and "Degraded"
// 	    // +patchMergeKey=type
// 	    // +patchStrategy=merge
// 	    // +listType=map
// 	    // +listMapKey=type
// 	    Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
//
// 	    // other fields
// 	}
message Condition {
  // type of condition in CamelCase or in foo.example.com/CamelCase.
  // ---
  // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
  // useful (see .node.status.conditions), the ability to deconflict is important.
  // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
  // +required
  // +kubebuilder:validation:Required
  // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$`
  // +kubebuilder:validation:MaxLength=316
  optional string type = 1;

  // status of the condition, one of True, False, Unknown.
  // +required
  // +kubebuilder:validation:Required
  // +kubebuilder:validation:Enum=True;False;Unknown
  optional string status = 2;

  // observedGeneration represents the .metadata.generation that the condition was set based upon.
  // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
  // with respect to the current state of the instance.
  // +optional
  // +kubebuilder:validation:Minimum=0
  optional int64 observedGeneration = 3;

  // lastTransitionTime is the last time the condition transitioned from one status to another.
  // This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
  // +required
  // +kubebuilder:validation:Required
  // +kubebuilder:validation:Type=string
  // +kubebuilder:validation:Format=date-time
  optional Time lastTransitionTime = 4;

  // reason contains a programmatic identifier indicating the reason for the condition's last transition.
  // Producers of specific condition types may define expected values and meanings for this field,
  // and whether the values are considered a guaranteed API.
  // The value should be a CamelCase string.
  // This field may not be empty.
  // +required
  // +kubebuilder:validation:Required
  // +kubebuilder:validation:MaxLength=1024
  // +kubebuilder:validation:MinLength=1
  // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$`
  optional string reason = 5;

  // message is a human readable message indicating details about the transition.
  // This may be an empty string.
  // +required
  // +kubebuilder:validation:Required
  // +kubebuilder:validation:MaxLength=32768
  optional string message = 6;
}

// A label selector is a label query over a set of resources. The result of matchLabels and
// matchExpressions are ANDed. An empty label selector matches all objects. A null
// label selector matches no objects.
// +structType=atomic
message LabelSelector {
  // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
  // map is equivalent to an element of matchExpressions, whose key field is "key", the
  // operator is "In", and the values array contains only "value". The requirements are ANDed.
  //
  // +kubebuilder:validation:Optional
  map<string, string> matchLabels = 1;

  // matchExpressions is a list of label selector requirements. The requirements are ANDed.
  // +kubebuilder:validation:Optional
  repeated LabelSelectorRequirement matchExpressions = 2;
}

// A label selector requirement is a selector that contains values, a key, and an operator that
// relates the key and values.
message LabelSelectorRequirement {
  // key is the label key that the selector applies to.
  optional string key = 1;

  // operator represents a key's relationship to a set of values.
  // Valid operators are In, NotIn, Exists and DoesNotExist.
  //
  // +kubebuilder:validation:Enum=In;NotIn;Exists;DoesNotExist
  optional string operator = 2;

  // values is an array of string values. If the operator is In or NotIn,
  // the values array must be non-empty. If the operator is Exists or DoesNotExist,
  // the values array must be empty. This array is replaced during a strategic
  // merge patch.
  //
  // +kubebuilder:validation:Optional
  repeated string values = 3;
}

// ListMeta describes metadata that synthetic resources must have, including lists and
// various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
message ListMeta {
  // String that identifies the server's internal version of this object that
  // can be used by clients to determine when objects have changed.
  // Value must be treated as opaque by clients and passed unmodified back to the server.
  // Populated by the system.
  // Read-only.
  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
  // +optional
  optional string resourceVersion = 2;

  // continue may be set if the user set a limit on the number of items returned, and indicates that
  // the server has more data available. The value is opaque and may be used to issue another request
  // to the endpoint that served this list to retrieve the next set of available objects. Continuing a
  // consistent list may not be possible if the server configuration has changed or more than a few
  // minutes have passed. The resourceVersion field returned when using this continue value will be
  // identical to the value in the first response, unless you have received this token from an error
  // message.
  optional string continue = 3;

  // remainingItemCount is the number of subsequent items in the list which are not included in this
  // list response. If the list request contained label or field selectors, then the number of
  // remaining items is unknown and the field will be left unset and omitted during serialization.
  // If the list is complete (either because it is not chunking or because this is the last chunk),
  // then there are no more remaining items and this field will be left unset and omitted during
  // serialization.
  // Servers older than v1.15 do not set this field.
  // The intended use of the remainingItemCount is *estimating* the size of a collection. Clients
  // should not rely on the remainingItemCount to be set or to be exact.
  // +optional
  optional int64 remainingItemCount = 4;
}

// ObjectMeta is metadata that all persisted resources must have, which includes all objects
// users must create.
message ObjectMeta {
  // Name must be unique within a namespace. Is required when creating resources, although
  // some resources may allow a client to request the generation of an appropriate name
  // automatically. Name is primarily intended for creation idempotence and configuration
  // definition.
  // Cannot be updated.
  // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
  // +optional
  optional string name = 1;

  // GenerateName is an optional prefix, used by the server, to generate a unique
  // name ONLY IF the Name field has not been provided.
  // If this field is used, the name returned to the client will be different
  // than the name passed. This value will also be combined with a unique suffix.
  // The provided value has the same validation rules as the Name field,
  // and may be truncated by the length of the suffix required to make the value
  // unique on the server.
  //
  // If this field is specified and the generated name exists, the server will return a 409.
  //
  // Applied only if Name is not specified.
  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
  // +optional
  optional string generateName = 2;

  // Namespace defines the space within which each name must be unique. An empty namespace is
  // equivalent to the "default" namespace, but "default" is the canonical representation.
  // Not all objects are required to be scoped to a namespace - the value of this field for
  // those objects will be empty.
  //
  // Must be a DNS_LABEL.
  // Cannot be updated.
  // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces
  // +optional
  optional string namespace = 3;

  // UID is the unique in time and space value for this object. It is typically generated by
  // the server on successful creation of a resource and is not allowed to change on PUT
  // operations.
  //
  // Populated by the system.
  // Read-only.
  // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
  // +optional
  optional string uid = 5;

  // An opaque value that represents the internal version of this object that can
  // be used by clients to determine when objects have changed. May be used for optimistic
  // concurrency, change detection, and the watch operation on a resource or set of resources.
  // Clients must treat these values as opaque and passed unmodified back to the server.
  // They may only be valid for a particular resource or set of resources.
  //
  // Populated by the system.
  // Read-only.
  // Value must be treated as opaque by clients and .
  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
  // +optional
  // +deepequal-gen=false
  optional string resourceVersion = 6;

  // A sequence number representing a specific generation of the desired state.
  // Populated by the system. Read-only.
  // +optional
  optional int64 generation = 7;

  // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
  // field is set by the server when a graceful deletion is requested by the user, and is not
  // directly settable by a client. The resource is expected to be deleted (no longer visible
  // from resource lists, and not reachable by name) after the time in this field, once the
  // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked.
  // Once the deletionTimestamp is set, this value may not be unset or be set further into the
  // future, although it may be shortened or the resource may be deleted prior to this time.
  // For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react
  // by sending a graceful termination signal to the containers in the pod. After that 30 seconds,
  // the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,
  // remove the pod from the API. In the presence of network partitions, this object may still
  // exist after this timestamp, until an administrator or automated process can determine the
  // resource is fully terminated.
  // If not set, graceful deletion of the object has not been requested.
  //
  // Populated by the system when a graceful deletion is requested.
  // Read-only.
  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  // +optional
  optional Time deletionTimestamp = 9;

  // Map of string keys and values that can be used to organize and categorize
  // (scope and select) objects. May match selectors of replication controllers
  // and services.
  // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
  // +optional
  map<string, string> labels = 11;

  // Annotations is an unstructured key value map stored with a resource that may be
  // set by external tools to store and retrieve arbitrary metadata. They are not
  // queryable and should be preserved when modifying objects.
  // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
  // +optional
  map<string, string> annotations = 12;

  // List of objects depended by this object. If ALL objects in the list have
  // been deleted, this object will be garbage collected. If this object is managed by a controller,
  // then an entry in this list will point to this controller, with the controller field set to true.
  // There cannot be more than one managing controller.
  // +optional
  // +patchMergeKey=uid
  // +patchStrategy=merge
  repeated OwnerReference ownerReferences = 13;
}

// OwnerReference contains enough information to let you identify an owning
// object. An owning object must be in the same namespace as the dependent, or
// be cluster-scoped, so there is no namespace field.
// +structType=atomic
message OwnerReference {
  // API version of the referent.
  optional string apiVersion = 5;

  // Kind of the referent.
  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  optional string kind = 1;

  // Name of the referent.
  // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
  optional string name = 3;

  // UID of the referent.
  // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
  optional string uid = 4;

  // If true, this reference points to the managing controller.
  // +optional
  optional bool controller = 6;
}

// PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients
// to get access to a particular ObjectMeta schema without knowing the details of the version.
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
message PartialObjectMetadata {
  // Standard object's metadata.
  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  // +optional
  optional ObjectMeta metadata = 1;
}

// PartialObjectMetadataList contains a list of objects containing only their metadata
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
message PartialObjectMetadataList {
  // Standard list metadata.
  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  // +optional
  optional ListMeta metadata = 1;

  // items contains each of the included items.
  repeated PartialObjectMetadata items = 2;
}

// Time is a wrapper around time.Time which supports correct
// marshaling to YAML and JSON.  Wrappers are provided for many
// of the factory methods that the time package offers.
//
// +protobuf.options.marshal=false
// +protobuf.as=Timestamp
// +protobuf.options.(gogoproto.goproto_stringer)=false
//
// +kubebuilder:validation:Format=date-time
// +kubebuilder:validation:Type=string
message Time {
  // Represents seconds of UTC time since Unix epoch
  // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
  // 9999-12-31T23:59:59Z inclusive.
  optional int64 seconds = 1;

  // Non-negative fractions of a second at nanosecond resolution. Negative
  // second values with fractions must still have non-negative nanos values
  // that count forward in time. Must be from 0 to 999,999,999
  // inclusive. This field may be limited in precision depending on context.
  optional int32 nanos = 2;
}

// Timestamp is a struct that is equivalent to Time, but intended for
// protobuf marshalling/unmarshalling. It is generated into a serialization
// that matches Time. Do not use in Go structs.
message Timestamp {
  // Represents seconds of UTC time since Unix epoch
  // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
  // 9999-12-31T23:59:59Z inclusive.
  optional int64 seconds = 1;

  // Non-negative fractions of a second at nanosecond resolution. Negative
  // second values with fractions must still have non-negative nanos values
  // that count forward in time. Must be from 0 to 999,999,999
  // inclusive. This field may be limited in precision depending on context.
  optional int32 nanos = 2;
}

// TypeMeta describes an individual object in an API response or request
// with strings representing the type of the object and its API schema version.
// Structures that are versioned or persisted should inline TypeMeta.
//
// +k8s:deepcopy-gen=false
message TypeMeta {
  // Kind is a string value representing the REST resource this object represents.
  // Servers may infer this from the endpoint the client submits requests to.
  // Cannot be updated.
  // In CamelCase.
  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  // +optional
  optional string kind = 1;

  // APIVersion defines the versioned schema of this representation of an object.
  // Servers should convert recognized schemas to the latest internal value, and
  // may reject unrecognized values.
  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  // +optional
  optional string apiVersion = 2;
}

