All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.chrome.devtools.client.core.page.NavigationEntry Maven / Gradle / Ivy

package com.hubspot.chrome.devtools.client.core.page;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Navigation history entry.
 */
public final class NavigationEntry {
  private Integer id;

  private String url;

  private String userTypedURL;

  private String title;

  private TransitionType transitionType;

  @JsonCreator
  public NavigationEntry(@JsonProperty("id") Integer id, @JsonProperty("url") String url,
      @JsonProperty("userTypedURL") String userTypedURL, @JsonProperty("title") String title,
      @JsonProperty("transitionType") TransitionType transitionType) {
    this.id = id;
    this.url = url;
    this.userTypedURL = userTypedURL;
    this.title = title;
    this.transitionType = transitionType;
  }

  public Integer getId() {
    return id;
  }

  public String getUrl() {
    return url;
  }

  public String getUserTypedURL() {
    return userTypedURL;
  }

  public String getTitle() {
    return title;
  }

  public TransitionType getTransitionType() {
    return transitionType;
  }

  public static NavigationEntry.Builder builder() {
    return new NavigationEntry.Builder();
  }

  public static final class Builder {
    private Integer id;

    private String url;

    private String userTypedURL;

    private String title;

    private TransitionType transitionType;

    private Builder() {
    }

    public NavigationEntry.Builder setId(Integer id) {
      this.id = id;
      return this;
    }

    public NavigationEntry.Builder setUrl(String url) {
      this.url = url;
      return this;
    }

    public NavigationEntry.Builder setUserTypedURL(String userTypedURL) {
      this.userTypedURL = userTypedURL;
      return this;
    }

    public NavigationEntry.Builder setTitle(String title) {
      this.title = title;
      return this;
    }

    public NavigationEntry.Builder setTransitionType(TransitionType transitionType) {
      this.transitionType = transitionType;
      return this;
    }

    public NavigationEntry build() {
      return new NavigationEntry(id, url, userTypedURL, title, transitionType);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy