BaseKeyStore.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.core.config.rs.server.model;

  21. import javax.validation.constraints.*;

  22. import io.swagger.v3.oas.annotations.media.Schema;
  23. import com.fasterxml.jackson.annotation.JsonProperty;
  24. import javax.validation.Valid;

  25. public class BaseKeyStore  {
  26.  
  27.   @Schema(example = "pwd", description = "")
  28.   private String keystorePassword = null;
  29.  
  30.   @Schema(example = "pwd", description = "password della chiave privata")
  31.  /**
  32.    * password della chiave privata  
  33.   **/
  34.   private String keyPassword = null;
  35.  
  36.   @Schema(example = "pwd", description = "alias della chiave privata")
  37.  /**
  38.    * alias della chiave privata  
  39.   **/
  40.   private String keyAlias = null;
  41.  
  42.   @Schema(description = "")
  43.   private String keystoreByokPolicy = null;
  44.  /**
  45.    * Get keystorePassword
  46.    * @return keystorePassword
  47.   **/
  48.   @JsonProperty("keystore_password")
  49.   @Valid
  50.   public String getKeystorePassword() {
  51.     return this.keystorePassword;
  52.   }

  53.   public void setKeystorePassword(String keystorePassword) {
  54.     this.keystorePassword = keystorePassword;
  55.   }

  56.   public BaseKeyStore keystorePassword(String keystorePassword) {
  57.     this.keystorePassword = keystorePassword;
  58.     return this;
  59.   }

  60.  /**
  61.    * password della chiave privata
  62.    * @return keyPassword
  63.   **/
  64.   @JsonProperty("key_password")
  65.   @Valid
  66.   public String getKeyPassword() {
  67.     return this.keyPassword;
  68.   }

  69.   public void setKeyPassword(String keyPassword) {
  70.     this.keyPassword = keyPassword;
  71.   }

  72.   public BaseKeyStore keyPassword(String keyPassword) {
  73.     this.keyPassword = keyPassword;
  74.     return this;
  75.   }

  76.  /**
  77.    * alias della chiave privata
  78.    * @return keyAlias
  79.   **/
  80.   @JsonProperty("key_alias")
  81.   @Valid
  82.  @Size(max=255)  public String getKeyAlias() {
  83.     return this.keyAlias;
  84.   }

  85.   public void setKeyAlias(String keyAlias) {
  86.     this.keyAlias = keyAlias;
  87.   }

  88.   public BaseKeyStore keyAlias(String keyAlias) {
  89.     this.keyAlias = keyAlias;
  90.     return this;
  91.   }

  92.  /**
  93.    * Get keystoreByokPolicy
  94.    * @return keystoreByokPolicy
  95.   **/
  96.   @JsonProperty("keystore_byok_policy")
  97.   @Valid
  98.  @Size(max=255)  public String getKeystoreByokPolicy() {
  99.     return this.keystoreByokPolicy;
  100.   }

  101.   public void setKeystoreByokPolicy(String keystoreByokPolicy) {
  102.     this.keystoreByokPolicy = keystoreByokPolicy;
  103.   }

  104.   public BaseKeyStore keystoreByokPolicy(String keystoreByokPolicy) {
  105.     this.keystoreByokPolicy = keystoreByokPolicy;
  106.     return this;
  107.   }


  108.   @Override
  109.   public String toString() {
  110.     StringBuilder sb = new StringBuilder();
  111.     sb.append("class BaseKeyStore {\n");
  112.    
  113.     sb.append("    keystorePassword: ").append(BaseKeyStore.toIndentedString(this.keystorePassword)).append("\n");
  114.     sb.append("    keyPassword: ").append(BaseKeyStore.toIndentedString(this.keyPassword)).append("\n");
  115.     sb.append("    keyAlias: ").append(BaseKeyStore.toIndentedString(this.keyAlias)).append("\n");
  116.     sb.append("    keystoreByokPolicy: ").append(BaseKeyStore.toIndentedString(this.keystoreByokPolicy)).append("\n");
  117.     sb.append("}");
  118.     return sb.toString();
  119.   }

  120.   /**
  121.    * Convert the given object to string with each line indented by 4 spaces
  122.    * (except the first line).
  123.    */
  124.   private static String toIndentedString(java.lang.Object o) {
  125.     if (o == null) {
  126.       return "null";
  127.     }
  128.     return o.toString().replace("\n", "\n    ");
  129.   }
  130. }