Package com.google.apps.card.v1
Class DateTimePicker.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
com.google.apps.card.v1.DateTimePicker.Builder
- All Implemented Interfaces:
DateTimePickerOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- DateTimePicker
public static final class DateTimePicker.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
implements DateTimePickerOrBuilder
Lets users input a date, a time, or both a date and a time. For an example in Google Chat apps, see [Let a user pick a date and time](https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time). Users can input text or use the picker to select dates and times. If users input an invalid date or time, the picker shows an error that prompts users to input the information correctly. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):Protobuf type
google.apps.card.v1.DateTimePicker-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()clearField(com.google.protobuf.Descriptors.FieldDescriptor field) The text that prompts users to input a date, a time, or a date and time.The name by which the `DateTimePicker` is identified in a form input event.Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) The number representing the time zone offset from UTC, in minutes.Whether the widget supports inputting a date, a time, or the date and time.The default value displayed in the widget, in milliseconds since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetLabel()The text that prompts users to input a date, a time, or a date and time.com.google.protobuf.ByteStringThe text that prompts users to input a date, a time, or a date and time.getName()The name by which the `DateTimePicker` is identified in a form input event.com.google.protobuf.ByteStringThe name by which the `DateTimePicker` is identified in a form input event.Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.intThe number representing the time zone offset from UTC, in minutes.getType()Whether the widget supports inputting a date, a time, or the date and time.intWhether the widget supports inputting a date, a time, or the date and time.longThe default value displayed in the widget, in milliseconds since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).booleanTriggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(DateTimePicker other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeOnChangeAction(Action value) Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.final DateTimePicker.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) The text that prompts users to input a date, a time, or a date and time.setLabelBytes(com.google.protobuf.ByteString value) The text that prompts users to input a date, a time, or a date and time.The name by which the `DateTimePicker` is identified in a form input event.setNameBytes(com.google.protobuf.ByteString value) The name by which the `DateTimePicker` is identified in a form input event.setOnChangeAction(Action value) Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.setOnChangeAction(Action.Builder builderForValue) Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setTimezoneOffsetDate(int value) The number representing the time zone offset from UTC, in minutes.Whether the widget supports inputting a date, a time, or the date and time.setTypeValue(int value) Whether the widget supports inputting a date, a time, or the date and time.final DateTimePicker.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setValueMsEpoch(long value) The default value displayed in the widget, in milliseconds since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
-
setField
public DateTimePicker.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
-
setRepeatedField
public DateTimePicker.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
-
addRepeatedField
public DateTimePicker.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DateTimePicker.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
-
mergeFrom
public DateTimePicker.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DateTimePicker.Builder>- Throws:
IOException
-
getName
The name by which the `DateTimePicker` is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).
string name = 1;- Specified by:
getNamein interfaceDateTimePickerOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The name by which the `DateTimePicker` is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).
string name = 1;- Specified by:
getNameBytesin interfaceDateTimePickerOrBuilder- Returns:
- The bytes for name.
-
setName
The name by which the `DateTimePicker` is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).
string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
The name by which the `DateTimePicker` is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).
string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
The name by which the `DateTimePicker` is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).
string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getLabel
The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
string label = 2;- Specified by:
getLabelin interfaceDateTimePickerOrBuilder- Returns:
- The label.
-
getLabelBytes
public com.google.protobuf.ByteString getLabelBytes()The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
string label = 2;- Specified by:
getLabelBytesin interfaceDateTimePickerOrBuilder- Returns:
- The bytes for label.
-
setLabel
The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
string label = 2;- Parameters:
value- The label to set.- Returns:
- This builder for chaining.
-
clearLabel
The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
string label = 2;- Returns:
- This builder for chaining.
-
setLabelBytes
The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
string label = 2;- Parameters:
value- The bytes for label to set.- Returns:
- This builder for chaining.
-
getTypeValue
public int getTypeValue()Whether the widget supports inputting a date, a time, or the date and time.
.google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;- Specified by:
getTypeValuein interfaceDateTimePickerOrBuilder- Returns:
- The enum numeric value on the wire for type.
-
setTypeValue
Whether the widget supports inputting a date, a time, or the date and time.
.google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;- Parameters:
value- The enum numeric value on the wire for type to set.- Returns:
- This builder for chaining.
-
getType
Whether the widget supports inputting a date, a time, or the date and time.
.google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;- Specified by:
getTypein interfaceDateTimePickerOrBuilder- Returns:
- The type.
-
setType
Whether the widget supports inputting a date, a time, or the date and time.
.google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;- Parameters:
value- The type to set.- Returns:
- This builder for chaining.
-
clearType
Whether the widget supports inputting a date, a time, or the date and time.
.google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;- Returns:
- This builder for chaining.
-
getValueMsEpoch
public long getValueMsEpoch()The default value displayed in the widget, in milliseconds since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time). Specify the value based on the type of picker (`DateTimePickerType`): * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use `1672531200000`. * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use `43200000` (or `12 * 60 * 60 * 1000`).
int64 value_ms_epoch = 4;- Specified by:
getValueMsEpochin interfaceDateTimePickerOrBuilder- Returns:
- The valueMsEpoch.
-
setValueMsEpoch
The default value displayed in the widget, in milliseconds since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time). Specify the value based on the type of picker (`DateTimePickerType`): * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use `1672531200000`. * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use `43200000` (or `12 * 60 * 60 * 1000`).
int64 value_ms_epoch = 4;- Parameters:
value- The valueMsEpoch to set.- Returns:
- This builder for chaining.
-
clearValueMsEpoch
The default value displayed in the widget, in milliseconds since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time). Specify the value based on the type of picker (`DateTimePickerType`): * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use `1672531200000`. * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use `43200000` (or `12 * 60 * 60 * 1000`).
int64 value_ms_epoch = 4;- Returns:
- This builder for chaining.
-
getTimezoneOffsetDate
public int getTimezoneOffsetDate()The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If unset, the value defaults to the user's time zone setting.
int32 timezone_offset_date = 5;- Specified by:
getTimezoneOffsetDatein interfaceDateTimePickerOrBuilder- Returns:
- The timezoneOffsetDate.
-
setTimezoneOffsetDate
The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If unset, the value defaults to the user's time zone setting.
int32 timezone_offset_date = 5;- Parameters:
value- The timezoneOffsetDate to set.- Returns:
- This builder for chaining.
-
clearTimezoneOffsetDate
The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If unset, the value defaults to the user's time zone setting.
int32 timezone_offset_date = 5;- Returns:
- This builder for chaining.
-
hasOnChangeAction
public boolean hasOnChangeAction()Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
.google.apps.card.v1.Action on_change_action = 6;- Specified by:
hasOnChangeActionin interfaceDateTimePickerOrBuilder- Returns:
- Whether the onChangeAction field is set.
-
getOnChangeAction
Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
.google.apps.card.v1.Action on_change_action = 6;- Specified by:
getOnChangeActionin interfaceDateTimePickerOrBuilder- Returns:
- The onChangeAction.
-
setOnChangeAction
Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
.google.apps.card.v1.Action on_change_action = 6; -
setOnChangeAction
Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
.google.apps.card.v1.Action on_change_action = 6; -
mergeOnChangeAction
Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
.google.apps.card.v1.Action on_change_action = 6; -
clearOnChangeAction
Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
.google.apps.card.v1.Action on_change_action = 6; -
getOnChangeActionBuilder
Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
.google.apps.card.v1.Action on_change_action = 6; -
getOnChangeActionOrBuilder
Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
.google.apps.card.v1.Action on_change_action = 6;- Specified by:
getOnChangeActionOrBuilderin interfaceDateTimePickerOrBuilder
-
setUnknownFields
public final DateTimePicker.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
-
mergeUnknownFields
public final DateTimePicker.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
-