// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.9
// 	protoc        (unknown)
// source: common/v1/resource.proto

package commonv1

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	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)
)

// PowerX 统一资源引用（PRN）
type ResourceRef struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	TenantId      int64                  `protobuf:"varint,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`                                                      // 所属租户
	Domain        string                 `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`                                                                           // "organization"/"iam"/"ecom"...
	Entity        string                 `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"`                                                                           // "member"/"team"/"order"...
	Id            string                 `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`                                                                                   // ULID/Snowflake 等稳定主键
	HumanKey      string                 `protobuf:"bytes,5,opt,name=human_key,json=humanKey,proto3" json:"human_key,omitempty"`                                                       // 业务可读编号（可选）
	Prn           string                 `protobuf:"bytes,6,opt,name=prn,proto3" json:"prn,omitempty"`                                                                                 // prn:powerx:env:t-xx:domain.entity:id
	Labels        map[string]string      `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 便于路由/归档的标签
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ResourceRef) ProtoMessage() {}

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

// Deprecated: Use ResourceRef.ProtoReflect.Descriptor instead.
func (*ResourceRef) Descriptor() ([]byte, []int) {
	return file_common_v1_resource_proto_rawDescGZIP(), []int{0}
}

func (x *ResourceRef) GetTenantId() int64 {
	if x != nil {
		return x.TenantId
	}
	return 0
}

func (x *ResourceRef) GetDomain() string {
	if x != nil {
		return x.Domain
	}
	return ""
}

func (x *ResourceRef) GetEntity() string {
	if x != nil {
		return x.Entity
	}
	return ""
}

func (x *ResourceRef) GetId() string {
	if x != nil {
		return x.Id
	}
	return ""
}

func (x *ResourceRef) GetHumanKey() string {
	if x != nil {
		return x.HumanKey
	}
	return ""
}

func (x *ResourceRef) GetPrn() string {
	if x != nil {
		return x.Prn
	}
	return ""
}

func (x *ResourceRef) GetLabels() map[string]string {
	if x != nil {
		return x.Labels
	}
	return nil
}

var File_common_v1_resource_proto protoreflect.FileDescriptor

const file_common_v1_resource_proto_rawDesc = "" +
	"\n" +
	"\x18common/v1/resource.proto\x12\tcommon.v1\"\x90\x02\n" +
	"\vResourceRef\x12\x1b\n" +
	"\ttenant_id\x18\x01 \x01(\x03R\btenantId\x12\x16\n" +
	"\x06domain\x18\x02 \x01(\tR\x06domain\x12\x16\n" +
	"\x06entity\x18\x03 \x01(\tR\x06entity\x12\x0e\n" +
	"\x02id\x18\x04 \x01(\tR\x02id\x12\x1b\n" +
	"\thuman_key\x18\x05 \x01(\tR\bhumanKey\x12\x10\n" +
	"\x03prn\x18\x06 \x01(\tR\x03prn\x12:\n" +
	"\x06labels\x18\a \x03(\v2\".common.v1.ResourceRef.LabelsEntryR\x06labels\x1a9\n" +
	"\vLabelsEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01BCZAgithub.com/ArtisanCloud/PowerX/api/grpc/gen/go/common/v1;commonv1b\x06proto3"

var (
	file_common_v1_resource_proto_rawDescOnce sync.Once
	file_common_v1_resource_proto_rawDescData []byte
)

func file_common_v1_resource_proto_rawDescGZIP() []byte {
	file_common_v1_resource_proto_rawDescOnce.Do(func() {
		file_common_v1_resource_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_common_v1_resource_proto_rawDesc), len(file_common_v1_resource_proto_rawDesc)))
	})
	return file_common_v1_resource_proto_rawDescData
}

var file_common_v1_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_common_v1_resource_proto_goTypes = []any{
	(*ResourceRef)(nil), // 0: common.v1.ResourceRef
	nil,                 // 1: common.v1.ResourceRef.LabelsEntry
}
var file_common_v1_resource_proto_depIdxs = []int32{
	1, // 0: common.v1.ResourceRef.labels:type_name -> common.v1.ResourceRef.LabelsEntry
	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_common_v1_resource_proto_init() }
func file_common_v1_resource_proto_init() {
	if File_common_v1_resource_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_common_v1_resource_proto_rawDesc), len(file_common_v1_resource_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_common_v1_resource_proto_goTypes,
		DependencyIndexes: file_common_v1_resource_proto_depIdxs,
		MessageInfos:      file_common_v1_resource_proto_msgTypes,
	}.Build()
	File_common_v1_resource_proto = out.File
	file_common_v1_resource_proto_goTypes = nil
	file_common_v1_resource_proto_depIdxs = nil
}
