google-cloud-network_services-v1 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.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +144 -8
- data/lib/google/cloud/network_services/v1/bindings_override.rb +279 -0
- data/lib/google/cloud/network_services/v1/dep_service/client.rb +1503 -0
- data/lib/google/cloud/network_services/v1/dep_service/credentials.rb +47 -0
- data/lib/google/cloud/network_services/v1/dep_service/operations.rb +809 -0
- data/lib/google/cloud/network_services/v1/dep_service/paths.rb +88 -0
- data/lib/google/cloud/network_services/v1/dep_service/rest/client.rb +1414 -0
- data/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb +902 -0
- data/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb +663 -0
- data/lib/google/cloud/network_services/v1/dep_service/rest.rb +54 -0
- data/lib/google/cloud/network_services/v1/dep_service.rb +56 -0
- data/lib/google/cloud/network_services/v1/network_services/client.rb +4383 -0
- data/lib/google/cloud/network_services/v1/network_services/credentials.rb +47 -0
- data/lib/google/cloud/network_services/v1/network_services/operations.rb +809 -0
- data/lib/google/cloud/network_services/v1/network_services/paths.rb +278 -0
- data/lib/google/cloud/network_services/v1/network_services/rest/client.rb +4093 -0
- data/lib/google/cloud/network_services/v1/network_services/rest/operations.rb +902 -0
- data/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb +2385 -0
- data/lib/google/cloud/network_services/v1/network_services/rest.rb +52 -0
- data/lib/google/cloud/network_services/v1/network_services.rb +54 -0
- data/lib/google/cloud/network_services/v1/rest.rb +39 -0
- data/lib/google/cloud/network_services/v1/version.rb +7 -2
- data/lib/google/cloud/network_services/v1.rb +46 -0
- data/lib/google/cloud/networkservices/v1/common_pb.rb +51 -0
- data/lib/google/cloud/networkservices/v1/dep_pb.rb +75 -0
- data/lib/google/cloud/networkservices/v1/dep_services_pb.rb +64 -0
- data/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb +58 -0
- data/lib/google/cloud/networkservices/v1/gateway_pb.rb +56 -0
- data/lib/google/cloud/networkservices/v1/grpc_route_pb.rb +69 -0
- data/lib/google/cloud/networkservices/v1/http_route_pb.rb +74 -0
- data/lib/google/cloud/networkservices/v1/mesh_pb.rb +55 -0
- data/lib/google/cloud/networkservices/v1/network_services_pb.rb +53 -0
- data/lib/google/cloud/networkservices/v1/network_services_services_pb.rb +120 -0
- data/lib/google/cloud/networkservices/v1/service_binding_pb.rb +52 -0
- data/lib/google/cloud/networkservices/v1/tcp_route_pb.rb +59 -0
- data/lib/google/cloud/networkservices/v1/tls_route_pb.rb +59 -0
- data/lib/google-cloud-network_services-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +399 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/field_info.rb +65 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/networkservices/v1/common.rb +147 -0
- data/proto_docs/google/cloud/networkservices/v1/dep.rb +569 -0
- data/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb +194 -0
- data/proto_docs/google/cloud/networkservices/v1/gateway.rb +187 -0
- data/proto_docs/google/cloud/networkservices/v1/grpc_route.rb +430 -0
- data/proto_docs/google/cloud/networkservices/v1/http_route.rb +670 -0
- data/proto_docs/google/cloud/networkservices/v1/mesh.rb +155 -0
- data/proto_docs/google/cloud/networkservices/v1/service_binding.rb +131 -0
- data/proto_docs/google/cloud/networkservices/v1/tcp_route.rb +247 -0
- data/proto_docs/google/cloud/networkservices/v1/tls_route.rb +219 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +145 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +144 -10
@@ -0,0 +1,219 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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 V1
|
24
|
+
# TlsRoute defines how traffic should be routed based on SNI and other matching
|
25
|
+
# L3 attributes.
|
26
|
+
# @!attribute [rw] name
|
27
|
+
# @return [::String]
|
28
|
+
# Required. Name of the TlsRoute resource. It matches pattern
|
29
|
+
# `projects/*/locations/global/tlsRoutes/tls_route_name>`.
|
30
|
+
# @!attribute [r] self_link
|
31
|
+
# @return [::String]
|
32
|
+
# Output only. Server-defined URL of this resource
|
33
|
+
# @!attribute [r] create_time
|
34
|
+
# @return [::Google::Protobuf::Timestamp]
|
35
|
+
# Output only. The timestamp when the resource was created.
|
36
|
+
# @!attribute [r] update_time
|
37
|
+
# @return [::Google::Protobuf::Timestamp]
|
38
|
+
# Output only. The timestamp when the resource was updated.
|
39
|
+
# @!attribute [rw] description
|
40
|
+
# @return [::String]
|
41
|
+
# Optional. A free-text description of the resource. Max length 1024
|
42
|
+
# characters.
|
43
|
+
# @!attribute [rw] rules
|
44
|
+
# @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteRule>]
|
45
|
+
# Required. Rules that define how traffic is routed and handled. At least one
|
46
|
+
# RouteRule must be supplied. If there are multiple rules then the action
|
47
|
+
# taken will be the first rule to match.
|
48
|
+
# @!attribute [rw] meshes
|
49
|
+
# @return [::Array<::String>]
|
50
|
+
# Optional. Meshes defines a list of meshes this TlsRoute is attached to, as
|
51
|
+
# one of the routing rules to route the requests served by the mesh.
|
52
|
+
#
|
53
|
+
# Each mesh reference should match the pattern:
|
54
|
+
# `projects/*/locations/global/meshes/<mesh_name>`
|
55
|
+
#
|
56
|
+
# The attached Mesh should be of a type SIDECAR
|
57
|
+
# @!attribute [rw] gateways
|
58
|
+
# @return [::Array<::String>]
|
59
|
+
# Optional. Gateways defines a list of gateways this TlsRoute is attached to,
|
60
|
+
# as one of the routing rules to route the requests served by the gateway.
|
61
|
+
#
|
62
|
+
# Each gateway reference should match the pattern:
|
63
|
+
# `projects/*/locations/global/gateways/<gateway_name>`
|
64
|
+
class TlsRoute
|
65
|
+
include ::Google::Protobuf::MessageExts
|
66
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
67
|
+
|
68
|
+
# Specifies how to match traffic and how to route traffic when traffic is
|
69
|
+
# matched.
|
70
|
+
# @!attribute [rw] matches
|
71
|
+
# @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteMatch>]
|
72
|
+
# Required. RouteMatch defines the predicate used to match requests to a
|
73
|
+
# given action. Multiple match types are "OR"ed for evaluation.
|
74
|
+
# @!attribute [rw] action
|
75
|
+
# @return [::Google::Cloud::NetworkServices::V1::TlsRoute::RouteAction]
|
76
|
+
# Required. The detailed rule defining how to route matched traffic.
|
77
|
+
class RouteRule
|
78
|
+
include ::Google::Protobuf::MessageExts
|
79
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
80
|
+
end
|
81
|
+
|
82
|
+
# RouteMatch defines the predicate used to match requests to a given action.
|
83
|
+
# Multiple match types are "AND"ed for evaluation.
|
84
|
+
# If no routeMatch field is specified, this rule will unconditionally match
|
85
|
+
# traffic.
|
86
|
+
# @!attribute [rw] sni_host
|
87
|
+
# @return [::Array<::String>]
|
88
|
+
# Optional. SNI (server name indicator) to match against.
|
89
|
+
# SNI will be matched against all wildcard domains, i.e. `www.example.com`
|
90
|
+
# will be first matched against `www.example.com`, then `*.example.com`,
|
91
|
+
# then `*.com.`
|
92
|
+
# Partial wildcards are not supported, and values like *w.example.com are
|
93
|
+
# invalid.
|
94
|
+
# At least one of sni_host and alpn is required.
|
95
|
+
# Up to 5 sni hosts across all matches can be set.
|
96
|
+
# @!attribute [rw] alpn
|
97
|
+
# @return [::Array<::String>]
|
98
|
+
# Optional. ALPN (Application-Layer Protocol Negotiation) to match against.
|
99
|
+
# Examples: "http/1.1", "h2".
|
100
|
+
# At least one of sni_host and alpn is required.
|
101
|
+
# Up to 5 alpns across all matches can be set.
|
102
|
+
class RouteMatch
|
103
|
+
include ::Google::Protobuf::MessageExts
|
104
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
105
|
+
end
|
106
|
+
|
107
|
+
# The specifications for routing traffic and applying associated policies.
|
108
|
+
# @!attribute [rw] destinations
|
109
|
+
# @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteDestination>]
|
110
|
+
# Required. The destination services to which traffic should be forwarded.
|
111
|
+
# At least one destination service is required.
|
112
|
+
class RouteAction
|
113
|
+
include ::Google::Protobuf::MessageExts
|
114
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
115
|
+
end
|
116
|
+
|
117
|
+
# Describe the destination for traffic to be routed to.
|
118
|
+
# @!attribute [rw] service_name
|
119
|
+
# @return [::String]
|
120
|
+
# Required. The URL of a BackendService to route traffic to.
|
121
|
+
# @!attribute [rw] weight
|
122
|
+
# @return [::Integer]
|
123
|
+
# Optional. Specifies the proportion of requests forwareded to the backend
|
124
|
+
# referenced by the service_name field. This is computed as:
|
125
|
+
# - weight/Sum(weights in destinations)
|
126
|
+
# Weights in all destinations does not need to sum up to 100.
|
127
|
+
class RouteDestination
|
128
|
+
include ::Google::Protobuf::MessageExts
|
129
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
# Request used with the ListTlsRoutes method.
|
134
|
+
# @!attribute [rw] parent
|
135
|
+
# @return [::String]
|
136
|
+
# Required. The project and location from which the TlsRoutes should be
|
137
|
+
# listed, specified in the format `projects/*/locations/global`.
|
138
|
+
# @!attribute [rw] page_size
|
139
|
+
# @return [::Integer]
|
140
|
+
# Maximum number of TlsRoutes to return per call.
|
141
|
+
# @!attribute [rw] page_token
|
142
|
+
# @return [::String]
|
143
|
+
# The value returned by the last `ListTlsRoutesResponse`
|
144
|
+
# Indicates that this is a continuation of a prior `ListTlsRoutes` call,
|
145
|
+
# and that the system should return the next page of data.
|
146
|
+
class ListTlsRoutesRequest
|
147
|
+
include ::Google::Protobuf::MessageExts
|
148
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
149
|
+
end
|
150
|
+
|
151
|
+
# Response returned by the ListTlsRoutes method.
|
152
|
+
# @!attribute [rw] tls_routes
|
153
|
+
# @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute>]
|
154
|
+
# List of TlsRoute resources.
|
155
|
+
# @!attribute [rw] next_page_token
|
156
|
+
# @return [::String]
|
157
|
+
# If there might be more results than those appearing in this response, then
|
158
|
+
# `next_page_token` is included. To get the next set of results, call this
|
159
|
+
# method again using the value of `next_page_token` as `page_token`.
|
160
|
+
class ListTlsRoutesResponse
|
161
|
+
include ::Google::Protobuf::MessageExts
|
162
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
163
|
+
end
|
164
|
+
|
165
|
+
# Request used by the GetTlsRoute method.
|
166
|
+
# @!attribute [rw] name
|
167
|
+
# @return [::String]
|
168
|
+
# Required. A name of the TlsRoute to get. Must be in the format
|
169
|
+
# `projects/*/locations/global/tlsRoutes/*`.
|
170
|
+
class GetTlsRouteRequest
|
171
|
+
include ::Google::Protobuf::MessageExts
|
172
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
173
|
+
end
|
174
|
+
|
175
|
+
# Request used by the TlsRoute method.
|
176
|
+
# @!attribute [rw] parent
|
177
|
+
# @return [::String]
|
178
|
+
# Required. The parent resource of the TlsRoute. Must be in the
|
179
|
+
# format `projects/*/locations/global`.
|
180
|
+
# @!attribute [rw] tls_route_id
|
181
|
+
# @return [::String]
|
182
|
+
# Required. Short name of the TlsRoute resource to be created.
|
183
|
+
# @!attribute [rw] tls_route
|
184
|
+
# @return [::Google::Cloud::NetworkServices::V1::TlsRoute]
|
185
|
+
# Required. TlsRoute resource to be created.
|
186
|
+
class CreateTlsRouteRequest
|
187
|
+
include ::Google::Protobuf::MessageExts
|
188
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
189
|
+
end
|
190
|
+
|
191
|
+
# Request used by the UpdateTlsRoute method.
|
192
|
+
# @!attribute [rw] update_mask
|
193
|
+
# @return [::Google::Protobuf::FieldMask]
|
194
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
195
|
+
# TlsRoute resource by the update.
|
196
|
+
# The fields specified in the update_mask are relative to the resource, not
|
197
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
198
|
+
# user does not provide a mask then all fields will be overwritten.
|
199
|
+
# @!attribute [rw] tls_route
|
200
|
+
# @return [::Google::Cloud::NetworkServices::V1::TlsRoute]
|
201
|
+
# Required. Updated TlsRoute resource.
|
202
|
+
class UpdateTlsRouteRequest
|
203
|
+
include ::Google::Protobuf::MessageExts
|
204
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
205
|
+
end
|
206
|
+
|
207
|
+
# Request used by the DeleteTlsRoute method.
|
208
|
+
# @!attribute [rw] name
|
209
|
+
# @return [::String]
|
210
|
+
# Required. A name of the TlsRoute to delete. Must be in the format
|
211
|
+
# `projects/*/locations/global/tlsRoutes/*`.
|
212
|
+
class DeleteTlsRouteRequest
|
213
|
+
include ::Google::Protobuf::MessageExts
|
214
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
@@ -0,0 +1,164 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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,145 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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 2024 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 2024 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
|