Class DateTimePicker (0.1.0)

public final class DateTimePicker extends GeneratedMessageV3 implements DateTimePickerOrBuilder

Lets users input a date, a time, or both a date and a time. For an example in Google Chat apps, see Date time picker.

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:

Protobuf type google.apps.card.v1.DateTimePicker

Static Fields

LABEL_FIELD_NUMBER

public static final int LABEL_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

ON_CHANGE_ACTION_FIELD_NUMBER

public static final int ON_CHANGE_ACTION_FIELD_NUMBER
Field Value
TypeDescription
int

TIMEZONE_OFFSET_DATE_FIELD_NUMBER

public static final int TIMEZONE_OFFSET_DATE_FIELD_NUMBER
Field Value
TypeDescription
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

VALUE_MS_EPOCH_FIELD_NUMBER

public static final int VALUE_MS_EPOCH_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static DateTimePicker getDefaultInstance()
Returns
TypeDescription
DateTimePicker

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static DateTimePicker.Builder newBuilder()
Returns
TypeDescription
DateTimePicker.Builder

newBuilder(DateTimePicker prototype)

public static DateTimePicker.Builder newBuilder(DateTimePicker prototype)
Parameter
NameDescription
prototypeDateTimePicker
Returns
TypeDescription
DateTimePicker.Builder

parseDelimitedFrom(InputStream input)

public static DateTimePicker parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DateTimePicker
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DateTimePicker parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DateTimePicker
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static DateTimePicker parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
DateTimePicker
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DateTimePicker parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DateTimePicker
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DateTimePicker parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
DateTimePicker
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DateTimePicker parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DateTimePicker
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DateTimePicker parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
DateTimePicker
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DateTimePicker parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DateTimePicker
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static DateTimePicker parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DateTimePicker
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DateTimePicker parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DateTimePicker
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static DateTimePicker parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
DateTimePicker
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DateTimePicker parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DateTimePicker
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<DateTimePicker> parser()
Returns
TypeDescription
Parser<DateTimePicker>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public DateTimePicker getDefaultInstanceForType()
Returns
TypeDescription
DateTimePicker

getLabel()

public String 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;

Returns
TypeDescription
String

The label.

getLabelBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for label.

getName()

public String 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.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public 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.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getOnChangeAction()

public Action getOnChangeAction()

Triggered when the user clicks Save or Clear from the DateTimePicker interface.

.google.apps.card.v1.Action on_change_action = 6;

Returns
TypeDescription
Action

The onChangeAction.

getOnChangeActionOrBuilder()

public ActionOrBuilder getOnChangeActionOrBuilder()

Triggered when the user clicks Save or Clear from the DateTimePicker interface.

.google.apps.card.v1.Action on_change_action = 6;

Returns
TypeDescription
ActionOrBuilder

getParserForType()

public Parser<DateTimePicker> getParserForType()
Returns
TypeDescription
Parser<DateTimePicker>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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;

Returns
TypeDescription
int

The timezoneOffsetDate.

getType()

public DateTimePicker.DateTimePickerType getType()

Whether the widget supports inputting a date, a time, or the date and time.

.google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;

Returns
TypeDescription
DateTimePicker.DateTimePickerType

The type.

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;

Returns
TypeDescription
int

The enum numeric value on the wire for type.

getValueMsEpoch()

public long getValueMsEpoch()

The default value displayed in the widget, in milliseconds since Unix epoch 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
TypeDescription
long

The valueMsEpoch.

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;

Returns
TypeDescription
boolean

Whether the onChangeAction field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public DateTimePicker.Builder newBuilderForType()
Returns
TypeDescription
DateTimePicker.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DateTimePicker.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
DateTimePicker.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public DateTimePicker.Builder toBuilder()
Returns
TypeDescription
DateTimePicker.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException