com.google.api.services.script.model.Operation Maven / Gradle / Ivy
/*
* Copyright 2010 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.
*/
/*
* This code was generated by https://github.com/google/apis-client-generator/
* (build: 2017-09-26 19:19:48 UTC)
* on 2017-10-17 at 20:18:22 UTC
* Modify at your own risk.
*/
package com.google.api.services.script.model;
/**
* 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). 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. 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. 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.
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Google Apps Script Execution API. For a detailed
* explanation see:
* https://developers.google.com/api-client-library/java/google-http-java-client/json
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class Operation extends com.google.api.client.json.GenericJson {
/**
* 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.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean done;
/**
* If a `run` call succeeds but the script function (or Apps Script itself) throws an exception,
* this 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.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Status error;
/**
* This field is not used.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.Map 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.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.Map response;
/**
* 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.
* @return value or {@code null} for none
*/
public java.lang.Boolean getDone() {
return done;
}
/**
* 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.
* @param done done or {@code null} for none
*/
public Operation setDone(java.lang.Boolean done) {
this.done = done;
return this;
}
/**
* If a `run` call succeeds but the script function (or Apps Script itself) throws an exception,
* this 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.
* @return value or {@code null} for none
*/
public Status getError() {
return error;
}
/**
* If a `run` call succeeds but the script function (or Apps Script itself) throws an exception,
* this 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.
* @param error error or {@code null} for none
*/
public Operation setError(Status error) {
this.error = error;
return this;
}
/**
* This field is not used.
* @return value or {@code null} for none
*/
public java.util.Map getMetadata() {
return metadata;
}
/**
* This field is not used.
* @param metadata metadata or {@code null} for none
*/
public Operation setMetadata(java.util.Map metadata) {
this.metadata = metadata;
return this;
}
/**
* 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.
* @return value or {@code null} for none
*/
public java.util.Map getResponse() {
return response;
}
/**
* 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.
* @param response response or {@code null} for none
*/
public Operation setResponse(java.util.Map response) {
this.response = response;
return this;
}
@Override
public Operation set(String fieldName, Object value) {
return (Operation) super.set(fieldName, value);
}
@Override
public Operation clone() {
return (Operation) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy