// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.8
// 	protoc        (unknown)
// source: authzed/api/v1/core.proto

package v1

import (
	_ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	structpb "google.golang.org/protobuf/types/known/structpb"
	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 RelationshipUpdate_Operation int32

const (
	RelationshipUpdate_OPERATION_UNSPECIFIED RelationshipUpdate_Operation = 0
	RelationshipUpdate_OPERATION_CREATE      RelationshipUpdate_Operation = 1
	RelationshipUpdate_OPERATION_TOUCH       RelationshipUpdate_Operation = 2
	RelationshipUpdate_OPERATION_DELETE      RelationshipUpdate_Operation = 3
)

// Enum value maps for RelationshipUpdate_Operation.
var (
	RelationshipUpdate_Operation_name = map[int32]string{
		0: "OPERATION_UNSPECIFIED",
		1: "OPERATION_CREATE",
		2: "OPERATION_TOUCH",
		3: "OPERATION_DELETE",
	}
	RelationshipUpdate_Operation_value = map[string]int32{
		"OPERATION_UNSPECIFIED": 0,
		"OPERATION_CREATE":      1,
		"OPERATION_TOUCH":       2,
		"OPERATION_DELETE":      3,
	}
)

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

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

func (RelationshipUpdate_Operation) Descriptor() protoreflect.EnumDescriptor {
	return file_authzed_api_v1_core_proto_enumTypes[0].Descriptor()
}

func (RelationshipUpdate_Operation) Type() protoreflect.EnumType {
	return &file_authzed_api_v1_core_proto_enumTypes[0]
}

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

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

type AlgebraicSubjectSet_Operation int32

const (
	AlgebraicSubjectSet_OPERATION_UNSPECIFIED  AlgebraicSubjectSet_Operation = 0
	AlgebraicSubjectSet_OPERATION_UNION        AlgebraicSubjectSet_Operation = 1
	AlgebraicSubjectSet_OPERATION_INTERSECTION AlgebraicSubjectSet_Operation = 2
	AlgebraicSubjectSet_OPERATION_EXCLUSION    AlgebraicSubjectSet_Operation = 3
)

// Enum value maps for AlgebraicSubjectSet_Operation.
var (
	AlgebraicSubjectSet_Operation_name = map[int32]string{
		0: "OPERATION_UNSPECIFIED",
		1: "OPERATION_UNION",
		2: "OPERATION_INTERSECTION",
		3: "OPERATION_EXCLUSION",
	}
	AlgebraicSubjectSet_Operation_value = map[string]int32{
		"OPERATION_UNSPECIFIED":  0,
		"OPERATION_UNION":        1,
		"OPERATION_INTERSECTION": 2,
		"OPERATION_EXCLUSION":    3,
	}
)

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

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

func (AlgebraicSubjectSet_Operation) Descriptor() protoreflect.EnumDescriptor {
	return file_authzed_api_v1_core_proto_enumTypes[1].Descriptor()
}

func (AlgebraicSubjectSet_Operation) Type() protoreflect.EnumType {
	return &file_authzed_api_v1_core_proto_enumTypes[1]
}

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

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

// Relationship specifies how a resource relates to a subject. Relationships
// form the data for the graph over which all permissions questions are
// answered.
type Relationship struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// resource is the resource to which the subject is related, in some manner
	Resource *ObjectReference `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// relation is how the resource and subject are related.
	Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"`
	// subject is the subject to which the resource is related, in some manner.
	Subject *SubjectReference `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
	// optional_caveat is a reference to a the caveat that must be enforced over the relationship
	OptionalCaveat *ContextualizedCaveat `protobuf:"bytes,4,opt,name=optional_caveat,json=optionalCaveat,proto3" json:"optional_caveat,omitempty"`
	// optional_expires_at is the time at which the relationship expires, if any.
	OptionalExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=optional_expires_at,json=optionalExpiresAt,proto3" json:"optional_expires_at,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

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

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

func (*Relationship) ProtoMessage() {}

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

func (x *Relationship) GetResource() *ObjectReference {
	if x != nil {
		return x.Resource
	}
	return nil
}

func (x *Relationship) GetRelation() string {
	if x != nil {
		return x.Relation
	}
	return ""
}

func (x *Relationship) GetSubject() *SubjectReference {
	if x != nil {
		return x.Subject
	}
	return nil
}

func (x *Relationship) GetOptionalCaveat() *ContextualizedCaveat {
	if x != nil {
		return x.OptionalCaveat
	}
	return nil
}

func (x *Relationship) GetOptionalExpiresAt() *timestamppb.Timestamp {
	if x != nil {
		return x.OptionalExpiresAt
	}
	return nil
}

// ContextualizedCaveat represents a reference to a caveat to be used by caveated relationships.
// The context consists of key-value pairs that will be injected at evaluation time.
// The keys must match the arguments defined on the caveat in the schema.
type ContextualizedCaveat struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// caveat_name is the name of the caveat expression to use, as defined in the schema
	CaveatName string `protobuf:"bytes,1,opt,name=caveat_name,json=caveatName,proto3" json:"caveat_name,omitempty"`
	// context consists of any named values that are defined at write time for the caveat expression
	Context       *structpb.Struct `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ContextualizedCaveat) ProtoMessage() {}

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

func (x *ContextualizedCaveat) GetCaveatName() string {
	if x != nil {
		return x.CaveatName
	}
	return ""
}

func (x *ContextualizedCaveat) GetContext() *structpb.Struct {
	if x != nil {
		return x.Context
	}
	return nil
}

// SubjectReference is used for referring to the subject portion of a
// Relationship. The relation component is optional and is used for defining a
// sub-relation on the subject, e.g. group:123#members
type SubjectReference struct {
	state            protoimpl.MessageState `protogen:"open.v1"`
	Object           *ObjectReference       `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"`
	OptionalRelation string                 `protobuf:"bytes,2,opt,name=optional_relation,json=optionalRelation,proto3" json:"optional_relation,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

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

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

func (*SubjectReference) ProtoMessage() {}

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

func (x *SubjectReference) GetObject() *ObjectReference {
	if x != nil {
		return x.Object
	}
	return nil
}

func (x *SubjectReference) GetOptionalRelation() string {
	if x != nil {
		return x.OptionalRelation
	}
	return ""
}

// ObjectReference is used to refer to a specific object in the system.
type ObjectReference struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	ObjectType    string                 `protobuf:"bytes,1,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"`
	ObjectId      string                 `protobuf:"bytes,2,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ObjectReference) ProtoMessage() {}

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

func (x *ObjectReference) GetObjectType() string {
	if x != nil {
		return x.ObjectType
	}
	return ""
}

func (x *ObjectReference) GetObjectId() string {
	if x != nil {
		return x.ObjectId
	}
	return ""
}

// ZedToken is used to provide causality metadata between Write and Check
// requests.
//
// See the authzed.api.v1.Consistency message for more information.
type ZedToken struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Token         string                 `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ZedToken) ProtoMessage() {}

func (x *ZedToken) ProtoReflect() protoreflect.Message {
	mi := &file_authzed_api_v1_core_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 ZedToken.ProtoReflect.Descriptor instead.
func (*ZedToken) Descriptor() ([]byte, []int) {
	return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{4}
}

func (x *ZedToken) GetToken() string {
	if x != nil {
		return x.Token
	}
	return ""
}

// Cursor is used to provide resumption of listing between calls to APIs
// such as LookupResources.
type Cursor struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Token         string                 `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Cursor) ProtoMessage() {}

func (x *Cursor) ProtoReflect() protoreflect.Message {
	mi := &file_authzed_api_v1_core_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 Cursor.ProtoReflect.Descriptor instead.
func (*Cursor) Descriptor() ([]byte, []int) {
	return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{5}
}

func (x *Cursor) GetToken() string {
	if x != nil {
		return x.Token
	}
	return ""
}

// RelationshipUpdate is used for mutating a single relationship within the
// service.
//
// CREATE will create the relationship only if it doesn't exist, and error
// otherwise.
//
// TOUCH will upsert the relationship, and will not error if it
// already exists.
//
// DELETE will delete the relationship. If the relationship does not exist,
// this operation will no-op.
type RelationshipUpdate struct {
	state         protoimpl.MessageState       `protogen:"open.v1"`
	Operation     RelationshipUpdate_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=authzed.api.v1.RelationshipUpdate_Operation" json:"operation,omitempty"`
	Relationship  *Relationship                `protobuf:"bytes,2,opt,name=relationship,proto3" json:"relationship,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RelationshipUpdate) ProtoMessage() {}

func (x *RelationshipUpdate) ProtoReflect() protoreflect.Message {
	mi := &file_authzed_api_v1_core_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 RelationshipUpdate.ProtoReflect.Descriptor instead.
func (*RelationshipUpdate) Descriptor() ([]byte, []int) {
	return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{6}
}

func (x *RelationshipUpdate) GetOperation() RelationshipUpdate_Operation {
	if x != nil {
		return x.Operation
	}
	return RelationshipUpdate_OPERATION_UNSPECIFIED
}

func (x *RelationshipUpdate) GetRelationship() *Relationship {
	if x != nil {
		return x.Relationship
	}
	return nil
}

// PermissionRelationshipTree is used for representing a tree of a resource and
// its permission relationships with other objects.
type PermissionRelationshipTree struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to TreeType:
	//
	//	*PermissionRelationshipTree_Intermediate
	//	*PermissionRelationshipTree_Leaf
	TreeType         isPermissionRelationshipTree_TreeType `protobuf_oneof:"tree_type"`
	ExpandedObject   *ObjectReference                      `protobuf:"bytes,3,opt,name=expanded_object,json=expandedObject,proto3" json:"expanded_object,omitempty"`
	ExpandedRelation string                                `protobuf:"bytes,4,opt,name=expanded_relation,json=expandedRelation,proto3" json:"expanded_relation,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

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

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

func (*PermissionRelationshipTree) ProtoMessage() {}

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

func (x *PermissionRelationshipTree) GetTreeType() isPermissionRelationshipTree_TreeType {
	if x != nil {
		return x.TreeType
	}
	return nil
}

func (x *PermissionRelationshipTree) GetIntermediate() *AlgebraicSubjectSet {
	if x != nil {
		if x, ok := x.TreeType.(*PermissionRelationshipTree_Intermediate); ok {
			return x.Intermediate
		}
	}
	return nil
}

func (x *PermissionRelationshipTree) GetLeaf() *DirectSubjectSet {
	if x != nil {
		if x, ok := x.TreeType.(*PermissionRelationshipTree_Leaf); ok {
			return x.Leaf
		}
	}
	return nil
}

func (x *PermissionRelationshipTree) GetExpandedObject() *ObjectReference {
	if x != nil {
		return x.ExpandedObject
	}
	return nil
}

func (x *PermissionRelationshipTree) GetExpandedRelation() string {
	if x != nil {
		return x.ExpandedRelation
	}
	return ""
}

type isPermissionRelationshipTree_TreeType interface {
	isPermissionRelationshipTree_TreeType()
}

type PermissionRelationshipTree_Intermediate struct {
	Intermediate *AlgebraicSubjectSet `protobuf:"bytes,1,opt,name=intermediate,proto3,oneof"`
}

type PermissionRelationshipTree_Leaf struct {
	Leaf *DirectSubjectSet `protobuf:"bytes,2,opt,name=leaf,proto3,oneof"`
}

func (*PermissionRelationshipTree_Intermediate) isPermissionRelationshipTree_TreeType() {}

func (*PermissionRelationshipTree_Leaf) isPermissionRelationshipTree_TreeType() {}

// AlgebraicSubjectSet is a subject set which is computed based on applying the
// specified operation to the operands according to the algebra of sets.
//
// UNION is a logical set containing the subject members from all operands.
//
// INTERSECTION is a logical set containing only the subject members which are
// present in all operands.
//
// EXCLUSION is a logical set containing only the subject members which are
// present in the first operand, and none of the other operands.
type AlgebraicSubjectSet struct {
	state         protoimpl.MessageState        `protogen:"open.v1"`
	Operation     AlgebraicSubjectSet_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=authzed.api.v1.AlgebraicSubjectSet_Operation" json:"operation,omitempty"`
	Children      []*PermissionRelationshipTree `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *AlgebraicSubjectSet) Reset() {
	*x = AlgebraicSubjectSet{}
	mi := &file_authzed_api_v1_core_proto_msgTypes[8]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*AlgebraicSubjectSet) ProtoMessage() {}

func (x *AlgebraicSubjectSet) ProtoReflect() protoreflect.Message {
	mi := &file_authzed_api_v1_core_proto_msgTypes[8]
	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 AlgebraicSubjectSet.ProtoReflect.Descriptor instead.
func (*AlgebraicSubjectSet) Descriptor() ([]byte, []int) {
	return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{8}
}

func (x *AlgebraicSubjectSet) GetOperation() AlgebraicSubjectSet_Operation {
	if x != nil {
		return x.Operation
	}
	return AlgebraicSubjectSet_OPERATION_UNSPECIFIED
}

func (x *AlgebraicSubjectSet) GetChildren() []*PermissionRelationshipTree {
	if x != nil {
		return x.Children
	}
	return nil
}

// DirectSubjectSet is a subject set which is simply a collection of subjects.
type DirectSubjectSet struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Subjects      []*SubjectReference    `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *DirectSubjectSet) Reset() {
	*x = DirectSubjectSet{}
	mi := &file_authzed_api_v1_core_proto_msgTypes[9]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*DirectSubjectSet) ProtoMessage() {}

func (x *DirectSubjectSet) ProtoReflect() protoreflect.Message {
	mi := &file_authzed_api_v1_core_proto_msgTypes[9]
	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 DirectSubjectSet.ProtoReflect.Descriptor instead.
func (*DirectSubjectSet) Descriptor() ([]byte, []int) {
	return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{9}
}

func (x *DirectSubjectSet) GetSubjects() []*SubjectReference {
	if x != nil {
		return x.Subjects
	}
	return nil
}

// PartialCaveatInfo carries information necessary for the client to take action
// in the event a response contains a partially evaluated caveat
type PartialCaveatInfo struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// missing_required_context is a list of one or more fields that were missing and prevented caveats
	// from being fully evaluated
	MissingRequiredContext []string `protobuf:"bytes,1,rep,name=missing_required_context,json=missingRequiredContext,proto3" json:"missing_required_context,omitempty"`
	unknownFields          protoimpl.UnknownFields
	sizeCache              protoimpl.SizeCache
}

func (x *PartialCaveatInfo) Reset() {
	*x = PartialCaveatInfo{}
	mi := &file_authzed_api_v1_core_proto_msgTypes[10]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*PartialCaveatInfo) ProtoMessage() {}

func (x *PartialCaveatInfo) ProtoReflect() protoreflect.Message {
	mi := &file_authzed_api_v1_core_proto_msgTypes[10]
	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 PartialCaveatInfo.ProtoReflect.Descriptor instead.
func (*PartialCaveatInfo) Descriptor() ([]byte, []int) {
	return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{10}
}

func (x *PartialCaveatInfo) GetMissingRequiredContext() []string {
	if x != nil {
		return x.MissingRequiredContext
	}
	return nil
}

var File_authzed_api_v1_core_proto protoreflect.FileDescriptor

const file_authzed_api_v1_core_proto_rawDesc = "" +
	"\n" +
	"\x19authzed/api/v1/core.proto\x12\x0eauthzed.api.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17validate/validate.proto\"\xbe\x03\n" +
	"\fRelationship\x12K\n" +
	"\bresource\x18\x01 \x01(\v2\x1f.authzed.api.v1.ObjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\bresource\x12j\n" +
	"\brelation\x18\x02 \x01(\tBN\xfaB$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$\xbaH$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\brelation\x12J\n" +
	"\asubject\x18\x03 \x01(\v2 .authzed.api.v1.SubjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\asubject\x12]\n" +
	"\x0foptional_caveat\x18\x04 \x01(\v2$.authzed.api.v1.ContextualizedCaveatB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\x0eoptionalCaveat\x12J\n" +
	"\x13optional_expires_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\x11optionalExpiresAt\"\xdd\x01\n" +
	"\x14ContextualizedCaveat\x12\x81\x01\n" +
	"\vcaveat_name\x18\x01 \x01(\tB`\xfaB-r+(\x80\x012&^([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})$\xbaH-r+(\x80\x012&^([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})$R\n" +
	"caveatName\x12A\n" +
	"\acontext\x18\x02 \x01(\v2\x17.google.protobuf.StructB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\acontext\"\xdf\x01\n" +
	"\x10SubjectReference\x12G\n" +
	"\x06object\x18\x01 \x01(\v2\x1f.authzed.api.v1.ObjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\x06object\x12\x81\x01\n" +
	"\x11optional_relation\x18\x02 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x10optionalRelation\"\xb7\x02\n" +
	"\x0fObjectReference\x12\xb2\x01\n" +
	"\vobject_type\x18\x01 \x01(\tB\x90\x01\xfaBErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\xbaHErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\n" +
	"objectType\x12o\n" +
	"\tobject_id\x18\x02 \x01(\tBR\xfaB&r$(\x80\b2\x1f^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)$\xbaH&r$(\x80\b2\x1f^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)$R\bobjectId\"0\n" +
	"\bZedToken\x12$\n" +
	"\x05token\x18\x01 \x01(\tB\x0e\xfaB\x04r\x02 \x01\xbaH\x04r\x02 \x01R\x05token\"6\n" +
	"\x06Cursor\x12,\n" +
	"\x05token\x18\x01 \x01(\tB\x16\xfaB\br\x06 \x01(\x80\xa0\x06\xbaH\br\x06 \x01(\x80\xa0\x06R\x05token\"\xb1\x02\n" +
	"\x12RelationshipUpdate\x12`\n" +
	"\toperation\x18\x01 \x01(\x0e2,.authzed.api.v1.RelationshipUpdate.OperationB\x14\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00R\toperation\x12P\n" +
	"\frelationship\x18\x02 \x01(\v2\x1c.authzed.api.v1.RelationshipB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\frelationship\"g\n" +
	"\tOperation\x12\x19\n" +
	"\x15OPERATION_UNSPECIFIED\x10\x00\x12\x14\n" +
	"\x10OPERATION_CREATE\x10\x01\x12\x13\n" +
	"\x0fOPERATION_TOUCH\x10\x02\x12\x14\n" +
	"\x10OPERATION_DELETE\x10\x03\"\xad\x02\n" +
	"\x1aPermissionRelationshipTree\x12I\n" +
	"\fintermediate\x18\x01 \x01(\v2#.authzed.api.v1.AlgebraicSubjectSetH\x00R\fintermediate\x126\n" +
	"\x04leaf\x18\x02 \x01(\v2 .authzed.api.v1.DirectSubjectSetH\x00R\x04leaf\x12H\n" +
	"\x0fexpanded_object\x18\x03 \x01(\v2\x1f.authzed.api.v1.ObjectReferenceR\x0eexpandedObject\x12+\n" +
	"\x11expanded_relation\x18\x04 \x01(\tR\x10expandedRelationB\x15\n" +
	"\ttree_type\x12\b\xf8B\x01\xbaH\x02\b\x01\"\xcc\x02\n" +
	"\x13AlgebraicSubjectSet\x12a\n" +
	"\toperation\x18\x01 \x01(\x0e2-.authzed.api.v1.AlgebraicSubjectSet.OperationB\x14\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00R\toperation\x12`\n" +
	"\bchildren\x18\x02 \x03(\v2*.authzed.api.v1.PermissionRelationshipTreeB\x18\xfaB\n" +
	"\x92\x01\a\"\x05\x8a\x01\x02\x10\x01\xbaH\b\x92\x01\x05\"\x03\xc8\x01\x01R\bchildren\"p\n" +
	"\tOperation\x12\x19\n" +
	"\x15OPERATION_UNSPECIFIED\x10\x00\x12\x13\n" +
	"\x0fOPERATION_UNION\x10\x01\x12\x1a\n" +
	"\x16OPERATION_INTERSECTION\x10\x02\x12\x17\n" +
	"\x13OPERATION_EXCLUSION\x10\x03\"P\n" +
	"\x10DirectSubjectSet\x12<\n" +
	"\bsubjects\x18\x01 \x03(\v2 .authzed.api.v1.SubjectReferenceR\bsubjects\"_\n" +
	"\x11PartialCaveatInfo\x12J\n" +
	"\x18missing_required_context\x18\x01 \x03(\tB\x10\xfaB\x05\x92\x01\x02\b\x01\xbaH\x05\x92\x01\x02\b\x01R\x16missingRequiredContextBJ\n" +
	"\x12com.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"

var (
	file_authzed_api_v1_core_proto_rawDescOnce sync.Once
	file_authzed_api_v1_core_proto_rawDescData []byte
)

func file_authzed_api_v1_core_proto_rawDescGZIP() []byte {
	file_authzed_api_v1_core_proto_rawDescOnce.Do(func() {
		file_authzed_api_v1_core_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authzed_api_v1_core_proto_rawDesc), len(file_authzed_api_v1_core_proto_rawDesc)))
	})
	return file_authzed_api_v1_core_proto_rawDescData
}

var file_authzed_api_v1_core_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_authzed_api_v1_core_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_authzed_api_v1_core_proto_goTypes = []any{
	(RelationshipUpdate_Operation)(0),  // 0: authzed.api.v1.RelationshipUpdate.Operation
	(AlgebraicSubjectSet_Operation)(0), // 1: authzed.api.v1.AlgebraicSubjectSet.Operation
	(*Relationship)(nil),               // 2: authzed.api.v1.Relationship
	(*ContextualizedCaveat)(nil),       // 3: authzed.api.v1.ContextualizedCaveat
	(*SubjectReference)(nil),           // 4: authzed.api.v1.SubjectReference
	(*ObjectReference)(nil),            // 5: authzed.api.v1.ObjectReference
	(*ZedToken)(nil),                   // 6: authzed.api.v1.ZedToken
	(*Cursor)(nil),                     // 7: authzed.api.v1.Cursor
	(*RelationshipUpdate)(nil),         // 8: authzed.api.v1.RelationshipUpdate
	(*PermissionRelationshipTree)(nil), // 9: authzed.api.v1.PermissionRelationshipTree
	(*AlgebraicSubjectSet)(nil),        // 10: authzed.api.v1.AlgebraicSubjectSet
	(*DirectSubjectSet)(nil),           // 11: authzed.api.v1.DirectSubjectSet
	(*PartialCaveatInfo)(nil),          // 12: authzed.api.v1.PartialCaveatInfo
	(*timestamppb.Timestamp)(nil),      // 13: google.protobuf.Timestamp
	(*structpb.Struct)(nil),            // 14: google.protobuf.Struct
}
var file_authzed_api_v1_core_proto_depIdxs = []int32{
	5,  // 0: authzed.api.v1.Relationship.resource:type_name -> authzed.api.v1.ObjectReference
	4,  // 1: authzed.api.v1.Relationship.subject:type_name -> authzed.api.v1.SubjectReference
	3,  // 2: authzed.api.v1.Relationship.optional_caveat:type_name -> authzed.api.v1.ContextualizedCaveat
	13, // 3: authzed.api.v1.Relationship.optional_expires_at:type_name -> google.protobuf.Timestamp
	14, // 4: authzed.api.v1.ContextualizedCaveat.context:type_name -> google.protobuf.Struct
	5,  // 5: authzed.api.v1.SubjectReference.object:type_name -> authzed.api.v1.ObjectReference
	0,  // 6: authzed.api.v1.RelationshipUpdate.operation:type_name -> authzed.api.v1.RelationshipUpdate.Operation
	2,  // 7: authzed.api.v1.RelationshipUpdate.relationship:type_name -> authzed.api.v1.Relationship
	10, // 8: authzed.api.v1.PermissionRelationshipTree.intermediate:type_name -> authzed.api.v1.AlgebraicSubjectSet
	11, // 9: authzed.api.v1.PermissionRelationshipTree.leaf:type_name -> authzed.api.v1.DirectSubjectSet
	5,  // 10: authzed.api.v1.PermissionRelationshipTree.expanded_object:type_name -> authzed.api.v1.ObjectReference
	1,  // 11: authzed.api.v1.AlgebraicSubjectSet.operation:type_name -> authzed.api.v1.AlgebraicSubjectSet.Operation
	9,  // 12: authzed.api.v1.AlgebraicSubjectSet.children:type_name -> authzed.api.v1.PermissionRelationshipTree
	4,  // 13: authzed.api.v1.DirectSubjectSet.subjects:type_name -> authzed.api.v1.SubjectReference
	14, // [14:14] is the sub-list for method output_type
	14, // [14:14] is the sub-list for method input_type
	14, // [14:14] is the sub-list for extension type_name
	14, // [14:14] is the sub-list for extension extendee
	0,  // [0:14] is the sub-list for field type_name
}

func init() { file_authzed_api_v1_core_proto_init() }
func file_authzed_api_v1_core_proto_init() {
	if File_authzed_api_v1_core_proto != nil {
		return
	}
	file_authzed_api_v1_core_proto_msgTypes[7].OneofWrappers = []any{
		(*PermissionRelationshipTree_Intermediate)(nil),
		(*PermissionRelationshipTree_Leaf)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_authzed_api_v1_core_proto_rawDesc), len(file_authzed_api_v1_core_proto_rawDesc)),
			NumEnums:      2,
			NumMessages:   11,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_authzed_api_v1_core_proto_goTypes,
		DependencyIndexes: file_authzed_api_v1_core_proto_depIdxs,
		EnumInfos:         file_authzed_api_v1_core_proto_enumTypes,
		MessageInfos:      file_authzed_api_v1_core_proto_msgTypes,
	}.Build()
	File_authzed_api_v1_core_proto = out.File
	file_authzed_api_v1_core_proto_goTypes = nil
	file_authzed_api_v1_core_proto_depIdxs = nil
}
