// Copyright 2018 The Kubeflow Authors
//
// 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.6
// 	protoc        v6.31.1
// source: backend/api/v1beta1/resource_reference.proto

package go_client

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

type ResourceType int32

const (
	ResourceType_UNKNOWN_RESOURCE_TYPE ResourceType = 0
	ResourceType_EXPERIMENT            ResourceType = 1
	ResourceType_JOB                   ResourceType = 2
	ResourceType_PIPELINE              ResourceType = 3
	ResourceType_PIPELINE_VERSION      ResourceType = 4
	ResourceType_NAMESPACE             ResourceType = 5
)

// Enum value maps for ResourceType.
var (
	ResourceType_name = map[int32]string{
		0: "UNKNOWN_RESOURCE_TYPE",
		1: "EXPERIMENT",
		2: "JOB",
		3: "PIPELINE",
		4: "PIPELINE_VERSION",
		5: "NAMESPACE",
	}
	ResourceType_value = map[string]int32{
		"UNKNOWN_RESOURCE_TYPE": 0,
		"EXPERIMENT":            1,
		"JOB":                   2,
		"PIPELINE":              3,
		"PIPELINE_VERSION":      4,
		"NAMESPACE":             5,
	}
)

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

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

func (ResourceType) Descriptor() protoreflect.EnumDescriptor {
	return file_backend_api_v1beta1_resource_reference_proto_enumTypes[0].Descriptor()
}

func (ResourceType) Type() protoreflect.EnumType {
	return &file_backend_api_v1beta1_resource_reference_proto_enumTypes[0]
}

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

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

type Relationship int32

const (
	Relationship_UNKNOWN_RELATIONSHIP Relationship = 0
	Relationship_OWNER                Relationship = 1
	Relationship_CREATOR              Relationship = 2
)

// Enum value maps for Relationship.
var (
	Relationship_name = map[int32]string{
		0: "UNKNOWN_RELATIONSHIP",
		1: "OWNER",
		2: "CREATOR",
	}
	Relationship_value = map[string]int32{
		"UNKNOWN_RELATIONSHIP": 0,
		"OWNER":                1,
		"CREATOR":              2,
	}
)

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

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

func (Relationship) Descriptor() protoreflect.EnumDescriptor {
	return file_backend_api_v1beta1_resource_reference_proto_enumTypes[1].Descriptor()
}

func (Relationship) Type() protoreflect.EnumType {
	return &file_backend_api_v1beta1_resource_reference_proto_enumTypes[1]
}

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

// Deprecated: Use Relationship.Descriptor instead.
func (Relationship) EnumDescriptor() ([]byte, []int) {
	return file_backend_api_v1beta1_resource_reference_proto_rawDescGZIP(), []int{1}
}

type ResourceKey struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The type of the resource that referred to.
	Type ResourceType `protobuf:"varint,1,opt,name=type,proto3,enum=api.ResourceType" json:"type,omitempty"`
	// The ID of the resource that referred to.
	Id            string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ResourceKey) ProtoMessage() {}

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

func (x *ResourceKey) GetType() ResourceType {
	if x != nil {
		return x.Type
	}
	return ResourceType_UNKNOWN_RESOURCE_TYPE
}

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

type ResourceReference struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	Key   *ResourceKey           `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The name of the resource that referred to.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// Required field. The relationship from referred resource to the object.
	Relationship  Relationship `protobuf:"varint,2,opt,name=relationship,proto3,enum=api.Relationship" json:"relationship,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ResourceReference) ProtoMessage() {}

func (x *ResourceReference) ProtoReflect() protoreflect.Message {
	mi := &file_backend_api_v1beta1_resource_reference_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 ResourceReference.ProtoReflect.Descriptor instead.
func (*ResourceReference) Descriptor() ([]byte, []int) {
	return file_backend_api_v1beta1_resource_reference_proto_rawDescGZIP(), []int{1}
}

func (x *ResourceReference) GetKey() *ResourceKey {
	if x != nil {
		return x.Key
	}
	return nil
}

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

func (x *ResourceReference) GetRelationship() Relationship {
	if x != nil {
		return x.Relationship
	}
	return Relationship_UNKNOWN_RELATIONSHIP
}

var File_backend_api_v1beta1_resource_reference_proto protoreflect.FileDescriptor

const file_backend_api_v1beta1_resource_reference_proto_rawDesc = "" +
	"\n" +
	",backend/api/v1beta1/resource_reference.proto\x12\x03api\"D\n" +
	"\vResourceKey\x12%\n" +
	"\x04type\x18\x01 \x01(\x0e2\x11.api.ResourceTypeR\x04type\x12\x0e\n" +
	"\x02id\x18\x02 \x01(\tR\x02id\"\x82\x01\n" +
	"\x11ResourceReference\x12\"\n" +
	"\x03key\x18\x01 \x01(\v2\x10.api.ResourceKeyR\x03key\x12\x12\n" +
	"\x04name\x18\x03 \x01(\tR\x04name\x125\n" +
	"\frelationship\x18\x02 \x01(\x0e2\x11.api.RelationshipR\frelationship*u\n" +
	"\fResourceType\x12\x19\n" +
	"\x15UNKNOWN_RESOURCE_TYPE\x10\x00\x12\x0e\n" +
	"\n" +
	"EXPERIMENT\x10\x01\x12\a\n" +
	"\x03JOB\x10\x02\x12\f\n" +
	"\bPIPELINE\x10\x03\x12\x14\n" +
	"\x10PIPELINE_VERSION\x10\x04\x12\r\n" +
	"\tNAMESPACE\x10\x05*@\n" +
	"\fRelationship\x12\x18\n" +
	"\x14UNKNOWN_RELATIONSHIP\x10\x00\x12\t\n" +
	"\x05OWNER\x10\x01\x12\v\n" +
	"\aCREATOR\x10\x02B=Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3"

var (
	file_backend_api_v1beta1_resource_reference_proto_rawDescOnce sync.Once
	file_backend_api_v1beta1_resource_reference_proto_rawDescData []byte
)

func file_backend_api_v1beta1_resource_reference_proto_rawDescGZIP() []byte {
	file_backend_api_v1beta1_resource_reference_proto_rawDescOnce.Do(func() {
		file_backend_api_v1beta1_resource_reference_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_resource_reference_proto_rawDesc), len(file_backend_api_v1beta1_resource_reference_proto_rawDesc)))
	})
	return file_backend_api_v1beta1_resource_reference_proto_rawDescData
}

var file_backend_api_v1beta1_resource_reference_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_backend_api_v1beta1_resource_reference_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_backend_api_v1beta1_resource_reference_proto_goTypes = []any{
	(ResourceType)(0),         // 0: api.ResourceType
	(Relationship)(0),         // 1: api.Relationship
	(*ResourceKey)(nil),       // 2: api.ResourceKey
	(*ResourceReference)(nil), // 3: api.ResourceReference
}
var file_backend_api_v1beta1_resource_reference_proto_depIdxs = []int32{
	0, // 0: api.ResourceKey.type:type_name -> api.ResourceType
	2, // 1: api.ResourceReference.key:type_name -> api.ResourceKey
	1, // 2: api.ResourceReference.relationship:type_name -> api.Relationship
	3, // [3:3] is the sub-list for method output_type
	3, // [3:3] is the sub-list for method input_type
	3, // [3:3] is the sub-list for extension type_name
	3, // [3:3] is the sub-list for extension extendee
	0, // [0:3] is the sub-list for field type_name
}

func init() { file_backend_api_v1beta1_resource_reference_proto_init() }
func file_backend_api_v1beta1_resource_reference_proto_init() {
	if File_backend_api_v1beta1_resource_reference_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_resource_reference_proto_rawDesc), len(file_backend_api_v1beta1_resource_reference_proto_rawDesc)),
			NumEnums:      2,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_backend_api_v1beta1_resource_reference_proto_goTypes,
		DependencyIndexes: file_backend_api_v1beta1_resource_reference_proto_depIdxs,
		EnumInfos:         file_backend_api_v1beta1_resource_reference_proto_enumTypes,
		MessageInfos:      file_backend_api_v1beta1_resource_reference_proto_msgTypes,
	}.Build()
	File_backend_api_v1beta1_resource_reference_proto = out.File
	file_backend_api_v1beta1_resource_reference_proto_goTypes = nil
	file_backend_api_v1beta1_resource_reference_proto_depIdxs = nil
}
