// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v3.11.4
// source: github.com/moby/buildkit/sourcepolicy/policysession/policysession.proto

package policysession

import (
	pb1 "github.com/moby/buildkit/frontend/gateway/pb"
	pb "github.com/moby/buildkit/solver/pb"
	pb2 "github.com/moby/buildkit/sourcepolicy/pb"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	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 CheckPolicyRequest struct {
	state         protoimpl.MessageState         `protogen:"open.v1"`
	Platform      *pb.Platform                   `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"`
	Source        *pb1.ResolveSourceMetaResponse `protobuf:"bytes,2,opt,name=Source,proto3" json:"Source,omitempty"`
	Caps          map[string]bool                `protobuf:"bytes,3,rep,name=caps,proto3" json:"caps,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CheckPolicyRequest) ProtoMessage() {}

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

func (x *CheckPolicyRequest) GetPlatform() *pb.Platform {
	if x != nil {
		return x.Platform
	}
	return nil
}

func (x *CheckPolicyRequest) GetSource() *pb1.ResolveSourceMetaResponse {
	if x != nil {
		return x.Source
	}
	return nil
}

func (x *CheckPolicyRequest) GetCaps() map[string]bool {
	if x != nil {
		return x.Caps
	}
	return nil
}

type CheckPolicyResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Result:
	//
	//	*CheckPolicyResponse_Decision
	//	*CheckPolicyResponse_Request
	Result        isCheckPolicyResponse_Result `protobuf_oneof:"result"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CheckPolicyResponse) ProtoMessage() {}

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

func (x *CheckPolicyResponse) GetResult() isCheckPolicyResponse_Result {
	if x != nil {
		return x.Result
	}
	return nil
}

func (x *CheckPolicyResponse) GetDecision() *DecisionResponse {
	if x != nil {
		if x, ok := x.Result.(*CheckPolicyResponse_Decision); ok {
			return x.Decision
		}
	}
	return nil
}

func (x *CheckPolicyResponse) GetRequest() *pb1.ResolveSourceMetaRequest {
	if x != nil {
		if x, ok := x.Result.(*CheckPolicyResponse_Request); ok {
			return x.Request
		}
	}
	return nil
}

type isCheckPolicyResponse_Result interface {
	isCheckPolicyResponse_Result()
}

type CheckPolicyResponse_Decision struct {
	Decision *DecisionResponse `protobuf:"bytes,1,opt,name=decision,proto3,oneof"`
}

type CheckPolicyResponse_Request struct {
	Request *pb1.ResolveSourceMetaRequest `protobuf:"bytes,2,opt,name=request,proto3,oneof"`
}

func (*CheckPolicyResponse_Decision) isCheckPolicyResponse_Result() {}

func (*CheckPolicyResponse_Request) isCheckPolicyResponse_Result() {}

type DecisionResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Action        pb2.PolicyAction       `protobuf:"varint,1,opt,name=action,proto3,enum=moby.buildkit.v1.sourcepolicy.PolicyAction" json:"action,omitempty"`
	DenyMessages  []*DenyMessage         `protobuf:"bytes,2,rep,name=denyMessages,proto3" json:"denyMessages,omitempty"`
	Update        *pb.SourceOp           `protobuf:"bytes,3,opt,name=update,proto3" json:"update,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*DecisionResponse) ProtoMessage() {}

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

func (x *DecisionResponse) GetAction() pb2.PolicyAction {
	if x != nil {
		return x.Action
	}
	return pb2.PolicyAction(0)
}

func (x *DecisionResponse) GetDenyMessages() []*DenyMessage {
	if x != nil {
		return x.DenyMessages
	}
	return nil
}

func (x *DecisionResponse) GetUpdate() *pb.SourceOp {
	if x != nil {
		return x.Update
	}
	return nil
}

type DenyMessage struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Message       string                 `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*DenyMessage) ProtoMessage() {}

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

func (x *DenyMessage) GetMessage() string {
	if x != nil {
		return x.Message
	}
	return ""
}

var File_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto protoreflect.FileDescriptor

const file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_rawDesc = "" +
	"\n" +
	"Ggithub.com/moby/buildkit/sourcepolicy/policysession/policysession.proto\x12+moby.buildkit.v1.sourcepolicy.policysession\x1a:github.com/moby/buildkit/frontend/gateway/pb/gateway.proto\x1a,github.com/moby/buildkit/solver/pb/ops.proto\x1a5github.com/moby/buildkit/sourcepolicy/pb/policy.proto\"\xa4\x02\n" +
	"\x12CheckPolicyRequest\x12(\n" +
	"\bPlatform\x18\x01 \x01(\v2\f.pb.PlatformR\bPlatform\x12L\n" +
	"\x06Source\x18\x02 \x01(\v24.moby.buildkit.v1.frontend.ResolveSourceMetaResponseR\x06Source\x12]\n" +
	"\x04caps\x18\x03 \x03(\v2I.moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyRequest.CapsEntryR\x04caps\x1a7\n" +
	"\tCapsEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\"\xcd\x01\n" +
	"\x13CheckPolicyResponse\x12[\n" +
	"\bdecision\x18\x01 \x01(\v2=.moby.buildkit.v1.sourcepolicy.policysession.DecisionResponseH\x00R\bdecision\x12O\n" +
	"\arequest\x18\x02 \x01(\v23.moby.buildkit.v1.frontend.ResolveSourceMetaRequestH\x00R\arequestB\b\n" +
	"\x06result\"\xdb\x01\n" +
	"\x10DecisionResponse\x12C\n" +
	"\x06action\x18\x01 \x01(\x0e2+.moby.buildkit.v1.sourcepolicy.PolicyActionR\x06action\x12\\\n" +
	"\fdenyMessages\x18\x02 \x03(\v28.moby.buildkit.v1.sourcepolicy.policysession.DenyMessageR\fdenyMessages\x12$\n" +
	"\x06update\x18\x03 \x01(\v2\f.pb.SourceOpR\x06update\"'\n" +
	"\vDenyMessage\x12\x18\n" +
	"\amessage\x18\x01 \x01(\tR\amessage2\xa3\x01\n" +
	"\x0ePolicyVerifier\x12\x90\x01\n" +
	"\vCheckPolicy\x12?.moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyRequest\x1a@.moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyResponseB5Z3github.com/moby/buildkit/sourcepolicy/policysessionb\x06proto3"

var (
	file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_rawDescOnce sync.Once
	file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_rawDescData []byte
)

func file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_rawDescGZIP() []byte {
	file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_rawDescOnce.Do(func() {
		file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_rawDesc), len(file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_rawDesc)))
	})
	return file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_rawDescData
}

var file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_goTypes = []any{
	(*CheckPolicyRequest)(nil),            // 0: moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyRequest
	(*CheckPolicyResponse)(nil),           // 1: moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyResponse
	(*DecisionResponse)(nil),              // 2: moby.buildkit.v1.sourcepolicy.policysession.DecisionResponse
	(*DenyMessage)(nil),                   // 3: moby.buildkit.v1.sourcepolicy.policysession.DenyMessage
	nil,                                   // 4: moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyRequest.CapsEntry
	(*pb.Platform)(nil),                   // 5: pb.Platform
	(*pb1.ResolveSourceMetaResponse)(nil), // 6: moby.buildkit.v1.frontend.ResolveSourceMetaResponse
	(*pb1.ResolveSourceMetaRequest)(nil),  // 7: moby.buildkit.v1.frontend.ResolveSourceMetaRequest
	(pb2.PolicyAction)(0),                 // 8: moby.buildkit.v1.sourcepolicy.PolicyAction
	(*pb.SourceOp)(nil),                   // 9: pb.SourceOp
}
var file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_depIdxs = []int32{
	5, // 0: moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyRequest.Platform:type_name -> pb.Platform
	6, // 1: moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyRequest.Source:type_name -> moby.buildkit.v1.frontend.ResolveSourceMetaResponse
	4, // 2: moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyRequest.caps:type_name -> moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyRequest.CapsEntry
	2, // 3: moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyResponse.decision:type_name -> moby.buildkit.v1.sourcepolicy.policysession.DecisionResponse
	7, // 4: moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyResponse.request:type_name -> moby.buildkit.v1.frontend.ResolveSourceMetaRequest
	8, // 5: moby.buildkit.v1.sourcepolicy.policysession.DecisionResponse.action:type_name -> moby.buildkit.v1.sourcepolicy.PolicyAction
	3, // 6: moby.buildkit.v1.sourcepolicy.policysession.DecisionResponse.denyMessages:type_name -> moby.buildkit.v1.sourcepolicy.policysession.DenyMessage
	9, // 7: moby.buildkit.v1.sourcepolicy.policysession.DecisionResponse.update:type_name -> pb.SourceOp
	0, // 8: moby.buildkit.v1.sourcepolicy.policysession.PolicyVerifier.CheckPolicy:input_type -> moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyRequest
	1, // 9: moby.buildkit.v1.sourcepolicy.policysession.PolicyVerifier.CheckPolicy:output_type -> moby.buildkit.v1.sourcepolicy.policysession.CheckPolicyResponse
	9, // [9:10] is the sub-list for method output_type
	8, // [8:9] is the sub-list for method input_type
	8, // [8:8] is the sub-list for extension type_name
	8, // [8:8] is the sub-list for extension extendee
	0, // [0:8] is the sub-list for field type_name
}

func init() { file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_init() }
func file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_init() {
	if File_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto != nil {
		return
	}
	file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_msgTypes[1].OneofWrappers = []any{
		(*CheckPolicyResponse_Decision)(nil),
		(*CheckPolicyResponse_Request)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_rawDesc), len(file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_goTypes,
		DependencyIndexes: file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_depIdxs,
		MessageInfos:      file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_msgTypes,
	}.Build()
	File_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto = out.File
	file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_goTypes = nil
	file_github_com_moby_buildkit_sourcepolicy_policysession_policysession_proto_depIdxs = nil
}
