// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.31.1
// source: bonanza.build/pkg/proto/model/fetch/fetch.proto

package fetch

import (
	filesystem "bonanza.build/pkg/proto/model/filesystem"
	status "google.golang.org/genproto/googleapis/rpc/status"
	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 SubresourceIntegrity_HashAlgorithm int32

const (
	SubresourceIntegrity_SHA256 SubresourceIntegrity_HashAlgorithm = 0
	SubresourceIntegrity_SHA384 SubresourceIntegrity_HashAlgorithm = 1
	SubresourceIntegrity_SHA512 SubresourceIntegrity_HashAlgorithm = 2
)

// Enum value maps for SubresourceIntegrity_HashAlgorithm.
var (
	SubresourceIntegrity_HashAlgorithm_name = map[int32]string{
		0: "SHA256",
		1: "SHA384",
		2: "SHA512",
	}
	SubresourceIntegrity_HashAlgorithm_value = map[string]int32{
		"SHA256": 0,
		"SHA384": 1,
		"SHA512": 2,
	}
)

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

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

func (SubresourceIntegrity_HashAlgorithm) Descriptor() protoreflect.EnumDescriptor {
	return file_bonanza_build_pkg_proto_model_fetch_fetch_proto_enumTypes[0].Descriptor()
}

func (SubresourceIntegrity_HashAlgorithm) Type() protoreflect.EnumType {
	return &file_bonanza_build_pkg_proto_model_fetch_fetch_proto_enumTypes[0]
}

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

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

type SubresourceIntegrity struct {
	state         protoimpl.MessageState             `protogen:"open.v1"`
	HashAlgorithm SubresourceIntegrity_HashAlgorithm `protobuf:"varint,1,opt,name=hash_algorithm,json=hashAlgorithm,proto3,enum=bonanza.model.fetch.SubresourceIntegrity_HashAlgorithm" json:"hash_algorithm,omitempty"`
	Hash          []byte                             `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*SubresourceIntegrity) ProtoMessage() {}

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

func (x *SubresourceIntegrity) GetHashAlgorithm() SubresourceIntegrity_HashAlgorithm {
	if x != nil {
		return x.HashAlgorithm
	}
	return SubresourceIntegrity_SHA256
}

func (x *SubresourceIntegrity) GetHash() []byte {
	if x != nil {
		return x.Hash
	}
	return nil
}

type Target struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Urls          []string               `protobuf:"bytes,1,rep,name=urls,proto3" json:"urls,omitempty"`
	Integrity     *SubresourceIntegrity  `protobuf:"bytes,2,opt,name=integrity,proto3" json:"integrity,omitempty"`
	Headers       []*Target_Header       `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Target) ProtoMessage() {}

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

func (x *Target) GetUrls() []string {
	if x != nil {
		return x.Urls
	}
	return nil
}

func (x *Target) GetIntegrity() *SubresourceIntegrity {
	if x != nil {
		return x.Integrity
	}
	return nil
}

func (x *Target) GetHeaders() []*Target_Header {
	if x != nil {
		return x.Headers
	}
	return nil
}

type Action struct {
	state                  protoimpl.MessageState             `protogen:"open.v1"`
	FileCreationParameters *filesystem.FileCreationParameters `protobuf:"bytes,1,opt,name=file_creation_parameters,json=fileCreationParameters,proto3" json:"file_creation_parameters,omitempty"`
	Target                 *Target                            `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
	unknownFields          protoimpl.UnknownFields
	sizeCache              protoimpl.SizeCache
}

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

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

func (*Action) ProtoMessage() {}

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

func (x *Action) GetFileCreationParameters() *filesystem.FileCreationParameters {
	if x != nil {
		return x.FileCreationParameters
	}
	return nil
}

func (x *Action) GetTarget() *Target {
	if x != nil {
		return x.Target
	}
	return nil
}

type Result struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Outcome:
	//
	//	*Result_Failure
	//	*Result_Success_
	Outcome       isResult_Outcome `protobuf_oneof:"outcome"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Result) ProtoMessage() {}

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

func (x *Result) GetOutcome() isResult_Outcome {
	if x != nil {
		return x.Outcome
	}
	return nil
}

func (x *Result) GetFailure() *status.Status {
	if x != nil {
		if x, ok := x.Outcome.(*Result_Failure); ok {
			return x.Failure
		}
	}
	return nil
}

func (x *Result) GetSuccess() *Result_Success {
	if x != nil {
		if x, ok := x.Outcome.(*Result_Success_); ok {
			return x.Success
		}
	}
	return nil
}

type isResult_Outcome interface {
	isResult_Outcome()
}

type Result_Failure struct {
	Failure *status.Status `protobuf:"bytes,1,opt,name=failure,proto3,oneof"`
}

type Result_Success_ struct {
	Success *Result_Success `protobuf:"bytes,2,opt,name=success,proto3,oneof"`
}

func (*Result_Failure) isResult_Outcome() {}

func (*Result_Success_) isResult_Outcome() {}

type Target_Header struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Name          string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value         string                 `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Target_Header) ProtoMessage() {}

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

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

func (x *Target_Header) GetValue() string {
	if x != nil {
		return x.Value
	}
	return ""
}

type Result_Success struct {
	state         protoimpl.MessageState   `protogen:"open.v1"`
	Contents      *filesystem.FileContents `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents,omitempty"`
	Sha256        []byte                   `protobuf:"bytes,2,opt,name=sha256,proto3" json:"sha256,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Result_Success) ProtoMessage() {}

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

func (x *Result_Success) GetContents() *filesystem.FileContents {
	if x != nil {
		return x.Contents
	}
	return nil
}

func (x *Result_Success) GetSha256() []byte {
	if x != nil {
		return x.Sha256
	}
	return nil
}

var File_bonanza_build_pkg_proto_model_fetch_fetch_proto protoreflect.FileDescriptor

const file_bonanza_build_pkg_proto_model_fetch_fetch_proto_rawDesc = "" +
	"\n" +
	"/bonanza.build/pkg/proto/model/fetch/fetch.proto\x12\x13bonanza.model.fetch\x1a9bonanza.build/pkg/proto/model/filesystem/filesystem.proto\x1a\x17google/rpc/status.proto\"\xbf\x01\n" +
	"\x14SubresourceIntegrity\x12^\n" +
	"\x0ehash_algorithm\x18\x01 \x01(\x0e27.bonanza.model.fetch.SubresourceIntegrity.HashAlgorithmR\rhashAlgorithm\x12\x12\n" +
	"\x04hash\x18\x02 \x01(\fR\x04hash\"3\n" +
	"\rHashAlgorithm\x12\n" +
	"\n" +
	"\x06SHA256\x10\x00\x12\n" +
	"\n" +
	"\x06SHA384\x10\x01\x12\n" +
	"\n" +
	"\x06SHA512\x10\x02\"\xd7\x01\n" +
	"\x06Target\x12\x12\n" +
	"\x04urls\x18\x01 \x03(\tR\x04urls\x12G\n" +
	"\tintegrity\x18\x02 \x01(\v2).bonanza.model.fetch.SubresourceIntegrityR\tintegrity\x12<\n" +
	"\aheaders\x18\x03 \x03(\v2\".bonanza.model.fetch.Target.HeaderR\aheaders\x1a2\n" +
	"\x06Header\x12\x12\n" +
	"\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
	"\x05value\x18\x02 \x01(\tR\x05value\"\xa9\x01\n" +
	"\x06Action\x12j\n" +
	"\x18file_creation_parameters\x18\x01 \x01(\v20.bonanza.model.filesystem.FileCreationParametersR\x16fileCreationParameters\x123\n" +
	"\x06target\x18\x02 \x01(\v2\x1b.bonanza.model.fetch.TargetR\x06target\"\xeb\x01\n" +
	"\x06Result\x12.\n" +
	"\afailure\x18\x01 \x01(\v2\x12.google.rpc.StatusH\x00R\afailure\x12?\n" +
	"\asuccess\x18\x02 \x01(\v2#.bonanza.model.fetch.Result.SuccessH\x00R\asuccess\x1ae\n" +
	"\aSuccess\x12B\n" +
	"\bcontents\x18\x01 \x01(\v2&.bonanza.model.filesystem.FileContentsR\bcontents\x12\x16\n" +
	"\x06sha256\x18\x02 \x01(\fR\x06sha256B\t\n" +
	"\aoutcomeB%Z#bonanza.build/pkg/proto/model/fetchb\x06proto3"

var (
	file_bonanza_build_pkg_proto_model_fetch_fetch_proto_rawDescOnce sync.Once
	file_bonanza_build_pkg_proto_model_fetch_fetch_proto_rawDescData []byte
)

func file_bonanza_build_pkg_proto_model_fetch_fetch_proto_rawDescGZIP() []byte {
	file_bonanza_build_pkg_proto_model_fetch_fetch_proto_rawDescOnce.Do(func() {
		file_bonanza_build_pkg_proto_model_fetch_fetch_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_bonanza_build_pkg_proto_model_fetch_fetch_proto_rawDesc), len(file_bonanza_build_pkg_proto_model_fetch_fetch_proto_rawDesc)))
	})
	return file_bonanza_build_pkg_proto_model_fetch_fetch_proto_rawDescData
}

var file_bonanza_build_pkg_proto_model_fetch_fetch_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_bonanza_build_pkg_proto_model_fetch_fetch_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_bonanza_build_pkg_proto_model_fetch_fetch_proto_goTypes = []any{
	(SubresourceIntegrity_HashAlgorithm)(0),   // 0: bonanza.model.fetch.SubresourceIntegrity.HashAlgorithm
	(*SubresourceIntegrity)(nil),              // 1: bonanza.model.fetch.SubresourceIntegrity
	(*Target)(nil),                            // 2: bonanza.model.fetch.Target
	(*Action)(nil),                            // 3: bonanza.model.fetch.Action
	(*Result)(nil),                            // 4: bonanza.model.fetch.Result
	(*Target_Header)(nil),                     // 5: bonanza.model.fetch.Target.Header
	(*Result_Success)(nil),                    // 6: bonanza.model.fetch.Result.Success
	(*filesystem.FileCreationParameters)(nil), // 7: bonanza.model.filesystem.FileCreationParameters
	(*status.Status)(nil),                     // 8: google.rpc.Status
	(*filesystem.FileContents)(nil),           // 9: bonanza.model.filesystem.FileContents
}
var file_bonanza_build_pkg_proto_model_fetch_fetch_proto_depIdxs = []int32{
	0, // 0: bonanza.model.fetch.SubresourceIntegrity.hash_algorithm:type_name -> bonanza.model.fetch.SubresourceIntegrity.HashAlgorithm
	1, // 1: bonanza.model.fetch.Target.integrity:type_name -> bonanza.model.fetch.SubresourceIntegrity
	5, // 2: bonanza.model.fetch.Target.headers:type_name -> bonanza.model.fetch.Target.Header
	7, // 3: bonanza.model.fetch.Action.file_creation_parameters:type_name -> bonanza.model.filesystem.FileCreationParameters
	2, // 4: bonanza.model.fetch.Action.target:type_name -> bonanza.model.fetch.Target
	8, // 5: bonanza.model.fetch.Result.failure:type_name -> google.rpc.Status
	6, // 6: bonanza.model.fetch.Result.success:type_name -> bonanza.model.fetch.Result.Success
	9, // 7: bonanza.model.fetch.Result.Success.contents:type_name -> bonanza.model.filesystem.FileContents
	8, // [8:8] is the sub-list for method output_type
	8, // [8:8] 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_bonanza_build_pkg_proto_model_fetch_fetch_proto_init() }
func file_bonanza_build_pkg_proto_model_fetch_fetch_proto_init() {
	if File_bonanza_build_pkg_proto_model_fetch_fetch_proto != nil {
		return
	}
	file_bonanza_build_pkg_proto_model_fetch_fetch_proto_msgTypes[3].OneofWrappers = []any{
		(*Result_Failure)(nil),
		(*Result_Success_)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_bonanza_build_pkg_proto_model_fetch_fetch_proto_rawDesc), len(file_bonanza_build_pkg_proto_model_fetch_fetch_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   6,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_bonanza_build_pkg_proto_model_fetch_fetch_proto_goTypes,
		DependencyIndexes: file_bonanza_build_pkg_proto_model_fetch_fetch_proto_depIdxs,
		EnumInfos:         file_bonanza_build_pkg_proto_model_fetch_fetch_proto_enumTypes,
		MessageInfos:      file_bonanza_build_pkg_proto_model_fetch_fetch_proto_msgTypes,
	}.Build()
	File_bonanza_build_pkg_proto_model_fetch_fetch_proto = out.File
	file_bonanza_build_pkg_proto_model_fetch_fetch_proto_goTypes = nil
	file_bonanza_build_pkg_proto_model_fetch_fetch_proto_depIdxs = nil
}
