google-cloud-policy_troubleshooter-iam-v3 0.a → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/client.rb +400 -0
  6. data/lib/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/credentials.rb +49 -0
  7. data/lib/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest/client.rb +372 -0
  8. data/lib/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest/service_stub.rb +108 -0
  9. data/lib/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest.rb +55 -0
  10. data/lib/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter.rb +58 -0
  11. data/lib/google/cloud/policy_troubleshooter/iam/v3/rest.rb +39 -0
  12. data/lib/google/cloud/policy_troubleshooter/iam/v3/version.rb +7 -2
  13. data/lib/google/cloud/policy_troubleshooter/iam/v3.rb +47 -0
  14. data/lib/google/cloud/policytroubleshooter/iam/v3/troubleshooter_pb.rb +86 -0
  15. data/lib/google/cloud/policytroubleshooter/iam/v3/troubleshooter_services_pb.rb +51 -0
  16. data/lib/google-cloud-policy_troubleshooter-iam-v3.rb +21 -0
  17. data/proto_docs/README.md +4 -0
  18. data/proto_docs/google/api/client.rb +381 -0
  19. data/proto_docs/google/api/field_behavior.rb +85 -0
  20. data/proto_docs/google/api/launch_stage.rb +71 -0
  21. data/proto_docs/google/api/resource.rb +222 -0
  22. data/proto_docs/google/cloud/policytroubleshooter/iam/v3/troubleshooter.rb +826 -0
  23. data/proto_docs/google/iam/v1/policy.rb +426 -0
  24. data/proto_docs/google/iam/v2/deny.rb +110 -0
  25. data/proto_docs/google/iam/v2/policy.rb +241 -0
  26. data/proto_docs/google/longrunning/operations.rb +164 -0
  27. data/proto_docs/google/protobuf/any.rb +144 -0
  28. data/proto_docs/google/protobuf/duration.rb +98 -0
  29. data/proto_docs/google/protobuf/empty.rb +34 -0
  30. data/proto_docs/google/protobuf/struct.rb +96 -0
  31. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  32. data/proto_docs/google/rpc/status.rb +48 -0
  33. data/proto_docs/google/type/expr.rb +75 -0
  34. metadata +229 -13
@@ -0,0 +1,241 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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 Iam
22
+ module V2
23
+ # Data for an IAM policy.
24
+ # @!attribute [rw] name
25
+ # @return [::String]
26
+ # Immutable. The resource name of the `Policy`, which must be unique. Format:
27
+ # `policies/{attachment_point}/denypolicies/{policy_id}`
28
+ #
29
+ #
30
+ # The attachment point is identified by its URL-encoded full resource name,
31
+ # which means that the forward-slash character, `/`, must be written as
32
+ # `%2F`. For example,
33
+ # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
34
+ #
35
+ # For organizations and folders, use the numeric ID in the full resource
36
+ # name. For projects, requests can use the alphanumeric or the numeric ID.
37
+ # Responses always contain the numeric ID.
38
+ # @!attribute [rw] uid
39
+ # @return [::String]
40
+ # Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
41
+ # `Policy` is created.
42
+ # @!attribute [r] kind
43
+ # @return [::String]
44
+ # Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
45
+ # @!attribute [rw] display_name
46
+ # @return [::String]
47
+ # A user-specified description of the `Policy`. This value can be up to 63
48
+ # characters.
49
+ # @!attribute [rw] annotations
50
+ # @return [::Google::Protobuf::Map{::String => ::String}]
51
+ # A key-value map to store arbitrary metadata for the `Policy`. Keys
52
+ # can be up to 63 characters. Values can be up to 255 characters.
53
+ # @!attribute [rw] etag
54
+ # @return [::String]
55
+ # An opaque tag that identifies the current version of the `Policy`. IAM uses
56
+ # this value to help manage concurrent updates, so they do not cause one
57
+ # update to be overwritten by another.
58
+ #
59
+ # If this field is present in a [CreatePolicy][] request, the value is
60
+ # ignored.
61
+ # @!attribute [r] create_time
62
+ # @return [::Google::Protobuf::Timestamp]
63
+ # Output only. The time when the `Policy` was created.
64
+ # @!attribute [r] update_time
65
+ # @return [::Google::Protobuf::Timestamp]
66
+ # Output only. The time when the `Policy` was last updated.
67
+ # @!attribute [r] delete_time
68
+ # @return [::Google::Protobuf::Timestamp]
69
+ # Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
70
+ # @!attribute [rw] rules
71
+ # @return [::Array<::Google::Iam::V2::PolicyRule>]
72
+ # A list of rules that specify the behavior of the `Policy`. All of the rules
73
+ # should be of the `kind` specified in the `Policy`.
74
+ # @!attribute [rw] managing_authority
75
+ # @return [::String]
76
+ # Immutable. Specifies that this policy is managed by an authority and can only be
77
+ # modified by that authority. Usage is restricted.
78
+ class Policy
79
+ include ::Google::Protobuf::MessageExts
80
+ extend ::Google::Protobuf::MessageExts::ClassMethods
81
+
82
+ # @!attribute [rw] key
83
+ # @return [::String]
84
+ # @!attribute [rw] value
85
+ # @return [::String]
86
+ class AnnotationsEntry
87
+ include ::Google::Protobuf::MessageExts
88
+ extend ::Google::Protobuf::MessageExts::ClassMethods
89
+ end
90
+ end
91
+
92
+ # A single rule in a `Policy`.
93
+ # @!attribute [rw] deny_rule
94
+ # @return [::Google::Iam::V2::DenyRule]
95
+ # A rule for a deny policy.
96
+ # @!attribute [rw] description
97
+ # @return [::String]
98
+ # A user-specified description of the rule. This value can be up to 256
99
+ # characters.
100
+ class PolicyRule
101
+ include ::Google::Protobuf::MessageExts
102
+ extend ::Google::Protobuf::MessageExts::ClassMethods
103
+ end
104
+
105
+ # Request message for `ListPolicies`.
106
+ # @!attribute [rw] parent
107
+ # @return [::String]
108
+ # Required. The resource that the policy is attached to, along with the kind of policy
109
+ # to list. Format:
110
+ # `policies/{attachment_point}/denypolicies`
111
+ #
112
+ #
113
+ # The attachment point is identified by its URL-encoded full resource name,
114
+ # which means that the forward-slash character, `/`, must be written as
115
+ # `%2F`. For example,
116
+ # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
117
+ #
118
+ # For organizations and folders, use the numeric ID in the full resource
119
+ # name. For projects, you can use the alphanumeric or the numeric ID.
120
+ # @!attribute [rw] page_size
121
+ # @return [::Integer]
122
+ # The maximum number of policies to return. IAM ignores this value and uses
123
+ # the value 1000.
124
+ # @!attribute [rw] page_token
125
+ # @return [::String]
126
+ # A page token received in a {::Google::Iam::V2::ListPoliciesResponse ListPoliciesResponse}. Provide this token to
127
+ # retrieve the next page.
128
+ class ListPoliciesRequest
129
+ include ::Google::Protobuf::MessageExts
130
+ extend ::Google::Protobuf::MessageExts::ClassMethods
131
+ end
132
+
133
+ # Response message for `ListPolicies`.
134
+ # @!attribute [rw] policies
135
+ # @return [::Array<::Google::Iam::V2::Policy>]
136
+ # Metadata for the policies that are attached to the resource.
137
+ # @!attribute [rw] next_page_token
138
+ # @return [::String]
139
+ # A page token that you can use in a {::Google::Iam::V2::ListPoliciesRequest ListPoliciesRequest} to retrieve the
140
+ # next page. If this field is omitted, there are no additional pages.
141
+ class ListPoliciesResponse
142
+ include ::Google::Protobuf::MessageExts
143
+ extend ::Google::Protobuf::MessageExts::ClassMethods
144
+ end
145
+
146
+ # Request message for `GetPolicy`.
147
+ # @!attribute [rw] name
148
+ # @return [::String]
149
+ # Required. The resource name of the policy to retrieve. Format:
150
+ # `policies/{attachment_point}/denypolicies/{policy_id}`
151
+ #
152
+ #
153
+ # Use the URL-encoded full resource name, which means that the forward-slash
154
+ # character, `/`, must be written as `%2F`. For example,
155
+ # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
156
+ #
157
+ # For organizations and folders, use the numeric ID in the full resource
158
+ # name. For projects, you can use the alphanumeric or the numeric ID.
159
+ class GetPolicyRequest
160
+ include ::Google::Protobuf::MessageExts
161
+ extend ::Google::Protobuf::MessageExts::ClassMethods
162
+ end
163
+
164
+ # Request message for `CreatePolicy`.
165
+ # @!attribute [rw] parent
166
+ # @return [::String]
167
+ # Required. The resource that the policy is attached to, along with the kind of policy
168
+ # to create. Format: `policies/{attachment_point}/denypolicies`
169
+ #
170
+ #
171
+ # The attachment point is identified by its URL-encoded full resource name,
172
+ # which means that the forward-slash character, `/`, must be written as
173
+ # `%2F`. For example,
174
+ # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
175
+ #
176
+ # For organizations and folders, use the numeric ID in the full resource
177
+ # name. For projects, you can use the alphanumeric or the numeric ID.
178
+ # @!attribute [rw] policy
179
+ # @return [::Google::Iam::V2::Policy]
180
+ # Required. The policy to create.
181
+ # @!attribute [rw] policy_id
182
+ # @return [::String]
183
+ # The ID to use for this policy, which will become the final component of
184
+ # the policy's resource name. The ID must contain 3 to 63 characters. It can
185
+ # contain lowercase letters and numbers, as well as dashes (`-`) and periods
186
+ # (`.`). The first character must be a lowercase letter.
187
+ class CreatePolicyRequest
188
+ include ::Google::Protobuf::MessageExts
189
+ extend ::Google::Protobuf::MessageExts::ClassMethods
190
+ end
191
+
192
+ # Request message for `UpdatePolicy`.
193
+ # @!attribute [rw] policy
194
+ # @return [::Google::Iam::V2::Policy]
195
+ # Required. The policy to update.
196
+ #
197
+ # To prevent conflicting updates, the `etag` value must match the value that
198
+ # is stored in IAM. If the `etag` values do not match, the request fails with
199
+ # a `409` error code and `ABORTED` status.
200
+ class UpdatePolicyRequest
201
+ include ::Google::Protobuf::MessageExts
202
+ extend ::Google::Protobuf::MessageExts::ClassMethods
203
+ end
204
+
205
+ # Request message for `DeletePolicy`.
206
+ # @!attribute [rw] name
207
+ # @return [::String]
208
+ # Required. The resource name of the policy to delete. Format:
209
+ # `policies/{attachment_point}/denypolicies/{policy_id}`
210
+ #
211
+ #
212
+ # Use the URL-encoded full resource name, which means that the forward-slash
213
+ # character, `/`, must be written as `%2F`. For example,
214
+ # `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
215
+ #
216
+ # For organizations and folders, use the numeric ID in the full resource
217
+ # name. For projects, you can use the alphanumeric or the numeric ID.
218
+ # @!attribute [rw] etag
219
+ # @return [::String]
220
+ # Optional. The expected `etag` of the policy to delete. If the value does not match
221
+ # the value that is stored in IAM, the request fails with a `409` error code
222
+ # and `ABORTED` status.
223
+ #
224
+ # If you omit this field, the policy is deleted regardless of its current
225
+ # `etag`.
226
+ class DeletePolicyRequest
227
+ include ::Google::Protobuf::MessageExts
228
+ extend ::Google::Protobuf::MessageExts::ClassMethods
229
+ end
230
+
231
+ # Metadata for long-running `Policy` operations.
232
+ # @!attribute [rw] create_time
233
+ # @return [::Google::Protobuf::Timestamp]
234
+ # Timestamp when the `google.longrunning.Operation` was created.
235
+ class PolicyOperationMetadata
236
+ include ::Google::Protobuf::MessageExts
237
+ extend ::Google::Protobuf::MessageExts::ClassMethods
238
+ end
239
+ end
240
+ end
241
+ end
@@ -0,0 +1,164 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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 be a resource name ending with `operations/{unique_id}`.
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's parent resource.
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
+ # The request message for Operations.WaitOperation.
116
+ # @!attribute [rw] name
117
+ # @return [::String]
118
+ # The name of the operation resource to wait on.
119
+ # @!attribute [rw] timeout
120
+ # @return [::Google::Protobuf::Duration]
121
+ # The maximum duration to wait before timing out. If left blank, the wait
122
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
123
+ # If RPC context deadline is also specified, the shorter one will be used.
124
+ class WaitOperationRequest
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
129
+ # A message representing the message types used by a long-running operation.
130
+ #
131
+ # Example:
132
+ #
133
+ # rpc LongRunningRecognize(LongRunningRecognizeRequest)
134
+ # returns (google.longrunning.Operation) {
135
+ # option (google.longrunning.operation_info) = {
136
+ # response_type: "LongRunningRecognizeResponse"
137
+ # metadata_type: "LongRunningRecognizeMetadata"
138
+ # };
139
+ # }
140
+ # @!attribute [rw] response_type
141
+ # @return [::String]
142
+ # Required. The message name of the primary return type for this
143
+ # long-running operation.
144
+ # This type will be used to deserialize the LRO's response.
145
+ #
146
+ # If the response is in a different package from the rpc, a fully-qualified
147
+ # message name must be used (e.g. `google.protobuf.Struct`).
148
+ #
149
+ # Note: Altering this value constitutes a breaking change.
150
+ # @!attribute [rw] metadata_type
151
+ # @return [::String]
152
+ # Required. The message name of the metadata type for this long-running
153
+ # operation.
154
+ #
155
+ # If the response is in a different package from the rpc, a fully-qualified
156
+ # message name must be used (e.g. `google.protobuf.Struct`).
157
+ #
158
+ # Note: Altering this value constitutes a breaking change.
159
+ class OperationInfo
160
+ include ::Google::Protobuf::MessageExts
161
+ extend ::Google::Protobuf::MessageExts::ClassMethods
162
+ end
163
+ end
164
+ end
@@ -0,0 +1,144 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ # // or ...
47
+ # if (any.isSameTypeAs(Foo.getDefaultInstance())) {
48
+ # foo = any.unpack(Foo.getDefaultInstance());
49
+ # }
50
+ #
51
+ # Example 3: Pack and unpack a message in Python.
52
+ #
53
+ # foo = Foo(...)
54
+ # any = Any()
55
+ # any.Pack(foo)
56
+ # ...
57
+ # if any.Is(Foo.DESCRIPTOR):
58
+ # any.Unpack(foo)
59
+ # ...
60
+ #
61
+ # Example 4: Pack and unpack a message in Go
62
+ #
63
+ # foo := &pb.Foo{...}
64
+ # any, err := anypb.New(foo)
65
+ # if err != nil {
66
+ # ...
67
+ # }
68
+ # ...
69
+ # foo := &pb.Foo{}
70
+ # if err := any.UnmarshalTo(foo); err != nil {
71
+ # ...
72
+ # }
73
+ #
74
+ # The pack methods provided by protobuf library will by default use
75
+ # 'type.googleapis.com/full.type.name' as the type URL and the unpack
76
+ # methods only use the fully qualified type name after the last '/'
77
+ # in the type URL, for example "foo.bar.com/x/y.z" will yield type
78
+ # name "y.z".
79
+ #
80
+ # JSON
81
+ # ====
82
+ # The JSON representation of an `Any` value uses the regular
83
+ # representation of the deserialized, embedded message, with an
84
+ # additional field `@type` which contains the type URL. Example:
85
+ #
86
+ # package google.profile;
87
+ # message Person {
88
+ # string first_name = 1;
89
+ # string last_name = 2;
90
+ # }
91
+ #
92
+ # {
93
+ # "@type": "type.googleapis.com/google.profile.Person",
94
+ # "firstName": <string>,
95
+ # "lastName": <string>
96
+ # }
97
+ #
98
+ # If the embedded message type is well-known and has a custom JSON
99
+ # representation, that representation will be embedded adding a field
100
+ # `value` which holds the custom JSON in addition to the `@type`
101
+ # field. Example (for message [google.protobuf.Duration][]):
102
+ #
103
+ # {
104
+ # "@type": "type.googleapis.com/google.protobuf.Duration",
105
+ # "value": "1.212s"
106
+ # }
107
+ # @!attribute [rw] type_url
108
+ # @return [::String]
109
+ # A URL/resource name that uniquely identifies the type of the serialized
110
+ # protocol buffer message. This string must contain at least
111
+ # one "/" character. The last segment of the URL's path must represent
112
+ # the fully qualified name of the type (as in
113
+ # `path/google.protobuf.Duration`). The name should be in a canonical form
114
+ # (e.g., leading "." is not accepted).
115
+ #
116
+ # In practice, teams usually precompile into the binary all types that they
117
+ # expect it to use in the context of Any. However, for URLs which use the
118
+ # scheme `http`, `https`, or no scheme, one can optionally set up a type
119
+ # server that maps type URLs to message definitions as follows:
120
+ #
121
+ # * If no scheme is provided, `https` is assumed.
122
+ # * An HTTP GET on the URL must yield a [google.protobuf.Type][]
123
+ # value in binary format, or produce an error.
124
+ # * Applications are allowed to cache lookup results based on the
125
+ # URL, or have them precompiled into a binary to avoid any
126
+ # lookup. Therefore, binary compatibility needs to be preserved
127
+ # on changes to types. (Use versioned type names to manage
128
+ # breaking changes.)
129
+ #
130
+ # Note: this functionality is not currently available in the official
131
+ # protobuf release, and it is not used for type URLs beginning with
132
+ # type.googleapis.com.
133
+ #
134
+ # Schemes other than `http`, `https` (or the empty scheme) might be
135
+ # used with implementation specific semantics.
136
+ # @!attribute [rw] value
137
+ # @return [::String]
138
+ # Must be a valid serialized protocol buffer of the above specified type.
139
+ class Any
140
+ include ::Google::Protobuf::MessageExts
141
+ extend ::Google::Protobuf::MessageExts::ClassMethods
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ # A Duration represents a signed, fixed-length span of time represented
23
+ # as a count of seconds and fractions of seconds at nanosecond
24
+ # resolution. It is independent of any calendar and concepts like "day"
25
+ # or "month". It is related to Timestamp in that the difference between
26
+ # two Timestamp values is a Duration and it can be added or subtracted
27
+ # from a Timestamp. Range is approximately +-10,000 years.
28
+ #
29
+ # # Examples
30
+ #
31
+ # Example 1: Compute Duration from two Timestamps in pseudo code.
32
+ #
33
+ # Timestamp start = ...;
34
+ # Timestamp end = ...;
35
+ # Duration duration = ...;
36
+ #
37
+ # duration.seconds = end.seconds - start.seconds;
38
+ # duration.nanos = end.nanos - start.nanos;
39
+ #
40
+ # if (duration.seconds < 0 && duration.nanos > 0) {
41
+ # duration.seconds += 1;
42
+ # duration.nanos -= 1000000000;
43
+ # } else if (duration.seconds > 0 && duration.nanos < 0) {
44
+ # duration.seconds -= 1;
45
+ # duration.nanos += 1000000000;
46
+ # }
47
+ #
48
+ # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
49
+ #
50
+ # Timestamp start = ...;
51
+ # Duration duration = ...;
52
+ # Timestamp end = ...;
53
+ #
54
+ # end.seconds = start.seconds + duration.seconds;
55
+ # end.nanos = start.nanos + duration.nanos;
56
+ #
57
+ # if (end.nanos < 0) {
58
+ # end.seconds -= 1;
59
+ # end.nanos += 1000000000;
60
+ # } else if (end.nanos >= 1000000000) {
61
+ # end.seconds += 1;
62
+ # end.nanos -= 1000000000;
63
+ # }
64
+ #
65
+ # Example 3: Compute Duration from datetime.timedelta in Python.
66
+ #
67
+ # td = datetime.timedelta(days=3, minutes=10)
68
+ # duration = Duration()
69
+ # duration.FromTimedelta(td)
70
+ #
71
+ # # JSON Mapping
72
+ #
73
+ # In JSON format, the Duration type is encoded as a string rather than an
74
+ # object, where the string ends in the suffix "s" (indicating seconds) and
75
+ # is preceded by the number of seconds, with nanoseconds expressed as
76
+ # fractional seconds. For example, 3 seconds with 0 nanoseconds should be
77
+ # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
78
+ # be expressed in JSON format as "3.000000001s", and 3 seconds and 1
79
+ # microsecond should be expressed in JSON format as "3.000001s".
80
+ # @!attribute [rw] seconds
81
+ # @return [::Integer]
82
+ # Signed seconds of the span of time. Must be from -315,576,000,000
83
+ # to +315,576,000,000 inclusive. Note: these bounds are computed from:
84
+ # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
85
+ # @!attribute [rw] nanos
86
+ # @return [::Integer]
87
+ # Signed fractions of a second at nanosecond resolution of the span
88
+ # of time. Durations less than one second are represented with a 0
89
+ # `seconds` field and a positive or negative `nanos` field. For durations
90
+ # of one second or more, a non-zero value for the `nanos` field must be
91
+ # of the same sign as the `seconds` field. Must be from -999,999,999
92
+ # to +999,999,999 inclusive.
93
+ class Duration
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ # A generic empty message that you can re-use to avoid defining duplicated
23
+ # empty messages in your APIs. A typical example is to use it as the request
24
+ # or the response type of an API method. For instance:
25
+ #
26
+ # service Foo {
27
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
28
+ # }
29
+ class Empty
30
+ include ::Google::Protobuf::MessageExts
31
+ extend ::Google::Protobuf::MessageExts::ClassMethods
32
+ end
33
+ end
34
+ end