/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.sheets.v4.model;

/**
 * The format of a run of text in a cell. Absent values indicate that the field isn't specified.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Google Sheets API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class TextFormat extends com.google.api.client.json.GenericJson {

  /**
   * True if the text is bold.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean bold;

  /**
   * The font family.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String fontFamily;

  /**
   * The size of the font.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer fontSize;

  /**
   * The foreground color of the text.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Color foregroundColor;

  /**
   * The foreground color of the text. If foreground_color is also set, this field takes precedence.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ColorStyle foregroundColorStyle;

  /**
   * True if the text is italicized.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean italic;

  /**
   * The link destination of the text, if any. Setting the link field in a TextFormatRun will clear
   * the cell's existing links or a cell-level link set in the same request. When a link is set, the
   * text foreground color will be set to the default link color and the text will be underlined. If
   * these fields are modified in the same request, those values will be used instead of the link
   * defaults.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Link link;

  /**
   * True if the text has a strikethrough.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean strikethrough;

  /**
   * True if the text is underlined.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean underline;

  /**
   * True if the text is bold.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getBold() {
    return bold;
  }

  /**
   * True if the text is bold.
   * @param bold bold or {@code null} for none
   */
  public TextFormat setBold(java.lang.Boolean bold) {
    this.bold = bold;
    return this;
  }

  /**
   * The font family.
   * @return value or {@code null} for none
   */
  public java.lang.String getFontFamily() {
    return fontFamily;
  }

  /**
   * The font family.
   * @param fontFamily fontFamily or {@code null} for none
   */
  public TextFormat setFontFamily(java.lang.String fontFamily) {
    this.fontFamily = fontFamily;
    return this;
  }

  /**
   * The size of the font.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getFontSize() {
    return fontSize;
  }

  /**
   * The size of the font.
   * @param fontSize fontSize or {@code null} for none
   */
  public TextFormat setFontSize(java.lang.Integer fontSize) {
    this.fontSize = fontSize;
    return this;
  }

  /**
   * The foreground color of the text.
   * @return value or {@code null} for none
   */
  public Color getForegroundColor() {
    return foregroundColor;
  }

  /**
   * The foreground color of the text.
   * @param foregroundColor foregroundColor or {@code null} for none
   */
  public TextFormat setForegroundColor(Color foregroundColor) {
    this.foregroundColor = foregroundColor;
    return this;
  }

  /**
   * The foreground color of the text. If foreground_color is also set, this field takes precedence.
   * @return value or {@code null} for none
   */
  public ColorStyle getForegroundColorStyle() {
    return foregroundColorStyle;
  }

  /**
   * The foreground color of the text. If foreground_color is also set, this field takes precedence.
   * @param foregroundColorStyle foregroundColorStyle or {@code null} for none
   */
  public TextFormat setForegroundColorStyle(ColorStyle foregroundColorStyle) {
    this.foregroundColorStyle = foregroundColorStyle;
    return this;
  }

  /**
   * True if the text is italicized.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getItalic() {
    return italic;
  }

  /**
   * True if the text is italicized.
   * @param italic italic or {@code null} for none
   */
  public TextFormat setItalic(java.lang.Boolean italic) {
    this.italic = italic;
    return this;
  }

  /**
   * The link destination of the text, if any. Setting the link field in a TextFormatRun will clear
   * the cell's existing links or a cell-level link set in the same request. When a link is set, the
   * text foreground color will be set to the default link color and the text will be underlined. If
   * these fields are modified in the same request, those values will be used instead of the link
   * defaults.
   * @return value or {@code null} for none
   */
  public Link getLink() {
    return link;
  }

  /**
   * The link destination of the text, if any. Setting the link field in a TextFormatRun will clear
   * the cell's existing links or a cell-level link set in the same request. When a link is set, the
   * text foreground color will be set to the default link color and the text will be underlined. If
   * these fields are modified in the same request, those values will be used instead of the link
   * defaults.
   * @param link link or {@code null} for none
   */
  public TextFormat setLink(Link link) {
    this.link = link;
    return this;
  }

  /**
   * True if the text has a strikethrough.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getStrikethrough() {
    return strikethrough;
  }

  /**
   * True if the text has a strikethrough.
   * @param strikethrough strikethrough or {@code null} for none
   */
  public TextFormat setStrikethrough(java.lang.Boolean strikethrough) {
    this.strikethrough = strikethrough;
    return this;
  }

  /**
   * True if the text is underlined.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getUnderline() {
    return underline;
  }

  /**
   * True if the text is underlined.
   * @param underline underline or {@code null} for none
   */
  public TextFormat setUnderline(java.lang.Boolean underline) {
    this.underline = underline;
    return this;
  }

  @Override
  public TextFormat set(String fieldName, Object value) {
    return (TextFormat) super.set(fieldName, value);
  }

  @Override
  public TextFormat clone() {
    return (TextFormat) super.clone();
  }

}
