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

com.google.api.services.artifactregistry.v1.model.Attachment Maven / Gradle / Ivy

/*
 * 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.artifactregistry.v1.model;

/**
 * An Attachment refers to additional metadata that can be attached to artifacts in Artifact
 * Registry. An attachment consists of one or more files.
 *
 * 

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 Artifact Registry 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 Attachment extends com.google.api.client.json.GenericJson { /** * Optional. User annotations. These attributes can only be set and used by the user, and not by * Artifact Registry. See https://google.aip.dev/128#annotations for more details such as format * and size limitations. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map annotations; /** * The namespace this attachment belongs to. E.g. If an attachment is created by artifact * analysis, namespace is set to `artifactanalysis.googleapis.com`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String attachmentNamespace; /** * Output only. The time when the attachment was created. * The value may be {@code null}. */ @com.google.api.client.util.Key private String createTime; /** * Required. The files that belong to this attachment. If the file ID part contains slashes, they * are escaped. E.g. `projects/p1/locations/us-central1/repositories/repo1/files/sha:`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List files; /** * The name of the attachment. E.g. `projects/p1/locations/us/repositories/repo/attachments/sbom`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String name; /** * Output only. The name of the OCI version that this attachment created. Only populated for * Docker attachments. E.g. `projects/p1/locations/us- * central1/repositories/repo1/packages/p1/versions/v1`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String ociVersionName; /** * Required. The target the attachment is for, can be a Version, Package or Repository. E.g. * `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String target; /** * Type of attachment. E.g. `application/vnd.spdx+json` * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String type; /** * Output only. The time when the attachment was last updated. * The value may be {@code null}. */ @com.google.api.client.util.Key private String updateTime; /** * Optional. User annotations. These attributes can only be set and used by the user, and not by * Artifact Registry. See https://google.aip.dev/128#annotations for more details such as format * and size limitations. * @return value or {@code null} for none */ public java.util.Map getAnnotations() { return annotations; } /** * Optional. User annotations. These attributes can only be set and used by the user, and not by * Artifact Registry. See https://google.aip.dev/128#annotations for more details such as format * and size limitations. * @param annotations annotations or {@code null} for none */ public Attachment setAnnotations(java.util.Map annotations) { this.annotations = annotations; return this; } /** * The namespace this attachment belongs to. E.g. If an attachment is created by artifact * analysis, namespace is set to `artifactanalysis.googleapis.com`. * @return value or {@code null} for none */ public java.lang.String getAttachmentNamespace() { return attachmentNamespace; } /** * The namespace this attachment belongs to. E.g. If an attachment is created by artifact * analysis, namespace is set to `artifactanalysis.googleapis.com`. * @param attachmentNamespace attachmentNamespace or {@code null} for none */ public Attachment setAttachmentNamespace(java.lang.String attachmentNamespace) { this.attachmentNamespace = attachmentNamespace; return this; } /** * Output only. The time when the attachment was created. * @return value or {@code null} for none */ public String getCreateTime() { return createTime; } /** * Output only. The time when the attachment was created. * @param createTime createTime or {@code null} for none */ public Attachment setCreateTime(String createTime) { this.createTime = createTime; return this; } /** * Required. The files that belong to this attachment. If the file ID part contains slashes, they * are escaped. E.g. `projects/p1/locations/us-central1/repositories/repo1/files/sha:`. * @return value or {@code null} for none */ public java.util.List getFiles() { return files; } /** * Required. The files that belong to this attachment. If the file ID part contains slashes, they * are escaped. E.g. `projects/p1/locations/us-central1/repositories/repo1/files/sha:`. * @param files files or {@code null} for none */ public Attachment setFiles(java.util.List files) { this.files = files; return this; } /** * The name of the attachment. E.g. `projects/p1/locations/us/repositories/repo/attachments/sbom`. * @return value or {@code null} for none */ public java.lang.String getName() { return name; } /** * The name of the attachment. E.g. `projects/p1/locations/us/repositories/repo/attachments/sbom`. * @param name name or {@code null} for none */ public Attachment setName(java.lang.String name) { this.name = name; return this; } /** * Output only. The name of the OCI version that this attachment created. Only populated for * Docker attachments. E.g. `projects/p1/locations/us- * central1/repositories/repo1/packages/p1/versions/v1`. * @return value or {@code null} for none */ public java.lang.String getOciVersionName() { return ociVersionName; } /** * Output only. The name of the OCI version that this attachment created. Only populated for * Docker attachments. E.g. `projects/p1/locations/us- * central1/repositories/repo1/packages/p1/versions/v1`. * @param ociVersionName ociVersionName or {@code null} for none */ public Attachment setOciVersionName(java.lang.String ociVersionName) { this.ociVersionName = ociVersionName; return this; } /** * Required. The target the attachment is for, can be a Version, Package or Repository. E.g. * `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. * @return value or {@code null} for none */ public java.lang.String getTarget() { return target; } /** * Required. The target the attachment is for, can be a Version, Package or Repository. E.g. * `projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1`. * @param target target or {@code null} for none */ public Attachment setTarget(java.lang.String target) { this.target = target; return this; } /** * Type of attachment. E.g. `application/vnd.spdx+json` * @return value or {@code null} for none */ public java.lang.String getType() { return type; } /** * Type of attachment. E.g. `application/vnd.spdx+json` * @param type type or {@code null} for none */ public Attachment setType(java.lang.String type) { this.type = type; return this; } /** * Output only. The time when the attachment was last updated. * @return value or {@code null} for none */ public String getUpdateTime() { return updateTime; } /** * Output only. The time when the attachment was last updated. * @param updateTime updateTime or {@code null} for none */ public Attachment setUpdateTime(String updateTime) { this.updateTime = updateTime; return this; } @Override public Attachment set(String fieldName, Object value) { return (Attachment) super.set(fieldName, value); } @Override public Attachment clone() { return (Attachment) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy