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