# All files / codegen/models CreateMeterArgs.ts

75.84% Statements 135/178
100% Branches 4/4
0% Functions 0/3
75.84% Lines 135/178

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    1801x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x

    1x
    1x

    1x
    1x

     /* tslint:disable */
    /* eslint-disable */
    /**
     * Octane API
     * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
     *
     * The version of the OpenAPI document: 1.0.0
     *
     *
     * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
     * https://openapi-generator.tech
     * Do not edit the class manually.
     */

    import { exists, mapValues } from '../runtime';
    /**
     *
     * @export
     * @interface CreateMeterArgs
     */
    export interface CreateMeterArgs {
        /**
         * Type of meter. One of `COUNTER`, `GAUGE`
         * @type {string}
         * @memberof CreateMeterArgs
         */
        meterType?: CreateMeterArgsMeterTypeEnum;
        /**
         * COMING SOON: We are replacing meter_type with data_type and aggregation fields to allow more flexible metering. The aggregation type to apply to measurements. One of `MAX`, `SUM`, `TIME_WEIGHTED_SUM`.
         * @type {string}
         * @memberof CreateMeterArgs
         */
        aggregation?: CreateMeterArgsAggregationEnum;
        /**
         * Unique name identifier
         * @type {string}
         * @memberof CreateMeterArgs
         */
        name?: string;
        /**
         * Name of the events to associate with this meter. Defaults to meter name.
         * @type {string}
         * @memberof CreateMeterArgs
         */
        eventName?: string;
        /**
         * COMING SOON: We are replacing meter_type with data_type and aggregation fields to allow more flexible metering. The type of data represented by the meter. One of `CONTINUOUS`, `DISCRETE`.
         * @type {string}
         * @memberof CreateMeterArgs
         */
        dataType?: CreateMeterArgsDataTypeEnum;
        /**
         * Whether measurement values are to be considered to be the incremental change or the total.
         * @type {boolean}
         * @memberof CreateMeterArgs
         */
        isIncremental?: boolean;
        /**
         * Description of the meter
         * @type {string}
         * @memberof CreateMeterArgs
         */
        description?: string;
        /**
         * COMING SOON: We are replacing is_incremental with reporting_method field. Whether measurement values are reporting the incremental change or the total. One of `DELTA`, `TOTAL`.
         * @type {string}
         * @memberof CreateMeterArgs
         */
        reportingMethod?: CreateMeterArgsReportingMethodEnum;
        /**
         * The unit that the measurement values are reported in.
         * @type {string}
         * @memberof CreateMeterArgs
         */
        unitName?: string;
        /**
         * List of primary label keys
         * @type {Array<string>}
         * @memberof CreateMeterArgs
         */
        primaryLabels?: Array<string>;
        /**
         * DEPRECATED: List of expected label keys
         * @type {Array<string>}
         * @memberof CreateMeterArgs
         */
        expectedLabels?: Array<string>;
        /**
         * Human-friendly name used for display in UI
         * @type {string}
         * @memberof CreateMeterArgs
         */
        displayName?: string;
    }

    /**
    * @export
    * @enum {string}
    */
    export enum CreateMeterArgsMeterTypeEnum {
        Counter = 'COUNTER',
        Gauge = 'GAUGE'
    }/**
    * @export
    * @enum {string}
    */
    export enum CreateMeterArgsAggregationEnum {
        Sum = 'SUM',
        Max = 'MAX',
        Min = 'MIN',
        Avg = 'AVG',
        Count = 'COUNT',
        TimeWeightedSum = 'TIME_WEIGHTED_SUM',
        Latest = 'LATEST'
    }/**
    * @export
    * @enum {string}
    */
    export enum CreateMeterArgsDataTypeEnum {
        Continuous = 'CONTINUOUS',
        Discrete = 'DISCRETE'
    }/**
    * @export
    * @enum {string}
    */
    export enum CreateMeterArgsReportingMethodEnum {
        Delta = 'DELTA',
        Total = 'TOTAL'
    }

    export function CreateMeterArgsFromJSON(json: any): CreateMeterArgs {
        return CreateMeterArgsFromJSONTyped(json, false);
    }

    export function CreateMeterArgsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateMeterArgs {
        if ((json === undefined) || (json === null)) {
            return json;
        }
        return {

            'meterType': !exists(json, 'meter_type') ? undefined : json['meter_type'],
            'aggregation': !exists(json, 'aggregation') ? undefined : json['aggregation'],
            'name': !exists(json, 'name') ? undefined : json['name'],
            'eventName': !exists(json, 'event_name') ? undefined : json['event_name'],
            'dataType': !exists(json, 'data_type') ? undefined : json['data_type'],
            'isIncremental': !exists(json, 'is_incremental') ? undefined : json['is_incremental'],
            'description': !exists(json, 'description') ? undefined : json['description'],
            'reportingMethod': !exists(json, 'reporting_method') ? undefined : json['reporting_method'],
            'unitName': !exists(json, 'unit_name') ? undefined : json['unit_name'],
            'primaryLabels': !exists(json, 'primary_labels') ? undefined : json['primary_labels'],
            'expectedLabels': !exists(json, 'expected_labels') ? undefined : json['expected_labels'],
            'displayName': !exists(json, 'display_name') ? undefined : json['display_name'],
        };
    }

    export function CreateMeterArgsToJSON(value?: CreateMeterArgs | null): any {
        if (value === undefined) {
            return undefined;
        }
        if (value === null) {
            return null;
        }
        return {

            'meter_type': value.meterType,
            'aggregation': value.aggregation,
            'name': value.name,
            'event_name': value.eventName,
            'data_type': value.dataType,
            'is_incremental': value.isIncremental,
            'description': value.description,
            'reporting_method': value.reportingMethod,
            'unit_name': value.unitName,
            'primary_labels': value.primaryLabels,
            'expected_labels': value.expectedLabels,
            'display_name': value.displayName,
        };
    }