FruizioneModIRestRichiestaSicurezzaMessaggio.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 java.util.ArrayList;
  22. import java.util.List;
  23. import javax.validation.constraints.*;

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

  27. public class FruizioneModIRestRichiestaSicurezzaMessaggio  {
  28.  
  29.   @Schema(description = "")
  30.   private ModISicurezzaMessaggioRestAlgoritmoFirma algoritmo = null;
  31.  
  32.   @Schema(description = "")
  33.   private List<String> headerHttpFirmare = null;
  34.  
  35.   @Schema(required = true, description = "")
  36.   private List<ModISicurezzaMessaggioRestRiferimentoX509> riferimentoX509 = new ArrayList<>();
  37.  
  38.   @Schema(description = "")
  39.   private Boolean certificateChain = null;
  40.  
  41.   @Schema(description = "")
  42.   @com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.EXISTING_PROPERTY, property = "modalita", visible = true )
  43.   @com.fasterxml.jackson.annotation.JsonSubTypes({
  44.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = ModIKeyStoreDefault.class, name = "default"),
  45.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = ModIKeyStoreRidefinito.class, name = "ridefinito")  })
  46.   private OneOfFruizioneModIRestRichiestaSicurezzaMessaggioKeystore keystore = null;
  47.  
  48.   @Schema(description = "")
  49.   private Boolean keystoreTokenPolicy = null;
  50.  
  51.   @Schema(description = "")
  52.   private Integer timeToLive = 300;
  53.  
  54.   @Schema(description = "")
  55.   private String audience = null;
  56.  
  57.   @Schema(description = "")
  58.   private FruizioneModIRichiestaInformazioneUtente informazioniUtenteCodiceEnte = null;
  59.  
  60.   @Schema(description = "")
  61.   private FruizioneModIRichiestaInformazioneUtente informazioniUtenteUserid = null;
  62.  
  63.   @Schema(description = "")
  64.   private FruizioneModIRichiestaInformazioneUtente informazioniUtenteIndirizzoIp = null;
  65.  
  66.   @Schema(description = "")
  67.   private FruizioneModIRichiestaInformazioniUtenteAudit audit = null;
  68.  
  69.   @Schema(description = "Indicare i claims richiesti (nome=valore); è possibile elencare differenti valori ammissibili separandoli con la virgola")
  70.  /**
  71.    * Indicare i claims richiesti (nome=valore); è possibile elencare differenti valori ammissibili separandoli con la virgola  
  72.   **/
  73.   private List<String> claims = null;
  74.  
  75.   @Schema(description = "")
  76.   private FruizioneModIRestRichiestaSicurezzaMessaggioContemporaneita contemporaneita = null;
  77.  /**
  78.    * Get algoritmo
  79.    * @return algoritmo
  80.   **/
  81.   @JsonProperty("algoritmo")
  82.   @Valid
  83.   public ModISicurezzaMessaggioRestAlgoritmoFirma getAlgoritmo() {
  84.     return this.algoritmo;
  85.   }

  86.   public void setAlgoritmo(ModISicurezzaMessaggioRestAlgoritmoFirma algoritmo) {
  87.     this.algoritmo = algoritmo;
  88.   }

  89.   public FruizioneModIRestRichiestaSicurezzaMessaggio algoritmo(ModISicurezzaMessaggioRestAlgoritmoFirma algoritmo) {
  90.     this.algoritmo = algoritmo;
  91.     return this;
  92.   }

  93.  /**
  94.    * Get headerHttpFirmare
  95.    * @return headerHttpFirmare
  96.   **/
  97.   @JsonProperty("header_http_firmare")
  98.   @Valid
  99.   public List<String> getHeaderHttpFirmare() {
  100.     return this.headerHttpFirmare;
  101.   }

  102.   public void setHeaderHttpFirmare(List<String> headerHttpFirmare) {
  103.     this.headerHttpFirmare = headerHttpFirmare;
  104.   }

  105.   public FruizioneModIRestRichiestaSicurezzaMessaggio headerHttpFirmare(List<String> headerHttpFirmare) {
  106.     this.headerHttpFirmare = headerHttpFirmare;
  107.     return this;
  108.   }

  109.   public FruizioneModIRestRichiestaSicurezzaMessaggio addHeaderHttpFirmareItem(String headerHttpFirmareItem) {
  110.     this.headerHttpFirmare.add(headerHttpFirmareItem);
  111.     return this;
  112.   }

  113.  /**
  114.    * Get riferimentoX509
  115.    * @return riferimentoX509
  116.   **/
  117.   @JsonProperty("riferimento_x509")
  118.   @NotNull
  119.   @Valid
  120.  @Size(min=1,max=3)  public List<ModISicurezzaMessaggioRestRiferimentoX509> getRiferimentoX509() {
  121.     return this.riferimentoX509;
  122.   }

  123.   public void setRiferimentoX509(List<ModISicurezzaMessaggioRestRiferimentoX509> riferimentoX509) {
  124.     this.riferimentoX509 = riferimentoX509;
  125.   }

  126.   public FruizioneModIRestRichiestaSicurezzaMessaggio riferimentoX509(List<ModISicurezzaMessaggioRestRiferimentoX509> riferimentoX509) {
  127.     this.riferimentoX509 = riferimentoX509;
  128.     return this;
  129.   }

  130.   public FruizioneModIRestRichiestaSicurezzaMessaggio addRiferimentoX509Item(ModISicurezzaMessaggioRestRiferimentoX509 riferimentoX509Item) {
  131.     this.riferimentoX509.add(riferimentoX509Item);
  132.     return this;
  133.   }

  134.  /**
  135.    * Get certificateChain
  136.    * @return certificateChain
  137.   **/
  138.   @JsonProperty("certificate_chain")
  139.   @Valid
  140.   public Boolean isCertificateChain() {
  141.     return this.certificateChain;
  142.   }

  143.   public void setCertificateChain(Boolean certificateChain) {
  144.     this.certificateChain = certificateChain;
  145.   }

  146.   public FruizioneModIRestRichiestaSicurezzaMessaggio certificateChain(Boolean certificateChain) {
  147.     this.certificateChain = certificateChain;
  148.     return this;
  149.   }

  150.  /**
  151.    * Get keystore
  152.    * @return keystore
  153.   **/
  154.   @JsonProperty("keystore")
  155.   @Valid
  156.   public OneOfFruizioneModIRestRichiestaSicurezzaMessaggioKeystore getKeystore() {
  157.     return this.keystore;
  158.   }

  159.   public void setKeystore(OneOfFruizioneModIRestRichiestaSicurezzaMessaggioKeystore keystore) {
  160.     this.keystore = keystore;
  161.   }

  162.   public FruizioneModIRestRichiestaSicurezzaMessaggio keystore(OneOfFruizioneModIRestRichiestaSicurezzaMessaggioKeystore keystore) {
  163.     this.keystore = keystore;
  164.     return this;
  165.   }

  166.  /**
  167.    * Get keystoreTokenPolicy
  168.    * @return keystoreTokenPolicy
  169.   **/
  170.   @JsonProperty("keystore_token_policy")
  171.   @Valid
  172.   public Boolean isKeystoreTokenPolicy() {
  173.     return this.keystoreTokenPolicy;
  174.   }

  175.   public void setKeystoreTokenPolicy(Boolean keystoreTokenPolicy) {
  176.     this.keystoreTokenPolicy = keystoreTokenPolicy;
  177.   }

  178.   public FruizioneModIRestRichiestaSicurezzaMessaggio keystoreTokenPolicy(Boolean keystoreTokenPolicy) {
  179.     this.keystoreTokenPolicy = keystoreTokenPolicy;
  180.     return this;
  181.   }

  182.  /**
  183.    * Get timeToLive
  184.    * @return timeToLive
  185.   **/
  186.   @JsonProperty("time_to_live")
  187.   @Valid
  188.   public Integer getTimeToLive() {
  189.     return this.timeToLive;
  190.   }

  191.   public void setTimeToLive(Integer timeToLive) {
  192.     this.timeToLive = timeToLive;
  193.   }

  194.   public FruizioneModIRestRichiestaSicurezzaMessaggio timeToLive(Integer timeToLive) {
  195.     this.timeToLive = timeToLive;
  196.     return this;
  197.   }

  198.  /**
  199.    * Get audience
  200.    * @return audience
  201.   **/
  202.   @JsonProperty("audience")
  203.   @Valid
  204.  @Size(max=4000)  public String getAudience() {
  205.     return this.audience;
  206.   }

  207.   public void setAudience(String audience) {
  208.     this.audience = audience;
  209.   }

  210.   public FruizioneModIRestRichiestaSicurezzaMessaggio audience(String audience) {
  211.     this.audience = audience;
  212.     return this;
  213.   }

  214.  /**
  215.    * Get informazioniUtenteCodiceEnte
  216.    * @return informazioniUtenteCodiceEnte
  217.   **/
  218.   @JsonProperty("informazioni_utente_codice_ente")
  219.   @Valid
  220.   public FruizioneModIRichiestaInformazioneUtente getInformazioniUtenteCodiceEnte() {
  221.     return this.informazioniUtenteCodiceEnte;
  222.   }

  223.   public void setInformazioniUtenteCodiceEnte(FruizioneModIRichiestaInformazioneUtente informazioniUtenteCodiceEnte) {
  224.     this.informazioniUtenteCodiceEnte = informazioniUtenteCodiceEnte;
  225.   }

  226.   public FruizioneModIRestRichiestaSicurezzaMessaggio informazioniUtenteCodiceEnte(FruizioneModIRichiestaInformazioneUtente informazioniUtenteCodiceEnte) {
  227.     this.informazioniUtenteCodiceEnte = informazioniUtenteCodiceEnte;
  228.     return this;
  229.   }

  230.  /**
  231.    * Get informazioniUtenteUserid
  232.    * @return informazioniUtenteUserid
  233.   **/
  234.   @JsonProperty("informazioni_utente_userid")
  235.   @Valid
  236.   public FruizioneModIRichiestaInformazioneUtente getInformazioniUtenteUserid() {
  237.     return this.informazioniUtenteUserid;
  238.   }

  239.   public void setInformazioniUtenteUserid(FruizioneModIRichiestaInformazioneUtente informazioniUtenteUserid) {
  240.     this.informazioniUtenteUserid = informazioniUtenteUserid;
  241.   }

  242.   public FruizioneModIRestRichiestaSicurezzaMessaggio informazioniUtenteUserid(FruizioneModIRichiestaInformazioneUtente informazioniUtenteUserid) {
  243.     this.informazioniUtenteUserid = informazioniUtenteUserid;
  244.     return this;
  245.   }

  246.  /**
  247.    * Get informazioniUtenteIndirizzoIp
  248.    * @return informazioniUtenteIndirizzoIp
  249.   **/
  250.   @JsonProperty("informazioni_utente_indirizzo_ip")
  251.   @Valid
  252.   public FruizioneModIRichiestaInformazioneUtente getInformazioniUtenteIndirizzoIp() {
  253.     return this.informazioniUtenteIndirizzoIp;
  254.   }

  255.   public void setInformazioniUtenteIndirizzoIp(FruizioneModIRichiestaInformazioneUtente informazioniUtenteIndirizzoIp) {
  256.     this.informazioniUtenteIndirizzoIp = informazioniUtenteIndirizzoIp;
  257.   }

  258.   public FruizioneModIRestRichiestaSicurezzaMessaggio informazioniUtenteIndirizzoIp(FruizioneModIRichiestaInformazioneUtente informazioniUtenteIndirizzoIp) {
  259.     this.informazioniUtenteIndirizzoIp = informazioniUtenteIndirizzoIp;
  260.     return this;
  261.   }

  262.  /**
  263.    * Get audit
  264.    * @return audit
  265.   **/
  266.   @JsonProperty("audit")
  267.   @Valid
  268.   public FruizioneModIRichiestaInformazioniUtenteAudit getAudit() {
  269.     return this.audit;
  270.   }

  271.   public void setAudit(FruizioneModIRichiestaInformazioniUtenteAudit audit) {
  272.     this.audit = audit;
  273.   }

  274.   public FruizioneModIRestRichiestaSicurezzaMessaggio audit(FruizioneModIRichiestaInformazioniUtenteAudit audit) {
  275.     this.audit = audit;
  276.     return this;
  277.   }

  278.  /**
  279.    * Indicare i claims richiesti (nome=valore); è possibile elencare differenti valori ammissibili separandoli con la virgola
  280.    * @return claims
  281.   **/
  282.   @JsonProperty("claims")
  283.   @Valid
  284.   public List<String> getClaims() {
  285.     return this.claims;
  286.   }

  287.   public void setClaims(List<String> claims) {
  288.     this.claims = claims;
  289.   }

  290.   public FruizioneModIRestRichiestaSicurezzaMessaggio claims(List<String> claims) {
  291.     this.claims = claims;
  292.     return this;
  293.   }

  294.   public FruizioneModIRestRichiestaSicurezzaMessaggio addClaimsItem(String claimsItem) {
  295.     this.claims.add(claimsItem);
  296.     return this;
  297.   }

  298.  /**
  299.    * Get contemporaneita
  300.    * @return contemporaneita
  301.   **/
  302.   @JsonProperty("contemporaneita")
  303.   @Valid
  304.   public FruizioneModIRestRichiestaSicurezzaMessaggioContemporaneita getContemporaneita() {
  305.     return this.contemporaneita;
  306.   }

  307.   public void setContemporaneita(FruizioneModIRestRichiestaSicurezzaMessaggioContemporaneita contemporaneita) {
  308.     this.contemporaneita = contemporaneita;
  309.   }

  310.   public FruizioneModIRestRichiestaSicurezzaMessaggio contemporaneita(FruizioneModIRestRichiestaSicurezzaMessaggioContemporaneita contemporaneita) {
  311.     this.contemporaneita = contemporaneita;
  312.     return this;
  313.   }


  314.   @Override
  315.   public String toString() {
  316.     StringBuilder sb = new StringBuilder();
  317.     sb.append("class FruizioneModIRestRichiestaSicurezzaMessaggio {\n");
  318.    
  319.     sb.append("    algoritmo: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.algoritmo)).append("\n");
  320.     sb.append("    headerHttpFirmare: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.headerHttpFirmare)).append("\n");
  321.     sb.append("    riferimentoX509: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.riferimentoX509)).append("\n");
  322.     sb.append("    certificateChain: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.certificateChain)).append("\n");
  323.     sb.append("    keystore: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.keystore)).append("\n");
  324.     sb.append("    keystoreTokenPolicy: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.keystoreTokenPolicy)).append("\n");
  325.     sb.append("    timeToLive: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.timeToLive)).append("\n");
  326.     sb.append("    audience: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.audience)).append("\n");
  327.     sb.append("    informazioniUtenteCodiceEnte: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.informazioniUtenteCodiceEnte)).append("\n");
  328.     sb.append("    informazioniUtenteUserid: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.informazioniUtenteUserid)).append("\n");
  329.     sb.append("    informazioniUtenteIndirizzoIp: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.informazioniUtenteIndirizzoIp)).append("\n");
  330.     sb.append("    audit: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.audit)).append("\n");
  331.     sb.append("    claims: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.claims)).append("\n");
  332.     sb.append("    contemporaneita: ").append(FruizioneModIRestRichiestaSicurezzaMessaggio.toIndentedString(this.contemporaneita)).append("\n");
  333.     sb.append("}");
  334.     return sb.toString();
  335.   }

  336.   /**
  337.    * Convert the given object to string with each line indented by 4 spaces
  338.    * (except the first line).
  339.    */
  340.   private static String toIndentedString(java.lang.Object o) {
  341.     if (o == null) {
  342.       return "null";
  343.     }
  344.     return o.toString().replace("\n", "\n    ");
  345.   }
  346. }