google-cloud-monitoring 0.28.0 → 0.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/README.md +38 -12
- data/lib/google/cloud/monitoring.rb +52 -2
- data/lib/google/cloud/monitoring/v3.rb +124 -52
- data/lib/google/cloud/monitoring/v3/alert_policy_service_client.rb +67 -29
- data/lib/google/cloud/monitoring/v3/credentials.rb +43 -0
- data/lib/google/cloud/monitoring/v3/doc/google/api/metric.rb +7 -11
- data/lib/google/cloud/monitoring/v3/doc/google/api/monitored_resource.rb +27 -3
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/alert.rb +7 -8
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/alert_service.rb +135 -0
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/group_service.rb +145 -0
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/metric.rb +17 -12
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/metric_service.rb +227 -0
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/notification_service.rb +213 -0
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/uptime.rb +49 -29
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/uptime_service.rb +131 -0
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/any.rb +124 -0
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/empty.rb +28 -0
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/struct.rb +73 -0
- data/lib/google/cloud/monitoring/v3/doc/google/rpc/status.rb +83 -0
- data/lib/google/cloud/monitoring/v3/doc/overview.rb +26 -1
- data/lib/google/cloud/monitoring/v3/group_service_client.rb +78 -35
- data/lib/google/cloud/monitoring/v3/metric_service_client.rb +99 -47
- data/lib/google/cloud/monitoring/v3/notification_channel_service_client.rb +87 -39
- data/lib/google/cloud/monitoring/v3/uptime_check_service_client.rb +90 -47
- data/lib/google/monitoring/v3/alert_service_services_pb.rb +1 -1
- data/lib/google/monitoring/v3/dropped_labels_pb.rb +19 -0
- data/lib/google/monitoring/v3/group_service_services_pb.rb +2 -2
- data/lib/google/monitoring/v3/metric_pb.rb +3 -0
- data/lib/google/monitoring/v3/metric_service_pb.rb +2 -0
- data/lib/google/monitoring/v3/metric_service_services_pb.rb +1 -1
- data/lib/google/monitoring/v3/notification_service_services_pb.rb +1 -1
- data/lib/google/monitoring/v3/span_context_pb.rb +18 -0
- data/lib/google/monitoring/v3/uptime_pb.rb +10 -9
- data/lib/google/monitoring/v3/uptime_service_pb.rb +1 -0
- data/lib/google/monitoring/v3/uptime_service_services_pb.rb +1 -1
- metadata +59 -6
- data/lib/google/cloud/monitoring/credentials.rb +0 -33
@@ -15,6 +15,26 @@
|
|
15
15
|
module Google
|
16
16
|
module Monitoring
|
17
17
|
module V3
|
18
|
+
# Nimbus InternalCheckers.
|
19
|
+
# @!attribute [rw] project_id
|
20
|
+
# @return [String]
|
21
|
+
# The GCP project ID. Not necessarily the same as the project_id for the
|
22
|
+
# config.
|
23
|
+
# @!attribute [rw] network
|
24
|
+
# @return [String]
|
25
|
+
# The internal network to perform this uptime check on.
|
26
|
+
# @!attribute [rw] gcp_zone
|
27
|
+
# @return [String]
|
28
|
+
# The GCP zone the uptime check should egress from. Only respected for
|
29
|
+
# internal uptime checks, where internal_network is specified.
|
30
|
+
# @!attribute [rw] checker_id
|
31
|
+
# @return [String]
|
32
|
+
# The checker ID.
|
33
|
+
# @!attribute [rw] display_name
|
34
|
+
# @return [String]
|
35
|
+
# The checker's human-readable name.
|
36
|
+
class InternalChecker; end
|
37
|
+
|
18
38
|
# This message configures which resources and services to monitor for
|
19
39
|
# availability.
|
20
40
|
# @!attribute [rw] name
|
@@ -34,7 +54,15 @@ module Google
|
|
34
54
|
# to identify; however, uniqueness is not enforced. Required.
|
35
55
|
# @!attribute [rw] monitored_resource
|
36
56
|
# @return [Google::Api::MonitoredResource]
|
37
|
-
# The monitored
|
57
|
+
# The [monitored
|
58
|
+
# resource](https://cloud.google.com/monitoring/api/resources) associated
|
59
|
+
# with the configuration.
|
60
|
+
# The following monitored resource types are supported for uptime checks:
|
61
|
+
# uptime_url
|
62
|
+
# gce_instance
|
63
|
+
# gae_app
|
64
|
+
# aws_ec2_instance
|
65
|
+
# aws_elb_load_balancer
|
38
66
|
# @!attribute [rw] resource_group
|
39
67
|
# @return [Google::Monitoring::V3::UptimeCheckConfig::ResourceGroup]
|
40
68
|
# The group resource associated with the configuration.
|
@@ -46,8 +74,10 @@ module Google
|
|
46
74
|
# Contains information needed to make a TCP check.
|
47
75
|
# @!attribute [rw] period
|
48
76
|
# @return [Google::Protobuf::Duration]
|
49
|
-
# How often the uptime check is performed.
|
50
|
-
# Currently, only
|
77
|
+
# How often, in seconds, the uptime check is performed.
|
78
|
+
# Currently, the only supported values are +60s+ (1 minute), +300s+
|
79
|
+
# (5 minutes), +600s+ (10 minutes), and +900s+ (15 minutes). Optional,
|
80
|
+
# defaults to +300s+.
|
51
81
|
# @!attribute [rw] timeout
|
52
82
|
# @return [Google::Protobuf::Duration]
|
53
83
|
# The maximum amount of time to wait for the request to complete (must be
|
@@ -66,9 +96,14 @@ module Google
|
|
66
96
|
# 3 locations must be provided, or an error message is returned.
|
67
97
|
# Not specifying this field will result in uptime checks running from all
|
68
98
|
# regions.
|
99
|
+
# @!attribute [rw] is_internal
|
100
|
+
# @return [true, false]
|
101
|
+
# Denotes whether this is a check that egresses from InternalCheckers.
|
69
102
|
# @!attribute [rw] internal_checkers
|
70
|
-
# @return [Array<Google::Monitoring::V3::
|
71
|
-
# The internal checkers that this check will egress from.
|
103
|
+
# @return [Array<Google::Monitoring::V3::InternalChecker>]
|
104
|
+
# The internal checkers that this check will egress from. If +is_internal+ is
|
105
|
+
# true and this list is empty, the check will egress from all
|
106
|
+
# InternalCheckers configured for the project that owns this CheckConfig.
|
72
107
|
class UptimeCheckConfig
|
73
108
|
# The resource submessage for group checks. It can be used instead of a
|
74
109
|
# monitored resource, when multiple resources are being monitored.
|
@@ -116,6 +151,7 @@ module Google
|
|
116
151
|
# https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
|
117
152
|
# Entering two separate headers with the same key in a Create call will
|
118
153
|
# cause the first to be overwritten by the second.
|
154
|
+
# The maximum number of headers allowed is 100.
|
119
155
|
class HttpCheck
|
120
156
|
# A type of authentication to perform against the specified resource or URL
|
121
157
|
# that uses username and password.
|
@@ -142,27 +178,8 @@ module Google
|
|
142
178
|
# and more complex matching.
|
143
179
|
# @!attribute [rw] content
|
144
180
|
# @return [String]
|
145
|
-
# String content to match
|
181
|
+
# String content to match (max 1024 bytes)
|
146
182
|
class ContentMatcher; end
|
147
|
-
|
148
|
-
# Nimbus InternalCheckers.
|
149
|
-
# @!attribute [rw] project_id
|
150
|
-
# @return [String]
|
151
|
-
# The GCP project ID. Not necessarily the same as the project_id for the config.
|
152
|
-
# @!attribute [rw] network
|
153
|
-
# @return [String]
|
154
|
-
# The internal network to perform this uptime check on.
|
155
|
-
# @!attribute [rw] gcp_zone
|
156
|
-
# @return [String]
|
157
|
-
# The GCP zone the uptime check should egress from. Only respected for
|
158
|
-
# internal uptime checks, where internal_network is specified.
|
159
|
-
# @!attribute [rw] checker_id
|
160
|
-
# @return [String]
|
161
|
-
# The checker ID.
|
162
|
-
# @!attribute [rw] display_name
|
163
|
-
# @return [String]
|
164
|
-
# The checker's human-readable name.
|
165
|
-
class InternalChecker; end
|
166
183
|
end
|
167
184
|
|
168
185
|
# Contains the region, location, and list of IP
|
@@ -206,16 +223,19 @@ module Google
|
|
206
223
|
end
|
207
224
|
|
208
225
|
# The supported resource types that can be used as values of
|
209
|
-
# group_resource.resource_type
|
210
|
-
#
|
226
|
+
# +group_resource.resource_type+.
|
227
|
+
# +INSTANCE+ includes +gce_instance+ and +aws_ec2_instance+ resource types.
|
228
|
+
# The resource types +gae_app+ and +uptime_url+ are not valid here because
|
229
|
+
# group checks on App Engine modules and URLs are not allowed.
|
211
230
|
module GroupResourceType
|
212
231
|
# Default value (not valid).
|
213
232
|
RESOURCE_TYPE_UNSPECIFIED = 0
|
214
233
|
|
215
|
-
# A group of instances
|
234
|
+
# A group of instances from Google Cloud Platform (GCP) or
|
235
|
+
# Amazon Web Services (AWS).
|
216
236
|
INSTANCE = 1
|
217
237
|
|
218
|
-
# A group of
|
238
|
+
# A group of Amazon ELB load balancers.
|
219
239
|
AWS_ELB_LOAD_BALANCER = 2
|
220
240
|
end
|
221
241
|
end
|
@@ -0,0 +1,131 @@
|
|
1
|
+
# Copyright 2018 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
|
+
# https://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
|
+
module Google
|
16
|
+
module Monitoring
|
17
|
+
module V3
|
18
|
+
# The protocol for the +ListUptimeCheckConfigs+ request.
|
19
|
+
# @!attribute [rw] parent
|
20
|
+
# @return [String]
|
21
|
+
# The project whose uptime check configurations are listed. The format
|
22
|
+
# is +projects/[PROJECT_ID]+.
|
23
|
+
# @!attribute [rw] page_size
|
24
|
+
# @return [Integer]
|
25
|
+
# The maximum number of results to return in a single response. The server
|
26
|
+
# may further constrain the maximum number of results returned in a single
|
27
|
+
# page. If the page_size is <=0, the server will decide the number of results
|
28
|
+
# to be returned.
|
29
|
+
# @!attribute [rw] page_token
|
30
|
+
# @return [String]
|
31
|
+
# If this field is not empty then it must contain the +nextPageToken+ value
|
32
|
+
# returned by a previous call to this method. Using this field causes the
|
33
|
+
# method to return more results from the previous method call.
|
34
|
+
class ListUptimeCheckConfigsRequest; end
|
35
|
+
|
36
|
+
# The protocol for the +ListUptimeCheckConfigs+ response.
|
37
|
+
# @!attribute [rw] uptime_check_configs
|
38
|
+
# @return [Array<Google::Monitoring::V3::UptimeCheckConfig>]
|
39
|
+
# The returned uptime check configurations.
|
40
|
+
# @!attribute [rw] next_page_token
|
41
|
+
# @return [String]
|
42
|
+
# This field represents the pagination token to retrieve the next page of
|
43
|
+
# results. If the value is empty, it means no further results for the
|
44
|
+
# request. To retrieve the next page of results, the value of the
|
45
|
+
# next_page_token is passed to the subsequent List method call (in the
|
46
|
+
# request message's page_token field).
|
47
|
+
# @!attribute [rw] total_size
|
48
|
+
# @return [Integer]
|
49
|
+
# The total number of uptime check configurations for the project,
|
50
|
+
# irrespective of any pagination.
|
51
|
+
class ListUptimeCheckConfigsResponse; end
|
52
|
+
|
53
|
+
# The protocol for the +GetUptimeCheckConfig+ request.
|
54
|
+
# @!attribute [rw] name
|
55
|
+
# @return [String]
|
56
|
+
# The uptime check configuration to retrieve. The format
|
57
|
+
# is +projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]+.
|
58
|
+
class GetUptimeCheckConfigRequest; end
|
59
|
+
|
60
|
+
# The protocol for the +CreateUptimeCheckConfig+ request.
|
61
|
+
# @!attribute [rw] parent
|
62
|
+
# @return [String]
|
63
|
+
# The project in which to create the uptime check. The format
|
64
|
+
# is +projects/[PROJECT_ID]+.
|
65
|
+
# @!attribute [rw] uptime_check_config
|
66
|
+
# @return [Google::Monitoring::V3::UptimeCheckConfig]
|
67
|
+
# The new uptime check configuration.
|
68
|
+
class CreateUptimeCheckConfigRequest; end
|
69
|
+
|
70
|
+
# The protocol for the +UpdateUptimeCheckConfig+ request.
|
71
|
+
# @!attribute [rw] update_mask
|
72
|
+
# @return [Google::Protobuf::FieldMask]
|
73
|
+
# Optional. If present, only the listed fields in the current uptime check
|
74
|
+
# configuration are updated with values from the new configuration. If this
|
75
|
+
# field is empty, then the current configuration is completely replaced with
|
76
|
+
# the new configuration.
|
77
|
+
# @!attribute [rw] uptime_check_config
|
78
|
+
# @return [Google::Monitoring::V3::UptimeCheckConfig]
|
79
|
+
# Required. If an +"updateMask"+ has been specified, this field gives
|
80
|
+
# the values for the set of fields mentioned in the +"updateMask"+. If an
|
81
|
+
# +"updateMask"+ has not been given, this uptime check configuration replaces
|
82
|
+
# the current configuration. If a field is mentioned in +"updateMask"+ but
|
83
|
+
# the corresonding field is omitted in this partial uptime check
|
84
|
+
# configuration, it has the effect of deleting/clearing the field from the
|
85
|
+
# configuration on the server.
|
86
|
+
#
|
87
|
+
# The following fields can be updated: +display_name+,
|
88
|
+
# +http_check+, +tcp_check+, +timeout+, +content_matchers+, and
|
89
|
+
# +selected_regions+.
|
90
|
+
class UpdateUptimeCheckConfigRequest; end
|
91
|
+
|
92
|
+
# The protocol for the +DeleteUptimeCheckConfig+ request.
|
93
|
+
# @!attribute [rw] name
|
94
|
+
# @return [String]
|
95
|
+
# The uptime check configuration to delete. The format
|
96
|
+
# is +projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]+.
|
97
|
+
class DeleteUptimeCheckConfigRequest; end
|
98
|
+
|
99
|
+
# The protocol for the +ListUptimeCheckIps+ request.
|
100
|
+
# @!attribute [rw] page_size
|
101
|
+
# @return [Integer]
|
102
|
+
# The maximum number of results to return in a single response. The server
|
103
|
+
# may further constrain the maximum number of results returned in a single
|
104
|
+
# page. If the page_size is <=0, the server will decide the number of results
|
105
|
+
# to be returned.
|
106
|
+
# NOTE: this field is not yet implemented
|
107
|
+
# @!attribute [rw] page_token
|
108
|
+
# @return [String]
|
109
|
+
# If this field is not empty then it must contain the +nextPageToken+ value
|
110
|
+
# returned by a previous call to this method. Using this field causes the
|
111
|
+
# method to return more results from the previous method call.
|
112
|
+
# NOTE: this field is not yet implemented
|
113
|
+
class ListUptimeCheckIpsRequest; end
|
114
|
+
|
115
|
+
# The protocol for the +ListUptimeCheckIps+ response.
|
116
|
+
# @!attribute [rw] uptime_check_ips
|
117
|
+
# @return [Array<Google::Monitoring::V3::UptimeCheckIp>]
|
118
|
+
# The returned list of IP addresses (including region and location) that the
|
119
|
+
# checkers run from.
|
120
|
+
# @!attribute [rw] next_page_token
|
121
|
+
# @return [String]
|
122
|
+
# This field represents the pagination token to retrieve the next page of
|
123
|
+
# results. If the value is empty, it means no further results for the
|
124
|
+
# request. To retrieve the next page of results, the value of the
|
125
|
+
# next_page_token is passed to the subsequent List method call (in the
|
126
|
+
# request message's page_token field).
|
127
|
+
# NOTE: this field is not yet implemented
|
128
|
+
class ListUptimeCheckIpsResponse; end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,124 @@
|
|
1
|
+
# Copyright 2018 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
|
+
# https://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
|
+
module Google
|
16
|
+
module Protobuf
|
17
|
+
# +Any+ contains an arbitrary serialized protocol buffer message along with a
|
18
|
+
# URL that describes the type of the serialized message.
|
19
|
+
#
|
20
|
+
# Protobuf library provides support to pack/unpack Any values in the form
|
21
|
+
# of utility functions or additional generated methods of the Any type.
|
22
|
+
#
|
23
|
+
# Example 1: Pack and unpack a message in C++.
|
24
|
+
#
|
25
|
+
# Foo foo = ...;
|
26
|
+
# Any any;
|
27
|
+
# any.PackFrom(foo);
|
28
|
+
# ...
|
29
|
+
# if (any.UnpackTo(&foo)) {
|
30
|
+
# ...
|
31
|
+
# }
|
32
|
+
#
|
33
|
+
# Example 2: Pack and unpack a message in Java.
|
34
|
+
#
|
35
|
+
# Foo foo = ...;
|
36
|
+
# Any any = Any.pack(foo);
|
37
|
+
# ...
|
38
|
+
# if (any.is(Foo.class)) {
|
39
|
+
# foo = any.unpack(Foo.class);
|
40
|
+
# }
|
41
|
+
#
|
42
|
+
# Example 3: Pack and unpack a message in Python.
|
43
|
+
#
|
44
|
+
# foo = Foo(...)
|
45
|
+
# any = Any()
|
46
|
+
# any.Pack(foo)
|
47
|
+
# ...
|
48
|
+
# if any.Is(Foo.DESCRIPTOR):
|
49
|
+
# any.Unpack(foo)
|
50
|
+
# ...
|
51
|
+
#
|
52
|
+
# Example 4: Pack and unpack a message in Go
|
53
|
+
#
|
54
|
+
# foo := &pb.Foo{...}
|
55
|
+
# any, err := ptypes.MarshalAny(foo)
|
56
|
+
# ...
|
57
|
+
# foo := &pb.Foo{}
|
58
|
+
# if err := ptypes.UnmarshalAny(any, foo); err != nil {
|
59
|
+
# ...
|
60
|
+
# }
|
61
|
+
#
|
62
|
+
# The pack methods provided by protobuf library will by default use
|
63
|
+
# 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
64
|
+
# methods only use the fully qualified type name after the last '/'
|
65
|
+
# in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
66
|
+
# name "y.z".
|
67
|
+
#
|
68
|
+
#
|
69
|
+
# = JSON
|
70
|
+
#
|
71
|
+
# The JSON representation of an +Any+ value uses the regular
|
72
|
+
# representation of the deserialized, embedded message, with an
|
73
|
+
# additional field +@type+ which contains the type URL. Example:
|
74
|
+
#
|
75
|
+
# package google.profile;
|
76
|
+
# message Person {
|
77
|
+
# string first_name = 1;
|
78
|
+
# string last_name = 2;
|
79
|
+
# }
|
80
|
+
#
|
81
|
+
# {
|
82
|
+
# "@type": "type.googleapis.com/google.profile.Person",
|
83
|
+
# "firstName": <string>,
|
84
|
+
# "lastName": <string>
|
85
|
+
# }
|
86
|
+
#
|
87
|
+
# If the embedded message type is well-known and has a custom JSON
|
88
|
+
# representation, that representation will be embedded adding a field
|
89
|
+
# +value+ which holds the custom JSON in addition to the +@type+
|
90
|
+
# field. Example (for message {Google::Protobuf::Duration}):
|
91
|
+
#
|
92
|
+
# {
|
93
|
+
# "@type": "type.googleapis.com/google.protobuf.Duration",
|
94
|
+
# "value": "1.212s"
|
95
|
+
# }
|
96
|
+
# @!attribute [rw] type_url
|
97
|
+
# @return [String]
|
98
|
+
# A URL/resource name whose content describes the type of the
|
99
|
+
# serialized protocol buffer message.
|
100
|
+
#
|
101
|
+
# For URLs which use the scheme +http+, +https+, or no scheme, the
|
102
|
+
# following restrictions and interpretations apply:
|
103
|
+
#
|
104
|
+
# * If no scheme is provided, +https+ is assumed.
|
105
|
+
# * The last segment of the URL's path must represent the fully
|
106
|
+
# qualified name of the type (as in +path/google.protobuf.Duration+).
|
107
|
+
# The name should be in a canonical form (e.g., leading "." is
|
108
|
+
# not accepted).
|
109
|
+
# * An HTTP GET on the URL must yield a {Google::Protobuf::Type}
|
110
|
+
# value in binary format, or produce an error.
|
111
|
+
# * Applications are allowed to cache lookup results based on the
|
112
|
+
# URL, or have them precompiled into a binary to avoid any
|
113
|
+
# lookup. Therefore, binary compatibility needs to be preserved
|
114
|
+
# on changes to types. (Use versioned type names to manage
|
115
|
+
# breaking changes.)
|
116
|
+
#
|
117
|
+
# Schemes other than +http+, +https+ (or the empty scheme) might be
|
118
|
+
# used with implementation specific semantics.
|
119
|
+
# @!attribute [rw] value
|
120
|
+
# @return [String]
|
121
|
+
# Must be a valid serialized protocol buffer of the above specified type.
|
122
|
+
class Any; end
|
123
|
+
end
|
124
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Copyright 2018 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
|
+
# https://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
|
+
module Google
|
16
|
+
module Protobuf
|
17
|
+
# A generic empty message that you can re-use to avoid defining duplicated
|
18
|
+
# empty messages in your APIs. A typical example is to use it as the request
|
19
|
+
# or the response type of an API method. For instance:
|
20
|
+
#
|
21
|
+
# service Foo {
|
22
|
+
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
23
|
+
# }
|
24
|
+
#
|
25
|
+
# The JSON representation for +Empty+ is empty JSON object +{}+.
|
26
|
+
class Empty; end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# Copyright 2018 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
|
+
# https://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
|
+
module Google
|
16
|
+
module Protobuf
|
17
|
+
# +Struct+ represents a structured data value, consisting of fields
|
18
|
+
# which map to dynamically typed values. In some languages, +Struct+
|
19
|
+
# might be supported by a native representation. For example, in
|
20
|
+
# scripting languages like JS a struct is represented as an
|
21
|
+
# object. The details of that representation are described together
|
22
|
+
# with the proto support for the language.
|
23
|
+
#
|
24
|
+
# The JSON representation for +Struct+ is JSON object.
|
25
|
+
# @!attribute [rw] fields
|
26
|
+
# @return [Hash{String => Google::Protobuf::Value}]
|
27
|
+
# Unordered map of dynamically typed values.
|
28
|
+
class Struct; end
|
29
|
+
|
30
|
+
# +Value+ represents a dynamically typed value which can be either
|
31
|
+
# null, a number, a string, a boolean, a recursive struct value, or a
|
32
|
+
# list of values. A producer of value is expected to set one of that
|
33
|
+
# variants, absence of any variant indicates an error.
|
34
|
+
#
|
35
|
+
# The JSON representation for +Value+ is JSON value.
|
36
|
+
# @!attribute [rw] null_value
|
37
|
+
# @return [Google::Protobuf::NullValue]
|
38
|
+
# Represents a null value.
|
39
|
+
# @!attribute [rw] number_value
|
40
|
+
# @return [Float]
|
41
|
+
# Represents a double value.
|
42
|
+
# @!attribute [rw] string_value
|
43
|
+
# @return [String]
|
44
|
+
# Represents a string value.
|
45
|
+
# @!attribute [rw] bool_value
|
46
|
+
# @return [true, false]
|
47
|
+
# Represents a boolean value.
|
48
|
+
# @!attribute [rw] struct_value
|
49
|
+
# @return [Google::Protobuf::Struct]
|
50
|
+
# Represents a structured value.
|
51
|
+
# @!attribute [rw] list_value
|
52
|
+
# @return [Google::Protobuf::ListValue]
|
53
|
+
# Represents a repeated +Value+.
|
54
|
+
class Value; end
|
55
|
+
|
56
|
+
# +ListValue+ is a wrapper around a repeated field of values.
|
57
|
+
#
|
58
|
+
# The JSON representation for +ListValue+ is JSON array.
|
59
|
+
# @!attribute [rw] values
|
60
|
+
# @return [Array<Google::Protobuf::Value>]
|
61
|
+
# Repeated field of dynamically typed values.
|
62
|
+
class ListValue; end
|
63
|
+
|
64
|
+
# +NullValue+ is a singleton enumeration to represent the null value for the
|
65
|
+
# +Value+ type union.
|
66
|
+
#
|
67
|
+
# The JSON representation for +NullValue+ is JSON +null+.
|
68
|
+
module NullValue
|
69
|
+
# Null value.
|
70
|
+
NULL_VALUE = 0
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|