Class Interval.Builder (1.109.0)

public static final class Interval.Builder extends GeneratedMessage.Builder<Interval.Builder> implements IntervalOrBuilder

Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive).

The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.

Protobuf type google.cloud.compute.v1.Interval

Implements

IntervalOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public Interval build()
Returns
Type Description
Interval

buildPartial()

public Interval buildPartial()
Returns
Type Description
Interval

clear()

public Interval.Builder clear()
Returns
Type Description
Interval.Builder
Overrides

clearEndTime()

public Interval.Builder clearEndTime()

Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

optional string end_time = 114938801;

Returns
Type Description
Interval.Builder

This builder for chaining.

clearStartTime()

public Interval.Builder clearStartTime()

Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

optional string start_time = 37467274;

Returns
Type Description
Interval.Builder

This builder for chaining.

getDefaultInstanceForType()

public Interval getDefaultInstanceForType()
Returns
Type Description
Interval

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEndTime()

public String getEndTime()

Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

optional string end_time = 114938801;

Returns
Type Description
String

The endTime.

getEndTimeBytes()

public ByteString getEndTimeBytes()

Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

optional string end_time = 114938801;

Returns
Type Description
ByteString

The bytes for endTime.

getStartTime()

public String getStartTime()

Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

optional string start_time = 37467274;

Returns
Type Description
String

The startTime.

getStartTimeBytes()

public ByteString getStartTimeBytes()

Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

optional string start_time = 37467274;

Returns
Type Description
ByteString

The bytes for startTime.

hasEndTime()

public boolean hasEndTime()

Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

optional string end_time = 114938801;

Returns
Type Description
boolean

Whether the endTime field is set.

hasStartTime()

public boolean hasStartTime()

Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

optional string start_time = 37467274;

Returns
Type Description
boolean

Whether the startTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Interval other)

public Interval.Builder mergeFrom(Interval other)
Parameter
Name Description
other Interval
Returns
Type Description
Interval.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Interval.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Interval.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Interval.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Interval.Builder
Overrides

setEndTime(String value)

public Interval.Builder setEndTime(String value)

Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

optional string end_time = 114938801;

Parameter
Name Description
value String

The endTime to set.

Returns
Type Description
Interval.Builder

This builder for chaining.

setEndTimeBytes(ByteString value)

public Interval.Builder setEndTimeBytes(ByteString value)

Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

optional string end_time = 114938801;

Parameter
Name Description
value ByteString

The bytes for endTime to set.

Returns
Type Description
Interval.Builder

This builder for chaining.

setStartTime(String value)

public Interval.Builder setStartTime(String value)

Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

optional string start_time = 37467274;

Parameter
Name Description
value String

The startTime to set.

Returns
Type Description
Interval.Builder

This builder for chaining.

setStartTimeBytes(ByteString value)

public Interval.Builder setStartTimeBytes(ByteString value)

Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

optional string start_time = 37467274;

Parameter
Name Description
value ByteString

The bytes for startTime to set.

Returns
Type Description
Interval.Builder

This builder for chaining.