// 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/scan_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 ScanPolicy struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Output only. ID of the scan policy.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// ID of the registry that the scan policy belongs to.
	// Required. The maximum string length in characters is 50.
	RegistryId string `protobuf:"bytes,2,opt,name=registry_id,json=registryId,proto3" json:"registry_id,omitempty"`
	// Name of the scan policy.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// Description of the scan policy.
	// The maximum string length in characters is 256.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// The rules of scan policy.
	Rules *ScanRules `protobuf:"bytes,5,opt,name=rules,proto3" json:"rules,omitempty"`
	// Output only. Creation timestamp.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Turns off scan policy.
	Disabled      bool `protobuf:"varint,7,opt,name=disabled,proto3" json:"disabled,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ScanPolicy) ProtoMessage() {}

func (x *ScanPolicy) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_containerregistry_v1_scan_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 ScanPolicy.ProtoReflect.Descriptor instead.
func (*ScanPolicy) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDescGZIP(), []int{0}
}

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

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

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

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

func (x *ScanPolicy) GetRules() *ScanRules {
	if x != nil {
		return x.Rules
	}
	return nil
}

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

func (x *ScanPolicy) GetDisabled() bool {
	if x != nil {
		return x.Disabled
	}
	return false
}

type ScanRules struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Description of on-push scan rule.
	PushRule *PushRule `protobuf:"bytes,1,opt,name=push_rule,json=pushRule,proto3" json:"push_rule,omitempty"`
	// Description of time based rescan rule.
	ScheduleRules []*ScheduledRule `protobuf:"bytes,2,rep,name=schedule_rules,json=scheduleRules,proto3" json:"schedule_rules,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ScanRules) ProtoMessage() {}

func (x *ScanRules) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_containerregistry_v1_scan_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 ScanRules.ProtoReflect.Descriptor instead.
func (*ScanRules) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDescGZIP(), []int{1}
}

func (x *ScanRules) GetPushRule() *PushRule {
	if x != nil {
		return x.PushRule
	}
	return nil
}

func (x *ScanRules) GetScheduleRules() []*ScheduledRule {
	if x != nil {
		return x.ScheduleRules
	}
	return nil
}

type PushRule struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// List of repositories that are scanned with rule. Child repositories are included into parent node. "*" - means all repositories in registry
	RepositoryPrefixes []string `protobuf:"bytes,1,rep,name=repository_prefixes,json=repositoryPrefixes,proto3" json:"repository_prefixes,omitempty"`
	// Turns off scan rule.
	Disabled      bool `protobuf:"varint,2,opt,name=disabled,proto3" json:"disabled,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*PushRule) ProtoMessage() {}

func (x *PushRule) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_containerregistry_v1_scan_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 PushRule.ProtoReflect.Descriptor instead.
func (*PushRule) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDescGZIP(), []int{2}
}

func (x *PushRule) GetRepositoryPrefixes() []string {
	if x != nil {
		return x.RepositoryPrefixes
	}
	return nil
}

func (x *PushRule) GetDisabled() bool {
	if x != nil {
		return x.Disabled
	}
	return false
}

type ScheduledRule struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// List of repositories that are scanned with rule. Child repositories are included into parent node. "*" - means all repositories in registry
	RepositoryPrefixes []string `protobuf:"bytes,1,rep,name=repository_prefixes,json=repositoryPrefixes,proto3" json:"repository_prefixes,omitempty"`
	// Period of time since last scan to trigger automatic rescan.
	RescanPeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=rescan_period,json=rescanPeriod,proto3" json:"rescan_period,omitempty"`
	// Turns off scan rule.
	Disabled      bool `protobuf:"varint,3,opt,name=disabled,proto3" json:"disabled,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ScheduledRule) ProtoMessage() {}

func (x *ScheduledRule) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_containerregistry_v1_scan_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 ScheduledRule.ProtoReflect.Descriptor instead.
func (*ScheduledRule) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDescGZIP(), []int{3}
}

func (x *ScheduledRule) GetRepositoryPrefixes() []string {
	if x != nil {
		return x.RepositoryPrefixes
	}
	return nil
}

func (x *ScheduledRule) GetRescanPeriod() *durationpb.Duration {
	if x != nil {
		return x.RescanPeriod
	}
	return nil
}

func (x *ScheduledRule) GetDisabled() bool {
	if x != nil {
		return x.Disabled
	}
	return false
}

var File_yandex_cloud_containerregistry_v1_scan_policy_proto protoreflect.FileDescriptor

const file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDesc = "" +
	"\n" +
	"3yandex/cloud/containerregistry/v1/scan_policy.proto\x12!yandex.cloud.containerregistry.v1\x1a\x1dyandex/cloud/validation.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8e\x02\n" +
	"\n" +
	"ScanPolicy\x12\x0e\n" +
	"\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n" +
	"\vregistry_id\x18\x02 \x01(\tR\n" +
	"registryId\x12\x12\n" +
	"\x04name\x18\x03 \x01(\tR\x04name\x12 \n" +
	"\vdescription\x18\x04 \x01(\tR\vdescription\x12B\n" +
	"\x05rules\x18\x05 \x01(\v2,.yandex.cloud.containerregistry.v1.ScanRulesR\x05rules\x129\n" +
	"\n" +
	"created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x1a\n" +
	"\bdisabled\x18\a \x01(\bR\bdisabled\"\xae\x01\n" +
	"\tScanRules\x12H\n" +
	"\tpush_rule\x18\x01 \x01(\v2+.yandex.cloud.containerregistry.v1.PushRuleR\bpushRule\x12W\n" +
	"\x0eschedule_rules\x18\x02 \x03(\v20.yandex.cloud.containerregistry.v1.ScheduledRuleR\rscheduleRules\"\xa4\x01\n" +
	"\bPushRule\x12|\n" +
	"\x13repository_prefixes\x18\x01 \x03(\tBK\xf2\xc71A\\*|[a-z0-9]+(?:[._-][a-z0-9]+)*(/([a-z0-9]+(?:[._-][a-z0-9]+)*))*\x82\xc81\x02>0R\x12repositoryPrefixes\x12\x1a\n" +
	"\bdisabled\x18\x02 \x01(\bR\bdisabled\"\xef\x01\n" +
	"\rScheduledRule\x12|\n" +
	"\x13repository_prefixes\x18\x01 \x03(\tBK\xf2\xc71A\\*|[a-z0-9]+(?:[._-][a-z0-9]+)*(/([a-z0-9]+(?:[._-][a-z0-9]+)*))*\x82\xc81\x02>0R\x12repositoryPrefixes\x12D\n" +
	"\rrescan_period\x18\x02 \x01(\v2\x19.google.protobuf.DurationB\x04\xe8\xc71\x01R\frescanPeriod\x12\x1a\n" +
	"\bdisabled\x18\x03 \x01(\bR\bdisabledB\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_scan_policy_proto_rawDescOnce sync.Once
	file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDescData []byte
)

func file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDescGZIP() []byte {
	file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDesc), len(file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDesc)))
	})
	return file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDescData
}

var file_yandex_cloud_containerregistry_v1_scan_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_yandex_cloud_containerregistry_v1_scan_policy_proto_goTypes = []any{
	(*ScanPolicy)(nil),            // 0: yandex.cloud.containerregistry.v1.ScanPolicy
	(*ScanRules)(nil),             // 1: yandex.cloud.containerregistry.v1.ScanRules
	(*PushRule)(nil),              // 2: yandex.cloud.containerregistry.v1.PushRule
	(*ScheduledRule)(nil),         // 3: yandex.cloud.containerregistry.v1.ScheduledRule
	(*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp
	(*durationpb.Duration)(nil),   // 5: google.protobuf.Duration
}
var file_yandex_cloud_containerregistry_v1_scan_policy_proto_depIdxs = []int32{
	1, // 0: yandex.cloud.containerregistry.v1.ScanPolicy.rules:type_name -> yandex.cloud.containerregistry.v1.ScanRules
	4, // 1: yandex.cloud.containerregistry.v1.ScanPolicy.created_at:type_name -> google.protobuf.Timestamp
	2, // 2: yandex.cloud.containerregistry.v1.ScanRules.push_rule:type_name -> yandex.cloud.containerregistry.v1.PushRule
	3, // 3: yandex.cloud.containerregistry.v1.ScanRules.schedule_rules:type_name -> yandex.cloud.containerregistry.v1.ScheduledRule
	5, // 4: yandex.cloud.containerregistry.v1.ScheduledRule.rescan_period:type_name -> google.protobuf.Duration
	5, // [5:5] is the sub-list for method output_type
	5, // [5:5] is the sub-list for method input_type
	5, // [5:5] is the sub-list for extension type_name
	5, // [5:5] is the sub-list for extension extendee
	0, // [0:5] is the sub-list for field type_name
}

func init() { file_yandex_cloud_containerregistry_v1_scan_policy_proto_init() }
func file_yandex_cloud_containerregistry_v1_scan_policy_proto_init() {
	if File_yandex_cloud_containerregistry_v1_scan_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_scan_policy_proto_rawDesc), len(file_yandex_cloud_containerregistry_v1_scan_policy_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_containerregistry_v1_scan_policy_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_containerregistry_v1_scan_policy_proto_depIdxs,
		MessageInfos:      file_yandex_cloud_containerregistry_v1_scan_policy_proto_msgTypes,
	}.Build()
	File_yandex_cloud_containerregistry_v1_scan_policy_proto = out.File
	file_yandex_cloud_containerregistry_v1_scan_policy_proto_goTypes = nil
	file_yandex_cloud_containerregistry_v1_scan_policy_proto_depIdxs = nil
}
