google-cloud-gaming-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-gaming-v1.rb +21 -0
- data/lib/google/cloud/gaming/v1.rb +38 -0
- data/lib/google/cloud/gaming/v1/common_pb.rb +117 -0
- data/lib/google/cloud/gaming/v1/game_server_clusters_pb.rb +111 -0
- data/lib/google/cloud/gaming/v1/game_server_clusters_service.rb +51 -0
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/client.rb +994 -0
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/credentials.rb +51 -0
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/operations.rb +570 -0
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/paths.rb +73 -0
- data/lib/google/cloud/gaming/v1/game_server_clusters_service_pb.rb +22 -0
- data/lib/google/cloud/gaming/v1/game_server_clusters_service_services_pb.rb +61 -0
- data/lib/google/cloud/gaming/v1/game_server_configs_pb.rb +73 -0
- data/lib/google/cloud/gaming/v1/game_server_configs_service.rb +50 -0
- data/lib/google/cloud/gaming/v1/game_server_configs_service/client.rb +652 -0
- data/lib/google/cloud/gaming/v1/game_server_configs_service/credentials.rb +51 -0
- data/lib/google/cloud/gaming/v1/game_server_configs_service/operations.rb +570 -0
- data/lib/google/cloud/gaming/v1/game_server_configs_service/paths.rb +73 -0
- data/lib/google/cloud/gaming/v1/game_server_configs_service_pb.rb +22 -0
- data/lib/google/cloud/gaming/v1/game_server_configs_service_services_pb.rb +55 -0
- data/lib/google/cloud/gaming/v1/game_server_deployments_pb.rb +119 -0
- data/lib/google/cloud/gaming/v1/game_server_deployments_service.rb +51 -0
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/client.rb +1082 -0
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/credentials.rb +51 -0
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/operations.rb +570 -0
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/paths.rb +88 -0
- data/lib/google/cloud/gaming/v1/game_server_deployments_service_pb.rb +22 -0
- data/lib/google/cloud/gaming/v1/game_server_deployments_service_services_pb.rb +70 -0
- data/lib/google/cloud/gaming/v1/realms_pb.rb +78 -0
- data/lib/google/cloud/gaming/v1/realms_service.rb +51 -0
- data/lib/google/cloud/gaming/v1/realms_service/client.rb +821 -0
- data/lib/google/cloud/gaming/v1/realms_service/credentials.rb +51 -0
- data/lib/google/cloud/gaming/v1/realms_service/operations.rb +570 -0
- data/lib/google/cloud/gaming/v1/realms_service/paths.rb +69 -0
- data/lib/google/cloud/gaming/v1/realms_service_pb.rb +22 -0
- data/lib/google/cloud/gaming/v1/realms_service_services_pb.rb +56 -0
- data/lib/google/cloud/gaming/v1/version.rb +28 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/cloud/gaming/v1/common.rb +303 -0
- data/proto_docs/google/cloud/gaming/v1/game_server_clusters.rb +288 -0
- data/proto_docs/google/cloud/gaming/v1/game_server_configs.rb +186 -0
- data/proto_docs/google/cloud/gaming/v1/game_server_deployments.rb +317 -0
- data/proto_docs/google/cloud/gaming/v1/realms.rb +197 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +239 -0
@@ -0,0 +1,197 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Gaming
|
23
|
+
module V1
|
24
|
+
# Request message for RealmsService.ListRealms.
|
25
|
+
# @!attribute [rw] parent
|
26
|
+
# @return [::String]
|
27
|
+
# Required. The parent resource name. Uses the form:
|
28
|
+
# `projects/{project}/locations/{location}`.
|
29
|
+
# @!attribute [rw] page_size
|
30
|
+
# @return [::Integer]
|
31
|
+
# Optional. The maximum number of items to return. If unspecified, server
|
32
|
+
# will pick an appropriate default. Server may return fewer items than
|
33
|
+
# requested. A caller should only rely on response's
|
34
|
+
# {::Google::Cloud::Gaming::V1::ListRealmsResponse#next_page_token next_page_token} to
|
35
|
+
# determine if there are more realms left to be queried.
|
36
|
+
# @!attribute [rw] page_token
|
37
|
+
# @return [::String]
|
38
|
+
# Optional. The next_page_token value returned from a previous List request,
|
39
|
+
# if any.
|
40
|
+
# @!attribute [rw] filter
|
41
|
+
# @return [::String]
|
42
|
+
# Optional. The filter to apply to list results.
|
43
|
+
# @!attribute [rw] order_by
|
44
|
+
# @return [::String]
|
45
|
+
# Optional. Specifies the ordering of results following syntax at
|
46
|
+
# https://cloud.google.com/apis/design/design_patterns#sorting_order.
|
47
|
+
class ListRealmsRequest
|
48
|
+
include ::Google::Protobuf::MessageExts
|
49
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
50
|
+
end
|
51
|
+
|
52
|
+
# Response message for RealmsService.ListRealms.
|
53
|
+
# @!attribute [rw] realms
|
54
|
+
# @return [::Array<::Google::Cloud::Gaming::V1::Realm>]
|
55
|
+
# The list of realms.
|
56
|
+
# @!attribute [rw] next_page_token
|
57
|
+
# @return [::String]
|
58
|
+
# Token to retrieve the next page of results, or empty if there are no more
|
59
|
+
# results in the list.
|
60
|
+
# @!attribute [rw] unreachable
|
61
|
+
# @return [::Array<::String>]
|
62
|
+
# List of locations that could not be reached.
|
63
|
+
class ListRealmsResponse
|
64
|
+
include ::Google::Protobuf::MessageExts
|
65
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
66
|
+
end
|
67
|
+
|
68
|
+
# Request message for RealmsService.GetRealm.
|
69
|
+
# @!attribute [rw] name
|
70
|
+
# @return [::String]
|
71
|
+
# Required. The name of the realm to retrieve. Uses the form:
|
72
|
+
# `projects/{project}/locations/{location}/realms/{realm}`.
|
73
|
+
class GetRealmRequest
|
74
|
+
include ::Google::Protobuf::MessageExts
|
75
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
76
|
+
end
|
77
|
+
|
78
|
+
# Request message for RealmsService.CreateRealm.
|
79
|
+
# @!attribute [rw] parent
|
80
|
+
# @return [::String]
|
81
|
+
# Required. The parent resource name. Uses the form:
|
82
|
+
# `projects/{project}/locations/{location}`.
|
83
|
+
# @!attribute [rw] realm_id
|
84
|
+
# @return [::String]
|
85
|
+
# Required. The ID of the realm resource to be created.
|
86
|
+
# @!attribute [rw] realm
|
87
|
+
# @return [::Google::Cloud::Gaming::V1::Realm]
|
88
|
+
# Required. The realm resource to be created.
|
89
|
+
class CreateRealmRequest
|
90
|
+
include ::Google::Protobuf::MessageExts
|
91
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
92
|
+
end
|
93
|
+
|
94
|
+
# Request message for RealmsService.DeleteRealm.
|
95
|
+
# @!attribute [rw] name
|
96
|
+
# @return [::String]
|
97
|
+
# Required. The name of the realm to delete. Uses the form:
|
98
|
+
# `projects/{project}/locations/{location}/realms/{realm}`.
|
99
|
+
class DeleteRealmRequest
|
100
|
+
include ::Google::Protobuf::MessageExts
|
101
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
102
|
+
end
|
103
|
+
|
104
|
+
# Request message for RealmsService.UpdateRealm.
|
105
|
+
# @!attribute [rw] realm
|
106
|
+
# @return [::Google::Cloud::Gaming::V1::Realm]
|
107
|
+
# Required. The realm to be updated.
|
108
|
+
# Only fields specified in update_mask are updated.
|
109
|
+
# @!attribute [rw] update_mask
|
110
|
+
# @return [::Google::Protobuf::FieldMask]
|
111
|
+
# Required. The update mask applies to the resource. For the `FieldMask`
|
112
|
+
# definition, see
|
113
|
+
#
|
114
|
+
# https:
|
115
|
+
# //developers.google.com/protocol-buffers
|
116
|
+
# // /docs/reference/google.protobuf#fieldmask
|
117
|
+
class UpdateRealmRequest
|
118
|
+
include ::Google::Protobuf::MessageExts
|
119
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
120
|
+
end
|
121
|
+
|
122
|
+
# Request message for RealmsService.PreviewRealmUpdate.
|
123
|
+
# @!attribute [rw] realm
|
124
|
+
# @return [::Google::Cloud::Gaming::V1::Realm]
|
125
|
+
# Required. The realm to be updated.
|
126
|
+
# Only fields specified in update_mask are updated.
|
127
|
+
# @!attribute [rw] update_mask
|
128
|
+
# @return [::Google::Protobuf::FieldMask]
|
129
|
+
# Required. The update mask applies to the resource. For the `FieldMask`
|
130
|
+
# definition, see
|
131
|
+
#
|
132
|
+
# https:
|
133
|
+
# //developers.google.com/protocol-buffers
|
134
|
+
# // /docs/reference/google.protobuf#fieldmask
|
135
|
+
# @!attribute [rw] preview_time
|
136
|
+
# @return [::Google::Protobuf::Timestamp]
|
137
|
+
# Optional. The target timestamp to compute the preview.
|
138
|
+
class PreviewRealmUpdateRequest
|
139
|
+
include ::Google::Protobuf::MessageExts
|
140
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
141
|
+
end
|
142
|
+
|
143
|
+
# Response message for RealmsService.PreviewRealmUpdate.
|
144
|
+
# @!attribute [rw] etag
|
145
|
+
# @return [::String]
|
146
|
+
# ETag of the realm.
|
147
|
+
# @!attribute [rw] target_state
|
148
|
+
# @return [::Google::Cloud::Gaming::V1::TargetState]
|
149
|
+
# The target state.
|
150
|
+
class PreviewRealmUpdateResponse
|
151
|
+
include ::Google::Protobuf::MessageExts
|
152
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
153
|
+
end
|
154
|
+
|
155
|
+
# A realm resource.
|
156
|
+
# @!attribute [rw] name
|
157
|
+
# @return [::String]
|
158
|
+
# The resource name of the realm. Uses the form:
|
159
|
+
# `projects/{project}/locations/{location}/realms/{realm}`. For
|
160
|
+
# example, `projects/my-project/locations/{location}/realms/my-realm`.
|
161
|
+
# @!attribute [r] create_time
|
162
|
+
# @return [::Google::Protobuf::Timestamp]
|
163
|
+
# Output only. The creation time.
|
164
|
+
# @!attribute [r] update_time
|
165
|
+
# @return [::Google::Protobuf::Timestamp]
|
166
|
+
# Output only. The last-modified time.
|
167
|
+
# @!attribute [rw] labels
|
168
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
169
|
+
# The labels associated with this realm. Each label is a key-value pair.
|
170
|
+
# @!attribute [rw] time_zone
|
171
|
+
# @return [::String]
|
172
|
+
# Required. Time zone where all policies targeting this realm are evaluated. The value
|
173
|
+
# of this field must be from the IANA time zone database:
|
174
|
+
# https://www.iana.org/time-zones.
|
175
|
+
# @!attribute [rw] etag
|
176
|
+
# @return [::String]
|
177
|
+
# ETag of the resource.
|
178
|
+
# @!attribute [rw] description
|
179
|
+
# @return [::String]
|
180
|
+
# Human readable description of the realm.
|
181
|
+
class Realm
|
182
|
+
include ::Google::Protobuf::MessageExts
|
183
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
184
|
+
|
185
|
+
# @!attribute [rw] key
|
186
|
+
# @return [::String]
|
187
|
+
# @!attribute [rw] value
|
188
|
+
# @return [::String]
|
189
|
+
class LabelsEntry
|
190
|
+
include ::Google::Protobuf::MessageExts
|
191
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
@@ -0,0 +1,150 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Longrunning
|
22
|
+
# This resource represents a long-running operation that is the result of a
|
23
|
+
# network API call.
|
24
|
+
# @!attribute [rw] name
|
25
|
+
# @return [::String]
|
26
|
+
# The server-assigned name, which is only unique within the same service that
|
27
|
+
# originally returns it. If you use the default HTTP mapping, the
|
28
|
+
# `name` should have the format of `operations/some/unique/name`.
|
29
|
+
# @!attribute [rw] metadata
|
30
|
+
# @return [::Google::Protobuf::Any]
|
31
|
+
# Service-specific metadata associated with the operation. It typically
|
32
|
+
# contains progress information and common metadata such as create time.
|
33
|
+
# Some services might not provide such metadata. Any method that returns a
|
34
|
+
# long-running operation should document the metadata type, if any.
|
35
|
+
# @!attribute [rw] done
|
36
|
+
# @return [::Boolean]
|
37
|
+
# If the value is `false`, it means the operation is still in progress.
|
38
|
+
# If true, the operation is completed, and either `error` or `response` is
|
39
|
+
# available.
|
40
|
+
# @!attribute [rw] error
|
41
|
+
# @return [::Google::Rpc::Status]
|
42
|
+
# The error result of the operation in case of failure or cancellation.
|
43
|
+
# @!attribute [rw] response
|
44
|
+
# @return [::Google::Protobuf::Any]
|
45
|
+
# The normal response of the operation in case of success. If the original
|
46
|
+
# method returns no data on success, such as `Delete`, the response is
|
47
|
+
# `google.protobuf.Empty`. If the original method is standard
|
48
|
+
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
49
|
+
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
50
|
+
# is the original method name. For example, if the original method name
|
51
|
+
# is `TakeSnapshot()`, the inferred response type is
|
52
|
+
# `TakeSnapshotResponse`.
|
53
|
+
class Operation
|
54
|
+
include ::Google::Protobuf::MessageExts
|
55
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
56
|
+
end
|
57
|
+
|
58
|
+
# The request message for Operations.GetOperation.
|
59
|
+
# @!attribute [rw] name
|
60
|
+
# @return [::String]
|
61
|
+
# The name of the operation resource.
|
62
|
+
class GetOperationRequest
|
63
|
+
include ::Google::Protobuf::MessageExts
|
64
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
65
|
+
end
|
66
|
+
|
67
|
+
# The request message for Operations.ListOperations.
|
68
|
+
# @!attribute [rw] name
|
69
|
+
# @return [::String]
|
70
|
+
# The name of the operation collection.
|
71
|
+
# @!attribute [rw] filter
|
72
|
+
# @return [::String]
|
73
|
+
# The standard list filter.
|
74
|
+
# @!attribute [rw] page_size
|
75
|
+
# @return [::Integer]
|
76
|
+
# The standard list page size.
|
77
|
+
# @!attribute [rw] page_token
|
78
|
+
# @return [::String]
|
79
|
+
# The standard list page token.
|
80
|
+
class ListOperationsRequest
|
81
|
+
include ::Google::Protobuf::MessageExts
|
82
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
83
|
+
end
|
84
|
+
|
85
|
+
# The response message for Operations.ListOperations.
|
86
|
+
# @!attribute [rw] operations
|
87
|
+
# @return [::Array<::Google::Longrunning::Operation>]
|
88
|
+
# A list of operations that matches the specified filter in the request.
|
89
|
+
# @!attribute [rw] next_page_token
|
90
|
+
# @return [::String]
|
91
|
+
# The standard List next-page token.
|
92
|
+
class ListOperationsResponse
|
93
|
+
include ::Google::Protobuf::MessageExts
|
94
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
95
|
+
end
|
96
|
+
|
97
|
+
# The request message for Operations.CancelOperation.
|
98
|
+
# @!attribute [rw] name
|
99
|
+
# @return [::String]
|
100
|
+
# The name of the operation resource to be cancelled.
|
101
|
+
class CancelOperationRequest
|
102
|
+
include ::Google::Protobuf::MessageExts
|
103
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
104
|
+
end
|
105
|
+
|
106
|
+
# The request message for Operations.DeleteOperation.
|
107
|
+
# @!attribute [rw] name
|
108
|
+
# @return [::String]
|
109
|
+
# The name of the operation resource to be deleted.
|
110
|
+
class DeleteOperationRequest
|
111
|
+
include ::Google::Protobuf::MessageExts
|
112
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
113
|
+
end
|
114
|
+
|
115
|
+
# A message representing the message types used by a long-running operation.
|
116
|
+
#
|
117
|
+
# Example:
|
118
|
+
#
|
119
|
+
# rpc LongRunningRecognize(LongRunningRecognizeRequest)
|
120
|
+
# returns (google.longrunning.Operation) {
|
121
|
+
# option (google.longrunning.operation_info) = {
|
122
|
+
# response_type: "LongRunningRecognizeResponse"
|
123
|
+
# metadata_type: "LongRunningRecognizeMetadata"
|
124
|
+
# };
|
125
|
+
# }
|
126
|
+
# @!attribute [rw] response_type
|
127
|
+
# @return [::String]
|
128
|
+
# Required. The message name of the primary return type for this
|
129
|
+
# long-running operation.
|
130
|
+
# This type will be used to deserialize the LRO's response.
|
131
|
+
#
|
132
|
+
# If the response is in a different package from the rpc, a fully-qualified
|
133
|
+
# message name must be used (e.g. `google.protobuf.Struct`).
|
134
|
+
#
|
135
|
+
# Note: Altering this value constitutes a breaking change.
|
136
|
+
# @!attribute [rw] metadata_type
|
137
|
+
# @return [::String]
|
138
|
+
# Required. The message name of the metadata type for this long-running
|
139
|
+
# operation.
|
140
|
+
#
|
141
|
+
# If the response is in a different package from the rpc, a fully-qualified
|
142
|
+
# message name must be used (e.g. `google.protobuf.Struct`).
|
143
|
+
#
|
144
|
+
# Note: Altering this value constitutes a breaking change.
|
145
|
+
class OperationInfo
|
146
|
+
include ::Google::Protobuf::MessageExts
|
147
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
@@ -0,0 +1,138 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# `Any` contains an arbitrary serialized protocol buffer message along with a
|
23
|
+
# URL that describes the type of the serialized message.
|
24
|
+
#
|
25
|
+
# Protobuf library provides support to pack/unpack Any values in the form
|
26
|
+
# of utility functions or additional generated methods of the Any type.
|
27
|
+
#
|
28
|
+
# Example 1: Pack and unpack a message in C++.
|
29
|
+
#
|
30
|
+
# Foo foo = ...;
|
31
|
+
# Any any;
|
32
|
+
# any.PackFrom(foo);
|
33
|
+
# ...
|
34
|
+
# if (any.UnpackTo(&foo)) {
|
35
|
+
# ...
|
36
|
+
# }
|
37
|
+
#
|
38
|
+
# Example 2: Pack and unpack a message in Java.
|
39
|
+
#
|
40
|
+
# Foo foo = ...;
|
41
|
+
# Any any = Any.pack(foo);
|
42
|
+
# ...
|
43
|
+
# if (any.is(Foo.class)) {
|
44
|
+
# foo = any.unpack(Foo.class);
|
45
|
+
# }
|
46
|
+
#
|
47
|
+
# Example 3: Pack and unpack a message in Python.
|
48
|
+
#
|
49
|
+
# foo = Foo(...)
|
50
|
+
# any = Any()
|
51
|
+
# any.Pack(foo)
|
52
|
+
# ...
|
53
|
+
# if any.Is(Foo.DESCRIPTOR):
|
54
|
+
# any.Unpack(foo)
|
55
|
+
# ...
|
56
|
+
#
|
57
|
+
# Example 4: Pack and unpack a message in Go
|
58
|
+
#
|
59
|
+
# foo := &pb.Foo{...}
|
60
|
+
# any, err := ptypes.MarshalAny(foo)
|
61
|
+
# ...
|
62
|
+
# foo := &pb.Foo{}
|
63
|
+
# if err := ptypes.UnmarshalAny(any, foo); err != nil {
|
64
|
+
# ...
|
65
|
+
# }
|
66
|
+
#
|
67
|
+
# The pack methods provided by protobuf library will by default use
|
68
|
+
# 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
69
|
+
# methods only use the fully qualified type name after the last '/'
|
70
|
+
# in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
71
|
+
# name "y.z".
|
72
|
+
#
|
73
|
+
#
|
74
|
+
# JSON
|
75
|
+
# ====
|
76
|
+
# The JSON representation of an `Any` value uses the regular
|
77
|
+
# representation of the deserialized, embedded message, with an
|
78
|
+
# additional field `@type` which contains the type URL. Example:
|
79
|
+
#
|
80
|
+
# package google.profile;
|
81
|
+
# message Person {
|
82
|
+
# string first_name = 1;
|
83
|
+
# string last_name = 2;
|
84
|
+
# }
|
85
|
+
#
|
86
|
+
# {
|
87
|
+
# "@type": "type.googleapis.com/google.profile.Person",
|
88
|
+
# "firstName": <string>,
|
89
|
+
# "lastName": <string>
|
90
|
+
# }
|
91
|
+
#
|
92
|
+
# If the embedded message type is well-known and has a custom JSON
|
93
|
+
# representation, that representation will be embedded adding a field
|
94
|
+
# `value` which holds the custom JSON in addition to the `@type`
|
95
|
+
# field. Example (for message [google.protobuf.Duration][]):
|
96
|
+
#
|
97
|
+
# {
|
98
|
+
# "@type": "type.googleapis.com/google.protobuf.Duration",
|
99
|
+
# "value": "1.212s"
|
100
|
+
# }
|
101
|
+
# @!attribute [rw] type_url
|
102
|
+
# @return [::String]
|
103
|
+
# A URL/resource name that uniquely identifies the type of the serialized
|
104
|
+
# protocol buffer message. This string must contain at least
|
105
|
+
# one "/" character. The last segment of the URL's path must represent
|
106
|
+
# the fully qualified name of the type (as in
|
107
|
+
# `path/google.protobuf.Duration`). The name should be in a canonical form
|
108
|
+
# (e.g., leading "." is not accepted).
|
109
|
+
#
|
110
|
+
# In practice, teams usually precompile into the binary all types that they
|
111
|
+
# expect it to use in the context of Any. However, for URLs which use the
|
112
|
+
# scheme `http`, `https`, or no scheme, one can optionally set up a type
|
113
|
+
# server that maps type URLs to message definitions as follows:
|
114
|
+
#
|
115
|
+
# * If no scheme is provided, `https` is assumed.
|
116
|
+
# * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
117
|
+
# value in binary format, or produce an error.
|
118
|
+
# * Applications are allowed to cache lookup results based on the
|
119
|
+
# URL, or have them precompiled into a binary to avoid any
|
120
|
+
# lookup. Therefore, binary compatibility needs to be preserved
|
121
|
+
# on changes to types. (Use versioned type names to manage
|
122
|
+
# breaking changes.)
|
123
|
+
#
|
124
|
+
# Note: this functionality is not currently available in the official
|
125
|
+
# protobuf release, and it is not used for type URLs beginning with
|
126
|
+
# type.googleapis.com.
|
127
|
+
#
|
128
|
+
# Schemes other than `http`, `https` (or the empty scheme) might be
|
129
|
+
# used with implementation specific semantics.
|
130
|
+
# @!attribute [rw] value
|
131
|
+
# @return [::String]
|
132
|
+
# Must be a valid serialized protocol buffer of the above specified type.
|
133
|
+
class Any
|
134
|
+
include ::Google::Protobuf::MessageExts
|
135
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|