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

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.9
// 	protoc        (unknown)
// source: agntcy/identity/service/v1alpha1/policy.proto

package identity_service_sdk_go

import (
	_ "google.golang.org/genproto/googleapis/api/annotations"
	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 RuleAction int32

const (
	RuleAction_RULE_ACTION_UNSPECIFIED RuleAction = 0
	RuleAction_RULE_ACTION_ALLOW       RuleAction = 1
	RuleAction_RULE_ACTION_DENY        RuleAction = 2
)

// Enum value maps for RuleAction.
var (
	RuleAction_name = map[int32]string{
		0: "RULE_ACTION_UNSPECIFIED",
		1: "RULE_ACTION_ALLOW",
		2: "RULE_ACTION_DENY",
	}
	RuleAction_value = map[string]int32{
		"RULE_ACTION_UNSPECIFIED": 0,
		"RULE_ACTION_ALLOW":       1,
		"RULE_ACTION_DENY":        2,
	}
)

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

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

func (RuleAction) Descriptor() protoreflect.EnumDescriptor {
	return file_agntcy_identity_service_v1alpha1_policy_proto_enumTypes[0].Descriptor()
}

func (RuleAction) Type() protoreflect.EnumType {
	return &file_agntcy_identity_service_v1alpha1_policy_proto_enumTypes[0]
}

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

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

// Identity Service Policy.
type Policy struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// A unique identifier for the Policy.
	Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"`
	// A human-readable name for the Policy.
	Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// A human-readable description for the Policy.
	Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"`
	// The requester application that this Policy applies to.
	AssignedTo *string `protobuf:"bytes,4,opt,name=assigned_to,json=assignedTo,proto3,oneof" json:"assigned_to,omitempty"`
	// All the rules that apply to this Policy.
	Rules []*Rule `protobuf:"bytes,5,rep,name=rules,proto3" json:"rules,omitempty"`
	// CreatedAt records the timestamp of when the Policy was initially created
	CreatedAt     *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3,oneof" json:"created_at,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Policy) ProtoMessage() {}

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

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

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

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

func (x *Policy) GetAssignedTo() string {
	if x != nil && x.AssignedTo != nil {
		return *x.AssignedTo
	}
	return ""
}

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

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

// Identity Service Policy Rule
type Rule struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// A unique identifier for the Rule.
	Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"`
	// A human-readable name for the Rule.
	Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// A human-readable description for the Rule.
	Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"`
	PolicyId    *string `protobuf:"bytes,4,opt,name=policy_id,json=policyId,proto3,oneof" json:"policy_id,omitempty"`
	// The tasks that this Rule applies to.
	Tasks []*Task `protobuf:"bytes,5,rep,name=tasks,proto3" json:"tasks,omitempty"`
	// The action applied for the rule when calling the specified tasks
	Action *RuleAction `protobuf:"varint,6,opt,name=action,proto3,enum=agntcy.identity.service.v1alpha1.RuleAction,oneof" json:"action,omitempty"`
	// Need User Approval for this Rule.
	NeedsApproval *bool `protobuf:"varint,7,opt,name=needs_approval,json=needsApproval,proto3,oneof" json:"needs_approval,omitempty"`
	// CreatedAt records the timestamp of when the Rule was initially created
	CreatedAt     *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,oneof" json:"created_at,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Rule) ProtoMessage() {}

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

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

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

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

func (x *Rule) GetPolicyId() string {
	if x != nil && x.PolicyId != nil {
		return *x.PolicyId
	}
	return ""
}

func (x *Rule) GetTasks() []*Task {
	if x != nil {
		return x.Tasks
	}
	return nil
}

func (x *Rule) GetAction() RuleAction {
	if x != nil && x.Action != nil {
		return *x.Action
	}
	return RuleAction_RULE_ACTION_UNSPECIFIED
}

func (x *Rule) GetNeedsApproval() bool {
	if x != nil && x.NeedsApproval != nil {
		return *x.NeedsApproval
	}
	return false
}

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

// Identity Service Policy Task
type Task struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// A unique identifier for the Task.
	Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"`
	// A human-readable name for the Task.
	Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// A human-readable description for the Task.
	Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"`
	// An application ID for the Task.
	AppId *string `protobuf:"bytes,4,opt,name=app_id,json=appId,proto3,oneof" json:"app_id,omitempty"`
	// A tool name for the Task.
	ToolName      *string `protobuf:"bytes,5,opt,name=tool_name,json=toolName,proto3,oneof" json:"tool_name,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Task) ProtoMessage() {}

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

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

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

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

func (x *Task) GetAppId() string {
	if x != nil && x.AppId != nil {
		return *x.AppId
	}
	return ""
}

func (x *Task) GetToolName() string {
	if x != nil && x.ToolName != nil {
		return *x.ToolName
	}
	return ""
}

var File_agntcy_identity_service_v1alpha1_policy_proto protoreflect.FileDescriptor

const file_agntcy_identity_service_v1alpha1_policy_proto_rawDesc = "" +
	"\n" +
	"-agntcy/identity/service/v1alpha1/policy.proto\x12 agntcy.identity.service.v1alpha1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xde\x02\n" +
	"\x06Policy\x12\x18\n" +
	"\x02id\x18\x01 \x01(\tB\x03\xe0A\x03H\x00R\x02id\x88\x01\x01\x12\x1c\n" +
	"\x04name\x18\x02 \x01(\tB\x03\xe0A\x02H\x01R\x04name\x88\x01\x01\x12*\n" +
	"\vdescription\x18\x03 \x01(\tB\x03\xe0A\x01H\x02R\vdescription\x88\x01\x01\x12)\n" +
	"\vassigned_to\x18\x04 \x01(\tB\x03\xe0A\x02H\x03R\n" +
	"assignedTo\x88\x01\x01\x12A\n" +
	"\x05rules\x18\x05 \x03(\v2&.agntcy.identity.service.v1alpha1.RuleB\x03\xe0A\x02R\x05rules\x12C\n" +
	"\n" +
	"created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03H\x04R\tcreatedAt\x88\x01\x01B\x05\n" +
	"\x03_idB\a\n" +
	"\x05_nameB\x0e\n" +
	"\f_descriptionB\x0e\n" +
	"\f_assigned_toB\r\n" +
	"\v_created_at\"\xf5\x03\n" +
	"\x04Rule\x12\x18\n" +
	"\x02id\x18\x01 \x01(\tB\x03\xe0A\x03H\x00R\x02id\x88\x01\x01\x12\x1c\n" +
	"\x04name\x18\x02 \x01(\tB\x03\xe0A\x02H\x01R\x04name\x88\x01\x01\x12*\n" +
	"\vdescription\x18\x03 \x01(\tB\x03\xe0A\x01H\x02R\vdescription\x88\x01\x01\x12%\n" +
	"\tpolicy_id\x18\x04 \x01(\tB\x03\xe0A\x03H\x03R\bpolicyId\x88\x01\x01\x12A\n" +
	"\x05tasks\x18\x05 \x03(\v2&.agntcy.identity.service.v1alpha1.TaskB\x03\xe0A\x02R\x05tasks\x12N\n" +
	"\x06action\x18\x06 \x01(\x0e2,.agntcy.identity.service.v1alpha1.RuleActionB\x03\xe0A\x02H\x04R\x06action\x88\x01\x01\x12/\n" +
	"\x0eneeds_approval\x18\a \x01(\bB\x03\xe0A\x02H\x05R\rneedsApproval\x88\x01\x01\x12C\n" +
	"\n" +
	"created_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03H\x06R\tcreatedAt\x88\x01\x01B\x05\n" +
	"\x03_idB\a\n" +
	"\x05_nameB\x0e\n" +
	"\f_descriptionB\f\n" +
	"\n" +
	"_policy_idB\t\n" +
	"\a_actionB\x11\n" +
	"\x0f_needs_approvalB\r\n" +
	"\v_created_at\"\xeb\x01\n" +
	"\x04Task\x12\x18\n" +
	"\x02id\x18\x01 \x01(\tB\x03\xe0A\x03H\x00R\x02id\x88\x01\x01\x12\x1c\n" +
	"\x04name\x18\x02 \x01(\tB\x03\xe0A\x03H\x01R\x04name\x88\x01\x01\x12*\n" +
	"\vdescription\x18\x03 \x01(\tB\x03\xe0A\x03H\x02R\vdescription\x88\x01\x01\x12\x1f\n" +
	"\x06app_id\x18\x04 \x01(\tB\x03\xe0A\x03H\x03R\x05appId\x88\x01\x01\x12%\n" +
	"\ttool_name\x18\x05 \x01(\tB\x03\xe0A\x03H\x04R\btoolName\x88\x01\x01B\x05\n" +
	"\x03_idB\a\n" +
	"\x05_nameB\x0e\n" +
	"\f_descriptionB\t\n" +
	"\a_app_idB\f\n" +
	"\n" +
	"_tool_name*V\n" +
	"\n" +
	"RuleAction\x12\x1b\n" +
	"\x17RULE_ACTION_UNSPECIFIED\x10\x00\x12\x15\n" +
	"\x11RULE_ACTION_ALLOW\x10\x01\x12\x14\n" +
	"\x10RULE_ACTION_DENY\x10\x02BhZfgithub.com/agntcy/identity-service/api/server/agntcy/identity/service/v1alpha1;identity_service_sdk_gob\x06proto3"

var (
	file_agntcy_identity_service_v1alpha1_policy_proto_rawDescOnce sync.Once
	file_agntcy_identity_service_v1alpha1_policy_proto_rawDescData []byte
)

func file_agntcy_identity_service_v1alpha1_policy_proto_rawDescGZIP() []byte {
	file_agntcy_identity_service_v1alpha1_policy_proto_rawDescOnce.Do(func() {
		file_agntcy_identity_service_v1alpha1_policy_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_agntcy_identity_service_v1alpha1_policy_proto_rawDesc), len(file_agntcy_identity_service_v1alpha1_policy_proto_rawDesc)))
	})
	return file_agntcy_identity_service_v1alpha1_policy_proto_rawDescData
}

var file_agntcy_identity_service_v1alpha1_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_agntcy_identity_service_v1alpha1_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_agntcy_identity_service_v1alpha1_policy_proto_goTypes = []any{
	(RuleAction)(0),               // 0: agntcy.identity.service.v1alpha1.RuleAction
	(*Policy)(nil),                // 1: agntcy.identity.service.v1alpha1.Policy
	(*Rule)(nil),                  // 2: agntcy.identity.service.v1alpha1.Rule
	(*Task)(nil),                  // 3: agntcy.identity.service.v1alpha1.Task
	(*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp
}
var file_agntcy_identity_service_v1alpha1_policy_proto_depIdxs = []int32{
	2, // 0: agntcy.identity.service.v1alpha1.Policy.rules:type_name -> agntcy.identity.service.v1alpha1.Rule
	4, // 1: agntcy.identity.service.v1alpha1.Policy.created_at:type_name -> google.protobuf.Timestamp
	3, // 2: agntcy.identity.service.v1alpha1.Rule.tasks:type_name -> agntcy.identity.service.v1alpha1.Task
	0, // 3: agntcy.identity.service.v1alpha1.Rule.action:type_name -> agntcy.identity.service.v1alpha1.RuleAction
	4, // 4: agntcy.identity.service.v1alpha1.Rule.created_at:type_name -> google.protobuf.Timestamp
	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_agntcy_identity_service_v1alpha1_policy_proto_init() }
func file_agntcy_identity_service_v1alpha1_policy_proto_init() {
	if File_agntcy_identity_service_v1alpha1_policy_proto != nil {
		return
	}
	file_agntcy_identity_service_v1alpha1_policy_proto_msgTypes[0].OneofWrappers = []any{}
	file_agntcy_identity_service_v1alpha1_policy_proto_msgTypes[1].OneofWrappers = []any{}
	file_agntcy_identity_service_v1alpha1_policy_proto_msgTypes[2].OneofWrappers = []any{}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_agntcy_identity_service_v1alpha1_policy_proto_rawDesc), len(file_agntcy_identity_service_v1alpha1_policy_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_agntcy_identity_service_v1alpha1_policy_proto_goTypes,
		DependencyIndexes: file_agntcy_identity_service_v1alpha1_policy_proto_depIdxs,
		EnumInfos:         file_agntcy_identity_service_v1alpha1_policy_proto_enumTypes,
		MessageInfos:      file_agntcy_identity_service_v1alpha1_policy_proto_msgTypes,
	}.Build()
	File_agntcy_identity_service_v1alpha1_policy_proto = out.File
	file_agntcy_identity_service_v1alpha1_policy_proto_goTypes = nil
	file_agntcy_identity_service_v1alpha1_policy_proto_depIdxs = nil
}
