// Copyright 2023-2025 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        (unknown)
// source: buf/registry/module/v1/resource_service.proto

//go:build !protoopaque

package modulev1

import (
	_ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	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 GetResourcesRequest struct {
	state protoimpl.MessageState `protogen:"hybrid.v1"`
	// References to request a Resource for.
	//
	// See the documentation on ResourceRef for resource resolution details.
	ResourceRefs  []*ResourceRef `protobuf:"bytes,1,rep,name=resource_refs,json=resourceRefs,proto3" json:"resource_refs,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*GetResourcesRequest) ProtoMessage() {}

func (x *GetResourcesRequest) ProtoReflect() protoreflect.Message {
	mi := &file_buf_registry_module_v1_resource_service_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)
}

func (x *GetResourcesRequest) GetResourceRefs() []*ResourceRef {
	if x != nil {
		return x.ResourceRefs
	}
	return nil
}

func (x *GetResourcesRequest) SetResourceRefs(v []*ResourceRef) {
	x.ResourceRefs = v
}

type GetResourcesRequest_builder struct {
	_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.

	// References to request a Resource for.
	//
	// See the documentation on ResourceRef for resource resolution details.
	ResourceRefs []*ResourceRef
}

func (b0 GetResourcesRequest_builder) Build() *GetResourcesRequest {
	m0 := &GetResourcesRequest{}
	b, x := &b0, m0
	_, _ = b, x
	x.ResourceRefs = b.ResourceRefs
	return m0
}

type GetResourcesResponse struct {
	state protoimpl.MessageState `protogen:"hybrid.v1"`
	// The found Resources in the same order as requested.
	Resources     []*Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*GetResourcesResponse) ProtoMessage() {}

func (x *GetResourcesResponse) ProtoReflect() protoreflect.Message {
	mi := &file_buf_registry_module_v1_resource_service_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)
}

func (x *GetResourcesResponse) GetResources() []*Resource {
	if x != nil {
		return x.Resources
	}
	return nil
}

func (x *GetResourcesResponse) SetResources(v []*Resource) {
	x.Resources = v
}

type GetResourcesResponse_builder struct {
	_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.

	// The found Resources in the same order as requested.
	Resources []*Resource
}

func (b0 GetResourcesResponse_builder) Build() *GetResourcesResponse {
	m0 := &GetResourcesResponse{}
	b, x := &b0, m0
	_, _ = b, x
	x.Resources = b.Resources
	return m0
}

var File_buf_registry_module_v1_resource_service_proto protoreflect.FileDescriptor

const file_buf_registry_module_v1_resource_service_proto_rawDesc = "" +
	"\n" +
	"-buf/registry/module/v1/resource_service.proto\x12\x16buf.registry.module.v1\x1a%buf/registry/module/v1/resource.proto\x1a\x1bbuf/validate/validate.proto\"l\n" +
	"\x13GetResourcesRequest\x12U\n" +
	"\rresource_refs\x18\x01 \x03(\v2#.buf.registry.module.v1.ResourceRefB\v\xbaH\b\x92\x01\x05\b\x01\x10\xfa\x01R\fresourceRefs\"`\n" +
	"\x14GetResourcesResponse\x12H\n" +
	"\tresources\x18\x01 \x03(\v2 .buf.registry.module.v1.ResourceB\b\xbaH\x05\x92\x01\x02\b\x01R\tresources2\x81\x01\n" +
	"\x0fResourceService\x12n\n" +
	"\fGetResources\x12+.buf.registry.module.v1.GetResourcesRequest\x1a,.buf.registry.module.v1.GetResourcesResponse\"\x03\x90\x02\x01BWZUbuf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1;modulev1b\x06proto3"

var file_buf_registry_module_v1_resource_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_buf_registry_module_v1_resource_service_proto_goTypes = []any{
	(*GetResourcesRequest)(nil),  // 0: buf.registry.module.v1.GetResourcesRequest
	(*GetResourcesResponse)(nil), // 1: buf.registry.module.v1.GetResourcesResponse
	(*ResourceRef)(nil),          // 2: buf.registry.module.v1.ResourceRef
	(*Resource)(nil),             // 3: buf.registry.module.v1.Resource
}
var file_buf_registry_module_v1_resource_service_proto_depIdxs = []int32{
	2, // 0: buf.registry.module.v1.GetResourcesRequest.resource_refs:type_name -> buf.registry.module.v1.ResourceRef
	3, // 1: buf.registry.module.v1.GetResourcesResponse.resources:type_name -> buf.registry.module.v1.Resource
	0, // 2: buf.registry.module.v1.ResourceService.GetResources:input_type -> buf.registry.module.v1.GetResourcesRequest
	1, // 3: buf.registry.module.v1.ResourceService.GetResources:output_type -> buf.registry.module.v1.GetResourcesResponse
	3, // [3:4] is the sub-list for method output_type
	2, // [2:3] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_buf_registry_module_v1_resource_service_proto_init() }
func file_buf_registry_module_v1_resource_service_proto_init() {
	if File_buf_registry_module_v1_resource_service_proto != nil {
		return
	}
	file_buf_registry_module_v1_resource_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_registry_module_v1_resource_service_proto_rawDesc), len(file_buf_registry_module_v1_resource_service_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_buf_registry_module_v1_resource_service_proto_goTypes,
		DependencyIndexes: file_buf_registry_module_v1_resource_service_proto_depIdxs,
		MessageInfos:      file_buf_registry_module_v1_resource_service_proto_msgTypes,
	}.Build()
	File_buf_registry_module_v1_resource_service_proto = out.File
	file_buf_registry_module_v1_resource_service_proto_goTypes = nil
	file_buf_registry_module_v1_resource_service_proto_depIdxs = nil
}
