APIImplAutenticazioneApiKeyConfig.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 APIImplAutenticazioneApiKeyConfig  {
  25.  
  26.   @Schema(example = "custom_key", description = "")
  27.   private String queryParameter = null;
  28.  
  29.   @Schema(example = "X-Custom-Key", description = "")
  30.   private String header = null;
  31.  
  32.   @Schema(example = "X-Custom-Key", description = "")
  33.   private String cookie = null;
  34.  /**
  35.    * Get queryParameter
  36.    * @return queryParameter
  37.   **/
  38.   @JsonProperty("query_parameter")
  39.   @Valid
  40.   public String getQueryParameter() {
  41.     return this.queryParameter;
  42.   }

  43.   public void setQueryParameter(String queryParameter) {
  44.     this.queryParameter = queryParameter;
  45.   }

  46.   public APIImplAutenticazioneApiKeyConfig queryParameter(String queryParameter) {
  47.     this.queryParameter = queryParameter;
  48.     return this;
  49.   }

  50.  /**
  51.    * Get header
  52.    * @return header
  53.   **/
  54.   @JsonProperty("header")
  55.   @Valid
  56.   public String getHeader() {
  57.     return this.header;
  58.   }

  59.   public void setHeader(String header) {
  60.     this.header = header;
  61.   }

  62.   public APIImplAutenticazioneApiKeyConfig header(String header) {
  63.     this.header = header;
  64.     return this;
  65.   }

  66.  /**
  67.    * Get cookie
  68.    * @return cookie
  69.   **/
  70.   @JsonProperty("cookie")
  71.   @Valid
  72.   public String getCookie() {
  73.     return this.cookie;
  74.   }

  75.   public void setCookie(String cookie) {
  76.     this.cookie = cookie;
  77.   }

  78.   public APIImplAutenticazioneApiKeyConfig cookie(String cookie) {
  79.     this.cookie = cookie;
  80.     return this;
  81.   }


  82.   @Override
  83.   public String toString() {
  84.     StringBuilder sb = new StringBuilder();
  85.     sb.append("class APIImplAutenticazioneApiKeyConfig {\n");
  86.    
  87.     sb.append("    queryParameter: ").append(APIImplAutenticazioneApiKeyConfig.toIndentedString(this.queryParameter)).append("\n");
  88.     sb.append("    header: ").append(APIImplAutenticazioneApiKeyConfig.toIndentedString(this.header)).append("\n");
  89.     sb.append("    cookie: ").append(APIImplAutenticazioneApiKeyConfig.toIndentedString(this.cookie)).append("\n");
  90.     sb.append("}");
  91.     return sb.toString();
  92.   }

  93.   /**
  94.    * Convert the given object to string with each line indented by 4 spaces
  95.    * (except the first line).
  96.    */
  97.   private static String toIndentedString(java.lang.Object o) {
  98.     if (o == null) {
  99.       return "null";
  100.     }
  101.     return o.toString().replace("\n", "\n    ");
  102.   }
  103. }