// 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/policy/v1beta1/resource_service.proto

//go:build protoopaque

package policyv1beta1

import (
	_ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
	_ "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/priv/extension/v1beta1"
	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:"opaque.v1"`
	xxx_hidden_ResourceRefs *[]*ResourceRef        `protobuf:"bytes,1,rep,name=resource_refs,json=resourceRefs,proto3"`
	unknownFields           protoimpl.UnknownFields
	sizeCache               protoimpl.SizeCache
}

func (x *GetResourcesRequest) Reset() {
	*x = GetResourcesRequest{}
	mi := &file_buf_registry_policy_v1beta1_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_policy_v1beta1_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 {
		if x.xxx_hidden_ResourceRefs != nil {
			return *x.xxx_hidden_ResourceRefs
		}
	}
	return nil
}

func (x *GetResourcesRequest) SetResourceRefs(v []*ResourceRef) {
	x.xxx_hidden_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.xxx_hidden_ResourceRefs = &b.ResourceRefs
	return m0
}

type GetResourcesResponse struct {
	state                protoimpl.MessageState `protogen:"opaque.v1"`
	xxx_hidden_Resources *[]*Resource           `protobuf:"bytes,1,rep,name=resources,proto3"`
	unknownFields        protoimpl.UnknownFields
	sizeCache            protoimpl.SizeCache
}

func (x *GetResourcesResponse) Reset() {
	*x = GetResourcesResponse{}
	mi := &file_buf_registry_policy_v1beta1_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_policy_v1beta1_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 {
		if x.xxx_hidden_Resources != nil {
			return *x.xxx_hidden_Resources
		}
	}
	return nil
}

func (x *GetResourcesResponse) SetResources(v []*Resource) {
	x.xxx_hidden_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.xxx_hidden_Resources = &b.Resources
	return m0
}

var File_buf_registry_policy_v1beta1_resource_service_proto protoreflect.FileDescriptor

const file_buf_registry_policy_v1beta1_resource_service_proto_rawDesc = "" +
	"\n" +
	"2buf/registry/policy/v1beta1/resource_service.proto\x12\x1bbuf.registry.policy.v1beta1\x1a*buf/registry/policy/v1beta1/resource.proto\x1a3buf/registry/priv/extension/v1beta1/extension.proto\x1a\x1bbuf/validate/validate.proto\"y\n" +
	"\x13GetResourcesRequest\x12Z\n" +
	"\rresource_refs\x18\x01 \x03(\v2(.buf.registry.policy.v1beta1.ResourceRefB\v\xbaH\b\x92\x01\x05\b\x01\x10\xfa\x01R\fresourceRefs:\x06\xea\xc5+\x02\b\x01\"m\n" +
	"\x14GetResourcesResponse\x12M\n" +
	"\tresources\x18\x01 \x03(\v2%.buf.registry.policy.v1beta1.ResourceB\b\xbaH\x05\x92\x01\x02\b\x01R\tresources:\x06\xea\xc5+\x02\x10\x012\x8b\x01\n" +
	"\x0fResourceService\x12x\n" +
	"\fGetResources\x120.buf.registry.policy.v1beta1.GetResourcesRequest\x1a1.buf.registry.policy.v1beta1.GetResourcesResponse\"\x03\x90\x02\x01BaZ_buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/policy/v1beta1;policyv1beta1b\x06proto3"

var file_buf_registry_policy_v1beta1_resource_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_buf_registry_policy_v1beta1_resource_service_proto_goTypes = []any{
	(*GetResourcesRequest)(nil),  // 0: buf.registry.policy.v1beta1.GetResourcesRequest
	(*GetResourcesResponse)(nil), // 1: buf.registry.policy.v1beta1.GetResourcesResponse
	(*ResourceRef)(nil),          // 2: buf.registry.policy.v1beta1.ResourceRef
	(*Resource)(nil),             // 3: buf.registry.policy.v1beta1.Resource
}
var file_buf_registry_policy_v1beta1_resource_service_proto_depIdxs = []int32{
	2, // 0: buf.registry.policy.v1beta1.GetResourcesRequest.resource_refs:type_name -> buf.registry.policy.v1beta1.ResourceRef
	3, // 1: buf.registry.policy.v1beta1.GetResourcesResponse.resources:type_name -> buf.registry.policy.v1beta1.Resource
	0, // 2: buf.registry.policy.v1beta1.ResourceService.GetResources:input_type -> buf.registry.policy.v1beta1.GetResourcesRequest
	1, // 3: buf.registry.policy.v1beta1.ResourceService.GetResources:output_type -> buf.registry.policy.v1beta1.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_policy_v1beta1_resource_service_proto_init() }
func file_buf_registry_policy_v1beta1_resource_service_proto_init() {
	if File_buf_registry_policy_v1beta1_resource_service_proto != nil {
		return
	}
	file_buf_registry_policy_v1beta1_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_policy_v1beta1_resource_service_proto_rawDesc), len(file_buf_registry_policy_v1beta1_resource_service_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_buf_registry_policy_v1beta1_resource_service_proto_goTypes,
		DependencyIndexes: file_buf_registry_policy_v1beta1_resource_service_proto_depIdxs,
		MessageInfos:      file_buf_registry_policy_v1beta1_resource_service_proto_msgTypes,
	}.Build()
	File_buf_registry_policy_v1beta1_resource_service_proto = out.File
	file_buf_registry_policy_v1beta1_resource_service_proto_goTypes = nil
	file_buf_registry_policy_v1beta1_resource_service_proto_depIdxs = nil
}
