google-cloud-network_services-v1beta1 0.a → 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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/network_services/v1beta1/bindings_override.rb +108 -0
  6. data/lib/google/cloud/network_services/v1beta1/dep_service/client.rb +2076 -0
  7. data/lib/google/cloud/network_services/v1beta1/dep_service/credentials.rb +47 -0
  8. data/lib/google/cloud/network_services/v1beta1/dep_service/operations.rb +843 -0
  9. data/lib/google/cloud/network_services/v1beta1/dep_service/paths.rb +107 -0
  10. data/lib/google/cloud/network_services/v1beta1/dep_service/rest/client.rb +1937 -0
  11. data/lib/google/cloud/network_services/v1beta1/dep_service/rest/operations.rb +927 -0
  12. data/lib/google/cloud/network_services/v1beta1/dep_service/rest/service_stub.rb +1002 -0
  13. data/lib/google/cloud/network_services/v1beta1/dep_service/rest.rb +54 -0
  14. data/lib/google/cloud/network_services/v1beta1/dep_service.rb +56 -0
  15. data/lib/google/cloud/network_services/v1beta1/network_services/client.rb +947 -0
  16. data/lib/google/cloud/network_services/v1beta1/network_services/credentials.rb +47 -0
  17. data/lib/google/cloud/network_services/v1beta1/network_services/operations.rb +843 -0
  18. data/lib/google/cloud/network_services/v1beta1/network_services/paths.rb +126 -0
  19. data/lib/google/cloud/network_services/v1beta1/network_services/rest/client.rb +878 -0
  20. data/lib/google/cloud/network_services/v1beta1/network_services/rest/operations.rb +927 -0
  21. data/lib/google/cloud/network_services/v1beta1/network_services/rest/service_stub.rb +388 -0
  22. data/lib/google/cloud/network_services/v1beta1/network_services/rest.rb +54 -0
  23. data/lib/google/cloud/network_services/v1beta1/network_services.rb +56 -0
  24. data/lib/google/cloud/network_services/v1beta1/rest.rb +39 -0
  25. data/lib/google/cloud/network_services/v1beta1/version.rb +7 -2
  26. data/lib/google/cloud/network_services/v1beta1.rb +46 -0
  27. data/lib/google/cloud/networkservices/v1beta1/common_pb.rb +29 -0
  28. data/lib/google/cloud/networkservices/v1beta1/dep_pb.rb +67 -0
  29. data/lib/google/cloud/networkservices/v1beta1/dep_services_pb.rb +74 -0
  30. data/lib/google/cloud/networkservices/v1beta1/endpoint_policy_pb.rb +34 -0
  31. data/lib/google/cloud/networkservices/v1beta1/network_services_pb.rb +25 -0
  32. data/lib/google/cloud/networkservices/v1beta1/network_services_services_pb.rb +53 -0
  33. data/lib/google-cloud-network_services-v1beta1.rb +21 -0
  34. data/proto_docs/README.md +4 -0
  35. data/proto_docs/google/api/client.rb +593 -0
  36. data/proto_docs/google/api/field_behavior.rb +85 -0
  37. data/proto_docs/google/api/field_info.rb +88 -0
  38. data/proto_docs/google/api/launch_stage.rb +71 -0
  39. data/proto_docs/google/api/resource.rb +227 -0
  40. data/proto_docs/google/cloud/networkservices/v1beta1/common.rb +147 -0
  41. data/proto_docs/google/cloud/networkservices/v1beta1/dep.rb +928 -0
  42. data/proto_docs/google/cloud/networkservices/v1beta1/endpoint_policy.rb +196 -0
  43. data/proto_docs/google/longrunning/operations.rb +191 -0
  44. data/proto_docs/google/protobuf/any.rb +145 -0
  45. data/proto_docs/google/protobuf/duration.rb +98 -0
  46. data/proto_docs/google/protobuf/empty.rb +34 -0
  47. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  48. data/proto_docs/google/protobuf/timestamp.rb +128 -0
  49. data/proto_docs/google/rpc/status.rb +48 -0
  50. metadata +111 -9
@@ -0,0 +1,196 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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 NetworkServices
23
+ module V1beta1
24
+ # EndpointPolicy is a resource that helps apply desired configuration
25
+ # on the endpoints that match specific criteria.
26
+ # For example, this resource can be used to apply "authentication config"
27
+ # an all endpoints that serve on port 8080.
28
+ # @!attribute [rw] name
29
+ # @return [::String]
30
+ # Required. Name of the EndpointPolicy resource. It matches pattern
31
+ # `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
32
+ # @!attribute [r] create_time
33
+ # @return [::Google::Protobuf::Timestamp]
34
+ # Output only. The timestamp when the resource was created.
35
+ # @!attribute [r] update_time
36
+ # @return [::Google::Protobuf::Timestamp]
37
+ # Output only. The timestamp when the resource was updated.
38
+ # @!attribute [rw] labels
39
+ # @return [::Google::Protobuf::Map{::String => ::String}]
40
+ # Optional. Set of label tags associated with the EndpointPolicy resource.
41
+ # @!attribute [rw] type
42
+ # @return [::Google::Cloud::NetworkServices::V1beta1::EndpointPolicy::EndpointPolicyType]
43
+ # Required. The type of endpoint policy. This is primarily used to validate
44
+ # the configuration.
45
+ # @!attribute [rw] authorization_policy
46
+ # @return [::String]
47
+ # Optional. This field specifies the URL of AuthorizationPolicy resource that
48
+ # applies authorization policies to the inbound traffic at the
49
+ # matched endpoints. Refer to Authorization. If this field is not
50
+ # specified, authorization is disabled(no authz checks) for this
51
+ # endpoint.
52
+ # @!attribute [rw] endpoint_matcher
53
+ # @return [::Google::Cloud::NetworkServices::V1beta1::EndpointMatcher]
54
+ # Required. A matcher that selects endpoints to which the policies should be
55
+ # applied.
56
+ # @!attribute [rw] traffic_port_selector
57
+ # @return [::Google::Cloud::NetworkServices::V1beta1::TrafficPortSelector]
58
+ # Optional. Port selector for the (matched) endpoints. If no port selector is
59
+ # provided, the matched config is applied to all ports.
60
+ # @!attribute [rw] description
61
+ # @return [::String]
62
+ # Optional. A free-text description of the resource. Max length 1024
63
+ # characters.
64
+ # @!attribute [rw] server_tls_policy
65
+ # @return [::String]
66
+ # Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is
67
+ # used to determine the authentication policy to be applied to terminate the
68
+ # inbound traffic at the identified backends. If this field is not set,
69
+ # authentication is disabled(open) for this endpoint.
70
+ # @!attribute [rw] client_tls_policy
71
+ # @deprecated This field is deprecated and may be removed in the next major version update.
72
+ # @return [::String]
73
+ # Optional. Deprecated: This field is not used and is a no-op.
74
+ # A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy can be set
75
+ # to specify the authentication for traffic from the proxy to the actual
76
+ # endpoints. More specifically, it is applied to the outgoing traffic from
77
+ # the proxy to the endpoint. This is typically used for sidecar model where
78
+ # the proxy identifies itself as endpoint to the control plane, with the
79
+ # connection between sidecar and endpoint requiring authentication. If this
80
+ # field is not set, authentication is disabled(open). Applicable only when
81
+ # EndpointPolicyType is SIDECAR_PROXY.
82
+ class EndpointPolicy
83
+ include ::Google::Protobuf::MessageExts
84
+ extend ::Google::Protobuf::MessageExts::ClassMethods
85
+
86
+ # @!attribute [rw] key
87
+ # @return [::String]
88
+ # @!attribute [rw] value
89
+ # @return [::String]
90
+ class LabelsEntry
91
+ include ::Google::Protobuf::MessageExts
92
+ extend ::Google::Protobuf::MessageExts::ClassMethods
93
+ end
94
+
95
+ # The type of endpoint policy.
96
+ module EndpointPolicyType
97
+ # Default value. Must not be used.
98
+ ENDPOINT_POLICY_TYPE_UNSPECIFIED = 0
99
+
100
+ # Represents a proxy deployed as a sidecar.
101
+ SIDECAR_PROXY = 1
102
+
103
+ # Represents a proxyless gRPC backend.
104
+ GRPC_SERVER = 2
105
+ end
106
+ end
107
+
108
+ # Request used with the ListEndpointPolicies method.
109
+ # @!attribute [rw] parent
110
+ # @return [::String]
111
+ # Required. The project and location from which the EndpointPolicies should
112
+ # be listed, specified in the format `projects/*/locations/global`.
113
+ # @!attribute [rw] page_size
114
+ # @return [::Integer]
115
+ # Maximum number of EndpointPolicies to return per call.
116
+ # @!attribute [rw] page_token
117
+ # @return [::String]
118
+ # The value returned by the last `ListEndpointPoliciesResponse`
119
+ # Indicates that this is a continuation of a prior
120
+ # `ListEndpointPolicies` call, and that the system should return the
121
+ # next page of data.
122
+ class ListEndpointPoliciesRequest
123
+ include ::Google::Protobuf::MessageExts
124
+ extend ::Google::Protobuf::MessageExts::ClassMethods
125
+ end
126
+
127
+ # Response returned by the ListEndpointPolicies method.
128
+ # @!attribute [rw] endpoint_policies
129
+ # @return [::Array<::Google::Cloud::NetworkServices::V1beta1::EndpointPolicy>]
130
+ # List of EndpointPolicy resources.
131
+ # @!attribute [rw] next_page_token
132
+ # @return [::String]
133
+ # If there might be more results than those appearing in this response, then
134
+ # `next_page_token` is included. To get the next set of results, call this
135
+ # method again using the value of `next_page_token` as `page_token`.
136
+ class ListEndpointPoliciesResponse
137
+ include ::Google::Protobuf::MessageExts
138
+ extend ::Google::Protobuf::MessageExts::ClassMethods
139
+ end
140
+
141
+ # Request used with the GetEndpointPolicy method.
142
+ # @!attribute [rw] name
143
+ # @return [::String]
144
+ # Required. A name of the EndpointPolicy to get. Must be in the format
145
+ # `projects/*/locations/global/endpointPolicies/*`.
146
+ class GetEndpointPolicyRequest
147
+ include ::Google::Protobuf::MessageExts
148
+ extend ::Google::Protobuf::MessageExts::ClassMethods
149
+ end
150
+
151
+ # Request used with the CreateEndpointPolicy method.
152
+ # @!attribute [rw] parent
153
+ # @return [::String]
154
+ # Required. The parent resource of the EndpointPolicy. Must be in the
155
+ # format `projects/*/locations/global`.
156
+ # @!attribute [rw] endpoint_policy_id
157
+ # @return [::String]
158
+ # Required. Short name of the EndpointPolicy resource to be created.
159
+ # E.g. "CustomECS".
160
+ # @!attribute [rw] endpoint_policy
161
+ # @return [::Google::Cloud::NetworkServices::V1beta1::EndpointPolicy]
162
+ # Required. EndpointPolicy resource to be created.
163
+ class CreateEndpointPolicyRequest
164
+ include ::Google::Protobuf::MessageExts
165
+ extend ::Google::Protobuf::MessageExts::ClassMethods
166
+ end
167
+
168
+ # Request used with the UpdateEndpointPolicy method.
169
+ # @!attribute [rw] update_mask
170
+ # @return [::Google::Protobuf::FieldMask]
171
+ # Optional. Field mask is used to specify the fields to be overwritten in the
172
+ # EndpointPolicy resource by the update.
173
+ # The fields specified in the update_mask are relative to the resource, not
174
+ # the full request. A field will be overwritten if it is in the mask. If the
175
+ # user does not provide a mask then all fields will be overwritten.
176
+ # @!attribute [rw] endpoint_policy
177
+ # @return [::Google::Cloud::NetworkServices::V1beta1::EndpointPolicy]
178
+ # Required. Updated EndpointPolicy resource.
179
+ class UpdateEndpointPolicyRequest
180
+ include ::Google::Protobuf::MessageExts
181
+ extend ::Google::Protobuf::MessageExts::ClassMethods
182
+ end
183
+
184
+ # Request used with the DeleteEndpointPolicy method.
185
+ # @!attribute [rw] name
186
+ # @return [::String]
187
+ # Required. A name of the EndpointPolicy to delete. Must be in the format
188
+ # `projects/*/locations/global/endpointPolicies/*`.
189
+ class DeleteEndpointPolicyRequest
190
+ include ::Google::Protobuf::MessageExts
191
+ extend ::Google::Protobuf::MessageExts::ClassMethods
192
+ end
193
+ end
194
+ end
195
+ end
196
+ end
@@ -0,0 +1,191 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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
+ #
44
+ # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
45
+ # @!attribute [rw] response
46
+ # @return [::Google::Protobuf::Any]
47
+ # The normal, successful response of the operation. If the original
48
+ # method returns no data on success, such as `Delete`, the response is
49
+ # `google.protobuf.Empty`. If the original method is standard
50
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
51
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
52
+ # is the original method name. For example, if the original method name
53
+ # is `TakeSnapshot()`, the inferred response type is
54
+ # `TakeSnapshotResponse`.
55
+ #
56
+ # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
57
+ class Operation
58
+ include ::Google::Protobuf::MessageExts
59
+ extend ::Google::Protobuf::MessageExts::ClassMethods
60
+ end
61
+
62
+ # The request message for
63
+ # Operations.GetOperation.
64
+ # @!attribute [rw] name
65
+ # @return [::String]
66
+ # The name of the operation resource.
67
+ class GetOperationRequest
68
+ include ::Google::Protobuf::MessageExts
69
+ extend ::Google::Protobuf::MessageExts::ClassMethods
70
+ end
71
+
72
+ # The request message for
73
+ # Operations.ListOperations.
74
+ # @!attribute [rw] name
75
+ # @return [::String]
76
+ # The name of the operation's parent resource.
77
+ # @!attribute [rw] filter
78
+ # @return [::String]
79
+ # The standard list filter.
80
+ # @!attribute [rw] page_size
81
+ # @return [::Integer]
82
+ # The standard list page size.
83
+ # @!attribute [rw] page_token
84
+ # @return [::String]
85
+ # The standard list page token.
86
+ # @!attribute [rw] return_partial_success
87
+ # @return [::Boolean]
88
+ # When set to `true`, operations that are reachable are returned as normal,
89
+ # and those that are unreachable are returned in the
90
+ # [ListOperationsResponse.unreachable] field.
91
+ #
92
+ # This can only be `true` when reading across collections e.g. when `parent`
93
+ # is set to `"projects/example/locations/-"`.
94
+ #
95
+ # This field is not by default supported and will result in an
96
+ # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
97
+ # service or product specific documentation.
98
+ class ListOperationsRequest
99
+ include ::Google::Protobuf::MessageExts
100
+ extend ::Google::Protobuf::MessageExts::ClassMethods
101
+ end
102
+
103
+ # The response message for
104
+ # Operations.ListOperations.
105
+ # @!attribute [rw] operations
106
+ # @return [::Array<::Google::Longrunning::Operation>]
107
+ # A list of operations that matches the specified filter in the request.
108
+ # @!attribute [rw] next_page_token
109
+ # @return [::String]
110
+ # The standard List next-page token.
111
+ # @!attribute [rw] unreachable
112
+ # @return [::Array<::String>]
113
+ # Unordered list. Unreachable resources. Populated when the request sets
114
+ # `ListOperationsRequest.return_partial_success` and reads across
115
+ # collections e.g. when attempting to list all resources across all supported
116
+ # locations.
117
+ class ListOperationsResponse
118
+ include ::Google::Protobuf::MessageExts
119
+ extend ::Google::Protobuf::MessageExts::ClassMethods
120
+ end
121
+
122
+ # The request message for
123
+ # Operations.CancelOperation.
124
+ # @!attribute [rw] name
125
+ # @return [::String]
126
+ # The name of the operation resource to be cancelled.
127
+ class CancelOperationRequest
128
+ include ::Google::Protobuf::MessageExts
129
+ extend ::Google::Protobuf::MessageExts::ClassMethods
130
+ end
131
+
132
+ # The request message for
133
+ # Operations.DeleteOperation.
134
+ # @!attribute [rw] name
135
+ # @return [::String]
136
+ # The name of the operation resource to be deleted.
137
+ class DeleteOperationRequest
138
+ include ::Google::Protobuf::MessageExts
139
+ extend ::Google::Protobuf::MessageExts::ClassMethods
140
+ end
141
+
142
+ # The request message for
143
+ # Operations.WaitOperation.
144
+ # @!attribute [rw] name
145
+ # @return [::String]
146
+ # The name of the operation resource to wait on.
147
+ # @!attribute [rw] timeout
148
+ # @return [::Google::Protobuf::Duration]
149
+ # The maximum duration to wait before timing out. If left blank, the wait
150
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
151
+ # If RPC context deadline is also specified, the shorter one will be used.
152
+ class WaitOperationRequest
153
+ include ::Google::Protobuf::MessageExts
154
+ extend ::Google::Protobuf::MessageExts::ClassMethods
155
+ end
156
+
157
+ # A message representing the message types used by a long-running operation.
158
+ #
159
+ # Example:
160
+ #
161
+ # rpc Export(ExportRequest) returns (google.longrunning.Operation) {
162
+ # option (google.longrunning.operation_info) = {
163
+ # response_type: "ExportResponse"
164
+ # metadata_type: "ExportMetadata"
165
+ # };
166
+ # }
167
+ # @!attribute [rw] response_type
168
+ # @return [::String]
169
+ # Required. The message name of the primary return type for this
170
+ # long-running operation.
171
+ # This type will be used to deserialize the LRO's response.
172
+ #
173
+ # If the response is in a different package from the rpc, a fully-qualified
174
+ # message name must be used (e.g. `google.protobuf.Struct`).
175
+ #
176
+ # Note: Altering this value constitutes a breaking change.
177
+ # @!attribute [rw] metadata_type
178
+ # @return [::String]
179
+ # Required. The message name of the metadata type for this long-running
180
+ # operation.
181
+ #
182
+ # If the response is in a different package from the rpc, a fully-qualified
183
+ # message name must be used (e.g. `google.protobuf.Struct`).
184
+ #
185
+ # Note: Altering this value constitutes a breaking change.
186
+ class OperationInfo
187
+ include ::Google::Protobuf::MessageExts
188
+ extend ::Google::Protobuf::MessageExts::ClassMethods
189
+ end
190
+ end
191
+ end
@@ -0,0 +1,145 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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. As of May 2023, there are no widely used type server
133
+ # implementations and no plans to implement one.
134
+ #
135
+ # Schemes other than `http`, `https` (or the empty scheme) might be
136
+ # used with implementation specific semantics.
137
+ # @!attribute [rw] value
138
+ # @return [::String]
139
+ # Must be a valid serialized protocol buffer of the above specified type.
140
+ class Any
141
+ include ::Google::Protobuf::MessageExts
142
+ extend ::Google::Protobuf::MessageExts::ClassMethods
143
+ end
144
+ end
145
+ end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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 2026 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