Regenerate apis, add datastore_v1beta3

This commit is contained in:
Steve Bazyl committed 2016-06-23 12:42:56 -07:00
1 parent 3714da7a3f
commit d9a91c83ee
70 files changed
+4763 -356

No files matched your search

@@ -44,9 +44,10 @@ module Google
# @return [String]
attr_accessor :lifecycle_state
# The user-assigned name of the Project. It must be 4 to 30 characters. Allowed
# characters are: lowercase and uppercase letters, numbers, hyphen, single-quote,
# double-quote, space, and exclamation point. Example: My Project Read-write.
# The user-assigned display name of the Project. It must be 4 to 30 characters.
# Allowed characters are: lowercase and uppercase letters, numbers, hyphen,
# single-quote, double-quote, space, and exclamation point. Example: My Project
# Read-write.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
@@ -350,6 +351,159 @@ module Google
@permissions = args[:permissions] if args.key?(:permissions)
end
end
# This resource represents a long-running operation that is the result of a
# network API call.
class Operation
include Google::Apis::Core::Hashable
# The server-assigned name, which is only unique within the same service that
# originally returns it. If you use the default HTTP mapping, the `name` should
# have the format of `operations/some/unique/name`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Service-specific metadata associated with the operation. It typically contains
# progress information and common metadata such as create time. Some services
# might not provide such metadata. Any method that returns a long-running
# operation should document the metadata type, if any.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
# If the value is `false`, it means the operation is still in progress. If true,
# the operation is completed, and either `error` or `response` is available.
# Corresponds to the JSON property `done`
# @return [Boolean]
attr_accessor :done
alias_method :done?, :done
# The `Status` type defines a logical error model that is suitable for different
# programming environments, including REST APIs and RPC APIs. It is used by [
# gRPC](https://github.com/grpc). The error model is designed to be: - Simple to
# use and understand for most users - Flexible enough to meet unexpected needs #
# Overview The `Status` message contains three pieces of data: error code, error
# message, and error details. The error code should be an enum value of google.
# rpc.Code, but it may accept additional error codes if needed. The error
# message should be a developer-facing English message that helps developers *
# understand* and *resolve* the error. If a localized user-facing error message
# is needed, put the localized message in the error details or localize it in
# the client. The optional error details may contain arbitrary information about
# the error. There is a predefined set of error detail types in the package `
# google.rpc` which can be used for common error conditions. # Language mapping
# The `Status` message is the logical representation of the error model, but it
# is not necessarily the actual wire format. When the `Status` message is
# exposed in different client libraries and different wire protocols, it can be
# mapped differently. For example, it will likely be mapped to some exceptions
# in Java, but more likely mapped to some error codes in C. # Other uses The
# error model and the `Status` message can be used in a variety of environments,
# either with or without APIs, to provide a consistent developer experience
# across different environments. Example uses of this error model include: -
# Partial errors. If a service needs to return partial errors to the client, it
# may embed the `Status` in the normal response to indicate the partial errors. -
# Workflow errors. A typical workflow has multiple steps. Each step may have a `
# Status` message for error reporting purpose. - Batch operations. If a client
# uses batch request and batch response, the `Status` message should be used
# directly inside batch response, one for each error sub-response. -
# Asynchronous operations. If an API call embeds asynchronous operation results
# in its response, the status of those operations should be represented directly
# using the `Status` message. - Logging. If some API errors are stored in logs,
# the message `Status` could be used directly after any stripping needed for
# security/privacy reasons.
# Corresponds to the JSON property `error`
# @return [Google::Apis::CloudresourcemanagerV1::Status]
attr_accessor :error
# The normal response of the operation in case of success. If the original
# method returns no data on success, such as `Delete`, the response is `google.
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
# the response should be the resource. For other methods, the response should
# have the type `XxxResponse`, where `Xxx` is the original method name. For
# example, if the original method name is `TakeSnapshot()`, the inferred
# response type is `TakeSnapshotResponse`.
# Corresponds to the JSON property `response`
# @return [Hash<String,Object>]
attr_accessor :response
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
@metadata = args[:metadata] if args.key?(:metadata)
@done = args[:done] if args.key?(:done)
@error = args[:error] if args.key?(:error)
@response = args[:response] if args.key?(:response)
end
end
# The `Status` type defines a logical error model that is suitable for different
# programming environments, including REST APIs and RPC APIs. It is used by [
# gRPC](https://github.com/grpc). The error model is designed to be: - Simple to
# use and understand for most users - Flexible enough to meet unexpected needs #
# Overview The `Status` message contains three pieces of data: error code, error
# message, and error details. The error code should be an enum value of google.
# rpc.Code, but it may accept additional error codes if needed. The error
# message should be a developer-facing English message that helps developers *
# understand* and *resolve* the error. If a localized user-facing error message
# is needed, put the localized message in the error details or localize it in
# the client. The optional error details may contain arbitrary information about
# the error. There is a predefined set of error detail types in the package `
# google.rpc` which can be used for common error conditions. # Language mapping
# The `Status` message is the logical representation of the error model, but it
# is not necessarily the actual wire format. When the `Status` message is
# exposed in different client libraries and different wire protocols, it can be
# mapped differently. For example, it will likely be mapped to some exceptions
# in Java, but more likely mapped to some error codes in C. # Other uses The
# error model and the `Status` message can be used in a variety of environments,
# either with or without APIs, to provide a consistent developer experience
# across different environments. Example uses of this error model include: -
# Partial errors. If a service needs to return partial errors to the client, it
# may embed the `Status` in the normal response to indicate the partial errors. -
# Workflow errors. A typical workflow has multiple steps. Each step may have a `
# Status` message for error reporting purpose. - Batch operations. If a client
# uses batch request and batch response, the `Status` message should be used
# directly inside batch response, one for each error sub-response. -
# Asynchronous operations. If an API call embeds asynchronous operation results
# in its response, the status of those operations should be represented directly
# using the `Status` message. - Logging. If some API errors are stored in logs,
# the message `Status` could be used directly after any stripping needed for
# security/privacy reasons.
class Status
include Google::Apis::Core::Hashable
# The status code, which should be an enum value of google.rpc.Code.
# Corresponds to the JSON property `code`
# @return [Fixnum]
attr_accessor :code
# A developer-facing error message, which should be in English. Any user-facing
# error message should be localized and sent in the google.rpc.Status.details
# field, or localized by the client.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
# A list of messages that carry the error details. There will be a common set of
# message types for APIs to use.
# Corresponds to the JSON property `details`
# @return [Array<Hash<String,Object>>]
attr_accessor :details
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] if args.key?(:code)
@message = args[:message] if args.key?(:message)
@details = args[:details] if args.key?(:details)
end
end
end
end
end
@@ -88,6 +88,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Status
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Project
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -176,6 +188,27 @@ module Google
collection :permissions, as: 'permissions'
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
hash :metadata, as: 'metadata'
property :done, as: 'done'
property :error, as: 'error', class: Google::Apis::CloudresourcemanagerV1::Status, decorator: Google::Apis::CloudresourcemanagerV1::Status::Representation
hash :response, as: 'response'
end
end
class Status
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :message, as: 'message'
collection :details, as: 'details'
end
end
end
end
end
@@ -167,13 +167,12 @@ module Google
# following criteria are met: + The Project does not have a billing account
# associated with it. + The Project has a lifecycle state of ACTIVE. This method
# changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The
# deletion starts at an unspecified time, at which point the lifecycle state
# changes to DELETE_IN_PROGRESS. Until the deletion completes, you can check the
# lifecycle state checked by retrieving the Project with GetProject, and the
# Project remains visible to ListProjects. However, you cannot update the
# project. After the deletion completes, the Project is not retrievable by the
# GetProject and ListProjects methods. The caller must have modify permissions
# for this Project.
# deletion starts at an unspecified time, at which point the Project is no
# longer accessible. Until the deletion completes, you can check the lifecycle
# state checked by retrieving the Project with GetProject, and the Project
# remains visible to ListProjects. However, you cannot update the project. After
# the deletion completes, the Project is not retrievable by the GetProject and
# ListProjects methods. The caller must have modify permissions for this Project.
# @param [String] project_id
# The Project ID (for example, `foo-bar-123`). Required.
# @param [String] fields
@@ -205,9 +204,8 @@ module Google
# Restores the Project identified by the specified `project_id` (for example, `
# my-project-123`). You can only use this method for a Project that has a
# lifecycle state of DELETE_REQUESTED. After deletion starts, as indicated by a
# lifecycle state of DELETE_IN_PROGRESS, the Project cannot be restored. The
# caller must have modify permissions for this Project.
# lifecycle state of DELETE_REQUESTED. After deletion starts, the Project cannot
# be restored. The caller must have modify permissions for this Project.
# @param [String] project_id
# The project ID (for example, `foo-bar-123`). Required.
# @param [Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest] undelete_project_request_object
@@ -279,17 +277,27 @@ module Google
# Sets the IAM access control policy for the specified Project. Replaces any
# existing policy. The following constraints apply when using `setIamPolicy()`: +
# Project currently supports only `user:`emailid`` and `serviceAccount:`emailid`
# ` members in a `Binding` of a `Policy`. + To be added as an `owner`, a user
# must be invited via Cloud Platform console and must accept the invitation. +
# Members cannot be added to more than one role in the same policy. + There must
# be at least one owner who has accepted the Terms of Service (ToS) agreement in
# the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner
# from the policy will fail. + Calling this method requires enabling the App
# Engine Admin API. Note: Removing service accounts from policies or changing
# their roles can render services completely inoperable. It is important to
# understand how the service account is being used before removing or updating
# its roles.
# Project does not support `allUsers` and `allAuthenticatedUsers` as `members`
# in a `Binding` of a `Policy`. + The owner role can be granted only to `user`
# and `serviceAccount`. + Service accounts can be made owners of a project
# directly without any restrictions. However, to be added as an owner, a user
# must be invited via Cloud Platform console and must accept the invitation. + A
# user cannot be granted the owner role using `setIamPolicy()`. The user must be
# granted the owner role using the Cloud Platform Console and must explicitly
# accept the invitation. + Invitations to grant the owner role cannot be sent
# using `setIamPolicy()`; they must be sent only using the Cloud Platform
# Console. + Membership changes that leave the project without any owners that
# have accepted the Terms of Service (ToS) will be rejected. + Members cannot be
# added to more than one role in the same policy. + There must be at least one
# owner who has accepted the Terms of Service (ToS) agreement in the policy.
# Calling `setIamPolicy()` to to remove the last ToS-accepted owner from the
# policy will fail. This restriction also applies to legacy projects that no
# longer have owners who have accepted the ToS. Edits to IAM policies will be
# rejected until the lack of a ToS-accepting owner is rectified. + Calling this
# method requires enabling the App Engine Admin API. Note: Removing service
# accounts from policies or changing their roles can render services completely
# inoperable. It is important to understand how the service account is being
# used before removing or updating its roles.
# @param [String] resource
# REQUIRED: The resource for which the policy is being specified. `resource` is
# usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*
@@ -360,6 +368,37 @@ module Google
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.
# @param [String] name
# The name of the operation resource.
# @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::CloudresourcemanagerV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1::Operation]
#
# @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_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
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
protected