content: /*
   * Session authentication API
   *
   * The version of the OpenAPI document: 1
   *
   *
   * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
   * https://openapi-generator.tech
   * Do not edit the class manually.
   */
  
  package com.adyen.model.sessionauthentication;
  
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import java.util.*;
  
  /** AuthenticationSessionRequest */
  @JsonPropertyOrder({
    AuthenticationSessionRequest.JSON_PROPERTY_ALLOW_ORIGIN,
    AuthenticationSessionRequest.JSON_PROPERTY_POLICY,
    AuthenticationSessionRequest.JSON_PROPERTY_PRODUCT
  })
  public class AuthenticationSessionRequest {
    public static final String JSON_PROPERTY_ALLOW_ORIGIN = "allowOrigin";
    private String allowOrigin;
  
    public static final String JSON_PROPERTY_POLICY = "policy";
    private Policy policy;
  
    public static final String JSON_PROPERTY_PRODUCT = "product";
    private ProductType product;
  
    public AuthenticationSessionRequest() {}
  
    /**
     * The URL where the component will appear. In your live environment, you must protect the URL
     * with an SSL certificate and ensure that it starts with &#x60;https://&#x60;.
     *
     * @param allowOrigin The URL where the component will appear. In your live environment, you must
     *     protect the URL with an SSL certificate and ensure that it starts with
     *     &#x60;https://&#x60;.
     * @return the current {@code AuthenticationSessionRequest} instance, allowing for method chaining
     */
    public AuthenticationSessionRequest allowOrigin(String allowOrigin) {
      this.allowOrigin = allowOrigin;
      return this;
    }
  
    /**
     * The URL where the component will appear. In your live environment, you must protect the URL
     * with an SSL certificate and ensure that it starts with &#x60;https://&#x60;.
     *
     * @return allowOrigin The URL where the component will appear. In your live environment, you must
     *     protect the URL with an SSL certificate and ensure that it starts with
     *     &#x60;https://&#x60;.
     */
    @JsonProperty(JSON_PROPERTY_ALLOW_ORIGIN)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getAllowOrigin() {
      return allowOrigin;
    }
  
    /**
     * The URL where the component will appear. In your live environment, you must protect the URL
     * with an SSL certificate and ensure that it starts with &#x60;https://&#x60;.
     *
     * @param allowOrigin The URL where the component will appear. In your live environment, you must
     *     protect the URL with an SSL certificate and ensure that it starts with
     *     &#x60;https://&#x60;.
     */
    @JsonProperty(JSON_PROPERTY_ALLOW_ORIGIN)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAllowOrigin(String allowOrigin) {
      this.allowOrigin = allowOrigin;
    }
  
    /**
     * policy
     *
     * @param policy
     * @return the current {@code AuthenticationSessionRequest} instance, allowing for method chaining
     */
    public AuthenticationSessionRequest policy(Policy policy) {
      this.policy = policy;
      return this;
    }
  
    /**
     * Get policy
     *
     * @return policy
     */
    @JsonProperty(JSON_PROPERTY_POLICY)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Policy getPolicy() {
      return policy;
    }
  
    /**
     * policy
     *
     * @param policy
     */
    @JsonProperty(JSON_PROPERTY_POLICY)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setPolicy(Policy policy) {
      this.policy = policy;
    }
  
    /**
     * product
     *
     * @param product
     * @return the current {@code AuthenticationSessionRequest} instance, allowing for method chaining
     */
    public AuthenticationSessionRequest product(ProductType product) {
      this.product = product;
      return this;
    }
  
    /**
     * Get product
     *
     * @return product
     */
    @JsonProperty(JSON_PROPERTY_PRODUCT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public ProductType getProduct() {
      return product;
    }
  
    /**
     * product
     *
     * @param product
     */
    @JsonProperty(JSON_PROPERTY_PRODUCT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setProduct(ProductType product) {
      this.product = product;
    }
  
    /** Return true if this AuthenticationSessionRequest object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      AuthenticationSessionRequest authenticationSessionRequest = (AuthenticationSessionRequest) o;
      return Objects.equals(this.allowOrigin, authenticationSessionRequest.allowOrigin)
          && Objects.equals(this.policy, authenticationSessionRequest.policy)
          && Objects.equals(this.product, authenticationSessionRequest.product);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(allowOrigin, policy, product);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class AuthenticationSessionRequest {\n");
      sb.append("    allowOrigin: ").append(toIndentedString(allowOrigin)).append("\n");
      sb.append("    policy: ").append(toIndentedString(policy)).append("\n");
      sb.append("    product: ").append(toIndentedString(product)).append("\n");
      sb.append("}");
      return sb.toString();
    }
  
    /**
     * Convert the given object to string with each line indented by 4 spaces (except the first line).
     */
    private String toIndentedString(Object o) {
      if (o == null) {
        return "null";
      }
      return o.toString().replace("\n", "\n    ");
    }
  
    /**
     * Create an instance of AuthenticationSessionRequest given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of AuthenticationSessionRequest
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     AuthenticationSessionRequest
     */
    public static AuthenticationSessionRequest fromJson(String jsonString)
        throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, AuthenticationSessionRequest.class);
    }
  
    /**
     * Convert an instance of AuthenticationSessionRequest to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  