Class TimePeriod.Builder (0.2.0)

public static final class TimePeriod.Builder extends GeneratedMessageV3.Builder<TimePeriod.Builder> implements TimePeriodOrBuilder

Represents a time period in a week.

Protobuf type google.cloud.gdchardwaremanagement.v1alpha.TimePeriod

Implements

TimePeriodOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllDays(Iterable<? extends DayOfWeek> values)

public TimePeriod.Builder addAllDays(Iterable<? extends DayOfWeek> values)

Required. The days of the week that the time period is active.

repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends com.google.type.DayOfWeek>

The days to add.

Returns
Type Description
TimePeriod.Builder

This builder for chaining.

addAllDaysValue(Iterable<Integer> values)

public TimePeriod.Builder addAllDaysValue(Iterable<Integer> values)

Required. The days of the week that the time period is active.

repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<Integer>

The enum numeric values on the wire for days to add.

Returns
Type Description
TimePeriod.Builder

This builder for chaining.

addDays(DayOfWeek value)

public TimePeriod.Builder addDays(DayOfWeek value)

Required. The days of the week that the time period is active.

repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.DayOfWeek

The days to add.

Returns
Type Description
TimePeriod.Builder

This builder for chaining.

addDaysValue(int value)

public TimePeriod.Builder addDaysValue(int value)

Required. The days of the week that the time period is active.

repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for days to add.

Returns
Type Description
TimePeriod.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TimePeriod.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TimePeriod.Builder
Overrides

build()

public TimePeriod build()
Returns
Type Description
TimePeriod

buildPartial()

public TimePeriod buildPartial()
Returns
Type Description
TimePeriod

clear()

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

clearDays()

public TimePeriod.Builder clearDays()

Required. The days of the week that the time period is active.

repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TimePeriod.Builder

This builder for chaining.

clearEndTime()

public TimePeriod.Builder clearEndTime()

Required. The end of the time period.

.google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TimePeriod.Builder

clearField(Descriptors.FieldDescriptor field)

public TimePeriod.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
TimePeriod.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public TimePeriod.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
TimePeriod.Builder
Overrides

clearStartTime()

public TimePeriod.Builder clearStartTime()

Required. The start of the time period.

.google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TimePeriod.Builder

clone()

public TimePeriod.Builder clone()
Returns
Type Description
TimePeriod.Builder
Overrides

getDays(int index)

public DayOfWeek getDays(int index)

Required. The days of the week that the time period is active.

repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
com.google.type.DayOfWeek

The days at the given index.

getDaysCount()

public int getDaysCount()

Required. The days of the week that the time period is active.

repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of days.

getDaysList()

public List<DayOfWeek> getDaysList()

Required. The days of the week that the time period is active.

repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<com.google.type.DayOfWeek>

A list containing the days.

getDaysValue(int index)

public int getDaysValue(int index)

Required. The days of the week that the time period is active.

repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of days at the given index.

getDaysValueList()

public List<Integer> getDaysValueList()

Required. The days of the week that the time period is active.

repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for days.

getDefaultInstanceForType()

public TimePeriod getDefaultInstanceForType()
Returns
Type Description
TimePeriod

getDescriptorForType()

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

getEndTime()

public TimeOfDay getEndTime()

Required. The end of the time period.

.google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.TimeOfDay

The endTime.

getEndTimeBuilder()

public TimeOfDay.Builder getEndTimeBuilder()

Required. The end of the time period.

.google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.TimeOfDay.Builder

getEndTimeOrBuilder()

public TimeOfDayOrBuilder getEndTimeOrBuilder()

Required. The end of the time period.

.google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.TimeOfDayOrBuilder

getStartTime()

public TimeOfDay getStartTime()

Required. The start of the time period.

.google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.TimeOfDay

The startTime.

getStartTimeBuilder()

public TimeOfDay.Builder getStartTimeBuilder()

Required. The start of the time period.

.google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.TimeOfDay.Builder

getStartTimeOrBuilder()

public TimeOfDayOrBuilder getStartTimeOrBuilder()

Required. The start of the time period.

.google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.TimeOfDayOrBuilder

hasEndTime()

public boolean hasEndTime()

Required. The end of the time period.

.google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the endTime field is set.

hasStartTime()

public boolean hasStartTime()

Required. The start of the time period.

.google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the startTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeEndTime(TimeOfDay value)

public TimePeriod.Builder mergeEndTime(TimeOfDay value)

Required. The end of the time period.

.google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.TimeOfDay
Returns
Type Description
TimePeriod.Builder

mergeFrom(TimePeriod other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeStartTime(TimeOfDay value)

public TimePeriod.Builder mergeStartTime(TimeOfDay value)

Required. The start of the time period.

.google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.TimeOfDay
Returns
Type Description
TimePeriod.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TimePeriod.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TimePeriod.Builder
Overrides

setDays(int index, DayOfWeek value)

public TimePeriod.Builder setDays(int index, DayOfWeek value)

Required. The days of the week that the time period is active.

repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value com.google.type.DayOfWeek

The days to set.

Returns
Type Description
TimePeriod.Builder

This builder for chaining.

setDaysValue(int index, int value)

public TimePeriod.Builder setDaysValue(int index, int value)

Required. The days of the week that the time period is active.

repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value int

The enum numeric value on the wire for days to set.

Returns
Type Description
TimePeriod.Builder

This builder for chaining.

setEndTime(TimeOfDay value)

public TimePeriod.Builder setEndTime(TimeOfDay value)

Required. The end of the time period.

.google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.TimeOfDay
Returns
Type Description
TimePeriod.Builder

setEndTime(TimeOfDay.Builder builderForValue)

public TimePeriod.Builder setEndTime(TimeOfDay.Builder builderForValue)

Required. The end of the time period.

.google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue com.google.type.TimeOfDay.Builder
Returns
Type Description
TimePeriod.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public TimePeriod.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TimePeriod.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public TimePeriod.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
TimePeriod.Builder
Overrides

setStartTime(TimeOfDay value)

public TimePeriod.Builder setStartTime(TimeOfDay value)

Required. The start of the time period.

.google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.TimeOfDay
Returns
Type Description
TimePeriod.Builder

setStartTime(TimeOfDay.Builder builderForValue)

public TimePeriod.Builder setStartTime(TimeOfDay.Builder builderForValue)

Required. The start of the time period.

.google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue com.google.type.TimeOfDay.Builder
Returns
Type Description
TimePeriod.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final TimePeriod.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TimePeriod.Builder
Overrides