google-cloud-talent-v4 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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-talent-v4.rb +21 -0
- data/lib/google/cloud/talent/v4.rb +39 -0
- data/lib/google/cloud/talent/v4/common_pb.rb +280 -0
- data/lib/google/cloud/talent/v4/company_pb.rb +42 -0
- data/lib/google/cloud/talent/v4/company_service.rb +49 -0
- data/lib/google/cloud/talent/v4/company_service/client.rb +732 -0
- data/lib/google/cloud/talent/v4/company_service/credentials.rb +52 -0
- data/lib/google/cloud/talent/v4/company_service/paths.rb +69 -0
- data/lib/google/cloud/talent/v4/company_service_pb.rb +57 -0
- data/lib/google/cloud/talent/v4/company_service_services_pb.rb +54 -0
- data/lib/google/cloud/talent/v4/completion.rb +49 -0
- data/lib/google/cloud/talent/v4/completion/client.rb +408 -0
- data/lib/google/cloud/talent/v4/completion/credentials.rb +52 -0
- data/lib/google/cloud/talent/v4/completion/paths.rb +69 -0
- data/lib/google/cloud/talent/v4/completion_service_pb.rb +57 -0
- data/lib/google/cloud/talent/v4/completion_service_services_pb.rb +46 -0
- data/lib/google/cloud/talent/v4/event_pb.rb +55 -0
- data/lib/google/cloud/talent/v4/event_service.rb +49 -0
- data/lib/google/cloud/talent/v4/event_service/client.rb +383 -0
- data/lib/google/cloud/talent/v4/event_service/credentials.rb +52 -0
- data/lib/google/cloud/talent/v4/event_service/paths.rb +50 -0
- data/lib/google/cloud/talent/v4/event_service_pb.rb +28 -0
- data/lib/google/cloud/talent/v4/event_service_services_pb.rb +51 -0
- data/lib/google/cloud/talent/v4/filters_pb.rb +87 -0
- data/lib/google/cloud/talent/v4/histogram_pb.rb +28 -0
- data/lib/google/cloud/talent/v4/job_pb.rb +72 -0
- data/lib/google/cloud/talent/v4/job_service.rb +50 -0
- data/lib/google/cloud/talent/v4/job_service/client.rb +1632 -0
- data/lib/google/cloud/talent/v4/job_service/credentials.rb +52 -0
- data/lib/google/cloud/talent/v4/job_service/operations.rb +570 -0
- data/lib/google/cloud/talent/v4/job_service/paths.rb +88 -0
- data/lib/google/cloud/talent/v4/job_service_pb.rb +173 -0
- data/lib/google/cloud/talent/v4/job_service_services_pb.rb +86 -0
- data/lib/google/cloud/talent/v4/tenant_pb.rb +26 -0
- data/lib/google/cloud/talent/v4/tenant_service.rb +49 -0
- data/lib/google/cloud/talent/v4/tenant_service/client.rb +720 -0
- data/lib/google/cloud/talent/v4/tenant_service/credentials.rb +52 -0
- data/lib/google/cloud/talent/v4/tenant_service/paths.rb +64 -0
- data/lib/google/cloud/talent/v4/tenant_service_pb.rb +56 -0
- data/lib/google/cloud/talent/v4/tenant_service_services_pb.rb +53 -0
- data/lib/google/cloud/talent/v4/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 +283 -0
- data/proto_docs/google/cloud/talent/v4/common.rb +949 -0
- data/proto_docs/google/cloud/talent/v4/company.rb +117 -0
- data/proto_docs/google/cloud/talent/v4/company_service.rb +133 -0
- data/proto_docs/google/cloud/talent/v4/completion_service.rb +148 -0
- data/proto_docs/google/cloud/talent/v4/event.rb +179 -0
- data/proto_docs/google/cloud/talent/v4/event_service.rb +42 -0
- data/proto_docs/google/cloud/talent/v4/filters.rb +360 -0
- data/proto_docs/google/cloud/talent/v4/histogram.rb +72 -0
- data/proto_docs/google/cloud/talent/v4/job.rb +378 -0
- data/proto_docs/google/cloud/talent/v4/job_service.rb +737 -0
- data/proto_docs/google/cloud/talent/v4/tenant.rb +50 -0
- data/proto_docs/google/cloud/talent/v4/tenant_service.rb +121 -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/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/latlng.rb +38 -0
- data/proto_docs/google/type/money.rb +43 -0
- data/proto_docs/google/type/postal_address.rb +135 -0
- data/proto_docs/google/type/timeofday.rb +44 -0
- metadata +258 -0
@@ -0,0 +1,50 @@
|
|
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 Talent
|
23
|
+
module V4
|
24
|
+
# A Tenant resource represents a tenant in the service. A tenant is a group or
|
25
|
+
# entity that shares common access with specific privileges for resources like
|
26
|
+
# jobs. Customer may create multiple tenants to provide data isolation for
|
27
|
+
# different groups.
|
28
|
+
# @!attribute [rw] name
|
29
|
+
# @return [::String]
|
30
|
+
# Required during tenant update.
|
31
|
+
#
|
32
|
+
# The resource name for a tenant. This is generated by the service when a
|
33
|
+
# tenant is created.
|
34
|
+
#
|
35
|
+
# The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example,
|
36
|
+
# "projects/foo/tenants/bar".
|
37
|
+
# @!attribute [rw] external_id
|
38
|
+
# @return [::String]
|
39
|
+
# Required. Client side tenant identifier, used to uniquely identify the
|
40
|
+
# tenant.
|
41
|
+
#
|
42
|
+
# The maximum number of allowed characters is 255.
|
43
|
+
class Tenant
|
44
|
+
include ::Google::Protobuf::MessageExts
|
45
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,121 @@
|
|
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 Talent
|
23
|
+
module V4
|
24
|
+
# The Request of the CreateTenant method.
|
25
|
+
# @!attribute [rw] parent
|
26
|
+
# @return [::String]
|
27
|
+
# Required. Resource name of the project under which the tenant is created.
|
28
|
+
#
|
29
|
+
# The format is "projects/\\{project_id}", for example,
|
30
|
+
# "projects/foo".
|
31
|
+
# @!attribute [rw] tenant
|
32
|
+
# @return [::Google::Cloud::Talent::V4::Tenant]
|
33
|
+
# Required. The tenant to be created.
|
34
|
+
class CreateTenantRequest
|
35
|
+
include ::Google::Protobuf::MessageExts
|
36
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
37
|
+
end
|
38
|
+
|
39
|
+
# Request for getting a tenant by name.
|
40
|
+
# @!attribute [rw] name
|
41
|
+
# @return [::String]
|
42
|
+
# Required. The resource name of the tenant to be retrieved.
|
43
|
+
#
|
44
|
+
# The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example,
|
45
|
+
# "projects/foo/tenants/bar".
|
46
|
+
class GetTenantRequest
|
47
|
+
include ::Google::Protobuf::MessageExts
|
48
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
49
|
+
end
|
50
|
+
|
51
|
+
# Request for updating a specified tenant.
|
52
|
+
# @!attribute [rw] tenant
|
53
|
+
# @return [::Google::Cloud::Talent::V4::Tenant]
|
54
|
+
# Required. The tenant resource to replace the current resource in the
|
55
|
+
# system.
|
56
|
+
# @!attribute [rw] update_mask
|
57
|
+
# @return [::Google::Protobuf::FieldMask]
|
58
|
+
# Strongly recommended for the best service experience.
|
59
|
+
#
|
60
|
+
# If {::Google::Cloud::Talent::V4::UpdateTenantRequest#update_mask update_mask} is
|
61
|
+
# provided, only the specified fields in
|
62
|
+
# {::Google::Cloud::Talent::V4::UpdateTenantRequest#tenant tenant} are updated.
|
63
|
+
# Otherwise all the fields are updated.
|
64
|
+
#
|
65
|
+
# A field mask to specify the tenant fields to be updated. Only
|
66
|
+
# top level fields of {::Google::Cloud::Talent::V4::Tenant Tenant} are supported.
|
67
|
+
class UpdateTenantRequest
|
68
|
+
include ::Google::Protobuf::MessageExts
|
69
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
70
|
+
end
|
71
|
+
|
72
|
+
# Request to delete a tenant.
|
73
|
+
# @!attribute [rw] name
|
74
|
+
# @return [::String]
|
75
|
+
# Required. The resource name of the tenant to be deleted.
|
76
|
+
#
|
77
|
+
# The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example,
|
78
|
+
# "projects/foo/tenants/bar".
|
79
|
+
class DeleteTenantRequest
|
80
|
+
include ::Google::Protobuf::MessageExts
|
81
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
82
|
+
end
|
83
|
+
|
84
|
+
# List tenants for which the client has ACL visibility.
|
85
|
+
# @!attribute [rw] parent
|
86
|
+
# @return [::String]
|
87
|
+
# Required. Resource name of the project under which the tenant is created.
|
88
|
+
#
|
89
|
+
# The format is "projects/\\{project_id}", for example,
|
90
|
+
# "projects/foo".
|
91
|
+
# @!attribute [rw] page_token
|
92
|
+
# @return [::String]
|
93
|
+
# The starting indicator from which to return results.
|
94
|
+
# @!attribute [rw] page_size
|
95
|
+
# @return [::Integer]
|
96
|
+
# The maximum number of tenants to be returned, at most 100.
|
97
|
+
# Default is 100 if a non-positive number is provided.
|
98
|
+
class ListTenantsRequest
|
99
|
+
include ::Google::Protobuf::MessageExts
|
100
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
101
|
+
end
|
102
|
+
|
103
|
+
# The List tenants response object.
|
104
|
+
# @!attribute [rw] tenants
|
105
|
+
# @return [::Array<::Google::Cloud::Talent::V4::Tenant>]
|
106
|
+
# Tenants for the current client.
|
107
|
+
# @!attribute [rw] next_page_token
|
108
|
+
# @return [::String]
|
109
|
+
# A token to retrieve the next page of results.
|
110
|
+
# @!attribute [rw] metadata
|
111
|
+
# @return [::Google::Cloud::Talent::V4::ResponseMetadata]
|
112
|
+
# Additional information for the API invocation, such as the request
|
113
|
+
# tracking id.
|
114
|
+
class ListTenantsResponse
|
115
|
+
include ::Google::Protobuf::MessageExts
|
116
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
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
|