ModIKeyStoreHSM.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 ModIKeyStoreHSM  implements OneOfModIKeyStoreRidefinitoDatiKeystore {
  26.  
  27.   @Schema(required = true, description = "")
  28.   private ModIKeystoreTipologiaEnum tipologia = null;
  29.  
  30.   @Schema(required = true, description = "")
  31.   private String pcks11Tipo = null;
  32.  
  33.   @Schema(example = "pwd", required = true, description = "alias della chiave privata")
  34.  /**
  35.    * alias della chiave privata  
  36.   **/
  37.   private String keyAlias = null;
  38.  /**
  39.    * Get tipologia
  40.    * @return tipologia
  41.   **/
  42.   @Override
  43. @JsonProperty("tipologia")
  44.   @NotNull
  45.   @Valid
  46.   public ModIKeystoreTipologiaEnum getTipologia() {
  47.     return this.tipologia;
  48.   }

  49.   public void setTipologia(ModIKeystoreTipologiaEnum tipologia) {
  50.     this.tipologia = tipologia;
  51.   }

  52.   public ModIKeyStoreHSM tipologia(ModIKeystoreTipologiaEnum tipologia) {
  53.     this.tipologia = tipologia;
  54.     return this;
  55.   }

  56.  /**
  57.    * Get pcks11Tipo
  58.    * @return pcks11Tipo
  59.   **/
  60.   @JsonProperty("pcks11_tipo")
  61.   @NotNull
  62.   @Valid
  63.  @Size(max=255)  public String getPcks11Tipo() {
  64.     return this.pcks11Tipo;
  65.   }

  66.   public void setPcks11Tipo(String pcks11Tipo) {
  67.     this.pcks11Tipo = pcks11Tipo;
  68.   }

  69.   public ModIKeyStoreHSM pcks11Tipo(String pcks11Tipo) {
  70.     this.pcks11Tipo = pcks11Tipo;
  71.     return this;
  72.   }

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

  83.   public void setKeyAlias(String keyAlias) {
  84.     this.keyAlias = keyAlias;
  85.   }

  86.   public ModIKeyStoreHSM keyAlias(String keyAlias) {
  87.     this.keyAlias = keyAlias;
  88.     return this;
  89.   }


  90.   @Override
  91.   public String toString() {
  92.     StringBuilder sb = new StringBuilder();
  93.     sb.append("class ModIKeyStoreHSM {\n");
  94.    
  95.     sb.append("    tipologia: ").append(ModIKeyStoreHSM.toIndentedString(this.tipologia)).append("\n");
  96.     sb.append("    pcks11Tipo: ").append(ModIKeyStoreHSM.toIndentedString(this.pcks11Tipo)).append("\n");
  97.     sb.append("    keyAlias: ").append(ModIKeyStoreHSM.toIndentedString(this.keyAlias)).append("\n");
  98.     sb.append("}");
  99.     return sb.toString();
  100.   }

  101.   /**
  102.    * Convert the given object to string with each line indented by 4 spaces
  103.    * (except the first line).
  104.    */
  105.   private static String toIndentedString(java.lang.Object o) {
  106.     if (o == null) {
  107.       return "null";
  108.     }
  109.     return o.toString().replace("\n", "\n    ");
  110.   }
  111. }