Class SearchLinkPromotion.Builder (0.58.0)

public static final class SearchLinkPromotion.Builder extends GeneratedMessageV3.Builder<SearchLinkPromotion.Builder> implements SearchLinkPromotionOrBuilder

Promotion proto includes uri and other helping information to display the promotion.

Protobuf type google.cloud.discoveryengine.v1.SearchLinkPromotion

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SearchLinkPromotion.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SearchLinkPromotion.Builder
Overrides

build()

public SearchLinkPromotion build()
Returns
Type Description
SearchLinkPromotion

buildPartial()

public SearchLinkPromotion buildPartial()
Returns
Type Description
SearchLinkPromotion

clear()

public SearchLinkPromotion.Builder clear()
Returns
Type Description
SearchLinkPromotion.Builder
Overrides

clearDescription()

public SearchLinkPromotion.Builder clearDescription()

Optional. The Promotion description. Maximum length: 200 characters.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchLinkPromotion.Builder

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
Type Description
SearchLinkPromotion.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SearchLinkPromotion.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SearchLinkPromotion.Builder
Overrides

clearImageUri()

public SearchLinkPromotion.Builder clearImageUri()

Optional. The promotion thumbnail image url.

string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchLinkPromotion.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SearchLinkPromotion.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SearchLinkPromotion.Builder
Overrides

clearTitle()

public SearchLinkPromotion.Builder clearTitle()

Required. The title of the promotion. Maximum length: 160 characters.

string title = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SearchLinkPromotion.Builder

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
Type Description
SearchLinkPromotion.Builder

This builder for chaining.

clone()

public SearchLinkPromotion.Builder clone()
Returns
Type Description
SearchLinkPromotion.Builder
Overrides

getDefaultInstanceForType()

public SearchLinkPromotion getDefaultInstanceForType()
Returns
Type Description
SearchLinkPromotion

getDescription()

public String getDescription()

Optional. The Promotion description. Maximum length: 200 characters.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. The Promotion description. Maximum length: 200 characters.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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

Returns
Type Description
boolean

The enabled.

getImageUri()

public String getImageUri()

Optional. The promotion thumbnail image url.

string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The imageUri.

getImageUriBytes()

public ByteString getImageUriBytes()

Optional. The promotion thumbnail image url.

string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for imageUri.

getTitle()

public String getTitle()

Required. The title of the promotion. Maximum length: 160 characters.

string title = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Required. The title of the promotion. Maximum length: 160 characters.

string title = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for title.

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

Returns
Type Description
String

The uri.

getUriBytes()

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

Returns
Type Description
ByteString

The bytes for uri.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SearchLinkPromotion other)

public SearchLinkPromotion.Builder mergeFrom(SearchLinkPromotion other)
Parameter
Name Description
other SearchLinkPromotion
Returns
Type Description
SearchLinkPromotion.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SearchLinkPromotion.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchLinkPromotion.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SearchLinkPromotion.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SearchLinkPromotion.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SearchLinkPromotion.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SearchLinkPromotion.Builder
Overrides

setDescription(String value)

public SearchLinkPromotion.Builder setDescription(String value)

Optional. The Promotion description. Maximum length: 200 characters.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
SearchLinkPromotion.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public SearchLinkPromotion.Builder setDescriptionBytes(ByteString value)

Optional. The Promotion description. Maximum length: 200 characters.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
SearchLinkPromotion.Builder

This builder for chaining.

setEnabled(boolean value)

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

Parameter
Name Description
value boolean

The enabled to set.

Returns
Type Description
SearchLinkPromotion.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SearchLinkPromotion.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SearchLinkPromotion.Builder
Overrides

setImageUri(String value)

public SearchLinkPromotion.Builder setImageUri(String value)

Optional. The promotion thumbnail image url.

string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The imageUri to set.

Returns
Type Description
SearchLinkPromotion.Builder

This builder for chaining.

setImageUriBytes(ByteString value)

public SearchLinkPromotion.Builder setImageUriBytes(ByteString value)

Optional. The promotion thumbnail image url.

string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for imageUri to set.

Returns
Type Description
SearchLinkPromotion.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SearchLinkPromotion.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SearchLinkPromotion.Builder
Overrides

setTitle(String value)

public SearchLinkPromotion.Builder setTitle(String value)

Required. The title of the promotion. Maximum length: 160 characters.

string title = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The title to set.

Returns
Type Description
SearchLinkPromotion.Builder

This builder for chaining.

setTitleBytes(ByteString value)

public SearchLinkPromotion.Builder setTitleBytes(ByteString value)

Required. The title of the promotion. Maximum length: 160 characters.

string title = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for title to set.

Returns
Type Description
SearchLinkPromotion.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SearchLinkPromotion.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SearchLinkPromotion.Builder
Overrides

setUri(String value)

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

Parameter
Name Description
value String

The uri to set.

Returns
Type Description
SearchLinkPromotion.Builder

This builder for chaining.

setUriBytes(ByteString value)

public SearchLinkPromotion.Builder setUriBytes(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];

Parameter
Name Description
value ByteString

The bytes for uri to set.

Returns
Type Description
SearchLinkPromotion.Builder

This builder for chaining.