lib/google/cloud/pubsub/v1/subscriber_client.rb in google-cloud-pubsub-0.32.0 vs lib/google/cloud/pubsub/v1/subscriber_client.rb in google-cloud-pubsub-0.32.1

- old
+ new

@@ -17,10 +17,11 @@ # https://github.com/googleapis/googleapis/blob/master/google/pubsub/v1/pubsub.proto, # and updates to that file get reflected here through a refresh process. # For the short term, the refresh process will only be runnable by Google # engineers. + require "json" require "pathname" require "google/gax" @@ -39,10 +40,11 @@ # @!attribute [r] iam_policy_stub # @return [Google::Iam::V1::IAMPolicy::Stub] # @!attribute [r] subscriber_stub # @return [Google::Pubsub::V1::Subscriber::Stub] class SubscriberClient + # @private attr_reader :iam_policy_stub, :subscriber_stub # The default address of the service. SERVICE_ADDRESS = "pubsub.googleapis.com".freeze @@ -361,18 +363,18 @@ # The generated name is populated in the returned Subscription object. # Note that for REST API requests, you must specify a name in the request. # # @param name [String] # The name of the subscription. It must have the format - # +"projects/{project}/subscriptions/{subscription}"+. +{subscription}+ must + # +"projects/\\{project}/subscriptions/\\{subscription}"+. +\\{subscription}+ must # start with a letter, and contain only letters (+[A-Za-z]+), numbers # (+[0-9]+), dashes (+-+), underscores (+_+), periods (+.+), tildes (+~+), # plus (+++) or percent signs (+%+). It must be between 3 and 255 characters # in length, and it must not start with +"goog"+ # @param topic [String] # The name of the topic from which this subscription is receiving messages. - # Format is +projects/{project}/topics/{topic}+. + # Format is +projects/\\{project}/topics/\\{topic}+. # The value of this field will be +_deleted-topic_+ if the topic has been # deleted. # @param push_config [Google::Pubsub::V1::PushConfig | Hash] # If push delivery is used with this subscription, this field is # used to configure it. An empty +pushConfig+ signifies that the subscriber @@ -463,11 +465,11 @@ # Gets the configuration details of a subscription. # # @param subscription [String] # The name of the subscription to get. - # Format is +projects/{project}/subscriptions/{sub}+. + # Format is +projects/\\{project}/subscriptions/\\{sub}+. # @param options [Google::Gax::CallOptions] # Overrides the default settings for this call, e.g, timeout, # retries, etc. # @yield [result, operation] Access the result along with the RPC operation # @yieldparam result [Google::Pubsub::V1::Subscription] @@ -538,11 +540,11 @@ # Lists matching subscriptions. # # @param project [String] # The name of the cloud project that subscriptions belong to. - # Format is +projects/{project}+. + # Format is +projects/\\{project}+. # @param page_size [Integer] # The maximum number of resources contained in the underlying API # response. If page streaming is performed per-resource, this # parameter does not affect the return value. If page streaming is # performed per-page, this determines the maximum number of @@ -597,11 +599,11 @@ # the same name, but the new one has no association with the old # subscription or its topic unless the same topic is specified. # # @param subscription [String] # The subscription to delete. - # Format is +projects/{project}/subscriptions/{sub}+. + # Format is +projects/\\{project}/subscriptions/\\{sub}+. # @param options [Google::Gax::CallOptions] # Overrides the default settings for this call, e.g, timeout, # retries, etc. # @yield [result, operation] Access the result along with the RPC operation # @yieldparam result [] @@ -632,11 +634,11 @@ # processing was interrupted. Note that this does not modify the # subscription-level +ackDeadlineSeconds+ used for subsequent messages. # # @param subscription [String] # The name of the subscription. - # Format is +projects/{project}/subscriptions/{sub}+. + # Format is +projects/\\{project}/subscriptions/\\{sub}+. # @param ack_ids [Array<String>] # List of acknowledgment IDs. # @param ack_deadline_seconds [Integer] # The new ack deadline with respect to the time this request was sent to # the Pub/Sub system. For example, if the value is 10, the new @@ -689,11 +691,11 @@ # but such a message may be redelivered later. Acknowledging a message more # than once will not result in an error. # # @param subscription [String] # The subscription whose message is being acknowledged. - # Format is +projects/{project}/subscriptions/{sub}+. + # Format is +projects/\\{project}/subscriptions/\\{sub}+. # @param ack_ids [Array<String>] # The acknowledgment ID for the messages being acknowledged that was returned # by the Pub/Sub system in the +Pull+ response. Must not be empty. # @param options [Google::Gax::CallOptions] # Overrides the default settings for this call, e.g, timeout, @@ -731,11 +733,11 @@ # there are too many concurrent pull requests pending for the given # subscription. # # @param subscription [String] # The subscription from which messages should be pulled. - # Format is +projects/{project}/subscriptions/{sub}+. + # Format is +projects/\\{project}/subscriptions/\\{sub}+. # @param max_messages [Integer] # The maximum number of messages returned for this request. The Pub/Sub # system may return fewer than the number specified. # @param return_immediately [true, false] # If this field set to true, the system will respond immediately even if @@ -828,11 +830,11 @@ # attributes of a push subscription. Messages will accumulate for delivery # continuously through the call regardless of changes to the +PushConfig+. # # @param subscription [String] # The name of the subscription. - # Format is +projects/{project}/subscriptions/{sub}+. + # Format is +projects/\\{project}/subscriptions/\\{sub}+. # @param push_config [Google::Pubsub::V1::PushConfig | Hash] # The push configuration for future deliveries. # # An empty +pushConfig+ indicates that the Pub/Sub system should # stop pushing messages from the given subscription and allow @@ -876,11 +878,11 @@ # changed in backward-incompatible ways and is not recommended for production # use. It is not subject to any SLA or deprecation policy. # # @param project [String] # The name of the cloud project that snapshots belong to. - # Format is +projects/{project}+. + # Format is +projects/\\{project}+. # @param page_size [Integer] # The maximum number of resources contained in the underlying API # response. If page streaming is performed per-resource, this # parameter does not affect the return value. If page streaming is # performed per-page, this determines the maximum number of @@ -948,21 +950,21 @@ # @param name [String] # Optional user-provided name for this snapshot. # If the name is not provided in the request, the server will assign a random # name for this snapshot on the same project as the subscription. # Note that for REST API requests, you must specify a name. - # Format is +projects/{project}/snapshots/{snap}+. + # Format is +projects/\\{project}/snapshots/\\{snap}+. # @param subscription [String] # The subscription whose backlog the snapshot retains. # Specifically, the created snapshot is guaranteed to retain: # (a) The existing backlog on the subscription. More precisely, this is # defined as the messages in the subscription's backlog that are # unacknowledged upon the successful completion of the # +CreateSnapshot+ request; as well as: # (b) Any messages published to the subscription's topic following the # successful completion of the CreateSnapshot request. - # Format is +projects/{project}/subscriptions/{sub}+. + # Format is +projects/\\{project}/subscriptions/\\{sub}+. # @param labels [Hash{String => String}] # User labels. # @param options [Google::Gax::CallOptions] # Overrides the default settings for this call, e.g, timeout, # retries, etc. @@ -1051,11 +1053,11 @@ # created with the same name, but the new one has no association with the old # snapshot or its subscription, unless the same subscription is specified. # # @param snapshot [String] # The name of the snapshot to delete. - # Format is +projects/{project}/snapshots/{snap}+. + # Format is +projects/\\{project}/snapshots/\\{snap}+. # @param options [Google::Gax::CallOptions] # Overrides the default settings for this call, e.g, timeout, # retries, etc. # @yield [result, operation] Access the result along with the RPC operation # @yieldparam result [] @@ -1103,11 +1105,11 @@ # A hash of the same form as `Google::Protobuf::Timestamp` # can also be provided. # @param snapshot [String] # The snapshot to seek to. The snapshot's topic must be the same as that of # the provided subscription. - # Format is +projects/{project}/snapshots/{snap}+. + # Format is +projects/\\{project}/snapshots/\\{snap}+. # @param options [Google::Gax::CallOptions] # Overrides the default settings for this call, e.g, timeout, # retries, etc. # @yield [result, operation] Access the result along with the RPC operation # @yieldparam result [Google::Pubsub::V1::SeekResponse] @@ -1140,11 +1142,11 @@ # existing policy. # # @param resource [String] # REQUIRED: The resource for which the policy is being specified. # +resource+ is usually specified as a path. For example, a Project - # resource is specified as +projects/{project}+. + # resource is specified as +projects/\\{project}+. # @param policy [Google::Iam::V1::Policy | Hash] # REQUIRED: The complete policy to be applied to the +resource+. The size of # the policy is limited to a few 10s of KB. An empty policy is a # valid policy but certain Cloud Platform services (such as Projects) # might reject them. @@ -1186,11 +1188,11 @@ # set. # # @param resource [String] # REQUIRED: The resource for which the policy is being requested. # +resource+ is usually specified as a path. For example, a Project - # resource is specified as +projects/{project}+. + # resource is specified as +projects/\\{project}+. # @param options [Google::Gax::CallOptions] # Overrides the default settings for this call, e.g, timeout, # retries, etc. # @yield [result, operation] Access the result along with the RPC operation # @yieldparam result [Google::Iam::V1::Policy] @@ -1220,10 +1222,10 @@ # permissions, not a NOT_FOUND error. # # @param resource [String] # REQUIRED: The resource for which the policy detail is being requested. # +resource+ is usually specified as a path. For example, a Project - # resource is specified as +projects/{project}+. + # resource is specified as +projects/\\{project}+. # @param permissions [Array<String>] # The set of permissions to check for the +resource+. Permissions with # wildcards (such as '*' or 'storage.*') are not allowed. For more # information see # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).