/*
 * 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.searchads360.v0.model;

/**
 * SearchAds360-specific error.
 *
 * <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 Search Ads 360 Reporting 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 GoogleAdsSearchads360V0ErrorsSearchAds360Error extends com.google.api.client.json.GenericJson {

  /**
   * Additional error details, which are returned by certain error codes. Most error codes do not
   * include details.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleAdsSearchads360V0ErrorsErrorDetails details;

  /**
   * An enum value that indicates which error occurred.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleAdsSearchads360V0ErrorsErrorCode errorCode;

  /**
   * Describes the part of the request proto that caused the error.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleAdsSearchads360V0ErrorsErrorLocation location;

  /**
   * A human-readable description of the error.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String message;

  /**
   * The value that triggered the error.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleAdsSearchads360V0CommonValue trigger;

  /**
   * Additional error details, which are returned by certain error codes. Most error codes do not
   * include details.
   * @return value or {@code null} for none
   */
  public GoogleAdsSearchads360V0ErrorsErrorDetails getDetails() {
    return details;
  }

  /**
   * Additional error details, which are returned by certain error codes. Most error codes do not
   * include details.
   * @param details details or {@code null} for none
   */
  public GoogleAdsSearchads360V0ErrorsSearchAds360Error setDetails(GoogleAdsSearchads360V0ErrorsErrorDetails details) {
    this.details = details;
    return this;
  }

  /**
   * An enum value that indicates which error occurred.
   * @return value or {@code null} for none
   */
  public GoogleAdsSearchads360V0ErrorsErrorCode getErrorCode() {
    return errorCode;
  }

  /**
   * An enum value that indicates which error occurred.
   * @param errorCode errorCode or {@code null} for none
   */
  public GoogleAdsSearchads360V0ErrorsSearchAds360Error setErrorCode(GoogleAdsSearchads360V0ErrorsErrorCode errorCode) {
    this.errorCode = errorCode;
    return this;
  }

  /**
   * Describes the part of the request proto that caused the error.
   * @return value or {@code null} for none
   */
  public GoogleAdsSearchads360V0ErrorsErrorLocation getLocation() {
    return location;
  }

  /**
   * Describes the part of the request proto that caused the error.
   * @param location location or {@code null} for none
   */
  public GoogleAdsSearchads360V0ErrorsSearchAds360Error setLocation(GoogleAdsSearchads360V0ErrorsErrorLocation location) {
    this.location = location;
    return this;
  }

  /**
   * A human-readable description of the error.
   * @return value or {@code null} for none
   */
  public java.lang.String getMessage() {
    return message;
  }

  /**
   * A human-readable description of the error.
   * @param message message or {@code null} for none
   */
  public GoogleAdsSearchads360V0ErrorsSearchAds360Error setMessage(java.lang.String message) {
    this.message = message;
    return this;
  }

  /**
   * The value that triggered the error.
   * @return value or {@code null} for none
   */
  public GoogleAdsSearchads360V0CommonValue getTrigger() {
    return trigger;
  }

  /**
   * The value that triggered the error.
   * @param trigger trigger or {@code null} for none
   */
  public GoogleAdsSearchads360V0ErrorsSearchAds360Error setTrigger(GoogleAdsSearchads360V0CommonValue trigger) {
    this.trigger = trigger;
    return this;
  }

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

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

}
