|
| 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.discoveryengine.v1.model; |
| 18 | + |
| 19 | +/** |
| 20 | + * Information to read/write to blobstore2. |
| 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 Discovery Engine 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 GdataBlobstore2Info extends com.google.api.client.json.GenericJson { |
| 31 | + |
| 32 | + /** |
| 33 | + * The blob generation id. |
| 34 | + * The value may be {@code null}. |
| 35 | + */ |
| 36 | + @com.google.api.client.util.Key @com.google.api.client.json.JsonString |
| 37 | + private java.lang.Long blobGeneration; |
| 38 | + |
| 39 | + /** |
| 40 | + * The blob id, e.g., /blobstore/prod/playground/scotty |
| 41 | + * The value may be {@code null}. |
| 42 | + */ |
| 43 | + @com.google.api.client.util.Key |
| 44 | + private java.lang.String blobId; |
| 45 | + |
| 46 | + /** |
| 47 | + * Read handle passed from Bigstore -> Scotty for a GCS download. This is a signed, serialized |
| 48 | + * blobstore2.ReadHandle proto which must never be set outside of Bigstore, and is not applicable |
| 49 | + * to non-GCS media downloads. |
| 50 | + * The value may be {@code null}. |
| 51 | + */ |
| 52 | + @com.google.api.client.util.Key |
| 53 | + private java.lang.String downloadReadHandle; |
| 54 | + |
| 55 | + /** |
| 56 | + * The blob read token. Needed to read blobs that have not been replicated. Might not be available |
| 57 | + * until the final call. |
| 58 | + * The value may be {@code null}. |
| 59 | + */ |
| 60 | + @com.google.api.client.util.Key |
| 61 | + private java.lang.String readToken; |
| 62 | + |
| 63 | + /** |
| 64 | + * Metadata passed from Blobstore -> Scotty for a new GCS upload. This is a signed, serialized |
| 65 | + * blobstore2.BlobMetadataContainer proto which must never be consumed outside of Bigstore, and is |
| 66 | + * not applicable to non-GCS media uploads. |
| 67 | + * The value may be {@code null}. |
| 68 | + */ |
| 69 | + @com.google.api.client.util.Key |
| 70 | + private java.lang.String uploadMetadataContainer; |
| 71 | + |
| 72 | + /** |
| 73 | + * The blob generation id. |
| 74 | + * @return value or {@code null} for none |
| 75 | + */ |
| 76 | + public java.lang.Long getBlobGeneration() { |
| 77 | + return blobGeneration; |
| 78 | + } |
| 79 | + |
| 80 | + /** |
| 81 | + * The blob generation id. |
| 82 | + * @param blobGeneration blobGeneration or {@code null} for none |
| 83 | + */ |
| 84 | + public GdataBlobstore2Info setBlobGeneration(java.lang.Long blobGeneration) { |
| 85 | + this.blobGeneration = blobGeneration; |
| 86 | + return this; |
| 87 | + } |
| 88 | + |
| 89 | + /** |
| 90 | + * The blob id, e.g., /blobstore/prod/playground/scotty |
| 91 | + * @return value or {@code null} for none |
| 92 | + */ |
| 93 | + public java.lang.String getBlobId() { |
| 94 | + return blobId; |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * The blob id, e.g., /blobstore/prod/playground/scotty |
| 99 | + * @param blobId blobId or {@code null} for none |
| 100 | + */ |
| 101 | + public GdataBlobstore2Info setBlobId(java.lang.String blobId) { |
| 102 | + this.blobId = blobId; |
| 103 | + return this; |
| 104 | + } |
| 105 | + |
| 106 | + /** |
| 107 | + * Read handle passed from Bigstore -> Scotty for a GCS download. This is a signed, serialized |
| 108 | + * blobstore2.ReadHandle proto which must never be set outside of Bigstore, and is not applicable |
| 109 | + * to non-GCS media downloads. |
| 110 | + * @see #decodeDownloadReadHandle() |
| 111 | + * @return value or {@code null} for none |
| 112 | + */ |
| 113 | + public java.lang.String getDownloadReadHandle() { |
| 114 | + return downloadReadHandle; |
| 115 | + } |
| 116 | + |
| 117 | + /** |
| 118 | + * Read handle passed from Bigstore -> Scotty for a GCS download. This is a signed, serialized |
| 119 | + * blobstore2.ReadHandle proto which must never be set outside of Bigstore, and is not applicable |
| 120 | + * to non-GCS media downloads. |
| 121 | + * @see #getDownloadReadHandle() |
| 122 | + * @return Base64 decoded value or {@code null} for none |
| 123 | + * |
| 124 | + * @since 1.14 |
| 125 | + */ |
| 126 | + public byte[] decodeDownloadReadHandle() { |
| 127 | + return com.google.api.client.util.Base64.decodeBase64(downloadReadHandle); |
| 128 | + } |
| 129 | + |
| 130 | + /** |
| 131 | + * Read handle passed from Bigstore -> Scotty for a GCS download. This is a signed, serialized |
| 132 | + * blobstore2.ReadHandle proto which must never be set outside of Bigstore, and is not applicable |
| 133 | + * to non-GCS media downloads. |
| 134 | + * @see #encodeDownloadReadHandle() |
| 135 | + * @param downloadReadHandle downloadReadHandle or {@code null} for none |
| 136 | + */ |
| 137 | + public GdataBlobstore2Info setDownloadReadHandle(java.lang.String downloadReadHandle) { |
| 138 | + this.downloadReadHandle = downloadReadHandle; |
| 139 | + return this; |
| 140 | + } |
| 141 | + |
| 142 | + /** |
| 143 | + * Read handle passed from Bigstore -> Scotty for a GCS download. This is a signed, serialized |
| 144 | + * blobstore2.ReadHandle proto which must never be set outside of Bigstore, and is not applicable |
| 145 | + * to non-GCS media downloads. |
| 146 | + * @see #setDownloadReadHandle() |
| 147 | + * |
| 148 | + * <p> |
| 149 | + * The value is encoded Base64 or {@code null} for none. |
| 150 | + * </p> |
| 151 | + * |
| 152 | + * @since 1.14 |
| 153 | + */ |
| 154 | + public GdataBlobstore2Info encodeDownloadReadHandle(byte[] downloadReadHandle) { |
| 155 | + this.downloadReadHandle = com.google.api.client.util.Base64.encodeBase64URLSafeString(downloadReadHandle); |
| 156 | + return this; |
| 157 | + } |
| 158 | + |
| 159 | + /** |
| 160 | + * The blob read token. Needed to read blobs that have not been replicated. Might not be available |
| 161 | + * until the final call. |
| 162 | + * @return value or {@code null} for none |
| 163 | + */ |
| 164 | + public java.lang.String getReadToken() { |
| 165 | + return readToken; |
| 166 | + } |
| 167 | + |
| 168 | + /** |
| 169 | + * The blob read token. Needed to read blobs that have not been replicated. Might not be available |
| 170 | + * until the final call. |
| 171 | + * @param readToken readToken or {@code null} for none |
| 172 | + */ |
| 173 | + public GdataBlobstore2Info setReadToken(java.lang.String readToken) { |
| 174 | + this.readToken = readToken; |
| 175 | + return this; |
| 176 | + } |
| 177 | + |
| 178 | + /** |
| 179 | + * Metadata passed from Blobstore -> Scotty for a new GCS upload. This is a signed, serialized |
| 180 | + * blobstore2.BlobMetadataContainer proto which must never be consumed outside of Bigstore, and is |
| 181 | + * not applicable to non-GCS media uploads. |
| 182 | + * @see #decodeUploadMetadataContainer() |
| 183 | + * @return value or {@code null} for none |
| 184 | + */ |
| 185 | + public java.lang.String getUploadMetadataContainer() { |
| 186 | + return uploadMetadataContainer; |
| 187 | + } |
| 188 | + |
| 189 | + /** |
| 190 | + * Metadata passed from Blobstore -> Scotty for a new GCS upload. This is a signed, serialized |
| 191 | + * blobstore2.BlobMetadataContainer proto which must never be consumed outside of Bigstore, and is |
| 192 | + * not applicable to non-GCS media uploads. |
| 193 | + * @see #getUploadMetadataContainer() |
| 194 | + * @return Base64 decoded value or {@code null} for none |
| 195 | + * |
| 196 | + * @since 1.14 |
| 197 | + */ |
| 198 | + public byte[] decodeUploadMetadataContainer() { |
| 199 | + return com.google.api.client.util.Base64.decodeBase64(uploadMetadataContainer); |
| 200 | + } |
| 201 | + |
| 202 | + /** |
| 203 | + * Metadata passed from Blobstore -> Scotty for a new GCS upload. This is a signed, serialized |
| 204 | + * blobstore2.BlobMetadataContainer proto which must never be consumed outside of Bigstore, and is |
| 205 | + * not applicable to non-GCS media uploads. |
| 206 | + * @see #encodeUploadMetadataContainer() |
| 207 | + * @param uploadMetadataContainer uploadMetadataContainer or {@code null} for none |
| 208 | + */ |
| 209 | + public GdataBlobstore2Info setUploadMetadataContainer(java.lang.String uploadMetadataContainer) { |
| 210 | + this.uploadMetadataContainer = uploadMetadataContainer; |
| 211 | + return this; |
| 212 | + } |
| 213 | + |
| 214 | + /** |
| 215 | + * Metadata passed from Blobstore -> Scotty for a new GCS upload. This is a signed, serialized |
| 216 | + * blobstore2.BlobMetadataContainer proto which must never be consumed outside of Bigstore, and is |
| 217 | + * not applicable to non-GCS media uploads. |
| 218 | + * @see #setUploadMetadataContainer() |
| 219 | + * |
| 220 | + * <p> |
| 221 | + * The value is encoded Base64 or {@code null} for none. |
| 222 | + * </p> |
| 223 | + * |
| 224 | + * @since 1.14 |
| 225 | + */ |
| 226 | + public GdataBlobstore2Info encodeUploadMetadataContainer(byte[] uploadMetadataContainer) { |
| 227 | + this.uploadMetadataContainer = com.google.api.client.util.Base64.encodeBase64URLSafeString(uploadMetadataContainer); |
| 228 | + return this; |
| 229 | + } |
| 230 | + |
| 231 | + @Override |
| 232 | + public GdataBlobstore2Info set(String fieldName, Object value) { |
| 233 | + return (GdataBlobstore2Info) super.set(fieldName, value); |
| 234 | + } |
| 235 | + |
| 236 | + @Override |
| 237 | + public GdataBlobstore2Info clone() { |
| 238 | + return (GdataBlobstore2Info) super.clone(); |
| 239 | + } |
| 240 | + |
| 241 | +} |
0 commit comments