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

com.smartsheet.api.models.ChartWidgetContent Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
 * Copyright (C) 2023 Smartsheet
 *
 * 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.
 */

package com.smartsheet.api.models;

import com.smartsheet.api.models.enums.WidgetType;

import java.util.List;

public class ChartWidgetContent implements WidgetContent {

    /**
     *  Report Id denoting container source, if applicable
     */
    private Long reportId;

    /**
     * Sheet Id denoting container source, if applicable
     */
    private Long sheetId;

    /**
     * Array of Axes
     */
    private List axes;

    /**
     * The widget has when clicked attribute set to that hyperlink (if present and non-null)
     */
    private WidgetHyperlink hyperlink;

    /**
     * Array of columnIds if the range was selected through the UI
     */
    private List includedColumnIds;

    /**
     * The location in the widget where Smartsheet renders the legend, for example, RIGHT
     */
    private Object legend;

    /**
     * selection range if the source is a sheet
     */
    private List selectionRanges;

    /**
     * Array of Series objects
     */
    private List series;

    /**
     * Returns the type for this widget content object
     *
     * @return CHART
     */
    @Override
    public WidgetType getWidgetType() {
        return WidgetType.CHART;
    }

    /**
     * Gets the report ID denoting container source, if applicable
     *
     * @return the report ID
     */
    public Long getReportId() {
        return reportId;
    }

    /**
     * Sets the report ID denoting container source, if applicable
     */
    public ChartWidgetContent setReportId(Long reportId) {
        this.reportId = reportId;
        return this;
    }

    /**
     * Gets the sheet ID denoting container source, if applicable
     *
     * @return the sheet ID
     */
    public Long getSheetId() {
        return sheetId;
    }

    /**
     * Sets the sheet ID denoting container source, if applicable
     */
    public ChartWidgetContent setSheetId(Long sheetId) {
        this.sheetId = sheetId;
        return this;
    }

    /**
     * Gets the array of axes
     *
     * @return the axes
     */
    public List getAxes() {
        return axes;
    }

    /**
     * Sets the array of axes
     */
    public ChartWidgetContent setAxes(List axes) {
        this.axes = axes;
        return this;
    }

    /**
     * Gets the hyperlink associated with this Widget
     *
     * @return the hyperlink
     */
    public WidgetHyperlink getHyperlink() {
        return hyperlink;
    }

    /**
     * Sets the hyperlink associated with this Widget
     */
    public ChartWidgetContent setHyperlink(WidgetHyperlink hyperlink) {
        this.hyperlink = hyperlink;
        return this;
    }

    /**
     * Gets the array of column IDs if the range was selected through the UI
     *
     * @return the array of column IDs
     */
    public List getIncludedColumnIds() {
        return includedColumnIds;
    }

    /**
     * Sets the array of column IDs if the range was selected through the UI
     */
    public ChartWidgetContent setIncludedColumnIds(List includedColumnIds) {
        this.includedColumnIds = includedColumnIds;
        return this;
    }

    /**
     * Gets the location in the widget where Smartsheet renders the legend
     *
     * @return the legend
     */
    public Object getLegend() {
        return legend;
    }

    /**
     * Sets the location in the widget where Smartsheet renders the legend
     */
    public ChartWidgetContent setLegend(Object legend) {
        this.legend = legend;
        return this;
    }

    /**
     * Gets the selection range if the source is a sheet
     *
     * @return the selection range
     */
    public List getSelectionRanges() {
        return selectionRanges;
    }

    /**
     * Sets the selection range if the source is a sheet
     */
    public ChartWidgetContent setSelectionRanges(List selectionRanges) {
        this.selectionRanges = selectionRanges;
        return this;
    }

    /**
     * Gets the array os series objects
     *
     * @return the array of series objects
     */
    public List getSeries() {
        return series;
    }

    /**
     * Sets the array of series objects
     */
    public ChartWidgetContent setSeries(List series) {
        this.series = series;
        return this;
    }
}