// Copyright 2025 Google LLC
//
// 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        v6.33.2
// source: google/monitoring/dashboard/v1/piechart.proto

package dashboardpb

import (
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"

	_ "google.golang.org/genproto/googleapis/api/annotations"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
)

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

// Types for the pie chart.
type PieChart_PieChartType int32

const (
	// The zero value. No type specified. Do not use.
	PieChart_PIE_CHART_TYPE_UNSPECIFIED PieChart_PieChartType = 0
	// A Pie type PieChart.
	PieChart_PIE PieChart_PieChartType = 1
	// Similar to PIE, but the DONUT type PieChart has a hole in the middle.
	PieChart_DONUT PieChart_PieChartType = 2
)

// Enum value maps for PieChart_PieChartType.
var (
	PieChart_PieChartType_name = map[int32]string{
		0: "PIE_CHART_TYPE_UNSPECIFIED",
		1: "PIE",
		2: "DONUT",
	}
	PieChart_PieChartType_value = map[string]int32{
		"PIE_CHART_TYPE_UNSPECIFIED": 0,
		"PIE":                        1,
		"DONUT":                      2,
	}
)

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

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

func (PieChart_PieChartType) Descriptor() protoreflect.EnumDescriptor {
	return file_google_monitoring_dashboard_v1_piechart_proto_enumTypes[0].Descriptor()
}

func (PieChart_PieChartType) Type() protoreflect.EnumType {
	return &file_google_monitoring_dashboard_v1_piechart_proto_enumTypes[0]
}

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

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

// A widget that displays timeseries data as a pie or a donut.
type PieChart struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The queries for the chart's data.
	DataSets []*PieChart_PieChartDataSet `protobuf:"bytes,1,rep,name=data_sets,json=dataSets,proto3" json:"data_sets,omitempty"`
	// Required. Indicates the visualization type for the PieChart.
	ChartType PieChart_PieChartType `protobuf:"varint,2,opt,name=chart_type,json=chartType,proto3,enum=google.monitoring.dashboard.v1.PieChart_PieChartType" json:"chart_type,omitempty"`
	// Optional. Indicates whether or not the pie chart should show slices' labels
	ShowLabels    bool `protobuf:"varint,4,opt,name=show_labels,json=showLabels,proto3" json:"show_labels,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*PieChart) ProtoMessage() {}

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

func (x *PieChart) GetDataSets() []*PieChart_PieChartDataSet {
	if x != nil {
		return x.DataSets
	}
	return nil
}

func (x *PieChart) GetChartType() PieChart_PieChartType {
	if x != nil {
		return x.ChartType
	}
	return PieChart_PIE_CHART_TYPE_UNSPECIFIED
}

func (x *PieChart) GetShowLabels() bool {
	if x != nil {
		return x.ShowLabels
	}
	return false
}

// Groups a time series query definition.
type PieChart_PieChartDataSet struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The query for the PieChart. See,
	// `google.monitoring.dashboard.v1.TimeSeriesQuery`.
	TimeSeriesQuery *TimeSeriesQuery `protobuf:"bytes,1,opt,name=time_series_query,json=timeSeriesQuery,proto3" json:"time_series_query,omitempty"`
	// Optional. A template for the name of the slice. This name will be
	// displayed in the legend and the tooltip of the pie chart. It replaces the
	// auto-generated names for the slices. For example, if the template is set
	// to
	// `${resource.labels.zone}`, the zone's value will be used for the name
	// instead of the default name.
	SliceNameTemplate string `protobuf:"bytes,2,opt,name=slice_name_template,json=sliceNameTemplate,proto3" json:"slice_name_template,omitempty"`
	// Optional. The lower bound on data point frequency for this data set,
	// implemented by specifying the minimum alignment period to use in a time
	// series query. For example, if the data is published once every 10
	// minutes, the `min_alignment_period` should be at least 10 minutes. It
	// would not make sense to fetch and align data at one minute intervals.
	MinAlignmentPeriod *durationpb.Duration `protobuf:"bytes,3,opt,name=min_alignment_period,json=minAlignmentPeriod,proto3" json:"min_alignment_period,omitempty"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

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

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

func (*PieChart_PieChartDataSet) ProtoMessage() {}

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

func (x *PieChart_PieChartDataSet) GetTimeSeriesQuery() *TimeSeriesQuery {
	if x != nil {
		return x.TimeSeriesQuery
	}
	return nil
}

func (x *PieChart_PieChartDataSet) GetSliceNameTemplate() string {
	if x != nil {
		return x.SliceNameTemplate
	}
	return ""
}

func (x *PieChart_PieChartDataSet) GetMinAlignmentPeriod() *durationpb.Duration {
	if x != nil {
		return x.MinAlignmentPeriod
	}
	return nil
}

var File_google_monitoring_dashboard_v1_piechart_proto protoreflect.FileDescriptor

const file_google_monitoring_dashboard_v1_piechart_proto_rawDesc = "" +
	"\n" +
	"-google/monitoring/dashboard/v1/piechart.proto\x12\x1egoogle.monitoring.dashboard.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a,google/monitoring/dashboard/v1/metrics.proto\x1a\x1egoogle/protobuf/duration.proto\"\xa8\x04\n" +
	"\bPieChart\x12Z\n" +
	"\tdata_sets\x18\x01 \x03(\v28.google.monitoring.dashboard.v1.PieChart.PieChartDataSetB\x03\xe0A\x02R\bdataSets\x12Y\n" +
	"\n" +
	"chart_type\x18\x02 \x01(\x0e25.google.monitoring.dashboard.v1.PieChart.PieChartTypeB\x03\xe0A\x02R\tchartType\x12$\n" +
	"\vshow_labels\x18\x04 \x01(\bB\x03\xe0A\x01R\n" +
	"showLabels\x1a\xfa\x01\n" +
	"\x0fPieChartDataSet\x12`\n" +
	"\x11time_series_query\x18\x01 \x01(\v2/.google.monitoring.dashboard.v1.TimeSeriesQueryB\x03\xe0A\x02R\x0ftimeSeriesQuery\x123\n" +
	"\x13slice_name_template\x18\x02 \x01(\tB\x03\xe0A\x01R\x11sliceNameTemplate\x12P\n" +
	"\x14min_alignment_period\x18\x03 \x01(\v2\x19.google.protobuf.DurationB\x03\xe0A\x01R\x12minAlignmentPeriod\"B\n" +
	"\fPieChartType\x12\x1e\n" +
	"\x1aPIE_CHART_TYPE_UNSPECIFIED\x10\x00\x12\a\n" +
	"\x03PIE\x10\x01\x12\t\n" +
	"\x05DONUT\x10\x02B\xf6\x01\n" +
	"\"com.google.monitoring.dashboard.v1B\rPieChartProtoP\x01ZFcloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb;dashboardpb\xaa\x02$Google.Cloud.Monitoring.Dashboard.V1\xca\x02$Google\\Cloud\\Monitoring\\Dashboard\\V1\xea\x02(Google::Cloud::Monitoring::Dashboard::V1b\x06proto3"

var (
	file_google_monitoring_dashboard_v1_piechart_proto_rawDescOnce sync.Once
	file_google_monitoring_dashboard_v1_piechart_proto_rawDescData []byte
)

func file_google_monitoring_dashboard_v1_piechart_proto_rawDescGZIP() []byte {
	file_google_monitoring_dashboard_v1_piechart_proto_rawDescOnce.Do(func() {
		file_google_monitoring_dashboard_v1_piechart_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_monitoring_dashboard_v1_piechart_proto_rawDesc), len(file_google_monitoring_dashboard_v1_piechart_proto_rawDesc)))
	})
	return file_google_monitoring_dashboard_v1_piechart_proto_rawDescData
}

var file_google_monitoring_dashboard_v1_piechart_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_google_monitoring_dashboard_v1_piechart_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_google_monitoring_dashboard_v1_piechart_proto_goTypes = []any{
	(PieChart_PieChartType)(0),       // 0: google.monitoring.dashboard.v1.PieChart.PieChartType
	(*PieChart)(nil),                 // 1: google.monitoring.dashboard.v1.PieChart
	(*PieChart_PieChartDataSet)(nil), // 2: google.monitoring.dashboard.v1.PieChart.PieChartDataSet
	(*TimeSeriesQuery)(nil),          // 3: google.monitoring.dashboard.v1.TimeSeriesQuery
	(*durationpb.Duration)(nil),      // 4: google.protobuf.Duration
}
var file_google_monitoring_dashboard_v1_piechart_proto_depIdxs = []int32{
	2, // 0: google.monitoring.dashboard.v1.PieChart.data_sets:type_name -> google.monitoring.dashboard.v1.PieChart.PieChartDataSet
	0, // 1: google.monitoring.dashboard.v1.PieChart.chart_type:type_name -> google.monitoring.dashboard.v1.PieChart.PieChartType
	3, // 2: google.monitoring.dashboard.v1.PieChart.PieChartDataSet.time_series_query:type_name -> google.monitoring.dashboard.v1.TimeSeriesQuery
	4, // 3: google.monitoring.dashboard.v1.PieChart.PieChartDataSet.min_alignment_period:type_name -> google.protobuf.Duration
	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_google_monitoring_dashboard_v1_piechart_proto_init() }
func file_google_monitoring_dashboard_v1_piechart_proto_init() {
	if File_google_monitoring_dashboard_v1_piechart_proto != nil {
		return
	}
	file_google_monitoring_dashboard_v1_metrics_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_monitoring_dashboard_v1_piechart_proto_rawDesc), len(file_google_monitoring_dashboard_v1_piechart_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_google_monitoring_dashboard_v1_piechart_proto_goTypes,
		DependencyIndexes: file_google_monitoring_dashboard_v1_piechart_proto_depIdxs,
		EnumInfos:         file_google_monitoring_dashboard_v1_piechart_proto_enumTypes,
		MessageInfos:      file_google_monitoring_dashboard_v1_piechart_proto_msgTypes,
	}.Build()
	File_google_monitoring_dashboard_v1_piechart_proto = out.File
	file_google_monitoring_dashboard_v1_piechart_proto_goTypes = nil
	file_google_monitoring_dashboard_v1_piechart_proto_depIdxs = nil
}
