/*
 * 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.gkehub.v1alpha.model;

/**
 * An ACM created error representing a problem syncing configurations
 *
 * <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 GKE Hub 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 ConfigManagementSyncError extends com.google.api.client.json.GenericJson {

  /**
   * An ACM defined error code
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String code;

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

  /**
   * A list of config(s) associated with the error, if any
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<ConfigManagementErrorResource> errorResources;

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

  /**
   * An ACM defined error code
   * @return value or {@code null} for none
   */
  public java.lang.String getCode() {
    return code;
  }

  /**
   * An ACM defined error code
   * @param code code or {@code null} for none
   */
  public ConfigManagementSyncError setCode(java.lang.String code) {
    this.code = code;
    return this;
  }

  /**
   * A description of the error
   * @return value or {@code null} for none
   */
  public java.lang.String getErrorMessage() {
    return errorMessage;
  }

  /**
   * A description of the error
   * @param errorMessage errorMessage or {@code null} for none
   */
  public ConfigManagementSyncError setErrorMessage(java.lang.String errorMessage) {
    this.errorMessage = errorMessage;
    return this;
  }

  /**
   * A list of config(s) associated with the error, if any
   * @return value or {@code null} for none
   */
  public java.util.List<ConfigManagementErrorResource> getErrorResources() {
    return errorResources;
  }

  /**
   * A list of config(s) associated with the error, if any
   * @param errorResources errorResources or {@code null} for none
   */
  public ConfigManagementSyncError setErrorResources(java.util.List<ConfigManagementErrorResource> errorResources) {
    this.errorResources = errorResources;
    return this;
  }

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

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

}
