Autogenerated update (2017-12-02)

Update:
- firestore_v1beta1
- pubsub_v1
- youtube_v3
This commit is contained in:
Google APIs 2017-12-02 00:36:26 +00:00
parent a587ed8ee8
commit e4c62dc83f
10 changed files with 692 additions and 5 deletions

View File

@ -54916,11 +54916,21 @@
"/pubsub:v1/Binding/members": members
"/pubsub:v1/Binding/members/member": member
"/pubsub:v1/Binding/role": role
"/pubsub:v1/CreateSnapshotRequest": create_snapshot_request
"/pubsub:v1/CreateSnapshotRequest/subscription": subscription
"/pubsub:v1/Empty": empty
"/pubsub:v1/ListSnapshotsResponse": list_snapshots_response
"/pubsub:v1/ListSnapshotsResponse/nextPageToken": next_page_token
"/pubsub:v1/ListSnapshotsResponse/snapshots": snapshots
"/pubsub:v1/ListSnapshotsResponse/snapshots/snapshot": snapshot
"/pubsub:v1/ListSubscriptionsResponse": list_subscriptions_response
"/pubsub:v1/ListSubscriptionsResponse/nextPageToken": next_page_token
"/pubsub:v1/ListSubscriptionsResponse/subscriptions": subscriptions
"/pubsub:v1/ListSubscriptionsResponse/subscriptions/subscription": subscription
"/pubsub:v1/ListTopicSnapshotsResponse": list_topic_snapshots_response
"/pubsub:v1/ListTopicSnapshotsResponse/nextPageToken": next_page_token
"/pubsub:v1/ListTopicSnapshotsResponse/snapshots": snapshots
"/pubsub:v1/ListTopicSnapshotsResponse/snapshots/snapshot": snapshot
"/pubsub:v1/ListTopicSubscriptionsResponse": list_topic_subscriptions_response
"/pubsub:v1/ListTopicSubscriptionsResponse/nextPageToken": next_page_token
"/pubsub:v1/ListTopicSubscriptionsResponse/subscriptions": subscriptions
@ -54965,12 +54975,22 @@
"/pubsub:v1/ReceivedMessage": received_message
"/pubsub:v1/ReceivedMessage/ackId": ack_id
"/pubsub:v1/ReceivedMessage/message": message
"/pubsub:v1/SeekRequest": seek_request
"/pubsub:v1/SeekRequest/snapshot": snapshot
"/pubsub:v1/SeekRequest/time": time
"/pubsub:v1/SeekResponse": seek_response
"/pubsub:v1/SetIamPolicyRequest": set_iam_policy_request
"/pubsub:v1/SetIamPolicyRequest/policy": policy
"/pubsub:v1/Snapshot": snapshot
"/pubsub:v1/Snapshot/expireTime": expire_time
"/pubsub:v1/Snapshot/name": name
"/pubsub:v1/Snapshot/topic": topic
"/pubsub:v1/Subscription": subscription
"/pubsub:v1/Subscription/ackDeadlineSeconds": ack_deadline_seconds
"/pubsub:v1/Subscription/messageRetentionDuration": message_retention_duration
"/pubsub:v1/Subscription/name": name
"/pubsub:v1/Subscription/pushConfig": push_config
"/pubsub:v1/Subscription/retainAckedMessages": retain_acked_messages
"/pubsub:v1/Subscription/topic": topic
"/pubsub:v1/TestIamPermissionsRequest": test_iam_permissions_request
"/pubsub:v1/TestIamPermissionsRequest/permissions": permissions
@ -54980,10 +55000,26 @@
"/pubsub:v1/TestIamPermissionsResponse/permissions/permission": permission
"/pubsub:v1/Topic": topic
"/pubsub:v1/Topic/name": name
"/pubsub:v1/UpdateSnapshotRequest": update_snapshot_request
"/pubsub:v1/UpdateSnapshotRequest/snapshot": snapshot
"/pubsub:v1/UpdateSnapshotRequest/updateMask": update_mask
"/pubsub:v1/UpdateSubscriptionRequest": update_subscription_request
"/pubsub:v1/UpdateSubscriptionRequest/subscription": subscription
"/pubsub:v1/UpdateSubscriptionRequest/updateMask": update_mask
"/pubsub:v1/fields": fields
"/pubsub:v1/key": key
"/pubsub:v1/pubsub.projects.snapshots.create": create_snapshot
"/pubsub:v1/pubsub.projects.snapshots.create/name": name
"/pubsub:v1/pubsub.projects.snapshots.delete": delete_project_snapshot
"/pubsub:v1/pubsub.projects.snapshots.delete/snapshot": snapshot
"/pubsub:v1/pubsub.projects.snapshots.getIamPolicy": get_project_snapshot_iam_policy
"/pubsub:v1/pubsub.projects.snapshots.getIamPolicy/resource": resource
"/pubsub:v1/pubsub.projects.snapshots.list": list_project_snapshots
"/pubsub:v1/pubsub.projects.snapshots.list/pageSize": page_size
"/pubsub:v1/pubsub.projects.snapshots.list/pageToken": page_token
"/pubsub:v1/pubsub.projects.snapshots.list/project": project
"/pubsub:v1/pubsub.projects.snapshots.patch": patch_project_snapshot
"/pubsub:v1/pubsub.projects.snapshots.patch/name": name
"/pubsub:v1/pubsub.projects.snapshots.setIamPolicy": set_snapshot_iam_policy
"/pubsub:v1/pubsub.projects.snapshots.setIamPolicy/resource": resource
"/pubsub:v1/pubsub.projects.snapshots.testIamPermissions": test_snapshot_iam_permissions
@ -55006,8 +55042,12 @@
"/pubsub:v1/pubsub.projects.subscriptions.modifyAckDeadline/subscription": subscription
"/pubsub:v1/pubsub.projects.subscriptions.modifyPushConfig": modify_subscription_push_config
"/pubsub:v1/pubsub.projects.subscriptions.modifyPushConfig/subscription": subscription
"/pubsub:v1/pubsub.projects.subscriptions.patch": patch_project_subscription
"/pubsub:v1/pubsub.projects.subscriptions.patch/name": name
"/pubsub:v1/pubsub.projects.subscriptions.pull": pull_subscription
"/pubsub:v1/pubsub.projects.subscriptions.pull/subscription": subscription
"/pubsub:v1/pubsub.projects.subscriptions.seek": seek_subscription
"/pubsub:v1/pubsub.projects.subscriptions.seek/subscription": subscription
"/pubsub:v1/pubsub.projects.subscriptions.setIamPolicy": set_subscription_iam_policy
"/pubsub:v1/pubsub.projects.subscriptions.setIamPolicy/resource": resource
"/pubsub:v1/pubsub.projects.subscriptions.testIamPermissions": test_subscription_iam_permissions
@ -55028,6 +55068,10 @@
"/pubsub:v1/pubsub.projects.topics.publish/topic": topic
"/pubsub:v1/pubsub.projects.topics.setIamPolicy": set_topic_iam_policy
"/pubsub:v1/pubsub.projects.topics.setIamPolicy/resource": resource
"/pubsub:v1/pubsub.projects.topics.snapshots.list": list_project_topic_snapshots
"/pubsub:v1/pubsub.projects.topics.snapshots.list/pageSize": page_size
"/pubsub:v1/pubsub.projects.topics.snapshots.list/pageToken": page_token
"/pubsub:v1/pubsub.projects.topics.snapshots.list/topic": topic
"/pubsub:v1/pubsub.projects.topics.subscriptions.list": list_topic_subscriptions
"/pubsub:v1/pubsub.projects.topics.subscriptions.list/pageSize": page_size
"/pubsub:v1/pubsub.projects.topics.subscriptions.list/pageToken": page_token
@ -66665,6 +66709,7 @@
"/youtube:v3/LiveBroadcastContentDetails/boundStreamId": bound_stream_id
"/youtube:v3/LiveBroadcastContentDetails/boundStreamLastUpdateTimeMs": bound_stream_last_update_time_ms
"/youtube:v3/LiveBroadcastContentDetails/closedCaptionsType": closed_captions_type
"/youtube:v3/LiveBroadcastContentDetails/enableAutoStart": enable_auto_start
"/youtube:v3/LiveBroadcastContentDetails/enableClosedCaptions": enable_closed_captions
"/youtube:v3/LiveBroadcastContentDetails/enableContentEncryption": enable_content_encryption
"/youtube:v3/LiveBroadcastContentDetails/enableDvr": enable_dvr
@ -67102,6 +67147,7 @@
"/youtube:v3/ThumbnailSetResponse/visitorId": visitor_id
"/youtube:v3/TokenPagination": token_pagination
"/youtube:v3/Video": video
"/youtube:v3/Video/accessToken": access_token
"/youtube:v3/Video/ageGating": age_gating
"/youtube:v3/Video/contentDetails": content_details
"/youtube:v3/Video/etag": etag

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/firestore
module FirestoreV1beta1
VERSION = 'V1beta1'
REVISION = '20171107'
REVISION = '20171128'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -331,7 +331,7 @@ module Google
# The document's fields.
# The map keys represent field names.
# A simple field name contains only characters `a` to `z`, `A` to `Z`,
# `0` to `9`, or `_`, and must not start with `0` to `9` or `_`. For example,
# `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
# `foo_bar_17`.
# Field names matching the regular expression `__.*__` are reserved. Reserved
# field names are forbidden except in certain documented contexts. The map

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/pubsub/docs
module PubsubV1
VERSION = 'V1'
REVISION = '20170918'
REVISION = '20171120'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -82,6 +82,33 @@ module Google
end
end
# Request for the `CreateSnapshot` method.
class CreateSnapshotRequest
include Google::Apis::Core::Hashable
# 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``.
# Corresponds to the JSON property `subscription`
# @return [String]
attr_accessor :subscription
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@subscription = args[:subscription] if args.key?(:subscription)
end
end
# A generic empty message that you can re-use to avoid defining duplicated
# empty messages in your APIs. A typical example is to use it as the request
# or the response type of an API method. For instance:
@ -101,6 +128,32 @@ module Google
end
end
# Response for the `ListSnapshots` method.
class ListSnapshotsResponse
include Google::Apis::Core::Hashable
# If not empty, indicates that there may be more snapshot that match the
# request; this value should be passed in a new `ListSnapshotsRequest`.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The resulting snapshots.
# Corresponds to the JSON property `snapshots`
# @return [Array<Google::Apis::PubsubV1::Snapshot>]
attr_accessor :snapshots
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@snapshots = args[:snapshots] if args.key?(:snapshots)
end
end
# Response for the `ListSubscriptions` method.
class ListSubscriptionsResponse
include Google::Apis::Core::Hashable
@ -128,6 +181,33 @@ module Google
end
end
# Response for the `ListTopicSnapshots` method.
class ListTopicSnapshotsResponse
include Google::Apis::Core::Hashable
# If not empty, indicates that there may be more snapshots that match
# the request; this value should be passed in a new
# `ListTopicSnapshotsRequest` to get more snapshots.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The names of the snapshots that match the request.
# Corresponds to the JSON property `snapshots`
# @return [Array<String>]
attr_accessor :snapshots
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@snapshots = args[:snapshots] if args.key?(:snapshots)
end
end
# Response for the `ListTopicSubscriptions` method.
class ListTopicSubscriptionsResponse
include Google::Apis::Core::Hashable
@ -502,6 +582,56 @@ module Google
end
end
# Request for the `Seek` method.
class SeekRequest
include Google::Apis::Core::Hashable
# 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``.
# Corresponds to the JSON property `snapshot`
# @return [String]
attr_accessor :snapshot
# The time to seek to.
# Messages retained in the subscription that were published before this
# time are marked as acknowledged, and messages retained in the
# subscription that were published after this time are marked as
# unacknowledged. Note that this operation affects only those messages
# retained in the subscription (configured by the combination of
# `message_retention_duration` and `retain_acked_messages`). For example,
# if `time` corresponds to a point before the message retention
# window (or to a point before the system's notion of the subscription
# creation time), only retained messages will be marked as unacknowledged,
# and already-expunged messages will not be restored.
# Corresponds to the JSON property `time`
# @return [String]
attr_accessor :time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@snapshot = args[:snapshot] if args.key?(:snapshot)
@time = args[:time] if args.key?(:time)
end
end
#
class SeekResponse
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Request message for `SetIamPolicy` method.
class SetIamPolicyRequest
include Google::Apis::Core::Hashable
@ -546,6 +676,46 @@ module Google
end
end
# A snapshot resource.
class Snapshot
include Google::Apis::Core::Hashable
# The snapshot is guaranteed to exist up until this time.
# A newly-created snapshot expires no later than 7 days from the time of its
# creation. Its exact lifetime is determined at creation by the existing
# backlog in the source subscription. Specifically, the lifetime of the
# snapshot is `7 days - (age of oldest unacked message in the subscription)`.
# For example, consider a subscription whose oldest unacked message is 3 days
# old. If a snapshot is created from this subscription, the snapshot -- which
# will always capture this 3-day-old backlog as long as the snapshot
# exists -- will expire in 4 days. The service will refuse to create a
# snapshot that would expire in less than 1 hour after creation.
# Corresponds to the JSON property `expireTime`
# @return [String]
attr_accessor :expire_time
# The name of the snapshot.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The name of the topic from which this snapshot is retaining messages.
# Corresponds to the JSON property `topic`
# @return [String]
attr_accessor :topic
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@expire_time = args[:expire_time] if args.key?(:expire_time)
@name = args[:name] if args.key?(:name)
@topic = args[:topic] if args.key?(:topic)
end
end
# A subscription resource.
class Subscription
include Google::Apis::Core::Hashable
@ -571,6 +741,16 @@ module Google
# @return [Fixnum]
attr_accessor :ack_deadline_seconds
# How long to retain unacknowledged messages in the subscription's backlog,
# from the moment a message is published.
# If `retain_acked_messages` is true, then this also configures the retention
# of acknowledged messages, and thus configures how far back in time a `Seek`
# can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
# minutes.
# Corresponds to the JSON property `messageRetentionDuration`
# @return [String]
attr_accessor :message_retention_duration
# The name of the subscription. It must have the format
# `"projects/`project`/subscriptions/`subscription`"`. ``subscription`` must
# start with a letter, and contain only letters (`[A-Za-z]`), numbers
@ -586,6 +766,15 @@ module Google
# @return [Google::Apis::PubsubV1::PushConfig]
attr_accessor :push_config
# Indicates whether to retain acknowledged messages. If true, then
# messages are not expunged from the subscription's backlog, even if they are
# acknowledged, until they fall out of the `message_retention_duration`
# window.
# Corresponds to the JSON property `retainAckedMessages`
# @return [Boolean]
attr_accessor :retain_acked_messages
alias_method :retain_acked_messages?, :retain_acked_messages
# The name of the topic from which this subscription is receiving messages.
# Format is `projects/`project`/topics/`topic``.
# The value of this field will be `_deleted-topic_` if the topic has been
@ -601,8 +790,10 @@ module Google
# Update properties of this object
def update!(**args)
@ack_deadline_seconds = args[:ack_deadline_seconds] if args.key?(:ack_deadline_seconds)
@message_retention_duration = args[:message_retention_duration] if args.key?(:message_retention_duration)
@name = args[:name] if args.key?(:name)
@push_config = args[:push_config] if args.key?(:push_config)
@retain_acked_messages = args[:retain_acked_messages] if args.key?(:retain_acked_messages)
@topic = args[:topic] if args.key?(:topic)
end
end
@ -672,6 +863,58 @@ module Google
@name = args[:name] if args.key?(:name)
end
end
# Request for the UpdateSnapshot method.
class UpdateSnapshotRequest
include Google::Apis::Core::Hashable
# A snapshot resource.
# Corresponds to the JSON property `snapshot`
# @return [Google::Apis::PubsubV1::Snapshot]
attr_accessor :snapshot
# Indicates which fields in the provided snapshot to update.
# Must be specified and non-empty.
# Corresponds to the JSON property `updateMask`
# @return [String]
attr_accessor :update_mask
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@snapshot = args[:snapshot] if args.key?(:snapshot)
@update_mask = args[:update_mask] if args.key?(:update_mask)
end
end
# Request for the UpdateSubscription method.
class UpdateSubscriptionRequest
include Google::Apis::Core::Hashable
# A subscription resource.
# Corresponds to the JSON property `subscription`
# @return [Google::Apis::PubsubV1::Subscription]
attr_accessor :subscription
# Indicates which fields in the provided subscription to update.
# Must be specified and non-empty.
# Corresponds to the JSON property `updateMask`
# @return [String]
attr_accessor :update_mask
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@subscription = args[:subscription] if args.key?(:subscription)
@update_mask = args[:update_mask] if args.key?(:update_mask)
end
end
end
end
end

View File

@ -34,18 +34,36 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class CreateSnapshotRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListSnapshotsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListSubscriptionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListTopicSnapshotsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListTopicSubscriptionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -118,12 +136,30 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class SeekRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SeekResponse
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 Snapshot
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Subscription
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -148,6 +184,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class UpdateSnapshotRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class UpdateSubscriptionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AcknowledgeRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -163,12 +211,28 @@ module Google
end
end
class CreateSnapshotRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :subscription, as: 'subscription'
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class ListSnapshotsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :snapshots, as: 'snapshots', class: Google::Apis::PubsubV1::Snapshot, decorator: Google::Apis::PubsubV1::Snapshot::Representation
end
end
class ListSubscriptionsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -178,6 +242,14 @@ module Google
end
end
class ListTopicSnapshotsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :snapshots, as: 'snapshots'
end
end
class ListTopicSubscriptionsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -279,6 +351,20 @@ module Google
end
end
class SeekRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :snapshot, as: 'snapshot'
property :time, as: 'time'
end
end
class SeekResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class SetIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -287,13 +373,24 @@ module Google
end
end
class Snapshot
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :expire_time, as: 'expireTime'
property :name, as: 'name'
property :topic, as: 'topic'
end
end
class Subscription
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :ack_deadline_seconds, as: 'ackDeadlineSeconds'
property :message_retention_duration, as: 'messageRetentionDuration'
property :name, as: 'name'
property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1::PushConfig, decorator: Google::Apis::PubsubV1::PushConfig::Representation
property :retain_acked_messages, as: 'retainAckedMessages'
property :topic, as: 'topic'
end
end
@ -318,6 +415,24 @@ module Google
property :name, as: 'name'
end
end
class UpdateSnapshotRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :snapshot, as: 'snapshot', class: Google::Apis::PubsubV1::Snapshot, decorator: Google::Apis::PubsubV1::Snapshot::Representation
property :update_mask, as: 'updateMask'
end
end
class UpdateSubscriptionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :subscription, as: 'subscription', class: Google::Apis::PubsubV1::Subscription, decorator: Google::Apis::PubsubV1::Subscription::Representation
property :update_mask, as: 'updateMask'
end
end
end
end
end

View File

@ -47,6 +47,89 @@ module Google
@batch_path = 'batch'
end
# Creates a snapshot from the requested subscription.
# If the snapshot already exists, returns `ALREADY_EXISTS`.
# If the requested subscription doesn't exist, returns `NOT_FOUND`.
# If the backlog in the subscription is too old -- and the resulting snapshot
# would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
# See also the `Snapshot.expire_time` field.
# 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, conforming
# to the
# [resource name
# format](https://cloud.google.com/pubsub/docs/overview#names). The generated
# name is populated in the returned Snapshot object. Note that for REST API
# requests, you must specify a name in the request.
# @param [String] name
# 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``.
# @param [Google::Apis::PubsubV1::CreateSnapshotRequest] create_snapshot_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::Snapshot] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::PubsubV1::Snapshot]
#
# @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_snapshot(name, create_snapshot_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'v1/{+name}', options)
command.request_representation = Google::Apis::PubsubV1::CreateSnapshotRequest::Representation
command.request_object = create_snapshot_request_object
command.response_representation = Google::Apis::PubsubV1::Snapshot::Representation
command.response_class = Google::Apis::PubsubV1::Snapshot
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
# Removes an existing snapshot. All messages retained in the snapshot
# are immediately dropped. After a snapshot is deleted, a new one may be
# 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 [String] snapshot
# The name of the snapshot to delete.
# Format is `projects/`project`/snapshots/`snap``.
# @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_project_snapshot(snapshot, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+snapshot}', options)
command.response_representation = Google::Apis::PubsubV1::Empty::Representation
command.response_class = Google::Apis::PubsubV1::Empty
command.params['snapshot'] = snapshot unless snapshot.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.
@ -80,6 +163,79 @@ module Google
execute_or_queue_command(command, &block)
end
# Lists the existing snapshots.
# @param [String] project
# The name of the cloud project that snapshots belong to.
# Format is `projects/`project``.
# @param [Fixnum] page_size
# Maximum number of snapshots to return.
# @param [String] page_token
# The value returned by the last `ListSnapshotsResponse`; indicates that this
# is a continuation of a prior `ListSnapshots` 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::ListSnapshotsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::PubsubV1::ListSnapshotsResponse]
#
# @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_project_snapshots(project, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+project}/snapshots', options)
command.response_representation = Google::Apis::PubsubV1::ListSnapshotsResponse::Representation
command.response_class = Google::Apis::PubsubV1::ListSnapshotsResponse
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
# Updates an existing snapshot. Note that certain properties of a
# snapshot are not modifiable.
# @param [String] name
# The name of the snapshot.
# @param [Google::Apis::PubsubV1::UpdateSnapshotRequest] update_snapshot_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::Snapshot] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::PubsubV1::Snapshot]
#
# @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 patch_project_snapshot(name, update_snapshot_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/{+name}', options)
command.request_representation = Google::Apis::PubsubV1::UpdateSnapshotRequest::Representation
command.request_object = update_snapshot_request_object
command.response_representation = Google::Apis::PubsubV1::Snapshot::Representation
command.response_class = Google::Apis::PubsubV1::Snapshot
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
@ -453,6 +609,45 @@ module Google
execute_or_queue_command(command, &block)
end
# Updates an existing subscription. Note that certain properties of a
# subscription, such as its topic, are not modifiable.
# @param [String] name
# The name of the subscription. It must have the format
# `"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 [Google::Apis::PubsubV1::UpdateSubscriptionRequest] update_subscription_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::Subscription] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::PubsubV1::Subscription]
#
# @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 patch_project_subscription(name, update_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/{+name}', options)
command.request_representation = Google::Apis::PubsubV1::UpdateSubscriptionRequest::Representation
command.request_object = update_subscription_request_object
command.response_representation = Google::Apis::PubsubV1::Subscription::Representation
command.response_class = Google::Apis::PubsubV1::Subscription
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
# Pulls messages from the server. Returns an empty list if there are no
# messages available in the backlog. The server may return `UNAVAILABLE` if
# there are too many concurrent pull requests pending for the given
@ -490,6 +685,40 @@ module Google
execute_or_queue_command(command, &block)
end
# Seeks an existing subscription to a point in time or to a given snapshot,
# whichever is provided in the request.
# @param [String] subscription
# The subscription to affect.
# @param [Google::Apis::PubsubV1::SeekRequest] seek_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::SeekResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::PubsubV1::SeekResponse]
#
# @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 seek_subscription(subscription, seek_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+subscription}:seek', options)
command.request_representation = Google::Apis::PubsubV1::SeekRequest::Representation
command.request_object = seek_request_object
command.response_representation = Google::Apis::PubsubV1::SeekResponse::Representation
command.response_class = Google::Apis::PubsubV1::SeekResponse
command.params['subscription'] = subscription unless subscription.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
@ -850,7 +1079,46 @@ module Google
execute_or_queue_command(command, &block)
end
# Lists the name of the subscriptions for this topic.
# Lists the names of the snapshots on this topic.
# @param [String] topic
# The name of the topic that snapshots are attached to.
# Format is `projects/`project`/topics/`topic``.
# @param [Fixnum] page_size
# Maximum number of snapshot names to return.
# @param [String] page_token
# The value returned by the last `ListTopicSnapshotsResponse`; indicates
# that this is a continuation of a prior `ListTopicSnapshots` 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::ListTopicSnapshotsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::PubsubV1::ListTopicSnapshotsResponse]
#
# @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_project_topic_snapshots(topic, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+topic}/snapshots', options)
command.response_representation = Google::Apis::PubsubV1::ListTopicSnapshotsResponse::Representation
command.response_class = Google::Apis::PubsubV1::ListTopicSnapshotsResponse
command.params['topic'] = topic unless topic.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
# Lists the names of the subscriptions on this topic.
# @param [String] topic
# The name of the topic that subscriptions are attached to.
# Format is `projects/`project`/topics/`topic``.

View File

@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/youtube/v3
module YoutubeV3
VERSION = 'V3'
REVISION = '20171101'
REVISION = '20171129'
# Manage your YouTube account
AUTH_YOUTUBE = 'https://www.googleapis.com/auth/youtube'

View File

@ -3747,6 +3747,12 @@ module Google
# @return [String]
attr_accessor :closed_captions_type
# This setting indicates whether auto start is enabled for this broadcast.
# Corresponds to the JSON property `enableAutoStart`
# @return [Boolean]
attr_accessor :enable_auto_start
alias_method :enable_auto_start?, :enable_auto_start
# This setting indicates whether HTTP POST closed captioning is enabled for this
# broadcast. The ingestion URL of the closed captions is returned through the
# liveStreams API. This is mutually exclusive with using the
@ -3845,6 +3851,7 @@ module Google
@bound_stream_id = args[:bound_stream_id] if args.key?(:bound_stream_id)
@bound_stream_last_update_time_ms = args[:bound_stream_last_update_time_ms] if args.key?(:bound_stream_last_update_time_ms)
@closed_captions_type = args[:closed_captions_type] if args.key?(:closed_captions_type)
@enable_auto_start = args[:enable_auto_start] if args.key?(:enable_auto_start)
@enable_closed_captions = args[:enable_closed_captions] if args.key?(:enable_closed_captions)
@enable_content_encryption = args[:enable_content_encryption] if args.key?(:enable_content_encryption)
@enable_dvr = args[:enable_dvr] if args.key?(:enable_dvr)
@ -6956,6 +6963,11 @@ module Google
class Video
include Google::Apis::Core::Hashable
# The access token to uniquely identify a revocable unlisted video.
# Corresponds to the JSON property `accessToken`
# @return [String]
attr_accessor :access_token
# Age restriction details related to a video. This data can only be retrieved by
# the video owner.
# Corresponds to the JSON property `ageGating`
@ -7060,6 +7072,7 @@ module Google
# Update properties of this object
def update!(**args)
@access_token = args[:access_token] if args.key?(:access_token)
@age_gating = args[:age_gating] if args.key?(:age_gating)
@content_details = args[:content_details] if args.key?(:content_details)
@etag = args[:etag] if args.key?(:etag)

View File

@ -2035,6 +2035,7 @@ module Google
property :bound_stream_last_update_time_ms, as: 'boundStreamLastUpdateTimeMs', type: DateTime
property :closed_captions_type, as: 'closedCaptionsType'
property :enable_auto_start, as: 'enableAutoStart'
property :enable_closed_captions, as: 'enableClosedCaptions'
property :enable_content_encryption, as: 'enableContentEncryption'
property :enable_dvr, as: 'enableDvr'
@ -2902,6 +2903,7 @@ module Google
class Video
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :access_token, as: 'accessToken'
property :age_gating, as: 'ageGating', class: Google::Apis::YoutubeV3::VideoAgeGating, decorator: Google::Apis::YoutubeV3::VideoAgeGating::Representation
property :content_details, as: 'contentDetails', class: Google::Apis::YoutubeV3::VideoContentDetails, decorator: Google::Apis::YoutubeV3::VideoContentDetails::Representation