google-cloud-optimization-v1 0.2.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/google/cloud/optimization/v1/async_model_pb.rb +25 -37
- data/lib/google/cloud/optimization/v1/fleet_routing/client.rb +6 -6
- data/lib/google/cloud/optimization/v1/fleet_routing/operations.rb +14 -16
- data/lib/google/cloud/optimization/v1/fleet_routing/rest/client.rb +667 -0
- data/lib/google/cloud/optimization/v1/fleet_routing/rest/operations.rb +800 -0
- data/lib/google/cloud/optimization/v1/fleet_routing/rest/service_stub.rb +184 -0
- data/lib/google/cloud/optimization/v1/fleet_routing/rest.rb +68 -0
- data/lib/google/cloud/optimization/v1/fleet_routing.rb +6 -0
- data/lib/google/cloud/optimization/v1/fleet_routing_pb.rb +28 -402
- data/lib/google/cloud/optimization/v1/rest.rb +37 -0
- data/lib/google/cloud/optimization/v1/version.rb +1 -1
- data/lib/google/cloud/optimization/v1.rb +5 -0
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d5105a7ff65a35eda5d8335c7e639d43a1aea4ce12af5d5ac328f3ddd0d1201
|
4
|
+
data.tar.gz: bec629b610f6a31801baa408695b5c448d0131e36743de71063b78c26999427b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 818eab72d604a5473efc58e19435ab29406de4bf1591e540a11680871e4062f2979bdd6804cf06490288dd92c970330359de59ec1824888555a4dd38ea0cf9e2
|
7
|
+
data.tar.gz: 16a3125143d8cab7539fd6c90159625fe62e5f66f525309c2611413a7a8322f5a6a2600d7738772e44c829a684d0f8e16f9022e36e9313c4b810c6ffe75f3883
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the Cloud Optimization V1 API
|
2
2
|
|
3
|
-
API
|
3
|
+
Cloud Optimization API provides a portfolio of solvers to address common optimization use cases starting with optimal route planning for vehicle fleets.
|
4
4
|
|
5
5
|
Cloud Optimization API provides a portfolio of solvers to address common optimization use cases starting with optimal route planning for vehicle fleets.
|
6
6
|
|
@@ -47,7 +47,7 @@ for general usage information.
|
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
49
|
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
50
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
51
51
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
53
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/optimization/v1/async_model.proto
|
3
4
|
|
@@ -6,45 +7,32 @@ require 'google/protobuf'
|
|
6
7
|
require 'google/api/field_behavior_pb'
|
7
8
|
require 'google/protobuf/timestamp_pb'
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
optional :state_message, :string, 2
|
32
|
-
optional :create_time, :message, 3, "google.protobuf.Timestamp"
|
33
|
-
optional :update_time, :message, 4, "google.protobuf.Timestamp"
|
34
|
-
end
|
35
|
-
add_enum "google.cloud.optimization.v1.AsyncModelMetadata.State" do
|
36
|
-
value :STATE_UNSPECIFIED, 0
|
37
|
-
value :RUNNING, 1
|
38
|
-
value :SUCCEEDED, 2
|
39
|
-
value :CANCELLED, 3
|
40
|
-
value :FAILED, 4
|
41
|
-
end
|
42
|
-
add_enum "google.cloud.optimization.v1.DataFormat" do
|
43
|
-
value :DATA_FORMAT_UNSPECIFIED, 0
|
44
|
-
value :JSON, 1
|
45
|
-
value :STRING, 2
|
10
|
+
|
11
|
+
descriptor_data = "\n.google/cloud/optimization/v1/async_model.proto\x12\x1cgoogle.cloud.optimization.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x95\x01\n\x0bInputConfig\x12=\n\ngcs_source\x18\x01 \x01(\x0b\x32\'.google.cloud.optimization.v1.GcsSourceH\x00\x12=\n\x0b\x64\x61ta_format\x18\x02 \x01(\x0e\x32(.google.cloud.optimization.v1.DataFormatB\x08\n\x06source\"\xa5\x01\n\x0cOutputConfig\x12G\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32,.google.cloud.optimization.v1.GcsDestinationH\x00\x12=\n\x0b\x64\x61ta_format\x18\x02 \x01(\x0e\x32(.google.cloud.optimization.v1.DataFormatB\r\n\x0b\x64\x65stination\"\x1d\n\tGcsSource\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\"\n\x0eGcsDestination\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xab\x02\n\x12\x41syncModelMetadata\x12\x45\n\x05state\x18\x01 \x01(\x0e\x32\x36.google.cloud.optimization.v1.AsyncModelMetadata.State\x12\x15\n\rstate_message\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04*?\n\nDataFormat\x12\x1b\n\x17\x44\x41TA_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\n\n\x06STRING\x10\x02\x42{\n com.google.cloud.optimization.v1B\x0f\x41syncModelProtoP\x01ZDcloud.google.com/go/optimization/apiv1/optimizationpb;optimizationpbb\x06proto3"
|
12
|
+
|
13
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
|
+
|
15
|
+
begin
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
17
|
+
rescue TypeError => e
|
18
|
+
# Compatibility code: will be removed in the next major version.
|
19
|
+
require 'google/protobuf/descriptor_pb'
|
20
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
21
|
+
parsed.clear_dependency
|
22
|
+
serialized = parsed.class.encode(parsed)
|
23
|
+
file = pool.add_serialized_file(serialized)
|
24
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
25
|
+
imports = [
|
26
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
27
|
+
]
|
28
|
+
imports.each do |type_name, expected_filename|
|
29
|
+
import_file = pool.lookup(type_name).file_descriptor
|
30
|
+
if import_file.name != expected_filename
|
31
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
46
32
|
end
|
47
33
|
end
|
34
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
35
|
+
warn "This will become an error in the next major version."
|
48
36
|
end
|
49
37
|
|
50
38
|
module Google
|
@@ -523,14 +523,14 @@ module Google
|
|
523
523
|
# # Call the batch_optimize_tours method.
|
524
524
|
# result = client.batch_optimize_tours request
|
525
525
|
#
|
526
|
-
# # The returned object is of type Gapic::Operation. You can use
|
527
|
-
# #
|
528
|
-
# #
|
526
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
527
|
+
# # check the status of an operation, cancel it, or wait for results.
|
528
|
+
# # Here is how to wait for a response.
|
529
529
|
# result.wait_until_done! timeout: 60
|
530
530
|
# if result.response?
|
531
531
|
# p result.response
|
532
532
|
# else
|
533
|
-
# puts "
|
533
|
+
# puts "No response received."
|
534
534
|
# end
|
535
535
|
#
|
536
536
|
def batch_optimize_tours request, options = nil
|
@@ -613,9 +613,9 @@ module Google
|
|
613
613
|
# * (`String`) The path to a service account key file in JSON format
|
614
614
|
# * (`Hash`) A service account key as a Hash
|
615
615
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
616
|
-
# (see the [googleauth docs](https://
|
616
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
617
617
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
618
|
-
# (see the [signet docs](https://
|
618
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
619
619
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
620
620
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
621
621
|
# * (`nil`) indicating no credentials
|
@@ -158,13 +158,11 @@ module Google
|
|
158
158
|
# # Call the list_operations method.
|
159
159
|
# result = client.list_operations request
|
160
160
|
#
|
161
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
-
# #
|
163
|
-
#
|
164
|
-
# # methods are also available for managing paging directly.
|
165
|
-
# result.each do |response|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
162
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
163
|
+
# result.each do |item|
|
166
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
-
# p
|
165
|
+
# p item
|
168
166
|
# end
|
169
167
|
#
|
170
168
|
def list_operations request, options = nil
|
@@ -253,14 +251,14 @@ module Google
|
|
253
251
|
# # Call the get_operation method.
|
254
252
|
# result = client.get_operation request
|
255
253
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
254
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
255
|
+
# # check the status of an operation, cancel it, or wait for results.
|
256
|
+
# # Here is how to wait for a response.
|
259
257
|
# result.wait_until_done! timeout: 60
|
260
258
|
# if result.response?
|
261
259
|
# p result.response
|
262
260
|
# else
|
263
|
-
# puts "
|
261
|
+
# puts "No response received."
|
264
262
|
# end
|
265
263
|
#
|
266
264
|
def get_operation request, options = nil
|
@@ -540,14 +538,14 @@ module Google
|
|
540
538
|
# # Call the wait_operation method.
|
541
539
|
# result = client.wait_operation request
|
542
540
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
541
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
542
|
+
# # check the status of an operation, cancel it, or wait for results.
|
543
|
+
# # Here is how to wait for a response.
|
546
544
|
# result.wait_until_done! timeout: 60
|
547
545
|
# if result.response?
|
548
546
|
# p result.response
|
549
547
|
# else
|
550
|
-
# puts "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|
@@ -622,9 +620,9 @@ module Google
|
|
622
620
|
# * (`String`) The path to a service account key file in JSON format
|
623
621
|
# * (`Hash`) A service account key as a Hash
|
624
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
625
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
626
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
627
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
628
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
629
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
630
628
|
# * (`nil`) indicating no credentials
|