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

com.hubspot.chrome.devtools.client.core.css.StyleDeclarationEdit Maven / Gradle / Ivy

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

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

/**
 * A descriptor of operation to mutate style declaration text.
 */
public final class StyleDeclarationEdit {
  private StyleSheetId styleSheetId;

  private SourceRange range;

  private String text;

  @JsonCreator
  public StyleDeclarationEdit(@JsonProperty("styleSheetId") StyleSheetId styleSheetId,
      @JsonProperty("range") SourceRange range, @JsonProperty("text") String text) {
    this.styleSheetId = styleSheetId;
    this.range = range;
    this.text = text;
  }

  public StyleSheetId getStyleSheetId() {
    return styleSheetId;
  }

  public SourceRange getRange() {
    return range;
  }

  public String getText() {
    return text;
  }

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

  public static final class Builder {
    private StyleSheetId styleSheetId;

    private SourceRange range;

    private String text;

    private Builder() {
    }

    public StyleDeclarationEdit.Builder setStyleSheetId(StyleSheetId styleSheetId) {
      this.styleSheetId = styleSheetId;
      return this;
    }

    public StyleDeclarationEdit.Builder setRange(SourceRange range) {
      this.range = range;
      return this;
    }

    public StyleDeclarationEdit.Builder setText(String text) {
      this.text = text;
      return this;
    }

    public StyleDeclarationEdit build() {
      return new StyleDeclarationEdit(styleSheetId, range, text);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy