|
| 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.artifactregistry.v1.model; |
| 18 | + |
| 19 | +/** |
| 20 | + * An Attachment refers to additional metadata that can be attached to artifacts in |
| 21 | + * ArtifactRegistry. An attachment consists of one or more files. |
| 22 | + * |
| 23 | + * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is |
| 24 | + * transmitted over HTTP when working with the Artifact Registry API. For a detailed explanation |
| 25 | + * see: |
| 26 | + * <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> |
| 27 | + * </p> |
| 28 | + * |
| 29 | + * @author Google, Inc. |
| 30 | + */ |
| 31 | +@SuppressWarnings("javadoc") |
| 32 | +public final class Attachment extends com.google.api.client.json.GenericJson { |
| 33 | + |
| 34 | + /** |
| 35 | + * Optional. User annotations. These attributes can only be set and used by the user, and not by |
| 36 | + * Artifact Registry. See https://google.aip.dev/128#annotations for more details such as format |
| 37 | + * and size limitations. Client specified annotations. |
| 38 | + * The value may be {@code null}. |
| 39 | + */ |
| 40 | + @com.google.api.client.util.Key |
| 41 | + private java.util.Map<String, java.lang.String> annotations; |
| 42 | + |
| 43 | + /** |
| 44 | + * The namespace this attachment belongs to. E.g. If an Attachment is created by artifact |
| 45 | + * analysis, namespace is set to artifactanalysis.googleapis.com. |
| 46 | + * The value may be {@code null}. |
| 47 | + */ |
| 48 | + @com.google.api.client.util.Key |
| 49 | + private java.lang.String attachmentNamespace; |
| 50 | + |
| 51 | + /** |
| 52 | + * Output only. The time when the attachment was created. |
| 53 | + * The value may be {@code null}. |
| 54 | + */ |
| 55 | + @com.google.api.client.util.Key |
| 56 | + private String createTime; |
| 57 | + |
| 58 | + /** |
| 59 | + * Required. The files that blong to this Attachment. If the file ID part contains slashes, they |
| 60 | + * are escaped. E.g. "projects/p1/locations/us-central1/repositories/repo1/files/sha:". |
| 61 | + * The value may be {@code null}. |
| 62 | + */ |
| 63 | + @com.google.api.client.util.Key |
| 64 | + private java.util.List<java.lang.String> files; |
| 65 | + |
| 66 | + /** |
| 67 | + * The name of the attachment. E.g. "projects/p1/locations/us/repositories/repo/attachments/sbom". |
| 68 | + * The value may be {@code null}. |
| 69 | + */ |
| 70 | + @com.google.api.client.util.Key |
| 71 | + private java.lang.String name; |
| 72 | + |
| 73 | + /** |
| 74 | + * Output only. The name of the OCI version that this attachment created. Only populated for |
| 75 | + * Docker attachments. E.g. "projects/p1/locations/us- |
| 76 | + * central1/repositories/repo1/packages/p1/versions/v1". |
| 77 | + * The value may be {@code null}. |
| 78 | + */ |
| 79 | + @com.google.api.client.util.Key |
| 80 | + private java.lang.String ociVersionName; |
| 81 | + |
| 82 | + /** |
| 83 | + * Required. The target the attachment is for, can be a Version, Package or Repository. E.g. |
| 84 | + * "projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1". |
| 85 | + * The value may be {@code null}. |
| 86 | + */ |
| 87 | + @com.google.api.client.util.Key |
| 88 | + private java.lang.String target; |
| 89 | + |
| 90 | + /** |
| 91 | + * Type of Attachment. E.g. application/vnd.spdx+jsonn |
| 92 | + * The value may be {@code null}. |
| 93 | + */ |
| 94 | + @com.google.api.client.util.Key |
| 95 | + private java.lang.String type; |
| 96 | + |
| 97 | + /** |
| 98 | + * Output only. The time when the attachment was last updated. |
| 99 | + * The value may be {@code null}. |
| 100 | + */ |
| 101 | + @com.google.api.client.util.Key |
| 102 | + private String updateTime; |
| 103 | + |
| 104 | + /** |
| 105 | + * Optional. User annotations. These attributes can only be set and used by the user, and not by |
| 106 | + * Artifact Registry. See https://google.aip.dev/128#annotations for more details such as format |
| 107 | + * and size limitations. Client specified annotations. |
| 108 | + * @return value or {@code null} for none |
| 109 | + */ |
| 110 | + public java.util.Map<String, java.lang.String> getAnnotations() { |
| 111 | + return annotations; |
| 112 | + } |
| 113 | + |
| 114 | + /** |
| 115 | + * Optional. User annotations. These attributes can only be set and used by the user, and not by |
| 116 | + * Artifact Registry. See https://google.aip.dev/128#annotations for more details such as format |
| 117 | + * and size limitations. Client specified annotations. |
| 118 | + * @param annotations annotations or {@code null} for none |
| 119 | + */ |
| 120 | + public Attachment setAnnotations(java.util.Map<String, java.lang.String> annotations) { |
| 121 | + this.annotations = annotations; |
| 122 | + return this; |
| 123 | + } |
| 124 | + |
| 125 | + /** |
| 126 | + * The namespace this attachment belongs to. E.g. If an Attachment is created by artifact |
| 127 | + * analysis, namespace is set to artifactanalysis.googleapis.com. |
| 128 | + * @return value or {@code null} for none |
| 129 | + */ |
| 130 | + public java.lang.String getAttachmentNamespace() { |
| 131 | + return attachmentNamespace; |
| 132 | + } |
| 133 | + |
| 134 | + /** |
| 135 | + * The namespace this attachment belongs to. E.g. If an Attachment is created by artifact |
| 136 | + * analysis, namespace is set to artifactanalysis.googleapis.com. |
| 137 | + * @param attachmentNamespace attachmentNamespace or {@code null} for none |
| 138 | + */ |
| 139 | + public Attachment setAttachmentNamespace(java.lang.String attachmentNamespace) { |
| 140 | + this.attachmentNamespace = attachmentNamespace; |
| 141 | + return this; |
| 142 | + } |
| 143 | + |
| 144 | + /** |
| 145 | + * Output only. The time when the attachment was created. |
| 146 | + * @return value or {@code null} for none |
| 147 | + */ |
| 148 | + public String getCreateTime() { |
| 149 | + return createTime; |
| 150 | + } |
| 151 | + |
| 152 | + /** |
| 153 | + * Output only. The time when the attachment was created. |
| 154 | + * @param createTime createTime or {@code null} for none |
| 155 | + */ |
| 156 | + public Attachment setCreateTime(String createTime) { |
| 157 | + this.createTime = createTime; |
| 158 | + return this; |
| 159 | + } |
| 160 | + |
| 161 | + /** |
| 162 | + * Required. The files that blong to this Attachment. If the file ID part contains slashes, they |
| 163 | + * are escaped. E.g. "projects/p1/locations/us-central1/repositories/repo1/files/sha:". |
| 164 | + * @return value or {@code null} for none |
| 165 | + */ |
| 166 | + public java.util.List<java.lang.String> getFiles() { |
| 167 | + return files; |
| 168 | + } |
| 169 | + |
| 170 | + /** |
| 171 | + * Required. The files that blong to this Attachment. If the file ID part contains slashes, they |
| 172 | + * are escaped. E.g. "projects/p1/locations/us-central1/repositories/repo1/files/sha:". |
| 173 | + * @param files files or {@code null} for none |
| 174 | + */ |
| 175 | + public Attachment setFiles(java.util.List<java.lang.String> files) { |
| 176 | + this.files = files; |
| 177 | + return this; |
| 178 | + } |
| 179 | + |
| 180 | + /** |
| 181 | + * The name of the attachment. E.g. "projects/p1/locations/us/repositories/repo/attachments/sbom". |
| 182 | + * @return value or {@code null} for none |
| 183 | + */ |
| 184 | + public java.lang.String getName() { |
| 185 | + return name; |
| 186 | + } |
| 187 | + |
| 188 | + /** |
| 189 | + * The name of the attachment. E.g. "projects/p1/locations/us/repositories/repo/attachments/sbom". |
| 190 | + * @param name name or {@code null} for none |
| 191 | + */ |
| 192 | + public Attachment setName(java.lang.String name) { |
| 193 | + this.name = name; |
| 194 | + return this; |
| 195 | + } |
| 196 | + |
| 197 | + /** |
| 198 | + * Output only. The name of the OCI version that this attachment created. Only populated for |
| 199 | + * Docker attachments. E.g. "projects/p1/locations/us- |
| 200 | + * central1/repositories/repo1/packages/p1/versions/v1". |
| 201 | + * @return value or {@code null} for none |
| 202 | + */ |
| 203 | + public java.lang.String getOciVersionName() { |
| 204 | + return ociVersionName; |
| 205 | + } |
| 206 | + |
| 207 | + /** |
| 208 | + * Output only. The name of the OCI version that this attachment created. Only populated for |
| 209 | + * Docker attachments. E.g. "projects/p1/locations/us- |
| 210 | + * central1/repositories/repo1/packages/p1/versions/v1". |
| 211 | + * @param ociVersionName ociVersionName or {@code null} for none |
| 212 | + */ |
| 213 | + public Attachment setOciVersionName(java.lang.String ociVersionName) { |
| 214 | + this.ociVersionName = ociVersionName; |
| 215 | + return this; |
| 216 | + } |
| 217 | + |
| 218 | + /** |
| 219 | + * Required. The target the attachment is for, can be a Version, Package or Repository. E.g. |
| 220 | + * "projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1". |
| 221 | + * @return value or {@code null} for none |
| 222 | + */ |
| 223 | + public java.lang.String getTarget() { |
| 224 | + return target; |
| 225 | + } |
| 226 | + |
| 227 | + /** |
| 228 | + * Required. The target the attachment is for, can be a Version, Package or Repository. E.g. |
| 229 | + * "projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1". |
| 230 | + * @param target target or {@code null} for none |
| 231 | + */ |
| 232 | + public Attachment setTarget(java.lang.String target) { |
| 233 | + this.target = target; |
| 234 | + return this; |
| 235 | + } |
| 236 | + |
| 237 | + /** |
| 238 | + * Type of Attachment. E.g. application/vnd.spdx+jsonn |
| 239 | + * @return value or {@code null} for none |
| 240 | + */ |
| 241 | + public java.lang.String getType() { |
| 242 | + return type; |
| 243 | + } |
| 244 | + |
| 245 | + /** |
| 246 | + * Type of Attachment. E.g. application/vnd.spdx+jsonn |
| 247 | + * @param type type or {@code null} for none |
| 248 | + */ |
| 249 | + public Attachment setType(java.lang.String type) { |
| 250 | + this.type = type; |
| 251 | + return this; |
| 252 | + } |
| 253 | + |
| 254 | + /** |
| 255 | + * Output only. The time when the attachment was last updated. |
| 256 | + * @return value or {@code null} for none |
| 257 | + */ |
| 258 | + public String getUpdateTime() { |
| 259 | + return updateTime; |
| 260 | + } |
| 261 | + |
| 262 | + /** |
| 263 | + * Output only. The time when the attachment was last updated. |
| 264 | + * @param updateTime updateTime or {@code null} for none |
| 265 | + */ |
| 266 | + public Attachment setUpdateTime(String updateTime) { |
| 267 | + this.updateTime = updateTime; |
| 268 | + return this; |
| 269 | + } |
| 270 | + |
| 271 | + @Override |
| 272 | + public Attachment set(String fieldName, Object value) { |
| 273 | + return (Attachment) super.set(fieldName, value); |
| 274 | + } |
| 275 | + |
| 276 | + @Override |
| 277 | + public Attachment clone() { |
| 278 | + return (Attachment) super.clone(); |
| 279 | + } |
| 280 | + |
| 281 | +} |
0 commit comments