google-cloud-optimization-v1 0.2.1 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ac82c37ecc533c487dd72f257fe0f4d6fae62b359c115b9be1f1da1066a6dad
4
- data.tar.gz: 503eb6adf63fd19cfacd9b974b4d1aeb6d0184da9af28d9cde6712a8961a60d9
3
+ metadata.gz: 1d5105a7ff65a35eda5d8335c7e639d43a1aea4ce12af5d5ac328f3ddd0d1201
4
+ data.tar.gz: bec629b610f6a31801baa408695b5c448d0131e36743de71063b78c26999427b
5
5
  SHA512:
6
- metadata.gz: 5c75c03e9ae8f585ad99c3f7daa77300527d567b6584028f0e0c325cd057e478b7c4b647f5527571e0a746d9bd44e8e352e6e615a3ae35ccf113753851cdf919
7
- data.tar.gz: 35a96c8bf720fc1245b5da3d86d8ec4ffd44adcf1a0fa268ea2064baf2ccc60f13ef26e55591d024da74a08ceacb30a753a0cb145040dcc1823551003acef0b6
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 Client library for the Cloud Optimization V1 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://googleapis.dev/ruby/google-cloud-logging/latest)
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
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("google/cloud/optimization/v1/async_model.proto", :syntax => :proto3) do
11
- add_message "google.cloud.optimization.v1.InputConfig" do
12
- optional :data_format, :enum, 2, "google.cloud.optimization.v1.DataFormat"
13
- oneof :source do
14
- optional :gcs_source, :message, 1, "google.cloud.optimization.v1.GcsSource"
15
- end
16
- end
17
- add_message "google.cloud.optimization.v1.OutputConfig" do
18
- optional :data_format, :enum, 2, "google.cloud.optimization.v1.DataFormat"
19
- oneof :destination do
20
- optional :gcs_destination, :message, 1, "google.cloud.optimization.v1.GcsDestination"
21
- end
22
- end
23
- add_message "google.cloud.optimization.v1.GcsSource" do
24
- optional :uri, :string, 1
25
- end
26
- add_message "google.cloud.optimization.v1.GcsDestination" do
27
- optional :uri, :string, 1
28
- end
29
- add_message "google.cloud.optimization.v1.AsyncModelMetadata" do
30
- optional :state, :enum, 1, "google.cloud.optimization.v1.AsyncModelMetadata.State"
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 this
527
- # # object to check the status of an operation, cancel it, or wait
528
- # # for results. Here is how to block until completion:
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 "Error!"
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://googleapis.dev/ruby/googleauth/latest/index.html))
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://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
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
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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 this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
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 "Error!"
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 this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
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 "Error!"
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://googleapis.dev/ruby/googleauth/latest/index.html))
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://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
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