Autogenerated update (2019-12-13)

Delete:
- fusiontables_v1
- fusiontables_v2

Update:
- cloudasset_v1
- cloudkms_v1
- datastore_v1
- datastore_v1beta3
- firebaserules_v1
- logging_v2
This commit is contained in:
Google APIs 2019-12-13 00:37:03 +00:00
parent 26bb4d3f05
commit 3efc10fb88
32 changed files with 3796 additions and 5829 deletions

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/quickstart-cloud-asset-inventory
module CloudassetV1
VERSION = 'V1'
REVISION = '20191130'
REVISION = '20191207'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -409,6 +409,55 @@ module Google
end
end
# Create asset feed request.
class CreateFeedRequest
include Google::Apis::Core::Hashable
# An asset feed used to export asset updates to a destinations.
# An asset feed filter controls what updates are exported.
# The asset feed must be created within a project, organization, or
# folder. Supported destinations are:
# Cloud Pub/Sub topics.
# Corresponds to the JSON property `feed`
# @return [Google::Apis::CloudassetV1::Feed]
attr_accessor :feed
# Required. This is the client-assigned asset feed identifier and it needs to
# be unique under a specific parent project/folder/organization.
# Corresponds to the JSON property `feedId`
# @return [String]
attr_accessor :feed_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@feed = args[:feed] if args.key?(:feed)
@feed_id = args[:feed_id] if args.key?(:feed_id)
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:
# service Foo `
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
# `
# The JSON representation for `Empty` is empty JSON object ````.
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Export asset request.
class ExportAssetsRequest
include Google::Apis::Core::Hashable
@ -502,6 +551,93 @@ module Google
end
end
# An asset feed used to export asset updates to a destinations.
# An asset feed filter controls what updates are exported.
# The asset feed must be created within a project, organization, or
# folder. Supported destinations are:
# Cloud Pub/Sub topics.
class Feed
include Google::Apis::Core::Hashable
# A list of the full names of the assets to receive updates. You must specify
# either or both of asset_names and asset_types. Only asset updates matching
# specified asset_names and asset_types are exported to the feed. For
# example:
# `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/
# instance1`.
# See [Resource
# Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
# for more info.
# Corresponds to the JSON property `assetNames`
# @return [Array<String>]
attr_accessor :asset_names
# A list of types of the assets to receive updates. You must specify either
# or both of asset_names and asset_types. Only asset updates matching
# specified asset_names and asset_types are exported to the feed.
# For example:
# "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
# Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-
# inventory/overview)
# for all supported asset types.
# Corresponds to the JSON property `assetTypes`
# @return [Array<String>]
attr_accessor :asset_types
# Asset content type. If not specified, no content but the asset name and
# type will be returned.
# Corresponds to the JSON property `contentType`
# @return [String]
attr_accessor :content_type
# Output configuration for asset feed destination.
# Corresponds to the JSON property `feedOutputConfig`
# @return [Google::Apis::CloudassetV1::FeedOutputConfig]
attr_accessor :feed_output_config
# Required. The format will be
# projects/`project_number`/feeds/`client-assigned_feed_identifier` or
# folders/`folder_number`/feeds/`client-assigned_feed_identifier` or
# organizations/`organization_number`/feeds/`client-assigned_feed_identifier`
# The client-assigned feed identifier must be unique within the parent
# project/folder/organization.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@asset_names = args[:asset_names] if args.key?(:asset_names)
@asset_types = args[:asset_types] if args.key?(:asset_types)
@content_type = args[:content_type] if args.key?(:content_type)
@feed_output_config = args[:feed_output_config] if args.key?(:feed_output_config)
@name = args[:name] if args.key?(:name)
end
end
# Output configuration for asset feed destination.
class FeedOutputConfig
include Google::Apis::Core::Hashable
# A Cloud Pubsub destination.
# Corresponds to the JSON property `pubsubDestination`
# @return [Google::Apis::CloudassetV1::PubsubDestination]
attr_accessor :pubsub_destination
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@pubsub_destination = args[:pubsub_destination] if args.key?(:pubsub_destination)
end
end
# A Cloud Storage location.
class GcsDestination
include Google::Apis::Core::Hashable
@ -1301,6 +1437,25 @@ module Google
end
end
#
class ListFeedsResponse
include Google::Apis::Core::Hashable
# A list of feeds.
# Corresponds to the JSON property `feeds`
# @return [Array<Google::Apis::CloudassetV1::Feed>]
attr_accessor :feeds
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@feeds = args[:feeds] if args.key?(:feeds)
end
end
# This resource represents a long-running operation that is the result of a
# network API call.
class Operation
@ -1510,6 +1665,26 @@ module Google
end
end
# A Cloud Pubsub destination.
class PubsubDestination
include Google::Apis::Core::Hashable
# The name of the Cloud Pub/Sub topic to publish to.
# For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
# 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)
@topic = args[:topic] if args.key?(:topic)
end
end
# Representation of a cloud resource.
class Resource
include Google::Apis::Core::Hashable
@ -1676,6 +1851,37 @@ module Google
@start_time = args[:start_time] if args.key?(:start_time)
end
end
# Update asset feed request.
class UpdateFeedRequest
include Google::Apis::Core::Hashable
# An asset feed used to export asset updates to a destinations.
# An asset feed filter controls what updates are exported.
# The asset feed must be created within a project, organization, or
# folder. Supported destinations are:
# Cloud Pub/Sub topics.
# Corresponds to the JSON property `feed`
# @return [Google::Apis::CloudassetV1::Feed]
attr_accessor :feed
# Required. Only updates the `feed` fields indicated by this mask.
# The field mask must not be empty, and it must not contain fields that
# are immutable or only set by the server.
# 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)
@feed = args[:feed] if args.key?(:feed)
@update_mask = args[:update_mask] if args.key?(:update_mask)
end
end
end
end
end

View File

@ -58,6 +58,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class CreateFeedRequest
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 ExportAssetsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -70,6 +82,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Feed
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class FeedOutputConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GcsDestination
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -148,6 +172,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ListFeedsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -166,6 +196,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class PubsubDestination
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Resource
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -190,6 +226,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class UpdateFeedRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Asset
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -255,6 +297,21 @@ module Google
end
end
class CreateFeedRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :feed, as: 'feed', class: Google::Apis::CloudassetV1::Feed, decorator: Google::Apis::CloudassetV1::Feed::Representation
property :feed_id, as: 'feedId'
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class ExportAssetsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -276,6 +333,26 @@ module Google
end
end
class Feed
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :asset_names, as: 'assetNames'
collection :asset_types, as: 'assetTypes'
property :content_type, as: 'contentType'
property :feed_output_config, as: 'feedOutputConfig', class: Google::Apis::CloudassetV1::FeedOutputConfig, decorator: Google::Apis::CloudassetV1::FeedOutputConfig::Representation
property :name, as: 'name'
end
end
class FeedOutputConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :pubsub_destination, as: 'pubsubDestination', class: Google::Apis::CloudassetV1::PubsubDestination, decorator: Google::Apis::CloudassetV1::PubsubDestination::Representation
end
end
class GcsDestination
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -415,6 +492,14 @@ module Google
end
end
class ListFeedsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :feeds, as: 'feeds', class: Google::Apis::CloudassetV1::Feed, decorator: Google::Apis::CloudassetV1::Feed::Representation
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -449,6 +534,13 @@ module Google
end
end
class PubsubDestination
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :topic, as: 'topic'
end
end
class Resource
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -488,6 +580,15 @@ module Google
property :start_time, as: 'startTime'
end
end
class UpdateFeedRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :feed, as: 'feed', class: Google::Apis::CloudassetV1::Feed, decorator: Google::Apis::CloudassetV1::Feed::Representation
property :update_mask, as: 'updateMask'
end
end
end
end
end

View File

@ -47,6 +47,180 @@ module Google
@batch_path = 'batch'
end
# Creates a feed in a parent project/folder/organization to listen to its
# asset updates.
# @param [String] parent
# Required. The name of the project/folder/organization where this feed
# should be created in. It can only be an organization number (such as
# "organizations/123"), a folder number (such as "folders/123"), a project ID
# (such as "projects/my-project-id")", or a project number (such as
# "projects/12345").
# @param [Google::Apis::CloudassetV1::CreateFeedRequest] create_feed_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::CloudassetV1::Feed] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudassetV1::Feed]
#
# @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_feed(parent, create_feed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/feeds', options)
command.request_representation = Google::Apis::CloudassetV1::CreateFeedRequest::Representation
command.request_object = create_feed_request_object
command.response_representation = Google::Apis::CloudassetV1::Feed::Representation
command.response_class = Google::Apis::CloudassetV1::Feed
command.params['parent'] = parent unless parent.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 an asset feed.
# @param [String] name
# Required. The name of the feed and it must be in the format of:
# projects/project_number/feeds/feed_id
# folders/folder_number/feeds/feed_id
# organizations/organization_number/feeds/feed_id
# @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::CloudassetV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudassetV1::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_feed(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudassetV1::Empty::Representation
command.response_class = Google::Apis::CloudassetV1::Empty
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
# Gets details about an asset feed.
# @param [String] name
# Required. The name of the Feed and it must be in the format of:
# projects/project_number/feeds/feed_id
# folders/folder_number/feeds/feed_id
# organizations/organization_number/feeds/feed_id
# @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::CloudassetV1::Feed] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudassetV1::Feed]
#
# @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_feed(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudassetV1::Feed::Representation
command.response_class = Google::Apis::CloudassetV1::Feed
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 all asset feeds in a parent project/folder/organization.
# @param [String] parent
# Required. The parent project/folder/organization whose feeds are to be
# listed. It can only be using project/folder/organization number (such as
# "folders/12345")", or a project ID (such as "projects/my-project-id").
# @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::CloudassetV1::ListFeedsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudassetV1::ListFeedsResponse]
#
# @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_feeds(parent, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/feeds', options)
command.response_representation = Google::Apis::CloudassetV1::ListFeedsResponse::Representation
command.response_class = Google::Apis::CloudassetV1::ListFeedsResponse
command.params['parent'] = parent unless parent.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 asset feed configuration.
# @param [String] name
# Required. The format will be
# projects/`project_number`/feeds/`client-assigned_feed_identifier` or
# folders/`folder_number`/feeds/`client-assigned_feed_identifier` or
# organizations/`organization_number`/feeds/`client-assigned_feed_identifier`
# The client-assigned feed identifier must be unique within the parent
# project/folder/organization.
# @param [Google::Apis::CloudassetV1::UpdateFeedRequest] update_feed_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::CloudassetV1::Feed] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudassetV1::Feed]
#
# @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_feed(name, update_feed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/{+name}', options)
command.request_representation = Google::Apis::CloudassetV1::UpdateFeedRequest::Representation
command.request_object = update_feed_request_object
command.response_representation = Google::Apis::CloudassetV1::Feed::Representation
command.response_class = Google::Apis::CloudassetV1::Feed
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
# Gets the latest state of a long-running operation. Clients can use this
# method to poll the operation result at intervals as recommended by the API
# service.

View File

@ -26,7 +26,7 @@ module Google
# @see https://cloud.google.com/kms/
module CloudkmsV1
VERSION = 'V1'
REVISION = '20191118'
REVISION = '20191210'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -242,6 +242,23 @@ module Google
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
# * `group:`emailid``: An email address that represents a Google group.
# For example, `admins@example.com`.
# * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a user that has been recently deleted. For
# example, `alice@example.com?uid=123456789012345678901`. If the user is
# recovered, this value reverts to `user:`emailid`` and the recovered user
# retains the role in the binding.
# * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus
# unique identifier) representing a service account that has been recently
# deleted. For example,
# `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
# If the service account is undeleted, this value reverts to
# `serviceAccount:`emailid`` and the undeleted service account retains the
# role in the binding.
# * `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a Google group that has been recently
# deleted. For example, `admins@example.com?uid=123456789012345678901`. If
# the group is recovered, this value reverts to `group:`emailid`` and the
# recovered group retains the role in the binding.
# * `domain:`domain``: The G Suite domain (primary) that represents all the
# users of that domain. For example, `google.com` or `example.com`.
# Corresponds to the JSON property `members`
@ -400,6 +417,13 @@ module Google
# @return [String]
attr_accessor :destroy_time
# [ExternalProtectionLevelOptions] stores a group of additional fields for
# configuring a [CryptoKeyVersion] that are specific to the [EXTERNAL]
# protection level.
# Corresponds to the JSON property `externalProtectionLevelOptions`
# @return [Google::Apis::CloudkmsV1::ExternalProtectionLevelOptions]
attr_accessor :external_protection_level_options
# Output only. The time this CryptoKeyVersion's key material was
# generated.
# Corresponds to the JSON property `generateTime`
@ -454,6 +478,7 @@ module Google
@create_time = args[:create_time] if args.key?(:create_time)
@destroy_event_time = args[:destroy_event_time] if args.key?(:destroy_event_time)
@destroy_time = args[:destroy_time] if args.key?(:destroy_time)
@external_protection_level_options = args[:external_protection_level_options] if args.key?(:external_protection_level_options)
@generate_time = args[:generate_time] if args.key?(:generate_time)
@import_failure_reason = args[:import_failure_reason] if args.key?(:import_failure_reason)
@import_job = args[:import_job] if args.key?(:import_job)
@ -708,6 +733,27 @@ module Google
end
end
# [ExternalProtectionLevelOptions] stores a group of additional fields for
# configuring a [CryptoKeyVersion] that are specific to the [EXTERNAL]
# protection level.
class ExternalProtectionLevelOptions
include Google::Apis::Core::Hashable
# The URI for an external resource that this CryptoKeyVersion represents.
# Corresponds to the JSON property `externalKeyUri`
# @return [String]
attr_accessor :external_key_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@external_key_uri = args[:external_key_uri] if args.key?(:external_key_uri)
end
end
# Request message for KeyManagementService.ImportCryptoKeyVersion.
class ImportCryptoKeyVersionRequest
include Google::Apis::Core::Hashable
@ -1148,16 +1194,18 @@ module Google
end
end
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
# An Identity and Access Management (IAM) policy, which specifies access
# controls for Google Cloud resources.
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
# `members` to a single `role`. Members can be user accounts, service accounts,
# Google groups, and domains (such as G Suite). A `role` is a named list of
# permissions (defined by IAM or configured by users). A `binding` can
# optionally specify a `condition`, which is a logic expression that further
# constrains the role binding based on attributes about the request and/or
# target resource.
# **JSON Example**
# permissions; each `role` can be an IAM predefined role or a user-created
# custom role.
# Optionally, a `binding` can specify a `condition`, which is a logical
# expression that allows access to a resource only if the expression evaluates
# to `true`. A condition can add constraints based on attributes of the
# request, the resource, or both.
# **JSON example:**
# `
# "bindings": [
# `
@ -1175,13 +1223,15 @@ module Google
# "condition": `
# "title": "expirable access",
# "description": "Does not grant access after Sep 2020",
# "expression": "request.time <
# timestamp('2020-10-01T00:00:00.000Z')",
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')
# ",
# `
# `
# ]
# ],
# "etag": "BwWWja0YfJA=",
# "version": 3
# `
# **YAML Example**
# **YAML example:**
# bindings:
# - members:
# - user:mike@example.com
@ -1196,8 +1246,10 @@ module Google
# title: expirable access
# description: Does not grant access after Sep 2020
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
# - etag: BwWWja0YfJA=
# - version: 3
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam/docs).
# [IAM documentation](https://cloud.google.com/iam/docs/).
class Policy
include Google::Apis::Core::Hashable
@ -1206,9 +1258,9 @@ module Google
# @return [Array<Google::Apis::CloudkmsV1::AuditConfig>]
attr_accessor :audit_configs
# Associates a list of `members` to a `role`. Optionally may specify a
# `condition` that determines when binding is in effect.
# `bindings` with no members will result in an error.
# Associates a list of `members` to a `role`. Optionally, may specify a
# `condition` that determines how and when the `bindings` are applied. Each
# of the `bindings` must contain at least one member.
# Corresponds to the JSON property `bindings`
# @return [Array<Google::Apis::CloudkmsV1::Binding>]
attr_accessor :bindings
@ -1220,26 +1272,31 @@ module Google
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
# systems are expected to put that etag in the request to `setIamPolicy` to
# ensure that their change will be applied to the same version of the policy.
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
# policy is overwritten. Due to blind-set semantics of an etag-less policy,
# 'setIamPolicy' will not fail even if the incoming policy version does not
# meet the requirements for modifying the stored policy.
# **Important:** If you use IAM Conditions, you must include the `etag` field
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
# you to overwrite a version `3` policy with a version `1` policy, and all of
# the conditions in the version `3` policy are lost.
# Corresponds to the JSON property `etag`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :etag
# Specifies the format of the policy.
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
# rejected.
# Operations affecting conditional bindings must specify version 3. This can
# be either setting a conditional policy, modifying a conditional binding,
# or removing a binding (conditional or unconditional) from the stored
# conditional policy.
# Operations on non-conditional policies may specify any valid value or
# leave the field unset.
# If no etag is provided in the call to `setIamPolicy`, version compliance
# checks against the stored policy is skipped.
# Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
# are rejected.
# Any operation that affects conditional role bindings must specify version
# `3`. This requirement applies to the following operations:
# * Getting a policy that includes a conditional role binding
# * Adding a conditional role binding to a policy
# * Changing a conditional role binding in a policy
# * Removing any role binding, with or without a condition, from a policy
# that includes conditions
# **Important:** If you use IAM Conditions, you must include the `etag` field
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
# you to overwrite a version `3` policy with a version `1` policy, and all of
# the conditions in the version `3` policy are lost.
# If a policy does not include any conditions, operations on that policy may
# specify any valid version or leave the field unset.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version
@ -1305,16 +1362,18 @@ module Google
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.
# An Identity and Access Management (IAM) policy, which specifies access
# controls for Google Cloud resources.
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
# `members` to a single `role`. Members can be user accounts, service accounts,
# Google groups, and domains (such as G Suite). A `role` is a named list of
# permissions (defined by IAM or configured by users). A `binding` can
# optionally specify a `condition`, which is a logic expression that further
# constrains the role binding based on attributes about the request and/or
# target resource.
# **JSON Example**
# permissions; each `role` can be an IAM predefined role or a user-created
# custom role.
# Optionally, a `binding` can specify a `condition`, which is a logical
# expression that allows access to a resource only if the expression evaluates
# to `true`. A condition can add constraints based on attributes of the
# request, the resource, or both.
# **JSON example:**
# `
# "bindings": [
# `
@ -1332,13 +1391,15 @@ module Google
# "condition": `
# "title": "expirable access",
# "description": "Does not grant access after Sep 2020",
# "expression": "request.time <
# timestamp('2020-10-01T00:00:00.000Z')",
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')
# ",
# `
# `
# ]
# ],
# "etag": "BwWWja0YfJA=",
# "version": 3
# `
# **YAML Example**
# **YAML example:**
# bindings:
# - members:
# - user:mike@example.com
@ -1353,8 +1414,10 @@ module Google
# title: expirable access
# description: Does not grant access after Sep 2020
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
# - etag: BwWWja0YfJA=
# - version: 3
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam/docs).
# [IAM documentation](https://cloud.google.com/iam/docs/).
# Corresponds to the JSON property `policy`
# @return [Google::Apis::CloudkmsV1::Policy]
attr_accessor :policy

View File

@ -124,6 +124,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ExternalProtectionLevelOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ImportCryptoKeyVersionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -319,6 +325,8 @@ module Google
property :create_time, as: 'createTime'
property :destroy_event_time, as: 'destroyEventTime'
property :destroy_time, as: 'destroyTime'
property :external_protection_level_options, as: 'externalProtectionLevelOptions', class: Google::Apis::CloudkmsV1::ExternalProtectionLevelOptions, decorator: Google::Apis::CloudkmsV1::ExternalProtectionLevelOptions::Representation
property :generate_time, as: 'generateTime'
property :import_failure_reason, as: 'importFailureReason'
property :import_job, as: 'importJob'
@ -393,6 +401,13 @@ module Google
end
end
class ExternalProtectionLevelOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :external_key_uri, as: 'externalKeyUri'
end
end
class ImportCryptoKeyVersionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -26,7 +26,7 @@ module Google
# @see https://cloud.google.com/datastore/
module DatastoreV1
VERSION = 'V1'
REVISION = '20191020'
REVISION = '20191201'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -26,7 +26,7 @@ module Google
class AllocateIdsRequest
include Google::Apis::Core::Hashable
# A list of keys with incomplete key paths for which to allocate IDs.
# Required. A list of keys with incomplete key paths for which to allocate IDs.
# No key may be reserved/read-only.
# Corresponds to the JSON property `keys`
# @return [Array<Google::Apis::DatastoreV1::Key>]
@ -519,7 +519,7 @@ module Google
# @return [Hash<String,String>]
attr_accessor :labels
# Location for the export metadata and data files.
# Required. Location for the export metadata and data files.
# The full resource URL of the external storage location. Currently, only
# Google Cloud Storage is supported. So output_url_prefix should be of the
# form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the
@ -654,7 +654,8 @@ module Google
# @return [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1EntityFilter]
attr_accessor :entity_filter
# The full resource URL of the external storage location. Currently, only
# Required. The full resource URL of the external storage location. Currently,
# only
# Google Cloud Storage is supported. So input_url should be of the form:
# `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`, where
# `BUCKET_NAME` is the name of the Cloud Storage bucket, `NAMESPACE_PATH` is
@ -692,38 +693,32 @@ module Google
class GoogleDatastoreAdminV1Index
include Google::Apis::Core::Hashable
# The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
# Required.
# Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
# Corresponds to the JSON property `ancestor`
# @return [String]
attr_accessor :ancestor
# The resource ID of the index.
# Output only.
# Output only. The resource ID of the index.
# Corresponds to the JSON property `indexId`
# @return [String]
attr_accessor :index_id
# The entity kind to which this index applies.
# Required.
# Required. The entity kind to which this index applies.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Project ID.
# Output only.
# Output only. Project ID.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# An ordered sequence of property names and their index attributes.
# Required.
# Required. An ordered sequence of property names and their index attributes.
# Corresponds to the JSON property `properties`
# @return [Array<Google::Apis::DatastoreV1::GoogleDatastoreAdminV1IndexedProperty>]
attr_accessor :properties
# The state of the index.
# Output only.
# Output only. The state of the index.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
@ -778,14 +773,12 @@ module Google
class GoogleDatastoreAdminV1IndexedProperty
include Google::Apis::Core::Hashable
# The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
# Required.
# Required. The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
# Corresponds to the JSON property `direction`
# @return [String]
attr_accessor :direction
# The property name to index.
# Required.
# Required. The property name to index.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
@ -1384,7 +1377,7 @@ module Google
class LookupRequest
include Google::Apis::Core::Hashable
# Keys of entities to look up.
# Required. Keys of entities to look up.
# Corresponds to the JSON property `keys`
# @return [Array<Google::Apis::DatastoreV1::Key>]
attr_accessor :keys
@ -1935,7 +1928,8 @@ module Google
# @return [String]
attr_accessor :database_id
# A list of keys with complete key paths whose numeric IDs should not be
# Required. A list of keys with complete key paths whose numeric IDs should not
# be
# auto-allocated.
# Corresponds to the JSON property `keys`
# @return [Array<Google::Apis::DatastoreV1::Key>]
@ -1969,7 +1963,7 @@ module Google
class RollbackRequest
include Google::Apis::Core::Hashable
# The transaction identifier, returned by a call to
# Required. The transaction identifier, returned by a call to
# Datastore.BeginTransaction.
# Corresponds to the JSON property `transaction`
# NOTE: Values are automatically base64 encoded/decoded in the client library.

View File

@ -51,7 +51,7 @@ module Google
# Allocates IDs for the given keys, which is useful for referencing an entity
# before it is inserted.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::AllocateIdsRequest] allocate_ids_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -84,7 +84,7 @@ module Google
# Begins a new transaction.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::BeginTransactionRequest] begin_transaction_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -118,7 +118,7 @@ module Google
# Commits a transaction, optionally creating, deleting or modifying some
# entities.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::CommitRequest] commit_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -158,7 +158,7 @@ module Google
# cancelled before completion it may leave partial data behind in Google
# Cloud Storage.
# @param [String] project_id
# Project ID against which to make the request.
# Required. Project ID against which to make the request.
# @param [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1ExportEntitiesRequest] google_datastore_admin_v1_export_entities_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -195,7 +195,7 @@ module Google
# created. If an ImportEntities operation is cancelled, it is possible
# that a subset of the data has already been imported to Cloud Datastore.
# @param [String] project_id
# Project ID against which to make the request.
# Required. Project ID against which to make the request.
# @param [Google::Apis::DatastoreV1::GoogleDatastoreAdminV1ImportEntitiesRequest] google_datastore_admin_v1_import_entities_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -228,7 +228,7 @@ module Google
# Looks up entities by key.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::LookupRequest] lookup_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -260,9 +260,9 @@ module Google
end
# Prevents the supplied keys' IDs from being auto-allocated by Cloud
# Datastore. Used for imports only; other workloads are not supported.
# Datastore.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::ReserveIdsRequest] reserve_ids_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -295,7 +295,7 @@ module Google
# Rolls back a transaction.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::RollbackRequest] rollback_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -328,7 +328,7 @@ module Google
# Queries for entities.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1::RunQueryRequest] run_query_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.

View File

@ -26,7 +26,7 @@ module Google
# @see https://cloud.google.com/datastore/
module DatastoreV1beta3
VERSION = 'V1beta3'
REVISION = '20191020'
REVISION = '20191201'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -26,7 +26,7 @@ module Google
class AllocateIdsRequest
include Google::Apis::Core::Hashable
# A list of keys with incomplete key paths for which to allocate IDs.
# Required. A list of keys with incomplete key paths for which to allocate IDs.
# No key may be reserved/read-only.
# Corresponds to the JSON property `keys`
# @return [Array<Google::Apis::DatastoreV1beta3::Key>]
@ -1051,7 +1051,7 @@ module Google
class LookupRequest
include Google::Apis::Core::Hashable
# Keys of entities to look up.
# Required. Keys of entities to look up.
# Corresponds to the JSON property `keys`
# @return [Array<Google::Apis::DatastoreV1beta3::Key>]
attr_accessor :keys
@ -1602,7 +1602,8 @@ module Google
# @return [String]
attr_accessor :database_id
# A list of keys with complete key paths whose numeric IDs should not be
# Required. A list of keys with complete key paths whose numeric IDs should not
# be
# auto-allocated.
# Corresponds to the JSON property `keys`
# @return [Array<Google::Apis::DatastoreV1beta3::Key>]
@ -1636,7 +1637,7 @@ module Google
class RollbackRequest
include Google::Apis::Core::Hashable
# The transaction identifier, returned by a call to
# Required. The transaction identifier, returned by a call to
# Datastore.BeginTransaction.
# Corresponds to the JSON property `transaction`
# NOTE: Values are automatically base64 encoded/decoded in the client library.

View File

@ -51,7 +51,7 @@ module Google
# Allocates IDs for the given keys, which is useful for referencing an entity
# before it is inserted.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1beta3::AllocateIdsRequest] allocate_ids_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -84,7 +84,7 @@ module Google
# Begins a new transaction.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1beta3::BeginTransactionRequest] begin_transaction_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -118,7 +118,7 @@ module Google
# Commits a transaction, optionally creating, deleting or modifying some
# entities.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1beta3::CommitRequest] commit_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -151,7 +151,7 @@ module Google
# Looks up entities by key.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1beta3::LookupRequest] lookup_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -183,9 +183,9 @@ module Google
end
# Prevents the supplied keys' IDs from being auto-allocated by Cloud
# Datastore. Used for imports only; other workloads are not supported.
# Datastore.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1beta3::ReserveIdsRequest] reserve_ids_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -218,7 +218,7 @@ module Google
# Rolls back a transaction.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1beta3::RollbackRequest] rollback_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
@ -251,7 +251,7 @@ module Google
# Queries for entities.
# @param [String] project_id
# The ID of the project against which to make the request.
# Required. The ID of the project against which to make the request.
# @param [Google::Apis::DatastoreV1beta3::RunQueryRequest] run_query_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.

View File

@ -26,7 +26,7 @@ module Google
# @see https://firebase.google.com/docs/storage/security
module FirebaserulesV1
VERSION = 'V1'
REVISION = '20191115'
REVISION = '20191209'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -72,6 +72,39 @@ module Google
end
end
# Describes where in a file an expression is found and what it was
# evaluated to over the course of its use.
class ExpressionReport
include Google::Apis::Core::Hashable
# Subexpressions
# Corresponds to the JSON property `children`
# @return [Array<Google::Apis::FirebaserulesV1::ExpressionReport>]
attr_accessor :children
# Position in the `Source` content including its line, column number, and an
# index of the `File` in the `Source` message. Used for debug purposes.
# Corresponds to the JSON property `sourcePosition`
# @return [Google::Apis::FirebaserulesV1::SourcePosition]
attr_accessor :source_position
# Values that this expression evaluated to when encountered.
# Corresponds to the JSON property `values`
# @return [Array<Google::Apis::FirebaserulesV1::ValueCount>]
attr_accessor :values
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@children = args[:children] if args.key?(:children)
@source_position = args[:source_position] if args.key?(:source_position)
@values = args[:values] if args.key?(:values)
end
end
# `File` containing source content.
class File
include Google::Apis::Core::Hashable
@ -525,6 +558,11 @@ module Google
# @return [String]
attr_accessor :expectation
# Specifies what should be included in the response.
# Corresponds to the JSON property `expressionReportLevel`
# @return [String]
attr_accessor :expression_report_level
# Optional function mocks for service-defined functions. If not set, any
# service defined function is expected to return an error, which may or may
# not influence the test outcome.
@ -571,6 +609,7 @@ module Google
# Update properties of this object
def update!(**args)
@expectation = args[:expectation] if args.key?(:expectation)
@expression_report_level = args[:expression_report_level] if args.key?(:expression_report_level)
@function_mocks = args[:function_mocks] if args.key?(:function_mocks)
@path_encoding = args[:path_encoding] if args.key?(:path_encoding)
@request = args[:request] if args.key?(:request)
@ -598,6 +637,15 @@ module Google
# @return [Google::Apis::FirebaserulesV1::SourcePosition]
attr_accessor :error_position
# The mapping from expression in the ruleset AST to the values they were
# evaluated to. Partially-nested to mirror AST structure. Note that this
# field is actually tracking expressions and not permission statements in
# contrast to the "visited_expressions" field above. Literal expressions
# are omitted.
# Corresponds to the JSON property `expressionReports`
# @return [Array<Google::Apis::FirebaserulesV1::ExpressionReport>]
attr_accessor :expression_reports
# The set of function calls made to service-defined methods.
# Function calls are included in the order in which they are encountered
# during evaluation, are provided for both mocked and unmocked functions,
@ -633,6 +681,7 @@ module Google
def update!(**args)
@debug_messages = args[:debug_messages] if args.key?(:debug_messages)
@error_position = args[:error_position] if args.key?(:error_position)
@expression_reports = args[:expression_reports] if args.key?(:expression_reports)
@function_calls = args[:function_calls] if args.key?(:function_calls)
@state = args[:state] if args.key?(:state)
@visited_expressions = args[:visited_expressions] if args.key?(:visited_expressions)
@ -743,6 +792,32 @@ module Google
end
end
# Tuple for how many times an Expression was evaluated to a particular
# ExpressionValue.
class ValueCount
include Google::Apis::Core::Hashable
# The amount of times that expression returned.
# Corresponds to the JSON property `count`
# @return [Fixnum]
attr_accessor :count
# The return value of the expression
# Corresponds to the JSON property `value`
# @return [Object]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@count = args[:count] if args.key?(:count)
@value = args[:value] if args.key?(:value)
end
end
# Store the position and access outcome for an expression visited in rules.
class VisitedExpression
include Google::Apis::Core::Hashable

View File

@ -34,6 +34,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ExpressionReport
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class File
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -148,6 +154,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ValueCount
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class VisitedExpression
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -169,6 +181,18 @@ module Google
end
end
class ExpressionReport
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :children, as: 'children', class: Google::Apis::FirebaserulesV1::ExpressionReport, decorator: Google::Apis::FirebaserulesV1::ExpressionReport::Representation
property :source_position, as: 'sourcePosition', class: Google::Apis::FirebaserulesV1::SourcePosition, decorator: Google::Apis::FirebaserulesV1::SourcePosition::Representation
collection :values, as: 'values', class: Google::Apis::FirebaserulesV1::ValueCount, decorator: Google::Apis::FirebaserulesV1::ValueCount::Representation
end
end
class File
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -296,6 +320,7 @@ module Google
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :expectation, as: 'expectation'
property :expression_report_level, as: 'expressionReportLevel'
collection :function_mocks, as: 'functionMocks', class: Google::Apis::FirebaserulesV1::FunctionMock, decorator: Google::Apis::FirebaserulesV1::FunctionMock::Representation
property :path_encoding, as: 'pathEncoding'
@ -310,6 +335,8 @@ module Google
collection :debug_messages, as: 'debugMessages'
property :error_position, as: 'errorPosition', class: Google::Apis::FirebaserulesV1::SourcePosition, decorator: Google::Apis::FirebaserulesV1::SourcePosition::Representation
collection :expression_reports, as: 'expressionReports', class: Google::Apis::FirebaserulesV1::ExpressionReport, decorator: Google::Apis::FirebaserulesV1::ExpressionReport::Representation
collection :function_calls, as: 'functionCalls', class: Google::Apis::FirebaserulesV1::FunctionCall, decorator: Google::Apis::FirebaserulesV1::FunctionCall::Representation
property :state, as: 'state'
@ -355,6 +382,14 @@ module Google
end
end
class ValueCount
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :count, as: 'count'
property :value, as: 'value'
end
end
class VisitedExpression
# @private
class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -1,977 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module FusiontablesV1
# Specifies the minimum and maximum values, the color, opacity, icon and weight
# of a bucket within a StyleSetting.
class Bucket
include Google::Apis::Core::Hashable
# Color of line or the interior of a polygon in #RRGGBB format.
# Corresponds to the JSON property `color`
# @return [String]
attr_accessor :color
# Icon name used for a point.
# Corresponds to the JSON property `icon`
# @return [String]
attr_accessor :icon
# Maximum value in the selected column for a row to be styled according to the
# bucket color, opacity, icon, or weight.
# Corresponds to the JSON property `max`
# @return [Float]
attr_accessor :max
# Minimum value in the selected column for a row to be styled according to the
# bucket color, opacity, icon, or weight.
# Corresponds to the JSON property `min`
# @return [Float]
attr_accessor :min
# Opacity of the color: 0.0 (transparent) to 1.0 (opaque).
# Corresponds to the JSON property `opacity`
# @return [Float]
attr_accessor :opacity
# Width of a line (in pixels).
# Corresponds to the JSON property `weight`
# @return [Fixnum]
attr_accessor :weight
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@color = args[:color] if args.key?(:color)
@icon = args[:icon] if args.key?(:icon)
@max = args[:max] if args.key?(:max)
@min = args[:min] if args.key?(:min)
@opacity = args[:opacity] if args.key?(:opacity)
@weight = args[:weight] if args.key?(:weight)
end
end
# Specifies the id, name and type of a column in a table.
class Column
include Google::Apis::Core::Hashable
# Optional identifier of the base column. If present, this column is derived
# from the specified base column.
# Corresponds to the JSON property `baseColumn`
# @return [Google::Apis::FusiontablesV1::Column::BaseColumn]
attr_accessor :base_column
# Identifier for the column.
# Corresponds to the JSON property `columnId`
# @return [Fixnum]
attr_accessor :column_id
# Optional column description.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Optional column predicate. Used to map table to graph data model (subject,
# predicate,object) See http://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/#
# data-model
# Corresponds to the JSON property `graph_predicate`
# @return [String]
attr_accessor :graph_predicate
# Type name: a template for an individual column.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Required name of the column.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Required type of the column.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@base_column = args[:base_column] if args.key?(:base_column)
@column_id = args[:column_id] if args.key?(:column_id)
@description = args[:description] if args.key?(:description)
@graph_predicate = args[:graph_predicate] if args.key?(:graph_predicate)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@type = args[:type] if args.key?(:type)
end
# Optional identifier of the base column. If present, this column is derived
# from the specified base column.
class BaseColumn
include Google::Apis::Core::Hashable
# The id of the column in the base table from which this column is derived.
# Corresponds to the JSON property `columnId`
# @return [Fixnum]
attr_accessor :column_id
# Offset to the entry in the list of base tables in the table definition.
# Corresponds to the JSON property `tableIndex`
# @return [Fixnum]
attr_accessor :table_index
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@column_id = args[:column_id] if args.key?(:column_id)
@table_index = args[:table_index] if args.key?(:table_index)
end
end
end
# Represents a list of columns in a table.
class ColumnList
include Google::Apis::Core::Hashable
# List of all requested columns.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::FusiontablesV1::Column>]
attr_accessor :items
# Type name: a list of all columns.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token used to access the next page of this result. No token is displayed if
# there are no more pages left.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# Total number of columns for the table.
# Corresponds to the JSON property `totalItems`
# @return [Fixnum]
attr_accessor :total_items
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@total_items = args[:total_items] if args.key?(:total_items)
end
end
# Represents a Geometry object.
class Geometry
include Google::Apis::Core::Hashable
# The list of geometries in this geometry collection.
# Corresponds to the JSON property `geometries`
# @return [Array<Object>]
attr_accessor :geometries
#
# Corresponds to the JSON property `geometry`
# @return [Object]
attr_accessor :geometry
# Type: A collection of geometries.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@geometries = args[:geometries] if args.key?(:geometries)
@geometry = args[:geometry] if args.key?(:geometry)
@type = args[:type] if args.key?(:type)
end
end
# Represents an import request.
class Import
include Google::Apis::Core::Hashable
# Type name: a template for an import request.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The number of rows received from the import request.
# Corresponds to the JSON property `numRowsReceived`
# @return [Fixnum]
attr_accessor :num_rows_received
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@num_rows_received = args[:num_rows_received] if args.key?(:num_rows_received)
end
end
# Represents a line geometry.
class Line
include Google::Apis::Core::Hashable
# The coordinates that define the line.
# Corresponds to the JSON property `coordinates`
# @return [Array<Array<Float>>]
attr_accessor :coordinates
# Type: A line geometry.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@coordinates = args[:coordinates] if args.key?(:coordinates)
@type = args[:type] if args.key?(:type)
end
end
# Represents a LineStyle within a StyleSetting
class LineStyle
include Google::Apis::Core::Hashable
# Color of the line in #RRGGBB format.
# Corresponds to the JSON property `strokeColor`
# @return [String]
attr_accessor :stroke_color
# Represents a StyleFunction within a StyleSetting
# Corresponds to the JSON property `strokeColorStyler`
# @return [Google::Apis::FusiontablesV1::StyleFunction]
attr_accessor :stroke_color_styler
# Opacity of the line : 0.0 (transparent) to 1.0 (opaque).
# Corresponds to the JSON property `strokeOpacity`
# @return [Float]
attr_accessor :stroke_opacity
# Width of the line in pixels.
# Corresponds to the JSON property `strokeWeight`
# @return [Fixnum]
attr_accessor :stroke_weight
# Represents a StyleFunction within a StyleSetting
# Corresponds to the JSON property `strokeWeightStyler`
# @return [Google::Apis::FusiontablesV1::StyleFunction]
attr_accessor :stroke_weight_styler
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@stroke_color = args[:stroke_color] if args.key?(:stroke_color)
@stroke_color_styler = args[:stroke_color_styler] if args.key?(:stroke_color_styler)
@stroke_opacity = args[:stroke_opacity] if args.key?(:stroke_opacity)
@stroke_weight = args[:stroke_weight] if args.key?(:stroke_weight)
@stroke_weight_styler = args[:stroke_weight_styler] if args.key?(:stroke_weight_styler)
end
end
# Represents a point object.
class Point
include Google::Apis::Core::Hashable
# The coordinates that define the point.
# Corresponds to the JSON property `coordinates`
# @return [Array<Float>]
attr_accessor :coordinates
# Point: A point geometry.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@coordinates = args[:coordinates] if args.key?(:coordinates)
@type = args[:type] if args.key?(:type)
end
end
# Represents a PointStyle within a StyleSetting
class PointStyle
include Google::Apis::Core::Hashable
# Name of the icon. Use values defined in http://www.google.com/fusiontables/
# DataSource?dsrcid=308519
# Corresponds to the JSON property `iconName`
# @return [String]
attr_accessor :icon_name
# Represents a StyleFunction within a StyleSetting
# Corresponds to the JSON property `iconStyler`
# @return [Google::Apis::FusiontablesV1::StyleFunction]
attr_accessor :icon_styler
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@icon_name = args[:icon_name] if args.key?(:icon_name)
@icon_styler = args[:icon_styler] if args.key?(:icon_styler)
end
end
# Represents a polygon object.
class Polygon
include Google::Apis::Core::Hashable
# The coordinates that define the polygon.
# Corresponds to the JSON property `coordinates`
# @return [Array<Array<Array<Float>>>]
attr_accessor :coordinates
# Type: A polygon geometry.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@coordinates = args[:coordinates] if args.key?(:coordinates)
@type = args[:type] if args.key?(:type)
end
end
# Represents a PolygonStyle within a StyleSetting
class PolygonStyle
include Google::Apis::Core::Hashable
# Color of the interior of the polygon in #RRGGBB format.
# Corresponds to the JSON property `fillColor`
# @return [String]
attr_accessor :fill_color
# Represents a StyleFunction within a StyleSetting
# Corresponds to the JSON property `fillColorStyler`
# @return [Google::Apis::FusiontablesV1::StyleFunction]
attr_accessor :fill_color_styler
# Opacity of the interior of the polygon: 0.0 (transparent) to 1.0 (opaque).
# Corresponds to the JSON property `fillOpacity`
# @return [Float]
attr_accessor :fill_opacity
# Color of the polygon border in #RRGGBB format.
# Corresponds to the JSON property `strokeColor`
# @return [String]
attr_accessor :stroke_color
# Represents a StyleFunction within a StyleSetting
# Corresponds to the JSON property `strokeColorStyler`
# @return [Google::Apis::FusiontablesV1::StyleFunction]
attr_accessor :stroke_color_styler
# Opacity of the polygon border: 0.0 (transparent) to 1.0 (opaque).
# Corresponds to the JSON property `strokeOpacity`
# @return [Float]
attr_accessor :stroke_opacity
# Width of the polyon border in pixels.
# Corresponds to the JSON property `strokeWeight`
# @return [Fixnum]
attr_accessor :stroke_weight
# Represents a StyleFunction within a StyleSetting
# Corresponds to the JSON property `strokeWeightStyler`
# @return [Google::Apis::FusiontablesV1::StyleFunction]
attr_accessor :stroke_weight_styler
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@fill_color = args[:fill_color] if args.key?(:fill_color)
@fill_color_styler = args[:fill_color_styler] if args.key?(:fill_color_styler)
@fill_opacity = args[:fill_opacity] if args.key?(:fill_opacity)
@stroke_color = args[:stroke_color] if args.key?(:stroke_color)
@stroke_color_styler = args[:stroke_color_styler] if args.key?(:stroke_color_styler)
@stroke_opacity = args[:stroke_opacity] if args.key?(:stroke_opacity)
@stroke_weight = args[:stroke_weight] if args.key?(:stroke_weight)
@stroke_weight_styler = args[:stroke_weight_styler] if args.key?(:stroke_weight_styler)
end
end
# Represents a response to an sql statement.
class Sqlresponse
include Google::Apis::Core::Hashable
# Columns in the table.
# Corresponds to the JSON property `columns`
# @return [Array<String>]
attr_accessor :columns
# Type name: a template for an individual table.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The rows in the table. For each cell we print out whatever cell value (e.g.,
# numeric, string) exists. Thus it is important that each cell contains only one
# value.
# Corresponds to the JSON property `rows`
# @return [Array<Array<Object>>]
attr_accessor :rows
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@columns = args[:columns] if args.key?(:columns)
@kind = args[:kind] if args.key?(:kind)
@rows = args[:rows] if args.key?(:rows)
end
end
# Represents a StyleFunction within a StyleSetting
class StyleFunction
include Google::Apis::Core::Hashable
# Bucket function that assigns a style based on the range a column value falls
# into.
# Corresponds to the JSON property `buckets`
# @return [Array<Google::Apis::FusiontablesV1::Bucket>]
attr_accessor :buckets
# Name of the column whose value is used in the style.
# Corresponds to the JSON property `columnName`
# @return [String]
attr_accessor :column_name
# Gradient function that interpolates a range of colors based on column value.
# Corresponds to the JSON property `gradient`
# @return [Google::Apis::FusiontablesV1::StyleFunction::Gradient]
attr_accessor :gradient
# Stylers can be one of three kinds: "fusiontables#fromColumn" if the column
# value is to be used as is, i.e., the column values can have colors in #
# RRGGBBAA format or integer line widths or icon names; "fusiontables#gradient"
# if the styling of the row is to be based on applying the gradient function on
# the column value; or "fusiontables#buckets" if the styling is to based on the
# bucket into which the the column value falls.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@buckets = args[:buckets] if args.key?(:buckets)
@column_name = args[:column_name] if args.key?(:column_name)
@gradient = args[:gradient] if args.key?(:gradient)
@kind = args[:kind] if args.key?(:kind)
end
# Gradient function that interpolates a range of colors based on column value.
class Gradient
include Google::Apis::Core::Hashable
# Array with two or more colors.
# Corresponds to the JSON property `colors`
# @return [Array<Google::Apis::FusiontablesV1::StyleFunction::Gradient::Color>]
attr_accessor :colors
# Higher-end of the interpolation range: rows with this value will be assigned
# to colors[n-1].
# Corresponds to the JSON property `max`
# @return [Float]
attr_accessor :max
# Lower-end of the interpolation range: rows with this value will be assigned to
# colors[0].
# Corresponds to the JSON property `min`
# @return [Float]
attr_accessor :min
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@colors = args[:colors] if args.key?(:colors)
@max = args[:max] if args.key?(:max)
@min = args[:min] if args.key?(:min)
end
#
class Color
include Google::Apis::Core::Hashable
# Color in #RRGGBB format.
# Corresponds to the JSON property `color`
# @return [String]
attr_accessor :color
# Opacity of the color: 0.0 (transparent) to 1.0 (opaque).
# Corresponds to the JSON property `opacity`
# @return [Float]
attr_accessor :opacity
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@color = args[:color] if args.key?(:color)
@opacity = args[:opacity] if args.key?(:opacity)
end
end
end
end
# Represents a complete StyleSettings object. The primary key is a combination
# of the tableId and a styleId.
class StyleSetting
include Google::Apis::Core::Hashable
# Type name: an individual style setting. A StyleSetting contains the style
# defintions for points, lines, and polygons in a table. Since a table can have
# any one or all of them, a style definition can have point, line and polygon
# style definitions.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Represents a PointStyle within a StyleSetting
# Corresponds to the JSON property `markerOptions`
# @return [Google::Apis::FusiontablesV1::PointStyle]
attr_accessor :marker_options
# Optional name for the style setting.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Represents a PolygonStyle within a StyleSetting
# Corresponds to the JSON property `polygonOptions`
# @return [Google::Apis::FusiontablesV1::PolygonStyle]
attr_accessor :polygon_options
# Represents a LineStyle within a StyleSetting
# Corresponds to the JSON property `polylineOptions`
# @return [Google::Apis::FusiontablesV1::LineStyle]
attr_accessor :polyline_options
# Identifier for the style setting (unique only within tables).
# Corresponds to the JSON property `styleId`
# @return [Fixnum]
attr_accessor :style_id
# Identifier for the table.
# Corresponds to the JSON property `tableId`
# @return [String]
attr_accessor :table_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@marker_options = args[:marker_options] if args.key?(:marker_options)
@name = args[:name] if args.key?(:name)
@polygon_options = args[:polygon_options] if args.key?(:polygon_options)
@polyline_options = args[:polyline_options] if args.key?(:polyline_options)
@style_id = args[:style_id] if args.key?(:style_id)
@table_id = args[:table_id] if args.key?(:table_id)
end
end
# Represents a list of styles for a given table.
class StyleSettingList
include Google::Apis::Core::Hashable
# All requested style settings.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::FusiontablesV1::StyleSetting>]
attr_accessor :items
# Type name: in this case, a list of style settings.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token used to access the next page of this result. No token is displayed if
# there are no more pages left.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# Total number of styles for the table.
# Corresponds to the JSON property `totalItems`
# @return [Fixnum]
attr_accessor :total_items
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@total_items = args[:total_items] if args.key?(:total_items)
end
end
# Represents a table. Specifies the name, whether it is exportable, description,
# attribution, and attribution link.
class Table
include Google::Apis::Core::Hashable
# Optional attribution assigned to the table.
# Corresponds to the JSON property `attribution`
# @return [String]
attr_accessor :attribution
# Optional link for attribution.
# Corresponds to the JSON property `attributionLink`
# @return [String]
attr_accessor :attribution_link
# Optional base table identifier if this table is a view or merged table.
# Corresponds to the JSON property `baseTableIds`
# @return [Array<String>]
attr_accessor :base_table_ids
# Columns in the table.
# Corresponds to the JSON property `columns`
# @return [Array<Google::Apis::FusiontablesV1::Column>]
attr_accessor :columns
# Optional description assigned to the table.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Variable for whether table is exportable.
# Corresponds to the JSON property `isExportable`
# @return [Boolean]
attr_accessor :is_exportable
alias_method :is_exportable?, :is_exportable
# Type name: a template for an individual table.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Name assigned to a table.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Optional sql that encodes the table definition for derived tables.
# Corresponds to the JSON property `sql`
# @return [String]
attr_accessor :sql
# Encrypted unique alphanumeric identifier for the table.
# Corresponds to the JSON property `tableId`
# @return [String]
attr_accessor :table_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@attribution = args[:attribution] if args.key?(:attribution)
@attribution_link = args[:attribution_link] if args.key?(:attribution_link)
@base_table_ids = args[:base_table_ids] if args.key?(:base_table_ids)
@columns = args[:columns] if args.key?(:columns)
@description = args[:description] if args.key?(:description)
@is_exportable = args[:is_exportable] if args.key?(:is_exportable)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@sql = args[:sql] if args.key?(:sql)
@table_id = args[:table_id] if args.key?(:table_id)
end
end
# Represents a list of tables.
class TableList
include Google::Apis::Core::Hashable
# List of all requested tables.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::FusiontablesV1::Table>]
attr_accessor :items
# Type name: a list of all tables.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token used to access the next page of this result. No token is displayed if
# there are no more pages left.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# Specifies the identifier, name, and type of a task in a table.
class Task
include Google::Apis::Core::Hashable
# Type of the resource. This is always "fusiontables#task".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# An indication of task progress.
# Corresponds to the JSON property `progress`
# @return [String]
attr_accessor :progress
# false while the table is busy with some other task. true if this background
# task is currently running.
# Corresponds to the JSON property `started`
# @return [Boolean]
attr_accessor :started
alias_method :started?, :started
# Identifier for the task.
# Corresponds to the JSON property `taskId`
# @return [Fixnum]
attr_accessor :task_id
# Type of background task. One of DELETE_ROWS Deletes one or more rows from the
# table. ADD_ROWS "Adds one or more rows to a table. Includes importing data
# into a new table and importing more rows into an existing table. ADD_COLUMN
# Adds a new column to the table. CHANGE_TYPE Changes the type of a column.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@progress = args[:progress] if args.key?(:progress)
@started = args[:started] if args.key?(:started)
@task_id = args[:task_id] if args.key?(:task_id)
@type = args[:type] if args.key?(:type)
end
end
# Represents a list of tasks for a table.
class TaskList
include Google::Apis::Core::Hashable
# List of all requested tasks.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::FusiontablesV1::Task>]
attr_accessor :items
# Type of the resource. This is always "fusiontables#taskList".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token used to access the next page of this result. No token is displayed if
# there are no more pages left.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# Total number of tasks for the table.
# Corresponds to the JSON property `totalItems`
# @return [Fixnum]
attr_accessor :total_items
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@total_items = args[:total_items] if args.key?(:total_items)
end
end
# Represents the contents of InfoWindow templates.
class Template
include Google::Apis::Core::Hashable
# List of columns from which the template is to be automatically constructed.
# Only one of body or automaticColumns can be specified.
# Corresponds to the JSON property `automaticColumnNames`
# @return [Array<String>]
attr_accessor :automatic_column_names
# Body of the template. It contains HTML with `column_name` to insert values
# from a particular column. The body is sanitized to remove certain tags, e.g.,
# script. Only one of body or automaticColumns can be specified.
# Corresponds to the JSON property `body`
# @return [String]
attr_accessor :body
# Type name: a template for the info window contents. The template can either
# include an HTML body or a list of columns from which the template is computed
# automatically.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Optional name assigned to a template.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Identifier for the table for which the template is defined.
# Corresponds to the JSON property `tableId`
# @return [String]
attr_accessor :table_id
# Identifier for the template, unique within the context of a particular table.
# Corresponds to the JSON property `templateId`
# @return [Fixnum]
attr_accessor :template_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@automatic_column_names = args[:automatic_column_names] if args.key?(:automatic_column_names)
@body = args[:body] if args.key?(:body)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@table_id = args[:table_id] if args.key?(:table_id)
@template_id = args[:template_id] if args.key?(:template_id)
end
end
# Represents a list of templates for a given table.
class TemplateList
include Google::Apis::Core::Hashable
# List of all requested templates.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::FusiontablesV1::Template>]
attr_accessor :items
# Type name: a list of all templates.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token used to access the next page of this result. No token is displayed if
# there are no more pages left.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# Total number of templates for the table.
# Corresponds to the JSON property `totalItems`
# @return [Fixnum]
attr_accessor :total_items
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@total_items = args[:total_items] if args.key?(:total_items)
end
end
end
end
end

View File

@ -1,449 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module FusiontablesV1
class Bucket
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Column
class Representation < Google::Apis::Core::JsonRepresentation; end
class BaseColumn
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
class ColumnList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Geometry
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Import
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Line
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LineStyle
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Point
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PointStyle
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Polygon
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PolygonStyle
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Sqlresponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StyleFunction
class Representation < Google::Apis::Core::JsonRepresentation; end
class Gradient
class Representation < Google::Apis::Core::JsonRepresentation; end
class Color
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
class StyleSetting
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StyleSettingList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Table
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TableList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Task
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TaskList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Template
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TemplateList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Bucket
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :color, as: 'color'
property :icon, as: 'icon'
property :max, as: 'max'
property :min, as: 'min'
property :opacity, as: 'opacity'
property :weight, as: 'weight'
end
end
class Column
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :base_column, as: 'baseColumn', class: Google::Apis::FusiontablesV1::Column::BaseColumn, decorator: Google::Apis::FusiontablesV1::Column::BaseColumn::Representation
property :column_id, as: 'columnId'
property :description, as: 'description'
property :graph_predicate, as: 'graph_predicate'
property :kind, as: 'kind'
property :name, as: 'name'
property :type, as: 'type'
end
class BaseColumn
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :column_id, as: 'columnId'
property :table_index, as: 'tableIndex'
end
end
end
class ColumnList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::FusiontablesV1::Column, decorator: Google::Apis::FusiontablesV1::Column::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :total_items, as: 'totalItems'
end
end
class Geometry
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :geometries, as: 'geometries'
property :geometry, as: 'geometry'
property :type, as: 'type'
end
end
class Import
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :num_rows_received, :numeric_string => true, as: 'numRowsReceived'
end
end
class Line
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :coordinates, as: 'coordinates', :class => Array do
include Representable::JSON::Collection
items
end
property :type, as: 'type'
end
end
class LineStyle
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :stroke_color, as: 'strokeColor'
property :stroke_color_styler, as: 'strokeColorStyler', class: Google::Apis::FusiontablesV1::StyleFunction, decorator: Google::Apis::FusiontablesV1::StyleFunction::Representation
property :stroke_opacity, as: 'strokeOpacity'
property :stroke_weight, as: 'strokeWeight'
property :stroke_weight_styler, as: 'strokeWeightStyler', class: Google::Apis::FusiontablesV1::StyleFunction, decorator: Google::Apis::FusiontablesV1::StyleFunction::Representation
end
end
class Point
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :coordinates, as: 'coordinates'
property :type, as: 'type'
end
end
class PointStyle
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :icon_name, as: 'iconName'
property :icon_styler, as: 'iconStyler', class: Google::Apis::FusiontablesV1::StyleFunction, decorator: Google::Apis::FusiontablesV1::StyleFunction::Representation
end
end
class Polygon
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :coordinates, as: 'coordinates', :class => Array do
include Representable::JSON::Collection
items :class => Array do
include Representable::JSON::Collection
items
end
end
property :type, as: 'type'
end
end
class PolygonStyle
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :fill_color, as: 'fillColor'
property :fill_color_styler, as: 'fillColorStyler', class: Google::Apis::FusiontablesV1::StyleFunction, decorator: Google::Apis::FusiontablesV1::StyleFunction::Representation
property :fill_opacity, as: 'fillOpacity'
property :stroke_color, as: 'strokeColor'
property :stroke_color_styler, as: 'strokeColorStyler', class: Google::Apis::FusiontablesV1::StyleFunction, decorator: Google::Apis::FusiontablesV1::StyleFunction::Representation
property :stroke_opacity, as: 'strokeOpacity'
property :stroke_weight, as: 'strokeWeight'
property :stroke_weight_styler, as: 'strokeWeightStyler', class: Google::Apis::FusiontablesV1::StyleFunction, decorator: Google::Apis::FusiontablesV1::StyleFunction::Representation
end
end
class Sqlresponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :columns, as: 'columns'
property :kind, as: 'kind'
collection :rows, as: 'rows', :class => Array do
include Representable::JSON::Collection
items
end
end
end
class StyleFunction
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :buckets, as: 'buckets', class: Google::Apis::FusiontablesV1::Bucket, decorator: Google::Apis::FusiontablesV1::Bucket::Representation
property :column_name, as: 'columnName'
property :gradient, as: 'gradient', class: Google::Apis::FusiontablesV1::StyleFunction::Gradient, decorator: Google::Apis::FusiontablesV1::StyleFunction::Gradient::Representation
property :kind, as: 'kind'
end
class Gradient
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :colors, as: 'colors', class: Google::Apis::FusiontablesV1::StyleFunction::Gradient::Color, decorator: Google::Apis::FusiontablesV1::StyleFunction::Gradient::Color::Representation
property :max, as: 'max'
property :min, as: 'min'
end
class Color
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :color, as: 'color'
property :opacity, as: 'opacity'
end
end
end
end
class StyleSetting
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :marker_options, as: 'markerOptions', class: Google::Apis::FusiontablesV1::PointStyle, decorator: Google::Apis::FusiontablesV1::PointStyle::Representation
property :name, as: 'name'
property :polygon_options, as: 'polygonOptions', class: Google::Apis::FusiontablesV1::PolygonStyle, decorator: Google::Apis::FusiontablesV1::PolygonStyle::Representation
property :polyline_options, as: 'polylineOptions', class: Google::Apis::FusiontablesV1::LineStyle, decorator: Google::Apis::FusiontablesV1::LineStyle::Representation
property :style_id, as: 'styleId'
property :table_id, as: 'tableId'
end
end
class StyleSettingList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::FusiontablesV1::StyleSetting, decorator: Google::Apis::FusiontablesV1::StyleSetting::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :total_items, as: 'totalItems'
end
end
class Table
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :attribution, as: 'attribution'
property :attribution_link, as: 'attributionLink'
collection :base_table_ids, as: 'baseTableIds'
collection :columns, as: 'columns', class: Google::Apis::FusiontablesV1::Column, decorator: Google::Apis::FusiontablesV1::Column::Representation
property :description, as: 'description'
property :is_exportable, as: 'isExportable'
property :kind, as: 'kind'
property :name, as: 'name'
property :sql, as: 'sql'
property :table_id, as: 'tableId'
end
end
class TableList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::FusiontablesV1::Table, decorator: Google::Apis::FusiontablesV1::Table::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
class Task
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :progress, as: 'progress'
property :started, as: 'started'
property :task_id, :numeric_string => true, as: 'taskId'
property :type, as: 'type'
end
end
class TaskList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::FusiontablesV1::Task, decorator: Google::Apis::FusiontablesV1::Task::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :total_items, as: 'totalItems'
end
end
class Template
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :automatic_column_names, as: 'automaticColumnNames'
property :body, as: 'body'
property :kind, as: 'kind'
property :name, as: 'name'
property :table_id, as: 'tableId'
property :template_id, as: 'templateId'
end
end
class TemplateList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::FusiontablesV1::Template, decorator: Google::Apis::FusiontablesV1::Template::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :total_items, as: 'totalItems'
end
end
end
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,457 +0,0 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module FusiontablesV2
class Bucket
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Column
class Representation < Google::Apis::Core::JsonRepresentation; end
class BaseColumn
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
class ColumnList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Geometry
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Import
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Line
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LineStyle
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Point
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PointStyle
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Polygon
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PolygonStyle
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Sqlresponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StyleFunction
class Representation < Google::Apis::Core::JsonRepresentation; end
class Gradient
class Representation < Google::Apis::Core::JsonRepresentation; end
class Color
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
class StyleSetting
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StyleSettingList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Table
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TableList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Task
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TaskList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Template
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TemplateList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Bucket
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :color, as: 'color'
property :icon, as: 'icon'
property :max, as: 'max'
property :min, as: 'min'
property :opacity, as: 'opacity'
property :weight, as: 'weight'
end
end
class Column
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :base_column, as: 'baseColumn', class: Google::Apis::FusiontablesV2::Column::BaseColumn, decorator: Google::Apis::FusiontablesV2::Column::BaseColumn::Representation
property :column_id, as: 'columnId'
property :column_json_schema, as: 'columnJsonSchema'
property :column_properties_json, as: 'columnPropertiesJson'
property :description, as: 'description'
property :format_pattern, as: 'formatPattern'
property :graph_predicate, as: 'graphPredicate'
property :kind, as: 'kind'
property :name, as: 'name'
property :type, as: 'type'
collection :valid_values, as: 'validValues'
property :validate_data, as: 'validateData'
end
class BaseColumn
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :column_id, as: 'columnId'
property :table_index, as: 'tableIndex'
end
end
end
class ColumnList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::FusiontablesV2::Column, decorator: Google::Apis::FusiontablesV2::Column::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :total_items, as: 'totalItems'
end
end
class Geometry
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :geometries, as: 'geometries'
property :geometry, as: 'geometry'
property :type, as: 'type'
end
end
class Import
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :num_rows_received, :numeric_string => true, as: 'numRowsReceived'
end
end
class Line
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :coordinates, as: 'coordinates', :class => Array do
include Representable::JSON::Collection
items
end
property :type, as: 'type'
end
end
class LineStyle
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :stroke_color, as: 'strokeColor'
property :stroke_color_styler, as: 'strokeColorStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation
property :stroke_opacity, as: 'strokeOpacity'
property :stroke_weight, as: 'strokeWeight'
property :stroke_weight_styler, as: 'strokeWeightStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation
end
end
class Point
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :coordinates, as: 'coordinates'
property :type, as: 'type'
end
end
class PointStyle
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :icon_name, as: 'iconName'
property :icon_styler, as: 'iconStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation
end
end
class Polygon
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :coordinates, as: 'coordinates', :class => Array do
include Representable::JSON::Collection
items :class => Array do
include Representable::JSON::Collection
items
end
end
property :type, as: 'type'
end
end
class PolygonStyle
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :fill_color, as: 'fillColor'
property :fill_color_styler, as: 'fillColorStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation
property :fill_opacity, as: 'fillOpacity'
property :stroke_color, as: 'strokeColor'
property :stroke_color_styler, as: 'strokeColorStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation
property :stroke_opacity, as: 'strokeOpacity'
property :stroke_weight, as: 'strokeWeight'
property :stroke_weight_styler, as: 'strokeWeightStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation
end
end
class Sqlresponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :columns, as: 'columns'
property :kind, as: 'kind'
collection :rows, as: 'rows', :class => Array do
include Representable::JSON::Collection
items
end
end
end
class StyleFunction
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :buckets, as: 'buckets', class: Google::Apis::FusiontablesV2::Bucket, decorator: Google::Apis::FusiontablesV2::Bucket::Representation
property :column_name, as: 'columnName'
property :gradient, as: 'gradient', class: Google::Apis::FusiontablesV2::StyleFunction::Gradient, decorator: Google::Apis::FusiontablesV2::StyleFunction::Gradient::Representation
property :kind, as: 'kind'
end
class Gradient
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :colors, as: 'colors', class: Google::Apis::FusiontablesV2::StyleFunction::Gradient::Color, decorator: Google::Apis::FusiontablesV2::StyleFunction::Gradient::Color::Representation
property :max, as: 'max'
property :min, as: 'min'
end
class Color
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :color, as: 'color'
property :opacity, as: 'opacity'
end
end
end
end
class StyleSetting
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :marker_options, as: 'markerOptions', class: Google::Apis::FusiontablesV2::PointStyle, decorator: Google::Apis::FusiontablesV2::PointStyle::Representation
property :name, as: 'name'
property :polygon_options, as: 'polygonOptions', class: Google::Apis::FusiontablesV2::PolygonStyle, decorator: Google::Apis::FusiontablesV2::PolygonStyle::Representation
property :polyline_options, as: 'polylineOptions', class: Google::Apis::FusiontablesV2::LineStyle, decorator: Google::Apis::FusiontablesV2::LineStyle::Representation
property :style_id, as: 'styleId'
property :table_id, as: 'tableId'
end
end
class StyleSettingList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::FusiontablesV2::StyleSetting, decorator: Google::Apis::FusiontablesV2::StyleSetting::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :total_items, as: 'totalItems'
end
end
class Table
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :attribution, as: 'attribution'
property :attribution_link, as: 'attributionLink'
collection :base_table_ids, as: 'baseTableIds'
property :column_properties_json_schema, as: 'columnPropertiesJsonSchema'
collection :columns, as: 'columns', class: Google::Apis::FusiontablesV2::Column, decorator: Google::Apis::FusiontablesV2::Column::Representation
property :description, as: 'description'
property :is_exportable, as: 'isExportable'
property :kind, as: 'kind'
property :name, as: 'name'
property :sql, as: 'sql'
property :table_id, as: 'tableId'
property :table_properties_json, as: 'tablePropertiesJson'
property :table_properties_json_schema, as: 'tablePropertiesJsonSchema'
end
end
class TableList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::FusiontablesV2::Table, decorator: Google::Apis::FusiontablesV2::Table::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
end
end
class Task
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :progress, as: 'progress'
property :started, as: 'started'
property :task_id, :numeric_string => true, as: 'taskId'
property :type, as: 'type'
end
end
class TaskList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::FusiontablesV2::Task, decorator: Google::Apis::FusiontablesV2::Task::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :total_items, as: 'totalItems'
end
end
class Template
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :automatic_column_names, as: 'automaticColumnNames'
property :body, as: 'body'
property :kind, as: 'kind'
property :name, as: 'name'
property :table_id, as: 'tableId'
property :template_id, as: 'templateId'
end
end
class TemplateList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::FusiontablesV2::Template, decorator: Google::Apis::FusiontablesV2::Template::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :total_items, as: 'totalItems'
end
end
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@ module Google
# @see https://cloud.google.com/logging/docs/
module LoggingV2
VERSION = 'V2'
REVISION = '20191115'
REVISION = '20191206'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -1302,39 +1302,17 @@ module Google
# @return [String]
attr_accessor :type
# The unit in which the metric value is reported. It is only applicable if the
# value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are a subset
# of The Unified Code for Units of Measure (http://unitsofmeasure.org/ucum.html)
# standard:Basic units (UNIT)
# bit bit
# By byte
# s second
# min minute
# h hour
# d dayPrefixes (PREFIX)
# k kilo (10**3)
# M mega (10**6)
# G giga (10**9)
# T tera (10**12)
# P peta (10**15)
# E exa (10**18)
# Z zetta (10**21)
# Y yotta (10**24)
# m milli (10**-3)
# u micro (10**-6)
# n nano (10**-9)
# p pico (10**-12)
# f femto (10**-15)
# a atto (10**-18)
# z zepto (10**-21)
# y yocto (10**-24)
# Ki kibi (2**10)
# Mi mebi (2**20)
# Gi gibi (2**30)
# Ti tebi (2**40)GrammarThe grammar also includes these connectors:
# / division (as an infix operator, e.g. 1/s).
# . multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit is
# as follows:
# Ki kibi (2^10)
# Mi mebi (2^20)
# Gi gibi (2^30)
# Ti tebi (2^40)
# Pi pebi (2^50)GrammarThe grammar also includes these connectors:
# / division or ratio (as an infix operator). For examples, kBy/`email` or MiBy/
# 10ms (although you should almost never have /s in a metric unit; rates should
# always be computed at query time from the underlying cumulative or delta
# value).
# . multiplication or composition (as an infix operator). For examples, GBy.d
# or k`watt`.h.The grammar for a unit is as follows:
# Expression = Component ` "." Component ` ` "/" Component ` ;
# Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
# | Annotation
@ -1342,14 +1320,24 @@ module Google
# ;
# Annotation = "`" NAME "`" ;
# Notes:
# Annotation is just a comment if it follows a UNIT and is equivalent to 1 if
# it is used alone. For examples, `requests`/s == 1/s, By`transmitted`/s == By/
# s.
# NAME is a sequence of non-blank printable ASCII characters not containing '`'
# or '`'.
# 1 represents dimensionless value 1, such as in 1/s.
# % represents dimensionless value 1/100, and annotates values giving a
# percentage.
# Annotation is just a comment if it follows a UNIT. If the annotation is used
# alone, then the unit is equivalent to 1. For examples, `request`/s == 1/s, By`
# transmitted`/s == By/s.
# NAME is a sequence of non-blank printable ASCII characters not containing `
# or `.
# 1 represents a unitary dimensionless unit (https://en.wikipedia.org/wiki/
# Dimensionless_quantity) of 1, such as in 1/s. It is typically used when none
# of the basic units are appropriate. For example, "new users per day" can be
# represented as 1/d or `new-users`/d (and a metric value 5 would mean "5 new
# users). Alternatively, "thousands of page views per day" would be represented
# as 1000/d or k1/d or k`page_views`/d (and a metric value of 5.3 would mean "
# 5300 page views per day").
# % represents dimensionless value of 1/100, and annotates values giving a
# percentage (so the metric values are typically in the range of 0..100, and a
# metric value 3 means "3 percent").
# 10^2.% indicates a metric contains a ratio, typically in the range 0..1, that
# will be multiplied by 100 and displayed as a percentage (so a metric value 0.
# 03 means "3 percent").
# Corresponds to the JSON property `unit`
# @return [String]
attr_accessor :unit

View File

@ -12,26 +12,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/fusiontables_v1/service.rb'
require 'google/apis/fusiontables_v1/classes.rb'
require 'google/apis/fusiontables_v1/representations.rb'
require 'google/apis/policytroubleshooter_v1/service.rb'
require 'google/apis/policytroubleshooter_v1/classes.rb'
require 'google/apis/policytroubleshooter_v1/representations.rb'
module Google
module Apis
# Fusion Tables API
# Policy Troubleshooter API
#
# API for working with Fusion Tables data.
#
#
# @see https://developers.google.com/fusiontables
module FusiontablesV1
# @see https://cloud.google.com/iam/
module PolicytroubleshooterV1
VERSION = 'V1'
REVISION = '20171117'
REVISION = '20191206'
# Manage your Fusion Tables
AUTH_FUSIONTABLES = 'https://www.googleapis.com/auth/fusiontables'
# View your Fusion Tables
AUTH_FUSIONTABLES_READONLY = 'https://www.googleapis.com/auth/fusiontables.readonly'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

View File

@ -0,0 +1,700 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module PolicytroubleshooterV1
# Information about the member, resource, and permission to check.
class GoogleCloudPolicytroubleshooterV1AccessTuple
include Google::Apis::Core::Hashable
# Required. The full resource name that identifies the resource. For example,
# `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-
# instance`.
# For examples of full resource names for Google Cloud services, see
# https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
# Corresponds to the JSON property `fullResourceName`
# @return [String]
attr_accessor :full_resource_name
# Required. The IAM permission to check for the specified member and resource.
# For a complete list of IAM permissions, see
# https://cloud.google.com/iam/help/permissions/reference.
# For a complete list of predefined IAM roles and the permissions in each
# role, see https://cloud.google.com/iam/help/roles/reference.
# Corresponds to the JSON property `permission`
# @return [String]
attr_accessor :permission
# Required. The member, or principal, whose access you want to check, in the
# form of
# the email address that represents that member. For example,
# `alice@example.com` or
# `my-service-account@my-project.iam.gserviceaccount.com`.
# The member must be a Google Account or a service account. Other types of
# members are not supported.
# Corresponds to the JSON property `principal`
# @return [String]
attr_accessor :principal
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
@permission = args[:permission] if args.key?(:permission)
@principal = args[:principal] if args.key?(:principal)
end
end
# Details about how a binding in a policy affects a member's ability to use a
# permission.
class GoogleCloudPolicytroubleshooterV1BindingExplanation
include Google::Apis::Core::Hashable
# Required. Indicates whether _this binding_ provides the specified permission
# to the
# specified member for the specified resource.
# This field does _not_ indicate whether the member actually has the
# permission for the resource. There might be another binding that overrides
# this binding. To determine whether the member actually has the permission,
# use the `access` field in the
# TroubleshootIamPolicyResponse.
# Corresponds to the JSON property `access`
# @return [String]
attr_accessor :access
# Represents an expression text. Example:
# title: "User account presence"
# description: "Determines whether the request has a user account"
# expression: "size(request.user) > 0"
# Corresponds to the JSON property `condition`
# @return [Google::Apis::PolicytroubleshooterV1::GoogleTypeExpr]
attr_accessor :condition
# Indicates whether each member in the binding includes the member specified
# in the request, either directly or indirectly. Each key identifies a member
# in the binding, and each value indicates whether the member in the binding
# includes the member in the request.
# For example, suppose that a binding includes the following members:
# * `user:alice@example.com`
# * `group:product-eng@example.com`
# You want to troubleshoot access for `user:bob@example.com`. This user is a
# member of the group `group:product-eng@example.com`.
# For the first member in the binding, the key is `user:alice@example.com`,
# and the `membership` field in the value is set to
# `MEMBERSHIP_NOT_INCLUDED`.
# For the second member in the binding, the key is
# `group:product-eng@example.com`, and the `membership` field in the value is
# set to `MEMBERSHIP_INCLUDED`.
# Corresponds to the JSON property `memberships`
# @return [Hash<String,Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1BindingExplanationAnnotatedMembership>]
attr_accessor :memberships
# The relevance of this binding to the overall determination for the entire
# policy.
# Corresponds to the JSON property `relevance`
# @return [String]
attr_accessor :relevance
# The role that this binding grants. For example,
# `roles/compute.serviceAgent`.
# For a complete list of predefined IAM roles, as well as the permissions in
# each role, see https://cloud.google.com/iam/help/roles/reference.
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
# Indicates whether the role granted by this binding contains the specified
# permission.
# Corresponds to the JSON property `rolePermission`
# @return [String]
attr_accessor :role_permission
# The relevance of the permission's existence, or nonexistence, in the role
# to the overall determination for the entire policy.
# Corresponds to the JSON property `rolePermissionRelevance`
# @return [String]
attr_accessor :role_permission_relevance
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@access = args[:access] if args.key?(:access)
@condition = args[:condition] if args.key?(:condition)
@memberships = args[:memberships] if args.key?(:memberships)
@relevance = args[:relevance] if args.key?(:relevance)
@role = args[:role] if args.key?(:role)
@role_permission = args[:role_permission] if args.key?(:role_permission)
@role_permission_relevance = args[:role_permission_relevance] if args.key?(:role_permission_relevance)
end
end
# Details about whether the binding includes the member.
class GoogleCloudPolicytroubleshooterV1BindingExplanationAnnotatedMembership
include Google::Apis::Core::Hashable
# Indicates whether the binding includes the member.
# Corresponds to the JSON property `membership`
# @return [String]
attr_accessor :membership
# The relevance of the member's status to the overall determination for the
# binding.
# Corresponds to the JSON property `relevance`
# @return [String]
attr_accessor :relevance
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@membership = args[:membership] if args.key?(:membership)
@relevance = args[:relevance] if args.key?(:relevance)
end
end
# Details about how a specific IAM Policy contributed
# to the access check.
class GoogleCloudPolicytroubleshooterV1ExplainedPolicy
include Google::Apis::Core::Hashable
# Indicates whether _this policy_ provides the specified permission to the
# specified member for the specified resource.
# This field does _not_ indicate whether the member actually has the
# permission for the resource. There might be another policy that overrides
# this policy. To determine whether the member actually has the permission,
# use the `access` field in the
# TroubleshootIamPolicyResponse.
# Corresponds to the JSON property `access`
# @return [String]
attr_accessor :access
# Details about how each binding in the policy affects the member's ability,
# or inability, to use the permission for the resource.
# If the sender of the request does not have access to the policy, this field
# is omitted.
# Corresponds to the JSON property `bindingExplanations`
# @return [Array<Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1BindingExplanation>]
attr_accessor :binding_explanations
# The full resource name that identifies the resource. For example,
# `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-
# instance`.
# If the sender of the request does not have access to the policy, this field
# is omitted.
# For examples of full resource names for Google Cloud services, see
# https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
# Corresponds to the JSON property `fullResourceName`
# @return [String]
attr_accessor :full_resource_name
# An Identity and Access Management (IAM) policy, which specifies access
# controls for Google Cloud resources.
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
# `members` to a single `role`. Members can be user accounts, service accounts,
# Google groups, and domains (such as G Suite). A `role` is a named list of
# permissions; each `role` can be an IAM predefined role or a user-created
# custom role.
# Optionally, a `binding` can specify a `condition`, which is a logical
# expression that allows access to a resource only if the expression evaluates
# to `true`. A condition can add constraints based on attributes of the
# request, the resource, or both.
# **JSON example:**
# `
# "bindings": [
# `
# "role": "roles/resourcemanager.organizationAdmin",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-project-id@appspot.gserviceaccount.com"
# ]
# `,
# `
# "role": "roles/resourcemanager.organizationViewer",
# "members": ["user:eve@example.com"],
# "condition": `
# "title": "expirable access",
# "description": "Does not grant access after Sep 2020",
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')
# ",
# `
# `
# ],
# "etag": "BwWWja0YfJA=",
# "version": 3
# `
# **YAML example:**
# bindings:
# - members:
# - user:mike@example.com
# - group:admins@example.com
# - domain:google.com
# - serviceAccount:my-project-id@appspot.gserviceaccount.com
# role: roles/resourcemanager.organizationAdmin
# - members:
# - user:eve@example.com
# role: roles/resourcemanager.organizationViewer
# condition:
# title: expirable access
# description: Does not grant access after Sep 2020
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
# - etag: BwWWja0YfJA=
# - version: 3
# For a description of IAM and its features, see the
# [IAM documentation](https://cloud.google.com/iam/docs/).
# Corresponds to the JSON property `policy`
# @return [Google::Apis::PolicytroubleshooterV1::GoogleIamV1Policy]
attr_accessor :policy
# The relevance of this policy to the overall determination in the
# TroubleshootIamPolicyResponse.
# If the sender of the request does not have access to the policy, this field
# is omitted.
# Corresponds to the JSON property `relevance`
# @return [String]
attr_accessor :relevance
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@access = args[:access] if args.key?(:access)
@binding_explanations = args[:binding_explanations] if args.key?(:binding_explanations)
@full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
@policy = args[:policy] if args.key?(:policy)
@relevance = args[:relevance] if args.key?(:relevance)
end
end
# Request for TroubleshootIamPolicy.
class GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyRequest
include Google::Apis::Core::Hashable
# Information about the member, resource, and permission to check.
# Corresponds to the JSON property `accessTuple`
# @return [Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1AccessTuple]
attr_accessor :access_tuple
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@access_tuple = args[:access_tuple] if args.key?(:access_tuple)
end
end
# Response for TroubleshootIamPolicy.
class GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyResponse
include Google::Apis::Core::Hashable
# Indicates whether the member has the specified permission for the specified
# resource, based on evaluating all of the applicable IAM policies.
# Corresponds to the JSON property `access`
# @return [String]
attr_accessor :access
# List of IAM policies that were evaluated to check the member's permissions,
# with annotations to indicate how each policy contributed to the final
# result.
# The list of policies can include the policy for the resource itself. It can
# also include policies that are inherited from higher levels of the resource
# hierarchy, including the organization, the folder, and the project.
# To learn more about the resource hierarchy, see
# https://cloud.google.com/iam/help/resource-hierarchy.
# Corresponds to the JSON property `explainedPolicies`
# @return [Array<Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1ExplainedPolicy>]
attr_accessor :explained_policies
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@access = args[:access] if args.key?(:access)
@explained_policies = args[:explained_policies] if args.key?(:explained_policies)
end
end
# Specifies the audit configuration for a service.
# The configuration determines which permission types are logged, and what
# identities, if any, are exempted from logging.
# An AuditConfig must have one or more AuditLogConfigs.
# If there are AuditConfigs for both `allServices` and a specific service,
# the union of the two AuditConfigs is used for that service: the log_types
# specified in each AuditConfig are enabled, and the exempted_members in each
# AuditLogConfig are exempted.
# Example Policy with multiple AuditConfigs:
# `
# "audit_configs": [
# `
# "service": "allServices"
# "audit_log_configs": [
# `
# "log_type": "DATA_READ",
# "exempted_members": [
# "user:jose@example.com"
# ]
# `,
# `
# "log_type": "DATA_WRITE",
# `,
# `
# "log_type": "ADMIN_READ",
# `
# ]
# `,
# `
# "service": "sampleservice.googleapis.com"
# "audit_log_configs": [
# `
# "log_type": "DATA_READ",
# `,
# `
# "log_type": "DATA_WRITE",
# "exempted_members": [
# "user:aliya@example.com"
# ]
# `
# ]
# `
# ]
# `
# For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
# logging. It also exempts jose@example.com from DATA_READ logging, and
# aliya@example.com from DATA_WRITE logging.
class GoogleIamV1AuditConfig
include Google::Apis::Core::Hashable
# The configuration for logging of each type of permission.
# Corresponds to the JSON property `auditLogConfigs`
# @return [Array<Google::Apis::PolicytroubleshooterV1::GoogleIamV1AuditLogConfig>]
attr_accessor :audit_log_configs
# Specifies a service that will be enabled for audit logging.
# For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
# `allServices` is a special value that covers all services.
# Corresponds to the JSON property `service`
# @return [String]
attr_accessor :service
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
@service = args[:service] if args.key?(:service)
end
end
# Provides the configuration for logging a type of permissions.
# Example:
# `
# "audit_log_configs": [
# `
# "log_type": "DATA_READ",
# "exempted_members": [
# "user:jose@example.com"
# ]
# `,
# `
# "log_type": "DATA_WRITE",
# `
# ]
# `
# This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
# jose@example.com from DATA_READ logging.
class GoogleIamV1AuditLogConfig
include Google::Apis::Core::Hashable
# Specifies the identities that do not cause logging for this type of
# permission.
# Follows the same format of Binding.members.
# Corresponds to the JSON property `exemptedMembers`
# @return [Array<String>]
attr_accessor :exempted_members
# The log type that this config enables.
# Corresponds to the JSON property `logType`
# @return [String]
attr_accessor :log_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
@log_type = args[:log_type] if args.key?(:log_type)
end
end
# Associates `members` with a `role`.
class GoogleIamV1Binding
include Google::Apis::Core::Hashable
# Represents an expression text. Example:
# title: "User account presence"
# description: "Determines whether the request has a user account"
# expression: "size(request.user) > 0"
# Corresponds to the JSON property `condition`
# @return [Google::Apis::PolicytroubleshooterV1::GoogleTypeExpr]
attr_accessor :condition
# 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@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`.
# * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a user that has been recently deleted. For
# example, `alice@example.com?uid=123456789012345678901`. If the user is
# recovered, this value reverts to `user:`emailid`` and the recovered user
# retains the role in the binding.
# * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus
# unique identifier) representing a service account that has been recently
# deleted. For example,
# `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
# If the service account is undeleted, this value reverts to
# `serviceAccount:`emailid`` and the undeleted service account retains the
# role in the binding.
# * `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a Google group that has been recently
# deleted. For example, `admins@example.com?uid=123456789012345678901`. If
# the group is recovered, this value reverts to `group:`emailid`` and the
# recovered group retains the role in the binding.
# * `domain:`domain``: The G Suite domain (primary) 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`.
# 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)
@condition = args[:condition] if args.key?(:condition)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
# An Identity and Access Management (IAM) policy, which specifies access
# controls for Google Cloud resources.
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
# `members` to a single `role`. Members can be user accounts, service accounts,
# Google groups, and domains (such as G Suite). A `role` is a named list of
# permissions; each `role` can be an IAM predefined role or a user-created
# custom role.
# Optionally, a `binding` can specify a `condition`, which is a logical
# expression that allows access to a resource only if the expression evaluates
# to `true`. A condition can add constraints based on attributes of the
# request, the resource, or both.
# **JSON example:**
# `
# "bindings": [
# `
# "role": "roles/resourcemanager.organizationAdmin",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-project-id@appspot.gserviceaccount.com"
# ]
# `,
# `
# "role": "roles/resourcemanager.organizationViewer",
# "members": ["user:eve@example.com"],
# "condition": `
# "title": "expirable access",
# "description": "Does not grant access after Sep 2020",
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')
# ",
# `
# `
# ],
# "etag": "BwWWja0YfJA=",
# "version": 3
# `
# **YAML example:**
# bindings:
# - members:
# - user:mike@example.com
# - group:admins@example.com
# - domain:google.com
# - serviceAccount:my-project-id@appspot.gserviceaccount.com
# role: roles/resourcemanager.organizationAdmin
# - members:
# - user:eve@example.com
# role: roles/resourcemanager.organizationViewer
# condition:
# title: expirable access
# description: Does not grant access after Sep 2020
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
# - etag: BwWWja0YfJA=
# - version: 3
# For a description of IAM and its features, see the
# [IAM documentation](https://cloud.google.com/iam/docs/).
class GoogleIamV1Policy
include Google::Apis::Core::Hashable
# Specifies cloud audit logging configuration for this policy.
# Corresponds to the JSON property `auditConfigs`
# @return [Array<Google::Apis::PolicytroubleshooterV1::GoogleIamV1AuditConfig>]
attr_accessor :audit_configs
# Associates a list of `members` to a `role`. Optionally, may specify a
# `condition` that determines how and when the `bindings` are applied. Each
# of the `bindings` must contain at least one member.
# Corresponds to the JSON property `bindings`
# @return [Array<Google::Apis::PolicytroubleshooterV1::GoogleIamV1Binding>]
attr_accessor :bindings
# `etag` is used for optimistic concurrency control as a way to help
# prevent simultaneous updates of a policy from overwriting each other.
# It is strongly suggested that systems make use of the `etag` in the
# read-modify-write cycle to perform policy updates in order to avoid race
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
# systems are expected to put that etag in the request to `setIamPolicy` to
# ensure that their change will be applied to the same version of the policy.
# **Important:** If you use IAM Conditions, you must include the `etag` field
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
# you to overwrite a version `3` policy with a version `1` policy, and all of
# the conditions in the version `3` policy are lost.
# Corresponds to the JSON property `etag`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :etag
# Specifies the format of the policy.
# Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
# are rejected.
# Any operation that affects conditional role bindings must specify version
# `3`. This requirement applies to the following operations:
# * Getting a policy that includes a conditional role binding
# * Adding a conditional role binding to a policy
# * Changing a conditional role binding in a policy
# * Removing any role binding, with or without a condition, from a policy
# that includes conditions
# **Important:** If you use IAM Conditions, you must include the `etag` field
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
# you to overwrite a version `3` policy with a version `1` policy, and all of
# the conditions in the version `3` policy are lost.
# If a policy does not include any conditions, operations on that policy may
# specify any valid version or leave the field unset.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
@bindings = args[:bindings] if args.key?(:bindings)
@etag = args[:etag] if args.key?(:etag)
@version = args[:version] if args.key?(:version)
end
end
# Represents an expression text. Example:
# title: "User account presence"
# description: "Determines whether the request has a user account"
# expression: "size(request.user) > 0"
class GoogleTypeExpr
include Google::Apis::Core::Hashable
# An optional description of the expression. This is a longer text which
# describes the expression, e.g. when hovered over it in a UI.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Textual representation of an expression in
# Common Expression Language syntax.
# The application context of the containing message determines which
# well-known feature set of CEL is supported.
# Corresponds to the JSON property `expression`
# @return [String]
attr_accessor :expression
# An optional string indicating the location of the expression for error
# reporting, e.g. a file name and a position in the file.
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
# An optional title for the expression, i.e. a short string describing
# its purpose. This can be used e.g. in UIs which allow to enter the
# expression.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@description = args[:description] if args.key?(:description)
@expression = args[:expression] if args.key?(:expression)
@location = args[:location] if args.key?(:location)
@title = args[:title] if args.key?(:title)
end
end
end
end
end

View File

@ -0,0 +1,203 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module PolicytroubleshooterV1
class GoogleCloudPolicytroubleshooterV1AccessTuple
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudPolicytroubleshooterV1BindingExplanation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudPolicytroubleshooterV1BindingExplanationAnnotatedMembership
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudPolicytroubleshooterV1ExplainedPolicy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleIamV1AuditConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleIamV1AuditLogConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleIamV1Binding
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleIamV1Policy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleTypeExpr
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class GoogleCloudPolicytroubleshooterV1AccessTuple
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :full_resource_name, as: 'fullResourceName'
property :permission, as: 'permission'
property :principal, as: 'principal'
end
end
class GoogleCloudPolicytroubleshooterV1BindingExplanation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :access, as: 'access'
property :condition, as: 'condition', class: Google::Apis::PolicytroubleshooterV1::GoogleTypeExpr, decorator: Google::Apis::PolicytroubleshooterV1::GoogleTypeExpr::Representation
hash :memberships, as: 'memberships', class: Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1BindingExplanationAnnotatedMembership, decorator: Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1BindingExplanationAnnotatedMembership::Representation
property :relevance, as: 'relevance'
property :role, as: 'role'
property :role_permission, as: 'rolePermission'
property :role_permission_relevance, as: 'rolePermissionRelevance'
end
end
class GoogleCloudPolicytroubleshooterV1BindingExplanationAnnotatedMembership
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :membership, as: 'membership'
property :relevance, as: 'relevance'
end
end
class GoogleCloudPolicytroubleshooterV1ExplainedPolicy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :access, as: 'access'
collection :binding_explanations, as: 'bindingExplanations', class: Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1BindingExplanation, decorator: Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1BindingExplanation::Representation
property :full_resource_name, as: 'fullResourceName'
property :policy, as: 'policy', class: Google::Apis::PolicytroubleshooterV1::GoogleIamV1Policy, decorator: Google::Apis::PolicytroubleshooterV1::GoogleIamV1Policy::Representation
property :relevance, as: 'relevance'
end
end
class GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :access_tuple, as: 'accessTuple', class: Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1AccessTuple, decorator: Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1AccessTuple::Representation
end
end
class GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :access, as: 'access'
collection :explained_policies, as: 'explainedPolicies', class: Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1ExplainedPolicy, decorator: Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1ExplainedPolicy::Representation
end
end
class GoogleIamV1AuditConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::PolicytroubleshooterV1::GoogleIamV1AuditLogConfig, decorator: Google::Apis::PolicytroubleshooterV1::GoogleIamV1AuditLogConfig::Representation
property :service, as: 'service'
end
end
class GoogleIamV1AuditLogConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :exempted_members, as: 'exemptedMembers'
property :log_type, as: 'logType'
end
end
class GoogleIamV1Binding
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :condition, as: 'condition', class: Google::Apis::PolicytroubleshooterV1::GoogleTypeExpr, decorator: Google::Apis::PolicytroubleshooterV1::GoogleTypeExpr::Representation
collection :members, as: 'members'
property :role, as: 'role'
end
end
class GoogleIamV1Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::PolicytroubleshooterV1::GoogleIamV1AuditConfig, decorator: Google::Apis::PolicytroubleshooterV1::GoogleIamV1AuditConfig::Representation
collection :bindings, as: 'bindings', class: Google::Apis::PolicytroubleshooterV1::GoogleIamV1Binding, decorator: Google::Apis::PolicytroubleshooterV1::GoogleIamV1Binding::Representation
property :etag, :base64 => true, as: 'etag'
property :version, as: 'version'
end
end
class GoogleTypeExpr
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :expression, as: 'expression'
property :location, as: 'location'
property :title, as: 'title'
end
end
end
end
end

View File

@ -0,0 +1,90 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module PolicytroubleshooterV1
# Policy Troubleshooter API
#
#
#
# @example
# require 'google/apis/policytroubleshooter_v1'
#
# Policytroubleshooter = Google::Apis::PolicytroubleshooterV1 # Alias the module
# service = Policytroubleshooter::PolicyTroubleshooterService.new
#
# @see https://cloud.google.com/iam/
class PolicyTroubleshooterService < Google::Apis::Core::BaseService
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key
# @return [String]
# 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.
attr_accessor :quota_user
def initialize
super('https://policytroubleshooter.googleapis.com/', '')
@batch_path = 'batch'
end
# Checks whether a member has a specific permission for a specific resource,
# and explains why the member does or does not have that permission.
# @param [Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyRequest] google_cloud_policytroubleshooter_v1_troubleshoot_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::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyResponse]
#
# @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 troubleshoot_iam(google_cloud_policytroubleshooter_v1_troubleshoot_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/iam:troubleshoot', options)
command.request_representation = Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyRequest::Representation
command.request_object = google_cloud_policytroubleshooter_v1_troubleshoot_iam_policy_request_object
command.response_representation = Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyResponse::Representation
command.response_class = Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyResponse
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end
end
end

View File

@ -12,26 +12,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/fusiontables_v2/service.rb'
require 'google/apis/fusiontables_v2/classes.rb'
require 'google/apis/fusiontables_v2/representations.rb'
require 'google/apis/secretmanager_v1beta1/service.rb'
require 'google/apis/secretmanager_v1beta1/classes.rb'
require 'google/apis/secretmanager_v1beta1/representations.rb'
module Google
module Apis
# Fusion Tables API
# Secret Manager API
#
# API for working with Fusion Tables data.
# Stores, manages, and secures access to application secrets.
#
# @see https://developers.google.com/fusiontables
module FusiontablesV2
VERSION = 'V2'
REVISION = '20171117'
# @see https://cloud.google.com/secret-manager/
module SecretmanagerV1beta1
VERSION = 'V1beta1'
REVISION = '20191210'
# Manage your Fusion Tables
AUTH_FUSIONTABLES = 'https://www.googleapis.com/auth/fusiontables'
# View your Fusion Tables
AUTH_FUSIONTABLES_READONLY = 'https://www.googleapis.com/auth/fusiontables.readonly'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end

View File

@ -0,0 +1,936 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module SecretmanagerV1beta1
# Response message for SecretManagerService.AccessSecretVersion.
class AccessSecretVersionResponse
include Google::Apis::Core::Hashable
# The resource name of the SecretVersion in the format
# `projects/*/secrets/*/versions/*`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# A secret payload resource in the Secret Manager API. This contains the
# sensitive secret data that is associated with a SecretVersion.
# Corresponds to the JSON property `payload`
# @return [Google::Apis::SecretmanagerV1beta1::SecretPayload]
attr_accessor :payload
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@payload = args[:payload] if args.key?(:payload)
end
end
# Request message for SecretManagerService.AddSecretVersion.
class AddSecretVersionRequest
include Google::Apis::Core::Hashable
# A secret payload resource in the Secret Manager API. This contains the
# sensitive secret data that is associated with a SecretVersion.
# Corresponds to the JSON property `payload`
# @return [Google::Apis::SecretmanagerV1beta1::SecretPayload]
attr_accessor :payload
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@payload = args[:payload] if args.key?(:payload)
end
end
# Specifies the audit configuration for a service.
# The configuration determines which permission types are logged, and what
# identities, if any, are exempted from logging.
# An AuditConfig must have one or more AuditLogConfigs.
# If there are AuditConfigs for both `allServices` and a specific service,
# the union of the two AuditConfigs is used for that service: the log_types
# specified in each AuditConfig are enabled, and the exempted_members in each
# AuditLogConfig are exempted.
# Example Policy with multiple AuditConfigs:
# `
# "audit_configs": [
# `
# "service": "allServices"
# "audit_log_configs": [
# `
# "log_type": "DATA_READ",
# "exempted_members": [
# "user:jose@example.com"
# ]
# `,
# `
# "log_type": "DATA_WRITE",
# `,
# `
# "log_type": "ADMIN_READ",
# `
# ]
# `,
# `
# "service": "sampleservice.googleapis.com"
# "audit_log_configs": [
# `
# "log_type": "DATA_READ",
# `,
# `
# "log_type": "DATA_WRITE",
# "exempted_members": [
# "user:aliya@example.com"
# ]
# `
# ]
# `
# ]
# `
# For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
# logging. It also exempts jose@example.com from DATA_READ logging, and
# aliya@example.com from DATA_WRITE logging.
class AuditConfig
include Google::Apis::Core::Hashable
# The configuration for logging of each type of permission.
# Corresponds to the JSON property `auditLogConfigs`
# @return [Array<Google::Apis::SecretmanagerV1beta1::AuditLogConfig>]
attr_accessor :audit_log_configs
# Specifies a service that will be enabled for audit logging.
# For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
# `allServices` is a special value that covers all services.
# Corresponds to the JSON property `service`
# @return [String]
attr_accessor :service
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
@service = args[:service] if args.key?(:service)
end
end
# Provides the configuration for logging a type of permissions.
# Example:
# `
# "audit_log_configs": [
# `
# "log_type": "DATA_READ",
# "exempted_members": [
# "user:jose@example.com"
# ]
# `,
# `
# "log_type": "DATA_WRITE",
# `
# ]
# `
# This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
# jose@example.com from DATA_READ logging.
class AuditLogConfig
include Google::Apis::Core::Hashable
# Specifies the identities that do not cause logging for this type of
# permission.
# Follows the same format of Binding.members.
# Corresponds to the JSON property `exemptedMembers`
# @return [Array<String>]
attr_accessor :exempted_members
# The log type that this config enables.
# Corresponds to the JSON property `logType`
# @return [String]
attr_accessor :log_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
@log_type = args[:log_type] if args.key?(:log_type)
end
end
# A replication policy that replicates the Secret payload without any
# restrictions.
class Automatic
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Associates `members` with a `role`.
class Binding
include Google::Apis::Core::Hashable
# Represents an expression text. Example:
# title: "User account presence"
# description: "Determines whether the request has a user account"
# expression: "size(request.user) > 0"
# Corresponds to the JSON property `condition`
# @return [Google::Apis::SecretmanagerV1beta1::Expr]
attr_accessor :condition
# 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@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`.
# * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a user that has been recently deleted. For
# example, `alice@example.com?uid=123456789012345678901`. If the user is
# recovered, this value reverts to `user:`emailid`` and the recovered user
# retains the role in the binding.
# * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus
# unique identifier) representing a service account that has been recently
# deleted. For example,
# `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
# If the service account is undeleted, this value reverts to
# `serviceAccount:`emailid`` and the undeleted service account retains the
# role in the binding.
# * `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a Google group that has been recently
# deleted. For example, `admins@example.com?uid=123456789012345678901`. If
# the group is recovered, this value reverts to `group:`emailid`` and the
# recovered group retains the role in the binding.
# * `domain:`domain``: The G Suite domain (primary) 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`.
# 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)
@condition = args[:condition] if args.key?(:condition)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
# Request message for SecretManagerService.DestroySecretVersion.
class DestroySecretVersionRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Request message for SecretManagerService.DisableSecretVersion.
class DisableSecretVersionRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
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:
# service Foo `
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
# `
# The JSON representation for `Empty` is empty JSON object ````.
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Request message for SecretManagerService.EnableSecretVersion.
class EnableSecretVersionRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Represents an expression text. Example:
# title: "User account presence"
# description: "Determines whether the request has a user account"
# expression: "size(request.user) > 0"
class Expr
include Google::Apis::Core::Hashable
# An optional description of the expression. This is a longer text which
# describes the expression, e.g. when hovered over it in a UI.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Textual representation of an expression in
# Common Expression Language syntax.
# The application context of the containing message determines which
# well-known feature set of CEL is supported.
# Corresponds to the JSON property `expression`
# @return [String]
attr_accessor :expression
# An optional string indicating the location of the expression for error
# reporting, e.g. a file name and a position in the file.
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
# An optional title for the expression, i.e. a short string describing
# its purpose. This can be used e.g. in UIs which allow to enter the
# expression.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@description = args[:description] if args.key?(:description)
@expression = args[:expression] if args.key?(:expression)
@location = args[:location] if args.key?(:location)
@title = args[:title] if args.key?(:title)
end
end
# The response message for Locations.ListLocations.
class ListLocationsResponse
include Google::Apis::Core::Hashable
# A list of locations that matches the specified filter in the request.
# Corresponds to the JSON property `locations`
# @return [Array<Google::Apis::SecretmanagerV1beta1::Location>]
attr_accessor :locations
# The standard List next-page token.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@locations = args[:locations] if args.key?(:locations)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# Response message for SecretManagerService.ListSecretVersions.
class ListSecretVersionsResponse
include Google::Apis::Core::Hashable
# A token to retrieve the next page of results. Pass this value in
# ListSecretVersionsRequest.page_token to retrieve the next page.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The total number of SecretVersions.
# Corresponds to the JSON property `totalSize`
# @return [Fixnum]
attr_accessor :total_size
# The list of SecretVersions sorted in reverse by
# create_time (newest first).
# Corresponds to the JSON property `versions`
# @return [Array<Google::Apis::SecretmanagerV1beta1::SecretVersion>]
attr_accessor :versions
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)
@total_size = args[:total_size] if args.key?(:total_size)
@versions = args[:versions] if args.key?(:versions)
end
end
# Response message for SecretManagerService.ListSecrets.
class ListSecretsResponse
include Google::Apis::Core::Hashable
# A token to retrieve the next page of results. Pass this value in
# ListSecretsRequest.page_token to retrieve the next page.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The list of Secrets sorted in reverse by create_time (newest
# first).
# Corresponds to the JSON property `secrets`
# @return [Array<Google::Apis::SecretmanagerV1beta1::Secret>]
attr_accessor :secrets
# The total number of Secrets.
# Corresponds to the JSON property `totalSize`
# @return [Fixnum]
attr_accessor :total_size
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)
@secrets = args[:secrets] if args.key?(:secrets)
@total_size = args[:total_size] if args.key?(:total_size)
end
end
# A resource that represents Google Cloud Platform location.
class Location
include Google::Apis::Core::Hashable
# The friendly name for this location, typically a nearby city name.
# For example, "Tokyo".
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Cross-service attributes for the location. For example
# `"cloud.googleapis.com/region": "us-east1"`
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# The canonical id for this location. For example: `"us-east1"`.
# Corresponds to the JSON property `locationId`
# @return [String]
attr_accessor :location_id
# Service-specific metadata. For example the available capacity at the given
# location.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
# Resource name for the location, which may vary between implementations.
# For example: `"projects/example-project/locations/us-east1"`
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@labels = args[:labels] if args.key?(:labels)
@location_id = args[:location_id] if args.key?(:location_id)
@metadata = args[:metadata] if args.key?(:metadata)
@name = args[:name] if args.key?(:name)
end
end
# An Identity and Access Management (IAM) policy, which specifies access
# controls for Google Cloud resources.
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
# `members` to a single `role`. Members can be user accounts, service accounts,
# Google groups, and domains (such as G Suite). A `role` is a named list of
# permissions; each `role` can be an IAM predefined role or a user-created
# custom role.
# Optionally, a `binding` can specify a `condition`, which is a logical
# expression that allows access to a resource only if the expression evaluates
# to `true`. A condition can add constraints based on attributes of the
# request, the resource, or both.
# **JSON example:**
# `
# "bindings": [
# `
# "role": "roles/resourcemanager.organizationAdmin",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-project-id@appspot.gserviceaccount.com"
# ]
# `,
# `
# "role": "roles/resourcemanager.organizationViewer",
# "members": ["user:eve@example.com"],
# "condition": `
# "title": "expirable access",
# "description": "Does not grant access after Sep 2020",
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')
# ",
# `
# `
# ],
# "etag": "BwWWja0YfJA=",
# "version": 3
# `
# **YAML example:**
# bindings:
# - members:
# - user:mike@example.com
# - group:admins@example.com
# - domain:google.com
# - serviceAccount:my-project-id@appspot.gserviceaccount.com
# role: roles/resourcemanager.organizationAdmin
# - members:
# - user:eve@example.com
# role: roles/resourcemanager.organizationViewer
# condition:
# title: expirable access
# description: Does not grant access after Sep 2020
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
# - etag: BwWWja0YfJA=
# - version: 3
# For a description of IAM and its features, see the
# [IAM documentation](https://cloud.google.com/iam/docs/).
class Policy
include Google::Apis::Core::Hashable
# Specifies cloud audit logging configuration for this policy.
# Corresponds to the JSON property `auditConfigs`
# @return [Array<Google::Apis::SecretmanagerV1beta1::AuditConfig>]
attr_accessor :audit_configs
# Associates a list of `members` to a `role`. Optionally, may specify a
# `condition` that determines how and when the `bindings` are applied. Each
# of the `bindings` must contain at least one member.
# Corresponds to the JSON property `bindings`
# @return [Array<Google::Apis::SecretmanagerV1beta1::Binding>]
attr_accessor :bindings
# `etag` is used for optimistic concurrency control as a way to help
# prevent simultaneous updates of a policy from overwriting each other.
# It is strongly suggested that systems make use of the `etag` in the
# read-modify-write cycle to perform policy updates in order to avoid race
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
# systems are expected to put that etag in the request to `setIamPolicy` to
# ensure that their change will be applied to the same version of the policy.
# **Important:** If you use IAM Conditions, you must include the `etag` field
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
# you to overwrite a version `3` policy with a version `1` policy, and all of
# the conditions in the version `3` policy are lost.
# Corresponds to the JSON property `etag`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :etag
# Specifies the format of the policy.
# Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
# are rejected.
# Any operation that affects conditional role bindings must specify version
# `3`. This requirement applies to the following operations:
# * Getting a policy that includes a conditional role binding
# * Adding a conditional role binding to a policy
# * Changing a conditional role binding in a policy
# * Removing any role binding, with or without a condition, from a policy
# that includes conditions
# **Important:** If you use IAM Conditions, you must include the `etag` field
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
# you to overwrite a version `3` policy with a version `1` policy, and all of
# the conditions in the version `3` policy are lost.
# If a policy does not include any conditions, operations on that policy may
# specify any valid version or leave the field unset.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
@bindings = args[:bindings] if args.key?(:bindings)
@etag = args[:etag] if args.key?(:etag)
@version = args[:version] if args.key?(:version)
end
end
# Represents a Replica for this Secret.
class Replica
include Google::Apis::Core::Hashable
# The canonical IDs of the location to replicate data.
# For example: `"us-east1"`.
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@location = args[:location] if args.key?(:location)
end
end
# A policy that defines the replication configuration of data.
class Replication
include Google::Apis::Core::Hashable
# A replication policy that replicates the Secret payload without any
# restrictions.
# Corresponds to the JSON property `automatic`
# @return [Google::Apis::SecretmanagerV1beta1::Automatic]
attr_accessor :automatic
# A replication policy that replicates the Secret payload into the
# locations specified in Secret.replication.user_managed.replicas
# Corresponds to the JSON property `userManaged`
# @return [Google::Apis::SecretmanagerV1beta1::UserManaged]
attr_accessor :user_managed
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@automatic = args[:automatic] if args.key?(:automatic)
@user_managed = args[:user_managed] if args.key?(:user_managed)
end
end
# A Secret is a logical secret whose value and versions can
# be accessed.
# A Secret is made up of zero or more SecretVersions that
# represent the secret data.
class Secret
include Google::Apis::Core::Hashable
# Output only. The time at which the Secret was created.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# The labels assigned to this Secret.
# Label keys must be between 1 and 63 characters long, have a UTF-8 encoding
# of maximum 128 bytes, and must conform to the following PCRE regular
# expression: `\p`Ll`\p`Lo``0,62``
# Label values must be between 0 and 63 characters long, have a UTF-8
# encoding of maximum 128 bytes, and must conform to the following PCRE
# regular expression: `[\p`Ll`\p`Lo`\p`N`_-]`0,63``
# No more than 64 labels can be assigned to a given resource.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Output only. The resource name of the Secret in the format `projects/*/secrets/
# *`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# A policy that defines the replication configuration of data.
# Corresponds to the JSON property `replication`
# @return [Google::Apis::SecretmanagerV1beta1::Replication]
attr_accessor :replication
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@create_time = args[:create_time] if args.key?(:create_time)
@labels = args[:labels] if args.key?(:labels)
@name = args[:name] if args.key?(:name)
@replication = args[:replication] if args.key?(:replication)
end
end
# A secret payload resource in the Secret Manager API. This contains the
# sensitive secret data that is associated with a SecretVersion.
class SecretPayload
include Google::Apis::Core::Hashable
# The secret data. Must be no larger than 64KiB.
# 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)
@data = args[:data] if args.key?(:data)
end
end
# A secret version resource in the Secret Manager API.
class SecretVersion
include Google::Apis::Core::Hashable
# Output only. The time at which the SecretVersion was created.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# Output only. The time this SecretVersion was destroyed.
# Only present if state is
# DESTROYED.
# Corresponds to the JSON property `destroyTime`
# @return [String]
attr_accessor :destroy_time
# Output only. The resource name of the SecretVersion in the
# format `projects/*/secrets/*/versions/*`.
# SecretVersion IDs in a Secret start at 1 and
# are incremented for each subsequent version of the secret.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Output only. The current state of the SecretVersion.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@create_time = args[:create_time] if args.key?(:create_time)
@destroy_time = args[:destroy_time] if args.key?(:destroy_time)
@name = args[:name] if args.key?(:name)
@state = args[:state] if args.key?(:state)
end
end
# Request message for `SetIamPolicy` method.
class SetIamPolicyRequest
include Google::Apis::Core::Hashable
# An Identity and Access Management (IAM) policy, which specifies access
# controls for Google Cloud resources.
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
# `members` to a single `role`. Members can be user accounts, service accounts,
# Google groups, and domains (such as G Suite). A `role` is a named list of
# permissions; each `role` can be an IAM predefined role or a user-created
# custom role.
# Optionally, a `binding` can specify a `condition`, which is a logical
# expression that allows access to a resource only if the expression evaluates
# to `true`. A condition can add constraints based on attributes of the
# request, the resource, or both.
# **JSON example:**
# `
# "bindings": [
# `
# "role": "roles/resourcemanager.organizationAdmin",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-project-id@appspot.gserviceaccount.com"
# ]
# `,
# `
# "role": "roles/resourcemanager.organizationViewer",
# "members": ["user:eve@example.com"],
# "condition": `
# "title": "expirable access",
# "description": "Does not grant access after Sep 2020",
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')
# ",
# `
# `
# ],
# "etag": "BwWWja0YfJA=",
# "version": 3
# `
# **YAML example:**
# bindings:
# - members:
# - user:mike@example.com
# - group:admins@example.com
# - domain:google.com
# - serviceAccount:my-project-id@appspot.gserviceaccount.com
# role: roles/resourcemanager.organizationAdmin
# - members:
# - user:eve@example.com
# role: roles/resourcemanager.organizationViewer
# condition:
# title: expirable access
# description: Does not grant access after Sep 2020
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
# - etag: BwWWja0YfJA=
# - version: 3
# For a description of IAM and its features, see the
# [IAM documentation](https://cloud.google.com/iam/docs/).
# Corresponds to the JSON property `policy`
# @return [Google::Apis::SecretmanagerV1beta1::Policy]
attr_accessor :policy
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
# the fields in the mask will be modified. If no mask is provided, the
# following default mask is used:
# paths: "bindings, etag"
# This field is only used by Cloud IAM.
# 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)
@policy = args[:policy] if args.key?(:policy)
@update_mask = args[:update_mask] if args.key?(:update_mask)
end
end
# Request message for `TestIamPermissions` method.
class TestIamPermissionsRequest
include Google::Apis::Core::Hashable
# The set of permissions to check for the `resource`. Permissions with
# wildcards (such as '*' or 'storage.*') are not allowed. For more
# information see
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
# Corresponds to the JSON property `permissions`
# @return [Array<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] if args.key?(:permissions)
end
end
# Response message for `TestIamPermissions` method.
class TestIamPermissionsResponse
include Google::Apis::Core::Hashable
# A subset of `TestPermissionsRequest.permissions` that the caller is
# allowed.
# Corresponds to the JSON property `permissions`
# @return [Array<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] if args.key?(:permissions)
end
end
# A replication policy that replicates the Secret payload into the
# locations specified in Secret.replication.user_managed.replicas
class UserManaged
include Google::Apis::Core::Hashable
# Required. The list of Replicas for this Secret.
# Cannot be empty.
# Corresponds to the JSON property `replicas`
# @return [Array<Google::Apis::SecretmanagerV1beta1::Replica>]
attr_accessor :replicas
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@replicas = args[:replicas] if args.key?(:replicas)
end
end
end
end
end

View File

@ -0,0 +1,388 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module SecretmanagerV1beta1
class AccessSecretVersionResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AddSecretVersionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AuditConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AuditLogConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Automatic
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 DestroySecretVersionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DisableSecretVersionRequest
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 EnableSecretVersionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Expr
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListLocationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListSecretVersionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListSecretsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Location
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Policy
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Replica
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Replication
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Secret
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SecretPayload
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SecretVersion
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 TestIamPermissionsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TestIamPermissionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class UserManaged
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AccessSecretVersionResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :payload, as: 'payload', class: Google::Apis::SecretmanagerV1beta1::SecretPayload, decorator: Google::Apis::SecretmanagerV1beta1::SecretPayload::Representation
end
end
class AddSecretVersionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :payload, as: 'payload', class: Google::Apis::SecretmanagerV1beta1::SecretPayload, decorator: Google::Apis::SecretmanagerV1beta1::SecretPayload::Representation
end
end
class AuditConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::SecretmanagerV1beta1::AuditLogConfig, decorator: Google::Apis::SecretmanagerV1beta1::AuditLogConfig::Representation
property :service, as: 'service'
end
end
class AuditLogConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :exempted_members, as: 'exemptedMembers'
property :log_type, as: 'logType'
end
end
class Automatic
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Binding
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :condition, as: 'condition', class: Google::Apis::SecretmanagerV1beta1::Expr, decorator: Google::Apis::SecretmanagerV1beta1::Expr::Representation
collection :members, as: 'members'
property :role, as: 'role'
end
end
class DestroySecretVersionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class DisableSecretVersionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class EnableSecretVersionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Expr
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :expression, as: 'expression'
property :location, as: 'location'
property :title, as: 'title'
end
end
class ListLocationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :locations, as: 'locations', class: Google::Apis::SecretmanagerV1beta1::Location, decorator: Google::Apis::SecretmanagerV1beta1::Location::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class ListSecretVersionsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
property :total_size, as: 'totalSize'
collection :versions, as: 'versions', class: Google::Apis::SecretmanagerV1beta1::SecretVersion, decorator: Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation
end
end
class ListSecretsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :secrets, as: 'secrets', class: Google::Apis::SecretmanagerV1beta1::Secret, decorator: Google::Apis::SecretmanagerV1beta1::Secret::Representation
property :total_size, as: 'totalSize'
end
end
class Location
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
hash :labels, as: 'labels'
property :location_id, as: 'locationId'
hash :metadata, as: 'metadata'
property :name, as: 'name'
end
end
class Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::SecretmanagerV1beta1::AuditConfig, decorator: Google::Apis::SecretmanagerV1beta1::AuditConfig::Representation
collection :bindings, as: 'bindings', class: Google::Apis::SecretmanagerV1beta1::Binding, decorator: Google::Apis::SecretmanagerV1beta1::Binding::Representation
property :etag, :base64 => true, as: 'etag'
property :version, as: 'version'
end
end
class Replica
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :location, as: 'location'
end
end
class Replication
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :automatic, as: 'automatic', class: Google::Apis::SecretmanagerV1beta1::Automatic, decorator: Google::Apis::SecretmanagerV1beta1::Automatic::Representation
property :user_managed, as: 'userManaged', class: Google::Apis::SecretmanagerV1beta1::UserManaged, decorator: Google::Apis::SecretmanagerV1beta1::UserManaged::Representation
end
end
class Secret
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :create_time, as: 'createTime'
hash :labels, as: 'labels'
property :name, as: 'name'
property :replication, as: 'replication', class: Google::Apis::SecretmanagerV1beta1::Replication, decorator: Google::Apis::SecretmanagerV1beta1::Replication::Representation
end
end
class SecretPayload
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :data, :base64 => true, as: 'data'
end
end
class SecretVersion
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :create_time, as: 'createTime'
property :destroy_time, as: 'destroyTime'
property :name, as: 'name'
property :state, as: 'state'
end
end
class SetIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :policy, as: 'policy', class: Google::Apis::SecretmanagerV1beta1::Policy, decorator: Google::Apis::SecretmanagerV1beta1::Policy::Representation
property :update_mask, as: 'updateMask'
end
end
class TestIamPermissionsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class TestIamPermissionsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class UserManaged
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :replicas, as: 'replicas', class: Google::Apis::SecretmanagerV1beta1::Replica, decorator: Google::Apis::SecretmanagerV1beta1::Replica::Representation
end
end
end
end
end

View File

@ -0,0 +1,674 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module SecretmanagerV1beta1
# Secret Manager API
#
# Stores, manages, and secures access to application secrets.
#
# @example
# require 'google/apis/secretmanager_v1beta1'
#
# Secretmanager = Google::Apis::SecretmanagerV1beta1 # Alias the module
# service = Secretmanager::SecretManagerService.new
#
# @see https://cloud.google.com/secret-manager/
class SecretManagerService < Google::Apis::Core::BaseService
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key
# @return [String]
# 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.
attr_accessor :quota_user
def initialize
super('https://secretmanager.googleapis.com/', '')
@batch_path = 'batch'
end
# Gets information about a location.
# @param [String] name
# Resource name for the location.
# @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::SecretmanagerV1beta1::Location] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::Location]
#
# @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_location(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::SecretmanagerV1beta1::Location::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::Location
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 information about the supported locations for this service.
# @param [String] name
# The resource that owns the locations collection, if applicable.
# @param [String] filter
# The standard list filter.
# @param [Fixnum] page_size
# The standard list page size.
# @param [String] page_token
# The standard list page token.
# @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::SecretmanagerV1beta1::ListLocationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::ListLocationsResponse]
#
# @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_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}/locations', options)
command.response_representation = Google::Apis::SecretmanagerV1beta1::ListLocationsResponse::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::ListLocationsResponse
command.params['name'] = name unless name.nil?
command.query['filter'] = filter unless filter.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 a new SecretVersion containing secret data and attaches
# it to an existing Secret.
# @param [String] parent
# Required. The resource name of the Secret to associate with the
# SecretVersion in the format `projects/*/secrets/*`.
# @param [Google::Apis::SecretmanagerV1beta1::AddSecretVersionRequest] add_secret_version_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::SecretmanagerV1beta1::SecretVersion] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::SecretVersion]
#
# @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 add_project_secret_version(parent, add_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}:addVersion', options)
command.request_representation = Google::Apis::SecretmanagerV1beta1::AddSecretVersionRequest::Representation
command.request_object = add_secret_version_request_object
command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion
command.params['parent'] = parent unless parent.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 new Secret containing no SecretVersions.
# @param [String] parent
# Required. The resource name of the project to associate with the
# Secret, in the format `projects/*`.
# @param [Google::Apis::SecretmanagerV1beta1::Secret] secret_object
# @param [String] secret_id
# Required. This must be unique within the project.
# @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::SecretmanagerV1beta1::Secret] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::Secret]
#
# @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_project_secret(parent, secret_object = nil, secret_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}/secrets', options)
command.request_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation
command.request_object = secret_object
command.response_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::Secret
command.params['parent'] = parent unless parent.nil?
command.query['secretId'] = secret_id unless secret_id.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 a Secret.
# @param [String] name
# Required. The resource name of the Secret to delete in the format
# `projects/*/secrets/*`.
# @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::SecretmanagerV1beta1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::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_secret(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::SecretmanagerV1beta1::Empty::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::Empty
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
# Gets metadata for a given Secret.
# @param [String] name
# Required. The resource name of the Secret, in the format `projects/*/secrets/*`
# .
# @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::SecretmanagerV1beta1::Secret] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::Secret]
#
# @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_secret(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::Secret
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
# Gets the access control policy for a secret.
# Returns empty policy if the secret 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 [Fixnum] options_requested_policy_version
# Optional. The policy format version to be returned.
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
# rejected.
# Requests for policies with any conditional bindings must specify version 3.
# Policies without any conditional bindings may specify any valid value or
# leave the field unset.
# @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::SecretmanagerV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::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_secret_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+resource}:getIamPolicy', options)
command.response_representation = Google::Apis::SecretmanagerV1beta1::Policy::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::Policy
command.params['resource'] = resource unless resource.nil?
command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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 Secrets.
# @param [String] parent
# Required. The resource name of the project associated with the
# Secrets, in the format `projects/*`.
# @param [Fixnum] page_size
# Optional. The maximum number of results to be returned in a single page. If
# set to 0, the server decides the number of results to return. If the
# number is greater than 25000, it is capped at 25000.
# @param [String] page_token
# Optional. Pagination token, returned earlier via
# ListSecretsResponse.next_page_token.
# @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::SecretmanagerV1beta1::ListSecretsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::ListSecretsResponse]
#
# @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_secrets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+parent}/secrets', options)
command.response_representation = Google::Apis::SecretmanagerV1beta1::ListSecretsResponse::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::ListSecretsResponse
command.params['parent'] = parent unless parent.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 metadata of an existing Secret.
# @param [String] name
# Output only. The resource name of the Secret in the format `projects/*/secrets/
# *`.
# @param [Google::Apis::SecretmanagerV1beta1::Secret] secret_object
# @param [String] update_mask
# Required. Specifies the fields to be updated.
# @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::SecretmanagerV1beta1::Secret] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::Secret]
#
# @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_secret(name, secret_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
command.request_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation
command.request_object = secret_object
command.response_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::Secret
command.params['name'] = name unless name.nil?
command.query['updateMask'] = update_mask unless update_mask.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 secret. Replaces any
# existing policy.
# Permissions on SecretVersions are enforced according
# to the policy set on the associated Secret.
# @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::SecretmanagerV1beta1::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::SecretmanagerV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::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_secret_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
command.request_representation = Google::Apis::SecretmanagerV1beta1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::SecretmanagerV1beta1::Policy::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::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 for the specified secret.
# If the secret does not exist, this call returns 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::SecretmanagerV1beta1::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::SecretmanagerV1beta1::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::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_secret_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
command.request_representation = Google::Apis::SecretmanagerV1beta1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::SecretmanagerV1beta1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::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
# Accesses a SecretVersion. This call returns the secret data.
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
# SecretVersion.
# @param [String] name
# Required. The resource name of the SecretVersion in the format
# `projects/*/secrets/*/versions/*`.
# @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::SecretmanagerV1beta1::AccessSecretVersionResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::AccessSecretVersionResponse]
#
# @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 access_project_secret_version(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}:access', options)
command.response_representation = Google::Apis::SecretmanagerV1beta1::AccessSecretVersionResponse::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::AccessSecretVersionResponse
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
# Destroys a SecretVersion.
# Sets the state of the SecretVersion to
# DESTROYED and irrevocably destroys the
# secret data.
# @param [String] name
# Required. The resource name of the SecretVersion to destroy in the format
# `projects/*/secrets/*/versions/*`.
# @param [Google::Apis::SecretmanagerV1beta1::DestroySecretVersionRequest] destroy_secret_version_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::SecretmanagerV1beta1::SecretVersion] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::SecretVersion]
#
# @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 destroy_secret_version(name, destroy_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+name}:destroy', options)
command.request_representation = Google::Apis::SecretmanagerV1beta1::DestroySecretVersionRequest::Representation
command.request_object = destroy_secret_version_request_object
command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion
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
# Disables a SecretVersion.
# Sets the state of the SecretVersion to
# DISABLED.
# @param [String] name
# Required. The resource name of the SecretVersion to disable in the format
# `projects/*/secrets/*/versions/*`.
# @param [Google::Apis::SecretmanagerV1beta1::DisableSecretVersionRequest] disable_secret_version_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::SecretmanagerV1beta1::SecretVersion] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::SecretVersion]
#
# @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 disable_secret_version(name, disable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+name}:disable', options)
command.request_representation = Google::Apis::SecretmanagerV1beta1::DisableSecretVersionRequest::Representation
command.request_object = disable_secret_version_request_object
command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion
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
# Enables a SecretVersion.
# Sets the state of the SecretVersion to
# ENABLED.
# @param [String] name
# Required. The resource name of the SecretVersion to enable in the format
# `projects/*/secrets/*/versions/*`.
# @param [Google::Apis::SecretmanagerV1beta1::EnableSecretVersionRequest] enable_secret_version_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::SecretmanagerV1beta1::SecretVersion] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::SecretVersion]
#
# @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 enable_secret_version(name, enable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+name}:enable', options)
command.request_representation = Google::Apis::SecretmanagerV1beta1::EnableSecretVersionRequest::Representation
command.request_object = enable_secret_version_request_object
command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion
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
# Gets metadata for a SecretVersion.
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
# SecretVersion.
# @param [String] name
# Required. The resource name of the SecretVersion in the format
# `projects/*/secrets/*/versions/*`.
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
# SecretVersion.
# @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::SecretmanagerV1beta1::SecretVersion] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::SecretVersion]
#
# @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_secret_version(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion
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 SecretVersions. This call does not return secret
# data.
# @param [String] parent
# Required. The resource name of the Secret associated with the
# SecretVersions to list, in the format
# `projects/*/secrets/*`.
# @param [Fixnum] page_size
# Optional. The maximum number of results to be returned in a single page. If
# set to 0, the server decides the number of results to return. If the
# number is greater than 25000, it is capped at 25000.
# @param [String] page_token
# Optional. Pagination token, returned earlier via
# ListSecretVersionsResponse.next_page_token][].
# @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::SecretmanagerV1beta1::ListSecretVersionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SecretmanagerV1beta1::ListSecretVersionsResponse]
#
# @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_secret_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+parent}/versions', options)
command.response_representation = Google::Apis::SecretmanagerV1beta1::ListSecretVersionsResponse::Representation
command.response_class = Google::Apis::SecretmanagerV1beta1::ListSecretVersionsResponse
command.params['parent'] = parent unless parent.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
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end
end
end