/*
 * 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.containeranalysis.v1beta1.model;

/**
 * This corresponds to an in-toto link.
 *
 * <p> 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 Container Analysis API. For a detailed explanation
 * see:
 * <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>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class Link extends com.google.api.client.json.GenericJson {

  /**
   * ByProducts are data generated as part of a software supply chain step, but are not the actual
   * result of the step.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ByProducts byproducts;

  /**
   * This field contains the full command executed for the step. This can also be empty if links are
   * generated for operations that aren't directly mapped to a specific command. Each term in the
   * command is an independent string in the list. An example of a command in the in-toto metadata
   * field is: "command": ["git", "clone", "https://github.com/in-toto/demo-project.git"]
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> command;

  /**
   * This is a field that can be used to capture information about the environment. It is suggested
   * for this field to contain information that details environment variables, filesystem
   * information, and the present working directory. The recommended structure of this field is:
   * "environment": { "custom_values": { "variables": "", "filesystem": "", "workdir": "", "": "..."
   * } }
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Environment environment;

  /**
   * Materials are the supply chain artifacts that go into the step and are used for the operation
   * performed. The key of the map is the path of the artifact and the structure contains the
   * recorded hash information. An example is: "materials": [ { "resource_uri": "foo/bar", "hashes":
   * { "sha256": "ebebf...", : } } ]
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GrafeasV1beta1IntotoArtifact> materials;

  static {
    // hack to force ProGuard to consider GrafeasV1beta1IntotoArtifact used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(GrafeasV1beta1IntotoArtifact.class);
  }

  /**
   * Products are the supply chain artifacts generated as a result of the step. The structure is
   * identical to that of materials.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GrafeasV1beta1IntotoArtifact> products;

  static {
    // hack to force ProGuard to consider GrafeasV1beta1IntotoArtifact used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(GrafeasV1beta1IntotoArtifact.class);
  }

  /**
   * ByProducts are data generated as part of a software supply chain step, but are not the actual
   * result of the step.
   * @return value or {@code null} for none
   */
  public ByProducts getByproducts() {
    return byproducts;
  }

  /**
   * ByProducts are data generated as part of a software supply chain step, but are not the actual
   * result of the step.
   * @param byproducts byproducts or {@code null} for none
   */
  public Link setByproducts(ByProducts byproducts) {
    this.byproducts = byproducts;
    return this;
  }

  /**
   * This field contains the full command executed for the step. This can also be empty if links are
   * generated for operations that aren't directly mapped to a specific command. Each term in the
   * command is an independent string in the list. An example of a command in the in-toto metadata
   * field is: "command": ["git", "clone", "https://github.com/in-toto/demo-project.git"]
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getCommand() {
    return command;
  }

  /**
   * This field contains the full command executed for the step. This can also be empty if links are
   * generated for operations that aren't directly mapped to a specific command. Each term in the
   * command is an independent string in the list. An example of a command in the in-toto metadata
   * field is: "command": ["git", "clone", "https://github.com/in-toto/demo-project.git"]
   * @param command command or {@code null} for none
   */
  public Link setCommand(java.util.List<java.lang.String> command) {
    this.command = command;
    return this;
  }

  /**
   * This is a field that can be used to capture information about the environment. It is suggested
   * for this field to contain information that details environment variables, filesystem
   * information, and the present working directory. The recommended structure of this field is:
   * "environment": { "custom_values": { "variables": "", "filesystem": "", "workdir": "", "": "..."
   * } }
   * @return value or {@code null} for none
   */
  public Environment getEnvironment() {
    return environment;
  }

  /**
   * This is a field that can be used to capture information about the environment. It is suggested
   * for this field to contain information that details environment variables, filesystem
   * information, and the present working directory. The recommended structure of this field is:
   * "environment": { "custom_values": { "variables": "", "filesystem": "", "workdir": "", "": "..."
   * } }
   * @param environment environment or {@code null} for none
   */
  public Link setEnvironment(Environment environment) {
    this.environment = environment;
    return this;
  }

  /**
   * Materials are the supply chain artifacts that go into the step and are used for the operation
   * performed. The key of the map is the path of the artifact and the structure contains the
   * recorded hash information. An example is: "materials": [ { "resource_uri": "foo/bar", "hashes":
   * { "sha256": "ebebf...", : } } ]
   * @return value or {@code null} for none
   */
  public java.util.List<GrafeasV1beta1IntotoArtifact> getMaterials() {
    return materials;
  }

  /**
   * Materials are the supply chain artifacts that go into the step and are used for the operation
   * performed. The key of the map is the path of the artifact and the structure contains the
   * recorded hash information. An example is: "materials": [ { "resource_uri": "foo/bar", "hashes":
   * { "sha256": "ebebf...", : } } ]
   * @param materials materials or {@code null} for none
   */
  public Link setMaterials(java.util.List<GrafeasV1beta1IntotoArtifact> materials) {
    this.materials = materials;
    return this;
  }

  /**
   * Products are the supply chain artifacts generated as a result of the step. The structure is
   * identical to that of materials.
   * @return value or {@code null} for none
   */
  public java.util.List<GrafeasV1beta1IntotoArtifact> getProducts() {
    return products;
  }

  /**
   * Products are the supply chain artifacts generated as a result of the step. The structure is
   * identical to that of materials.
   * @param products products or {@code null} for none
   */
  public Link setProducts(java.util.List<GrafeasV1beta1IntotoArtifact> products) {
    this.products = products;
    return this;
  }

  @Override
  public Link set(String fieldName, Object value) {
    return (Link) super.set(fieldName, value);
  }

  @Override
  public Link clone() {
    return (Link) super.clone();
  }

}
