// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.30.0
// 	protoc        (unknown)
// source: flyteidl/core/metrics.proto

package core

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	structpb "google.golang.org/protobuf/types/known/structpb"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
	reflect "reflect"
	sync "sync"
)

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

// Span represents a duration trace of Flyte execution. The id field denotes a Flyte execution entity or an operation
// which uniquely identifies the Span. The spans attribute allows this Span to be further broken down into more
// precise definitions.
type Span struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// start_time defines the instance this span began.
	StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// end_time defines the instance this span completed.
	EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// Types that are assignable to Id:
	//
	//	*Span_WorkflowId
	//	*Span_NodeId
	//	*Span_TaskId
	//	*Span_OperationId
	Id isSpan_Id `protobuf_oneof:"id"`
	// spans defines a collection of Spans that breakdown this execution.
	Spans []*Span `protobuf:"bytes,7,rep,name=spans,proto3" json:"spans,omitempty"`
}

func (x *Span) Reset() {
	*x = Span{}
	if protoimpl.UnsafeEnabled {
		mi := &file_flyteidl_core_metrics_proto_msgTypes[0]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*Span) ProtoMessage() {}

func (x *Span) ProtoReflect() protoreflect.Message {
	mi := &file_flyteidl_core_metrics_proto_msgTypes[0]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

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

func (x *Span) GetStartTime() *timestamppb.Timestamp {
	if x != nil {
		return x.StartTime
	}
	return nil
}

func (x *Span) GetEndTime() *timestamppb.Timestamp {
	if x != nil {
		return x.EndTime
	}
	return nil
}

func (m *Span) GetId() isSpan_Id {
	if m != nil {
		return m.Id
	}
	return nil
}

func (x *Span) GetWorkflowId() *WorkflowExecutionIdentifier {
	if x, ok := x.GetId().(*Span_WorkflowId); ok {
		return x.WorkflowId
	}
	return nil
}

func (x *Span) GetNodeId() *NodeExecutionIdentifier {
	if x, ok := x.GetId().(*Span_NodeId); ok {
		return x.NodeId
	}
	return nil
}

func (x *Span) GetTaskId() *TaskExecutionIdentifier {
	if x, ok := x.GetId().(*Span_TaskId); ok {
		return x.TaskId
	}
	return nil
}

func (x *Span) GetOperationId() string {
	if x, ok := x.GetId().(*Span_OperationId); ok {
		return x.OperationId
	}
	return ""
}

func (x *Span) GetSpans() []*Span {
	if x != nil {
		return x.Spans
	}
	return nil
}

type isSpan_Id interface {
	isSpan_Id()
}

type Span_WorkflowId struct {
	// workflow_id is the id of the workflow execution this Span represents.
	WorkflowId *WorkflowExecutionIdentifier `protobuf:"bytes,3,opt,name=workflow_id,json=workflowId,proto3,oneof"`
}

type Span_NodeId struct {
	// node_id is the id of the node execution this Span represents.
	NodeId *NodeExecutionIdentifier `protobuf:"bytes,4,opt,name=node_id,json=nodeId,proto3,oneof"`
}

type Span_TaskId struct {
	// task_id is the id of the task execution this Span represents.
	TaskId *TaskExecutionIdentifier `protobuf:"bytes,5,opt,name=task_id,json=taskId,proto3,oneof"`
}

type Span_OperationId struct {
	// operation_id is the id of a unique operation that this Span represents.
	OperationId string `protobuf:"bytes,6,opt,name=operation_id,json=operationId,proto3,oneof"`
}

func (*Span_WorkflowId) isSpan_Id() {}

func (*Span_NodeId) isSpan_Id() {}

func (*Span_TaskId) isSpan_Id() {}

func (*Span_OperationId) isSpan_Id() {}

// ExecutionMetrics is a collection of metrics that are collected during the execution of a Flyte task.
type ExecutionMetricResult struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// The metric this data represents. e.g. EXECUTION_METRIC_USED_CPU_AVG or EXECUTION_METRIC_USED_MEMORY_BYTES_AVG.
	Metric string `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"`
	// The result data in prometheus range query result format
	// https://prometheus.io/docs/prometheus/latest/querying/api/#expression-query-result-formats.
	// This may include multiple time series, differentiated by their metric labels.
	// Start time is greater of (execution attempt start, 48h ago)
	// End time is lesser of (execution attempt end, now)
	Data *structpb.Struct `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

func (x *ExecutionMetricResult) Reset() {
	*x = ExecutionMetricResult{}
	if protoimpl.UnsafeEnabled {
		mi := &file_flyteidl_core_metrics_proto_msgTypes[1]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*ExecutionMetricResult) ProtoMessage() {}

func (x *ExecutionMetricResult) ProtoReflect() protoreflect.Message {
	mi := &file_flyteidl_core_metrics_proto_msgTypes[1]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

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

func (x *ExecutionMetricResult) GetMetric() string {
	if x != nil {
		return x.Metric
	}
	return ""
}

func (x *ExecutionMetricResult) GetData() *structpb.Struct {
	if x != nil {
		return x.Data
	}
	return nil
}

var File_flyteidl_core_metrics_proto protoreflect.FileDescriptor

var file_flyteidl_core_metrics_proto_rawDesc = []byte{
	0x0a, 0x1b, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f,
	0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x66,
	0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x1e, 0x66, 0x6c,
	0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x64, 0x65, 0x6e,
	0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f,
	0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69,
	0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67,
	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73,
	0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x03, 0x0a, 0x04,
	0x53, 0x70, 0x61, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69,
	0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
	0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12,
	0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
	0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
	0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65,
	0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4d, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
	0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x66, 0x6c,
	0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b,
	0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65,
	0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66,
	0x6c, 0x6f, 0x77, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64,
	0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64,
	0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75,
	0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00,
	0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b,
	0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74,
	0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78,
	0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,
	0x72, 0x48, 0x00, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x6f,
	0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
	0x09, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64,
	0x12, 0x29, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
	0x13, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
	0x53, 0x70, 0x61, 0x6e, 0x52, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x42, 0x04, 0x0a, 0x02, 0x69,
	0x64, 0x22, 0x5c, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65,
	0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65,
	0x74, 0x72, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72,
	0x69, 0x63, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
	0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
	0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42,
	0xb2, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c,
	0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, 0x72,
	0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
	0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65,
	0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62,
	0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72,
	0x65, 0xa2, 0x02, 0x03, 0x46, 0x43, 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69,
	0x64, 0x6c, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69,
	0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69,
	0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
	0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a,
	0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
	file_flyteidl_core_metrics_proto_rawDescOnce sync.Once
	file_flyteidl_core_metrics_proto_rawDescData = file_flyteidl_core_metrics_proto_rawDesc
)

func file_flyteidl_core_metrics_proto_rawDescGZIP() []byte {
	file_flyteidl_core_metrics_proto_rawDescOnce.Do(func() {
		file_flyteidl_core_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_flyteidl_core_metrics_proto_rawDescData)
	})
	return file_flyteidl_core_metrics_proto_rawDescData
}

var file_flyteidl_core_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_flyteidl_core_metrics_proto_goTypes = []interface{}{
	(*Span)(nil),                        // 0: flyteidl.core.Span
	(*ExecutionMetricResult)(nil),       // 1: flyteidl.core.ExecutionMetricResult
	(*timestamppb.Timestamp)(nil),       // 2: google.protobuf.Timestamp
	(*WorkflowExecutionIdentifier)(nil), // 3: flyteidl.core.WorkflowExecutionIdentifier
	(*NodeExecutionIdentifier)(nil),     // 4: flyteidl.core.NodeExecutionIdentifier
	(*TaskExecutionIdentifier)(nil),     // 5: flyteidl.core.TaskExecutionIdentifier
	(*structpb.Struct)(nil),             // 6: google.protobuf.Struct
}
var file_flyteidl_core_metrics_proto_depIdxs = []int32{
	2, // 0: flyteidl.core.Span.start_time:type_name -> google.protobuf.Timestamp
	2, // 1: flyteidl.core.Span.end_time:type_name -> google.protobuf.Timestamp
	3, // 2: flyteidl.core.Span.workflow_id:type_name -> flyteidl.core.WorkflowExecutionIdentifier
	4, // 3: flyteidl.core.Span.node_id:type_name -> flyteidl.core.NodeExecutionIdentifier
	5, // 4: flyteidl.core.Span.task_id:type_name -> flyteidl.core.TaskExecutionIdentifier
	0, // 5: flyteidl.core.Span.spans:type_name -> flyteidl.core.Span
	6, // 6: flyteidl.core.ExecutionMetricResult.data:type_name -> google.protobuf.Struct
	7, // [7:7] is the sub-list for method output_type
	7, // [7:7] is the sub-list for method input_type
	7, // [7:7] is the sub-list for extension type_name
	7, // [7:7] is the sub-list for extension extendee
	0, // [0:7] is the sub-list for field type_name
}

func init() { file_flyteidl_core_metrics_proto_init() }
func file_flyteidl_core_metrics_proto_init() {
	if File_flyteidl_core_metrics_proto != nil {
		return
	}
	file_flyteidl_core_identifier_proto_init()
	if !protoimpl.UnsafeEnabled {
		file_flyteidl_core_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*Span); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_flyteidl_core_metrics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*ExecutionMetricResult); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}
	file_flyteidl_core_metrics_proto_msgTypes[0].OneofWrappers = []interface{}{
		(*Span_WorkflowId)(nil),
		(*Span_NodeId)(nil),
		(*Span_TaskId)(nil),
		(*Span_OperationId)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: file_flyteidl_core_metrics_proto_rawDesc,
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_flyteidl_core_metrics_proto_goTypes,
		DependencyIndexes: file_flyteidl_core_metrics_proto_depIdxs,
		MessageInfos:      file_flyteidl_core_metrics_proto_msgTypes,
	}.Build()
	File_flyteidl_core_metrics_proto = out.File
	file_flyteidl_core_metrics_proto_rawDesc = nil
	file_flyteidl_core_metrics_proto_goTypes = nil
	file_flyteidl_core_metrics_proto_depIdxs = nil
}
