Class EmailPreferences.Builder (1.11.0)

public static final class EmailPreferences.Builder extends GeneratedMessage.Builder<EmailPreferences.Builder> implements EmailPreferencesOrBuilder

The categories of notifications the user opted into / opted out of. The email preferences do not include mandatory announcements as users can't opt out of them.

Protobuf type google.shopping.merchant.accounts.v1beta.EmailPreferences

Static Methods

getDescriptor()

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

Methods

build()

public EmailPreferences build()
Returns
Type Description
EmailPreferences

buildPartial()

public EmailPreferences buildPartial()
Returns
Type Description
EmailPreferences

clear()

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

clearName()

public EmailPreferences.Builder clearName()

Identifier. The name of the EmailPreferences. The endpoint is only supported for the authenticated user.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
EmailPreferences.Builder

This builder for chaining.

clearNewsAndTips()

public EmailPreferences.Builder clearNewsAndTips()

Optional. Updates on new features, tips and best practices.

.google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInState news_and_tips = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EmailPreferences.Builder

This builder for chaining.

getDefaultInstanceForType()

public EmailPreferences getDefaultInstanceForType()
Returns
Type Description
EmailPreferences

getDescriptorForType()

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

getName()

public String getName()

Identifier. The name of the EmailPreferences. The endpoint is only supported for the authenticated user.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The name of the EmailPreferences. The endpoint is only supported for the authenticated user.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getNewsAndTips()

public EmailPreferences.OptInState getNewsAndTips()

Optional. Updates on new features, tips and best practices.

.google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInState news_and_tips = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EmailPreferences.OptInState

The newsAndTips.

getNewsAndTipsValue()

public int getNewsAndTipsValue()

Optional. Updates on new features, tips and best practices.

.google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInState news_and_tips = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for newsAndTips.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(EmailPreferences other)

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

setName(String value)

public EmailPreferences.Builder setName(String value)

Identifier. The name of the EmailPreferences. The endpoint is only supported for the authenticated user.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
EmailPreferences.Builder

This builder for chaining.

setNameBytes(ByteString value)

public EmailPreferences.Builder setNameBytes(ByteString value)

Identifier. The name of the EmailPreferences. The endpoint is only supported for the authenticated user.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
EmailPreferences.Builder

This builder for chaining.

setNewsAndTips(EmailPreferences.OptInState value)

public EmailPreferences.Builder setNewsAndTips(EmailPreferences.OptInState value)

Optional. Updates on new features, tips and best practices.

.google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInState news_and_tips = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value EmailPreferences.OptInState

The newsAndTips to set.

Returns
Type Description
EmailPreferences.Builder

This builder for chaining.

setNewsAndTipsValue(int value)

public EmailPreferences.Builder setNewsAndTipsValue(int value)

Optional. Updates on new features, tips and best practices.

.google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInState news_and_tips = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for newsAndTips to set.

Returns
Type Description
EmailPreferences.Builder

This builder for chaining.