Usage Class

  • java.lang.Object
    • com.azure.resourcemanager.cognitiveservices.models.Usage

public final class Usage

The usage data for a usage request.

Constructor Summary

Constructor Description
Usage()

Creates an instance of Usage class.

Method Summary

Modifier and Type Method and Description
Double currentValue()

Get the currentValue property: Current value for this metric.

Double limit()

Get the limit property: Maximum value for this metric.

MetricName name()

Get the name property: The name information for the metric.

String nextResetTime()

Get the nextResetTime property: Next reset time for current quota.

String quotaPeriod()

Get the quotaPeriod property: The quota period used to summarize the usage values.

QuotaUsageStatus status()

Get the status property: Cognitive Services account quota usage status.

UnitType unit()

Get the unit property: The unit of the metric.

void validate()

Validates the instance.

Usage withCurrentValue(Double currentValue)

Set the currentValue property: Current value for this metric.

Usage withLimit(Double limit)

Set the limit property: Maximum value for this metric.

Usage withName(MetricName name)

Set the name property: The name information for the metric.

Usage withNextResetTime(String nextResetTime)

Set the nextResetTime property: Next reset time for current quota.

Usage withQuotaPeriod(String quotaPeriod)

Set the quotaPeriod property: The quota period used to summarize the usage values.

Usage withStatus(QuotaUsageStatus status)

Set the status property: Cognitive Services account quota usage status.

Usage withUnit(UnitType unit)

Set the unit property: The unit of the metric.

Methods inherited from java.lang.Object

Constructor Details

Usage

public Usage()

Creates an instance of Usage class.

Method Details

currentValue

public Double currentValue()

Get the currentValue property: Current value for this metric.

Returns:

the currentValue value.

limit

public Double limit()

Get the limit property: Maximum value for this metric.

Returns:

the limit value.

name

public MetricName name()

Get the name property: The name information for the metric.

Returns:

the name value.

nextResetTime

public String nextResetTime()

Get the nextResetTime property: Next reset time for current quota.

Returns:

the nextResetTime value.

quotaPeriod

public String quotaPeriod()

Get the quotaPeriod property: The quota period used to summarize the usage values.

Returns:

the quotaPeriod value.

status

public QuotaUsageStatus status()

Get the status property: Cognitive Services account quota usage status.

Returns:

the status value.

unit

public UnitType unit()

Get the unit property: The unit of the metric.

Returns:

the unit value.

validate

public void validate()

Validates the instance.

withCurrentValue

public Usage withCurrentValue(Double currentValue)

Set the currentValue property: Current value for this metric.

Parameters:

currentValue - the currentValue value to set.

Returns:

the Usage object itself.

withLimit

public Usage withLimit(Double limit)

Set the limit property: Maximum value for this metric.

Parameters:

limit - the limit value to set.

Returns:

the Usage object itself.

withName

public Usage withName(MetricName name)

Set the name property: The name information for the metric.

Parameters:

name - the name value to set.

Returns:

the Usage object itself.

withNextResetTime

public Usage withNextResetTime(String nextResetTime)

Set the nextResetTime property: Next reset time for current quota.

Parameters:

nextResetTime - the nextResetTime value to set.

Returns:

the Usage object itself.

withQuotaPeriod

public Usage withQuotaPeriod(String quotaPeriod)

Set the quotaPeriod property: The quota period used to summarize the usage values.

Parameters:

quotaPeriod - the quotaPeriod value to set.

Returns:

the Usage object itself.

withStatus

public Usage withStatus(QuotaUsageStatus status)

Set the status property: Cognitive Services account quota usage status.

Parameters:

status - the status value to set.

Returns:

the Usage object itself.

withUnit

public Usage withUnit(UnitType unit)

Set the unit property: The unit of the metric.

Parameters:

unit - the unit value to set.

Returns:

the Usage object itself.

Applies to