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

package containerregistry

import (
	_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	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 LifecyclePolicy_Status int32

const (
	LifecyclePolicy_STATUS_UNSPECIFIED LifecyclePolicy_Status = 0
	// Policy is active and regularly deletes Docker images according to the established rules.
	LifecyclePolicy_ACTIVE LifecyclePolicy_Status = 1
	// Policy is disabled and does not delete Docker images in the repository.
	// Policies in this status can be used for preparing and testing rules.
	LifecyclePolicy_DISABLED LifecyclePolicy_Status = 2
)

// Enum value maps for LifecyclePolicy_Status.
var (
	LifecyclePolicy_Status_name = map[int32]string{
		0: "STATUS_UNSPECIFIED",
		1: "ACTIVE",
		2: "DISABLED",
	}
	LifecyclePolicy_Status_value = map[string]int32{
		"STATUS_UNSPECIFIED": 0,
		"ACTIVE":             1,
		"DISABLED":           2,
	}
)

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

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

func (LifecyclePolicy_Status) Descriptor() protoreflect.EnumDescriptor {
	return file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_enumTypes[0].Descriptor()
}

func (LifecyclePolicy_Status) Type() protoreflect.EnumType {
	return &file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_enumTypes[0]
}

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

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

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"`
	// ID of the repository that the lifecycle policy belongs to.
	// Required. The maximum string length in characters is 50.
	RepositoryId string `protobuf:"bytes,3,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
	// Description of the lifecycle policy.
	// The maximum string length in characters is 256.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// Status of lifecycle policy.
	Status LifecyclePolicy_Status `protobuf:"varint,5,opt,name=status,proto3,enum=yandex.cloud.containerregistry.v1.LifecyclePolicy_Status" json:"status,omitempty"`
	// Creation timestamp.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// The rules of lifecycle policy.
	Rules         []*LifecycleRule `protobuf:"bytes,7,rep,name=rules,proto3" json:"rules,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *LifecyclePolicy) Reset() {
	*x = LifecyclePolicy{}
	mi := &file_yandex_cloud_containerregistry_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_containerregistry_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_containerregistry_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) GetRepositoryId() string {
	if x != nil {
		return x.RepositoryId
	}
	return ""
}

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

func (x *LifecyclePolicy) GetStatus() LifecyclePolicy_Status {
	if x != nil {
		return x.Status
	}
	return LifecyclePolicy_STATUS_UNSPECIFIED
}

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

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

type LifecycleRule struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Description of the lifecycle policy rule.
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	// Period of time for automatic deletion.
	// Period must be a multiple of 24 hours.
	ExpirePeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=expire_period,json=expirePeriod,proto3" json:"expire_period,omitempty"`
	// Tag for specifying a filter in the form of a regular expression.
	TagRegexp string `protobuf:"bytes,3,opt,name=tag_regexp,json=tagRegexp,proto3" json:"tag_regexp,omitempty"`
	// Tag for applying the rule to Docker images without tags.
	Untagged bool `protobuf:"varint,4,opt,name=untagged,proto3" json:"untagged,omitempty"`
	// Number of Docker images (falling under the specified filter by tags) that must be left, even if the expire_period has already expired.
	RetainedTop   int64 `protobuf:"varint,5,opt,name=retained_top,json=retainedTop,proto3" json:"retained_top,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *LifecycleRule) Reset() {
	*x = LifecycleRule{}
	mi := &file_yandex_cloud_containerregistry_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_containerregistry_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_containerregistry_v1_lifecycle_policy_proto_rawDescGZIP(), []int{1}
}

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

func (x *LifecycleRule) GetExpirePeriod() *durationpb.Duration {
	if x != nil {
		return x.ExpirePeriod
	}
	return nil
}

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

func (x *LifecycleRule) GetUntagged() bool {
	if x != nil {
		return x.Untagged
	}
	return false
}

func (x *LifecycleRule) GetRetainedTop() int64 {
	if x != nil {
		return x.RetainedTop
	}
	return 0
}

var File_yandex_cloud_containerregistry_v1_lifecycle_policy_proto protoreflect.FileDescriptor

const file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_rawDesc = "" +
	"\n" +
	"8yandex/cloud/containerregistry/v1/lifecycle_policy.proto\x12!yandex.cloud.containerregistry.v1\x1a\x1dyandex/cloud/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8e\x03\n" +
	"\x0fLifecyclePolicy\x12\x0e\n" +
	"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
	"\x04name\x18\x02 \x01(\tR\x04name\x12#\n" +
	"\rrepository_id\x18\x03 \x01(\tR\frepositoryId\x12 \n" +
	"\vdescription\x18\x04 \x01(\tR\vdescription\x12Q\n" +
	"\x06status\x18\x05 \x01(\x0e29.yandex.cloud.containerregistry.v1.LifecyclePolicy.StatusR\x06status\x129\n" +
	"\n" +
	"created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12F\n" +
	"\x05rules\x18\a \x03(\v20.yandex.cloud.containerregistry.v1.LifecycleRuleR\x05rules\":\n" +
	"\x06Status\x12\x16\n" +
	"\x12STATUS_UNSPECIFIED\x10\x00\x12\n" +
	"\n" +
	"\x06ACTIVE\x10\x01\x12\f\n" +
	"\bDISABLED\x10\x02\"\xf9\x01\n" +
	"\rLifecycleRule\x12+\n" +
	"\vdescription\x18\x01 \x01(\tB\t\x8a\xc81\x05<=256R\vdescription\x12I\n" +
	"\rexpire_period\x18\x02 \x01(\v2\x19.google.protobuf.DurationB\t\xfa\xc71\x05>=24hR\fexpirePeriod\x12(\n" +
	"\n" +
	"tag_regexp\x18\x03 \x01(\tB\t\x8a\xc81\x05<=256R\ttagRegexp\x12\x1a\n" +
	"\buntagged\x18\x04 \x01(\bR\buntagged\x12*\n" +
	"\fretained_top\x18\x05 \x01(\x03B\a\xfa\xc71\x03>=0R\vretainedTopB\x80\x01\n" +
	"%yandex.cloud.api.containerregistry.v1ZWgithub.com/yandex-cloud/go-genproto/yandex/cloud/containerregistry/v1;containerregistryb\x06proto3"

var (
	file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_rawDescOnce sync.Once
	file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_rawDescData []byte
)

func file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_rawDescGZIP() []byte {
	file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_rawDesc), len(file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_rawDesc)))
	})
	return file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_rawDescData
}

var file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_goTypes = []any{
	(LifecyclePolicy_Status)(0),   // 0: yandex.cloud.containerregistry.v1.LifecyclePolicy.Status
	(*LifecyclePolicy)(nil),       // 1: yandex.cloud.containerregistry.v1.LifecyclePolicy
	(*LifecycleRule)(nil),         // 2: yandex.cloud.containerregistry.v1.LifecycleRule
	(*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp
	(*durationpb.Duration)(nil),   // 4: google.protobuf.Duration
}
var file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_depIdxs = []int32{
	0, // 0: yandex.cloud.containerregistry.v1.LifecyclePolicy.status:type_name -> yandex.cloud.containerregistry.v1.LifecyclePolicy.Status
	3, // 1: yandex.cloud.containerregistry.v1.LifecyclePolicy.created_at:type_name -> google.protobuf.Timestamp
	2, // 2: yandex.cloud.containerregistry.v1.LifecyclePolicy.rules:type_name -> yandex.cloud.containerregistry.v1.LifecycleRule
	4, // 3: yandex.cloud.containerregistry.v1.LifecycleRule.expire_period:type_name -> google.protobuf.Duration
	4, // [4:4] is the sub-list for method output_type
	4, // [4:4] is the sub-list for method input_type
	4, // [4:4] is the sub-list for extension type_name
	4, // [4:4] is the sub-list for extension extendee
	0, // [0:4] is the sub-list for field type_name
}

func init() { file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_init() }
func file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_init() {
	if File_yandex_cloud_containerregistry_v1_lifecycle_policy_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_rawDesc), len(file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_depIdxs,
		EnumInfos:         file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_enumTypes,
		MessageInfos:      file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_msgTypes,
	}.Build()
	File_yandex_cloud_containerregistry_v1_lifecycle_policy_proto = out.File
	file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_goTypes = nil
	file_yandex_cloud_containerregistry_v1_lifecycle_policy_proto_depIdxs = nil
}
