Bump version, regen APIs
This commit is contained in:
1 parent
b8f6f7c2fe
commit
9237ba59cb
241 files changed
+53894
-50212
No files matched your search
@@ -22,6 +22,184 @@ module Google
|
||||
module Apis
|
||||
module PubsubV1
|
||||
|
||||
# Request for the ModifyAckDeadline method.
|
||||
class ModifyAckDeadlineRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# List of acknowledgment IDs.
|
||||
# Corresponds to the JSON property `ackIds`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :ack_ids
|
||||
|
||||
# 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
|
||||
# ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
|
||||
# was made. Specifying zero may immediately make the message available for
|
||||
# another pull request.
|
||||
# The minimum deadline you can specify is 0 seconds.
|
||||
# The maximum deadline you can specify is 600 seconds (10 minutes).
|
||||
# Corresponds to the JSON property `ackDeadlineSeconds`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :ack_deadline_seconds
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@ack_ids = args[:ack_ids] if args.key?(:ack_ids)
|
||||
@ack_deadline_seconds = args[:ack_deadline_seconds] if args.key?(:ack_deadline_seconds)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message for `SetIamPolicy` method.
|
||||
class SetIamPolicyRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Defines an Identity and Access Management (IAM) policy. It is used to
|
||||
# specify access control policies for Cloud Platform resources.
|
||||
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
|
||||
# `members` to a `role`, where the members can be user accounts, Google groups,
|
||||
# Google domains, and service accounts. A `role` is a named list of permissions
|
||||
# defined by IAM.
|
||||
# **Example**
|
||||
# `
|
||||
# "bindings": [
|
||||
# `
|
||||
# "role": "roles/owner",
|
||||
# "members": [
|
||||
# "user:mike@example.com",
|
||||
# "group:admins@example.com",
|
||||
# "domain:google.com",
|
||||
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "role": "roles/viewer",
|
||||
# "members": ["user:sean@example.com"]
|
||||
# `
|
||||
# ]
|
||||
# `
|
||||
# For a description of IAM and its features, see the
|
||||
# [IAM developer's guide](https://cloud.google.com/iam).
|
||||
# Corresponds to the JSON property `policy`
|
||||
# @return [Google::Apis::PubsubV1::Policy]
|
||||
attr_accessor :policy
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@policy = args[:policy] if args.key?(:policy)
|
||||
end
|
||||
end
|
||||
|
||||
# A message data and its attributes. The message payload must not be empty;
|
||||
# it must contain either a non-empty data field, or at least one attribute.
|
||||
class Message
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Optional attributes for this message.
|
||||
# Corresponds to the JSON property `attributes`
|
||||
# @return [Hash<String,String>]
|
||||
attr_accessor :attributes
|
||||
|
||||
# ID of this message, assigned by the server when the message is published.
|
||||
# Guaranteed to be unique within the topic. This value may be read by a
|
||||
# subscriber that receives a `PubsubMessage` via a `Pull` call or a push
|
||||
# delivery. It must not be populated by the publisher in a `Publish` call.
|
||||
# Corresponds to the JSON property `messageId`
|
||||
# @return [String]
|
||||
attr_accessor :message_id
|
||||
|
||||
# The time at which the message was published, populated by the server when
|
||||
# it receives the `Publish` call. It must not be populated by the
|
||||
# publisher in a `Publish` call.
|
||||
# Corresponds to the JSON property `publishTime`
|
||||
# @return [String]
|
||||
attr_accessor :publish_time
|
||||
|
||||
# The message payload.
|
||||
# Corresponds to the JSON property `data`
|
||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||
# @return [String]
|
||||
attr_accessor :data
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@attributes = args[:attributes] if args.key?(:attributes)
|
||||
@message_id = args[:message_id] if args.key?(:message_id)
|
||||
@publish_time = args[:publish_time] if args.key?(:publish_time)
|
||||
@data = args[:data] if args.key?(:data)
|
||||
end
|
||||
end
|
||||
|
||||
# Request for the ModifyPushConfig method.
|
||||
class ModifyPushConfigRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Configuration for a push delivery endpoint.
|
||||
# Corresponds to the JSON property `pushConfig`
|
||||
# @return [Google::Apis::PubsubV1::PushConfig]
|
||||
attr_accessor :push_config
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@push_config = args[:push_config] if args.key?(:push_config)
|
||||
end
|
||||
end
|
||||
|
||||
# Associates `members` with a `role`.
|
||||
class Binding
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Specifies the identities requesting access for a Cloud Platform resource.
|
||||
# `members` can have the following values:
|
||||
# * `allUsers`: A special identifier that represents anyone who is
|
||||
# on the internet; with or without a Google account.
|
||||
# * `allAuthenticatedUsers`: A special identifier that represents anyone
|
||||
# who is authenticated with a Google account or a service account.
|
||||
# * `user:`emailid``: An email address that represents a specific Google
|
||||
# account. For example, `alice@gmail.com` or `joe@example.com`.
|
||||
# * `serviceAccount:`emailid``: An email address that represents a service
|
||||
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
|
||||
# * `group:`emailid``: An email address that represents a Google group.
|
||||
# For example, `admins@example.com`.
|
||||
# * `domain:`domain``: A Google Apps domain name that represents all the
|
||||
# users of that domain. For example, `google.com` or `example.com`.
|
||||
# Corresponds to the JSON property `members`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :members
|
||||
|
||||
# Role that is assigned to `members`.
|
||||
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
||||
# Required
|
||||
# Corresponds to the JSON property `role`
|
||||
# @return [String]
|
||||
attr_accessor :role
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@members = args[:members] if args.key?(:members)
|
||||
@role = args[:role] if args.key?(:role)
|
||||
end
|
||||
end
|
||||
|
||||
# Request for the Acknowledge method.
|
||||
class AcknowledgeRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
@@ -494,184 +672,6 @@ module Google
|
||||
@bindings = args[:bindings] if args.key?(:bindings)
|
||||
end
|
||||
end
|
||||
|
||||
# Request for the ModifyAckDeadline method.
|
||||
class ModifyAckDeadlineRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# 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
|
||||
# ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
|
||||
# was made. Specifying zero may immediately make the message available for
|
||||
# another pull request.
|
||||
# The minimum deadline you can specify is 0 seconds.
|
||||
# The maximum deadline you can specify is 600 seconds (10 minutes).
|
||||
# Corresponds to the JSON property `ackDeadlineSeconds`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :ack_deadline_seconds
|
||||
|
||||
# List of acknowledgment IDs.
|
||||
# Corresponds to the JSON property `ackIds`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :ack_ids
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@ack_deadline_seconds = args[:ack_deadline_seconds] if args.key?(:ack_deadline_seconds)
|
||||
@ack_ids = args[:ack_ids] if args.key?(:ack_ids)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message for `SetIamPolicy` method.
|
||||
class SetIamPolicyRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Defines an Identity and Access Management (IAM) policy. It is used to
|
||||
# specify access control policies for Cloud Platform resources.
|
||||
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
|
||||
# `members` to a `role`, where the members can be user accounts, Google groups,
|
||||
# Google domains, and service accounts. A `role` is a named list of permissions
|
||||
# defined by IAM.
|
||||
# **Example**
|
||||
# `
|
||||
# "bindings": [
|
||||
# `
|
||||
# "role": "roles/owner",
|
||||
# "members": [
|
||||
# "user:mike@example.com",
|
||||
# "group:admins@example.com",
|
||||
# "domain:google.com",
|
||||
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "role": "roles/viewer",
|
||||
# "members": ["user:sean@example.com"]
|
||||
# `
|
||||
# ]
|
||||
# `
|
||||
# For a description of IAM and its features, see the
|
||||
# [IAM developer's guide](https://cloud.google.com/iam).
|
||||
# Corresponds to the JSON property `policy`
|
||||
# @return [Google::Apis::PubsubV1::Policy]
|
||||
attr_accessor :policy
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@policy = args[:policy] if args.key?(:policy)
|
||||
end
|
||||
end
|
||||
|
||||
# A message data and its attributes. The message payload must not be empty;
|
||||
# it must contain either a non-empty data field, or at least one attribute.
|
||||
class Message
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Optional attributes for this message.
|
||||
# Corresponds to the JSON property `attributes`
|
||||
# @return [Hash<String,String>]
|
||||
attr_accessor :attributes
|
||||
|
||||
# ID of this message, assigned by the server when the message is published.
|
||||
# Guaranteed to be unique within the topic. This value may be read by a
|
||||
# subscriber that receives a `PubsubMessage` via a `Pull` call or a push
|
||||
# delivery. It must not be populated by the publisher in a `Publish` call.
|
||||
# Corresponds to the JSON property `messageId`
|
||||
# @return [String]
|
||||
attr_accessor :message_id
|
||||
|
||||
# The time at which the message was published, populated by the server when
|
||||
# it receives the `Publish` call. It must not be populated by the
|
||||
# publisher in a `Publish` call.
|
||||
# Corresponds to the JSON property `publishTime`
|
||||
# @return [String]
|
||||
attr_accessor :publish_time
|
||||
|
||||
# The message payload.
|
||||
# Corresponds to the JSON property `data`
|
||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||
# @return [String]
|
||||
attr_accessor :data
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@attributes = args[:attributes] if args.key?(:attributes)
|
||||
@message_id = args[:message_id] if args.key?(:message_id)
|
||||
@publish_time = args[:publish_time] if args.key?(:publish_time)
|
||||
@data = args[:data] if args.key?(:data)
|
||||
end
|
||||
end
|
||||
|
||||
# Request for the ModifyPushConfig method.
|
||||
class ModifyPushConfigRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Configuration for a push delivery endpoint.
|
||||
# Corresponds to the JSON property `pushConfig`
|
||||
# @return [Google::Apis::PubsubV1::PushConfig]
|
||||
attr_accessor :push_config
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@push_config = args[:push_config] if args.key?(:push_config)
|
||||
end
|
||||
end
|
||||
|
||||
# Associates `members` with a `role`.
|
||||
class Binding
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Specifies the identities requesting access for a Cloud Platform resource.
|
||||
# `members` can have the following values:
|
||||
# * `allUsers`: A special identifier that represents anyone who is
|
||||
# on the internet; with or without a Google account.
|
||||
# * `allAuthenticatedUsers`: A special identifier that represents anyone
|
||||
# who is authenticated with a Google account or a service account.
|
||||
# * `user:`emailid``: An email address that represents a specific Google
|
||||
# account. For example, `alice@gmail.com` or `joe@example.com`.
|
||||
# * `serviceAccount:`emailid``: An email address that represents a service
|
||||
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
|
||||
# * `group:`emailid``: An email address that represents a Google group.
|
||||
# For example, `admins@example.com`.
|
||||
# * `domain:`domain``: A Google Apps domain name that represents all the
|
||||
# users of that domain. For example, `google.com` or `example.com`.
|
||||
# Corresponds to the JSON property `members`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :members
|
||||
|
||||
# Role that is assigned to `members`.
|
||||
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
||||
# Required
|
||||
# Corresponds to the JSON property `role`
|
||||
# @return [String]
|
||||
attr_accessor :role
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@members = args[:members] if args.key?(:members)
|
||||
@role = args[:role] if args.key?(:role)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -22,6 +22,36 @@ module Google
|
||||
module Apis
|
||||
module PubsubV1
|
||||
|
||||
class ModifyAckDeadlineRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Message
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ModifyPushConfigRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Binding
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AcknowledgeRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
@@ -119,33 +149,45 @@ module Google
|
||||
end
|
||||
|
||||
class ModifyAckDeadlineRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :ack_ids, as: 'ackIds'
|
||||
property :ack_deadline_seconds, as: 'ackDeadlineSeconds'
|
||||
end
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :policy, as: 'policy', class: Google::Apis::PubsubV1::Policy, decorator: Google::Apis::PubsubV1::Policy::Representation
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
end
|
||||
|
||||
class Message
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :attributes, as: 'attributes'
|
||||
property :message_id, as: 'messageId'
|
||||
property :publish_time, as: 'publishTime'
|
||||
property :data, :base64 => true, as: 'data'
|
||||
end
|
||||
end
|
||||
|
||||
class ModifyPushConfigRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1::PushConfig, decorator: Google::Apis::PubsubV1::PushConfig::Representation
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
end
|
||||
|
||||
class Binding
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :members, as: 'members'
|
||||
property :role, as: 'role'
|
||||
end
|
||||
end
|
||||
|
||||
class AcknowledgeRequest
|
||||
@@ -276,48 +318,6 @@ module Google
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ModifyAckDeadlineRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :ack_deadline_seconds, as: 'ackDeadlineSeconds'
|
||||
collection :ack_ids, as: 'ackIds'
|
||||
end
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :policy, as: 'policy', class: Google::Apis::PubsubV1::Policy, decorator: Google::Apis::PubsubV1::Policy::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Message
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :attributes, as: 'attributes'
|
||||
property :message_id, as: 'messageId'
|
||||
property :publish_time, as: 'publishTime'
|
||||
property :data, :base64 => true, as: 'data'
|
||||
end
|
||||
end
|
||||
|
||||
class ModifyPushConfigRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1::PushConfig, decorator: Google::Apis::PubsubV1::PushConfig::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Binding
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :members, as: 'members'
|
||||
property :role, as: 'role'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -47,6 +47,331 @@ module Google
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Gets the configuration of a topic.
|
||||
# @param [String] topic
|
||||
# The name of the topic to get.
|
||||
# Format is `projects/`project`/topics/`topic``.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::Topic] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::Topic]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_topic(topic, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+topic}', options)
|
||||
command.response_representation = Google::Apis::PubsubV1::Topic::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::Topic
|
||||
command.params['topic'] = topic unless topic.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
|
||||
# does not exist. The message payload must not be empty; it must contain
|
||||
# either a non-empty data field, or at least one attribute.
|
||||
# @param [String] topic
|
||||
# The messages in the request will be published on this topic.
|
||||
# Format is `projects/`project`/topics/`topic``.
|
||||
# @param [Google::Apis::PubsubV1::PublishRequest] publish_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::PublishResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::PublishResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def publish_topic(topic, publish_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+topic}:publish', options)
|
||||
command.request_representation = Google::Apis::PubsubV1::PublishRequest::Representation
|
||||
command.request_object = publish_request_object
|
||||
command.response_representation = Google::Apis::PubsubV1::PublishResponse::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::PublishResponse
|
||||
command.params['topic'] = topic unless topic.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns permissions that a caller has on the specified resource.
|
||||
# If the resource does not exist, this will return an empty set of
|
||||
# permissions, not a NOT_FOUND error.
|
||||
# Note: This operation is designed to be used for building permission-aware
|
||||
# UIs and command-line tools, not for authorization checking. This operation
|
||||
# may "fail open" without warning.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy detail is being requested.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::TestIamPermissionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::TestIamPermissionsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def test_topic_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
|
||||
command.request_representation = Google::Apis::PubsubV1::TestIamPermissionsRequest::Representation
|
||||
command.request_object = test_iam_permissions_request_object
|
||||
command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::TestIamPermissionsResponse
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
|
||||
# does not exist. After a topic is deleted, a new topic may be created with
|
||||
# the same name; this is an entirely new topic with none of the old
|
||||
# configuration or subscriptions. Existing subscriptions to this topic are
|
||||
# not deleted, but their `topic` field is set to `_deleted-topic_`.
|
||||
# @param [String] topic
|
||||
# Name of the topic to delete.
|
||||
# Format is `projects/`project`/topics/`topic``.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::Empty]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def delete_topic(topic, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1/{+topic}', options)
|
||||
command.response_representation = Google::Apis::PubsubV1::Empty::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::Empty
|
||||
command.params['topic'] = topic unless topic.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists matching topics.
|
||||
# @param [String] project
|
||||
# The name of the cloud project that topics belong to.
|
||||
# Format is `projects/`project``.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum number of topics to return.
|
||||
# @param [String] page_token
|
||||
# The value returned by the last `ListTopicsResponse`; indicates that this is
|
||||
# a continuation of a prior `ListTopics` call, and that the system should
|
||||
# return the next page of data.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::ListTopicsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::ListTopicsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_topics(project, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+project}/topics', options)
|
||||
command.response_representation = Google::Apis::PubsubV1::ListTopicsResponse::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::ListTopicsResponse
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Creates the given topic with the given name.
|
||||
# @param [String] name
|
||||
# The name of the topic. It must have the format
|
||||
# `"projects/`project`/topics/`topic`"`. ``topic`` 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 [Google::Apis::PubsubV1::Topic] topic_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::Topic] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::Topic]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def create_topic(name, topic_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:put, 'v1/{+name}', options)
|
||||
command.request_representation = Google::Apis::PubsubV1::Topic::Representation
|
||||
command.request_object = topic_object
|
||||
command.response_representation = Google::Apis::PubsubV1::Topic::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::Topic
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Sets the access control policy on the specified resource. Replaces any
|
||||
# existing policy.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy is being specified.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::Policy]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def set_topic_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
||||
command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation
|
||||
command.request_object = set_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::PubsubV1::Policy::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the access control policy for a resource.
|
||||
# Returns an empty policy if the resource exists and does not have a policy
|
||||
# set.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy is being requested.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::Policy]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_project_topic_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
|
||||
command.response_representation = Google::Apis::PubsubV1::Policy::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists the name of the subscriptions for this topic.
|
||||
# @param [String] topic
|
||||
# The name of the topic that subscriptions are attached to.
|
||||
# Format is `projects/`project`/topics/`topic``.
|
||||
# @param [String] page_token
|
||||
# The value returned by the last `ListTopicSubscriptionsResponse`; indicates
|
||||
# that this is a continuation of a prior `ListTopicSubscriptions` call, and
|
||||
# that the system should return the next page of data.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum number of subscription names to return.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::ListTopicSubscriptionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::ListTopicSubscriptionsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_topic_subscriptions(topic, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+topic}/subscriptions', options)
|
||||
command.response_representation = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse
|
||||
command.params['topic'] = topic unless topic.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns permissions that a caller has on the specified resource.
|
||||
# If the resource does not exist, this will return an empty set of
|
||||
# permissions, not a NOT_FOUND error.
|
||||
@@ -235,41 +560,6 @@ module Google
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Sets the access control policy on the specified resource. Replaces any
|
||||
# existing policy.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy is being specified.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::Policy]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def set_subscription_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
||||
command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation
|
||||
command.request_object = set_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::PubsubV1::Policy::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Creates a subscription to a given topic.
|
||||
# If the subscription already exists, returns `ALREADY_EXISTS`.
|
||||
# If the corresponding topic doesn't exist, returns `NOT_FOUND`.
|
||||
@@ -316,6 +606,41 @@ module Google
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Sets the access control policy on the specified resource. Replaces any
|
||||
# existing policy.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy is being specified.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::Policy]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def set_subscription_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
||||
command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation
|
||||
command.request_object = set_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::PubsubV1::Policy::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Acknowledges the messages associated with the `ack_ids` in the
|
||||
# `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
|
||||
# from the subscription.
|
||||
@@ -457,41 +782,6 @@ module Google
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Sets the access control policy on the specified resource. Replaces any
|
||||
# existing policy.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy is being specified.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::Policy]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def set_snapshot_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
||||
command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation
|
||||
command.request_object = set_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::PubsubV1::Policy::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns permissions that a caller has on the specified resource.
|
||||
# If the resource does not exist, this will return an empty set of
|
||||
# permissions, not a NOT_FOUND error.
|
||||
@@ -564,219 +854,6 @@ module Google
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the access control policy for a resource.
|
||||
# Returns an empty policy if the resource exists and does not have a policy
|
||||
# set.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy is being requested.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::Policy]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_project_topic_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
|
||||
command.response_representation = Google::Apis::PubsubV1::Policy::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the configuration of a topic.
|
||||
# @param [String] topic
|
||||
# The name of the topic to get.
|
||||
# Format is `projects/`project`/topics/`topic``.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::Topic] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::Topic]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_topic(topic, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+topic}', options)
|
||||
command.response_representation = Google::Apis::PubsubV1::Topic::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::Topic
|
||||
command.params['topic'] = topic unless topic.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
|
||||
# does not exist. The message payload must not be empty; it must contain
|
||||
# either a non-empty data field, or at least one attribute.
|
||||
# @param [String] topic
|
||||
# The messages in the request will be published on this topic.
|
||||
# Format is `projects/`project`/topics/`topic``.
|
||||
# @param [Google::Apis::PubsubV1::PublishRequest] publish_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::PublishResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::PublishResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def publish_topic(topic, publish_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+topic}:publish', options)
|
||||
command.request_representation = Google::Apis::PubsubV1::PublishRequest::Representation
|
||||
command.request_object = publish_request_object
|
||||
command.response_representation = Google::Apis::PubsubV1::PublishResponse::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::PublishResponse
|
||||
command.params['topic'] = topic unless topic.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns permissions that a caller has on the specified resource.
|
||||
# If the resource does not exist, this will return an empty set of
|
||||
# permissions, not a NOT_FOUND error.
|
||||
# Note: This operation is designed to be used for building permission-aware
|
||||
# UIs and command-line tools, not for authorization checking. This operation
|
||||
# may "fail open" without warning.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy detail is being requested.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::TestIamPermissionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::TestIamPermissionsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def test_topic_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
|
||||
command.request_representation = Google::Apis::PubsubV1::TestIamPermissionsRequest::Representation
|
||||
command.request_object = test_iam_permissions_request_object
|
||||
command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::TestIamPermissionsResponse
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
|
||||
# does not exist. After a topic is deleted, a new topic may be created with
|
||||
# the same name; this is an entirely new topic with none of the old
|
||||
# configuration or subscriptions. Existing subscriptions to this topic are
|
||||
# not deleted, but their `topic` field is set to `_deleted-topic_`.
|
||||
# @param [String] topic
|
||||
# Name of the topic to delete.
|
||||
# Format is `projects/`project`/topics/`topic``.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::Empty]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def delete_topic(topic, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1/{+topic}', options)
|
||||
command.response_representation = Google::Apis::PubsubV1::Empty::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::Empty
|
||||
command.params['topic'] = topic unless topic.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists matching topics.
|
||||
# @param [String] project
|
||||
# The name of the cloud project that topics belong to.
|
||||
# Format is `projects/`project``.
|
||||
# @param [String] page_token
|
||||
# The value returned by the last `ListTopicsResponse`; indicates that this is
|
||||
# a continuation of a prior `ListTopics` call, and that the system should
|
||||
# return the next page of data.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum number of topics to return.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::ListTopicsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::ListTopicsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_topics(project, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+project}/topics', options)
|
||||
command.response_representation = Google::Apis::PubsubV1::ListTopicsResponse::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::ListTopicsResponse
|
||||
command.params['project'] = project unless project.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Sets the access control policy on the specified resource. Replaces any
|
||||
# existing policy.
|
||||
# @param [String] resource
|
||||
@@ -800,7 +877,7 @@ module Google
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def set_topic_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
def set_snapshot_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
||||
command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation
|
||||
command.request_object = set_iam_policy_request_object
|
||||
@@ -811,83 +888,6 @@ module Google
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Creates the given topic with the given name.
|
||||
# @param [String] name
|
||||
# The name of the topic. It must have the format
|
||||
# `"projects/`project`/topics/`topic`"`. ``topic`` 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 [Google::Apis::PubsubV1::Topic] topic_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::Topic] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::Topic]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def create_topic(name, topic_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:put, 'v1/{+name}', options)
|
||||
command.request_representation = Google::Apis::PubsubV1::Topic::Representation
|
||||
command.request_object = topic_object
|
||||
command.response_representation = Google::Apis::PubsubV1::Topic::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::Topic
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists the name of the subscriptions for this topic.
|
||||
# @param [String] topic
|
||||
# The name of the topic that subscriptions are attached to.
|
||||
# Format is `projects/`project`/topics/`topic``.
|
||||
# @param [String] page_token
|
||||
# The value returned by the last `ListTopicSubscriptionsResponse`; indicates
|
||||
# that this is a continuation of a prior `ListTopicSubscriptions` call, and
|
||||
# that the system should return the next page of data.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum number of subscription names to return.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PubsubV1::ListTopicSubscriptionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PubsubV1::ListTopicSubscriptionsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_topic_subscriptions(topic, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+topic}/subscriptions', options)
|
||||
command.response_representation = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse::Representation
|
||||
command.response_class = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse
|
||||
command.params['topic'] = topic unless topic.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
|
||||
Reference in new issue
Block a user