// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        v3.21.12
// source: yandex/cloud/cloudregistry/v1/lifecycle_policy.proto

package cloudregistry

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Type of deletion for lifecycle rules.
type DeleteLifecycleRuleKind int32

const (
	DeleteLifecycleRuleKind_DELETE_LIFECYCLE_RULE_KIND_UNSPECIFIED DeleteLifecycleRuleKind = 0
	// Hard delete - artifacts are permanently removed.
	DeleteLifecycleRuleKind_HARD_DELETE DeleteLifecycleRuleKind = 1
	// Soft delete - artifacts are marked for deletion but can be recovered.
	DeleteLifecycleRuleKind_SOFT_DELETE DeleteLifecycleRuleKind = 2
)

// Enum value maps for DeleteLifecycleRuleKind.
var (
	DeleteLifecycleRuleKind_name = map[int32]string{
		0: "DELETE_LIFECYCLE_RULE_KIND_UNSPECIFIED",
		1: "HARD_DELETE",
		2: "SOFT_DELETE",
	}
	DeleteLifecycleRuleKind_value = map[string]int32{
		"DELETE_LIFECYCLE_RULE_KIND_UNSPECIFIED": 0,
		"HARD_DELETE":                            1,
		"SOFT_DELETE":                            2,
	}
)

func (x DeleteLifecycleRuleKind) Enum() *DeleteLifecycleRuleKind {
	p := new(DeleteLifecycleRuleKind)
	*p = x
	return p
}

func (x DeleteLifecycleRuleKind) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (DeleteLifecycleRuleKind) Descriptor() protoreflect.EnumDescriptor {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_enumTypes[0].Descriptor()
}

func (DeleteLifecycleRuleKind) Type() protoreflect.EnumType {
	return &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_enumTypes[0]
}

func (x DeleteLifecycleRuleKind) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use DeleteLifecycleRuleKind.Descriptor instead.
func (DeleteLifecycleRuleKind) EnumDescriptor() ([]byte, []int) {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{0}
}

// State of the lifecycle policy.
type LifecyclePolicyState int32

const (
	LifecyclePolicyState_LIFECYCLE_POLICY_STATE_UNSPECIFIED LifecyclePolicyState = 0
	// Policy is disabled and won't be executed.
	LifecyclePolicyState_DISABLED LifecyclePolicyState = 1
	// Policy is enabled and will be executed according to schedule.
	LifecyclePolicyState_ENABLED LifecyclePolicyState = 2
)

// Enum value maps for LifecyclePolicyState.
var (
	LifecyclePolicyState_name = map[int32]string{
		0: "LIFECYCLE_POLICY_STATE_UNSPECIFIED",
		1: "DISABLED",
		2: "ENABLED",
	}
	LifecyclePolicyState_value = map[string]int32{
		"LIFECYCLE_POLICY_STATE_UNSPECIFIED": 0,
		"DISABLED":                           1,
		"ENABLED":                            2,
	}
)

func (x LifecyclePolicyState) Enum() *LifecyclePolicyState {
	p := new(LifecyclePolicyState)
	*p = x
	return p
}

func (x LifecyclePolicyState) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (LifecyclePolicyState) Descriptor() protoreflect.EnumDescriptor {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_enumTypes[1].Descriptor()
}

func (LifecyclePolicyState) Type() protoreflect.EnumType {
	return &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_enumTypes[1]
}

func (x LifecyclePolicyState) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use LifecyclePolicyState.Descriptor instead.
func (LifecyclePolicyState) EnumDescriptor() ([]byte, []int) {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{1}
}

type DockerFilters_TagStatus int32

const (
	DockerFilters_TAG_STATUS_UNSPECIFIED DockerFilters_TagStatus = 0
	// Any tag status.
	DockerFilters_TAG_STATUS_ANY DockerFilters_TagStatus = 1
	// Only tagged images.
	DockerFilters_TAGGED DockerFilters_TagStatus = 2
	// Only untagged images.
	DockerFilters_UNTAGGED DockerFilters_TagStatus = 3
)

// Enum value maps for DockerFilters_TagStatus.
var (
	DockerFilters_TagStatus_name = map[int32]string{
		0: "TAG_STATUS_UNSPECIFIED",
		1: "TAG_STATUS_ANY",
		2: "TAGGED",
		3: "UNTAGGED",
	}
	DockerFilters_TagStatus_value = map[string]int32{
		"TAG_STATUS_UNSPECIFIED": 0,
		"TAG_STATUS_ANY":         1,
		"TAGGED":                 2,
		"UNTAGGED":               3,
	}
)

func (x DockerFilters_TagStatus) Enum() *DockerFilters_TagStatus {
	p := new(DockerFilters_TagStatus)
	*p = x
	return p
}

func (x DockerFilters_TagStatus) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (DockerFilters_TagStatus) Descriptor() protoreflect.EnumDescriptor {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_enumTypes[2].Descriptor()
}

func (DockerFilters_TagStatus) Type() protoreflect.EnumType {
	return &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_enumTypes[2]
}

func (x DockerFilters_TagStatus) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use DockerFilters_TagStatus.Descriptor instead.
func (DockerFilters_TagStatus) EnumDescriptor() ([]byte, []int) {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{2, 0}
}

type MavenFilters_VersionType int32

const (
	MavenFilters_VERSION_TYPE_UNSPECIFIED MavenFilters_VersionType = 0
	// Any version type.
	MavenFilters_VERSION_TYPE_ANY MavenFilters_VersionType = 1
	// Only release versions.
	MavenFilters_RELEASE MavenFilters_VersionType = 2
	// Only snapshot versions.
	MavenFilters_SNAPSHOT MavenFilters_VersionType = 3
)

// Enum value maps for MavenFilters_VersionType.
var (
	MavenFilters_VersionType_name = map[int32]string{
		0: "VERSION_TYPE_UNSPECIFIED",
		1: "VERSION_TYPE_ANY",
		2: "RELEASE",
		3: "SNAPSHOT",
	}
	MavenFilters_VersionType_value = map[string]int32{
		"VERSION_TYPE_UNSPECIFIED": 0,
		"VERSION_TYPE_ANY":         1,
		"RELEASE":                  2,
		"SNAPSHOT":                 3,
	}
)

func (x MavenFilters_VersionType) Enum() *MavenFilters_VersionType {
	p := new(MavenFilters_VersionType)
	*p = x
	return p
}

func (x MavenFilters_VersionType) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (MavenFilters_VersionType) Descriptor() protoreflect.EnumDescriptor {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_enumTypes[3].Descriptor()
}

func (MavenFilters_VersionType) Type() protoreflect.EnumType {
	return &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_enumTypes[3]
}

func (x MavenFilters_VersionType) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use MavenFilters_VersionType.Descriptor instead.
func (MavenFilters_VersionType) EnumDescriptor() ([]byte, []int) {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{3, 0}
}

// A LifecyclePolicy resource.
type LifecyclePolicy struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// ID of the lifecycle policy.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Name of the lifecycle policy.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Description of the lifecycle policy. 0-1024 characters long.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// List of lifecycle rules.
	Rules []*LifecycleRule `protobuf:"bytes,4,rep,name=rules,proto3" json:"rules,omitempty"`
	// Current state of the lifecycle policy.
	State LifecyclePolicyState `protobuf:"varint,5,opt,name=state,proto3,enum=yandex.cloud.cloudregistry.v1.LifecyclePolicyState" json:"state,omitempty"`
	// ID of the registry that the lifecycle policy belongs to.
	RegistryId string `protobuf:"bytes,6,opt,name=registry_id,json=registryId,proto3" json:"registry_id,omitempty"`
	// Output only. Creation timestamp.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Output only. Modification timestamp.
	ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=modified_at,json=modifiedAt,proto3" json:"modified_at,omitempty"`
	// Output only. ID of the user who created the lifecycle policy.
	CreatedBy string `protobuf:"bytes,9,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
	// Output only. ID of the user who last modified the lifecycle policy.
	ModifiedBy    string `protobuf:"bytes,10,opt,name=modified_by,json=modifiedBy,proto3" json:"modified_by,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *LifecyclePolicy) Reset() {
	*x = LifecyclePolicy{}
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *LifecyclePolicy) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*LifecyclePolicy) ProtoMessage() {}

func (x *LifecyclePolicy) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use LifecyclePolicy.ProtoReflect.Descriptor instead.
func (*LifecyclePolicy) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{0}
}

func (x *LifecyclePolicy) GetId() string {
	if x != nil {
		return x.Id
	}
	return ""
}

func (x *LifecyclePolicy) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *LifecyclePolicy) GetDescription() string {
	if x != nil {
		return x.Description
	}
	return ""
}

func (x *LifecyclePolicy) GetRules() []*LifecycleRule {
	if x != nil {
		return x.Rules
	}
	return nil
}

func (x *LifecyclePolicy) GetState() LifecyclePolicyState {
	if x != nil {
		return x.State
	}
	return LifecyclePolicyState_LIFECYCLE_POLICY_STATE_UNSPECIFIED
}

func (x *LifecyclePolicy) GetRegistryId() string {
	if x != nil {
		return x.RegistryId
	}
	return ""
}

func (x *LifecyclePolicy) GetCreatedAt() *timestamppb.Timestamp {
	if x != nil {
		return x.CreatedAt
	}
	return nil
}

func (x *LifecyclePolicy) GetModifiedAt() *timestamppb.Timestamp {
	if x != nil {
		return x.ModifiedAt
	}
	return nil
}

func (x *LifecyclePolicy) GetCreatedBy() string {
	if x != nil {
		return x.CreatedBy
	}
	return ""
}

func (x *LifecyclePolicy) GetModifiedBy() string {
	if x != nil {
		return x.ModifiedBy
	}
	return ""
}

// A rule that defines lifecycle policy behavior.
type LifecycleRule struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Path prefix to which the rule applies.
	PathPrefix string `protobuf:"bytes,1,opt,name=path_prefix,json=pathPrefix,proto3" json:"path_prefix,omitempty"`
	// Type of lifecycle rule.
	//
	// Types that are valid to be assigned to Kind:
	//
	//	*LifecycleRule_KeepByAge
	//	*LifecycleRule_KeepByVersion
	//	*LifecycleRule_Delete
	Kind isLifecycleRule_Kind `protobuf_oneof:"kind"`
	// Filters to determine which artifacts the rule applies to.
	//
	// Types that are valid to be assigned to Filter:
	//
	//	*LifecycleRule_DockerFilters
	//	*LifecycleRule_MavenFilters
	Filter isLifecycleRule_Filter `protobuf_oneof:"filter"`
	// Regular expression pattern to match package version or docker tag.
	VersionRegexp string `protobuf:"bytes,7,opt,name=version_regexp,json=versionRegexp,proto3" json:"version_regexp,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *LifecycleRule) Reset() {
	*x = LifecycleRule{}
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *LifecycleRule) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*LifecycleRule) ProtoMessage() {}

func (x *LifecycleRule) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use LifecycleRule.ProtoReflect.Descriptor instead.
func (*LifecycleRule) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{1}
}

func (x *LifecycleRule) GetPathPrefix() string {
	if x != nil {
		return x.PathPrefix
	}
	return ""
}

func (x *LifecycleRule) GetKind() isLifecycleRule_Kind {
	if x != nil {
		return x.Kind
	}
	return nil
}

func (x *LifecycleRule) GetKeepByAge() *KeepByAgeLifecycleRule {
	if x != nil {
		if x, ok := x.Kind.(*LifecycleRule_KeepByAge); ok {
			return x.KeepByAge
		}
	}
	return nil
}

func (x *LifecycleRule) GetKeepByVersion() *KeepByVersionLifecycleRule {
	if x != nil {
		if x, ok := x.Kind.(*LifecycleRule_KeepByVersion); ok {
			return x.KeepByVersion
		}
	}
	return nil
}

func (x *LifecycleRule) GetDelete() *DeleteLifecycleRule {
	if x != nil {
		if x, ok := x.Kind.(*LifecycleRule_Delete); ok {
			return x.Delete
		}
	}
	return nil
}

func (x *LifecycleRule) GetFilter() isLifecycleRule_Filter {
	if x != nil {
		return x.Filter
	}
	return nil
}

func (x *LifecycleRule) GetDockerFilters() *DockerFilters {
	if x != nil {
		if x, ok := x.Filter.(*LifecycleRule_DockerFilters); ok {
			return x.DockerFilters
		}
	}
	return nil
}

func (x *LifecycleRule) GetMavenFilters() *MavenFilters {
	if x != nil {
		if x, ok := x.Filter.(*LifecycleRule_MavenFilters); ok {
			return x.MavenFilters
		}
	}
	return nil
}

func (x *LifecycleRule) GetVersionRegexp() string {
	if x != nil {
		return x.VersionRegexp
	}
	return ""
}

type isLifecycleRule_Kind interface {
	isLifecycleRule_Kind()
}

type LifecycleRule_KeepByAge struct {
	// Rule that keeps artifacts by age.
	KeepByAge *KeepByAgeLifecycleRule `protobuf:"bytes,2,opt,name=keep_by_age,json=keepByAge,proto3,oneof"`
}

type LifecycleRule_KeepByVersion struct {
	// Rule that keeps artifacts by version count.
	KeepByVersion *KeepByVersionLifecycleRule `protobuf:"bytes,3,opt,name=keep_by_version,json=keepByVersion,proto3,oneof"`
}

type LifecycleRule_Delete struct {
	// Rule that deletes artifacts.
	Delete *DeleteLifecycleRule `protobuf:"bytes,4,opt,name=delete,proto3,oneof"`
}

func (*LifecycleRule_KeepByAge) isLifecycleRule_Kind() {}

func (*LifecycleRule_KeepByVersion) isLifecycleRule_Kind() {}

func (*LifecycleRule_Delete) isLifecycleRule_Kind() {}

type isLifecycleRule_Filter interface {
	isLifecycleRule_Filter()
}

type LifecycleRule_DockerFilters struct {
	// Docker-specific filters.
	DockerFilters *DockerFilters `protobuf:"bytes,5,opt,name=docker_filters,json=dockerFilters,proto3,oneof"`
}

type LifecycleRule_MavenFilters struct {
	// Maven-specific filters.
	MavenFilters *MavenFilters `protobuf:"bytes,6,opt,name=maven_filters,json=mavenFilters,proto3,oneof"`
}

func (*LifecycleRule_DockerFilters) isLifecycleRule_Filter() {}

func (*LifecycleRule_MavenFilters) isLifecycleRule_Filter() {}

// Docker-specific filters for lifecycle rules.
type DockerFilters struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Filter by tag status.
	TagStatus     DockerFilters_TagStatus `protobuf:"varint,1,opt,name=tag_status,json=tagStatus,proto3,enum=yandex.cloud.cloudregistry.v1.DockerFilters_TagStatus" json:"tag_status,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *DockerFilters) Reset() {
	*x = DockerFilters{}
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *DockerFilters) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*DockerFilters) ProtoMessage() {}

func (x *DockerFilters) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use DockerFilters.ProtoReflect.Descriptor instead.
func (*DockerFilters) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{2}
}

func (x *DockerFilters) GetTagStatus() DockerFilters_TagStatus {
	if x != nil {
		return x.TagStatus
	}
	return DockerFilters_TAG_STATUS_UNSPECIFIED
}

// Maven-specific filters for lifecycle rules.
type MavenFilters struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Filter by version type.
	VersionType   MavenFilters_VersionType `protobuf:"varint,1,opt,name=version_type,json=versionType,proto3,enum=yandex.cloud.cloudregistry.v1.MavenFilters_VersionType" json:"version_type,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *MavenFilters) Reset() {
	*x = MavenFilters{}
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *MavenFilters) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*MavenFilters) ProtoMessage() {}

func (x *MavenFilters) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use MavenFilters.ProtoReflect.Descriptor instead.
func (*MavenFilters) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{3}
}

func (x *MavenFilters) GetVersionType() MavenFilters_VersionType {
	if x != nil {
		return x.VersionType
	}
	return MavenFilters_VERSION_TYPE_UNSPECIFIED
}

// Rule that keeps a specified number of recent versions.
type KeepByVersionLifecycleRule struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Number of versions to keep.
	KeepVersionsCount int64 `protobuf:"varint,1,opt,name=keep_versions_count,json=keepVersionsCount,proto3" json:"keep_versions_count,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

func (x *KeepByVersionLifecycleRule) Reset() {
	*x = KeepByVersionLifecycleRule{}
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *KeepByVersionLifecycleRule) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*KeepByVersionLifecycleRule) ProtoMessage() {}

func (x *KeepByVersionLifecycleRule) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[4]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use KeepByVersionLifecycleRule.ProtoReflect.Descriptor instead.
func (*KeepByVersionLifecycleRule) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{4}
}

func (x *KeepByVersionLifecycleRule) GetKeepVersionsCount() int64 {
	if x != nil {
		return x.KeepVersionsCount
	}
	return 0
}

// Rule that keeps artifacts younger than specified age.
type KeepByAgeLifecycleRule struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Keep artifacts younger than this number of days.
	YoungerThanDays int64 `protobuf:"varint,1,opt,name=younger_than_days,json=youngerThanDays,proto3" json:"younger_than_days,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

func (x *KeepByAgeLifecycleRule) Reset() {
	*x = KeepByAgeLifecycleRule{}
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *KeepByAgeLifecycleRule) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*KeepByAgeLifecycleRule) ProtoMessage() {}

func (x *KeepByAgeLifecycleRule) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[5]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use KeepByAgeLifecycleRule.ProtoReflect.Descriptor instead.
func (*KeepByAgeLifecycleRule) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{5}
}

func (x *KeepByAgeLifecycleRule) GetYoungerThanDays() int64 {
	if x != nil {
		return x.YoungerThanDays
	}
	return 0
}

// Rule that deletes artifacts based on specified conditions.
type DeleteLifecycleRule struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Type of deletion.
	Type DeleteLifecycleRuleKind `protobuf:"varint,1,opt,name=type,proto3,enum=yandex.cloud.cloudregistry.v1.DeleteLifecycleRuleKind" json:"type,omitempty"`
	// Cooldown period in days before deletion.
	CooldownPeriodDays int64 `protobuf:"varint,2,opt,name=cooldown_period_days,json=cooldownPeriodDays,proto3" json:"cooldown_period_days,omitempty"`
	// Condition that triggers deletion.
	//
	// Types that are valid to be assigned to Condition:
	//
	//	*DeleteLifecycleRule_OlderThanDays
	//	*DeleteLifecycleRule_VersionCondition
	//	*DeleteLifecycleRule_Always
	Condition     isDeleteLifecycleRule_Condition `protobuf_oneof:"condition"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *DeleteLifecycleRule) Reset() {
	*x = DeleteLifecycleRule{}
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[6]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *DeleteLifecycleRule) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*DeleteLifecycleRule) ProtoMessage() {}

func (x *DeleteLifecycleRule) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[6]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use DeleteLifecycleRule.ProtoReflect.Descriptor instead.
func (*DeleteLifecycleRule) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{6}
}

func (x *DeleteLifecycleRule) GetType() DeleteLifecycleRuleKind {
	if x != nil {
		return x.Type
	}
	return DeleteLifecycleRuleKind_DELETE_LIFECYCLE_RULE_KIND_UNSPECIFIED
}

func (x *DeleteLifecycleRule) GetCooldownPeriodDays() int64 {
	if x != nil {
		return x.CooldownPeriodDays
	}
	return 0
}

func (x *DeleteLifecycleRule) GetCondition() isDeleteLifecycleRule_Condition {
	if x != nil {
		return x.Condition
	}
	return nil
}

func (x *DeleteLifecycleRule) GetOlderThanDays() int64 {
	if x != nil {
		if x, ok := x.Condition.(*DeleteLifecycleRule_OlderThanDays); ok {
			return x.OlderThanDays
		}
	}
	return 0
}

func (x *DeleteLifecycleRule) GetVersionCondition() *DeleteByVersionCondition {
	if x != nil {
		if x, ok := x.Condition.(*DeleteLifecycleRule_VersionCondition); ok {
			return x.VersionCondition
		}
	}
	return nil
}

func (x *DeleteLifecycleRule) GetAlways() bool {
	if x != nil {
		if x, ok := x.Condition.(*DeleteLifecycleRule_Always); ok {
			return x.Always
		}
	}
	return false
}

type isDeleteLifecycleRule_Condition interface {
	isDeleteLifecycleRule_Condition()
}

type DeleteLifecycleRule_OlderThanDays struct {
	// Delete artifacts older than specified days.
	OlderThanDays int64 `protobuf:"varint,3,opt,name=older_than_days,json=olderThanDays,proto3,oneof"`
}

type DeleteLifecycleRule_VersionCondition struct {
	// Delete artifacts by version count condition.
	VersionCondition *DeleteByVersionCondition `protobuf:"bytes,4,opt,name=version_condition,json=versionCondition,proto3,oneof"`
}

type DeleteLifecycleRule_Always struct {
	// Always delete (use with caution).
	Always bool `protobuf:"varint,5,opt,name=always,proto3,oneof"`
}

func (*DeleteLifecycleRule_OlderThanDays) isDeleteLifecycleRule_Condition() {}

func (*DeleteLifecycleRule_VersionCondition) isDeleteLifecycleRule_Condition() {}

func (*DeleteLifecycleRule_Always) isDeleteLifecycleRule_Condition() {}

// Condition for deletion based on version count.
type DeleteByVersionCondition struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Delete when version count exceeds this number.
	VersionsCountGreaterThan int64 `protobuf:"varint,1,opt,name=versions_count_greater_than,json=versionsCountGreaterThan,proto3" json:"versions_count_greater_than,omitempty"`
	unknownFields            protoimpl.UnknownFields
	sizeCache                protoimpl.SizeCache
}

func (x *DeleteByVersionCondition) Reset() {
	*x = DeleteByVersionCondition{}
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[7]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *DeleteByVersionCondition) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*DeleteByVersionCondition) ProtoMessage() {}

func (x *DeleteByVersionCondition) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[7]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use DeleteByVersionCondition.ProtoReflect.Descriptor instead.
func (*DeleteByVersionCondition) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{7}
}

func (x *DeleteByVersionCondition) GetVersionsCountGreaterThan() int64 {
	if x != nil {
		return x.VersionsCountGreaterThan
	}
	return 0
}

var File_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto protoreflect.FileDescriptor

const file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDesc = "" +
	"\n" +
	"4yandex/cloud/cloudregistry/v1/lifecycle_policy.proto\x12\x1dyandex.cloud.cloudregistry.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbf\x03\n" +
	"\x0fLifecyclePolicy\x12\x0e\n" +
	"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
	"\x04name\x18\x02 \x01(\tR\x04name\x12 \n" +
	"\vdescription\x18\x03 \x01(\tR\vdescription\x12B\n" +
	"\x05rules\x18\x04 \x03(\v2,.yandex.cloud.cloudregistry.v1.LifecycleRuleR\x05rules\x12I\n" +
	"\x05state\x18\x05 \x01(\x0e23.yandex.cloud.cloudregistry.v1.LifecyclePolicyStateR\x05state\x12\x1f\n" +
	"\vregistry_id\x18\x06 \x01(\tR\n" +
	"registryId\x129\n" +
	"\n" +
	"created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12;\n" +
	"\vmodified_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\n" +
	"modifiedAt\x12\x1d\n" +
	"\n" +
	"created_by\x18\t \x01(\tR\tcreatedBy\x12\x1f\n" +
	"\vmodified_by\x18\n" +
	" \x01(\tR\n" +
	"modifiedBy\"\xa0\x04\n" +
	"\rLifecycleRule\x12\x1f\n" +
	"\vpath_prefix\x18\x01 \x01(\tR\n" +
	"pathPrefix\x12W\n" +
	"\vkeep_by_age\x18\x02 \x01(\v25.yandex.cloud.cloudregistry.v1.KeepByAgeLifecycleRuleH\x00R\tkeepByAge\x12c\n" +
	"\x0fkeep_by_version\x18\x03 \x01(\v29.yandex.cloud.cloudregistry.v1.KeepByVersionLifecycleRuleH\x00R\rkeepByVersion\x12L\n" +
	"\x06delete\x18\x04 \x01(\v22.yandex.cloud.cloudregistry.v1.DeleteLifecycleRuleH\x00R\x06delete\x12U\n" +
	"\x0edocker_filters\x18\x05 \x01(\v2,.yandex.cloud.cloudregistry.v1.DockerFiltersH\x01R\rdockerFilters\x12R\n" +
	"\rmaven_filters\x18\x06 \x01(\v2+.yandex.cloud.cloudregistry.v1.MavenFiltersH\x01R\fmavenFilters\x12%\n" +
	"\x0eversion_regexp\x18\a \x01(\tR\rversionRegexpB\x06\n" +
	"\x04kindB\b\n" +
	"\x06filter\"\xbd\x01\n" +
	"\rDockerFilters\x12U\n" +
	"\n" +
	"tag_status\x18\x01 \x01(\x0e26.yandex.cloud.cloudregistry.v1.DockerFilters.TagStatusR\ttagStatus\"U\n" +
	"\tTagStatus\x12\x1a\n" +
	"\x16TAG_STATUS_UNSPECIFIED\x10\x00\x12\x12\n" +
	"\x0eTAG_STATUS_ANY\x10\x01\x12\n" +
	"\n" +
	"\x06TAGGED\x10\x02\x12\f\n" +
	"\bUNTAGGED\x10\x03\"\xc8\x01\n" +
	"\fMavenFilters\x12Z\n" +
	"\fversion_type\x18\x01 \x01(\x0e27.yandex.cloud.cloudregistry.v1.MavenFilters.VersionTypeR\vversionType\"\\\n" +
	"\vVersionType\x12\x1c\n" +
	"\x18VERSION_TYPE_UNSPECIFIED\x10\x00\x12\x14\n" +
	"\x10VERSION_TYPE_ANY\x10\x01\x12\v\n" +
	"\aRELEASE\x10\x02\x12\f\n" +
	"\bSNAPSHOT\x10\x03\"L\n" +
	"\x1aKeepByVersionLifecycleRule\x12.\n" +
	"\x13keep_versions_count\x18\x01 \x01(\x03R\x11keepVersionsCount\"D\n" +
	"\x16KeepByAgeLifecycleRule\x12*\n" +
	"\x11younger_than_days\x18\x01 \x01(\x03R\x0fyoungerThanDays\"\xcc\x02\n" +
	"\x13DeleteLifecycleRule\x12J\n" +
	"\x04type\x18\x01 \x01(\x0e26.yandex.cloud.cloudregistry.v1.DeleteLifecycleRuleKindR\x04type\x120\n" +
	"\x14cooldown_period_days\x18\x02 \x01(\x03R\x12cooldownPeriodDays\x12(\n" +
	"\x0folder_than_days\x18\x03 \x01(\x03H\x00R\rolderThanDays\x12f\n" +
	"\x11version_condition\x18\x04 \x01(\v27.yandex.cloud.cloudregistry.v1.DeleteByVersionConditionH\x00R\x10versionCondition\x12\x18\n" +
	"\x06always\x18\x05 \x01(\bH\x00R\x06alwaysB\v\n" +
	"\tcondition\"Y\n" +
	"\x18DeleteByVersionCondition\x12=\n" +
	"\x1bversions_count_greater_than\x18\x01 \x01(\x03R\x18versionsCountGreaterThan*g\n" +
	"\x17DeleteLifecycleRuleKind\x12*\n" +
	"&DELETE_LIFECYCLE_RULE_KIND_UNSPECIFIED\x10\x00\x12\x0f\n" +
	"\vHARD_DELETE\x10\x01\x12\x0f\n" +
	"\vSOFT_DELETE\x10\x02*Y\n" +
	"\x14LifecyclePolicyState\x12&\n" +
	"\"LIFECYCLE_POLICY_STATE_UNSPECIFIED\x10\x00\x12\f\n" +
	"\bDISABLED\x10\x01\x12\v\n" +
	"\aENABLED\x10\x02Bt\n" +
	"!yandex.cloud.api.cloudregistry.v1ZOgithub.com/yandex-cloud/go-genproto/yandex/cloud/cloudregistry/v1;cloudregistryb\x06proto3"

var (
	file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescOnce sync.Once
	file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescData []byte
)

func file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescGZIP() []byte {
	file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDesc), len(file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDesc)))
	})
	return file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDescData
}

var file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
var file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_goTypes = []any{
	(DeleteLifecycleRuleKind)(0),       // 0: yandex.cloud.cloudregistry.v1.DeleteLifecycleRuleKind
	(LifecyclePolicyState)(0),          // 1: yandex.cloud.cloudregistry.v1.LifecyclePolicyState
	(DockerFilters_TagStatus)(0),       // 2: yandex.cloud.cloudregistry.v1.DockerFilters.TagStatus
	(MavenFilters_VersionType)(0),      // 3: yandex.cloud.cloudregistry.v1.MavenFilters.VersionType
	(*LifecyclePolicy)(nil),            // 4: yandex.cloud.cloudregistry.v1.LifecyclePolicy
	(*LifecycleRule)(nil),              // 5: yandex.cloud.cloudregistry.v1.LifecycleRule
	(*DockerFilters)(nil),              // 6: yandex.cloud.cloudregistry.v1.DockerFilters
	(*MavenFilters)(nil),               // 7: yandex.cloud.cloudregistry.v1.MavenFilters
	(*KeepByVersionLifecycleRule)(nil), // 8: yandex.cloud.cloudregistry.v1.KeepByVersionLifecycleRule
	(*KeepByAgeLifecycleRule)(nil),     // 9: yandex.cloud.cloudregistry.v1.KeepByAgeLifecycleRule
	(*DeleteLifecycleRule)(nil),        // 10: yandex.cloud.cloudregistry.v1.DeleteLifecycleRule
	(*DeleteByVersionCondition)(nil),   // 11: yandex.cloud.cloudregistry.v1.DeleteByVersionCondition
	(*timestamppb.Timestamp)(nil),      // 12: google.protobuf.Timestamp
}
var file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_depIdxs = []int32{
	5,  // 0: yandex.cloud.cloudregistry.v1.LifecyclePolicy.rules:type_name -> yandex.cloud.cloudregistry.v1.LifecycleRule
	1,  // 1: yandex.cloud.cloudregistry.v1.LifecyclePolicy.state:type_name -> yandex.cloud.cloudregistry.v1.LifecyclePolicyState
	12, // 2: yandex.cloud.cloudregistry.v1.LifecyclePolicy.created_at:type_name -> google.protobuf.Timestamp
	12, // 3: yandex.cloud.cloudregistry.v1.LifecyclePolicy.modified_at:type_name -> google.protobuf.Timestamp
	9,  // 4: yandex.cloud.cloudregistry.v1.LifecycleRule.keep_by_age:type_name -> yandex.cloud.cloudregistry.v1.KeepByAgeLifecycleRule
	8,  // 5: yandex.cloud.cloudregistry.v1.LifecycleRule.keep_by_version:type_name -> yandex.cloud.cloudregistry.v1.KeepByVersionLifecycleRule
	10, // 6: yandex.cloud.cloudregistry.v1.LifecycleRule.delete:type_name -> yandex.cloud.cloudregistry.v1.DeleteLifecycleRule
	6,  // 7: yandex.cloud.cloudregistry.v1.LifecycleRule.docker_filters:type_name -> yandex.cloud.cloudregistry.v1.DockerFilters
	7,  // 8: yandex.cloud.cloudregistry.v1.LifecycleRule.maven_filters:type_name -> yandex.cloud.cloudregistry.v1.MavenFilters
	2,  // 9: yandex.cloud.cloudregistry.v1.DockerFilters.tag_status:type_name -> yandex.cloud.cloudregistry.v1.DockerFilters.TagStatus
	3,  // 10: yandex.cloud.cloudregistry.v1.MavenFilters.version_type:type_name -> yandex.cloud.cloudregistry.v1.MavenFilters.VersionType
	0,  // 11: yandex.cloud.cloudregistry.v1.DeleteLifecycleRule.type:type_name -> yandex.cloud.cloudregistry.v1.DeleteLifecycleRuleKind
	11, // 12: yandex.cloud.cloudregistry.v1.DeleteLifecycleRule.version_condition:type_name -> yandex.cloud.cloudregistry.v1.DeleteByVersionCondition
	13, // [13:13] is the sub-list for method output_type
	13, // [13:13] is the sub-list for method input_type
	13, // [13:13] is the sub-list for extension type_name
	13, // [13:13] is the sub-list for extension extendee
	0,  // [0:13] is the sub-list for field type_name
}

func init() { file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_init() }
func file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_init() {
	if File_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto != nil {
		return
	}
	file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[1].OneofWrappers = []any{
		(*LifecycleRule_KeepByAge)(nil),
		(*LifecycleRule_KeepByVersion)(nil),
		(*LifecycleRule_Delete)(nil),
		(*LifecycleRule_DockerFilters)(nil),
		(*LifecycleRule_MavenFilters)(nil),
	}
	file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes[6].OneofWrappers = []any{
		(*DeleteLifecycleRule_OlderThanDays)(nil),
		(*DeleteLifecycleRule_VersionCondition)(nil),
		(*DeleteLifecycleRule_Always)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDesc), len(file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_rawDesc)),
			NumEnums:      4,
			NumMessages:   8,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_depIdxs,
		EnumInfos:         file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_enumTypes,
		MessageInfos:      file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_msgTypes,
	}.Build()
	File_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto = out.File
	file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_goTypes = nil
	file_yandex_cloud_cloudregistry_v1_lifecycle_policy_proto_depIdxs = nil
}
