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

com.wavefront.slug.chart.Chart Maven / Gradle / Ivy

/*
 * Copyright 2019 VMware, Inc.
 * SPDX-License-Identifier: Apache-2.0
 */

package com.wavefront.slug.chart;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import java.util.Collections;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Builder;

/**
 * Internal POJO represents a a chart with RISON compatible property name, used in {@link ChartSlug}.
 *
 * @author Yutian Wu ([email protected])
 */
@Builder
@AllArgsConstructor
@JsonPropertyOrder(alphabetic = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
class Chart {
  @JsonProperty("id")
  @Builder.Default
  private final String id = "chart";

  @JsonProperty("n")
  @Builder.Default
  private final String name = "Chart";

  @JsonProperty("ne")
  @Builder.Default
  private final boolean displaySourceEvents = true;

  @JsonProperty("smp")
  @Builder.Default
  private final String sampling = "off";

  @JsonProperty("u")
  private final String units;

  @JsonProperty("b")
  @Builder.Default
  private final int base = 1;

  @JsonProperty("s")
  @Builder.Default
  private final List chartSources = Collections.emptyList();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy