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

/**
 * StatusCause provides more information about an api.Status failure, including cases when multiple
 * errors are encountered.
 *
 * <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 Cloud Run Admin 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 StatusCause extends com.google.api.client.json.GenericJson {

  /**
   * The field of the resource that has caused this error, as named by its JSON serialization. May
   * include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may
   * appear more than once in an array of causes due to fields having multiple errors. Optional.
   * Examples: "name" - the field "name" on the current resource "items[0].name" - the field "name"
   * on the first array entry in "items" +optional
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String field;

  /**
   * A human-readable description of the cause of the error. This field may be presented as-is to a
   * reader. +optional
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String message;

  /**
   * A machine-readable description of the cause of the error. If this value is empty there is no
   * information available. +optional
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String reason;

  /**
   * The field of the resource that has caused this error, as named by its JSON serialization. May
   * include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may
   * appear more than once in an array of causes due to fields having multiple errors. Optional.
   * Examples: "name" - the field "name" on the current resource "items[0].name" - the field "name"
   * on the first array entry in "items" +optional
   * @return value or {@code null} for none
   */
  public java.lang.String getField() {
    return field;
  }

  /**
   * The field of the resource that has caused this error, as named by its JSON serialization. May
   * include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may
   * appear more than once in an array of causes due to fields having multiple errors. Optional.
   * Examples: "name" - the field "name" on the current resource "items[0].name" - the field "name"
   * on the first array entry in "items" +optional
   * @param field field or {@code null} for none
   */
  public StatusCause setField(java.lang.String field) {
    this.field = field;
    return this;
  }

  /**
   * A human-readable description of the cause of the error. This field may be presented as-is to a
   * reader. +optional
   * @return value or {@code null} for none
   */
  public java.lang.String getMessage() {
    return message;
  }

  /**
   * A human-readable description of the cause of the error. This field may be presented as-is to a
   * reader. +optional
   * @param message message or {@code null} for none
   */
  public StatusCause setMessage(java.lang.String message) {
    this.message = message;
    return this;
  }

  /**
   * A machine-readable description of the cause of the error. If this value is empty there is no
   * information available. +optional
   * @return value or {@code null} for none
   */
  public java.lang.String getReason() {
    return reason;
  }

  /**
   * A machine-readable description of the cause of the error. If this value is empty there is no
   * information available. +optional
   * @param reason reason or {@code null} for none
   */
  public StatusCause setReason(java.lang.String reason) {
    this.reason = reason;
    return this;
  }

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

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

}
