Class Chip.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Chip.Builder>
com.google.apps.card.v1.Chip.Builder
All Implemented Interfaces:
ChipOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Chip

public static final class Chip.Builder extends com.google.protobuf.GeneratedMessage.Builder<Chip.Builder> implements ChipOrBuilder
 A text, icon, or text and icon chip that users can click.

 [Google Workspace add-ons and Chat
 apps](https://developers.google.com/workspace/extend):
 
Protobuf type google.apps.card.v1.Chip
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Chip.Builder>
    • clear

      public Chip.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.GeneratedMessage.Builder<Chip.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<Chip.Builder>
    • getDefaultInstanceForType

      public Chip getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

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

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

      public Chip.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<Chip.Builder>
    • mergeFrom

      public Chip.Builder mergeFrom(Chip other)
    • isInitialized

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

      public Chip.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<Chip.Builder>
      Throws:
      IOException
    • hasIcon

      public boolean hasIcon()
       The icon image. If both `icon` and `text` are set, then the icon appears
       before the text.
       
      .google.apps.card.v1.Icon icon = 1;
      Specified by:
      hasIcon in interface ChipOrBuilder
      Returns:
      Whether the icon field is set.
    • getIcon

      public Icon getIcon()
       The icon image. If both `icon` and `text` are set, then the icon appears
       before the text.
       
      .google.apps.card.v1.Icon icon = 1;
      Specified by:
      getIcon in interface ChipOrBuilder
      Returns:
      The icon.
    • setIcon

      public Chip.Builder setIcon(Icon value)
       The icon image. If both `icon` and `text` are set, then the icon appears
       before the text.
       
      .google.apps.card.v1.Icon icon = 1;
    • setIcon

      public Chip.Builder setIcon(Icon.Builder builderForValue)
       The icon image. If both `icon` and `text` are set, then the icon appears
       before the text.
       
      .google.apps.card.v1.Icon icon = 1;
    • mergeIcon

      public Chip.Builder mergeIcon(Icon value)
       The icon image. If both `icon` and `text` are set, then the icon appears
       before the text.
       
      .google.apps.card.v1.Icon icon = 1;
    • clearIcon

      public Chip.Builder clearIcon()
       The icon image. If both `icon` and `text` are set, then the icon appears
       before the text.
       
      .google.apps.card.v1.Icon icon = 1;
    • getIconBuilder

      public Icon.Builder getIconBuilder()
       The icon image. If both `icon` and `text` are set, then the icon appears
       before the text.
       
      .google.apps.card.v1.Icon icon = 1;
    • getIconOrBuilder

      public IconOrBuilder getIconOrBuilder()
       The icon image. If both `icon` and `text` are set, then the icon appears
       before the text.
       
      .google.apps.card.v1.Icon icon = 1;
      Specified by:
      getIconOrBuilder in interface ChipOrBuilder
    • getLabel

      public String getLabel()
       The text displayed inside the chip.
       
      string label = 2;
      Specified by:
      getLabel in interface ChipOrBuilder
      Returns:
      The label.
    • getLabelBytes

      public com.google.protobuf.ByteString getLabelBytes()
       The text displayed inside the chip.
       
      string label = 2;
      Specified by:
      getLabelBytes in interface ChipOrBuilder
      Returns:
      The bytes for label.
    • setLabel

      public Chip.Builder setLabel(String value)
       The text displayed inside the chip.
       
      string label = 2;
      Parameters:
      value - The label to set.
      Returns:
      This builder for chaining.
    • clearLabel

      public Chip.Builder clearLabel()
       The text displayed inside the chip.
       
      string label = 2;
      Returns:
      This builder for chaining.
    • setLabelBytes

      public Chip.Builder setLabelBytes(com.google.protobuf.ByteString value)
       The text displayed inside the chip.
       
      string label = 2;
      Parameters:
      value - The bytes for label to set.
      Returns:
      This builder for chaining.
    • hasOnClick

      public boolean hasOnClick()
       Optional. The action to perform when a user clicks the chip, such as
       opening a hyperlink or running a custom function.
       
      .google.apps.card.v1.OnClick on_click = 3;
      Specified by:
      hasOnClick in interface ChipOrBuilder
      Returns:
      Whether the onClick field is set.
    • getOnClick

      public OnClick getOnClick()
       Optional. The action to perform when a user clicks the chip, such as
       opening a hyperlink or running a custom function.
       
      .google.apps.card.v1.OnClick on_click = 3;
      Specified by:
      getOnClick in interface ChipOrBuilder
      Returns:
      The onClick.
    • setOnClick

      public Chip.Builder setOnClick(OnClick value)
       Optional. The action to perform when a user clicks the chip, such as
       opening a hyperlink or running a custom function.
       
      .google.apps.card.v1.OnClick on_click = 3;
    • setOnClick

      public Chip.Builder setOnClick(OnClick.Builder builderForValue)
       Optional. The action to perform when a user clicks the chip, such as
       opening a hyperlink or running a custom function.
       
      .google.apps.card.v1.OnClick on_click = 3;
    • mergeOnClick

      public Chip.Builder mergeOnClick(OnClick value)
       Optional. The action to perform when a user clicks the chip, such as
       opening a hyperlink or running a custom function.
       
      .google.apps.card.v1.OnClick on_click = 3;
    • clearOnClick

      public Chip.Builder clearOnClick()
       Optional. The action to perform when a user clicks the chip, such as
       opening a hyperlink or running a custom function.
       
      .google.apps.card.v1.OnClick on_click = 3;
    • getOnClickBuilder

      public OnClick.Builder getOnClickBuilder()
       Optional. The action to perform when a user clicks the chip, such as
       opening a hyperlink or running a custom function.
       
      .google.apps.card.v1.OnClick on_click = 3;
    • getOnClickOrBuilder

      public OnClickOrBuilder getOnClickOrBuilder()
       Optional. The action to perform when a user clicks the chip, such as
       opening a hyperlink or running a custom function.
       
      .google.apps.card.v1.OnClick on_click = 3;
      Specified by:
      getOnClickOrBuilder in interface ChipOrBuilder
    • getEnabled

      @Deprecated public boolean getEnabled()
      Deprecated.
      google.apps.card.v1.Chip.enabled is deprecated. See google/apps/card/v1/card.proto;l=2425
       Whether the chip is in an active state and responds to user actions.
       Defaults to `true`.
       Deprecated. Use `disabled` instead.
       
      bool enabled = 4 [deprecated = true];
      Specified by:
      getEnabled in interface ChipOrBuilder
      Returns:
      The enabled.
    • setEnabled

      @Deprecated public Chip.Builder setEnabled(boolean value)
      Deprecated.
      google.apps.card.v1.Chip.enabled is deprecated. See google/apps/card/v1/card.proto;l=2425
       Whether the chip is in an active state and responds to user actions.
       Defaults to `true`.
       Deprecated. Use `disabled` instead.
       
      bool enabled = 4 [deprecated = true];
      Parameters:
      value - The enabled to set.
      Returns:
      This builder for chaining.
    • clearEnabled

      @Deprecated public Chip.Builder clearEnabled()
      Deprecated.
      google.apps.card.v1.Chip.enabled is deprecated. See google/apps/card/v1/card.proto;l=2425
       Whether the chip is in an active state and responds to user actions.
       Defaults to `true`.
       Deprecated. Use `disabled` instead.
       
      bool enabled = 4 [deprecated = true];
      Returns:
      This builder for chaining.
    • getDisabled

      public boolean getDisabled()
       Whether the chip is in an inactive state and ignores user actions.
       Defaults to `false`.
       
      bool disabled = 6;
      Specified by:
      getDisabled in interface ChipOrBuilder
      Returns:
      The disabled.
    • setDisabled

      public Chip.Builder setDisabled(boolean value)
       Whether the chip is in an inactive state and ignores user actions.
       Defaults to `false`.
       
      bool disabled = 6;
      Parameters:
      value - The disabled to set.
      Returns:
      This builder for chaining.
    • clearDisabled

      public Chip.Builder clearDisabled()
       Whether the chip is in an inactive state and ignores user actions.
       Defaults to `false`.
       
      bool disabled = 6;
      Returns:
      This builder for chaining.
    • getAltText

      public String getAltText()
       The alternative text that's used for accessibility.
      
       Set descriptive text that lets users know what the chip does. For
       example, if a chip opens a hyperlink, write: "Opens a new
       browser tab and navigates to the Google Chat developer documentation at
       https://developers.google.com/workspace/chat".
       
      string alt_text = 5;
      Specified by:
      getAltText in interface ChipOrBuilder
      Returns:
      The altText.
    • getAltTextBytes

      public com.google.protobuf.ByteString getAltTextBytes()
       The alternative text that's used for accessibility.
      
       Set descriptive text that lets users know what the chip does. For
       example, if a chip opens a hyperlink, write: "Opens a new
       browser tab and navigates to the Google Chat developer documentation at
       https://developers.google.com/workspace/chat".
       
      string alt_text = 5;
      Specified by:
      getAltTextBytes in interface ChipOrBuilder
      Returns:
      The bytes for altText.
    • setAltText

      public Chip.Builder setAltText(String value)
       The alternative text that's used for accessibility.
      
       Set descriptive text that lets users know what the chip does. For
       example, if a chip opens a hyperlink, write: "Opens a new
       browser tab and navigates to the Google Chat developer documentation at
       https://developers.google.com/workspace/chat".
       
      string alt_text = 5;
      Parameters:
      value - The altText to set.
      Returns:
      This builder for chaining.
    • clearAltText

      public Chip.Builder clearAltText()
       The alternative text that's used for accessibility.
      
       Set descriptive text that lets users know what the chip does. For
       example, if a chip opens a hyperlink, write: "Opens a new
       browser tab and navigates to the Google Chat developer documentation at
       https://developers.google.com/workspace/chat".
       
      string alt_text = 5;
      Returns:
      This builder for chaining.
    • setAltTextBytes

      public Chip.Builder setAltTextBytes(com.google.protobuf.ByteString value)
       The alternative text that's used for accessibility.
      
       Set descriptive text that lets users know what the chip does. For
       example, if a chip opens a hyperlink, write: "Opens a new
       browser tab and navigates to the Google Chat developer documentation at
       https://developers.google.com/workspace/chat".
       
      string alt_text = 5;
      Parameters:
      value - The bytes for altText to set.
      Returns:
      This builder for chaining.