// Copyright 2020-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.9
// 	protoc        (unknown)
// source: buf/alpha/registry/v1alpha1/jsonschema.proto

package registryv1alpha1

import (
	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 GetJSONSchemaRequest struct {
	state                 protoimpl.MessageState `protogen:"opaque.v1"`
	xxx_hidden_Owner      string                 `protobuf:"bytes,1,opt,name=owner,proto3"`
	xxx_hidden_Repository string                 `protobuf:"bytes,2,opt,name=repository,proto3"`
	xxx_hidden_Reference  string                 `protobuf:"bytes,3,opt,name=reference,proto3"`
	xxx_hidden_TypeName   string                 `protobuf:"bytes,4,opt,name=type_name,json=typeName,proto3"`
	unknownFields         protoimpl.UnknownFields
	sizeCache             protoimpl.SizeCache
}

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

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

func (*GetJSONSchemaRequest) ProtoMessage() {}

func (x *GetJSONSchemaRequest) ProtoReflect() protoreflect.Message {
	mi := &file_buf_alpha_registry_v1alpha1_jsonschema_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 *GetJSONSchemaRequest) GetOwner() string {
	if x != nil {
		return x.xxx_hidden_Owner
	}
	return ""
}

func (x *GetJSONSchemaRequest) GetRepository() string {
	if x != nil {
		return x.xxx_hidden_Repository
	}
	return ""
}

func (x *GetJSONSchemaRequest) GetReference() string {
	if x != nil {
		return x.xxx_hidden_Reference
	}
	return ""
}

func (x *GetJSONSchemaRequest) GetTypeName() string {
	if x != nil {
		return x.xxx_hidden_TypeName
	}
	return ""
}

func (x *GetJSONSchemaRequest) SetOwner(v string) {
	x.xxx_hidden_Owner = v
}

func (x *GetJSONSchemaRequest) SetRepository(v string) {
	x.xxx_hidden_Repository = v
}

func (x *GetJSONSchemaRequest) SetReference(v string) {
	x.xxx_hidden_Reference = v
}

func (x *GetJSONSchemaRequest) SetTypeName(v string) {
	x.xxx_hidden_TypeName = v
}

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

	Owner      string
	Repository string
	// Optional reference (if unspecified, will use the repository's default_branch).
	Reference string
	// A fully qualified name of the type to generate a JSONSchema for, e.g.
	// "pkg.foo.Bar". The type needs to resolve in the referenced module or any of
	// its dependencies. Currently only messages types are supported.
	TypeName string
}

func (b0 GetJSONSchemaRequest_builder) Build() *GetJSONSchemaRequest {
	m0 := &GetJSONSchemaRequest{}
	b, x := &b0, m0
	_, _ = b, x
	x.xxx_hidden_Owner = b.Owner
	x.xxx_hidden_Repository = b.Repository
	x.xxx_hidden_Reference = b.Reference
	x.xxx_hidden_TypeName = b.TypeName
	return m0
}

type GetJSONSchemaResponse struct {
	state                 protoimpl.MessageState `protogen:"opaque.v1"`
	xxx_hidden_JsonSchema []byte                 `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema,proto3"`
	unknownFields         protoimpl.UnknownFields
	sizeCache             protoimpl.SizeCache
}

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

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

func (*GetJSONSchemaResponse) ProtoMessage() {}

func (x *GetJSONSchemaResponse) ProtoReflect() protoreflect.Message {
	mi := &file_buf_alpha_registry_v1alpha1_jsonschema_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 *GetJSONSchemaResponse) GetJsonSchema() []byte {
	if x != nil {
		return x.xxx_hidden_JsonSchema
	}
	return nil
}

func (x *GetJSONSchemaResponse) SetJsonSchema(v []byte) {
	if v == nil {
		v = []byte{}
	}
	x.xxx_hidden_JsonSchema = v
}

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

	// A json schema representing what the json encoded payload for type_name
	// should conform to. This schema is an approximation to be used by editors
	// for validation and autocompletion, not a lossless representation of the
	// type's descriptor.
	JsonSchema []byte
}

func (b0 GetJSONSchemaResponse_builder) Build() *GetJSONSchemaResponse {
	m0 := &GetJSONSchemaResponse{}
	b, x := &b0, m0
	_, _ = b, x
	x.xxx_hidden_JsonSchema = b.JsonSchema
	return m0
}

var File_buf_alpha_registry_v1alpha1_jsonschema_proto protoreflect.FileDescriptor

const file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDesc = "" +
	"\n" +
	",buf/alpha/registry/v1alpha1/jsonschema.proto\x12\x1bbuf.alpha.registry.v1alpha1\"\x87\x01\n" +
	"\x14GetJSONSchemaRequest\x12\x14\n" +
	"\x05owner\x18\x01 \x01(\tR\x05owner\x12\x1e\n" +
	"\n" +
	"repository\x18\x02 \x01(\tR\n" +
	"repository\x12\x1c\n" +
	"\treference\x18\x03 \x01(\tR\treference\x12\x1b\n" +
	"\ttype_name\x18\x04 \x01(\tR\btypeName\"8\n" +
	"\x15GetJSONSchemaResponse\x12\x1f\n" +
	"\vjson_schema\x18\x01 \x01(\fR\n" +
	"jsonSchema2\x90\x01\n" +
	"\x11JSONSchemaService\x12{\n" +
	"\rGetJSONSchema\x121.buf.alpha.registry.v1alpha1.GetJSONSchemaRequest\x1a2.buf.alpha.registry.v1alpha1.GetJSONSchemaResponse\"\x03\x90\x02\x01B\x9c\x02\n" +
	"\x1fcom.buf.alpha.registry.v1alpha1B\x0fJsonschemaProtoP\x01ZYgithub.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1;registryv1alpha1\xa2\x02\x03BAR\xaa\x02\x1bBuf.Alpha.Registry.V1alpha1\xca\x02\x1bBuf\\Alpha\\Registry\\V1alpha1\xe2\x02'Buf\\Alpha\\Registry\\V1alpha1\\GPBMetadata\xea\x02\x1eBuf::Alpha::Registry::V1alpha1b\x06proto3"

var file_buf_alpha_registry_v1alpha1_jsonschema_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_buf_alpha_registry_v1alpha1_jsonschema_proto_goTypes = []any{
	(*GetJSONSchemaRequest)(nil),  // 0: buf.alpha.registry.v1alpha1.GetJSONSchemaRequest
	(*GetJSONSchemaResponse)(nil), // 1: buf.alpha.registry.v1alpha1.GetJSONSchemaResponse
}
var file_buf_alpha_registry_v1alpha1_jsonschema_proto_depIdxs = []int32{
	0, // 0: buf.alpha.registry.v1alpha1.JSONSchemaService.GetJSONSchema:input_type -> buf.alpha.registry.v1alpha1.GetJSONSchemaRequest
	1, // 1: buf.alpha.registry.v1alpha1.JSONSchemaService.GetJSONSchema:output_type -> buf.alpha.registry.v1alpha1.GetJSONSchemaResponse
	1, // [1:2] is the sub-list for method output_type
	0, // [0:1] is the sub-list for method input_type
	0, // [0:0] is the sub-list for extension type_name
	0, // [0:0] is the sub-list for extension extendee
	0, // [0:0] is the sub-list for field type_name
}

func init() { file_buf_alpha_registry_v1alpha1_jsonschema_proto_init() }
func file_buf_alpha_registry_v1alpha1_jsonschema_proto_init() {
	if File_buf_alpha_registry_v1alpha1_jsonschema_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDesc), len(file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_buf_alpha_registry_v1alpha1_jsonschema_proto_goTypes,
		DependencyIndexes: file_buf_alpha_registry_v1alpha1_jsonschema_proto_depIdxs,
		MessageInfos:      file_buf_alpha_registry_v1alpha1_jsonschema_proto_msgTypes,
	}.Build()
	File_buf_alpha_registry_v1alpha1_jsonschema_proto = out.File
	file_buf_alpha_registry_v1alpha1_jsonschema_proto_goTypes = nil
	file_buf_alpha_registry_v1alpha1_jsonschema_proto_depIdxs = nil
}
