google-cloud-pubsub-v1 0.3.0 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -82,7 +82,7 @@ module Google
82
82
  parent_config = while namespace.any?
83
83
  parent_name = namespace.join "::"
84
84
  parent_const = const_get parent_name
85
- break parent_const.configure if parent_const&.respond_to? :configure
85
+ break parent_const.configure if parent_const.respond_to? :configure
86
86
  namespace.pop
87
87
  end
88
88
  default_config = Client::Configuration.new parent_config
@@ -153,9 +153,9 @@ module Google
153
153
  enable_self_signed_jwt = @config.scope == Client.configure.scope &&
154
154
  @config.endpoint == Client.configure.endpoint &&
155
155
  !@config.endpoint.split(".").first.include?("-")
156
- credentials ||= Credentials.default scope: @config.scope,
156
+ credentials ||= Credentials.default scope: @config.scope,
157
157
  enable_self_signed_jwt: enable_self_signed_jwt
158
- if credentials.is_a?(String) || credentials.is_a?(Hash)
158
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
159
159
  credentials = Credentials.new credentials, scope: @config.scope
160
160
  end
161
161
  @quota_project_id = @config.quota_project
@@ -487,7 +487,7 @@ module Google
487
487
  config_attr :scope, nil, ::String, ::Array, nil
488
488
  config_attr :lib_name, nil, ::String, nil
489
489
  config_attr :lib_version, nil, ::String, nil
490
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
490
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
491
491
  config_attr :interceptors, nil, ::Array, nil
492
492
  config_attr :timeout, nil, ::Numeric, nil
493
493
  config_attr :metadata, nil, ::Hash, nil
@@ -508,7 +508,7 @@ module Google
508
508
  def rpcs
509
509
  @rpcs ||= begin
510
510
  parent_rpcs = nil
511
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
511
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
512
512
  Rpcs.new parent_rpcs
513
513
  end
514
514
  end
@@ -549,11 +549,11 @@ module Google
549
549
 
550
550
  # @private
551
551
  def initialize parent_rpcs = nil
552
- set_iam_policy_config = parent_rpcs&.set_iam_policy if parent_rpcs&.respond_to? :set_iam_policy
552
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
553
553
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
554
- get_iam_policy_config = parent_rpcs&.get_iam_policy if parent_rpcs&.respond_to? :get_iam_policy
554
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
555
555
  @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
556
- test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions
556
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
557
557
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
558
558
 
559
559
  yield self if block_given?
@@ -61,81 +61,54 @@ module Google
61
61
  parent_config = while namespace.any?
62
62
  parent_name = namespace.join "::"
63
63
  parent_const = const_get parent_name
64
- break parent_const.configure if parent_const&.respond_to? :configure
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
65
  namespace.pop
66
66
  end
67
67
  default_config = Client::Configuration.new parent_config
68
68
 
69
69
  default_config.rpcs.create_topic.timeout = 60.0
70
70
  default_config.rpcs.create_topic.retry_policy = {
71
- initial_delay: 0.1,
72
- max_delay: 60.0,
73
- multiplier: 1.3,
74
- retry_codes: [14]
71
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
75
72
  }
76
73
 
77
74
  default_config.rpcs.update_topic.timeout = 60.0
78
75
  default_config.rpcs.update_topic.retry_policy = {
79
- initial_delay: 0.1,
80
- max_delay: 60.0,
81
- multiplier: 1.3,
82
- retry_codes: [14]
76
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
83
77
  }
84
78
 
85
79
  default_config.rpcs.publish.timeout = 60.0
86
80
  default_config.rpcs.publish.retry_policy = {
87
- initial_delay: 0.1,
88
- max_delay: 60.0,
89
- multiplier: 1.3,
90
- retry_codes: [10, 1, 13, 8, 2, 14, 4]
81
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 13, 8, 2, 14, 4]
91
82
  }
92
83
 
93
84
  default_config.rpcs.get_topic.timeout = 60.0
94
85
  default_config.rpcs.get_topic.retry_policy = {
95
- initial_delay: 0.1,
96
- max_delay: 60.0,
97
- multiplier: 1.3,
98
- retry_codes: [2, 10, 14]
86
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
99
87
  }
100
88
 
101
89
  default_config.rpcs.list_topics.timeout = 60.0
102
90
  default_config.rpcs.list_topics.retry_policy = {
103
- initial_delay: 0.1,
104
- max_delay: 60.0,
105
- multiplier: 1.3,
106
- retry_codes: [2, 10, 14]
91
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
107
92
  }
108
93
 
109
94
  default_config.rpcs.list_topic_subscriptions.timeout = 60.0
110
95
  default_config.rpcs.list_topic_subscriptions.retry_policy = {
111
- initial_delay: 0.1,
112
- max_delay: 60.0,
113
- multiplier: 1.3,
114
- retry_codes: [2, 10, 14]
96
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
115
97
  }
116
98
 
117
99
  default_config.rpcs.list_topic_snapshots.timeout = 60.0
118
100
  default_config.rpcs.list_topic_snapshots.retry_policy = {
119
- initial_delay: 0.1,
120
- max_delay: 60.0,
121
- multiplier: 1.3,
122
- retry_codes: [2, 10, 14]
101
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
123
102
  }
124
103
 
125
104
  default_config.rpcs.delete_topic.timeout = 60.0
126
105
  default_config.rpcs.delete_topic.retry_policy = {
127
- initial_delay: 0.1,
128
- max_delay: 60.0,
129
- multiplier: 1.3,
130
- retry_codes: [14]
106
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
131
107
  }
132
108
 
133
109
  default_config.rpcs.detach_subscription.timeout = 60.0
134
110
  default_config.rpcs.detach_subscription.retry_policy = {
135
- initial_delay: 0.1,
136
- max_delay: 60.0,
137
- multiplier: 1.3,
138
- retry_codes: [14]
111
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
139
112
  }
140
113
 
141
114
  default_config
@@ -204,9 +177,9 @@ module Google
204
177
  enable_self_signed_jwt = @config.scope == Client.configure.scope &&
205
178
  @config.endpoint == Client.configure.endpoint &&
206
179
  !@config.endpoint.split(".").first.include?("-")
207
- credentials ||= Credentials.default scope: @config.scope,
180
+ credentials ||= Credentials.default scope: @config.scope,
208
181
  enable_self_signed_jwt: enable_self_signed_jwt
209
- if credentials.is_a?(String) || credentials.is_a?(Hash)
182
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
210
183
  credentials = Credentials.new credentials, scope: @config.scope
211
184
  end
212
185
  @quota_project_id = @config.quota_project
@@ -263,8 +236,6 @@ module Google
263
236
  # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
264
237
  # @param schema_settings [::Google::Cloud::PubSub::V1::SchemaSettings, ::Hash]
265
238
  # Settings for validating messages published against a schema.
266
- #
267
- # EXPERIMENTAL: Schema support is in development and may not work yet.
268
239
  # @param satisfies_pzs [::Boolean]
269
240
  # Reserved for future use. This field is set only in responses from the
270
241
  # server; it is ignored if it is set in any requests.
@@ -981,7 +952,7 @@ module Google
981
952
  config_attr :scope, nil, ::String, ::Array, nil
982
953
  config_attr :lib_name, nil, ::String, nil
983
954
  config_attr :lib_version, nil, ::String, nil
984
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
955
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
985
956
  config_attr :interceptors, nil, ::Array, nil
986
957
  config_attr :timeout, nil, ::Numeric, nil
987
958
  config_attr :metadata, nil, ::Hash, nil
@@ -1002,7 +973,7 @@ module Google
1002
973
  def rpcs
1003
974
  @rpcs ||= begin
1004
975
  parent_rpcs = nil
1005
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
976
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1006
977
  Rpcs.new parent_rpcs
1007
978
  end
1008
979
  end
@@ -1073,23 +1044,23 @@ module Google
1073
1044
 
1074
1045
  # @private
1075
1046
  def initialize parent_rpcs = nil
1076
- create_topic_config = parent_rpcs&.create_topic if parent_rpcs&.respond_to? :create_topic
1047
+ create_topic_config = parent_rpcs.create_topic if parent_rpcs.respond_to? :create_topic
1077
1048
  @create_topic = ::Gapic::Config::Method.new create_topic_config
1078
- update_topic_config = parent_rpcs&.update_topic if parent_rpcs&.respond_to? :update_topic
1049
+ update_topic_config = parent_rpcs.update_topic if parent_rpcs.respond_to? :update_topic
1079
1050
  @update_topic = ::Gapic::Config::Method.new update_topic_config
1080
- publish_config = parent_rpcs&.publish if parent_rpcs&.respond_to? :publish
1051
+ publish_config = parent_rpcs.publish if parent_rpcs.respond_to? :publish
1081
1052
  @publish = ::Gapic::Config::Method.new publish_config
1082
- get_topic_config = parent_rpcs&.get_topic if parent_rpcs&.respond_to? :get_topic
1053
+ get_topic_config = parent_rpcs.get_topic if parent_rpcs.respond_to? :get_topic
1083
1054
  @get_topic = ::Gapic::Config::Method.new get_topic_config
1084
- list_topics_config = parent_rpcs&.list_topics if parent_rpcs&.respond_to? :list_topics
1055
+ list_topics_config = parent_rpcs.list_topics if parent_rpcs.respond_to? :list_topics
1085
1056
  @list_topics = ::Gapic::Config::Method.new list_topics_config
1086
- list_topic_subscriptions_config = parent_rpcs&.list_topic_subscriptions if parent_rpcs&.respond_to? :list_topic_subscriptions
1057
+ list_topic_subscriptions_config = parent_rpcs.list_topic_subscriptions if parent_rpcs.respond_to? :list_topic_subscriptions
1087
1058
  @list_topic_subscriptions = ::Gapic::Config::Method.new list_topic_subscriptions_config
1088
- list_topic_snapshots_config = parent_rpcs&.list_topic_snapshots if parent_rpcs&.respond_to? :list_topic_snapshots
1059
+ list_topic_snapshots_config = parent_rpcs.list_topic_snapshots if parent_rpcs.respond_to? :list_topic_snapshots
1089
1060
  @list_topic_snapshots = ::Gapic::Config::Method.new list_topic_snapshots_config
1090
- delete_topic_config = parent_rpcs&.delete_topic if parent_rpcs&.respond_to? :delete_topic
1061
+ delete_topic_config = parent_rpcs.delete_topic if parent_rpcs.respond_to? :delete_topic
1091
1062
  @delete_topic = ::Gapic::Config::Method.new delete_topic_config
1092
- detach_subscription_config = parent_rpcs&.detach_subscription if parent_rpcs&.respond_to? :detach_subscription
1063
+ detach_subscription_config = parent_rpcs.detach_subscription if parent_rpcs.respond_to? :detach_subscription
1093
1064
  @detach_subscription = ::Gapic::Config::Method.new detach_subscription_config
1094
1065
 
1095
1066
  yield self if block_given?
@@ -96,7 +96,7 @@ module Google
96
96
 
97
97
  "projects/#{project}/topics/#{topic}"
98
98
  end),
99
- "" => (proc do
99
+ "" => (proc do
100
100
  "_deleted-topic_"
101
101
  end)
102
102
  }
@@ -31,6 +31,8 @@ module Google
31
31
  module PubSub
32
32
  module V1
33
33
  ##
34
+ # Service for doing schema-related operations.
35
+ #
34
36
  # To load this service and instantiate a client:
35
37
  #
36
38
  # require "google/cloud/pubsub/v1/schema_service"
@@ -27,6 +27,8 @@ module Google
27
27
  ##
28
28
  # Client for the SchemaService service.
29
29
  #
30
+ # Service for doing schema-related operations.
31
+ #
30
32
  class Client
31
33
  include Paths
32
34
 
@@ -58,7 +60,7 @@ module Google
58
60
  parent_config = while namespace.any?
59
61
  parent_name = namespace.join "::"
60
62
  parent_const = const_get parent_name
61
- break parent_const.configure if parent_const&.respond_to? :configure
63
+ break parent_const.configure if parent_const.respond_to? :configure
62
64
  namespace.pop
63
65
  end
64
66
  default_config = Client::Configuration.new parent_config
@@ -129,9 +131,9 @@ module Google
129
131
  enable_self_signed_jwt = @config.scope == Client.configure.scope &&
130
132
  @config.endpoint == Client.configure.endpoint &&
131
133
  !@config.endpoint.split(".").first.include?("-")
132
- credentials ||= Credentials.default scope: @config.scope,
134
+ credentials ||= Credentials.default scope: @config.scope,
133
135
  enable_self_signed_jwt: enable_self_signed_jwt
134
- if credentials.is_a?(String) || credentials.is_a?(Hash)
136
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
135
137
  credentials = Credentials.new credentials, scope: @config.scope
136
138
  end
137
139
  @quota_project_id = @config.quota_project
@@ -681,7 +683,7 @@ module Google
681
683
  config_attr :scope, nil, ::String, ::Array, nil
682
684
  config_attr :lib_name, nil, ::String, nil
683
685
  config_attr :lib_version, nil, ::String, nil
684
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
686
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
685
687
  config_attr :interceptors, nil, ::Array, nil
686
688
  config_attr :timeout, nil, ::Numeric, nil
687
689
  config_attr :metadata, nil, ::Hash, nil
@@ -702,7 +704,7 @@ module Google
702
704
  def rpcs
703
705
  @rpcs ||= begin
704
706
  parent_rpcs = nil
705
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
707
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
706
708
  Rpcs.new parent_rpcs
707
709
  end
708
710
  end
@@ -758,17 +760,17 @@ module Google
758
760
 
759
761
  # @private
760
762
  def initialize parent_rpcs = nil
761
- create_schema_config = parent_rpcs&.create_schema if parent_rpcs&.respond_to? :create_schema
763
+ create_schema_config = parent_rpcs.create_schema if parent_rpcs.respond_to? :create_schema
762
764
  @create_schema = ::Gapic::Config::Method.new create_schema_config
763
- get_schema_config = parent_rpcs&.get_schema if parent_rpcs&.respond_to? :get_schema
765
+ get_schema_config = parent_rpcs.get_schema if parent_rpcs.respond_to? :get_schema
764
766
  @get_schema = ::Gapic::Config::Method.new get_schema_config
765
- list_schemas_config = parent_rpcs&.list_schemas if parent_rpcs&.respond_to? :list_schemas
767
+ list_schemas_config = parent_rpcs.list_schemas if parent_rpcs.respond_to? :list_schemas
766
768
  @list_schemas = ::Gapic::Config::Method.new list_schemas_config
767
- delete_schema_config = parent_rpcs&.delete_schema if parent_rpcs&.respond_to? :delete_schema
769
+ delete_schema_config = parent_rpcs.delete_schema if parent_rpcs.respond_to? :delete_schema
768
770
  @delete_schema = ::Gapic::Config::Method.new delete_schema_config
769
- validate_schema_config = parent_rpcs&.validate_schema if parent_rpcs&.respond_to? :validate_schema
771
+ validate_schema_config = parent_rpcs.validate_schema if parent_rpcs.respond_to? :validate_schema
770
772
  @validate_schema = ::Gapic::Config::Method.new validate_schema_config
771
- validate_message_config = parent_rpcs&.validate_message if parent_rpcs&.respond_to? :validate_message
773
+ validate_message_config = parent_rpcs.validate_message if parent_rpcs.respond_to? :validate_message
772
774
  @validate_message = ::Gapic::Config::Method.new validate_message_config
773
775
 
774
776
  yield self if block_given?
@@ -62,137 +62,89 @@ module Google
62
62
  parent_config = while namespace.any?
63
63
  parent_name = namespace.join "::"
64
64
  parent_const = const_get parent_name
65
- break parent_const.configure if parent_const&.respond_to? :configure
65
+ break parent_const.configure if parent_const.respond_to? :configure
66
66
  namespace.pop
67
67
  end
68
68
  default_config = Client::Configuration.new parent_config
69
69
 
70
70
  default_config.rpcs.create_subscription.timeout = 60.0
71
71
  default_config.rpcs.create_subscription.retry_policy = {
72
- initial_delay: 0.1,
73
- max_delay: 60.0,
74
- multiplier: 1.3,
75
- retry_codes: [2, 10, 14]
72
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
76
73
  }
77
74
 
78
75
  default_config.rpcs.get_subscription.timeout = 60.0
79
76
  default_config.rpcs.get_subscription.retry_policy = {
80
- initial_delay: 0.1,
81
- max_delay: 60.0,
82
- multiplier: 1.3,
83
- retry_codes: [2, 10, 14]
77
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
84
78
  }
85
79
 
86
80
  default_config.rpcs.update_subscription.timeout = 60.0
87
81
  default_config.rpcs.update_subscription.retry_policy = {
88
- initial_delay: 0.1,
89
- max_delay: 60.0,
90
- multiplier: 1.3,
91
- retry_codes: [14]
82
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
92
83
  }
93
84
 
94
85
  default_config.rpcs.list_subscriptions.timeout = 60.0
95
86
  default_config.rpcs.list_subscriptions.retry_policy = {
96
- initial_delay: 0.1,
97
- max_delay: 60.0,
98
- multiplier: 1.3,
99
- retry_codes: [2, 10, 14]
87
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
100
88
  }
101
89
 
102
90
  default_config.rpcs.delete_subscription.timeout = 60.0
103
91
  default_config.rpcs.delete_subscription.retry_policy = {
104
- initial_delay: 0.1,
105
- max_delay: 60.0,
106
- multiplier: 1.3,
107
- retry_codes: [14]
92
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
108
93
  }
109
94
 
110
95
  default_config.rpcs.modify_ack_deadline.timeout = 60.0
111
96
  default_config.rpcs.modify_ack_deadline.retry_policy = {
112
- initial_delay: 0.1,
113
- max_delay: 60.0,
114
- multiplier: 1.3,
115
- retry_codes: [14]
97
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
116
98
  }
117
99
 
118
100
  default_config.rpcs.acknowledge.timeout = 60.0
119
101
  default_config.rpcs.acknowledge.retry_policy = {
120
- initial_delay: 0.1,
121
- max_delay: 60.0,
122
- multiplier: 1.3,
123
- retry_codes: [14]
102
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
124
103
  }
125
104
 
126
105
  default_config.rpcs.pull.timeout = 60.0
127
106
  default_config.rpcs.pull.retry_policy = {
128
- initial_delay: 0.1,
129
- max_delay: 60.0,
130
- multiplier: 1.3,
131
- retry_codes: [2, 10, 14]
107
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
132
108
  }
133
109
 
134
110
  default_config.rpcs.streaming_pull.timeout = 900.0
135
111
  default_config.rpcs.streaming_pull.retry_policy = {
136
- initial_delay: 0.1,
137
- max_delay: 60.0,
138
- multiplier: 1.3,
139
- retry_codes: [4, 8, 10, 13, 14]
112
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 8, 10, 13, 14]
140
113
  }
141
114
 
142
115
  default_config.rpcs.modify_push_config.timeout = 60.0
143
116
  default_config.rpcs.modify_push_config.retry_policy = {
144
- initial_delay: 0.1,
145
- max_delay: 60.0,
146
- multiplier: 1.3,
147
- retry_codes: [14]
117
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
148
118
  }
149
119
 
150
120
  default_config.rpcs.get_snapshot.timeout = 60.0
151
121
  default_config.rpcs.get_snapshot.retry_policy = {
152
- initial_delay: 0.1,
153
- max_delay: 60.0,
154
- multiplier: 1.3,
155
- retry_codes: [2, 10, 14]
122
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
156
123
  }
157
124
 
158
125
  default_config.rpcs.list_snapshots.timeout = 60.0
159
126
  default_config.rpcs.list_snapshots.retry_policy = {
160
- initial_delay: 0.1,
161
- max_delay: 60.0,
162
- multiplier: 1.3,
163
- retry_codes: [2, 10, 14]
127
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
164
128
  }
165
129
 
166
130
  default_config.rpcs.create_snapshot.timeout = 60.0
167
131
  default_config.rpcs.create_snapshot.retry_policy = {
168
- initial_delay: 0.1,
169
- max_delay: 60.0,
170
- multiplier: 1.3,
171
- retry_codes: [14]
132
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
172
133
  }
173
134
 
174
135
  default_config.rpcs.update_snapshot.timeout = 60.0
175
136
  default_config.rpcs.update_snapshot.retry_policy = {
176
- initial_delay: 0.1,
177
- max_delay: 60.0,
178
- multiplier: 1.3,
179
- retry_codes: [14]
137
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
180
138
  }
181
139
 
182
140
  default_config.rpcs.delete_snapshot.timeout = 60.0
183
141
  default_config.rpcs.delete_snapshot.retry_policy = {
184
- initial_delay: 0.1,
185
- max_delay: 60.0,
186
- multiplier: 1.3,
187
- retry_codes: [14]
142
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
188
143
  }
189
144
 
190
145
  default_config.rpcs.seek.timeout = 60.0
191
146
  default_config.rpcs.seek.retry_policy = {
192
- initial_delay: 0.1,
193
- max_delay: 60.0,
194
- multiplier: 1.3,
195
- retry_codes: [2, 10, 14]
147
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
196
148
  }
197
149
 
198
150
  default_config
@@ -261,9 +213,9 @@ module Google
261
213
  enable_self_signed_jwt = @config.scope == Client.configure.scope &&
262
214
  @config.endpoint == Client.configure.endpoint &&
263
215
  !@config.endpoint.split(".").first.include?("-")
264
- credentials ||= Credentials.default scope: @config.scope,
216
+ credentials ||= Credentials.default scope: @config.scope,
265
217
  enable_self_signed_jwt: enable_self_signed_jwt
266
- if credentials.is_a?(String) || credentials.is_a?(Hash)
218
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
267
219
  credentials = Credentials.new credentials, scope: @config.scope
268
220
  end
269
221
  @quota_project_id = @config.quota_project
@@ -1683,7 +1635,7 @@ module Google
1683
1635
  config_attr :scope, nil, ::String, ::Array, nil
1684
1636
  config_attr :lib_name, nil, ::String, nil
1685
1637
  config_attr :lib_version, nil, ::String, nil
1686
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
1638
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1687
1639
  config_attr :interceptors, nil, ::Array, nil
1688
1640
  config_attr :timeout, nil, ::Numeric, nil
1689
1641
  config_attr :metadata, nil, ::Hash, nil
@@ -1704,7 +1656,7 @@ module Google
1704
1656
  def rpcs
1705
1657
  @rpcs ||= begin
1706
1658
  parent_rpcs = nil
1707
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
1659
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1708
1660
  Rpcs.new parent_rpcs
1709
1661
  end
1710
1662
  end
@@ -1810,37 +1762,37 @@ module Google
1810
1762
 
1811
1763
  # @private
1812
1764
  def initialize parent_rpcs = nil
1813
- create_subscription_config = parent_rpcs&.create_subscription if parent_rpcs&.respond_to? :create_subscription
1765
+ create_subscription_config = parent_rpcs.create_subscription if parent_rpcs.respond_to? :create_subscription
1814
1766
  @create_subscription = ::Gapic::Config::Method.new create_subscription_config
1815
- get_subscription_config = parent_rpcs&.get_subscription if parent_rpcs&.respond_to? :get_subscription
1767
+ get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription
1816
1768
  @get_subscription = ::Gapic::Config::Method.new get_subscription_config
1817
- update_subscription_config = parent_rpcs&.update_subscription if parent_rpcs&.respond_to? :update_subscription
1769
+ update_subscription_config = parent_rpcs.update_subscription if parent_rpcs.respond_to? :update_subscription
1818
1770
  @update_subscription = ::Gapic::Config::Method.new update_subscription_config
1819
- list_subscriptions_config = parent_rpcs&.list_subscriptions if parent_rpcs&.respond_to? :list_subscriptions
1771
+ list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions
1820
1772
  @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config
1821
- delete_subscription_config = parent_rpcs&.delete_subscription if parent_rpcs&.respond_to? :delete_subscription
1773
+ delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription
1822
1774
  @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config
1823
- modify_ack_deadline_config = parent_rpcs&.modify_ack_deadline if parent_rpcs&.respond_to? :modify_ack_deadline
1775
+ modify_ack_deadline_config = parent_rpcs.modify_ack_deadline if parent_rpcs.respond_to? :modify_ack_deadline
1824
1776
  @modify_ack_deadline = ::Gapic::Config::Method.new modify_ack_deadline_config
1825
- acknowledge_config = parent_rpcs&.acknowledge if parent_rpcs&.respond_to? :acknowledge
1777
+ acknowledge_config = parent_rpcs.acknowledge if parent_rpcs.respond_to? :acknowledge
1826
1778
  @acknowledge = ::Gapic::Config::Method.new acknowledge_config
1827
- pull_config = parent_rpcs&.pull if parent_rpcs&.respond_to? :pull
1779
+ pull_config = parent_rpcs.pull if parent_rpcs.respond_to? :pull
1828
1780
  @pull = ::Gapic::Config::Method.new pull_config
1829
- streaming_pull_config = parent_rpcs&.streaming_pull if parent_rpcs&.respond_to? :streaming_pull
1781
+ streaming_pull_config = parent_rpcs.streaming_pull if parent_rpcs.respond_to? :streaming_pull
1830
1782
  @streaming_pull = ::Gapic::Config::Method.new streaming_pull_config
1831
- modify_push_config_config = parent_rpcs&.modify_push_config if parent_rpcs&.respond_to? :modify_push_config
1783
+ modify_push_config_config = parent_rpcs.modify_push_config if parent_rpcs.respond_to? :modify_push_config
1832
1784
  @modify_push_config = ::Gapic::Config::Method.new modify_push_config_config
1833
- get_snapshot_config = parent_rpcs&.get_snapshot if parent_rpcs&.respond_to? :get_snapshot
1785
+ get_snapshot_config = parent_rpcs.get_snapshot if parent_rpcs.respond_to? :get_snapshot
1834
1786
  @get_snapshot = ::Gapic::Config::Method.new get_snapshot_config
1835
- list_snapshots_config = parent_rpcs&.list_snapshots if parent_rpcs&.respond_to? :list_snapshots
1787
+ list_snapshots_config = parent_rpcs.list_snapshots if parent_rpcs.respond_to? :list_snapshots
1836
1788
  @list_snapshots = ::Gapic::Config::Method.new list_snapshots_config
1837
- create_snapshot_config = parent_rpcs&.create_snapshot if parent_rpcs&.respond_to? :create_snapshot
1789
+ create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot
1838
1790
  @create_snapshot = ::Gapic::Config::Method.new create_snapshot_config
1839
- update_snapshot_config = parent_rpcs&.update_snapshot if parent_rpcs&.respond_to? :update_snapshot
1791
+ update_snapshot_config = parent_rpcs.update_snapshot if parent_rpcs.respond_to? :update_snapshot
1840
1792
  @update_snapshot = ::Gapic::Config::Method.new update_snapshot_config
1841
- delete_snapshot_config = parent_rpcs&.delete_snapshot if parent_rpcs&.respond_to? :delete_snapshot
1793
+ delete_snapshot_config = parent_rpcs.delete_snapshot if parent_rpcs.respond_to? :delete_snapshot
1842
1794
  @delete_snapshot = ::Gapic::Config::Method.new delete_snapshot_config
1843
- seek_config = parent_rpcs&.seek if parent_rpcs&.respond_to? :seek
1795
+ seek_config = parent_rpcs.seek if parent_rpcs.respond_to? :seek
1844
1796
  @seek = ::Gapic::Config::Method.new seek_config
1845
1797
 
1846
1798
  yield self if block_given?