All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.storage.model.GoogleLongrunningOperation Maven / Gradle / Ivy

There is a newer version: v1-rev20241008-2.0.0
Show newest version
/*
 * 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/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.storage.model;

/**
 * This resource represents a long-running operation that is the result of a network API call.
 *
 * 

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 Cloud Storage JSON 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 GoogleLongrunningOperation extends com.google.api.client.json.GenericJson { /** * 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. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Boolean done; /** * The error result of the operation in case of failure or cancellation. * The value may be {@code null}. */ @com.google.api.client.util.Key private GoogleRpcStatus error; /** * The kind of item this is. For operations, this is always storage#operation. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String kind; /** * 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. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map 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 be a resource name ending with * "operations/{operationId}". * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String 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". * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map response; /** * The link to this long running operation. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String selfLink; /** * 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. * @return value or {@code null} for none */ public java.lang.Boolean getDone() { return done; } /** * 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. * @param done done or {@code null} for none */ public GoogleLongrunningOperation setDone(java.lang.Boolean done) { this.done = done; return this; } /** * The error result of the operation in case of failure or cancellation. * @return value or {@code null} for none */ public GoogleRpcStatus getError() { return error; } /** * The error result of the operation in case of failure or cancellation. * @param error error or {@code null} for none */ public GoogleLongrunningOperation setError(GoogleRpcStatus error) { this.error = error; return this; } /** * The kind of item this is. For operations, this is always storage#operation. * @return value or {@code null} for none */ public java.lang.String getKind() { return kind; } /** * The kind of item this is. For operations, this is always storage#operation. * @param kind kind or {@code null} for none */ public GoogleLongrunningOperation setKind(java.lang.String kind) { this.kind = kind; return this; } /** * 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. * @return value or {@code null} for none */ public java.util.Map getMetadata() { return metadata; } /** * 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. * @param metadata metadata or {@code null} for none */ public GoogleLongrunningOperation setMetadata(java.util.Map metadata) { this.metadata = metadata; return this; } /** * 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 be a resource name ending with * "operations/{operationId}". * @return value or {@code null} for none */ public java.lang.String getName() { return name; } /** * 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 be a resource name ending with * "operations/{operationId}". * @param name name or {@code null} for none */ public GoogleLongrunningOperation setName(java.lang.String name) { this.name = name; return this; } /** * 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". * @return value or {@code null} for none */ public java.util.Map getResponse() { return response; } /** * 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". * @param response response or {@code null} for none */ public GoogleLongrunningOperation setResponse(java.util.Map response) { this.response = response; return this; } /** * The link to this long running operation. * @return value or {@code null} for none */ public java.lang.String getSelfLink() { return selfLink; } /** * The link to this long running operation. * @param selfLink selfLink or {@code null} for none */ public GoogleLongrunningOperation setSelfLink(java.lang.String selfLink) { this.selfLink = selfLink; return this; } @Override public GoogleLongrunningOperation set(String fieldName, Object value) { return (GoogleLongrunningOperation) super.set(fieldName, value); } @Override public GoogleLongrunningOperation clone() { return (GoogleLongrunningOperation) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy