BaseTrustStore.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 BaseTrustStore  {
  26.  
  27.   @Schema(example = "/path/to/truststore", required = true, description = "")
  28.   private String truststorePath = null;
  29.  
  30.   @Schema(example = "pwd", description = "")
  31.   private String truststorePassword = null;
  32.  
  33.   @Schema(description = "")
  34.   private String truststoreCrl = null;
  35.  
  36.   @Schema(description = "")
  37.   private String truststoreOcspPolicy = null;
  38.  /**
  39.    * Get truststorePath
  40.    * @return truststorePath
  41.   **/
  42.   @JsonProperty("truststore_path")
  43.   @NotNull
  44.   @Valid
  45.  @Size(max=4000)  public String getTruststorePath() {
  46.     return this.truststorePath;
  47.   }

  48.   public void setTruststorePath(String truststorePath) {
  49.     this.truststorePath = truststorePath;
  50.   }

  51.   public BaseTrustStore truststorePath(String truststorePath) {
  52.     this.truststorePath = truststorePath;
  53.     return this;
  54.   }

  55.  /**
  56.    * Get truststorePassword
  57.    * @return truststorePassword
  58.   **/
  59.   @JsonProperty("truststore_password")
  60.   @Valid
  61.   public String getTruststorePassword() {
  62.     return this.truststorePassword;
  63.   }

  64.   public void setTruststorePassword(String truststorePassword) {
  65.     this.truststorePassword = truststorePassword;
  66.   }

  67.   public BaseTrustStore truststorePassword(String truststorePassword) {
  68.     this.truststorePassword = truststorePassword;
  69.     return this;
  70.   }

  71.  /**
  72.    * Get truststoreCrl
  73.    * @return truststoreCrl
  74.   **/
  75.   @JsonProperty("truststore_crl")
  76.   @Valid
  77.  @Size(max=4000)  public String getTruststoreCrl() {
  78.     return this.truststoreCrl;
  79.   }

  80.   public void setTruststoreCrl(String truststoreCrl) {
  81.     this.truststoreCrl = truststoreCrl;
  82.   }

  83.   public BaseTrustStore truststoreCrl(String truststoreCrl) {
  84.     this.truststoreCrl = truststoreCrl;
  85.     return this;
  86.   }

  87.  /**
  88.    * Get truststoreOcspPolicy
  89.    * @return truststoreOcspPolicy
  90.   **/
  91.   @JsonProperty("truststore_ocsp_policy")
  92.   @Valid
  93.  @Size(max=255)  public String getTruststoreOcspPolicy() {
  94.     return this.truststoreOcspPolicy;
  95.   }

  96.   public void setTruststoreOcspPolicy(String truststoreOcspPolicy) {
  97.     this.truststoreOcspPolicy = truststoreOcspPolicy;
  98.   }

  99.   public BaseTrustStore truststoreOcspPolicy(String truststoreOcspPolicy) {
  100.     this.truststoreOcspPolicy = truststoreOcspPolicy;
  101.     return this;
  102.   }


  103.   @Override
  104.   public String toString() {
  105.     StringBuilder sb = new StringBuilder();
  106.     sb.append("class BaseTrustStore {\n");
  107.    
  108.     sb.append("    truststorePath: ").append(BaseTrustStore.toIndentedString(this.truststorePath)).append("\n");
  109.     sb.append("    truststorePassword: ").append(BaseTrustStore.toIndentedString(this.truststorePassword)).append("\n");
  110.     sb.append("    truststoreCrl: ").append(BaseTrustStore.toIndentedString(this.truststoreCrl)).append("\n");
  111.     sb.append("    truststoreOcspPolicy: ").append(BaseTrustStore.toIndentedString(this.truststoreOcspPolicy)).append("\n");
  112.     sb.append("}");
  113.     return sb.toString();
  114.   }

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