// Copyright 2024-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/plugin/info/v1/plugin_info.proto

//go:build !protoopaque

package infov1

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)
)

// Information about a plugin.
type PluginInfo struct {
	state protoimpl.MessageState `protogen:"hybrid.v1"`
	// A long string providing more details on using the plugin.
	//
	// This is equivalent to a README.md in effect.
	Documentation string `protobuf:"bytes,1,opt,name=documentation,proto3" json:"documentation,omitempty"`
	// The license of the plugin.
	License       *License `protobuf:"bytes,2,opt,name=license,proto3" json:"license,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*PluginInfo) ProtoMessage() {}

func (x *PluginInfo) ProtoReflect() protoreflect.Message {
	mi := &file_buf_plugin_info_v1_plugin_info_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 *PluginInfo) GetDocumentation() string {
	if x != nil {
		return x.Documentation
	}
	return ""
}

func (x *PluginInfo) GetLicense() *License {
	if x != nil {
		return x.License
	}
	return nil
}

func (x *PluginInfo) SetDocumentation(v string) {
	x.Documentation = v
}

func (x *PluginInfo) SetLicense(v *License) {
	x.License = v
}

func (x *PluginInfo) HasLicense() bool {
	if x == nil {
		return false
	}
	return x.License != nil
}

func (x *PluginInfo) ClearLicense() {
	x.License = nil
}

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

	// A long string providing more details on using the plugin.
	//
	// This is equivalent to a README.md in effect.
	Documentation string
	// The license of the plugin.
	License *License
}

func (b0 PluginInfo_builder) Build() *PluginInfo {
	m0 := &PluginInfo{}
	b, x := &b0, m0
	_, _ = b, x
	x.Documentation = b.Documentation
	x.License = b.License
	return m0
}

var File_buf_plugin_info_v1_plugin_info_proto protoreflect.FileDescriptor

const file_buf_plugin_info_v1_plugin_info_proto_rawDesc = "" +
	"\n" +
	"$buf/plugin/info/v1/plugin_info.proto\x12\x12buf.plugin.info.v1\x1a buf/plugin/info/v1/license.proto\"i\n" +
	"\n" +
	"PluginInfo\x12$\n" +
	"\rdocumentation\x18\x01 \x01(\tR\rdocumentation\x125\n" +
	"\alicense\x18\x02 \x01(\v2\x1b.buf.plugin.info.v1.LicenseR\alicenseBRZPbuf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go/buf/plugin/info/v1;infov1b\x06proto3"

var file_buf_plugin_info_v1_plugin_info_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_buf_plugin_info_v1_plugin_info_proto_goTypes = []any{
	(*PluginInfo)(nil), // 0: buf.plugin.info.v1.PluginInfo
	(*License)(nil),    // 1: buf.plugin.info.v1.License
}
var file_buf_plugin_info_v1_plugin_info_proto_depIdxs = []int32{
	1, // 0: buf.plugin.info.v1.PluginInfo.license:type_name -> buf.plugin.info.v1.License
	1, // [1:1] is the sub-list for method output_type
	1, // [1:1] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_buf_plugin_info_v1_plugin_info_proto_init() }
func file_buf_plugin_info_v1_plugin_info_proto_init() {
	if File_buf_plugin_info_v1_plugin_info_proto != nil {
		return
	}
	file_buf_plugin_info_v1_license_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_plugin_info_v1_plugin_info_proto_rawDesc), len(file_buf_plugin_info_v1_plugin_info_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_buf_plugin_info_v1_plugin_info_proto_goTypes,
		DependencyIndexes: file_buf_plugin_info_v1_plugin_info_proto_depIdxs,
		MessageInfos:      file_buf_plugin_info_v1_plugin_info_proto_msgTypes,
	}.Build()
	File_buf_plugin_info_v1_plugin_info_proto = out.File
	file_buf_plugin_info_v1_plugin_info_proto_goTypes = nil
	file_buf_plugin_info_v1_plugin_info_proto_depIdxs = nil
}
