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

/**
 * The same asset can be represented in different formats, for example, a [WaveFront
 * .obj](//en.wikipedia.org/wiki/Wavefront_.obj_file) file with its corresponding .mtl file or a
 * [Khronos glTF](//www.khronos.org/gltf) file with its corresponding .glb binary data. A format
 * refers to a specific representation of an asset and contains all information needed to retrieve
 * and describe this representation.
 *
 * <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 Poly 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 Format extends com.google.api.client.json.GenericJson {

  /**
   * Complexity stats about this representation of the asset.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private FormatComplexity formatComplexity;

  /**
   * A short string that identifies the format type of this representation. Possible values are:
   * `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String formatType;

  /**
   * A list of dependencies of the root element. May include, but is not limited to, materials,
   * textures, and shader programs.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<File> resources;

  static {
    // hack to force ProGuard to consider File 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(File.class);
  }

  /**
   * The root of the file hierarchy. This will always be populated. For some format_types - such as
   * `TILT`, which are self-contained - this is all of the data.
   *
   * Other types - such as `OBJ` - often reference other data elements. These are contained in the
   * resources field.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private File root;

  /**
   * Complexity stats about this representation of the asset.
   * @return value or {@code null} for none
   */
  public FormatComplexity getFormatComplexity() {
    return formatComplexity;
  }

  /**
   * Complexity stats about this representation of the asset.
   * @param formatComplexity formatComplexity or {@code null} for none
   */
  public Format setFormatComplexity(FormatComplexity formatComplexity) {
    this.formatComplexity = formatComplexity;
    return this;
  }

  /**
   * A short string that identifies the format type of this representation. Possible values are:
   * `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.
   * @return value or {@code null} for none
   */
  public java.lang.String getFormatType() {
    return formatType;
  }

  /**
   * A short string that identifies the format type of this representation. Possible values are:
   * `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.
   * @param formatType formatType or {@code null} for none
   */
  public Format setFormatType(java.lang.String formatType) {
    this.formatType = formatType;
    return this;
  }

  /**
   * A list of dependencies of the root element. May include, but is not limited to, materials,
   * textures, and shader programs.
   * @return value or {@code null} for none
   */
  public java.util.List<File> getResources() {
    return resources;
  }

  /**
   * A list of dependencies of the root element. May include, but is not limited to, materials,
   * textures, and shader programs.
   * @param resources resources or {@code null} for none
   */
  public Format setResources(java.util.List<File> resources) {
    this.resources = resources;
    return this;
  }

  /**
   * The root of the file hierarchy. This will always be populated. For some format_types - such as
   * `TILT`, which are self-contained - this is all of the data.
   *
   * Other types - such as `OBJ` - often reference other data elements. These are contained in the
   * resources field.
   * @return value or {@code null} for none
   */
  public File getRoot() {
    return root;
  }

  /**
   * The root of the file hierarchy. This will always be populated. For some format_types - such as
   * `TILT`, which are self-contained - this is all of the data.
   *
   * Other types - such as `OBJ` - often reference other data elements. These are contained in the
   * resources field.
   * @param root root or {@code null} for none
   */
  public Format setRoot(File root) {
    this.root = root;
    return this;
  }

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

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

}
