# Cloud Channel V1 API - Class Google::Cloud::Channel::V1::Period (v2.6.0)

2.6.0 (latest) 2.5.0 2.4.1 2.3.0 2.2.1 2.1.0 2.0.1 1.3.0 1.2.0 1.1.0 1.0.1 0.24.0 0.23.2 0.22.1 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.5 Reference documentation and code samples for the Cloud Channel V1 API class Google::Cloud::Channel::V1::Period.

Represents period in days/months/years.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #duration

    def duration() -> ::Integer

**Returns**

- (::Integer) --- Total duration of Period Type defined.

### #duration=

    def duration=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Total duration of Period Type defined.
**Returns**

- (::Integer) --- Total duration of Period Type defined.

### #period_type

    def period_type() -> ::Google::Cloud::Channel::V1::PeriodType

**Returns**

- ([::Google::Cloud::Channel::V1::PeriodType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest/Google-Cloud-Channel-V1-PeriodType)) --- Period Type.

### #period_type=

    def period_type=(value) -> ::Google::Cloud::Channel::V1::PeriodType

**Parameter**

- **value** ([::Google::Cloud::Channel::V1::PeriodType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest/Google-Cloud-Channel-V1-PeriodType)) --- Period Type.
**Returns**

- ([::Google::Cloud::Channel::V1::PeriodType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest/Google-Cloud-Channel-V1-PeriodType)) --- Period Type.