/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v50</h1>       <p>Introduced in Cloudera Manager 7.8.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.8.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.cloudera.api.swagger.model;

import java.util.Objects;
import com.cloudera.api.swagger.model.ApiYarnApplication;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * The response contains a list of applications and warnings.
 */
@ApiModel(description = "The response contains a list of applications and warnings.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-17T16:38:34.097Z")
public class ApiYarnApplicationResponse {
  @SerializedName("applications")
  private List<ApiYarnApplication> applications = null;

  @SerializedName("warnings")
  private List<String> warnings = null;

  public ApiYarnApplicationResponse applications(List<ApiYarnApplication> applications) {
    this.applications = applications;
    return this;
  }

  public ApiYarnApplicationResponse addApplicationsItem(ApiYarnApplication applicationsItem) {
    if (this.applications == null) {
      this.applications = new ArrayList<ApiYarnApplication>();
    }
    this.applications.add(applicationsItem);
    return this;
  }

   /**
   * The list of applications for this response.
   * @return applications
  **/
  @ApiModelProperty(value = "The list of applications for this response.")
  public List<ApiYarnApplication> getApplications() {
    return applications;
  }

  public void setApplications(List<ApiYarnApplication> applications) {
    this.applications = applications;
  }

  public ApiYarnApplicationResponse warnings(List<String> warnings) {
    this.warnings = warnings;
    return this;
  }

  public ApiYarnApplicationResponse addWarningsItem(String warningsItem) {
    if (this.warnings == null) {
      this.warnings = new ArrayList<String>();
    }
    this.warnings.add(warningsItem);
    return this;
  }

   /**
   * This list of warnings for this response.
   * @return warnings
  **/
  @ApiModelProperty(value = "This list of warnings for this response.")
  public List<String> getWarnings() {
    return warnings;
  }

  public void setWarnings(List<String> warnings) {
    this.warnings = warnings;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiYarnApplicationResponse apiYarnApplicationResponse = (ApiYarnApplicationResponse) o;
    return Objects.equals(this.applications, apiYarnApplicationResponse.applications) &&
        Objects.equals(this.warnings, apiYarnApplicationResponse.warnings);
  }

  @Override
  public int hashCode() {
    return Objects.hash(applications, warnings);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiYarnApplicationResponse {\n");
    
    sb.append("    applications: ").append(toIndentedString(applications)).append("\n");
    sb.append("    warnings: ").append(toIndentedString(warnings)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
  
}

