package com.airlock.iam.techclientreg.infrastructure.transfer.response;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonProperty;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import java.net.URI;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;

@Schema(ref = "#/components/schemas/OAuth2ClientRegistrationDataOverride")
public class OAuth2ClientRegistrationData {
   @JsonProperty("tech_client_id")
   private String techClientId;
   @NotNull
   @JsonProperty("client_id")
   private String clientId;
   @JsonProperty("client_secret")
   private String clientSecret;
   @JsonProperty("client_secret_expires_at")
   private Long clientSecretExpiresAt;
   @JsonProperty("client_id_issued_at")
   @Schema(description = "Time at which the client id was issued. Defined as seconds since epoch.")
   private Long clientIdIssuedAt;
   @JsonProperty("redirect_uris")
   private List<String> redirectUris;
   @JsonProperty("token_endpoint_auth_method")
   @Schema(description = "Authentication method for the token endpoint.")
   private String tokenEndpointAuthMethod;
   @ArraySchema(arraySchema = @Schema(description = "OAuth 2.0 grant type strings to be used at the token endpoint."))
   @JsonProperty("grant_types")
   private List<String> grantTypes;
   @ArraySchema(arraySchema = @Schema(description = "OAuth 2.0 response type strings to be used at the authorization endpoint."))
   @JsonProperty("response_types")
   private List<String> responseTypes;
   @JsonProperty("client_name")
   private String clientName;
   @JsonProperty("client_uri")
   private String clientUri;
   @JsonProperty("logo_uri")
   private String logoUri;
   private String scope;
   private List<String> contacts;
   @JsonProperty("tos_uri")
   private String tosUri;
   @JsonProperty("policy_uri")
   private String policyUri;
   @JsonProperty("jwks_uri")
   private String jwksUri;
   private JwkSetData jwks;
   @JsonProperty("software_id")
   private String softwareId;
   @JsonProperty("software_version")
   private String softwareVersion;
   private Map<String, String> translations = new HashMap<>();

   @JsonAnyGetter
   public Map<String, String> getTranslations() {
      return this.translations;
   }

   public void addClientNameTranslation(Locale locale, String value) {
      this.translations.put("client_name#" + locale.toLanguageTag(), value);
   }

   public void addclientUriTranslation(Locale locale, URI value) {
      this.translations.put("client_uri#" + locale.toLanguageTag(), value.toString());
   }

   public void addtosUriTranslation(Locale locale, URI value) {
      this.translations.put("tos_uri#" + locale.toLanguageTag(), value.toString());
   }

   public void addPolicyUriTranslation(Locale locale, URI value) {
      this.translations.put("policy_uri#" + locale.toLanguageTag(), value.toString());
   }

   public void addLogoUriTranslation(Locale locale, URI value) {
      this.translations.put("logo_uri#" + locale.toLanguageTag(), value.toString());
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getTechClientId() {
      return this.techClientId;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getClientId() {
      return this.clientId;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getClientSecret() {
      return this.clientSecret;
   }

   @SuppressFBWarnings(justification = "generated code")
   public Long getClientSecretExpiresAt() {
      return this.clientSecretExpiresAt;
   }

   @SuppressFBWarnings(justification = "generated code")
   public Long getClientIdIssuedAt() {
      return this.clientIdIssuedAt;
   }

   @SuppressFBWarnings(justification = "generated code")
   public List<String> getRedirectUris() {
      return this.redirectUris;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getTokenEndpointAuthMethod() {
      return this.tokenEndpointAuthMethod;
   }

   @SuppressFBWarnings(justification = "generated code")
   public List<String> getGrantTypes() {
      return this.grantTypes;
   }

   @SuppressFBWarnings(justification = "generated code")
   public List<String> getResponseTypes() {
      return this.responseTypes;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getClientName() {
      return this.clientName;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getClientUri() {
      return this.clientUri;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getLogoUri() {
      return this.logoUri;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getScope() {
      return this.scope;
   }

   @SuppressFBWarnings(justification = "generated code")
   public List<String> getContacts() {
      return this.contacts;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getTosUri() {
      return this.tosUri;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getPolicyUri() {
      return this.policyUri;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getJwksUri() {
      return this.jwksUri;
   }

   @SuppressFBWarnings(justification = "generated code")
   public JwkSetData getJwks() {
      return this.jwks;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getSoftwareId() {
      return this.softwareId;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String getSoftwareVersion() {
      return this.softwareVersion;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setTechClientId(String techClientId) {
      this.techClientId = techClientId;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setClientId(String clientId) {
      this.clientId = clientId;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setClientSecret(String clientSecret) {
      this.clientSecret = clientSecret;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setClientSecretExpiresAt(Long clientSecretExpiresAt) {
      this.clientSecretExpiresAt = clientSecretExpiresAt;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setClientIdIssuedAt(Long clientIdIssuedAt) {
      this.clientIdIssuedAt = clientIdIssuedAt;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setRedirectUris(List<String> redirectUris) {
      this.redirectUris = redirectUris;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setTokenEndpointAuthMethod(String tokenEndpointAuthMethod) {
      this.tokenEndpointAuthMethod = tokenEndpointAuthMethod;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setGrantTypes(List<String> grantTypes) {
      this.grantTypes = grantTypes;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setResponseTypes(List<String> responseTypes) {
      this.responseTypes = responseTypes;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setClientName(String clientName) {
      this.clientName = clientName;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setClientUri(String clientUri) {
      this.clientUri = clientUri;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setLogoUri(String logoUri) {
      this.logoUri = logoUri;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setScope(String scope) {
      this.scope = scope;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setContacts(List<String> contacts) {
      this.contacts = contacts;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setTosUri(String tosUri) {
      this.tosUri = tosUri;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setPolicyUri(String policyUri) {
      this.policyUri = policyUri;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setJwksUri(String jwksUri) {
      this.jwksUri = jwksUri;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setJwks(JwkSetData jwks) {
      this.jwks = jwks;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setSoftwareId(String softwareId) {
      this.softwareId = softwareId;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setSoftwareVersion(String softwareVersion) {
      this.softwareVersion = softwareVersion;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setTranslations(Map<String, String> translations) {
      this.translations = translations;
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof OAuth2ClientRegistrationData other)) {
         return false;
      } else {
         if (!other.canEqual(this)) {
            return false;
         }

         Object this$clientSecretExpiresAt = this.clientSecretExpiresAt;
         Object other$clientSecretExpiresAt = other.clientSecretExpiresAt;
         if (this$clientSecretExpiresAt == null ? other$clientSecretExpiresAt == null : this$clientSecretExpiresAt.equals(other$clientSecretExpiresAt)) {
            Object this$clientIdIssuedAt = this.clientIdIssuedAt;
            Object other$clientIdIssuedAt = other.clientIdIssuedAt;
            if (this$clientIdIssuedAt == null ? other$clientIdIssuedAt == null : this$clientIdIssuedAt.equals(other$clientIdIssuedAt)) {
               Object this$techClientId = this.techClientId;
               Object other$techClientId = other.techClientId;
               if (this$techClientId == null ? other$techClientId == null : this$techClientId.equals(other$techClientId)) {
                  Object this$clientId = this.clientId;
                  Object other$clientId = other.clientId;
                  if (this$clientId == null ? other$clientId == null : this$clientId.equals(other$clientId)) {
                     Object this$clientSecret = this.clientSecret;
                     Object other$clientSecret = other.clientSecret;
                     if (this$clientSecret == null ? other$clientSecret == null : this$clientSecret.equals(other$clientSecret)) {
                        Object this$redirectUris = this.redirectUris;
                        Object other$redirectUris = other.redirectUris;
                        if (this$redirectUris == null ? other$redirectUris == null : this$redirectUris.equals(other$redirectUris)) {
                           Object this$tokenEndpointAuthMethod = this.tokenEndpointAuthMethod;
                           Object other$tokenEndpointAuthMethod = other.tokenEndpointAuthMethod;
                           if (this$tokenEndpointAuthMethod == null
                              ? other$tokenEndpointAuthMethod == null
                              : this$tokenEndpointAuthMethod.equals(other$tokenEndpointAuthMethod)) {
                              Object this$grantTypes = this.grantTypes;
                              Object other$grantTypes = other.grantTypes;
                              if (this$grantTypes == null ? other$grantTypes == null : this$grantTypes.equals(other$grantTypes)) {
                                 Object this$responseTypes = this.responseTypes;
                                 Object other$responseTypes = other.responseTypes;
                                 if (this$responseTypes == null ? other$responseTypes == null : this$responseTypes.equals(other$responseTypes)) {
                                    Object this$clientName = this.clientName;
                                    Object other$clientName = other.clientName;
                                    if (this$clientName == null ? other$clientName == null : this$clientName.equals(other$clientName)) {
                                       Object this$clientUri = this.clientUri;
                                       Object other$clientUri = other.clientUri;
                                       if (this$clientUri == null ? other$clientUri == null : this$clientUri.equals(other$clientUri)) {
                                          Object this$logoUri = this.logoUri;
                                          Object other$logoUri = other.logoUri;
                                          if (this$logoUri == null ? other$logoUri == null : this$logoUri.equals(other$logoUri)) {
                                             Object this$scope = this.scope;
                                             Object other$scope = other.scope;
                                             if (this$scope == null ? other$scope == null : this$scope.equals(other$scope)) {
                                                Object this$contacts = this.contacts;
                                                Object other$contacts = other.contacts;
                                                if (this$contacts == null ? other$contacts == null : this$contacts.equals(other$contacts)) {
                                                   Object this$tosUri = this.tosUri;
                                                   Object other$tosUri = other.tosUri;
                                                   if (this$tosUri == null ? other$tosUri == null : this$tosUri.equals(other$tosUri)) {
                                                      Object this$policyUri = this.policyUri;
                                                      Object other$policyUri = other.policyUri;
                                                      if (this$policyUri == null ? other$policyUri == null : this$policyUri.equals(other$policyUri)) {
                                                         Object this$jwksUri = this.jwksUri;
                                                         Object other$jwksUri = other.jwksUri;
                                                         if (this$jwksUri == null ? other$jwksUri == null : this$jwksUri.equals(other$jwksUri)) {
                                                            Object this$jwks = this.jwks;
                                                            Object other$jwks = other.jwks;
                                                            if (this$jwks == null ? other$jwks == null : this$jwks.equals(other$jwks)) {
                                                               Object this$softwareId = this.softwareId;
                                                               Object other$softwareId = other.softwareId;
                                                               if (this$softwareId == null
                                                                  ? other$softwareId == null
                                                                  : this$softwareId.equals(other$softwareId)) {
                                                                  Object this$softwareVersion = this.softwareVersion;
                                                                  Object other$softwareVersion = other.softwareVersion;
                                                                  if (this$softwareVersion == null
                                                                     ? other$softwareVersion == null
                                                                     : this$softwareVersion.equals(other$softwareVersion)) {
                                                                     Object this$translations = this.translations;
                                                                     Object other$translations = other.translations;
                                                                     return this$translations == null
                                                                        ? other$translations == null
                                                                        : this$translations.equals(other$translations);
                                                                  } else {
                                                                     return false;
                                                                  }
                                                               } else {
                                                                  return false;
                                                               }
                                                            } else {
                                                               return false;
                                                            }
                                                         } else {
                                                            return false;
                                                         }
                                                      } else {
                                                         return false;
                                                      }
                                                   } else {
                                                      return false;
                                                   }
                                                } else {
                                                   return false;
                                                }
                                             } else {
                                                return false;
                                             }
                                          } else {
                                             return false;
                                          }
                                       } else {
                                          return false;
                                       }
                                    } else {
                                       return false;
                                    }
                                 } else {
                                    return false;
                                 }
                              } else {
                                 return false;
                              }
                           } else {
                              return false;
                           }
                        } else {
                           return false;
                        }
                     } else {
                        return false;
                     }
                  } else {
                     return false;
                  }
               } else {
                  return false;
               }
            } else {
               return false;
            }
         } else {
            return false;
         }
      }
   }

   @SuppressFBWarnings(justification = "generated code")
   protected boolean canEqual(Object other) {
      return other instanceof OAuth2ClientRegistrationData;
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      Object $clientSecretExpiresAt = this.clientSecretExpiresAt;
      result = result * 59 + ($clientSecretExpiresAt == null ? 43 : $clientSecretExpiresAt.hashCode());
      Object $clientIdIssuedAt = this.clientIdIssuedAt;
      result = result * 59 + ($clientIdIssuedAt == null ? 43 : $clientIdIssuedAt.hashCode());
      Object $techClientId = this.techClientId;
      result = result * 59 + ($techClientId == null ? 43 : $techClientId.hashCode());
      Object $clientId = this.clientId;
      result = result * 59 + ($clientId == null ? 43 : $clientId.hashCode());
      Object $clientSecret = this.clientSecret;
      result = result * 59 + ($clientSecret == null ? 43 : $clientSecret.hashCode());
      Object $redirectUris = this.redirectUris;
      result = result * 59 + ($redirectUris == null ? 43 : $redirectUris.hashCode());
      Object $tokenEndpointAuthMethod = this.tokenEndpointAuthMethod;
      result = result * 59 + ($tokenEndpointAuthMethod == null ? 43 : $tokenEndpointAuthMethod.hashCode());
      Object $grantTypes = this.grantTypes;
      result = result * 59 + ($grantTypes == null ? 43 : $grantTypes.hashCode());
      Object $responseTypes = this.responseTypes;
      result = result * 59 + ($responseTypes == null ? 43 : $responseTypes.hashCode());
      Object $clientName = this.clientName;
      result = result * 59 + ($clientName == null ? 43 : $clientName.hashCode());
      Object $clientUri = this.clientUri;
      result = result * 59 + ($clientUri == null ? 43 : $clientUri.hashCode());
      Object $logoUri = this.logoUri;
      result = result * 59 + ($logoUri == null ? 43 : $logoUri.hashCode());
      Object $scope = this.scope;
      result = result * 59 + ($scope == null ? 43 : $scope.hashCode());
      Object $contacts = this.contacts;
      result = result * 59 + ($contacts == null ? 43 : $contacts.hashCode());
      Object $tosUri = this.tosUri;
      result = result * 59 + ($tosUri == null ? 43 : $tosUri.hashCode());
      Object $policyUri = this.policyUri;
      result = result * 59 + ($policyUri == null ? 43 : $policyUri.hashCode());
      Object $jwksUri = this.jwksUri;
      result = result * 59 + ($jwksUri == null ? 43 : $jwksUri.hashCode());
      Object $jwks = this.jwks;
      result = result * 59 + ($jwks == null ? 43 : $jwks.hashCode());
      Object $softwareId = this.softwareId;
      result = result * 59 + ($softwareId == null ? 43 : $softwareId.hashCode());
      Object $softwareVersion = this.softwareVersion;
      result = result * 59 + ($softwareVersion == null ? 43 : $softwareVersion.hashCode());
      Object $translations = this.translations;
      return result * 59 + ($translations == null ? 43 : $translations.hashCode());
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "OAuth2ClientRegistrationData(techClientId="
         + this.getTechClientId()
         + ", clientId="
         + this.getClientId()
         + ", clientSecret="
         + this.getClientSecret()
         + ", clientSecretExpiresAt="
         + this.getClientSecretExpiresAt()
         + ", clientIdIssuedAt="
         + this.getClientIdIssuedAt()
         + ", redirectUris="
         + this.getRedirectUris()
         + ", tokenEndpointAuthMethod="
         + this.getTokenEndpointAuthMethod()
         + ", grantTypes="
         + this.getGrantTypes()
         + ", responseTypes="
         + this.getResponseTypes()
         + ", clientName="
         + this.getClientName()
         + ", clientUri="
         + this.getClientUri()
         + ", logoUri="
         + this.getLogoUri()
         + ", scope="
         + this.getScope()
         + ", contacts="
         + this.getContacts()
         + ", tosUri="
         + this.getTosUri()
         + ", policyUri="
         + this.getPolicyUri()
         + ", jwksUri="
         + this.getJwksUri()
         + ", jwks="
         + this.getJwks()
         + ", softwareId="
         + this.getSoftwareId()
         + ", softwareVersion="
         + this.getSoftwareVersion()
         + ", translations="
         + this.getTranslations()
         + ")";
   }

   @SuppressFBWarnings(justification = "generated code")
   public OAuth2ClientRegistrationData() {
   }

   @SuppressFBWarnings(justification = "generated code")
   public OAuth2ClientRegistrationData(
      String techClientId,
      String clientId,
      String clientSecret,
      Long clientSecretExpiresAt,
      Long clientIdIssuedAt,
      List<String> redirectUris,
      String tokenEndpointAuthMethod,
      List<String> grantTypes,
      List<String> responseTypes,
      String clientName,
      String clientUri,
      String logoUri,
      String scope,
      List<String> contacts,
      String tosUri,
      String policyUri,
      String jwksUri,
      JwkSetData jwks,
      String softwareId,
      String softwareVersion,
      Map<String, String> translations
   ) {
      this.techClientId = techClientId;
      this.clientId = clientId;
      this.clientSecret = clientSecret;
      this.clientSecretExpiresAt = clientSecretExpiresAt;
      this.clientIdIssuedAt = clientIdIssuedAt;
      this.redirectUris = redirectUris;
      this.tokenEndpointAuthMethod = tokenEndpointAuthMethod;
      this.grantTypes = grantTypes;
      this.responseTypes = responseTypes;
      this.clientName = clientName;
      this.clientUri = clientUri;
      this.logoUri = logoUri;
      this.scope = scope;
      this.contacts = contacts;
      this.tosUri = tosUri;
      this.policyUri = policyUri;
      this.jwksUri = jwksUri;
      this.jwks = jwks;
      this.softwareId = softwareId;
      this.softwareVersion = softwareVersion;
      this.translations = translations;
   }
}
