// 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/owner/v1/organization.proto

//go:build !protoopaque

package ownerv1

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"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
	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)
)

// The verification status of an Organization.
type OrganizationVerificationStatus int32

const (
	OrganizationVerificationStatus_ORGANIZATION_VERIFICATION_STATUS_UNSPECIFIED OrganizationVerificationStatus = 0
	// The Organization is unverified.
	OrganizationVerificationStatus_ORGANIZATION_VERIFICATION_STATUS_UNVERIFIED OrganizationVerificationStatus = 1
	// The Organization is verified.
	OrganizationVerificationStatus_ORGANIZATION_VERIFICATION_STATUS_VERIFIED OrganizationVerificationStatus = 2
	// The Organization is an official organization of the BSR owner.
	OrganizationVerificationStatus_ORGANIZATION_VERIFICATION_STATUS_OFFICIAL OrganizationVerificationStatus = 3
)

// Enum value maps for OrganizationVerificationStatus.
var (
	OrganizationVerificationStatus_name = map[int32]string{
		0: "ORGANIZATION_VERIFICATION_STATUS_UNSPECIFIED",
		1: "ORGANIZATION_VERIFICATION_STATUS_UNVERIFIED",
		2: "ORGANIZATION_VERIFICATION_STATUS_VERIFIED",
		3: "ORGANIZATION_VERIFICATION_STATUS_OFFICIAL",
	}
	OrganizationVerificationStatus_value = map[string]int32{
		"ORGANIZATION_VERIFICATION_STATUS_UNSPECIFIED": 0,
		"ORGANIZATION_VERIFICATION_STATUS_UNVERIFIED":  1,
		"ORGANIZATION_VERIFICATION_STATUS_VERIFIED":    2,
		"ORGANIZATION_VERIFICATION_STATUS_OFFICIAL":    3,
	}
)

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

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

func (OrganizationVerificationStatus) Descriptor() protoreflect.EnumDescriptor {
	return file_buf_registry_owner_v1_organization_proto_enumTypes[0].Descriptor()
}

func (OrganizationVerificationStatus) Type() protoreflect.EnumType {
	return &file_buf_registry_owner_v1_organization_proto_enumTypes[0]
}

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

// The visibility of an Organization, currently either public or private.
type OrganizationVisibility int32

const (
	OrganizationVisibility_ORGANIZATION_VISIBILITY_UNSPECIFIED OrganizationVisibility = 0
	// ORGANIZATION_VISIBILITY_PUBLIC says that the organization is publicly available.
	OrganizationVisibility_ORGANIZATION_VISIBILITY_PUBLIC OrganizationVisibility = 1
	// ORGANIZATION_VISIBILITY_PRIVATE says that the organization is private.
	OrganizationVisibility_ORGANIZATION_VISIBILITY_PRIVATE OrganizationVisibility = 2
)

// Enum value maps for OrganizationVisibility.
var (
	OrganizationVisibility_name = map[int32]string{
		0: "ORGANIZATION_VISIBILITY_UNSPECIFIED",
		1: "ORGANIZATION_VISIBILITY_PUBLIC",
		2: "ORGANIZATION_VISIBILITY_PRIVATE",
	}
	OrganizationVisibility_value = map[string]int32{
		"ORGANIZATION_VISIBILITY_UNSPECIFIED": 0,
		"ORGANIZATION_VISIBILITY_PUBLIC":      1,
		"ORGANIZATION_VISIBILITY_PRIVATE":     2,
	}
)

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

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

func (OrganizationVisibility) Descriptor() protoreflect.EnumDescriptor {
	return file_buf_registry_owner_v1_organization_proto_enumTypes[1].Descriptor()
}

func (OrganizationVisibility) Type() protoreflect.EnumType {
	return &file_buf_registry_owner_v1_organization_proto_enumTypes[1]
}

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

// Organization is an organization on the BSR.
//
// A name uniquely identifies an Organization, however name is mutable.
type Organization struct {
	state protoimpl.MessageState `protogen:"hybrid.v1"`
	// The id for the Organization.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The time the Organization was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// The last time the Organization was updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// The name of the Organization.
	//
	// A name uniquely identifies an Organization, however name is mutable.
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// The configurable description of the Organization.
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	// The configurable URL that represents the homepage for an Organization.
	Url string `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"`
	// The verification status of the Organization.
	VerificationStatus OrganizationVerificationStatus `protobuf:"varint,7,opt,name=verification_status,json=verificationStatus,proto3,enum=buf.registry.owner.v1.OrganizationVerificationStatus" json:"verification_status,omitempty"`
	Visibility         OrganizationVisibility         `protobuf:"varint,8,opt,name=visibility,proto3,enum=buf.registry.owner.v1.OrganizationVisibility" json:"visibility,omitempty"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

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

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

func (*Organization) ProtoMessage() {}

func (x *Organization) ProtoReflect() protoreflect.Message {
	mi := &file_buf_registry_owner_v1_organization_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 *Organization) GetId() string {
	if x != nil {
		return x.Id
	}
	return ""
}

func (x *Organization) GetCreateTime() *timestamppb.Timestamp {
	if x != nil {
		return x.CreateTime
	}
	return nil
}

func (x *Organization) GetUpdateTime() *timestamppb.Timestamp {
	if x != nil {
		return x.UpdateTime
	}
	return nil
}

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

func (x *Organization) GetDescription() string {
	if x != nil {
		return x.Description
	}
	return ""
}

func (x *Organization) GetUrl() string {
	if x != nil {
		return x.Url
	}
	return ""
}

func (x *Organization) GetVerificationStatus() OrganizationVerificationStatus {
	if x != nil {
		return x.VerificationStatus
	}
	return OrganizationVerificationStatus_ORGANIZATION_VERIFICATION_STATUS_UNSPECIFIED
}

func (x *Organization) GetVisibility() OrganizationVisibility {
	if x != nil {
		return x.Visibility
	}
	return OrganizationVisibility_ORGANIZATION_VISIBILITY_UNSPECIFIED
}

func (x *Organization) SetId(v string) {
	x.Id = v
}

func (x *Organization) SetCreateTime(v *timestamppb.Timestamp) {
	x.CreateTime = v
}

func (x *Organization) SetUpdateTime(v *timestamppb.Timestamp) {
	x.UpdateTime = v
}

func (x *Organization) SetName(v string) {
	x.Name = v
}

func (x *Organization) SetDescription(v string) {
	x.Description = v
}

func (x *Organization) SetUrl(v string) {
	x.Url = v
}

func (x *Organization) SetVerificationStatus(v OrganizationVerificationStatus) {
	x.VerificationStatus = v
}

func (x *Organization) SetVisibility(v OrganizationVisibility) {
	x.Visibility = v
}

func (x *Organization) HasCreateTime() bool {
	if x == nil {
		return false
	}
	return x.CreateTime != nil
}

func (x *Organization) HasUpdateTime() bool {
	if x == nil {
		return false
	}
	return x.UpdateTime != nil
}

func (x *Organization) ClearCreateTime() {
	x.CreateTime = nil
}

func (x *Organization) ClearUpdateTime() {
	x.UpdateTime = nil
}

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

	// The id for the Organization.
	Id string
	// The time the Organization was created.
	CreateTime *timestamppb.Timestamp
	// The last time the Organization was updated.
	UpdateTime *timestamppb.Timestamp
	// The name of the Organization.
	//
	// A name uniquely identifies an Organization, however name is mutable.
	Name string
	// The configurable description of the Organization.
	Description string
	// The configurable URL that represents the homepage for an Organization.
	Url string
	// The verification status of the Organization.
	VerificationStatus OrganizationVerificationStatus
	Visibility         OrganizationVisibility
}

func (b0 Organization_builder) Build() *Organization {
	m0 := &Organization{}
	b, x := &b0, m0
	_, _ = b, x
	x.Id = b.Id
	x.CreateTime = b.CreateTime
	x.UpdateTime = b.UpdateTime
	x.Name = b.Name
	x.Description = b.Description
	x.Url = b.Url
	x.VerificationStatus = b.VerificationStatus
	x.Visibility = b.Visibility
	return m0
}

// OrganizationRef is a reference to an Organization, either an id or a name.
//
// This is used in requests.
type OrganizationRef struct {
	state protoimpl.MessageState `protogen:"hybrid.v1"`
	// Types that are valid to be assigned to Value:
	//
	//	*OrganizationRef_Id
	//	*OrganizationRef_Name
	Value         isOrganizationRef_Value `protobuf_oneof:"value"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*OrganizationRef) ProtoMessage() {}

func (x *OrganizationRef) ProtoReflect() protoreflect.Message {
	mi := &file_buf_registry_owner_v1_organization_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 *OrganizationRef) GetValue() isOrganizationRef_Value {
	if x != nil {
		return x.Value
	}
	return nil
}

func (x *OrganizationRef) GetId() string {
	if x != nil {
		if x, ok := x.Value.(*OrganizationRef_Id); ok {
			return x.Id
		}
	}
	return ""
}

func (x *OrganizationRef) GetName() string {
	if x != nil {
		if x, ok := x.Value.(*OrganizationRef_Name); ok {
			return x.Name
		}
	}
	return ""
}

func (x *OrganizationRef) SetId(v string) {
	x.Value = &OrganizationRef_Id{v}
}

func (x *OrganizationRef) SetName(v string) {
	x.Value = &OrganizationRef_Name{v}
}

func (x *OrganizationRef) HasValue() bool {
	if x == nil {
		return false
	}
	return x.Value != nil
}

func (x *OrganizationRef) HasId() bool {
	if x == nil {
		return false
	}
	_, ok := x.Value.(*OrganizationRef_Id)
	return ok
}

func (x *OrganizationRef) HasName() bool {
	if x == nil {
		return false
	}
	_, ok := x.Value.(*OrganizationRef_Name)
	return ok
}

func (x *OrganizationRef) ClearValue() {
	x.Value = nil
}

func (x *OrganizationRef) ClearId() {
	if _, ok := x.Value.(*OrganizationRef_Id); ok {
		x.Value = nil
	}
}

func (x *OrganizationRef) ClearName() {
	if _, ok := x.Value.(*OrganizationRef_Name); ok {
		x.Value = nil
	}
}

const OrganizationRef_Value_not_set_case case_OrganizationRef_Value = 0
const OrganizationRef_Id_case case_OrganizationRef_Value = 1
const OrganizationRef_Name_case case_OrganizationRef_Value = 2

func (x *OrganizationRef) WhichValue() case_OrganizationRef_Value {
	if x == nil {
		return OrganizationRef_Value_not_set_case
	}
	switch x.Value.(type) {
	case *OrganizationRef_Id:
		return OrganizationRef_Id_case
	case *OrganizationRef_Name:
		return OrganizationRef_Name_case
	default:
		return OrganizationRef_Value_not_set_case
	}
}

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

	// Fields of oneof Value:
	// The id of the Organization.
	Id *string
	// The name of the Organization.
	Name *string
	// -- end of Value
}

func (b0 OrganizationRef_builder) Build() *OrganizationRef {
	m0 := &OrganizationRef{}
	b, x := &b0, m0
	_, _ = b, x
	if b.Id != nil {
		x.Value = &OrganizationRef_Id{*b.Id}
	}
	if b.Name != nil {
		x.Value = &OrganizationRef_Name{*b.Name}
	}
	return m0
}

type case_OrganizationRef_Value protoreflect.FieldNumber

func (x case_OrganizationRef_Value) String() string {
	md := file_buf_registry_owner_v1_organization_proto_msgTypes[1].Descriptor()
	if x == 0 {
		return "not set"
	}
	return protoimpl.X.MessageFieldStringOf(md, protoreflect.FieldNumber(x))
}

type isOrganizationRef_Value interface {
	isOrganizationRef_Value()
}

type OrganizationRef_Id struct {
	// The id of the Organization.
	Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"`
}

type OrganizationRef_Name struct {
	// The name of the Organization.
	Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"`
}

func (*OrganizationRef_Id) isOrganizationRef_Value() {}

func (*OrganizationRef_Name) isOrganizationRef_Value() {}

var File_buf_registry_owner_v1_organization_proto protoreflect.FileDescriptor

const file_buf_registry_owner_v1_organization_proto_rawDesc = "" +
	"\n" +
	"(buf/registry/owner/v1/organization.proto\x12\x15buf.registry.owner.v1\x1a3buf/registry/priv/extension/v1beta1/extension.proto\x1a\x1bbuf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\x04\n" +
	"\fOrganization\x12\x1b\n" +
	"\x02id\x18\x01 \x01(\tB\v\xbaH\b\xc8\x01\x01r\x03\x88\x02\x01R\x02id\x12C\n" +
	"\vcreate_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\n" +
	"createTime\x12C\n" +
	"\vupdate_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\n" +
	"updateTime\x12>\n" +
	"\x04name\x18\x04 \x01(\tB*\xbaH'\xc8\x01\x01r\"\x10\x01\x18 2\x1c^[a-z]([a-z0-9-]*[a-z0-9])?$R\x04name\x12*\n" +
	"\vdescription\x18\x05 \x01(\tB\b\xbaH\x05r\x03\x18\xde\x02R\vdescription\x12 \n" +
	"\x03url\x18\x06 \x01(\tB\x0e\xbaH\v\xd8\x01\x01r\x06\x18\xff\x01\x88\x01\x01R\x03url\x12s\n" +
	"\x13verification_status\x18\a \x01(\x0e25.buf.registry.owner.v1.OrganizationVerificationStatusB\v\xbaH\b\xc8\x01\x01\x82\x01\x02\x10\x01R\x12verificationStatus\x12W\n" +
	"\n" +
	"visibility\x18\b \x01(\x0e2-.buf.registry.owner.v1.OrganizationVisibilityB\b\xbaH\x05\x82\x01\x02\x10\x01R\n" +
	"visibility:\x06\xea\xc5+\x02\x10\x01\"\x84\x01\n" +
	"\x0fOrganizationRef\x12\x1a\n" +
	"\x02id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\x88\x02\x01H\x00R\x02id\x12=\n" +
	"\x04name\x18\x02 \x01(\tB'\xbaH$r\"\x10\x01\x18 2\x1c^[a-z]([a-z0-9-]*[a-z0-9])?$H\x00R\x04name:\x06\xea\xc5+\x02\b\x01B\x0e\n" +
	"\x05value\x12\x05\xbaH\x02\b\x01*\xe1\x01\n" +
	"\x1eOrganizationVerificationStatus\x120\n" +
	",ORGANIZATION_VERIFICATION_STATUS_UNSPECIFIED\x10\x00\x12/\n" +
	"+ORGANIZATION_VERIFICATION_STATUS_UNVERIFIED\x10\x01\x12-\n" +
	")ORGANIZATION_VERIFICATION_STATUS_VERIFIED\x10\x02\x12-\n" +
	")ORGANIZATION_VERIFICATION_STATUS_OFFICIAL\x10\x03*\x8a\x01\n" +
	"\x16OrganizationVisibility\x12'\n" +
	"#ORGANIZATION_VISIBILITY_UNSPECIFIED\x10\x00\x12\"\n" +
	"\x1eORGANIZATION_VISIBILITY_PUBLIC\x10\x01\x12#\n" +
	"\x1fORGANIZATION_VISIBILITY_PRIVATE\x10\x02BUZSbuf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/owner/v1;ownerv1b\x06proto3"

var file_buf_registry_owner_v1_organization_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_buf_registry_owner_v1_organization_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_buf_registry_owner_v1_organization_proto_goTypes = []any{
	(OrganizationVerificationStatus)(0), // 0: buf.registry.owner.v1.OrganizationVerificationStatus
	(OrganizationVisibility)(0),         // 1: buf.registry.owner.v1.OrganizationVisibility
	(*Organization)(nil),                // 2: buf.registry.owner.v1.Organization
	(*OrganizationRef)(nil),             // 3: buf.registry.owner.v1.OrganizationRef
	(*timestamppb.Timestamp)(nil),       // 4: google.protobuf.Timestamp
}
var file_buf_registry_owner_v1_organization_proto_depIdxs = []int32{
	4, // 0: buf.registry.owner.v1.Organization.create_time:type_name -> google.protobuf.Timestamp
	4, // 1: buf.registry.owner.v1.Organization.update_time:type_name -> google.protobuf.Timestamp
	0, // 2: buf.registry.owner.v1.Organization.verification_status:type_name -> buf.registry.owner.v1.OrganizationVerificationStatus
	1, // 3: buf.registry.owner.v1.Organization.visibility:type_name -> buf.registry.owner.v1.OrganizationVisibility
	4, // [4:4] is the sub-list for method output_type
	4, // [4:4] is the sub-list for method input_type
	4, // [4:4] is the sub-list for extension type_name
	4, // [4:4] is the sub-list for extension extendee
	0, // [0:4] is the sub-list for field type_name
}

func init() { file_buf_registry_owner_v1_organization_proto_init() }
func file_buf_registry_owner_v1_organization_proto_init() {
	if File_buf_registry_owner_v1_organization_proto != nil {
		return
	}
	file_buf_registry_owner_v1_organization_proto_msgTypes[1].OneofWrappers = []any{
		(*OrganizationRef_Id)(nil),
		(*OrganizationRef_Name)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_registry_owner_v1_organization_proto_rawDesc), len(file_buf_registry_owner_v1_organization_proto_rawDesc)),
			NumEnums:      2,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_buf_registry_owner_v1_organization_proto_goTypes,
		DependencyIndexes: file_buf_registry_owner_v1_organization_proto_depIdxs,
		EnumInfos:         file_buf_registry_owner_v1_organization_proto_enumTypes,
		MessageInfos:      file_buf_registry_owner_v1_organization_proto_msgTypes,
	}.Build()
	File_buf_registry_owner_v1_organization_proto = out.File
	file_buf_registry_owner_v1_organization_proto_goTypes = nil
	file_buf_registry_owner_v1_organization_proto_depIdxs = nil
}
