/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.13.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 java.util.Arrays;
import com.cloudera.api.swagger.model.ApiListBase;
import com.cloudera.api.swagger.model.ApiRangerPolicy;
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.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
 * Holds information about local (#getPolicies()) and remote (#getRemotePolicies()) policies defined in Ranger.
 */
@Schema(description = "Holds information about local (#getPolicies()) and remote (#getRemotePolicies()) policies defined in Ranger.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiRangerPolicyList extends ApiListBase {
  @SerializedName("policies")
  private List<ApiRangerPolicy> policies = null;

  @SerializedName("remotePolicies")
  private List<ApiRangerPolicy> remotePolicies = null;

  public ApiRangerPolicyList policies(List<ApiRangerPolicy> policies) {
    this.policies = policies;
    return this;
  }

  public ApiRangerPolicyList addPoliciesItem(ApiRangerPolicy policiesItem) {
    if (this.policies == null) {
      this.policies = new ArrayList<>();
    }
    this.policies.add(policiesItem);
    return this;
  }

   /**
   * Get policies
   * @return policies
  **/
  @Schema(description = "")
  public List<ApiRangerPolicy> getPolicies() {
    return policies;
  }

  public void setPolicies(List<ApiRangerPolicy> policies) {
    this.policies = policies;
  }

  public ApiRangerPolicyList remotePolicies(List<ApiRangerPolicy> remotePolicies) {
    this.remotePolicies = remotePolicies;
    return this;
  }

  public ApiRangerPolicyList addRemotePoliciesItem(ApiRangerPolicy remotePoliciesItem) {
    if (this.remotePolicies == null) {
      this.remotePolicies = new ArrayList<>();
    }
    this.remotePolicies.add(remotePoliciesItem);
    return this;
  }

   /**
   * Get remotePolicies
   * @return remotePolicies
  **/
  @Schema(description = "")
  public List<ApiRangerPolicy> getRemotePolicies() {
    return remotePolicies;
  }

  public void setRemotePolicies(List<ApiRangerPolicy> remotePolicies) {
    this.remotePolicies = remotePolicies;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiRangerPolicyList apiRangerPolicyList = (ApiRangerPolicyList) o;
    return Objects.equals(this.policies, apiRangerPolicyList.policies) &&
        Objects.equals(this.remotePolicies, apiRangerPolicyList.remotePolicies) &&
        super.equals(o);
  }

  @Override
  public int hashCode() {
    return Objects.hash(policies, remotePolicies, super.hashCode());
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiRangerPolicyList {\n");
    sb.append("    ").append(toIndentedString(super.toString())).append("\n");
    sb.append("    policies: ").append(toIndentedString(policies)).append("\n");
    sb.append("    remotePolicies: ").append(toIndentedString(remotePolicies)).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    ");
  }

}
