google-cloud-tasks 0.2.3 → 0.2.4
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 +4 -4
- data/README.md +5 -5
- data/lib/google/cloud/tasks.rb +4 -4
- data/lib/google/cloud/tasks/v2beta2.rb +4 -4
- data/lib/google/cloud/tasks/v2beta2/cloud_tasks_client.rb +61 -61
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/cloudtasks.rb +38 -38
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/queue.rb +25 -25
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/target.rb +42 -42
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb +11 -11
- data/lib/google/cloud/tasks/v2beta2/doc/google/iam/v1/iam_policy.rb +13 -13
- data/lib/google/cloud/tasks/v2beta2/doc/google/iam/v1/policy.rb +28 -28
- data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/any.rb +8 -8
- data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/duration.rb +3 -3
- data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/empty.rb +1 -1
- data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/field_mask.rb +7 -7
- data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/timestamp.rb +7 -7
- data/lib/google/cloud/tasks/v2beta2/doc/google/rpc/status.rb +11 -11
- metadata +3 -4
- data/lib/google/cloud/tasks/v2beta2/doc/overview.rb +0 -80
@@ -25,19 +25,19 @@ module Google
|
|
25
25
|
# The task name.
|
26
26
|
#
|
27
27
|
# The task name must have the following format:
|
28
|
-
#
|
28
|
+
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
|
29
29
|
#
|
30
|
-
# *
|
30
|
+
# * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
|
31
31
|
# hyphens (-), colons (:), or periods (.).
|
32
32
|
# For more information, see
|
33
33
|
# [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
|
34
|
-
# *
|
34
|
+
# * `LOCATION_ID` is the canonical ID for the task's location.
|
35
35
|
# The list of available locations can be obtained by calling
|
36
36
|
# {Google::Cloud::Location::Locations::ListLocations ListLocations}.
|
37
37
|
# For more information, see https://cloud.google.com/about/locations/.
|
38
|
-
# *
|
38
|
+
# * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
|
39
39
|
# hyphens (-). The maximum length is 100 characters.
|
40
|
-
# *
|
40
|
+
# * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
|
41
41
|
# hyphens (-), or underscores (_). The maximum length is 500 characters.
|
42
42
|
# @!attribute [rw] app_engine_http_request
|
43
43
|
# @return [Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest]
|
@@ -64,12 +64,12 @@ module Google
|
|
64
64
|
# the current lease expires, that is, the time that the task was
|
65
65
|
# leased plus the {Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration}.
|
66
66
|
#
|
67
|
-
#
|
67
|
+
# `schedule_time` will be truncated to the nearest microsecond.
|
68
68
|
# @!attribute [rw] create_time
|
69
69
|
# @return [Google::Protobuf::Timestamp]
|
70
70
|
# Output only. The time that the task was created.
|
71
71
|
#
|
72
|
-
#
|
72
|
+
# `create_time` will be truncated to the nearest second.
|
73
73
|
# @!attribute [rw] status
|
74
74
|
# @return [Google::Cloud::Tasks::V2beta2::TaskStatus]
|
75
75
|
# Output only. The task status.
|
@@ -103,7 +103,7 @@ module Google
|
|
103
103
|
# All information is returned.
|
104
104
|
#
|
105
105
|
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} requires
|
106
|
-
#
|
106
|
+
# `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
|
107
107
|
# permission on the {Google::Cloud::Tasks::V2beta2::Queue Queue} resource.
|
108
108
|
FULL = 2
|
109
109
|
end
|
@@ -141,17 +141,17 @@ module Google
|
|
141
141
|
# @return [Google::Protobuf::Timestamp]
|
142
142
|
# Output only. The time that this attempt was scheduled.
|
143
143
|
#
|
144
|
-
#
|
144
|
+
# `schedule_time` will be truncated to the nearest microsecond.
|
145
145
|
# @!attribute [rw] dispatch_time
|
146
146
|
# @return [Google::Protobuf::Timestamp]
|
147
147
|
# Output only. The time that this attempt was dispatched.
|
148
148
|
#
|
149
|
-
#
|
149
|
+
# `dispatch_time` will be truncated to the nearest microsecond.
|
150
150
|
# @!attribute [rw] response_time
|
151
151
|
# @return [Google::Protobuf::Timestamp]
|
152
152
|
# Output only. The time that this attempt response was received.
|
153
153
|
#
|
154
|
-
#
|
154
|
+
# `response_time` will be truncated to the nearest microsecond.
|
155
155
|
# @!attribute [rw] response_status
|
156
156
|
# @return [Google::Rpc::Status]
|
157
157
|
# Output only. The response from the target for this attempt.
|
@@ -16,46 +16,46 @@
|
|
16
16
|
module Google
|
17
17
|
module Iam
|
18
18
|
module V1
|
19
|
-
# Request message for
|
19
|
+
# Request message for `SetIamPolicy` method.
|
20
20
|
# @!attribute [rw] resource
|
21
21
|
# @return [String]
|
22
22
|
# REQUIRED: The resource for which the policy is being specified.
|
23
|
-
#
|
24
|
-
# resource is specified as
|
23
|
+
# `resource` is usually specified as a path. For example, a Project
|
24
|
+
# resource is specified as `projects/{project}`.
|
25
25
|
# @!attribute [rw] policy
|
26
26
|
# @return [Google::Iam::V1::Policy]
|
27
|
-
# REQUIRED: The complete policy to be applied to the
|
27
|
+
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
28
28
|
# the policy is limited to a few 10s of KB. An empty policy is a
|
29
29
|
# valid policy but certain Cloud Platform services (such as Projects)
|
30
30
|
# might reject them.
|
31
31
|
class SetIamPolicyRequest; end
|
32
32
|
|
33
|
-
# Request message for
|
33
|
+
# Request message for `GetIamPolicy` method.
|
34
34
|
# @!attribute [rw] resource
|
35
35
|
# @return [String]
|
36
36
|
# REQUIRED: The resource for which the policy is being requested.
|
37
|
-
#
|
38
|
-
# resource is specified as
|
37
|
+
# `resource` is usually specified as a path. For example, a Project
|
38
|
+
# resource is specified as `projects/{project}`.
|
39
39
|
class GetIamPolicyRequest; end
|
40
40
|
|
41
|
-
# Request message for
|
41
|
+
# Request message for `TestIamPermissions` method.
|
42
42
|
# @!attribute [rw] resource
|
43
43
|
# @return [String]
|
44
44
|
# REQUIRED: The resource for which the policy detail is being requested.
|
45
|
-
#
|
46
|
-
# resource is specified as
|
45
|
+
# `resource` is usually specified as a path. For example, a Project
|
46
|
+
# resource is specified as `projects/{project}`.
|
47
47
|
# @!attribute [rw] permissions
|
48
48
|
# @return [Array<String>]
|
49
|
-
# The set of permissions to check for the
|
49
|
+
# The set of permissions to check for the `resource`. Permissions with
|
50
50
|
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
51
51
|
# information see
|
52
52
|
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
53
53
|
class TestIamPermissionsRequest; end
|
54
54
|
|
55
|
-
# Response message for
|
55
|
+
# Response message for `TestIamPermissions` method.
|
56
56
|
# @!attribute [rw] permissions
|
57
57
|
# @return [Array<String>]
|
58
|
-
# A subset of
|
58
|
+
# A subset of `TestPermissionsRequest.permissions` that the caller is
|
59
59
|
# allowed.
|
60
60
|
class TestIamPermissionsResponse; end
|
61
61
|
end
|
@@ -20,9 +20,9 @@ module Google
|
|
20
20
|
# specify access control policies for Cloud Platform resources.
|
21
21
|
#
|
22
22
|
#
|
23
|
-
# A
|
24
|
-
#
|
25
|
-
# Google domains, and service accounts. A
|
23
|
+
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
|
24
|
+
# `members` to a `role`, where the members can be user accounts, Google groups,
|
25
|
+
# Google domains, and service accounts. A `role` is a named list of permissions
|
26
26
|
# defined by IAM.
|
27
27
|
#
|
28
28
|
# **Example**
|
@@ -49,55 +49,55 @@ module Google
|
|
49
49
|
# [IAM developer's guide](https://cloud.google.com/iam).
|
50
50
|
# @!attribute [rw] version
|
51
51
|
# @return [Integer]
|
52
|
-
# Version of the
|
52
|
+
# Version of the `Policy`. The default version is 0.
|
53
53
|
# @!attribute [rw] bindings
|
54
54
|
# @return [Array<Google::Iam::V1::Binding>]
|
55
|
-
# Associates a list of
|
56
|
-
# Multiple
|
57
|
-
#
|
55
|
+
# Associates a list of `members` to a `role`.
|
56
|
+
# Multiple `bindings` must not be specified for the same `role`.
|
57
|
+
# `bindings` with no members will result in an error.
|
58
58
|
# @!attribute [rw] etag
|
59
59
|
# @return [String]
|
60
|
-
#
|
60
|
+
# `etag` is used for optimistic concurrency control as a way to help
|
61
61
|
# prevent simultaneous updates of a policy from overwriting each other.
|
62
|
-
# It is strongly suggested that systems make use of the
|
62
|
+
# It is strongly suggested that systems make use of the `etag` in the
|
63
63
|
# read-modify-write cycle to perform policy updates in order to avoid race
|
64
|
-
# conditions: An
|
65
|
-
# systems are expected to put that etag in the request to
|
64
|
+
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
|
65
|
+
# systems are expected to put that etag in the request to `setIamPolicy` to
|
66
66
|
# ensure that their change will be applied to the same version of the policy.
|
67
67
|
#
|
68
|
-
# If no
|
68
|
+
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
|
69
69
|
# policy is overwritten blindly.
|
70
70
|
class Policy; end
|
71
71
|
|
72
|
-
# Associates
|
72
|
+
# Associates `members` with a `role`.
|
73
73
|
# @!attribute [rw] role
|
74
74
|
# @return [String]
|
75
|
-
# Role that is assigned to
|
76
|
-
# For example,
|
75
|
+
# Role that is assigned to `members`.
|
76
|
+
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
77
77
|
# Required
|
78
78
|
# @!attribute [rw] members
|
79
79
|
# @return [Array<String>]
|
80
80
|
# Specifies the identities requesting access for a Cloud Platform resource.
|
81
|
-
#
|
81
|
+
# `members` can have the following values:
|
82
82
|
#
|
83
|
-
# *
|
83
|
+
# * `allUsers`: A special identifier that represents anyone who is
|
84
84
|
# on the internet; with or without a Google account.
|
85
85
|
#
|
86
|
-
# *
|
86
|
+
# * `allAuthenticatedUsers`: A special identifier that represents anyone
|
87
87
|
# who is authenticated with a Google account or a service account.
|
88
88
|
#
|
89
|
-
# *
|
90
|
-
# account. For example,
|
89
|
+
# * `user:{emailid}`: An email address that represents a specific Google
|
90
|
+
# account. For example, `alice@gmail.com` or `joe@example.com`.
|
91
91
|
#
|
92
92
|
#
|
93
|
-
# *
|
94
|
-
# account. For example,
|
93
|
+
# * `serviceAccount:{emailid}`: An email address that represents a service
|
94
|
+
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
|
95
95
|
#
|
96
|
-
# *
|
97
|
-
# For example,
|
96
|
+
# * `group:{emailid}`: An email address that represents a Google group.
|
97
|
+
# For example, `admins@example.com`.
|
98
98
|
#
|
99
|
-
# *
|
100
|
-
# users of that domain. For example,
|
99
|
+
# * `domain:{domain}`: A Google Apps domain name that represents all the
|
100
|
+
# users of that domain. For example, `google.com` or `example.com`.
|
101
101
|
class Binding; end
|
102
102
|
|
103
103
|
# The difference delta between two policies.
|
@@ -114,8 +114,8 @@ module Google
|
|
114
114
|
# Required
|
115
115
|
# @!attribute [rw] role
|
116
116
|
# @return [String]
|
117
|
-
# Role that is assigned to
|
118
|
-
# For example,
|
117
|
+
# Role that is assigned to `members`.
|
118
|
+
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
119
119
|
# Required
|
120
120
|
# @!attribute [rw] member
|
121
121
|
# @return [String]
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
module Google
|
17
17
|
module Protobuf
|
18
|
-
#
|
18
|
+
# `Any` contains an arbitrary serialized protocol buffer message along with a
|
19
19
|
# URL that describes the type of the serialized message.
|
20
20
|
#
|
21
21
|
# Protobuf library provides support to pack/unpack Any values in the form
|
@@ -69,9 +69,9 @@ module Google
|
|
69
69
|
#
|
70
70
|
# = JSON
|
71
71
|
#
|
72
|
-
# The JSON representation of an
|
72
|
+
# The JSON representation of an `Any` value uses the regular
|
73
73
|
# representation of the deserialized, embedded message, with an
|
74
|
-
# additional field
|
74
|
+
# additional field `@type` which contains the type URL. Example:
|
75
75
|
#
|
76
76
|
# package google.profile;
|
77
77
|
# message Person {
|
@@ -87,7 +87,7 @@ module Google
|
|
87
87
|
#
|
88
88
|
# If the embedded message type is well-known and has a custom JSON
|
89
89
|
# representation, that representation will be embedded adding a field
|
90
|
-
#
|
90
|
+
# `value` which holds the custom JSON in addition to the `@type`
|
91
91
|
# field. Example (for message {Google::Protobuf::Duration}):
|
92
92
|
#
|
93
93
|
# {
|
@@ -99,15 +99,15 @@ module Google
|
|
99
99
|
# A URL/resource name that uniquely identifies the type of the serialized
|
100
100
|
# protocol buffer message. The last segment of the URL's path must represent
|
101
101
|
# the fully qualified name of the type (as in
|
102
|
-
#
|
102
|
+
# `path/google.protobuf.Duration`). The name should be in a canonical form
|
103
103
|
# (e.g., leading "." is not accepted).
|
104
104
|
#
|
105
105
|
# In practice, teams usually precompile into the binary all types that they
|
106
106
|
# expect it to use in the context of Any. However, for URLs which use the
|
107
|
-
# scheme
|
107
|
+
# scheme `http`, `https`, or no scheme, one can optionally set up a type
|
108
108
|
# server that maps type URLs to message definitions as follows:
|
109
109
|
#
|
110
|
-
# * If no scheme is provided,
|
110
|
+
# * If no scheme is provided, `https` is assumed.
|
111
111
|
# * An HTTP GET on the URL must yield a {Google::Protobuf::Type}
|
112
112
|
# value in binary format, or produce an error.
|
113
113
|
# * Applications are allowed to cache lookup results based on the
|
@@ -120,7 +120,7 @@ module Google
|
|
120
120
|
# protobuf release, and it is not used for type URLs beginning with
|
121
121
|
# type.googleapis.com.
|
122
122
|
#
|
123
|
-
# Schemes other than
|
123
|
+
# Schemes other than `http`, `https` (or the empty scheme) might be
|
124
124
|
# used with implementation specific semantics.
|
125
125
|
# @!attribute [rw] value
|
126
126
|
# @return [String]
|
@@ -82,9 +82,9 @@ module Google
|
|
82
82
|
# @return [Integer]
|
83
83
|
# Signed fractions of a second at nanosecond resolution of the span
|
84
84
|
# of time. Durations less than one second are represented with a 0
|
85
|
-
#
|
86
|
-
# of one second or more, a non-zero value for the
|
87
|
-
# of the same sign as the
|
85
|
+
# `seconds` field and a positive or negative `nanos` field. For durations
|
86
|
+
# of one second or more, a non-zero value for the `nanos` field must be
|
87
|
+
# of the same sign as the `seconds` field. Must be from -999,999,999
|
88
88
|
# to +999,999,999 inclusive.
|
89
89
|
class Duration; end
|
90
90
|
end
|
@@ -23,7 +23,7 @@ module Google
|
|
23
23
|
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
24
24
|
# }
|
25
25
|
#
|
26
|
-
# The JSON representation for
|
26
|
+
# The JSON representation for `Empty` is empty JSON object `{}`.
|
27
27
|
class Empty; end
|
28
28
|
end
|
29
29
|
end
|
@@ -15,14 +15,14 @@
|
|
15
15
|
|
16
16
|
module Google
|
17
17
|
module Protobuf
|
18
|
-
#
|
18
|
+
# `FieldMask` represents a set of symbolic field paths, for example:
|
19
19
|
#
|
20
20
|
# paths: "f.a"
|
21
21
|
# paths: "f.b.d"
|
22
22
|
#
|
23
|
-
# Here
|
24
|
-
# fields in the message found in
|
25
|
-
# message in
|
23
|
+
# Here `f` represents a field in some root message, `a` and `b`
|
24
|
+
# fields in the message found in `f`, and `d` a field found in the
|
25
|
+
# message in `f.b`.
|
26
26
|
#
|
27
27
|
# Field masks are used to specify a subset of fields that should be
|
28
28
|
# returned by a get operation or modified by an update operation.
|
@@ -85,7 +85,7 @@ module Google
|
|
85
85
|
#
|
86
86
|
# If a repeated field is specified for an update operation, the existing
|
87
87
|
# repeated values in the target resource will be overwritten by the new values.
|
88
|
-
# Note that a repeated field is only allowed in the last position of a
|
88
|
+
# Note that a repeated field is only allowed in the last position of a `paths`
|
89
89
|
# string.
|
90
90
|
#
|
91
91
|
# If a sub-message is specified in the last position of the field mask for an
|
@@ -177,7 +177,7 @@ module Google
|
|
177
177
|
# string address = 2;
|
178
178
|
# }
|
179
179
|
#
|
180
|
-
# In proto a field mask for
|
180
|
+
# In proto a field mask for `Profile` may look as such:
|
181
181
|
#
|
182
182
|
# mask {
|
183
183
|
# paths: "user.display_name"
|
@@ -221,7 +221,7 @@ module Google
|
|
221
221
|
#
|
222
222
|
# The implementation of any API method which has a FieldMask type field in the
|
223
223
|
# request should verify the included field paths, and return an
|
224
|
-
#
|
224
|
+
# `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
|
225
225
|
# @!attribute [rw] paths
|
226
226
|
# @return [Array<String>]
|
227
227
|
# The set of field mask paths.
|
@@ -29,13 +29,13 @@ module Google
|
|
29
29
|
#
|
30
30
|
# = Examples
|
31
31
|
#
|
32
|
-
# Example 1: Compute Timestamp from POSIX
|
32
|
+
# Example 1: Compute Timestamp from POSIX `time()`.
|
33
33
|
#
|
34
34
|
# Timestamp timestamp;
|
35
35
|
# timestamp.set_seconds(time(NULL));
|
36
36
|
# timestamp.set_nanos(0);
|
37
37
|
#
|
38
|
-
# Example 2: Compute Timestamp from POSIX
|
38
|
+
# Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
39
39
|
#
|
40
40
|
# struct timeval tv;
|
41
41
|
# gettimeofday(&tv, NULL);
|
@@ -44,7 +44,7 @@ module Google
|
|
44
44
|
# timestamp.set_seconds(tv.tv_sec);
|
45
45
|
# timestamp.set_nanos(tv.tv_usec * 1000);
|
46
46
|
#
|
47
|
-
# Example 3: Compute Timestamp from Win32
|
47
|
+
# Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
48
48
|
#
|
49
49
|
# FILETIME ft;
|
50
50
|
# GetSystemTimeAsFileTime(&ft);
|
@@ -56,7 +56,7 @@ module Google
|
|
56
56
|
# timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
57
57
|
# timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
58
58
|
#
|
59
|
-
# Example 4: Compute Timestamp from Java
|
59
|
+
# Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
60
60
|
#
|
61
61
|
# long millis = System.currentTimeMillis();
|
62
62
|
#
|
@@ -87,10 +87,10 @@ module Google
|
|
87
87
|
#
|
88
88
|
# In JavaScript, one can convert a Date object to this format using the
|
89
89
|
# standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
|
90
|
-
# method. In Python, a standard
|
91
|
-
# to this format using [
|
90
|
+
# method. In Python, a standard `datetime.datetime` object can be converted
|
91
|
+
# to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
|
92
92
|
# with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
|
93
|
-
# can use the Joda Time's [
|
93
|
+
# can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
94
94
|
# http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
|
95
95
|
# ) to obtain a formatter capable of generating timestamps in this format.
|
96
96
|
# @!attribute [rw] seconds
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
module Google
|
17
17
|
module Rpc
|
18
|
-
# The
|
18
|
+
# The `Status` type defines a logical error model that is suitable for different
|
19
19
|
# programming environments, including REST APIs and RPC APIs. It is used by
|
20
20
|
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
21
21
|
#
|
@@ -24,7 +24,7 @@ module Google
|
|
24
24
|
#
|
25
25
|
# = Overview
|
26
26
|
#
|
27
|
-
# The
|
27
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
28
28
|
# and error details. The error code should be an enum value of
|
29
29
|
# {Google::Rpc::Code}, but it may accept additional error codes if needed. The
|
30
30
|
# error message should be a developer-facing English message that helps
|
@@ -32,40 +32,40 @@ module Google
|
|
32
32
|
# error message is needed, put the localized message in the error details or
|
33
33
|
# localize it in the client. The optional error details may contain arbitrary
|
34
34
|
# information about the error. There is a predefined set of error detail types
|
35
|
-
# in the package
|
35
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
36
36
|
#
|
37
37
|
# = Language mapping
|
38
38
|
#
|
39
|
-
# The
|
40
|
-
# is not necessarily the actual wire format. When the
|
39
|
+
# The `Status` message is the logical representation of the error model, but it
|
40
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
41
41
|
# exposed in different client libraries and different wire protocols, it can be
|
42
42
|
# mapped differently. For example, it will likely be mapped to some exceptions
|
43
43
|
# in Java, but more likely mapped to some error codes in C.
|
44
44
|
#
|
45
45
|
# = Other uses
|
46
46
|
#
|
47
|
-
# The error model and the
|
47
|
+
# The error model and the `Status` message can be used in a variety of
|
48
48
|
# environments, either with or without APIs, to provide a
|
49
49
|
# consistent developer experience across different environments.
|
50
50
|
#
|
51
51
|
# Example uses of this error model include:
|
52
52
|
#
|
53
53
|
# * Partial errors. If a service needs to return partial errors to the client,
|
54
|
-
# it may embed the
|
54
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
55
55
|
# errors.
|
56
56
|
#
|
57
57
|
# * Workflow errors. A typical workflow has multiple steps. Each step may
|
58
|
-
# have a
|
58
|
+
# have a `Status` message for error reporting.
|
59
59
|
#
|
60
60
|
# * Batch operations. If a client uses batch request and batch response, the
|
61
|
-
#
|
61
|
+
# `Status` message should be used directly inside batch response, one for
|
62
62
|
# each error sub-response.
|
63
63
|
#
|
64
64
|
# * Asynchronous operations. If an API call embeds asynchronous operation
|
65
65
|
# results in its response, the status of those operations should be
|
66
|
-
# represented directly using the
|
66
|
+
# represented directly using the `Status` message.
|
67
67
|
#
|
68
|
-
# * Logging. If some API errors are stored in logs, the message
|
68
|
+
# * Logging. If some API errors are stored in logs, the message `Status` could
|
69
69
|
# be used directly after any stripping needed for security/privacy reasons.
|
70
70
|
# @!attribute [rw] code
|
71
71
|
# @return [Integer]
|