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.JsonCreator;
  import com.fasterxml.jackson.annotation.JsonIgnore;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.annotation.JsonValue;
  import jakarta.annotation.Generated;
  import java.io.Serializable;
  import java.util.HashMap;
  import java.util.Map;
  
  /**
   * GoogleSecretPersistenceConfig
   * <p>
   * Google SecretPersistenceConfig to be passed into the RuntimeSecretPersistence class.
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "auth_type",
    "data"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class GoogleSecretPersistenceConfig implements Serializable {
  
    @JsonProperty("auth_type")
    private GoogleSecretPersistenceConfig.AuthType authType;
    @JsonProperty("data")
    private Object data;
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
    private final static long serialVersionUID = -2737663771235704634L;
  
    @JsonProperty("auth_type")
    public GoogleSecretPersistenceConfig.AuthType getAuthType() {
      return authType;
    }
  
    @JsonProperty("auth_type")
    public void setAuthType(GoogleSecretPersistenceConfig.AuthType authType) {
      this.authType = authType;
    }
  
    public GoogleSecretPersistenceConfig withAuthType(GoogleSecretPersistenceConfig.AuthType authType) {
      this.authType = authType;
      return this;
    }
  
    @JsonProperty("data")
    public Object getData() {
      return data;
    }
  
    @JsonProperty("data")
    public void setData(Object data) {
      this.data = data;
    }
  
    public GoogleSecretPersistenceConfig withData(Object data) {
      this.data = data;
      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 GoogleSecretPersistenceConfig withAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(GoogleSecretPersistenceConfig.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("authType");
      sb.append('=');
      sb.append(((this.authType == null) ? "<null>" : this.authType));
      sb.append(',');
      sb.append("data");
      sb.append('=');
      sb.append(((this.data == null) ? "<null>" : this.data));
      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.authType == null) ? 0 : this.authType.hashCode()));
      result = ((result * 31) + ((this.data == null) ? 0 : this.data.hashCode()));
      result = ((result * 31) + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if ((other instanceof GoogleSecretPersistenceConfig) == false) {
        return false;
      }
      GoogleSecretPersistenceConfig rhs = ((GoogleSecretPersistenceConfig) other);
      return ((((this.authType == rhs.authType) || ((this.authType != null) && this.authType.equals(rhs.authType)))
          && ((this.data == rhs.data) || ((this.data != null) && this.data.equals(rhs.data))))
          && ((this.additionalProperties == rhs.additionalProperties)
              || ((this.additionalProperties != null) && this.additionalProperties.equals(rhs.additionalProperties))));
    }
  
    public enum AuthType {
  
      SECRET_MANAGER("SECRET_MANAGER");
  
      private final String value;
      private final static Map<String, GoogleSecretPersistenceConfig.AuthType> CONSTANTS =
          new HashMap<String, GoogleSecretPersistenceConfig.AuthType>();
  
      static {
        for (GoogleSecretPersistenceConfig.AuthType c : values()) {
          CONSTANTS.put(c.value, c);
        }
      }
  
      private AuthType(String value) {
        this.value = value;
      }
  
      @Override
      public String toString() {
        return this.value;
      }
  
      @JsonValue
      public String value() {
        return this.value;
      }
  
      @JsonCreator
      public static GoogleSecretPersistenceConfig.AuthType fromValue(String value) {
        GoogleSecretPersistenceConfig.AuthType constant = CONSTANTS.get(value);
        if (constant == null) {
          throw new IllegalArgumentException(value);
        } else {
          return constant;
        }
      }
  
    }
  
  }
  