1// Copyright 2020 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Code generated by protoc-gen-go. DO NOT EDIT.
16// versions:
17// 	protoc-gen-go v1.25.0
18// 	protoc        v3.13.0
19// source: google/api/monitoring.proto
20
21package serviceconfig
22
23import (
24	reflect "reflect"
25	sync "sync"
26
27	proto "github.com/golang/protobuf/proto"
28	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
29	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
30)
31
32const (
33	// Verify that this generated code is sufficiently up-to-date.
34	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
35	// Verify that runtime/protoimpl is sufficiently up-to-date.
36	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
37)
38
39// This is a compile-time assertion that a sufficiently up-to-date version
40// of the legacy proto package is being used.
41const _ = proto.ProtoPackageIsVersion4
42
43// Monitoring configuration of the service.
44//
45// The example below shows how to configure monitored resources and metrics
46// for monitoring. In the example, a monitored resource and two metrics are
47// defined. The `library.googleapis.com/book/returned_count` metric is sent
48// to both producer and consumer projects, whereas the
49// `library.googleapis.com/book/num_overdue` metric is only sent to the
50// consumer project.
51//
52//     monitored_resources:
53//     - type: library.googleapis.com/Branch
54//       display_name: "Library Branch"
55//       description: "A branch of a library."
56//       launch_stage: GA
57//       labels:
58//       - key: resource_container
59//         description: "The Cloud container (ie. project id) for the Branch."
60//       - key: location
61//         description: "The location of the library branch."
62//       - key: branch_id
63//         description: "The id of the branch."
64//     metrics:
65//     - name: library.googleapis.com/book/returned_count
66//       display_name: "Books Returned"
67//       description: "The count of books that have been returned."
68//       launch_stage: GA
69//       metric_kind: DELTA
70//       value_type: INT64
71//       unit: "1"
72//       labels:
73//       - key: customer_id
74//         description: "The id of the customer."
75//     - name: library.googleapis.com/book/num_overdue
76//       display_name: "Books Overdue"
77//       description: "The current number of overdue books."
78//       launch_stage: GA
79//       metric_kind: GAUGE
80//       value_type: INT64
81//       unit: "1"
82//       labels:
83//       - key: customer_id
84//         description: "The id of the customer."
85//     monitoring:
86//       producer_destinations:
87//       - monitored_resource: library.googleapis.com/Branch
88//         metrics:
89//         - library.googleapis.com/book/returned_count
90//       consumer_destinations:
91//       - monitored_resource: library.googleapis.com/Branch
92//         metrics:
93//         - library.googleapis.com/book/returned_count
94//         - library.googleapis.com/book/num_overdue
95type Monitoring struct {
96	state         protoimpl.MessageState
97	sizeCache     protoimpl.SizeCache
98	unknownFields protoimpl.UnknownFields
99
100	// Monitoring configurations for sending metrics to the producer project.
101	// There can be multiple producer destinations. A monitored resource type may
102	// appear in multiple monitoring destinations if different aggregations are
103	// needed for different sets of metrics associated with that monitored
104	// resource type. A monitored resource and metric pair may only be used once
105	// in the Monitoring configuration.
106	ProducerDestinations []*Monitoring_MonitoringDestination `protobuf:"bytes,1,rep,name=producer_destinations,json=producerDestinations,proto3" json:"producer_destinations,omitempty"`
107	// Monitoring configurations for sending metrics to the consumer project.
108	// There can be multiple consumer destinations. A monitored resource type may
109	// appear in multiple monitoring destinations if different aggregations are
110	// needed for different sets of metrics associated with that monitored
111	// resource type. A monitored resource and metric pair may only be used once
112	// in the Monitoring configuration.
113	ConsumerDestinations []*Monitoring_MonitoringDestination `protobuf:"bytes,2,rep,name=consumer_destinations,json=consumerDestinations,proto3" json:"consumer_destinations,omitempty"`
114}
115
116func (x *Monitoring) Reset() {
117	*x = Monitoring{}
118	if protoimpl.UnsafeEnabled {
119		mi := &file_google_api_monitoring_proto_msgTypes[0]
120		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
121		ms.StoreMessageInfo(mi)
122	}
123}
124
125func (x *Monitoring) String() string {
126	return protoimpl.X.MessageStringOf(x)
127}
128
129func (*Monitoring) ProtoMessage() {}
130
131func (x *Monitoring) ProtoReflect() protoreflect.Message {
132	mi := &file_google_api_monitoring_proto_msgTypes[0]
133	if protoimpl.UnsafeEnabled && x != nil {
134		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
135		if ms.LoadMessageInfo() == nil {
136			ms.StoreMessageInfo(mi)
137		}
138		return ms
139	}
140	return mi.MessageOf(x)
141}
142
143// Deprecated: Use Monitoring.ProtoReflect.Descriptor instead.
144func (*Monitoring) Descriptor() ([]byte, []int) {
145	return file_google_api_monitoring_proto_rawDescGZIP(), []int{0}
146}
147
148func (x *Monitoring) GetProducerDestinations() []*Monitoring_MonitoringDestination {
149	if x != nil {
150		return x.ProducerDestinations
151	}
152	return nil
153}
154
155func (x *Monitoring) GetConsumerDestinations() []*Monitoring_MonitoringDestination {
156	if x != nil {
157		return x.ConsumerDestinations
158	}
159	return nil
160}
161
162// Configuration of a specific monitoring destination (the producer project
163// or the consumer project).
164type Monitoring_MonitoringDestination struct {
165	state         protoimpl.MessageState
166	sizeCache     protoimpl.SizeCache
167	unknownFields protoimpl.UnknownFields
168
169	// The monitored resource type. The type must be defined in
170	// [Service.monitored_resources][google.api.Service.monitored_resources] section.
171	MonitoredResource string `protobuf:"bytes,1,opt,name=monitored_resource,json=monitoredResource,proto3" json:"monitored_resource,omitempty"`
172	// Types of the metrics to report to this monitoring destination.
173	// Each type must be defined in [Service.metrics][google.api.Service.metrics] section.
174	Metrics []string `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
175}
176
177func (x *Monitoring_MonitoringDestination) Reset() {
178	*x = Monitoring_MonitoringDestination{}
179	if protoimpl.UnsafeEnabled {
180		mi := &file_google_api_monitoring_proto_msgTypes[1]
181		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
182		ms.StoreMessageInfo(mi)
183	}
184}
185
186func (x *Monitoring_MonitoringDestination) String() string {
187	return protoimpl.X.MessageStringOf(x)
188}
189
190func (*Monitoring_MonitoringDestination) ProtoMessage() {}
191
192func (x *Monitoring_MonitoringDestination) ProtoReflect() protoreflect.Message {
193	mi := &file_google_api_monitoring_proto_msgTypes[1]
194	if protoimpl.UnsafeEnabled && x != nil {
195		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
196		if ms.LoadMessageInfo() == nil {
197			ms.StoreMessageInfo(mi)
198		}
199		return ms
200	}
201	return mi.MessageOf(x)
202}
203
204// Deprecated: Use Monitoring_MonitoringDestination.ProtoReflect.Descriptor instead.
205func (*Monitoring_MonitoringDestination) Descriptor() ([]byte, []int) {
206	return file_google_api_monitoring_proto_rawDescGZIP(), []int{0, 0}
207}
208
209func (x *Monitoring_MonitoringDestination) GetMonitoredResource() string {
210	if x != nil {
211		return x.MonitoredResource
212	}
213	return ""
214}
215
216func (x *Monitoring_MonitoringDestination) GetMetrics() []string {
217	if x != nil {
218		return x.Metrics
219	}
220	return nil
221}
222
223var File_google_api_monitoring_proto protoreflect.FileDescriptor
224
225var file_google_api_monitoring_proto_rawDesc = []byte{
226	0x0a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x6f, 0x6e,
227	0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67,
228	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, 0xb4, 0x02, 0x0a, 0x0a, 0x4d, 0x6f,
229	0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x61, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x64,
230	0x75, 0x63, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
231	0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
232	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x2e,
233	0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e,
234	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x44,
235	0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x61, 0x0a, 0x15, 0x63,
236	0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74,
237	0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f,
238	0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69,
239	0x6e, 0x67, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73,
240	0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d,
241	0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x60,
242	0x0a, 0x15, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x74,
243	0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x6f, 0x6e, 0x69, 0x74,
244	0x6f, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20,
245	0x01, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65,
246	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63,
247	0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
248	0x42, 0x71, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,
249	0x70, 0x69, 0x42, 0x0f, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72,
250	0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f,
251	0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74,
252	0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69,
253	0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73,
254	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47,
255	0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
256}
257
258var (
259	file_google_api_monitoring_proto_rawDescOnce sync.Once
260	file_google_api_monitoring_proto_rawDescData = file_google_api_monitoring_proto_rawDesc
261)
262
263func file_google_api_monitoring_proto_rawDescGZIP() []byte {
264	file_google_api_monitoring_proto_rawDescOnce.Do(func() {
265		file_google_api_monitoring_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_monitoring_proto_rawDescData)
266	})
267	return file_google_api_monitoring_proto_rawDescData
268}
269
270var file_google_api_monitoring_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
271var file_google_api_monitoring_proto_goTypes = []interface{}{
272	(*Monitoring)(nil),                       // 0: google.api.Monitoring
273	(*Monitoring_MonitoringDestination)(nil), // 1: google.api.Monitoring.MonitoringDestination
274}
275var file_google_api_monitoring_proto_depIdxs = []int32{
276	1, // 0: google.api.Monitoring.producer_destinations:type_name -> google.api.Monitoring.MonitoringDestination
277	1, // 1: google.api.Monitoring.consumer_destinations:type_name -> google.api.Monitoring.MonitoringDestination
278	2, // [2:2] is the sub-list for method output_type
279	2, // [2:2] is the sub-list for method input_type
280	2, // [2:2] is the sub-list for extension type_name
281	2, // [2:2] is the sub-list for extension extendee
282	0, // [0:2] is the sub-list for field type_name
283}
284
285func init() { file_google_api_monitoring_proto_init() }
286func file_google_api_monitoring_proto_init() {
287	if File_google_api_monitoring_proto != nil {
288		return
289	}
290	if !protoimpl.UnsafeEnabled {
291		file_google_api_monitoring_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
292			switch v := v.(*Monitoring); i {
293			case 0:
294				return &v.state
295			case 1:
296				return &v.sizeCache
297			case 2:
298				return &v.unknownFields
299			default:
300				return nil
301			}
302		}
303		file_google_api_monitoring_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
304			switch v := v.(*Monitoring_MonitoringDestination); i {
305			case 0:
306				return &v.state
307			case 1:
308				return &v.sizeCache
309			case 2:
310				return &v.unknownFields
311			default:
312				return nil
313			}
314		}
315	}
316	type x struct{}
317	out := protoimpl.TypeBuilder{
318		File: protoimpl.DescBuilder{
319			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
320			RawDescriptor: file_google_api_monitoring_proto_rawDesc,
321			NumEnums:      0,
322			NumMessages:   2,
323			NumExtensions: 0,
324			NumServices:   0,
325		},
326		GoTypes:           file_google_api_monitoring_proto_goTypes,
327		DependencyIndexes: file_google_api_monitoring_proto_depIdxs,
328		MessageInfos:      file_google_api_monitoring_proto_msgTypes,
329	}.Build()
330	File_google_api_monitoring_proto = out.File
331	file_google_api_monitoring_proto_rawDesc = nil
332	file_google_api_monitoring_proto_goTypes = nil
333	file_google_api_monitoring_proto_depIdxs = nil
334}
335