Class SearchLinkPromotion.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SearchLinkPromotion.Builder>
com.google.cloud.discoveryengine.v1.SearchLinkPromotion.Builder
All Implemented Interfaces:
SearchLinkPromotionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SearchLinkPromotion

public static final class SearchLinkPromotion.Builder extends com.google.protobuf.GeneratedMessage.Builder<SearchLinkPromotion.Builder> implements SearchLinkPromotionOrBuilder
 Promotion proto includes uri and other helping information to display the
 promotion.
 
Protobuf type google.cloud.discoveryengine.v1.SearchLinkPromotion
  • 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<SearchLinkPromotion.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<SearchLinkPromotion.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<SearchLinkPromotion.Builder>
    • getDefaultInstanceForType

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

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

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

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

    • isInitialized

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

      public SearchLinkPromotion.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<SearchLinkPromotion.Builder>
      Throws:
      IOException
    • getTitle

      public String getTitle()
       Required. The title of the promotion.
       Maximum length: 160 characters.
       
      string title = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTitle in interface SearchLinkPromotionOrBuilder
      Returns:
      The title.
    • getTitleBytes

      public com.google.protobuf.ByteString getTitleBytes()
       Required. The title of the promotion.
       Maximum length: 160 characters.
       
      string title = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTitleBytes in interface SearchLinkPromotionOrBuilder
      Returns:
      The bytes for title.
    • setTitle

      public SearchLinkPromotion.Builder setTitle(String value)
       Required. The title of the promotion.
       Maximum length: 160 characters.
       
      string title = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The title to set.
      Returns:
      This builder for chaining.
    • clearTitle

      public SearchLinkPromotion.Builder clearTitle()
       Required. The title of the promotion.
       Maximum length: 160 characters.
       
      string title = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setTitleBytes

      public SearchLinkPromotion.Builder setTitleBytes(com.google.protobuf.ByteString value)
       Required. The title of the promotion.
       Maximum length: 160 characters.
       
      string title = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for title to set.
      Returns:
      This builder for chaining.
    • getUri

      public String getUri()
       Optional. The URL for the page the user wants to promote. Must be set for
       site search. For other verticals, this is optional.
       
      string uri = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getUri in interface SearchLinkPromotionOrBuilder
      Returns:
      The uri.
    • getUriBytes

      public com.google.protobuf.ByteString getUriBytes()
       Optional. The URL for the page the user wants to promote. Must be set for
       site search. For other verticals, this is optional.
       
      string uri = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getUriBytes in interface SearchLinkPromotionOrBuilder
      Returns:
      The bytes for uri.
    • setUri

      public SearchLinkPromotion.Builder setUri(String value)
       Optional. The URL for the page the user wants to promote. Must be set for
       site search. For other verticals, this is optional.
       
      string uri = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The uri to set.
      Returns:
      This builder for chaining.
    • clearUri

      public SearchLinkPromotion.Builder clearUri()
       Optional. The URL for the page the user wants to promote. Must be set for
       site search. For other verticals, this is optional.
       
      string uri = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setUriBytes

      public SearchLinkPromotion.Builder setUriBytes(com.google.protobuf.ByteString value)
       Optional. The URL for the page the user wants to promote. Must be set for
       site search. For other verticals, this is optional.
       
      string uri = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for uri to set.
      Returns:
      This builder for chaining.
    • getDocument

      public String getDocument()
       Optional. The [Document][google.cloud.discoveryengine.v1.Document] the user
       wants to promote. For site search, leave unset and only populate uri. Can
       be set along with uri.
       
      string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getDocument in interface SearchLinkPromotionOrBuilder
      Returns:
      The document.
    • getDocumentBytes

      public com.google.protobuf.ByteString getDocumentBytes()
       Optional. The [Document][google.cloud.discoveryengine.v1.Document] the user
       wants to promote. For site search, leave unset and only populate uri. Can
       be set along with uri.
       
      string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getDocumentBytes in interface SearchLinkPromotionOrBuilder
      Returns:
      The bytes for document.
    • setDocument

      public SearchLinkPromotion.Builder setDocument(String value)
       Optional. The [Document][google.cloud.discoveryengine.v1.Document] the user
       wants to promote. For site search, leave unset and only populate uri. Can
       be set along with uri.
       
      string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The document to set.
      Returns:
      This builder for chaining.
    • clearDocument

      public SearchLinkPromotion.Builder clearDocument()
       Optional. The [Document][google.cloud.discoveryengine.v1.Document] the user
       wants to promote. For site search, leave unset and only populate uri. Can
       be set along with uri.
       
      string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setDocumentBytes

      public SearchLinkPromotion.Builder setDocumentBytes(com.google.protobuf.ByteString value)
       Optional. The [Document][google.cloud.discoveryengine.v1.Document] the user
       wants to promote. For site search, leave unset and only populate uri. Can
       be set along with uri.
       
      string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for document to set.
      Returns:
      This builder for chaining.
    • getImageUri

      public String getImageUri()
       Optional. The promotion thumbnail image url.
       
      string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getImageUri in interface SearchLinkPromotionOrBuilder
      Returns:
      The imageUri.
    • getImageUriBytes

      public com.google.protobuf.ByteString getImageUriBytes()
       Optional. The promotion thumbnail image url.
       
      string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getImageUriBytes in interface SearchLinkPromotionOrBuilder
      Returns:
      The bytes for imageUri.
    • setImageUri

      public SearchLinkPromotion.Builder setImageUri(String value)
       Optional. The promotion thumbnail image url.
       
      string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The imageUri to set.
      Returns:
      This builder for chaining.
    • clearImageUri

      public SearchLinkPromotion.Builder clearImageUri()
       Optional. The promotion thumbnail image url.
       
      string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setImageUriBytes

      public SearchLinkPromotion.Builder setImageUriBytes(com.google.protobuf.ByteString value)
       Optional. The promotion thumbnail image url.
       
      string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for imageUri to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       Optional. The Promotion description.
       Maximum length: 200 characters.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface SearchLinkPromotionOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. The Promotion description.
       Maximum length: 200 characters.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface SearchLinkPromotionOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public SearchLinkPromotion.Builder setDescription(String value)
       Optional. The Promotion description.
       Maximum length: 200 characters.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public SearchLinkPromotion.Builder clearDescription()
       Optional. The Promotion description.
       Maximum length: 200 characters.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public SearchLinkPromotion.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Optional. The Promotion description.
       Maximum length: 200 characters.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getEnabled

      public boolean getEnabled()
       Optional. The enabled promotion will be returned for any serving configs
       associated with the parent of the control this promotion is attached to.
      
       This flag is used for basic site search only.
       
      bool enabled = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEnabled in interface SearchLinkPromotionOrBuilder
      Returns:
      The enabled.
    • setEnabled

      public SearchLinkPromotion.Builder setEnabled(boolean value)
       Optional. The enabled promotion will be returned for any serving configs
       associated with the parent of the control this promotion is attached to.
      
       This flag is used for basic site search only.
       
      bool enabled = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enabled to set.
      Returns:
      This builder for chaining.
    • clearEnabled

      public SearchLinkPromotion.Builder clearEnabled()
       Optional. The enabled promotion will be returned for any serving configs
       associated with the parent of the control this promotion is attached to.
      
       This flag is used for basic site search only.
       
      bool enabled = 5 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.