/*
 * 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.ApiHdfsCloudReplicationArguments;
import com.cloudera.api.swagger.model.ApiHdfsReplicationArguments;
import com.cloudera.api.swagger.model.ApiRangerReplicationExportArgs;
import com.cloudera.api.swagger.model.ApiRangerReplicationImportArgs;
import com.cloudera.api.swagger.model.ApiRangerReplicationTransformArgs;
import com.cloudera.api.swagger.model.ApiServiceRef;
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;
/**
 * Replication arguments for replicating services defined in Ranger. It works the following way: &lt;ol&gt; &lt;li&gt; EXPORT the given services, policies and roles from the source Ranger, then COPY the exported result to destination, see available arguments in ApiRangerReplicationExportArgs. Note that if #getExportArgs() not provided, then services defined in Ranger won&#x27;t be replicated, it will be skipped. &lt;/li&gt; &lt;li&gt; TRANSFORM the exported services, policies and roles from the source Ranger on the destination, see available arguments in ApiRangerReplicationTransformArgs. Includes arguments for transforming HDFS Ranger service policies to cloud policies. &lt;/li&gt; &lt;li&gt; IMPORT the exported and transformed services, policies and roles from source to destination Ranger, see available arguments in ApiRangerReplicationImportArgs &lt;/li&gt; &lt;li&gt;For replicating the Ranger HDFS audit logs, there are 2 options: &lt;ul&gt; &lt;li&gt; If #getAuditLogDistCpArgs() is provided then the replication will distributed copy Ranger HDFS audit logs from source HDFS to destination HDFS, see available arguments in ApiHdfsReplicationArguments. If provided, then the mandatory fields are ApiHdfsReplicationArguments#getUserName() (destination user) and ApiHdfsReplicationArguments#getSourceUser() (source user). Any other ApiHdfsReplicationArguments fields could be provided, sourcePath and destinationPath will be set appropriately by CM, when not specified. &lt;/li&gt; &lt;li&gt; Alternatively, you can provide #getAuditLogDistCpCloudArgs(), in this case distributed copy for Ranger HDFS audit logs from source HDFS to destination cloud storage, see available arguments in ApiHdfsCloudReplicationArguments. Mandatory fields are ApiHdfsCloudReplicationArguments#getSourceUser() (source user), ApiHdfsCloudReplicationArguments#getDestinationAccount() (destination user) and ApiHdfsCloudReplicationArguments#getDestinationPath(). Any other ApiHdfsCloudReplicationArguments fields could be provided, sourcePath will be set appropriately by CM, when not specified. &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ol&gt; Note that at least one of #getExportArgs(), #getAuditLogDistCpArgs(), #getAuditLogDistCpCloudArgs() must be provided, otherwise the replication would not do anything.
 */
@Schema(description = "Replication arguments for replicating services defined in Ranger. It works the following way: <ol> <li> EXPORT the given services, policies and roles from the source Ranger, then COPY the exported result to destination, see available arguments in ApiRangerReplicationExportArgs. Note that if #getExportArgs() not provided, then services defined in Ranger won't be replicated, it will be skipped. </li> <li> TRANSFORM the exported services, policies and roles from the source Ranger on the destination, see available arguments in ApiRangerReplicationTransformArgs. Includes arguments for transforming HDFS Ranger service policies to cloud policies. </li> <li> IMPORT the exported and transformed services, policies and roles from source to destination Ranger, see available arguments in ApiRangerReplicationImportArgs </li> <li>For replicating the Ranger HDFS audit logs, there are 2 options: <ul> <li> If #getAuditLogDistCpArgs() is provided then the replication will distributed copy Ranger HDFS audit logs from source HDFS to destination HDFS, see available arguments in ApiHdfsReplicationArguments. If provided, then the mandatory fields are ApiHdfsReplicationArguments#getUserName() (destination user) and ApiHdfsReplicationArguments#getSourceUser() (source user). Any other ApiHdfsReplicationArguments fields could be provided, sourcePath and destinationPath will be set appropriately by CM, when not specified. </li> <li> Alternatively, you can provide #getAuditLogDistCpCloudArgs(), in this case distributed copy for Ranger HDFS audit logs from source HDFS to destination cloud storage, see available arguments in ApiHdfsCloudReplicationArguments. Mandatory fields are ApiHdfsCloudReplicationArguments#getSourceUser() (source user), ApiHdfsCloudReplicationArguments#getDestinationAccount() (destination user) and ApiHdfsCloudReplicationArguments#getDestinationPath(). Any other ApiHdfsCloudReplicationArguments fields could be provided, sourcePath will be set appropriately by CM, when not specified. </li> </ul> </li> </ol> Note that at least one of #getExportArgs(), #getAuditLogDistCpArgs(), #getAuditLogDistCpCloudArgs() must be provided, otherwise the replication would not do anything.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiRangerReplicationArgs {
  @SerializedName("sourceRangerService")
  private ApiServiceRef sourceRangerService = null;

  @SerializedName("exportArgs")
  private ApiRangerReplicationExportArgs exportArgs = null;

  @SerializedName("transformArgs")
  private ApiRangerReplicationTransformArgs transformArgs = null;

  @SerializedName("importArgs")
  private ApiRangerReplicationImportArgs importArgs = null;

  @SerializedName("auditLogDistCpArgs")
  private ApiHdfsReplicationArguments auditLogDistCpArgs = null;

  @SerializedName("auditLogDistCpCloudArgs")
  private ApiHdfsCloudReplicationArguments auditLogDistCpCloudArgs = null;

  public ApiRangerReplicationArgs sourceRangerService(ApiServiceRef sourceRangerService) {
    this.sourceRangerService = sourceRangerService;
    return this;
  }

   /**
   * Get sourceRangerService
   * @return sourceRangerService
  **/
  @Schema(description = "")
  public ApiServiceRef getSourceRangerService() {
    return sourceRangerService;
  }

  public void setSourceRangerService(ApiServiceRef sourceRangerService) {
    this.sourceRangerService = sourceRangerService;
  }

  public ApiRangerReplicationArgs exportArgs(ApiRangerReplicationExportArgs exportArgs) {
    this.exportArgs = exportArgs;
    return this;
  }

   /**
   * Get exportArgs
   * @return exportArgs
  **/
  @Schema(description = "")
  public ApiRangerReplicationExportArgs getExportArgs() {
    return exportArgs;
  }

  public void setExportArgs(ApiRangerReplicationExportArgs exportArgs) {
    this.exportArgs = exportArgs;
  }

  public ApiRangerReplicationArgs transformArgs(ApiRangerReplicationTransformArgs transformArgs) {
    this.transformArgs = transformArgs;
    return this;
  }

   /**
   * Get transformArgs
   * @return transformArgs
  **/
  @Schema(description = "")
  public ApiRangerReplicationTransformArgs getTransformArgs() {
    return transformArgs;
  }

  public void setTransformArgs(ApiRangerReplicationTransformArgs transformArgs) {
    this.transformArgs = transformArgs;
  }

  public ApiRangerReplicationArgs importArgs(ApiRangerReplicationImportArgs importArgs) {
    this.importArgs = importArgs;
    return this;
  }

   /**
   * Get importArgs
   * @return importArgs
  **/
  @Schema(description = "")
  public ApiRangerReplicationImportArgs getImportArgs() {
    return importArgs;
  }

  public void setImportArgs(ApiRangerReplicationImportArgs importArgs) {
    this.importArgs = importArgs;
  }

  public ApiRangerReplicationArgs auditLogDistCpArgs(ApiHdfsReplicationArguments auditLogDistCpArgs) {
    this.auditLogDistCpArgs = auditLogDistCpArgs;
    return this;
  }

   /**
   * Get auditLogDistCpArgs
   * @return auditLogDistCpArgs
  **/
  @Schema(description = "")
  public ApiHdfsReplicationArguments getAuditLogDistCpArgs() {
    return auditLogDistCpArgs;
  }

  public void setAuditLogDistCpArgs(ApiHdfsReplicationArguments auditLogDistCpArgs) {
    this.auditLogDistCpArgs = auditLogDistCpArgs;
  }

  public ApiRangerReplicationArgs auditLogDistCpCloudArgs(ApiHdfsCloudReplicationArguments auditLogDistCpCloudArgs) {
    this.auditLogDistCpCloudArgs = auditLogDistCpCloudArgs;
    return this;
  }

   /**
   * Get auditLogDistCpCloudArgs
   * @return auditLogDistCpCloudArgs
  **/
  @Schema(description = "")
  public ApiHdfsCloudReplicationArguments getAuditLogDistCpCloudArgs() {
    return auditLogDistCpCloudArgs;
  }

  public void setAuditLogDistCpCloudArgs(ApiHdfsCloudReplicationArguments auditLogDistCpCloudArgs) {
    this.auditLogDistCpCloudArgs = auditLogDistCpCloudArgs;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiRangerReplicationArgs apiRangerReplicationArgs = (ApiRangerReplicationArgs) o;
    return Objects.equals(this.sourceRangerService, apiRangerReplicationArgs.sourceRangerService) &&
        Objects.equals(this.exportArgs, apiRangerReplicationArgs.exportArgs) &&
        Objects.equals(this.transformArgs, apiRangerReplicationArgs.transformArgs) &&
        Objects.equals(this.importArgs, apiRangerReplicationArgs.importArgs) &&
        Objects.equals(this.auditLogDistCpArgs, apiRangerReplicationArgs.auditLogDistCpArgs) &&
        Objects.equals(this.auditLogDistCpCloudArgs, apiRangerReplicationArgs.auditLogDistCpCloudArgs);
  }

  @Override
  public int hashCode() {
    return Objects.hash(sourceRangerService, exportArgs, transformArgs, importArgs, auditLogDistCpArgs, auditLogDistCpCloudArgs);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiRangerReplicationArgs {\n");
    
    sb.append("    sourceRangerService: ").append(toIndentedString(sourceRangerService)).append("\n");
    sb.append("    exportArgs: ").append(toIndentedString(exportArgs)).append("\n");
    sb.append("    transformArgs: ").append(toIndentedString(transformArgs)).append("\n");
    sb.append("    importArgs: ").append(toIndentedString(importArgs)).append("\n");
    sb.append("    auditLogDistCpArgs: ").append(toIndentedString(auditLogDistCpArgs)).append("\n");
    sb.append("    auditLogDistCpCloudArgs: ").append(toIndentedString(auditLogDistCpCloudArgs)).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    ");
  }

}
