1// Copyright 2015-2016 gRPC authors.
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// Contains the definitions for a metrics service and the type of metrics
16// exposed by the service.
17//
18// Currently, 'Gauge' (i.e a metric that represents the measured value of
19// something at an instant of time) is the only metric type supported by the
20// service.
21
22// Code generated by protoc-gen-go. DO NOT EDIT.
23// versions:
24// 	protoc-gen-go v1.25.0
25// 	protoc        v3.14.0
26// source: stress/grpc_testing/metrics.proto
27
28package grpc_testing
29
30import (
31	proto "github.com/golang/protobuf/proto"
32	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
33	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
34	reflect "reflect"
35	sync "sync"
36)
37
38const (
39	// Verify that this generated code is sufficiently up-to-date.
40	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
41	// Verify that runtime/protoimpl is sufficiently up-to-date.
42	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
43)
44
45// This is a compile-time assertion that a sufficiently up-to-date version
46// of the legacy proto package is being used.
47const _ = proto.ProtoPackageIsVersion4
48
49// Response message containing the gauge name and value
50type GaugeResponse struct {
51	state         protoimpl.MessageState
52	sizeCache     protoimpl.SizeCache
53	unknownFields protoimpl.UnknownFields
54
55	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
56	// Types that are assignable to Value:
57	//	*GaugeResponse_LongValue
58	//	*GaugeResponse_DoubleValue
59	//	*GaugeResponse_StringValue
60	Value isGaugeResponse_Value `protobuf_oneof:"value"`
61}
62
63func (x *GaugeResponse) Reset() {
64	*x = GaugeResponse{}
65	if protoimpl.UnsafeEnabled {
66		mi := &file_stress_grpc_testing_metrics_proto_msgTypes[0]
67		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
68		ms.StoreMessageInfo(mi)
69	}
70}
71
72func (x *GaugeResponse) String() string {
73	return protoimpl.X.MessageStringOf(x)
74}
75
76func (*GaugeResponse) ProtoMessage() {}
77
78func (x *GaugeResponse) ProtoReflect() protoreflect.Message {
79	mi := &file_stress_grpc_testing_metrics_proto_msgTypes[0]
80	if protoimpl.UnsafeEnabled && x != nil {
81		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
82		if ms.LoadMessageInfo() == nil {
83			ms.StoreMessageInfo(mi)
84		}
85		return ms
86	}
87	return mi.MessageOf(x)
88}
89
90// Deprecated: Use GaugeResponse.ProtoReflect.Descriptor instead.
91func (*GaugeResponse) Descriptor() ([]byte, []int) {
92	return file_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{0}
93}
94
95func (x *GaugeResponse) GetName() string {
96	if x != nil {
97		return x.Name
98	}
99	return ""
100}
101
102func (m *GaugeResponse) GetValue() isGaugeResponse_Value {
103	if m != nil {
104		return m.Value
105	}
106	return nil
107}
108
109func (x *GaugeResponse) GetLongValue() int64 {
110	if x, ok := x.GetValue().(*GaugeResponse_LongValue); ok {
111		return x.LongValue
112	}
113	return 0
114}
115
116func (x *GaugeResponse) GetDoubleValue() float64 {
117	if x, ok := x.GetValue().(*GaugeResponse_DoubleValue); ok {
118		return x.DoubleValue
119	}
120	return 0
121}
122
123func (x *GaugeResponse) GetStringValue() string {
124	if x, ok := x.GetValue().(*GaugeResponse_StringValue); ok {
125		return x.StringValue
126	}
127	return ""
128}
129
130type isGaugeResponse_Value interface {
131	isGaugeResponse_Value()
132}
133
134type GaugeResponse_LongValue struct {
135	LongValue int64 `protobuf:"varint,2,opt,name=long_value,json=longValue,proto3,oneof"`
136}
137
138type GaugeResponse_DoubleValue struct {
139	DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"`
140}
141
142type GaugeResponse_StringValue struct {
143	StringValue string `protobuf:"bytes,4,opt,name=string_value,json=stringValue,proto3,oneof"`
144}
145
146func (*GaugeResponse_LongValue) isGaugeResponse_Value() {}
147
148func (*GaugeResponse_DoubleValue) isGaugeResponse_Value() {}
149
150func (*GaugeResponse_StringValue) isGaugeResponse_Value() {}
151
152// Request message containing the gauge name
153type GaugeRequest struct {
154	state         protoimpl.MessageState
155	sizeCache     protoimpl.SizeCache
156	unknownFields protoimpl.UnknownFields
157
158	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
159}
160
161func (x *GaugeRequest) Reset() {
162	*x = GaugeRequest{}
163	if protoimpl.UnsafeEnabled {
164		mi := &file_stress_grpc_testing_metrics_proto_msgTypes[1]
165		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
166		ms.StoreMessageInfo(mi)
167	}
168}
169
170func (x *GaugeRequest) String() string {
171	return protoimpl.X.MessageStringOf(x)
172}
173
174func (*GaugeRequest) ProtoMessage() {}
175
176func (x *GaugeRequest) ProtoReflect() protoreflect.Message {
177	mi := &file_stress_grpc_testing_metrics_proto_msgTypes[1]
178	if protoimpl.UnsafeEnabled && x != nil {
179		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
180		if ms.LoadMessageInfo() == nil {
181			ms.StoreMessageInfo(mi)
182		}
183		return ms
184	}
185	return mi.MessageOf(x)
186}
187
188// Deprecated: Use GaugeRequest.ProtoReflect.Descriptor instead.
189func (*GaugeRequest) Descriptor() ([]byte, []int) {
190	return file_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{1}
191}
192
193func (x *GaugeRequest) GetName() string {
194	if x != nil {
195		return x.Name
196	}
197	return ""
198}
199
200type EmptyMessage struct {
201	state         protoimpl.MessageState
202	sizeCache     protoimpl.SizeCache
203	unknownFields protoimpl.UnknownFields
204}
205
206func (x *EmptyMessage) Reset() {
207	*x = EmptyMessage{}
208	if protoimpl.UnsafeEnabled {
209		mi := &file_stress_grpc_testing_metrics_proto_msgTypes[2]
210		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
211		ms.StoreMessageInfo(mi)
212	}
213}
214
215func (x *EmptyMessage) String() string {
216	return protoimpl.X.MessageStringOf(x)
217}
218
219func (*EmptyMessage) ProtoMessage() {}
220
221func (x *EmptyMessage) ProtoReflect() protoreflect.Message {
222	mi := &file_stress_grpc_testing_metrics_proto_msgTypes[2]
223	if protoimpl.UnsafeEnabled && x != nil {
224		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
225		if ms.LoadMessageInfo() == nil {
226			ms.StoreMessageInfo(mi)
227		}
228		return ms
229	}
230	return mi.MessageOf(x)
231}
232
233// Deprecated: Use EmptyMessage.ProtoReflect.Descriptor instead.
234func (*EmptyMessage) Descriptor() ([]byte, []int) {
235	return file_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{2}
236}
237
238var File_stress_grpc_testing_metrics_proto protoreflect.FileDescriptor
239
240var file_stress_grpc_testing_metrics_proto_rawDesc = []byte{
241	0x0a, 0x21, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x65,
242	0x73, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72,
243	0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e,
244	0x67, 0x22, 0x97, 0x01, 0x0a, 0x0d, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
245	0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
246	0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x5f,
247	0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x6c,
248	0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62,
249	0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00,
250	0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a,
251	0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20,
252	0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c,
253	0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x22, 0x0a, 0x0c, 0x47,
254	0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
255	0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22,
256	0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32,
257	0xa0, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
258	0x63, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x47, 0x61, 0x75, 0x67,
259	0x65, 0x73, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e,
260	0x67, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1b,
261	0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61,
262	0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x43, 0x0a,
263	0x08, 0x47, 0x65, 0x74, 0x47, 0x61, 0x75, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63,
264	0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65,
265	0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73,
266	0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
267	0x73, 0x65, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c,
268	0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x72,
269	0x65, 0x73, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67,
270	0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
271}
272
273var (
274	file_stress_grpc_testing_metrics_proto_rawDescOnce sync.Once
275	file_stress_grpc_testing_metrics_proto_rawDescData = file_stress_grpc_testing_metrics_proto_rawDesc
276)
277
278func file_stress_grpc_testing_metrics_proto_rawDescGZIP() []byte {
279	file_stress_grpc_testing_metrics_proto_rawDescOnce.Do(func() {
280		file_stress_grpc_testing_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_stress_grpc_testing_metrics_proto_rawDescData)
281	})
282	return file_stress_grpc_testing_metrics_proto_rawDescData
283}
284
285var file_stress_grpc_testing_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
286var file_stress_grpc_testing_metrics_proto_goTypes = []interface{}{
287	(*GaugeResponse)(nil), // 0: grpc.testing.GaugeResponse
288	(*GaugeRequest)(nil),  // 1: grpc.testing.GaugeRequest
289	(*EmptyMessage)(nil),  // 2: grpc.testing.EmptyMessage
290}
291var file_stress_grpc_testing_metrics_proto_depIdxs = []int32{
292	2, // 0: grpc.testing.MetricsService.GetAllGauges:input_type -> grpc.testing.EmptyMessage
293	1, // 1: grpc.testing.MetricsService.GetGauge:input_type -> grpc.testing.GaugeRequest
294	0, // 2: grpc.testing.MetricsService.GetAllGauges:output_type -> grpc.testing.GaugeResponse
295	0, // 3: grpc.testing.MetricsService.GetGauge:output_type -> grpc.testing.GaugeResponse
296	2, // [2:4] is the sub-list for method output_type
297	0, // [0:2] is the sub-list for method input_type
298	0, // [0:0] is the sub-list for extension type_name
299	0, // [0:0] is the sub-list for extension extendee
300	0, // [0:0] is the sub-list for field type_name
301}
302
303func init() { file_stress_grpc_testing_metrics_proto_init() }
304func file_stress_grpc_testing_metrics_proto_init() {
305	if File_stress_grpc_testing_metrics_proto != nil {
306		return
307	}
308	if !protoimpl.UnsafeEnabled {
309		file_stress_grpc_testing_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
310			switch v := v.(*GaugeResponse); i {
311			case 0:
312				return &v.state
313			case 1:
314				return &v.sizeCache
315			case 2:
316				return &v.unknownFields
317			default:
318				return nil
319			}
320		}
321		file_stress_grpc_testing_metrics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
322			switch v := v.(*GaugeRequest); i {
323			case 0:
324				return &v.state
325			case 1:
326				return &v.sizeCache
327			case 2:
328				return &v.unknownFields
329			default:
330				return nil
331			}
332		}
333		file_stress_grpc_testing_metrics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
334			switch v := v.(*EmptyMessage); i {
335			case 0:
336				return &v.state
337			case 1:
338				return &v.sizeCache
339			case 2:
340				return &v.unknownFields
341			default:
342				return nil
343			}
344		}
345	}
346	file_stress_grpc_testing_metrics_proto_msgTypes[0].OneofWrappers = []interface{}{
347		(*GaugeResponse_LongValue)(nil),
348		(*GaugeResponse_DoubleValue)(nil),
349		(*GaugeResponse_StringValue)(nil),
350	}
351	type x struct{}
352	out := protoimpl.TypeBuilder{
353		File: protoimpl.DescBuilder{
354			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
355			RawDescriptor: file_stress_grpc_testing_metrics_proto_rawDesc,
356			NumEnums:      0,
357			NumMessages:   3,
358			NumExtensions: 0,
359			NumServices:   1,
360		},
361		GoTypes:           file_stress_grpc_testing_metrics_proto_goTypes,
362		DependencyIndexes: file_stress_grpc_testing_metrics_proto_depIdxs,
363		MessageInfos:      file_stress_grpc_testing_metrics_proto_msgTypes,
364	}.Build()
365	File_stress_grpc_testing_metrics_proto = out.File
366	file_stress_grpc_testing_metrics_proto_rawDesc = nil
367	file_stress_grpc_testing_metrics_proto_goTypes = nil
368	file_stress_grpc_testing_metrics_proto_depIdxs = nil
369}
370