|
| 1 | +/* |
| 2 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
| 3 | + * in compliance with the License. You may obtain a copy of the License at |
| 4 | + * |
| 5 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | + * |
| 7 | + * Unless required by applicable law or agreed to in writing, software distributed under the License |
| 8 | + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
| 9 | + * or implied. See the License for the specific language governing permissions and limitations under |
| 10 | + * the License. |
| 11 | + */ |
| 12 | +/* |
| 13 | + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ |
| 14 | + * Modify at your own risk. |
| 15 | + */ |
| 16 | + |
| 17 | +package com.google.api.services.secretmanager.v1.model; |
| 18 | + |
| 19 | +/** |
| 20 | + * This resource represents a long-running operation that is the result of a network API call. |
| 21 | + * |
| 22 | + * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is |
| 23 | + * transmitted over HTTP when working with the Secret Manager API. For a detailed explanation see: |
| 24 | + * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> |
| 25 | + * </p> |
| 26 | + * |
| 27 | + * @author Google, Inc. |
| 28 | + */ |
| 29 | +@SuppressWarnings("javadoc") |
| 30 | +public final class Operation extends com.google.api.client.json.GenericJson { |
| 31 | + |
| 32 | + /** |
| 33 | + * If the value is `false`, it means the operation is still in progress. If `true`, the operation |
| 34 | + * is completed, and either `error` or `response` is available. |
| 35 | + * The value may be {@code null}. |
| 36 | + */ |
| 37 | + @com.google.api.client.util.Key |
| 38 | + private java.lang.Boolean done; |
| 39 | + |
| 40 | + /** |
| 41 | + * The error result of the operation in case of failure or cancellation. |
| 42 | + * The value may be {@code null}. |
| 43 | + */ |
| 44 | + @com.google.api.client.util.Key |
| 45 | + private Status error; |
| 46 | + |
| 47 | + /** |
| 48 | + * Service-specific metadata associated with the operation. It typically contains progress |
| 49 | + * information and common metadata such as create time. Some services might not provide such |
| 50 | + * metadata. Any method that returns a long-running operation should document the metadata type, |
| 51 | + * if any. |
| 52 | + * The value may be {@code null}. |
| 53 | + */ |
| 54 | + @com.google.api.client.util.Key |
| 55 | + private java.util.Map<String, java.lang.Object> metadata; |
| 56 | + |
| 57 | + /** |
| 58 | + * The server-assigned name, which is only unique within the same service that originally returns |
| 59 | + * it. If you use the default HTTP mapping, the `name` should be a resource name ending with |
| 60 | + * `operations/{unique_id}`. |
| 61 | + * The value may be {@code null}. |
| 62 | + */ |
| 63 | + @com.google.api.client.util.Key |
| 64 | + private java.lang.String name; |
| 65 | + |
| 66 | + /** |
| 67 | + * The normal, successful response of the operation. If the original method returns no data on |
| 68 | + * success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is |
| 69 | + * standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the |
| 70 | + * response should have the type `XxxResponse`, where `Xxx` is the original method name. For |
| 71 | + * example, if the original method name is `TakeSnapshot()`, the inferred response type is |
| 72 | + * `TakeSnapshotResponse`. |
| 73 | + * The value may be {@code null}. |
| 74 | + */ |
| 75 | + @com.google.api.client.util.Key |
| 76 | + private java.util.Map<String, java.lang.Object> response; |
| 77 | + |
| 78 | + /** |
| 79 | + * If the value is `false`, it means the operation is still in progress. If `true`, the operation |
| 80 | + * is completed, and either `error` or `response` is available. |
| 81 | + * @return value or {@code null} for none |
| 82 | + */ |
| 83 | + public java.lang.Boolean getDone() { |
| 84 | + return done; |
| 85 | + } |
| 86 | + |
| 87 | + /** |
| 88 | + * If the value is `false`, it means the operation is still in progress. If `true`, the operation |
| 89 | + * is completed, and either `error` or `response` is available. |
| 90 | + * @param done done or {@code null} for none |
| 91 | + */ |
| 92 | + public Operation setDone(java.lang.Boolean done) { |
| 93 | + this.done = done; |
| 94 | + return this; |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * The error result of the operation in case of failure or cancellation. |
| 99 | + * @return value or {@code null} for none |
| 100 | + */ |
| 101 | + public Status getError() { |
| 102 | + return error; |
| 103 | + } |
| 104 | + |
| 105 | + /** |
| 106 | + * The error result of the operation in case of failure or cancellation. |
| 107 | + * @param error error or {@code null} for none |
| 108 | + */ |
| 109 | + public Operation setError(Status error) { |
| 110 | + this.error = error; |
| 111 | + return this; |
| 112 | + } |
| 113 | + |
| 114 | + /** |
| 115 | + * Service-specific metadata associated with the operation. It typically contains progress |
| 116 | + * information and common metadata such as create time. Some services might not provide such |
| 117 | + * metadata. Any method that returns a long-running operation should document the metadata type, |
| 118 | + * if any. |
| 119 | + * @return value or {@code null} for none |
| 120 | + */ |
| 121 | + public java.util.Map<String, java.lang.Object> getMetadata() { |
| 122 | + return metadata; |
| 123 | + } |
| 124 | + |
| 125 | + /** |
| 126 | + * Service-specific metadata associated with the operation. It typically contains progress |
| 127 | + * information and common metadata such as create time. Some services might not provide such |
| 128 | + * metadata. Any method that returns a long-running operation should document the metadata type, |
| 129 | + * if any. |
| 130 | + * @param metadata metadata or {@code null} for none |
| 131 | + */ |
| 132 | + public Operation setMetadata(java.util.Map<String, java.lang.Object> metadata) { |
| 133 | + this.metadata = metadata; |
| 134 | + return this; |
| 135 | + } |
| 136 | + |
| 137 | + /** |
| 138 | + * The server-assigned name, which is only unique within the same service that originally returns |
| 139 | + * it. If you use the default HTTP mapping, the `name` should be a resource name ending with |
| 140 | + * `operations/{unique_id}`. |
| 141 | + * @return value or {@code null} for none |
| 142 | + */ |
| 143 | + public java.lang.String getName() { |
| 144 | + return name; |
| 145 | + } |
| 146 | + |
| 147 | + /** |
| 148 | + * The server-assigned name, which is only unique within the same service that originally returns |
| 149 | + * it. If you use the default HTTP mapping, the `name` should be a resource name ending with |
| 150 | + * `operations/{unique_id}`. |
| 151 | + * @param name name or {@code null} for none |
| 152 | + */ |
| 153 | + public Operation setName(java.lang.String name) { |
| 154 | + this.name = name; |
| 155 | + return this; |
| 156 | + } |
| 157 | + |
| 158 | + /** |
| 159 | + * The normal, successful response of the operation. If the original method returns no data on |
| 160 | + * success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is |
| 161 | + * standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the |
| 162 | + * response should have the type `XxxResponse`, where `Xxx` is the original method name. For |
| 163 | + * example, if the original method name is `TakeSnapshot()`, the inferred response type is |
| 164 | + * `TakeSnapshotResponse`. |
| 165 | + * @return value or {@code null} for none |
| 166 | + */ |
| 167 | + public java.util.Map<String, java.lang.Object> getResponse() { |
| 168 | + return response; |
| 169 | + } |
| 170 | + |
| 171 | + /** |
| 172 | + * The normal, successful response of the operation. If the original method returns no data on |
| 173 | + * success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is |
| 174 | + * standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the |
| 175 | + * response should have the type `XxxResponse`, where `Xxx` is the original method name. For |
| 176 | + * example, if the original method name is `TakeSnapshot()`, the inferred response type is |
| 177 | + * `TakeSnapshotResponse`. |
| 178 | + * @param response response or {@code null} for none |
| 179 | + */ |
| 180 | + public Operation setResponse(java.util.Map<String, java.lang.Object> response) { |
| 181 | + this.response = response; |
| 182 | + return this; |
| 183 | + } |
| 184 | + |
| 185 | + @Override |
| 186 | + public Operation set(String fieldName, Object value) { |
| 187 | + return (Operation) super.set(fieldName, value); |
| 188 | + } |
| 189 | + |
| 190 | + @Override |
| 191 | + public Operation clone() { |
| 192 | + return (Operation) super.clone(); |
| 193 | + } |
| 194 | + |
| 195 | +} |
0 commit comments