ApiMetric (cloudera-manager-api-swagger 7.13.1 API)
Date: 2026-05-19

com.cloudera.api.swagger.model

## Class ApiMetric

- java.lang.Object
- - com.cloudera.api.swagger.model.ApiMetric

-     @Generated(value="io.swagger.codegen.v3.generators.java.JavaClientCodegen",
                 date="2026-05-19T08:00:51.241Z[Etc/UTC]")
      public class ApiMetric
      extends Object

  A metric represents a specific metric monitored by the Cloudera Management Services, and a list of values matching a user query. <p> These fields are available only in the \"full\" view: <ul> <li>displayName</li> <li>description</li> </ul>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ApiMetric()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ApiMetric` | `addDataItem(ApiMetricData dataItem)`
    `ApiMetric` | `context(String context)`
    `ApiMetric` | `data(List<ApiMetricData> data)`
    `ApiMetric` | `description(String description)`
    `ApiMetric` | `displayName(String displayName)`
    `boolean` | `equals(Object o)`
    `String` | `getContext()` Context the metric is associated with.
    `List<ApiMetricData>` | `getData()` List of readings retrieved from the monitors.
    `String` | `getDescription()` Requires \"full\" view.
    `String` | `getDisplayName()` Requires \"full\" view.
    `String` | `getName()` Name of the metric.
    `String` | `getUnit()` Unit of the metric values.
    `int` | `hashCode()`
    `ApiMetric` | `name(String name)`
    `void` | `setContext(String context)`
    `void` | `setData(List<ApiMetricData> data)`
    `void` | `setDescription(String description)`
    `void` | `setDisplayName(String displayName)`
    `void` | `setName(String name)`
    `void` | `setUnit(String unit)`
    `String` | `toString()`
    `ApiMetric` | `unit(String unit)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ApiMetric

          public ApiMetric()

  - ### Method Detail

    - #### name

          public ApiMetric name(String name)

    - #### getName

          public String getName()

      Name of the metric.
      Returns:
        name

    - #### setName

          public void setName(String name)

    - #### context

          public ApiMetric context(String context)

    - #### getContext

          public String getContext()

      Context the metric is associated with.
      Returns:
        context

    - #### setContext

          public void setContext(String context)

    - #### unit

          public ApiMetric unit(String unit)

    - #### getUnit

          public String getUnit()

      Unit of the metric values.
      Returns:
        unit

    - #### setUnit

          public void setUnit(String unit)

    - #### data

          public ApiMetric data(List<ApiMetricData> data)

    - #### addDataItem

          public ApiMetric addDataItem(ApiMetricData dataItem)

    - #### getData

          public List<ApiMetricData> getData()

      List of readings retrieved from the monitors.
      Returns:
        data

    - #### setData

          public void setData(List<ApiMetricData> data)

    - #### displayName

          public ApiMetric displayName(String displayName)

    - #### getDisplayName

          public String getDisplayName()

      Requires \"full\" view. User-friendly display name for the metric.
      Returns:
        displayName

    - #### setDisplayName

          public void setDisplayName(String displayName)

    - #### description

          public ApiMetric description(String description)

    - #### getDescription

          public String getDescription()

      Requires \"full\" view. Description of the metric.
      Returns:
        description

    - #### setDescription

          public void setDescription(String description)

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2026. All rights reserved.