Class DateTimePicker.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<DateTimePicker.Builder>
com.google.protobuf.GeneratedMessage.Builder<DateTimePicker.Builder>
com.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,DateTimePicker.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
com.google.apps.card.v1.DateTimePicker.Builder
All Implemented Interfaces:
DateTimePickerOrBuilder, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>, 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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Overrides:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
    • clear

      public DateTimePicker.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<DateTimePicker.Builder>
    • getDefaultInstanceForType

      public DateTimePicker getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public DateTimePicker build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public DateTimePicker buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public DateTimePicker.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
    • setField

      public DateTimePicker.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
    • clearField

      public DateTimePicker.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
    • clearOneof

      public DateTimePicker.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
    • setRepeatedField

      public DateTimePicker.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
    • addRepeatedField

      public DateTimePicker.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
    • mergeFrom

      public DateTimePicker.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DateTimePicker.Builder>
    • mergeFrom

      public DateTimePicker.Builder mergeFrom(DateTimePicker other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,DateTimePicker.Builder>
    • mergeFrom

      public DateTimePicker.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DateTimePicker.Builder>
      Throws:
      IOException
    • 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](https://developers.google.com/workspace/chat/read-form-data).
       
      string name = 1;
      Specified by:
      getName in interface DateTimePickerOrBuilder
      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:
      getNameBytes in interface DateTimePickerOrBuilder
      Returns:
      The bytes for name.
    • setName

      public DateTimePicker.Builder setName(String value)
       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

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

      public DateTimePicker.Builder setNameBytes(com.google.protobuf.ByteString value)
       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

      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;
      Specified by:
      getLabel in interface DateTimePickerOrBuilder
      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:
      getLabelBytes in interface DateTimePickerOrBuilder
      Returns:
      The bytes for label.
    • setLabel

      public DateTimePicker.Builder setLabel(String value)
       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

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

      public DateTimePicker.Builder setLabelBytes(com.google.protobuf.ByteString value)
       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:
      getTypeValue in interface DateTimePickerOrBuilder
      Returns:
      The enum numeric value on the wire for type.
    • setTypeValue

      public DateTimePicker.Builder setTypeValue(int value)
       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:
      getType in interface DateTimePickerOrBuilder
      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

      public DateTimePicker.Builder 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:
      getValueMsEpoch in interface DateTimePickerOrBuilder
      Returns:
      The valueMsEpoch.
    • setValueMsEpoch

      public DateTimePicker.Builder setValueMsEpoch(long value)
       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

      public DateTimePicker.Builder 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:
      getTimezoneOffsetDate in interface DateTimePickerOrBuilder
      Returns:
      The timezoneOffsetDate.
    • setTimezoneOffsetDate

      public DateTimePicker.Builder setTimezoneOffsetDate(int value)
       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

      public DateTimePicker.Builder 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:
      hasOnChangeAction in interface DateTimePickerOrBuilder
      Returns:
      Whether the onChangeAction field is set.
    • 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;
      Specified by:
      getOnChangeAction in interface DateTimePickerOrBuilder
      Returns:
      The onChangeAction.
    • setOnChangeAction

      public DateTimePicker.Builder setOnChangeAction(Action value)
       Triggered when the user clicks **Save** or **Clear** from the
       `DateTimePicker` interface.
       
      .google.apps.card.v1.Action on_change_action = 6;
    • setOnChangeAction

      public DateTimePicker.Builder setOnChangeAction(Action.Builder builderForValue)
       Triggered when the user clicks **Save** or **Clear** from the
       `DateTimePicker` interface.
       
      .google.apps.card.v1.Action on_change_action = 6;
    • mergeOnChangeAction

      public DateTimePicker.Builder mergeOnChangeAction(Action value)
       Triggered when the user clicks **Save** or **Clear** from the
       `DateTimePicker` interface.
       
      .google.apps.card.v1.Action on_change_action = 6;
    • clearOnChangeAction

      public DateTimePicker.Builder clearOnChangeAction()
       Triggered when the user clicks **Save** or **Clear** from the
       `DateTimePicker` interface.
       
      .google.apps.card.v1.Action on_change_action = 6;
    • getOnChangeActionBuilder

      public Action.Builder getOnChangeActionBuilder()
       Triggered when the user clicks **Save** or **Clear** from the
       `DateTimePicker` interface.
       
      .google.apps.card.v1.Action on_change_action = 6;
    • 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;
      Specified by:
      getOnChangeActionOrBuilder in interface DateTimePickerOrBuilder
    • setUnknownFields

      public final DateTimePicker.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>
    • mergeUnknownFields

      public final DateTimePicker.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DateTimePicker.Builder>