content: /*
   * Copyright (c) 2020-2025 Airbyte, Inc., all rights reserved.
   */
  
  package io.airbyte.config;
  
  import com.fasterxml.jackson.annotation.JsonAnyGetter;
  import com.fasterxml.jackson.annotation.JsonAnySetter;
  import com.fasterxml.jackson.annotation.JsonIgnore;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyDescription;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import jakarta.annotation.Generated;
  import java.io.Serializable;
  import java.util.HashMap;
  import java.util.Map;
  
  /**
   * AwsRoleSecretPersistenceConfig
   * <p>
   * AWS SecretPersistenceConfig to be passed into the RuntimeSecretPersistence class.
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "roleArn",
    "awsRegion",
    "externalId",
    "tagKey",
    "kmsKeyArn"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class AwsRoleSecretPersistenceConfig implements Serializable {
  
    /**
     * AWS role ARN to assume
     *
     */
    @JsonProperty("roleArn")
    @JsonPropertyDescription("AWS role ARN to assume")
    private String roleArn;
    /**
     * AWS region
     *
     */
    @JsonProperty("awsRegion")
    @JsonPropertyDescription("AWS region")
    private String awsRegion;
    /**
     * AWS external ID
     *
     */
    @JsonProperty("externalId")
    @JsonPropertyDescription("AWS external ID")
    private String externalId;
    /**
     * Tag key to set on secret write
     *
     */
    @JsonProperty("tagKey")
    @JsonPropertyDescription("Tag key to set on secret write")
    private String tagKey;
    /**
     * KMS Key ARN to use for encryption of secrets
     *
     */
    @JsonProperty("kmsKeyArn")
    @JsonPropertyDescription("KMS Key ARN to use for encryption of secrets")
    private String kmsKeyArn;
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
    private final static long serialVersionUID = -4426189362733191986L;
  
    /**
     * AWS role ARN to assume
     *
     */
    @JsonProperty("roleArn")
    public String getRoleArn() {
      return roleArn;
    }
  
    /**
     * AWS role ARN to assume
     *
     */
    @JsonProperty("roleArn")
    public void setRoleArn(String roleArn) {
      this.roleArn = roleArn;
    }
  
    public AwsRoleSecretPersistenceConfig withRoleArn(String roleArn) {
      this.roleArn = roleArn;
      return this;
    }
  
    /**
     * AWS region
     *
     */
    @JsonProperty("awsRegion")
    public String getAwsRegion() {
      return awsRegion;
    }
  
    /**
     * AWS region
     *
     */
    @JsonProperty("awsRegion")
    public void setAwsRegion(String awsRegion) {
      this.awsRegion = awsRegion;
    }
  
    public AwsRoleSecretPersistenceConfig withAwsRegion(String awsRegion) {
      this.awsRegion = awsRegion;
      return this;
    }
  
    /**
     * AWS external ID
     *
     */
    @JsonProperty("externalId")
    public String getExternalId() {
      return externalId;
    }
  
    /**
     * AWS external ID
     *
     */
    @JsonProperty("externalId")
    public void setExternalId(String externalId) {
      this.externalId = externalId;
    }
  
    public AwsRoleSecretPersistenceConfig withExternalId(String externalId) {
      this.externalId = externalId;
      return this;
    }
  
    /**
     * Tag key to set on secret write
     *
     */
    @JsonProperty("tagKey")
    public String getTagKey() {
      return tagKey;
    }
  
    /**
     * Tag key to set on secret write
     *
     */
    @JsonProperty("tagKey")
    public void setTagKey(String tagKey) {
      this.tagKey = tagKey;
    }
  
    public AwsRoleSecretPersistenceConfig withTagKey(String tagKey) {
      this.tagKey = tagKey;
      return this;
    }
  
    /**
     * KMS Key ARN to use for encryption of secrets
     *
     */
    @JsonProperty("kmsKeyArn")
    public String getKmsKeyArn() {
      return kmsKeyArn;
    }
  
    /**
     * KMS Key ARN to use for encryption of secrets
     *
     */
    @JsonProperty("kmsKeyArn")
    public void setKmsKeyArn(String kmsKeyArn) {
      this.kmsKeyArn = kmsKeyArn;
    }
  
    public AwsRoleSecretPersistenceConfig withKmsKeyArn(String kmsKeyArn) {
      this.kmsKeyArn = kmsKeyArn;
      return this;
    }
  
    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {
      return this.additionalProperties;
    }
  
    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
    }
  
    public AwsRoleSecretPersistenceConfig withAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(AwsRoleSecretPersistenceConfig.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("roleArn");
      sb.append('=');
      sb.append(((this.roleArn == null) ? "<null>" : this.roleArn));
      sb.append(',');
      sb.append("awsRegion");
      sb.append('=');
      sb.append(((this.awsRegion == null) ? "<null>" : this.awsRegion));
      sb.append(',');
      sb.append("externalId");
      sb.append('=');
      sb.append(((this.externalId == null) ? "<null>" : this.externalId));
      sb.append(',');
      sb.append("tagKey");
      sb.append('=');
      sb.append(((this.tagKey == null) ? "<null>" : this.tagKey));
      sb.append(',');
      sb.append("kmsKeyArn");
      sb.append('=');
      sb.append(((this.kmsKeyArn == null) ? "<null>" : this.kmsKeyArn));
      sb.append(',');
      sb.append("additionalProperties");
      sb.append('=');
      sb.append(((this.additionalProperties == null) ? "<null>" : this.additionalProperties));
      sb.append(',');
      if (sb.charAt((sb.length() - 1)) == ',') {
        sb.setCharAt((sb.length() - 1), ']');
      } else {
        sb.append(']');
      }
      return sb.toString();
    }
  
    @Override
    public int hashCode() {
      int result = 1;
      result = ((result * 31) + ((this.externalId == null) ? 0 : this.externalId.hashCode()));
      result = ((result * 31) + ((this.awsRegion == null) ? 0 : this.awsRegion.hashCode()));
      result = ((result * 31) + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode()));
      result = ((result * 31) + ((this.tagKey == null) ? 0 : this.tagKey.hashCode()));
      result = ((result * 31) + ((this.roleArn == null) ? 0 : this.roleArn.hashCode()));
      result = ((result * 31) + ((this.kmsKeyArn == null) ? 0 : this.kmsKeyArn.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if ((other instanceof AwsRoleSecretPersistenceConfig) == false) {
        return false;
      }
      AwsRoleSecretPersistenceConfig rhs = ((AwsRoleSecretPersistenceConfig) other);
      return (((((((this.externalId == rhs.externalId) || ((this.externalId != null) && this.externalId.equals(rhs.externalId)))
          && ((this.awsRegion == rhs.awsRegion) || ((this.awsRegion != null) && this.awsRegion.equals(rhs.awsRegion))))
          && ((this.additionalProperties == rhs.additionalProperties)
              || ((this.additionalProperties != null) && this.additionalProperties.equals(rhs.additionalProperties))))
          && ((this.tagKey == rhs.tagKey) || ((this.tagKey != null) && this.tagKey.equals(rhs.tagKey))))
          && ((this.roleArn == rhs.roleArn) || ((this.roleArn != null) && this.roleArn.equals(rhs.roleArn))))
          && ((this.kmsKeyArn == rhs.kmsKeyArn) || ((this.kmsKeyArn != null) && this.kmsKeyArn.equals(rhs.kmsKeyArn))));
    }
  
  }
  