google-cloud-redis-v1beta1 0.1.1 → 0.2.4

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: eb2ec5c9386de7c735110e11e89c510f587f27777e1a27def923a30523bea94a
4
- data.tar.gz: fbfd4d89050020e8971db2854d654651e0dd217a5f381aaf58509a1633feb99e
3
+ metadata.gz: b86474ab04d80fe11baed3a76f0f5346df021f4e2bc7bb5b19fbd06d088a3234
4
+ data.tar.gz: 97c4f4e29bf127a9e2ad1f72e93a4b667d31751f570f113f5a1477017fe05708
5
5
  SHA512:
6
- metadata.gz: 5ee40e76cf8671c4f8d10129c286f743eef1aa866b2c93dc9ce51e7d7bbff6af02479506032da5f05676444d5e1bfd7002c02b4c7a43a64a987eabeec5b380f6
7
- data.tar.gz: 62f49116b6afe316952eca986badc45cb3576c59ac45484e5aa039578df1ae1ac013bed3e380a5fdff34b39e4efb901010ac4f79770984eedfc2ea8944128b20
6
+ metadata.gz: 1f497bc302d115dccf0d0615fcab63bc6eb0123872641e413ff6a4e4ff130a36ecf0f74f06b82525b480d1dd6695962e83d2309800da861044a7518b985d2d08
7
+ data.tar.gz: 83cda696f3da103d6b19eaceca1838b6c88291f040af6f3b9eef11c63ce12ddb2c2204d55728104a3db63204d797c48ac5245e60403c796b82d593e3e7d69588
data/README.md CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
18
18
 
19
19
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
20
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/redis.googleapis.com)
21
22
  1. {file:AUTHENTICATION.md Set up authentication.}
22
23
 
23
24
  ## Quick Start
@@ -33,6 +34,9 @@ response = client.list_instances request
33
34
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-redis-v1beta1/latest)
34
35
  for class and method documentation.
35
36
 
37
+ See also the [Product Documentation](https://cloud.google.com/memorystore/docs/redis)
38
+ for general usage information.
39
+
36
40
  ## Enabling Logging
37
41
 
38
42
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
@@ -162,7 +162,8 @@ module Google
162
162
  if credentials.is_a?(String) || credentials.is_a?(Hash)
163
163
  credentials = Credentials.new credentials, scope: @config.scope
164
164
  end
165
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
165
+ @quota_project_id = @config.quota_project
166
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
166
167
 
167
168
  @operations_client = Operations.new do |config|
168
169
  config.credentials = credentials
@@ -347,7 +348,7 @@ module Google
347
348
  # Creates a Redis instance based on the specified tier and memory size.
348
349
  #
349
350
  # By default, the instance is accessible from the project's
350
- # [default network](/compute/docs/networks-and-firewalls#networks).
351
+ # [default network](https://cloud.google.com/vpc/docs/vpc).
351
352
  #
352
353
  # The creation is executed asynchronously and callers may check the returned
353
354
  # operation to track its progress. Once the operation is completed the Redis
@@ -960,24 +961,28 @@ module Google
960
961
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
961
962
  # trigger a retry.
962
963
  # @return [::Hash]
964
+ # @!attribute [rw] quota_project
965
+ # A separate project against which to charge quota.
966
+ # @return [::String]
963
967
  #
964
968
  class Configuration
965
969
  extend ::Gapic::Config
966
970
 
967
- config_attr :endpoint, "redis.googleapis.com", String
968
- config_attr :credentials, nil do |value|
971
+ config_attr :endpoint, "redis.googleapis.com", ::String
972
+ config_attr :credentials, nil do |value|
969
973
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
970
974
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
971
975
  allowed.any? { |klass| klass === value }
972
976
  end
973
- config_attr :scope, nil, ::String, ::Array, nil
974
- config_attr :lib_name, nil, ::String, nil
975
- config_attr :lib_version, nil, ::String, nil
976
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
977
- config_attr :interceptors, nil, ::Array, nil
978
- config_attr :timeout, nil, ::Numeric, nil
979
- config_attr :metadata, nil, ::Hash, nil
980
- config_attr :retry_policy, nil, ::Hash, Proc, nil
977
+ config_attr :scope, nil, ::String, ::Array, nil
978
+ config_attr :lib_name, nil, ::String, nil
979
+ config_attr :lib_version, nil, ::String, nil
980
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
981
+ config_attr :interceptors, nil, ::Array, nil
982
+ config_attr :timeout, nil, ::Numeric, nil
983
+ config_attr :metadata, nil, ::Hash, nil
984
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
985
+ config_attr :quota_project, nil, ::String, nil
981
986
 
982
987
  # @private
983
988
  def initialize parent_config = nil
@@ -993,7 +998,7 @@ module Google
993
998
  def rpcs
994
999
  @rpcs ||= begin
995
1000
  parent_rpcs = nil
996
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
1001
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
997
1002
  Rpcs.new parent_rpcs
998
1003
  end
999
1004
  end
@@ -85,6 +85,8 @@ module Google
85
85
  if credentials.is_a?(String) || credentials.is_a?(Hash)
86
86
  credentials = Credentials.new credentials, scope: @config.scope
87
87
  end
88
+ @quota_project_id = @config.quota_project
89
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
88
90
 
89
91
  @operations_stub = ::Gapic::ServiceStub.new(
90
92
  ::Google::Longrunning::Operations::Stub,
@@ -464,24 +466,28 @@ module Google
464
466
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
465
467
  # trigger a retry.
466
468
  # @return [::Hash]
469
+ # @!attribute [rw] quota_project
470
+ # A separate project against which to charge quota.
471
+ # @return [::String]
467
472
  #
468
473
  class Configuration
469
474
  extend ::Gapic::Config
470
475
 
471
- config_attr :endpoint, "redis.googleapis.com", String
472
- config_attr :credentials, nil do |value|
476
+ config_attr :endpoint, "redis.googleapis.com", ::String
477
+ config_attr :credentials, nil do |value|
473
478
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
474
479
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
475
480
  allowed.any? { |klass| klass === value }
476
481
  end
477
- config_attr :scope, nil, ::String, ::Array, nil
478
- config_attr :lib_name, nil, ::String, nil
479
- config_attr :lib_version, nil, ::String, nil
480
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
481
- config_attr :interceptors, nil, ::Array, nil
482
- config_attr :timeout, nil, ::Numeric, nil
483
- config_attr :metadata, nil, ::Hash, nil
484
- config_attr :retry_policy, nil, ::Hash, Proc, nil
482
+ config_attr :scope, nil, ::String, ::Array, nil
483
+ config_attr :lib_name, nil, ::String, nil
484
+ config_attr :lib_version, nil, ::String, nil
485
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
486
+ config_attr :interceptors, nil, ::Array, nil
487
+ config_attr :timeout, nil, ::Numeric, nil
488
+ config_attr :metadata, nil, ::Hash, nil
489
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
490
+ config_attr :quota_project, nil, ::String, nil
485
491
 
486
492
  # @private
487
493
  def initialize parent_config = nil
@@ -497,7 +503,7 @@ module Google
497
503
  def rpcs
498
504
  @rpcs ||= begin
499
505
  parent_rpcs = nil
500
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
506
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
501
507
  Rpcs.new parent_rpcs
502
508
  end
503
509
  end
@@ -56,13 +56,13 @@ module Google
56
56
  #
57
57
  # If `location_id` is specified as `-` (wildcard), then all regions
58
58
  # available to the project are queried, and the results are aggregated.
59
- rpc :ListInstances, ListInstancesRequest, ListInstancesResponse
59
+ rpc :ListInstances, Google::Cloud::Redis::V1beta1::ListInstancesRequest, Google::Cloud::Redis::V1beta1::ListInstancesResponse
60
60
  # Gets the details of a specific Redis instance.
61
- rpc :GetInstance, GetInstanceRequest, Instance
61
+ rpc :GetInstance, Google::Cloud::Redis::V1beta1::GetInstanceRequest, Google::Cloud::Redis::V1beta1::Instance
62
62
  # Creates a Redis instance based on the specified tier and memory size.
63
63
  #
64
64
  # By default, the instance is accessible from the project's
65
- # [default network](/compute/docs/networks-and-firewalls#networks).
65
+ # [default network](https://cloud.google.com/vpc/docs/vpc).
66
66
  #
67
67
  # The creation is executed asynchronously and callers may check the returned
68
68
  # operation to track its progress. Once the operation is completed the Redis
@@ -71,16 +71,16 @@ module Google
71
71
  #
72
72
  # The returned operation is automatically deleted after a few hours, so there
73
73
  # is no need to call DeleteOperation.
74
- rpc :CreateInstance, CreateInstanceRequest, Google::Longrunning::Operation
74
+ rpc :CreateInstance, Google::Cloud::Redis::V1beta1::CreateInstanceRequest, Google::Longrunning::Operation
75
75
  # Updates the metadata and configuration of a specific Redis instance.
76
76
  #
77
77
  # Completed longrunning.Operation will contain the new instance object
78
78
  # in the response field. The returned operation is automatically deleted
79
79
  # after a few hours, so there is no need to call DeleteOperation.
80
- rpc :UpdateInstance, UpdateInstanceRequest, Google::Longrunning::Operation
80
+ rpc :UpdateInstance, Google::Cloud::Redis::V1beta1::UpdateInstanceRequest, Google::Longrunning::Operation
81
81
  # Upgrades Redis instance to the newer Redis version specified in the
82
82
  # request.
83
- rpc :UpgradeInstance, UpgradeInstanceRequest, Google::Longrunning::Operation
83
+ rpc :UpgradeInstance, Google::Cloud::Redis::V1beta1::UpgradeInstanceRequest, Google::Longrunning::Operation
84
84
  # Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.
85
85
  #
86
86
  # Redis may stop serving during this operation. Instance state will be
@@ -89,20 +89,20 @@ module Google
89
89
  #
90
90
  # The returned operation is automatically deleted after a few hours, so
91
91
  # there is no need to call DeleteOperation.
92
- rpc :ImportInstance, ImportInstanceRequest, Google::Longrunning::Operation
92
+ rpc :ImportInstance, Google::Cloud::Redis::V1beta1::ImportInstanceRequest, Google::Longrunning::Operation
93
93
  # Export Redis instance data into a Redis RDB format file in Cloud Storage.
94
94
  #
95
95
  # Redis will continue serving during this operation.
96
96
  #
97
97
  # The returned operation is automatically deleted after a few hours, so
98
98
  # there is no need to call DeleteOperation.
99
- rpc :ExportInstance, ExportInstanceRequest, Google::Longrunning::Operation
99
+ rpc :ExportInstance, Google::Cloud::Redis::V1beta1::ExportInstanceRequest, Google::Longrunning::Operation
100
100
  # Initiates a failover of the master node to current replica node for a
101
101
  # specific STANDARD tier Cloud Memorystore for Redis instance.
102
- rpc :FailoverInstance, FailoverInstanceRequest, Google::Longrunning::Operation
102
+ rpc :FailoverInstance, Google::Cloud::Redis::V1beta1::FailoverInstanceRequest, Google::Longrunning::Operation
103
103
  # Deletes a specific Redis instance. Instance stops serving and data is
104
104
  # deleted.
105
- rpc :DeleteInstance, DeleteInstanceRequest, Google::Longrunning::Operation
105
+ rpc :DeleteInstance, Google::Cloud::Redis::V1beta1::DeleteInstanceRequest, Google::Longrunning::Operation
106
106
  end
107
107
 
108
108
  Stub = Service.rpc_stub_class
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Redis
23
23
  module V1beta1
24
- VERSION = "0.1.1"
24
+ VERSION = "0.2.4"
25
25
  end
26
26
  end
27
27
  end
@@ -121,7 +121,7 @@ module Google
121
121
  # @!attribute [rw] authorized_network
122
122
  # @return [::String]
123
123
  # Optional. The full name of the Google Compute Engine
124
- # [network](/compute/docs/networks-and-firewalls#networks) to which the
124
+ # [network](https://cloud.google.com/vpc/docs/vpc) to which the
125
125
  # instance is connected. If left unspecified, the `default` network
126
126
  # will be used.
127
127
  # @!attribute [r] persistence_iam_identity
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-redis-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-05 00:00:00.000000000 Z
11
+ date: 2020-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.2'
19
+ version: '0.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.2'
26
+ version: '0.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-errors
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,42 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.10'
61
+ version: '5.14'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '5.10'
68
+ version: '5.14'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest-focus
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.1'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest-rg
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '5.2'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '5.2'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: rake
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -133,7 +161,6 @@ files:
133
161
  - LICENSE.md
134
162
  - README.md
135
163
  - lib/google-cloud-redis-v1beta1.rb
136
- - lib/google/cloud/common_resources_pb.rb
137
164
  - lib/google/cloud/redis/v1beta1.rb
138
165
  - lib/google/cloud/redis/v1beta1/cloud_redis.rb
139
166
  - lib/google/cloud/redis/v1beta1/cloud_redis/client.rb
@@ -172,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
199
  - !ruby/object:Gem::Version
173
200
  version: '0'
174
201
  requirements: []
175
- rubygems_version: 3.0.6
202
+ rubygems_version: 3.1.3
176
203
  signing_key:
177
204
  specification_version: 4
178
205
  summary: API Client library for the Google Cloud Memorystore for Redis V1beta1 API
@@ -1,15 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/common_resources.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'google/api/resource_pb'
7
- Google::Protobuf::DescriptorPool.generated_pool.build do
8
- add_file("google/cloud/common_resources.proto", :syntax => :proto3) do
9
- end
10
- end
11
-
12
- module Google
13
- module Cloud
14
- end
15
- end