// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        (unknown)
// source: plm/v1/part.proto

package plmv1

import (
	_ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
	_ "github.com/cobotar/protocol/messages/validation/v1"
	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)
)

type PartType int32

const (
	PartType_PART_TYPE_UNSPECIFIED  PartType = 0
	PartType_PART_TYPE_SUB_ASSEMBLY PartType = 1
	PartType_PART_TYPE_FASTENER     PartType = 2
	PartType_PART_TYPE_PLATE        PartType = 3
	PartType_PART_TYPE_LUBRICANT    PartType = 4
)

// Enum value maps for PartType.
var (
	PartType_name = map[int32]string{
		0: "PART_TYPE_UNSPECIFIED",
		1: "PART_TYPE_SUB_ASSEMBLY",
		2: "PART_TYPE_FASTENER",
		3: "PART_TYPE_PLATE",
		4: "PART_TYPE_LUBRICANT",
	}
	PartType_value = map[string]int32{
		"PART_TYPE_UNSPECIFIED":  0,
		"PART_TYPE_SUB_ASSEMBLY": 1,
		"PART_TYPE_FASTENER":     2,
		"PART_TYPE_PLATE":        3,
		"PART_TYPE_LUBRICANT":    4,
	}
)

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

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

func (PartType) Descriptor() protoreflect.EnumDescriptor {
	return file_plm_v1_part_proto_enumTypes[0].Descriptor()
}

func (PartType) Type() protoreflect.EnumType {
	return &file_plm_v1_part_proto_enumTypes[0]
}

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

// Deprecated: Use PartType.Descriptor instead.
func (PartType) EnumDescriptor() ([]byte, []int) {
	return file_plm_v1_part_proto_rawDescGZIP(), []int{0}
}

type PartMessage struct {
	state       protoimpl.MessageState `protogen:"open.v1"`
	Id          string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Icon        string                 `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"`
	Description string                 `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	Type        PartType               `protobuf:"varint,5,opt,name=type,proto3,enum=plm.v1.PartType" json:"type,omitempty"`
	Weight      int64                  `protobuf:"varint,6,opt,name=weight,proto3" json:"weight,omitempty"` // weight in grams
	// TODO: add dimensions
	// TODO: add material
	ModelId       string   `protobuf:"bytes,7,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"`
	ToolIds       []string `protobuf:"bytes,8,rep,name=tool_ids,json=toolIds,proto3" json:"tool_ids,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*PartMessage) ProtoMessage() {}

func (x *PartMessage) ProtoReflect() protoreflect.Message {
	mi := &file_plm_v1_part_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 PartMessage.ProtoReflect.Descriptor instead.
func (*PartMessage) Descriptor() ([]byte, []int) {
	return file_plm_v1_part_proto_rawDescGZIP(), []int{0}
}

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

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

func (x *PartMessage) GetIcon() string {
	if x != nil {
		return x.Icon
	}
	return ""
}

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

func (x *PartMessage) GetType() PartType {
	if x != nil {
		return x.Type
	}
	return PartType_PART_TYPE_UNSPECIFIED
}

func (x *PartMessage) GetWeight() int64 {
	if x != nil {
		return x.Weight
	}
	return 0
}

func (x *PartMessage) GetModelId() string {
	if x != nil {
		return x.ModelId
	}
	return ""
}

func (x *PartMessage) GetToolIds() []string {
	if x != nil {
		return x.ToolIds
	}
	return nil
}

type PartMessages struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Parts         []*PartMessage         `protobuf:"bytes,1,rep,name=parts,proto3" json:"parts,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*PartMessages) ProtoMessage() {}

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

// Deprecated: Use PartMessages.ProtoReflect.Descriptor instead.
func (*PartMessages) Descriptor() ([]byte, []int) {
	return file_plm_v1_part_proto_rawDescGZIP(), []int{1}
}

func (x *PartMessages) GetParts() []*PartMessage {
	if x != nil {
		return x.Parts
	}
	return nil
}

var File_plm_v1_part_proto protoreflect.FileDescriptor

const file_plm_v1_part_proto_rawDesc = "" +
	"\n" +
	"\x11plm/v1/part.proto\x12\x06plm.v1\x1a\x1bbuf/validate/validate.proto\x1a+validation/v1/predefined_string_rules.proto\"\x97\x02\n" +
	"\vPartMessage\x12\x0e\n" +
	"\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n" +
	"\x04name\x18\x02 \x01(\tB\t\xbaH\x06r\x04\x80\xf1\x04\x01R\x04name\x12\x12\n" +
	"\x04icon\x18\x03 \x01(\tR\x04icon\x12 \n" +
	"\vdescription\x18\x04 \x01(\tR\vdescription\x12.\n" +
	"\x04type\x18\x05 \x01(\x0e2\x10.plm.v1.PartTypeB\b\xbaH\x05\x82\x01\x02\x10\x01R\x04type\x12\x1f\n" +
	"\x06weight\x18\x06 \x01(\x03B\a\xbaH\x04\"\x02(\x00R\x06weight\x12$\n" +
	"\bmodel_id\x18\a \x01(\tB\t\xbaH\x06r\x04\x88\xf1\x04\x01R\amodelId\x12,\n" +
	"\btool_ids\x18\b \x03(\tB\x11\xbaH\x0e\x92\x01\v\"\tr\a:\x05tool-R\atoolIds\"9\n" +
	"\fPartMessages\x12)\n" +
	"\x05parts\x18\x01 \x03(\v2\x13.plm.v1.PartMessageR\x05parts*\x87\x01\n" +
	"\bPartType\x12\x19\n" +
	"\x15PART_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n" +
	"\x16PART_TYPE_SUB_ASSEMBLY\x10\x01\x12\x16\n" +
	"\x12PART_TYPE_FASTENER\x10\x02\x12\x13\n" +
	"\x0fPART_TYPE_PLATE\x10\x03\x12\x17\n" +
	"\x13PART_TYPE_LUBRICANT\x10\x04B\x8c\x01\n" +
	"\n" +
	"com.plm.v1B\tPartProtoP\x01Z1github.com/cobotar/protocol/messages/plm/v1;plmv1\xa2\x02\x03PXX\xaa\x02\x0fMessages.Plm.V1\xca\x02\x06Plm\\V1\xe2\x02\x12Plm\\V1\\GPBMetadata\xea\x02\aPlm::V1b\x06proto3"

var (
	file_plm_v1_part_proto_rawDescOnce sync.Once
	file_plm_v1_part_proto_rawDescData []byte
)

func file_plm_v1_part_proto_rawDescGZIP() []byte {
	file_plm_v1_part_proto_rawDescOnce.Do(func() {
		file_plm_v1_part_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_plm_v1_part_proto_rawDesc), len(file_plm_v1_part_proto_rawDesc)))
	})
	return file_plm_v1_part_proto_rawDescData
}

var file_plm_v1_part_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_plm_v1_part_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_plm_v1_part_proto_goTypes = []any{
	(PartType)(0),        // 0: plm.v1.PartType
	(*PartMessage)(nil),  // 1: plm.v1.PartMessage
	(*PartMessages)(nil), // 2: plm.v1.PartMessages
}
var file_plm_v1_part_proto_depIdxs = []int32{
	0, // 0: plm.v1.PartMessage.type:type_name -> plm.v1.PartType
	1, // 1: plm.v1.PartMessages.parts:type_name -> plm.v1.PartMessage
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] 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_plm_v1_part_proto_init() }
func file_plm_v1_part_proto_init() {
	if File_plm_v1_part_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_plm_v1_part_proto_rawDesc), len(file_plm_v1_part_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_plm_v1_part_proto_goTypes,
		DependencyIndexes: file_plm_v1_part_proto_depIdxs,
		EnumInfos:         file_plm_v1_part_proto_enumTypes,
		MessageInfos:      file_plm_v1_part_proto_msgTypes,
	}.Build()
	File_plm_v1_part_proto = out.File
	file_plm_v1_part_proto_goTypes = nil
	file_plm_v1_part_proto_depIdxs = nil
}
