Autogenerated update (2017-12-12)

Update:
- cloudfunctions_v1
- slides_v1
- streetviewpublish_v1
This commit is contained in:
Google APIs 2017-12-12 00:35:19 +00:00
parent 77a72ae51d
commit 8495ec3043
14 changed files with 1771 additions and 17 deletions

View File

@ -14034,6 +14034,108 @@
"/cloudresourcemanager:v2beta1/fields": fields
"/cloudresourcemanager:v2beta1/key": key
"/cloudresourcemanager:v2beta1/quotaUser": quota_user
"/cloudshell:v1/CancelOperationRequest": cancel_operation_request
"/cloudshell:v1/Empty": empty
"/cloudshell:v1/Environment": environment
"/cloudshell:v1/Environment/dockerImage": docker_image
"/cloudshell:v1/Environment/id": id
"/cloudshell:v1/Environment/name": name
"/cloudshell:v1/Environment/publicKeys": public_keys
"/cloudshell:v1/Environment/publicKeys/public_key": public_key
"/cloudshell:v1/Environment/sshHost": ssh_host
"/cloudshell:v1/Environment/sshPort": ssh_port
"/cloudshell:v1/Environment/sshUsername": ssh_username
"/cloudshell:v1/Environment/state": state
"/cloudshell:v1/ListOperationsResponse": list_operations_response
"/cloudshell:v1/ListOperationsResponse/nextPageToken": next_page_token
"/cloudshell:v1/ListOperationsResponse/operations": operations
"/cloudshell:v1/ListOperationsResponse/operations/operation": operation
"/cloudshell:v1/Operation": operation
"/cloudshell:v1/Operation/done": done
"/cloudshell:v1/Operation/error": error
"/cloudshell:v1/Operation/metadata": metadata
"/cloudshell:v1/Operation/metadata/metadatum": metadatum
"/cloudshell:v1/Operation/name": name
"/cloudshell:v1/Operation/response": response
"/cloudshell:v1/Operation/response/response": response
"/cloudshell:v1/PublicKey": public_key
"/cloudshell:v1/PublicKey/format": format
"/cloudshell:v1/PublicKey/key": key
"/cloudshell:v1/PublicKey/name": name
"/cloudshell:v1/StartEnvironmentMetadata": start_environment_metadata
"/cloudshell:v1/StartEnvironmentMetadata/state": state
"/cloudshell:v1/StartEnvironmentResponse": start_environment_response
"/cloudshell:v1/StartEnvironmentResponse/environment": environment
"/cloudshell:v1/Status": status
"/cloudshell:v1/Status/code": code
"/cloudshell:v1/Status/details": details
"/cloudshell:v1/Status/details/detail": detail
"/cloudshell:v1/Status/details/detail/detail": detail
"/cloudshell:v1/Status/message": message
"/cloudshell:v1/cloudshell.operations.cancel": cancel_operation
"/cloudshell:v1/cloudshell.operations.cancel/name": name
"/cloudshell:v1/cloudshell.operations.delete": delete_operation
"/cloudshell:v1/cloudshell.operations.delete/name": name
"/cloudshell:v1/cloudshell.operations.get": get_operation
"/cloudshell:v1/cloudshell.operations.get/name": name
"/cloudshell:v1/cloudshell.operations.list": list_operations
"/cloudshell:v1/cloudshell.operations.list/filter": filter
"/cloudshell:v1/cloudshell.operations.list/name": name
"/cloudshell:v1/cloudshell.operations.list/pageSize": page_size
"/cloudshell:v1/cloudshell.operations.list/pageToken": page_token
"/cloudshell:v1/fields": fields
"/cloudshell:v1/key": key
"/cloudshell:v1/quotaUser": quota_user
"/cloudshell:v1alpha1/CreatePublicKeyRequest": create_public_key_request
"/cloudshell:v1alpha1/CreatePublicKeyRequest/key": key
"/cloudshell:v1alpha1/Empty": empty
"/cloudshell:v1alpha1/Environment": environment
"/cloudshell:v1alpha1/Environment/dockerImage": docker_image
"/cloudshell:v1alpha1/Environment/id": id
"/cloudshell:v1alpha1/Environment/name": name
"/cloudshell:v1alpha1/Environment/publicKeys": public_keys
"/cloudshell:v1alpha1/Environment/publicKeys/public_key": public_key
"/cloudshell:v1alpha1/Environment/sshHost": ssh_host
"/cloudshell:v1alpha1/Environment/sshPort": ssh_port
"/cloudshell:v1alpha1/Environment/sshUsername": ssh_username
"/cloudshell:v1alpha1/Environment/state": state
"/cloudshell:v1alpha1/Operation": operation
"/cloudshell:v1alpha1/Operation/done": done
"/cloudshell:v1alpha1/Operation/error": error
"/cloudshell:v1alpha1/Operation/metadata": metadata
"/cloudshell:v1alpha1/Operation/metadata/metadatum": metadatum
"/cloudshell:v1alpha1/Operation/name": name
"/cloudshell:v1alpha1/Operation/response": response
"/cloudshell:v1alpha1/Operation/response/response": response
"/cloudshell:v1alpha1/PublicKey": public_key
"/cloudshell:v1alpha1/PublicKey/format": format
"/cloudshell:v1alpha1/PublicKey/key": key
"/cloudshell:v1alpha1/PublicKey/name": name
"/cloudshell:v1alpha1/StartEnvironmentMetadata": start_environment_metadata
"/cloudshell:v1alpha1/StartEnvironmentMetadata/state": state
"/cloudshell:v1alpha1/StartEnvironmentRequest": start_environment_request
"/cloudshell:v1alpha1/StartEnvironmentResponse": start_environment_response
"/cloudshell:v1alpha1/StartEnvironmentResponse/environment": environment
"/cloudshell:v1alpha1/Status": status
"/cloudshell:v1alpha1/Status/code": code
"/cloudshell:v1alpha1/Status/details": details
"/cloudshell:v1alpha1/Status/details/detail": detail
"/cloudshell:v1alpha1/Status/details/detail/detail": detail
"/cloudshell:v1alpha1/Status/message": message
"/cloudshell:v1alpha1/cloudshell.users.environments.get": get_user_environment
"/cloudshell:v1alpha1/cloudshell.users.environments.get/name": name
"/cloudshell:v1alpha1/cloudshell.users.environments.patch": patch_user_environment
"/cloudshell:v1alpha1/cloudshell.users.environments.patch/name": name
"/cloudshell:v1alpha1/cloudshell.users.environments.patch/updateMask": update_mask
"/cloudshell:v1alpha1/cloudshell.users.environments.publicKeys.create": create_public_key
"/cloudshell:v1alpha1/cloudshell.users.environments.publicKeys.create/parent": parent
"/cloudshell:v1alpha1/cloudshell.users.environments.publicKeys.delete": delete_user_environment_public_key
"/cloudshell:v1alpha1/cloudshell.users.environments.publicKeys.delete/name": name
"/cloudshell:v1alpha1/cloudshell.users.environments.start": start_environment
"/cloudshell:v1alpha1/cloudshell.users.environments.start/name": name
"/cloudshell:v1alpha1/fields": fields
"/cloudshell:v1alpha1/key": key
"/cloudshell:v1alpha1/quotaUser": quota_user
"/cloudtasks:v2beta2/AcknowledgeTaskRequest": acknowledge_task_request
"/cloudtasks:v2beta2/AcknowledgeTaskRequest/scheduleTime": schedule_time
"/cloudtasks:v2beta2/AppEngineHttpRequest": app_engine_http_request

View File

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

View File

@ -199,20 +199,17 @@ module Google
include Google::Apis::Core::Hashable
# Required. The type of event to observe. For example:
# `google.storage.object.finalized` and
# `google.firebase.analytics.event.log`.
# Event type consists of three parts:
# 1. namespace: The domain name of the organization in reverse-domain
# notation (e.g. `acme.net` appears as `net.acme`) and any orginization
# specific subdivisions. If the organization's top-level domain is `com`,
# the top-level domain is ommited (e.g. `google.com` appears as
# `google`). For example, `google.storage` and
# `providers/cloud.storage/eventTypes/object.change` and
# `providers/cloud.pubsub/eventTypes/topic.publish`.
# Event types match pattern `providers/*/eventTypes/*.*`.
# The pattern contains:
# 1. namespace: For example, `cloud.storage` and
# `google.firebase.analytics`.
# 2. resource type: The type of resource on which event ocurs. For
# 2. resource type: The type of resource on which event occurs. For
# example, the Google Cloud Storage API includes the type `object`.
# 3. action: The action that generates the event. For example, actions for
# a Google Cloud Storage Object include 'finalize' and 'delete'.
# These parts are lower case and joined by '.'.
# 3. action: The action that generates the event. For example, action for
# a Google Cloud Storage Object is 'change'.
# These parts are lower case.
# Corresponds to the JSON property `eventType`
# @return [String]
attr_accessor :event_type

View File

@ -0,0 +1,35 @@
# 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/cloudshell_v1/service.rb'
require 'google/apis/cloudshell_v1/classes.rb'
require 'google/apis/cloudshell_v1/representations.rb'
module Google
module Apis
# Cloud Shell API
#
# Allows users to start, configure, and connect to interactive shell sessions
# running in the cloud.
#
# @see https://cloud.google.com/shell/docs/
module CloudshellV1
VERSION = 'V1'
REVISION = '20171211'
# 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,409 @@
# 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 CloudshellV1
# The request message for Operations.CancelOperation.
class CancelOperationRequest
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
# A Cloud Shell environment, which is defined as the combination of a Docker
# image specifying what is installed on the environment and a home directory
# containing the user's data that will remain across sessions. Each user has a
# single environment with the ID "default".
class Environment
include Google::Apis::Core::Hashable
# Required. Full path to the Docker image used to run this environment, e.g.
# "gcr.io/dev-con/cloud-devshell:latest".
# Corresponds to the JSON property `dockerImage`
# @return [String]
attr_accessor :docker_image
# Output only. The environment's identifier, which is always "default".
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Output only. Full name of this resource, in the format
# `users/`owner_email`/environments/`environment_id``. ``owner_email`` is the
# email address of the user to whom this environment belongs, and
# ``environment_id`` is the identifier of this environment. For example,
# `users/someone@example.com/environments/default`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Output only. Public keys associated with the environment. Clients can
# connect to this environment via SSH only if they possess a private key
# corresponding to at least one of these public keys. Keys can be added to or
# removed from the environment using the CreatePublicKey and DeletePublicKey
# methods.
# Corresponds to the JSON property `publicKeys`
# @return [Array<Google::Apis::CloudshellV1::PublicKey>]
attr_accessor :public_keys
# Output only. Host to which clients can connect to initiate SSH sessions
# with the environment.
# Corresponds to the JSON property `sshHost`
# @return [String]
attr_accessor :ssh_host
# Output only. Port to which clients can connect to initiate SSH sessions
# with the environment.
# Corresponds to the JSON property `sshPort`
# @return [Fixnum]
attr_accessor :ssh_port
# Output only. Username that clients should use when initiating SSH sessions
# with the environment.
# Corresponds to the JSON property `sshUsername`
# @return [String]
attr_accessor :ssh_username
# Output only. Current execution state of this environment.
# 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)
@docker_image = args[:docker_image] if args.key?(:docker_image)
@id = args[:id] if args.key?(:id)
@name = args[:name] if args.key?(:name)
@public_keys = args[:public_keys] if args.key?(:public_keys)
@ssh_host = args[:ssh_host] if args.key?(:ssh_host)
@ssh_port = args[:ssh_port] if args.key?(:ssh_port)
@ssh_username = args[:ssh_username] if args.key?(:ssh_username)
@state = args[:state] if args.key?(:state)
end
end
# The response message for Operations.ListOperations.
class ListOperationsResponse
include Google::Apis::Core::Hashable
# The standard List next-page token.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# A list of operations that matches the specified filter in the request.
# Corresponds to the JSON property `operations`
# @return [Array<Google::Apis::CloudshellV1::Operation>]
attr_accessor :operations
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)
@operations = args[:operations] if args.key?(:operations)
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
# 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` that 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.
# - 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::CloudshellV1::Status]
attr_accessor :error
# 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
# 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
# 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)
@done = args[:done] if args.key?(:done)
@error = args[:error] if args.key?(:error)
@metadata = args[:metadata] if args.key?(:metadata)
@name = args[:name] if args.key?(:name)
@response = args[:response] if args.key?(:response)
end
end
# A public SSH key, corresponding to a private SSH key held by the client.
class PublicKey
include Google::Apis::Core::Hashable
# Required. Format of this key's content.
# Corresponds to the JSON property `format`
# @return [String]
attr_accessor :format
# Required. Content of this key.
# Corresponds to the JSON property `key`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :key
# Output only. Full name of this resource, in the format
# `users/`owner_email`/environments/`environment_id`/publicKeys/`key_id``.
# ``owner_email`` is the email address of the user to whom the key belongs.
# ``environment_id`` is the identifier of the environment to which the key
# grants access. ``key_id`` is the unique identifier of the key. For example,
# `users/someone@example.com/environments/default/publicKeys/myKey`.
# 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)
@format = args[:format] if args.key?(:format)
@key = args[:key] if args.key?(:key)
@name = args[:name] if args.key?(:name)
end
end
# Message included in the metadata field of operations returned from
# StartEnvironment.
class StartEnvironmentMetadata
include Google::Apis::Core::Hashable
# Current state of the environment being started.
# 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)
@state = args[:state] if args.key?(:state)
end
end
# Message included in the response field of operations returned from
# StartEnvironment once the
# operation is complete.
class StartEnvironmentResponse
include Google::Apis::Core::Hashable
# A Cloud Shell environment, which is defined as the combination of a Docker
# image specifying what is installed on the environment and a home directory
# containing the user's data that will remain across sessions. Each user has a
# single environment with the ID "default".
# Corresponds to the JSON property `environment`
# @return [Google::Apis::CloudshellV1::Environment]
attr_accessor :environment
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@environment = args[:environment] if args.key?(:environment)
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` that 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.
# - 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 list of messages that carry the error details. There is a common set of
# message types for APIs to use.
# Corresponds to the JSON property `details`
# @return [Array<Hash<String,Object>>]
attr_accessor :details
# 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
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] if args.key?(:code)
@details = args[:details] if args.key?(:details)
@message = args[:message] if args.key?(:message)
end
end
end
end
end

View File

@ -0,0 +1,161 @@
# 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 CloudshellV1
class CancelOperationRequest
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 Environment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListOperationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PublicKey
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StartEnvironmentMetadata
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StartEnvironmentResponse
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 CancelOperationRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Environment
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :docker_image, as: 'dockerImage'
property :id, as: 'id'
property :name, as: 'name'
collection :public_keys, as: 'publicKeys', class: Google::Apis::CloudshellV1::PublicKey, decorator: Google::Apis::CloudshellV1::PublicKey::Representation
property :ssh_host, as: 'sshHost'
property :ssh_port, as: 'sshPort'
property :ssh_username, as: 'sshUsername'
property :state, as: 'state'
end
end
class ListOperationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :operations, as: 'operations', class: Google::Apis::CloudshellV1::Operation, decorator: Google::Apis::CloudshellV1::Operation::Representation
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
property :error, as: 'error', class: Google::Apis::CloudshellV1::Status, decorator: Google::Apis::CloudshellV1::Status::Representation
hash :metadata, as: 'metadata'
property :name, as: 'name'
hash :response, as: 'response'
end
end
class PublicKey
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :format, as: 'format'
property :key, :base64 => true, as: 'key'
property :name, as: 'name'
end
end
class StartEnvironmentMetadata
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :state, as: 'state'
end
end
class StartEnvironmentResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :environment, as: 'environment', class: Google::Apis::CloudshellV1::Environment, decorator: Google::Apis::CloudshellV1::Environment::Representation
end
end
class Status
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :details, as: 'details'
property :message, as: 'message'
end
end
end
end
end

View File

@ -0,0 +1,214 @@
# 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 CloudshellV1
# Cloud Shell API
#
# Allows users to start, configure, and connect to interactive shell sessions
# running in the cloud.
#
# @example
# require 'google/apis/cloudshell_v1'
#
# Cloudshell = Google::Apis::CloudshellV1 # Alias the module
# service = Cloudshell::CloudShellService.new
#
# @see https://cloud.google.com/shell/docs/
class CloudShellService < 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://cloudshell.googleapis.com/', '')
@batch_path = 'batch'
end
# Starts asynchronous cancellation on a long-running operation. The server
# makes a best effort to cancel the operation, but success is not
# guaranteed. If the server doesn't support this method, it returns
# `google.rpc.Code.UNIMPLEMENTED`. Clients can use
# Operations.GetOperation or
# other methods to check whether the cancellation succeeded or whether the
# operation completed despite cancellation. On successful cancellation,
# the operation is not deleted; instead, it becomes an operation with
# an Operation.error value with a google.rpc.Status.code of 1,
# corresponding to `Code.CANCELLED`.
# @param [String] name
# The name of the operation resource to be cancelled.
# @param [Google::Apis::CloudshellV1::CancelOperationRequest] cancel_operation_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::CloudshellV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudshellV1::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 cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
command.request_representation = Google::Apis::CloudshellV1::CancelOperationRequest::Representation
command.request_object = cancel_operation_request_object
command.response_representation = Google::Apis::CloudshellV1::Empty::Representation
command.response_class = Google::Apis::CloudshellV1::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
# Deletes a long-running operation. This method indicates that the client is
# no longer interested in the operation result. It does not cancel the
# operation. If the server doesn't support this method, it returns
# `google.rpc.Code.UNIMPLEMENTED`.
# @param [String] name
# The name of the operation resource to be deleted.
# @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::CloudshellV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudshellV1::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_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudshellV1::Empty::Representation
command.response_class = Google::Apis::CloudshellV1::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 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::CloudshellV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudshellV1::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::CloudshellV1::Operation::Representation
command.response_class = Google::Apis::CloudshellV1::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
# Lists operations that match the specified filter in the request. If the
# server doesn't support this method, it returns `UNIMPLEMENTED`.
# NOTE: the `name` binding allows API services to override the binding
# to use different resource name schemes, such as `users/*/operations`. To
# override the binding, API services can add a binding such as
# `"/v1/`name=users/*`/operations"` to their service configuration.
# For backwards compatibility, the default name includes the operations
# collection id, however overriding users must ensure the name binding
# is the parent resource, without the operations collection id.
# @param [String] name
# The name of the operation's parent resource.
# @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::CloudshellV1::ListOperationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudshellV1::ListOperationsResponse]
#
# @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_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::CloudshellV1::ListOperationsResponse::Representation
command.response_class = Google::Apis::CloudshellV1::ListOperationsResponse
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
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

@ -0,0 +1,35 @@
# 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/cloudshell_v1alpha1/service.rb'
require 'google/apis/cloudshell_v1alpha1/classes.rb'
require 'google/apis/cloudshell_v1alpha1/representations.rb'
module Google
module Apis
# Cloud Shell API
#
# Allows users to start, configure, and connect to interactive shell sessions
# running in the cloud.
#
# @see https://cloud.google.com/shell/docs/
module CloudshellV1alpha1
VERSION = 'V1alpha1'
REVISION = '20171211'
# 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,403 @@
# 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 CloudshellV1alpha1
# Request message for CreatePublicKey.
class CreatePublicKeyRequest
include Google::Apis::Core::Hashable
# A public SSH key, corresponding to a private SSH key held by the client.
# Corresponds to the JSON property `key`
# @return [Google::Apis::CloudshellV1alpha1::PublicKey]
attr_accessor :key
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key = args[:key] if args.key?(:key)
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
# A Cloud Shell environment, which is defined as the combination of a Docker
# image specifying what is installed on the environment and a home directory
# containing the user's data that will remain across sessions. Each user has a
# single environment with the ID "default".
class Environment
include Google::Apis::Core::Hashable
# Required. Full path to the Docker image used to run this environment, e.g.
# "gcr.io/dev-con/cloud-devshell:latest".
# Corresponds to the JSON property `dockerImage`
# @return [String]
attr_accessor :docker_image
# Output only. The environment's identifier, which is always "default".
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Output only. Full name of this resource, in the format
# `users/`owner_email`/environments/`environment_id``. ``owner_email`` is the
# email address of the user to whom this environment belongs, and
# ``environment_id`` is the identifier of this environment. For example,
# `users/someone@example.com/environments/default`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Output only. Public keys associated with the environment. Clients can
# connect to this environment via SSH only if they possess a private key
# corresponding to at least one of these public keys. Keys can be added to or
# removed from the environment using the CreatePublicKey and DeletePublicKey
# methods.
# Corresponds to the JSON property `publicKeys`
# @return [Array<Google::Apis::CloudshellV1alpha1::PublicKey>]
attr_accessor :public_keys
# Output only. Host to which clients can connect to initiate SSH sessions
# with the environment.
# Corresponds to the JSON property `sshHost`
# @return [String]
attr_accessor :ssh_host
# Output only. Port to which clients can connect to initiate SSH sessions
# with the environment.
# Corresponds to the JSON property `sshPort`
# @return [Fixnum]
attr_accessor :ssh_port
# Output only. Username that clients should use when initiating SSH sessions
# with the environment.
# Corresponds to the JSON property `sshUsername`
# @return [String]
attr_accessor :ssh_username
# Output only. Current execution state of this environment.
# 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)
@docker_image = args[:docker_image] if args.key?(:docker_image)
@id = args[:id] if args.key?(:id)
@name = args[:name] if args.key?(:name)
@public_keys = args[:public_keys] if args.key?(:public_keys)
@ssh_host = args[:ssh_host] if args.key?(:ssh_host)
@ssh_port = args[:ssh_port] if args.key?(:ssh_port)
@ssh_username = args[:ssh_username] if args.key?(:ssh_username)
@state = args[:state] if args.key?(:state)
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
# 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` that 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.
# - 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::CloudshellV1alpha1::Status]
attr_accessor :error
# 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
# 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
# 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)
@done = args[:done] if args.key?(:done)
@error = args[:error] if args.key?(:error)
@metadata = args[:metadata] if args.key?(:metadata)
@name = args[:name] if args.key?(:name)
@response = args[:response] if args.key?(:response)
end
end
# A public SSH key, corresponding to a private SSH key held by the client.
class PublicKey
include Google::Apis::Core::Hashable
# Required. Format of this key's content.
# Corresponds to the JSON property `format`
# @return [String]
attr_accessor :format
# Required. Content of this key.
# Corresponds to the JSON property `key`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :key
# Output only. Full name of this resource, in the format
# `users/`owner_email`/environments/`environment_id`/publicKeys/`key_id``.
# ``owner_email`` is the email address of the user to whom the key belongs.
# ``environment_id`` is the identifier of the environment to which the key
# grants access. ``key_id`` is the unique identifier of the key. For example,
# `users/someone@example.com/environments/default/publicKeys/myKey`.
# 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)
@format = args[:format] if args.key?(:format)
@key = args[:key] if args.key?(:key)
@name = args[:name] if args.key?(:name)
end
end
# Message included in the metadata field of operations returned from
# StartEnvironment.
class StartEnvironmentMetadata
include Google::Apis::Core::Hashable
# Current state of the environment being started.
# 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)
@state = args[:state] if args.key?(:state)
end
end
# Request message for StartEnvironment.
class StartEnvironmentRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Message included in the response field of operations returned from
# StartEnvironment once the
# operation is complete.
class StartEnvironmentResponse
include Google::Apis::Core::Hashable
# A Cloud Shell environment, which is defined as the combination of a Docker
# image specifying what is installed on the environment and a home directory
# containing the user's data that will remain across sessions. Each user has a
# single environment with the ID "default".
# Corresponds to the JSON property `environment`
# @return [Google::Apis::CloudshellV1alpha1::Environment]
attr_accessor :environment
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@environment = args[:environment] if args.key?(:environment)
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` that 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.
# - 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 list of messages that carry the error details. There is a common set of
# message types for APIs to use.
# Corresponds to the JSON property `details`
# @return [Array<Hash<String,Object>>]
attr_accessor :details
# 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
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] if args.key?(:code)
@details = args[:details] if args.key?(:details)
@message = args[:message] if args.key?(:message)
end
end
end
end
end

View File

@ -0,0 +1,160 @@
# 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 CloudshellV1alpha1
class CreatePublicKeyRequest
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 Environment
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PublicKey
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StartEnvironmentMetadata
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StartEnvironmentRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StartEnvironmentResponse
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 CreatePublicKeyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key', class: Google::Apis::CloudshellV1alpha1::PublicKey, decorator: Google::Apis::CloudshellV1alpha1::PublicKey::Representation
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Environment
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :docker_image, as: 'dockerImage'
property :id, as: 'id'
property :name, as: 'name'
collection :public_keys, as: 'publicKeys', class: Google::Apis::CloudshellV1alpha1::PublicKey, decorator: Google::Apis::CloudshellV1alpha1::PublicKey::Representation
property :ssh_host, as: 'sshHost'
property :ssh_port, as: 'sshPort'
property :ssh_username, as: 'sshUsername'
property :state, as: 'state'
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
property :error, as: 'error', class: Google::Apis::CloudshellV1alpha1::Status, decorator: Google::Apis::CloudshellV1alpha1::Status::Representation
hash :metadata, as: 'metadata'
property :name, as: 'name'
hash :response, as: 'response'
end
end
class PublicKey
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :format, as: 'format'
property :key, :base64 => true, as: 'key'
property :name, as: 'name'
end
end
class StartEnvironmentMetadata
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :state, as: 'state'
end
end
class StartEnvironmentRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class StartEnvironmentResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :environment, as: 'environment', class: Google::Apis::CloudshellV1alpha1::Environment, decorator: Google::Apis::CloudshellV1alpha1::Environment::Representation
end
end
class Status
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :details, as: 'details'
property :message, as: 'message'
end
end
end
end
end

View File

@ -0,0 +1,237 @@
# 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 CloudshellV1alpha1
# Cloud Shell API
#
# Allows users to start, configure, and connect to interactive shell sessions
# running in the cloud.
#
# @example
# require 'google/apis/cloudshell_v1alpha1'
#
# Cloudshell = Google::Apis::CloudshellV1alpha1 # Alias the module
# service = Cloudshell::CloudShellService.new
#
# @see https://cloud.google.com/shell/docs/
class CloudShellService < 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://cloudshell.googleapis.com/', '')
@batch_path = 'batch'
end
# Gets an environment. Returns NOT_FOUND if the environment does not exist.
# @param [String] name
# Name of the requested resource, for example `users/me/environments/default`
# or `users/someone@example.com/environments/default`.
# @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::CloudshellV1alpha1::Environment] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudshellV1alpha1::Environment]
#
# @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_user_environment(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1alpha1/{+name}', options)
command.response_representation = Google::Apis::CloudshellV1alpha1::Environment::Representation
command.response_class = Google::Apis::CloudshellV1alpha1::Environment
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
# Updates an existing environment.
# @param [String] name
# Name of the resource to be updated, for example
# `users/me/environments/default` or
# `users/someone@example.com/environments/default`.
# @param [Google::Apis::CloudshellV1alpha1::Environment] environment_object
# @param [String] update_mask
# Mask specifying which fields in the environment should 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::CloudshellV1alpha1::Environment] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudshellV1alpha1::Environment]
#
# @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_user_environment(name, environment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1alpha1/{+name}', options)
command.request_representation = Google::Apis::CloudshellV1alpha1::Environment::Representation
command.request_object = environment_object
command.response_representation = Google::Apis::CloudshellV1alpha1::Environment::Representation
command.response_class = Google::Apis::CloudshellV1alpha1::Environment
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
# Starts an existing environment, allowing clients to connect to it. The
# returned operation will contain an instance of StartEnvironmentMetadata in
# its metadata field. Users can wait for the environment to start by polling
# this operation via GetOperation. Once the environment has finished starting
# and is ready to accept connections, the operation will contain a
# StartEnvironmentResponse in its response field.
# @param [String] name
# Name of the resource that should be started, for example
# `users/me/environments/default` or
# `users/someone@example.com/environments/default`.
# @param [Google::Apis::CloudshellV1alpha1::StartEnvironmentRequest] start_environment_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::CloudshellV1alpha1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudshellV1alpha1::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 start_environment(name, start_environment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1alpha1/{+name}:start', options)
command.request_representation = Google::Apis::CloudshellV1alpha1::StartEnvironmentRequest::Representation
command.request_object = start_environment_request_object
command.response_representation = Google::Apis::CloudshellV1alpha1::Operation::Representation
command.response_class = Google::Apis::CloudshellV1alpha1::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
# Adds a public SSH key to an environment, allowing clients with the
# corresponding private key to connect to that environment via SSH. If a key
# with the same format and content already exists, this will return the
# existing key.
# @param [String] parent
# Parent resource name, e.g. `users/me/environments/default`.
# @param [Google::Apis::CloudshellV1alpha1::CreatePublicKeyRequest] create_public_key_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::CloudshellV1alpha1::PublicKey] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudshellV1alpha1::PublicKey]
#
# @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_public_key(parent, create_public_key_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1alpha1/{+parent}/publicKeys', options)
command.request_representation = Google::Apis::CloudshellV1alpha1::CreatePublicKeyRequest::Representation
command.request_object = create_public_key_request_object
command.response_representation = Google::Apis::CloudshellV1alpha1::PublicKey::Representation
command.response_class = Google::Apis::CloudshellV1alpha1::PublicKey
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
# Removes a public SSH key from an environment. Clients will no longer be
# able to connect to the environment using the corresponding private key.
# @param [String] name
# Name of the resource to be deleted, e.g.
# `users/me/environments/default/publicKeys/my-key`.
# @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::CloudshellV1alpha1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudshellV1alpha1::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_user_environment_public_key(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1alpha1/{+name}', options)
command.response_representation = Google::Apis::CloudshellV1alpha1::Empty::Representation
command.response_class = Google::Apis::CloudshellV1alpha1::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
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

@ -25,11 +25,14 @@ module Google
# @see https://developers.google.com/slides/
module SlidesV1
VERSION = 'V1'
REVISION = '20171113'
REVISION = '20171208'
# View and manage the files in your Google Drive
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
# View and manage Google Drive files and folders that you have opened or created with this app
AUTH_DRIVE_FILE = 'https://www.googleapis.com/auth/drive.file'
# View the files in your Google Drive
AUTH_DRIVE_READONLY = 'https://www.googleapis.com/auth/drive.readonly'

View File

@ -27,7 +27,7 @@ module Google
# @see https://developers.google.com/streetview/publish/
module StreetviewpublishV1
VERSION = 'V1'
REVISION = '20171207'
REVISION = '20171211'
# Publish and manage your 360 photos on Google Street View
AUTH_STREETVIEWPUBLISH = 'https://www.googleapis.com/auth/streetviewpublish'

View File

@ -363,8 +363,6 @@ module Google
# Connections to other photos. A connection represents the link from this
# photo to another photo.
# The maximum number of connections that can be set through an
# google.streetview.publish.v1.UpdatePhotoRequest is 10.
# Corresponds to the JSON property `connections`
# @return [Array<Google::Apis::StreetviewpublishV1::Connection>]
attr_accessor :connections