content: /*
   * Open Banking 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.openbanking;
  
  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.*;
  
  /** Route */
  @JsonPropertyOrder({Route.JSON_PROPERTY_LINK, Route.JSON_PROPERTY_PROVIDER})
  public class Route {
    public static final String JSON_PROPERTY_LINK = "link";
    private String link;
  
    public static final String JSON_PROPERTY_PROVIDER = "provider";
    private Provider provider;
  
    public Route() {}
  
    /**
     * The redirection link. You can use this link to redirect the user to the open banking flow when
     * the user selects it.
     *
     * @param link The redirection link. You can use this link to redirect the user to the open
     *     banking flow when the user selects it.
     * @return the current {@code Route} instance, allowing for method chaining
     */
    public Route link(String link) {
      this.link = link;
      return this;
    }
  
    /**
     * The redirection link. You can use this link to redirect the user to the open banking flow when
     * the user selects it.
     *
     * @return link The redirection link. You can use this link to redirect the user to the open
     *     banking flow when the user selects it.
     */
    @JsonProperty(JSON_PROPERTY_LINK)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getLink() {
      return link;
    }
  
    /**
     * The redirection link. You can use this link to redirect the user to the open banking flow when
     * the user selects it.
     *
     * @param link The redirection link. You can use this link to redirect the user to the open
     *     banking flow when the user selects it.
     */
    @JsonProperty(JSON_PROPERTY_LINK)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setLink(String link) {
      this.link = link;
    }
  
    /**
     * provider
     *
     * @param provider
     * @return the current {@code Route} instance, allowing for method chaining
     */
    public Route provider(Provider provider) {
      this.provider = provider;
      return this;
    }
  
    /**
     * Get provider
     *
     * @return provider
     */
    @JsonProperty(JSON_PROPERTY_PROVIDER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Provider getProvider() {
      return provider;
    }
  
    /**
     * provider
     *
     * @param provider
     */
    @JsonProperty(JSON_PROPERTY_PROVIDER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setProvider(Provider provider) {
      this.provider = provider;
    }
  
    /** Return true if this Route object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      Route route = (Route) o;
      return Objects.equals(this.link, route.link) && Objects.equals(this.provider, route.provider);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(link, provider);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class Route {\n");
      sb.append("    link: ").append(toIndentedString(link)).append("\n");
      sb.append("    provider: ").append(toIndentedString(provider)).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 Route given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of Route
     * @throws JsonProcessingException if the JSON string is invalid with respect to Route
     */
    public static Route fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, Route.class);
    }
  
    /**
     * Convert an instance of Route to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  