Autogenerated update (2017-08-25)

Add:
- adexperiencereport_v1
- androiddeviceprovisioning_v1
- androidmanagement_v1
- bigquerydatatransfer_v1
- cloudtrace_v2
- clouduseraccounts_vm_alpha
- consumersurveys_v2
- dlp_v2beta1
- oslogin_v1alpha
- playcustomapp_v1
- playmoviespartner_v1
- safebrowsing_v4
- spectrum_v1explorer
- speech_v1
- streetviewpublish_v1
- vault_v1
- videointelligence_v1beta1

Update:
- acceleratedmobilepageurl_v1
- adexchangebuyer2_v2beta1
- adexchangebuyer_v1_4
- adsense_v1_4
- adsensehost_v4_1
- analytics_v3
- analyticsreporting_v4
- androidenterprise_v1
- androidpublisher_v2
- appengine_v1
- appsactivity_v1
- appstate_v1
- bigquery_v2
- calendar_v3
- classroom_v1
- cloudbilling_v1
- cloudbuild_v1
- clouddebugger_v2
- clouderrorreporting_v1beta1
- cloudfunctions_v1
- cloudkms_v1
- cloudmonitoring_v2beta2
- cloudresourcemanager_v1
- compute_beta
- compute_v1
- container_v1
- content_v2
- dataflow_v1b3
- dataproc_v1
- datastore_v1
- deploymentmanager_v2
- dfareporting_v2_8
- dns_v1
- doubleclicksearch_v2
- drive_v3
- firebasedynamiclinks_v1
- firebaserules_v1
- fitness_v1
- games_configuration_v1configuration
- games_management_v1management
- games_v1
- genomics_v1
- gmail_v1
- iam_v1
- identitytoolkit_v3
- language_v1
- logging_v2
- manufacturers_v1
- ml_v1
- monitoring_v3
- oauth2_v2
- partners_v2
- people_v1
- plus_domains_v1
- plus_v1
- proximitybeacon_v1beta1
- pubsub_v1
- runtimeconfig_v1
- script_v1
- searchconsole_v1
- servicecontrol_v1
- servicemanagement_v1
- serviceuser_v1
- sheets_v4
- slides_v1
- sourcerepo_v1
- spanner_v1
- sqladmin_v1beta4
- storage_v1
- storagetransfer_v1
- toolresults_v1beta3
- vision_v1
- webmasters_v3
- youtube_analytics_v1
- youtube_partner_v1
- youtubereporting_v1
This commit is contained in:
Google APIs committed 2017-08-25 19:54:22 +00:00
1 parent ce32deabcf
commit 2dd396ce6e
315 files changed
+158012 -116092

No files matched your search

+155 -213
View File
@@ -22,175 +22,6 @@ module Google
module Apis
module ScriptV1
# A request to retrieve the results from a collection of requests,
# specified by the operation resource names.
class JoinAsyncRequest
include Google::Apis::Core::Hashable
# Timeout for information retrieval in milliseconds.
# Corresponds to the JSON property `timeout`
# @return [String]
attr_accessor :timeout
# The script id which specifies the script which all processes in the names
# field must be from.
# Corresponds to the JSON property `scriptId`
# @return [String]
attr_accessor :script_id
# List of operation resource names that we want to join,
# as returned from a call to RunAsync.
# Corresponds to the JSON property `names`
# @return [Array<String>]
attr_accessor :names
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@timeout = args[:timeout] if args.key?(:timeout)
@script_id = args[:script_id] if args.key?(:script_id)
@names = args[:names] if args.key?(:names)
end
end
# An object that provides the return value of a function executed through the
# Apps Script Execution API. If a
# `run` call succeeds and the
# script function returns successfully, the response body's
# `response` field contains this
# `ExecutionResponse` object.
class ExecutionResponse
include Google::Apis::Core::Hashable
# The return value of the script function. The type matches the object type
# returned in Apps Script. Functions called through the Execution API cannot
# return Apps Script-specific objects (such as a `Document` or a `Calendar`);
# they can only return primitive types such as a `string`, `number`, `array`,
# `object`, or `boolean`.
# Corresponds to the JSON property `result`
# @return [Object]
attr_accessor :result
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@result = args[:result] if args.key?(:result)
end
end
# An object that provides the return value for the JoinAsync method.
class JoinAsyncResponse
include Google::Apis::Core::Hashable
# The return values for each script function, in a map of operation resource
# names to the Operation containing the result of the process. The response
# will contain either an error or the result of the script function.
# Corresponds to the JSON property `results`
# @return [Hash<String,Google::Apis::ScriptV1::Operation>]
attr_accessor :results
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@results = args[:results] if args.key?(:results)
end
end
# The response will not arrive until the function finishes executing. The
# maximum runtime is listed in the guide to [limitations in Apps Script](https://
# developers.google.com/apps-script/guides/services/quotas#current_limitations).
# <p>If the script function returns successfully, the `response` field will
# contain an `ExecutionResponse` object with the function's return value in the
# object's `result` field.</p>
# <p>If the script function (or Apps Script itself) throws an exception, the `
# error` field will contain a `Status` object. The `Status` object's `details`
# field will contain an array with a single `ExecutionError` object that
# provides information about the nature of the error.</p>
# <p>If the `run` call itself fails (for example, because of a malformed request
# or an authorization error), the method will return an HTTP response code in
# the 4XX range with a different format for the response body. Client libraries
# will automatically convert a 4XX response into an exception class.</p>
class Operation
include Google::Apis::Core::Hashable
# This field is not used.
# Corresponds to the JSON property `done`
# @return [Boolean]
attr_accessor :done
alias_method :done?, :done
# If the script function returns successfully, this field will contain an `
# ExecutionResponse` object with the function's return value as the object's `
# result` field.
# Corresponds to the JSON property `response`
# @return [Hash<String,Object>]
attr_accessor :response
# This field is not used.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# If a `run` call succeeds but the script function (or Apps Script itself)
# throws an exception, the response body's `error` field will contain this `
# Status` object.
# Corresponds to the JSON property `error`
# @return [Google::Apis::ScriptV1::Status]
attr_accessor :error
# This field is not used.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@done = args[:done] if args.key?(:done)
@response = args[:response] if args.key?(:response)
@name = args[:name] if args.key?(:name)
@error = args[:error] if args.key?(:error)
@metadata = args[:metadata] if args.key?(:metadata)
end
end
# A stack trace through the script that shows where the execution failed.
class ScriptStackTraceElement
include Google::Apis::Core::Hashable
# The name of the function that failed.
# Corresponds to the JSON property `function`
# @return [String]
attr_accessor :function
# The line number where the script failed.
# Corresponds to the JSON property `lineNumber`
# @return [Fixnum]
attr_accessor :line_number
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@function = args[:function] if args.key?(:function)
@line_number = args[:line_number] if args.key?(:line_number)
end
end
# An object that provides information about the nature of an error in the Apps
# Script Execution API. If an
# `run` call succeeds but the
@@ -201,18 +32,18 @@ module Google
class ExecutionError
include Google::Apis::Core::Hashable
# The error type, for example `TypeError` or `ReferenceError`. If the error
# type is unavailable, this field is not included.
# Corresponds to the JSON property `errorType`
# @return [String]
attr_accessor :error_type
# The error message thrown by Apps Script, usually localized into the user's
# language.
# Corresponds to the JSON property `errorMessage`
# @return [String]
attr_accessor :error_message
# The error type, for example `TypeError` or `ReferenceError`. If the error
# type is unavailable, this field is not included.
# Corresponds to the JSON property `errorType`
# @return [String]
attr_accessor :error_type
# An array of objects that provide a stack trace through the script to show
# where the execution failed, with the deepest call first.
# Corresponds to the JSON property `scriptStackTraceElements`
@@ -225,49 +56,12 @@ module Google
# Update properties of this object
def update!(**args)
@error_type = args[:error_type] if args.key?(:error_type)
@error_message = args[:error_message] if args.key?(:error_message)
@error_type = args[:error_type] if args.key?(:error_type)
@script_stack_trace_elements = args[:script_stack_trace_elements] if args.key?(:script_stack_trace_elements)
end
end
# If a `run` call succeeds but the script function (or Apps Script itself)
# throws an exception, the response body's `error` field will contain this `
# Status` object.
class Status
include Google::Apis::Core::Hashable
# An array that contains a single `ExecutionError` object that provides
# information about the nature of the error.
# Corresponds to the JSON property `details`
# @return [Array<Hash<String,Object>>]
attr_accessor :details
# The status code. For this API, this value will always be 3, corresponding to
# an INVALID_ARGUMENT error.
# Corresponds to the JSON property `code`
# @return [Fixnum]
attr_accessor :code
# A developer-facing error message, which is in English. Any user-facing error
# message is localized and sent in the [`google.rpc.Status.details`](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)
@details = args[:details] if args.key?(:details)
@code = args[:code] if args.key?(:code)
@message = args[:message] if args.key?(:message)
end
end
# A request to run the function in a script. The script is identified by the
# specified `script_id`. Executing a function on a script returns results
# based on the implementation of the script.
@@ -323,6 +117,154 @@ module Google
@session_state = args[:session_state] if args.key?(:session_state)
end
end
# An object that provides the return value of a function executed through the
# Apps Script Execution API. If a
# `run` call succeeds and the
# script function returns successfully, the response body's
# `response` field contains this
# `ExecutionResponse` object.
class ExecutionResponse
include Google::Apis::Core::Hashable
# The return value of the script function. The type matches the object type
# returned in Apps Script. Functions called through the Execution API cannot
# return Apps Script-specific objects (such as a `Document` or a `Calendar`);
# they can only return primitive types such as a `string`, `number`, `array`,
# `object`, or `boolean`.
# Corresponds to the JSON property `result`
# @return [Object]
attr_accessor :result
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@result = args[:result] if args.key?(:result)
end
end
# The response will not arrive until the function finishes executing. The
# maximum runtime is listed in the guide to [limitations in Apps Script](https://
# developers.google.com/apps-script/guides/services/quotas#current_limitations).
# <p>If the script function returns successfully, the `response` field will
# contain an `ExecutionResponse` object with the function's return value in the
# object's `result` field.</p>
# <p>If the script function (or Apps Script itself) throws an exception, the `
# error` field will contain a `Status` object. The `Status` object's `details`
# field will contain an array with a single `ExecutionError` object that
# provides information about the nature of the error.</p>
# <p>If the `run` call itself fails (for example, because of a malformed request
# or an authorization error), the method will return an HTTP response code in
# the 4XX range with a different format for the response body. Client libraries
# will automatically convert a 4XX response into an exception class.</p>
class Operation
include Google::Apis::Core::Hashable
# This field is only used with asynchronous executions and indicates whether or
# not the script execution has completed. A completed execution has a populated
# response field containing the `ExecutionResponse` from function that was
# executed.
# Corresponds to the JSON property `done`
# @return [Boolean]
attr_accessor :done
alias_method :done?, :done
# If a `run` call succeeds but the script function (or Apps Script itself)
# throws an exception, the response body's `error` field will contain this `
# Status` object.
# Corresponds to the JSON property `error`
# @return [Google::Apis::ScriptV1::Status]
attr_accessor :error
# This field is not used.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata
# If the script function returns successfully, this field will contain an `
# ExecutionResponse` object with the function's return value as the object's `
# result` field.
# 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)
@response = args[:response] if args.key?(:response)
end
end
# A stack trace through the script that shows where the execution failed.
class ScriptStackTraceElement
include Google::Apis::Core::Hashable
# The name of the function that failed.
# Corresponds to the JSON property `function`
# @return [String]
attr_accessor :function
# The line number where the script failed.
# Corresponds to the JSON property `lineNumber`
# @return [Fixnum]
attr_accessor :line_number
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@function = args[:function] if args.key?(:function)
@line_number = args[:line_number] if args.key?(:line_number)
end
end
# If a `run` call succeeds but the script function (or Apps Script itself)
# throws an exception, the response body's `error` field will contain this `
# Status` object.
class Status
include Google::Apis::Core::Hashable
# The status code. For this API, this value will always be 3, corresponding to
# an <code>INVALID_ARGUMENT</code> error.
# Corresponds to the JSON property `code`
# @return [Fixnum]
attr_accessor :code
# An array that contains a single `ExecutionError` object that provides
# information about the nature of the error.
# Corresponds to the JSON property `details`
# @return [Array<Hash<String,Object>>]
attr_accessor :details
# A developer-facing error message, which is in English. Any user-facing error
# message is localized and sent in the [`google.rpc.Status.details`](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
@@ -22,117 +22,52 @@ module Google
module Apis
module ScriptV1
class JoinAsyncRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ExecutionResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class JoinAsyncResponse
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 ScriptStackTraceElement
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ExecutionError
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 ExecutionRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class JoinAsyncRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :timeout, as: 'timeout'
property :script_id, as: 'scriptId'
collection :names, as: 'names'
end
end
class ExecutionResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :result, as: 'result'
end
end
class Representation < Google::Apis::Core::JsonRepresentation; end
class JoinAsyncResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :results, as: 'results', class: Google::Apis::ScriptV1::Operation, decorator: Google::Apis::ScriptV1::Operation::Representation
end
include Google::Apis::Core::JsonObjectSupport
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
hash :response, as: 'response'
property :name, as: 'name'
property :error, as: 'error', class: Google::Apis::ScriptV1::Status, decorator: Google::Apis::ScriptV1::Status::Representation
class Representation < Google::Apis::Core::JsonRepresentation; end
hash :metadata, as: 'metadata'
end
include Google::Apis::Core::JsonObjectSupport
end
class ScriptStackTraceElement
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :function, as: 'function'
property :line_number, as: 'lineNumber'
end
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 ExecutionError
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :error_type, as: 'errorType'
property :error_message, as: 'errorMessage'
property :error_type, as: 'errorType'
collection :script_stack_trace_elements, as: 'scriptStackTraceElements', class: Google::Apis::ScriptV1::ScriptStackTraceElement, decorator: Google::Apis::ScriptV1::ScriptStackTraceElement::Representation
end
end
class Status
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :details, as: 'details'
property :code, as: 'code'
property :message, as: 'message'
end
end
class ExecutionRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -142,6 +77,41 @@ module Google
property :session_state, as: 'sessionState'
end
end
class ExecutionResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :result, as: 'result'
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
property :error, as: 'error', class: Google::Apis::ScriptV1::Status, decorator: Google::Apis::ScriptV1::Status::Representation
hash :metadata, as: 'metadata'
hash :response, as: 'response'
end
end
class ScriptStackTraceElement
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :function, as: 'function'
property :line_number, as: 'lineNumber'
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
+12 -12
View File
@@ -22,7 +22,7 @@ module Google
module ScriptV1
# Google Apps Script Execution API
#
# Executes Google Apps Script projects.
# Executes functions in Google Apps Script projects.
#
# @example
# require 'google/apis/script_v1'
@@ -32,16 +32,16 @@ module Google
#
# @see https://developers.google.com/apps-script/execution/rest/v1/scripts/run
class ScriptService < Google::Apis::Core::BaseService
# @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
# @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://script.googleapis.com/', '')
@batch_path = 'batch'
@@ -56,14 +56,14 @@ module Google
# authentication token, open the project in the script editor, then select
# **File > Project properties** and click the **Scopes** tab.
# @param [String] script_id
# The project key of the script to be executed. To find the project key, open
# The script ID of the script to be executed. To find the script ID, open
# the project in the script editor and select **File > Project properties**.
# @param [Google::Apis::ScriptV1::ExecutionRequest] execution_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 [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
@@ -76,23 +76,23 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def run_script(script_id, execution_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
def run_script(script_id, execution_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/scripts/{scriptId}:run', options)
command.request_representation = Google::Apis::ScriptV1::ExecutionRequest::Representation
command.request_object = execution_request_object
command.response_representation = Google::Apis::ScriptV1::Operation::Representation
command.response_class = Google::Apis::ScriptV1::Operation
command.params['scriptId'] = script_id unless script_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.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['quotaUser'] = quota_user unless quota_user.nil?
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end