# Service Control API V1 API - Class Google::Cloud::ServiceControl::V1::MetricValue (v1.7.0)

1.7.0 (latest) 1.6.1 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.11.0 0.10.0 0.9.2 0.8.0 0.7.1 0.6.0 0.5.0 0.4.6 Reference documentation and code samples for the Service Control API V1 API class Google::Cloud::ServiceControl::V1::MetricValue.

Represents a single metric value.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #bool_value

    def bool_value() -> ::Boolean

**Returns**

- (::Boolean) --- A boolean value.

  Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #bool_value=

    def bool_value=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- A boolean value.


  Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::Boolean) --- A boolean value.

  Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #distribution_value

    def distribution_value() -> ::Google::Cloud::ServiceControl::V1::Distribution

**Returns**

- ([::Google::Cloud::ServiceControl::V1::Distribution](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-Distribution)) --- A distribution value.


  Note: The following fields are mutually exclusive: `distribution_value`, `bool_value`, `int64_value`, `double_value`, `string_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #distribution_value=

    def distribution_value=(value) -> ::Google::Cloud::ServiceControl::V1::Distribution

**Parameter**

- **value** ([::Google::Cloud::ServiceControl::V1::Distribution](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-Distribution)) --- A distribution value.


  Note: The following fields are mutually exclusive: `distribution_value`, `bool_value`, `int64_value`, `double_value`, `string_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::ServiceControl::V1::Distribution](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-Distribution)) --- A distribution value.


  Note: The following fields are mutually exclusive: `distribution_value`, `bool_value`, `int64_value`, `double_value`, `string_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #double_value

    def double_value() -> ::Float

**Returns**

- (::Float) --- A double precision floating point value.

  Note: The following fields are mutually exclusive: `double_value`, `bool_value`, `int64_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #double_value=

    def double_value=(value) -> ::Float

**Parameter**

- **value** (::Float) --- A double precision floating point value.


  Note: The following fields are mutually exclusive: `double_value`, `bool_value`, `int64_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::Float) --- A double precision floating point value.

  Note: The following fields are mutually exclusive: `double_value`, `bool_value`, `int64_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #end_time

    def end_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Protobuf-Timestamp)) --- The end of the time period over which this metric value's measurement applies. If not specified, [google.api.servicecontrol.v1.Operation.end_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-Operation#Google__Cloud__ServiceControl__V1__Operation_end_time_instance_ "Google::Cloud::ServiceControl::V1::Operation#end_time (method)") will be used.

### #end_time=

    def end_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Protobuf-Timestamp)) --- The end of the time period over which this metric value's measurement applies. If not specified, [google.api.servicecontrol.v1.Operation.end_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-Operation#Google__Cloud__ServiceControl__V1__Operation_end_time_instance_ "Google::Cloud::ServiceControl::V1::Operation#end_time (method)") will be used.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Protobuf-Timestamp)) --- The end of the time period over which this metric value's measurement applies. If not specified, [google.api.servicecontrol.v1.Operation.end_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-Operation#Google__Cloud__ServiceControl__V1__Operation_end_time_instance_ "Google::Cloud::ServiceControl::V1::Operation#end_time (method)") will be used.

### #int64_value

    def int64_value() -> ::Integer

**Returns**

- (::Integer) --- A signed 64-bit integer value.

  Note: The following fields are mutually exclusive: `int64_value`, `bool_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #int64_value=

    def int64_value=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- A signed 64-bit integer value.


  Note: The following fields are mutually exclusive: `int64_value`, `bool_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::Integer) --- A signed 64-bit integer value.

  Note: The following fields are mutually exclusive: `int64_value`, `bool_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #labels

    def labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- The labels describing the metric value. See comments on [google.api.servicecontrol.v1.Operation.labels](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-Operation#Google__Cloud__ServiceControl__V1__Operation_labels_instance_ "Google::Cloud::ServiceControl::V1::Operation#labels (method)") for the overriding relationship. Note that this map must not contain monitored resource labels.

### #labels=

    def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- The labels describing the metric value. See comments on [google.api.servicecontrol.v1.Operation.labels](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-Operation#Google__Cloud__ServiceControl__V1__Operation_labels_instance_ "Google::Cloud::ServiceControl::V1::Operation#labels (method)") for the overriding relationship. Note that this map must not contain monitored resource labels.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- The labels describing the metric value. See comments on [google.api.servicecontrol.v1.Operation.labels](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-Operation#Google__Cloud__ServiceControl__V1__Operation_labels_instance_ "Google::Cloud::ServiceControl::V1::Operation#labels (method)") for the overriding relationship. Note that this map must not contain monitored resource labels.

### #start_time

    def start_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Protobuf-Timestamp)) --- The start of the time period over which this metric value's measurement applies. The time period has different semantics for different metric types (cumulative, delta, and gauge). See the metric definition documentation in the service configuration for details. If not specified, [google.api.servicecontrol.v1.Operation.start_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-Operation#Google__Cloud__ServiceControl__V1__Operation_start_time_instance_ "Google::Cloud::ServiceControl::V1::Operation#start_time (method)") will be used.

### #start_time=

    def start_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Protobuf-Timestamp)) --- The start of the time period over which this metric value's measurement applies. The time period has different semantics for different metric types (cumulative, delta, and gauge). See the metric definition documentation in the service configuration for details. If not specified, [google.api.servicecontrol.v1.Operation.start_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-Operation#Google__Cloud__ServiceControl__V1__Operation_start_time_instance_ "Google::Cloud::ServiceControl::V1::Operation#start_time (method)") will be used.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Protobuf-Timestamp)) --- The start of the time period over which this metric value's measurement applies. The time period has different semantics for different metric types (cumulative, delta, and gauge). See the metric definition documentation in the service configuration for details. If not specified, [google.api.servicecontrol.v1.Operation.start_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-Operation#Google__Cloud__ServiceControl__V1__Operation_start_time_instance_ "Google::Cloud::ServiceControl::V1::Operation#start_time (method)") will be used.

### #string_value

    def string_value() -> ::String

**Returns**

- (::String) --- A text string value.

  Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `int64_value`, `double_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #string_value=

    def string_value=(value) -> ::String

**Parameter**

- **value** (::String) --- A text string value.


  Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `int64_value`, `double_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- A text string value.

  Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `int64_value`, `double_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.