ControlloAccessiAutenticazioneToken.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 io.swagger.v3.oas.annotations.media.Schema;
  22. import com.fasterxml.jackson.annotation.JsonProperty;
  23. import javax.validation.Valid;

  24. public class ControlloAccessiAutenticazioneToken  {
  25.  
  26.   @Schema(description = "indica se nel token deve essere obbligatoriamente presente l'issuer")
  27.  /**
  28.    * indica se nel token deve essere obbligatoriamente presente l'issuer  
  29.   **/
  30.   private Boolean issuer = false;
  31.  
  32.   @Schema(description = "indica se nel token deve essere obbligatoriamente presente l'identificativo dell'applicazione")
  33.  /**
  34.    * indica se nel token deve essere obbligatoriamente presente l'identificativo dell'applicazione  
  35.   **/
  36.   private Boolean clientId = false;
  37.  
  38.   @Schema(description = "indica se nel token deve essere obbligatoriamente presente il subject (identificativo utente codificato)")
  39.  /**
  40.    * indica se nel token deve essere obbligatoriamente presente il subject (identificativo utente codificato)  
  41.   **/
  42.   private Boolean subject = false;
  43.  
  44.   @Schema(description = "indica se nel token deve essere obbligatoriamente presente l'utente (identificativo utente 'human-readable')")
  45.  /**
  46.    * indica se nel token deve essere obbligatoriamente presente l'utente (identificativo utente 'human-readable')  
  47.   **/
  48.   private Boolean username = false;
  49.  
  50.   @Schema(description = "indica se nel token deve essere obbligatoriamente presente l'email dell'utente")
  51.  /**
  52.    * indica se nel token deve essere obbligatoriamente presente l'email dell'utente  
  53.   **/
  54.   private Boolean email = false;
  55.  /**
  56.    * indica se nel token deve essere obbligatoriamente presente l'issuer
  57.    * @return issuer
  58.   **/
  59.   @JsonProperty("issuer")
  60.   @Valid
  61.   public Boolean isIssuer() {
  62.     return this.issuer;
  63.   }

  64.   public void setIssuer(Boolean issuer) {
  65.     this.issuer = issuer;
  66.   }

  67.   public ControlloAccessiAutenticazioneToken issuer(Boolean issuer) {
  68.     this.issuer = issuer;
  69.     return this;
  70.   }

  71.  /**
  72.    * indica se nel token deve essere obbligatoriamente presente l'identificativo dell'applicazione
  73.    * @return clientId
  74.   **/
  75.   @JsonProperty("client_id")
  76.   @Valid
  77.   public Boolean isClientId() {
  78.     return this.clientId;
  79.   }

  80.   public void setClientId(Boolean clientId) {
  81.     this.clientId = clientId;
  82.   }

  83.   public ControlloAccessiAutenticazioneToken clientId(Boolean clientId) {
  84.     this.clientId = clientId;
  85.     return this;
  86.   }

  87.  /**
  88.    * indica se nel token deve essere obbligatoriamente presente il subject (identificativo utente codificato)
  89.    * @return subject
  90.   **/
  91.   @JsonProperty("subject")
  92.   @Valid
  93.   public Boolean isSubject() {
  94.     return this.subject;
  95.   }

  96.   public void setSubject(Boolean subject) {
  97.     this.subject = subject;
  98.   }

  99.   public ControlloAccessiAutenticazioneToken subject(Boolean subject) {
  100.     this.subject = subject;
  101.     return this;
  102.   }

  103.  /**
  104.    * indica se nel token deve essere obbligatoriamente presente l'utente (identificativo utente 'human-readable')
  105.    * @return username
  106.   **/
  107.   @JsonProperty("username")
  108.   @Valid
  109.   public Boolean isUsername() {
  110.     return this.username;
  111.   }

  112.   public void setUsername(Boolean username) {
  113.     this.username = username;
  114.   }

  115.   public ControlloAccessiAutenticazioneToken username(Boolean username) {
  116.     this.username = username;
  117.     return this;
  118.   }

  119.  /**
  120.    * indica se nel token deve essere obbligatoriamente presente l'email dell'utente
  121.    * @return email
  122.   **/
  123.   @JsonProperty("email")
  124.   @Valid
  125.   public Boolean isEmail() {
  126.     return this.email;
  127.   }

  128.   public void setEmail(Boolean email) {
  129.     this.email = email;
  130.   }

  131.   public ControlloAccessiAutenticazioneToken email(Boolean email) {
  132.     this.email = email;
  133.     return this;
  134.   }


  135.   @Override
  136.   public String toString() {
  137.     StringBuilder sb = new StringBuilder();
  138.     sb.append("class ControlloAccessiAutenticazioneToken {\n");
  139.    
  140.     sb.append("    issuer: ").append(ControlloAccessiAutenticazioneToken.toIndentedString(this.issuer)).append("\n");
  141.     sb.append("    clientId: ").append(ControlloAccessiAutenticazioneToken.toIndentedString(this.clientId)).append("\n");
  142.     sb.append("    subject: ").append(ControlloAccessiAutenticazioneToken.toIndentedString(this.subject)).append("\n");
  143.     sb.append("    username: ").append(ControlloAccessiAutenticazioneToken.toIndentedString(this.username)).append("\n");
  144.     sb.append("    email: ").append(ControlloAccessiAutenticazioneToken.toIndentedString(this.email)).append("\n");
  145.     sb.append("}");
  146.     return sb.toString();
  147.   }

  148.   /**
  149.    * Convert the given object to string with each line indented by 4 spaces
  150.    * (except the first line).
  151.    */
  152.   private static String toIndentedString(java.lang.Object o) {
  153.     if (o == null) {
  154.       return "null";
  155.     }
  156.     return o.toString().replace("\n", "\n    ");
  157.   }
  158. }