ConnettoreConfigurazioneHttps.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 ConnettoreConfigurazioneHttps  {
  26.  
  27.   @Schema(required = true, description = "")
  28.   private SslTipologiaEnum tipologia = null;
  29.  
  30.   @Schema(example = "false", description = "")
  31.   private Boolean hostnameVerifier = true;
  32.  
  33.   @Schema(example = "false", description = "")
  34.   private Boolean trustAllServerCerts = false;
  35.  
  36.   @Schema(description = "")
  37.   private ConnettoreConfigurazioneHttpsServer server = null;
  38.  
  39.   @Schema(description = "")
  40.   private ConnettoreConfigurazioneHttpsClient client = null;
  41.  /**
  42.    * Get tipologia
  43.    * @return tipologia
  44.   **/
  45.   @JsonProperty("tipologia")
  46.   @NotNull
  47.   @Valid
  48.   public SslTipologiaEnum getTipologia() {
  49.     return this.tipologia;
  50.   }

  51.   public void setTipologia(SslTipologiaEnum tipologia) {
  52.     this.tipologia = tipologia;
  53.   }

  54.   public ConnettoreConfigurazioneHttps tipologia(SslTipologiaEnum tipologia) {
  55.     this.tipologia = tipologia;
  56.     return this;
  57.   }

  58.  /**
  59.    * Get hostnameVerifier
  60.    * @return hostnameVerifier
  61.   **/
  62.   @JsonProperty("hostname_verifier")
  63.   @Valid
  64.   public Boolean isHostnameVerifier() {
  65.     return this.hostnameVerifier;
  66.   }

  67.   public void setHostnameVerifier(Boolean hostnameVerifier) {
  68.     this.hostnameVerifier = hostnameVerifier;
  69.   }

  70.   public ConnettoreConfigurazioneHttps hostnameVerifier(Boolean hostnameVerifier) {
  71.     this.hostnameVerifier = hostnameVerifier;
  72.     return this;
  73.   }

  74.  /**
  75.    * Get trustAllServerCerts
  76.    * @return trustAllServerCerts
  77.   **/
  78.   @JsonProperty("trust_all_server_certs")
  79.   @Valid
  80.   public Boolean isTrustAllServerCerts() {
  81.     return this.trustAllServerCerts;
  82.   }

  83.   public void setTrustAllServerCerts(Boolean trustAllServerCerts) {
  84.     this.trustAllServerCerts = trustAllServerCerts;
  85.   }

  86.   public ConnettoreConfigurazioneHttps trustAllServerCerts(Boolean trustAllServerCerts) {
  87.     this.trustAllServerCerts = trustAllServerCerts;
  88.     return this;
  89.   }

  90.  /**
  91.    * Get server
  92.    * @return server
  93.   **/
  94.   @JsonProperty("server")
  95.   @Valid
  96.   public ConnettoreConfigurazioneHttpsServer getServer() {
  97.     return this.server;
  98.   }

  99.   public void setServer(ConnettoreConfigurazioneHttpsServer server) {
  100.     this.server = server;
  101.   }

  102.   public ConnettoreConfigurazioneHttps server(ConnettoreConfigurazioneHttpsServer server) {
  103.     this.server = server;
  104.     return this;
  105.   }

  106.  /**
  107.    * Get client
  108.    * @return client
  109.   **/
  110.   @JsonProperty("client")
  111.   @Valid
  112.   public ConnettoreConfigurazioneHttpsClient getClient() {
  113.     return this.client;
  114.   }

  115.   public void setClient(ConnettoreConfigurazioneHttpsClient client) {
  116.     this.client = client;
  117.   }

  118.   public ConnettoreConfigurazioneHttps client(ConnettoreConfigurazioneHttpsClient client) {
  119.     this.client = client;
  120.     return this;
  121.   }


  122.   @Override
  123.   public String toString() {
  124.     StringBuilder sb = new StringBuilder();
  125.     sb.append("class ConnettoreConfigurazioneHttps {\n");
  126.    
  127.     sb.append("    tipologia: ").append(ConnettoreConfigurazioneHttps.toIndentedString(this.tipologia)).append("\n");
  128.     sb.append("    hostnameVerifier: ").append(ConnettoreConfigurazioneHttps.toIndentedString(this.hostnameVerifier)).append("\n");
  129.     sb.append("    trustAllServerCerts: ").append(ConnettoreConfigurazioneHttps.toIndentedString(this.trustAllServerCerts)).append("\n");
  130.     sb.append("    server: ").append(ConnettoreConfigurazioneHttps.toIndentedString(this.server)).append("\n");
  131.     sb.append("    client: ").append(ConnettoreConfigurazioneHttps.toIndentedString(this.client)).append("\n");
  132.     sb.append("}");
  133.     return sb.toString();
  134.   }

  135.   /**
  136.    * Convert the given object to string with each line indented by 4 spaces
  137.    * (except the first line).
  138.    */
  139.   private static String toIndentedString(java.lang.Object o) {
  140.     if (o == null) {
  141.       return "null";
  142.     }
  143.     return o.toString().replace("\n", "\n    ");
  144.   }
  145. }