Class Contact.Builder (0.39.0)

public static final class Contact.Builder extends GeneratedMessageV3.Builder<Contact.Builder> implements ContactOrBuilder

A contact represents a person who is affiliated with a single company. A contact can have a variety of contact information associated to it, and can be invited to view their company's orders, line items, creatives, and reports.

Protobuf type google.ads.admanager.v1.Contact

Implements

ContactOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Contact build()
Returns
Type Description
Contact

buildPartial()

public Contact buildPartial()
Returns
Type Description
Contact

clear()

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

clearAddress()

public Contact.Builder clearAddress()

Optional. The address of the contact. This attribute has a maximum length of 1024 characters.

optional string address = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Contact.Builder

This builder for chaining.

clearCellPhone()

public Contact.Builder clearCellPhone()

Optional. The cell phone number where the contact can be reached.

optional string cell_phone = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Contact.Builder

This builder for chaining.

clearComment()

public Contact.Builder clearComment()

Optional. A free-form text comment for the contact. This attribute has a maximum length of 1024 characters.

optional string comment = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Contact.Builder

This builder for chaining.

clearCompany()

public Contact.Builder clearCompany()

Required. Immutable. The resource name of the Company. Format: "networks/{network_code}/companies/{company_id}"

optional string company = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
Contact.Builder

This builder for chaining.

clearDisplayName()

public Contact.Builder clearDisplayName()

Required. The name of the contact. This attribute has a maximum length of 127 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Contact.Builder

This builder for chaining.

clearEmail()

public Contact.Builder clearEmail()

Optional. The e-mail address where the contact can be reached. This attribute has a maximum length of 128 characters.

optional string email = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Contact.Builder

This builder for chaining.

clearFax()

public Contact.Builder clearFax()

Optional. The fax number where the contact can be reached. This attribute has a maximum length of 1024 characters.

optional string fax = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Contact.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Contact.Builder clearName()

Identifier. The resource name of the Contact. Format: networks/{network_code}/contacts/{contact_id}

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

Returns
Type Description
Contact.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearStatus()

public Contact.Builder clearStatus()

Output only. The status of the contact. This attribute is assigned by Google.

optional .google.ads.admanager.v1.ContactStatusEnum.ContactStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Contact.Builder

This builder for chaining.

clearTitle()

public Contact.Builder clearTitle()

Optional. The job title of the contact. This attribute has a maximum length of 1024 characters.

optional string title = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Contact.Builder

This builder for chaining.

clearWorkPhone()

public Contact.Builder clearWorkPhone()

Optional. The work phone number where the contact can be reached. This attribute has a maximum length of 1024 characters.

optional string work_phone = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Contact.Builder

This builder for chaining.

clone()

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

getAddress()

public String getAddress()

Optional. The address of the contact. This attribute has a maximum length of 1024 characters.

optional string address = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The address.

getAddressBytes()

public ByteString getAddressBytes()

Optional. The address of the contact. This attribute has a maximum length of 1024 characters.

optional string address = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for address.

getCellPhone()

public String getCellPhone()

Optional. The cell phone number where the contact can be reached.

optional string cell_phone = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The cellPhone.

getCellPhoneBytes()

public ByteString getCellPhoneBytes()

Optional. The cell phone number where the contact can be reached.

optional string cell_phone = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for cellPhone.

getComment()

public String getComment()

Optional. A free-form text comment for the contact. This attribute has a maximum length of 1024 characters.

optional string comment = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The comment.

getCommentBytes()

public ByteString getCommentBytes()

Optional. A free-form text comment for the contact. This attribute has a maximum length of 1024 characters.

optional string comment = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for comment.

getCompany()

public String getCompany()

Required. Immutable. The resource name of the Company. Format: "networks/{network_code}/companies/{company_id}"

optional string company = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The company.

getCompanyBytes()

public ByteString getCompanyBytes()

Required. Immutable. The resource name of the Company. Format: "networks/{network_code}/companies/{company_id}"

optional string company = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for company.

getDefaultInstanceForType()

public Contact getDefaultInstanceForType()
Returns
Type Description
Contact

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Required. The name of the contact. This attribute has a maximum length of 127 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The name of the contact. This attribute has a maximum length of 127 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getEmail()

public String getEmail()

Optional. The e-mail address where the contact can be reached. This attribute has a maximum length of 128 characters.

optional string email = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The email.

getEmailBytes()

public ByteString getEmailBytes()

Optional. The e-mail address where the contact can be reached. This attribute has a maximum length of 128 characters.

optional string email = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for email.

getFax()

public String getFax()

Optional. The fax number where the contact can be reached. This attribute has a maximum length of 1024 characters.

optional string fax = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The fax.

getFaxBytes()

public ByteString getFaxBytes()

Optional. The fax number where the contact can be reached. This attribute has a maximum length of 1024 characters.

optional string fax = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for fax.

getName()

public String getName()

Identifier. The resource name of the Contact. Format: networks/{network_code}/contacts/{contact_id}

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the Contact. Format: networks/{network_code}/contacts/{contact_id}

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

Returns
Type Description
ByteString

The bytes for name.

getStatus()

public ContactStatusEnum.ContactStatus getStatus()

Output only. The status of the contact. This attribute is assigned by Google.

optional .google.ads.admanager.v1.ContactStatusEnum.ContactStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ContactStatusEnum.ContactStatus

The status.

getStatusValue()

public int getStatusValue()

Output only. The status of the contact. This attribute is assigned by Google.

optional .google.ads.admanager.v1.ContactStatusEnum.ContactStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for status.

getTitle()

public String getTitle()

Optional. The job title of the contact. This attribute has a maximum length of 1024 characters.

optional string title = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Optional. The job title of the contact. This attribute has a maximum length of 1024 characters.

optional string title = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for title.

getWorkPhone()

public String getWorkPhone()

Optional. The work phone number where the contact can be reached. This attribute has a maximum length of 1024 characters.

optional string work_phone = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The workPhone.

getWorkPhoneBytes()

public ByteString getWorkPhoneBytes()

Optional. The work phone number where the contact can be reached. This attribute has a maximum length of 1024 characters.

optional string work_phone = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for workPhone.

hasAddress()

public boolean hasAddress()

Optional. The address of the contact. This attribute has a maximum length of 1024 characters.

optional string address = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the address field is set.

hasCellPhone()

public boolean hasCellPhone()

Optional. The cell phone number where the contact can be reached.

optional string cell_phone = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the cellPhone field is set.

hasComment()

public boolean hasComment()

Optional. A free-form text comment for the contact. This attribute has a maximum length of 1024 characters.

optional string comment = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the comment field is set.

hasCompany()

public boolean hasCompany()

Required. Immutable. The resource name of the Company. Format: "networks/{network_code}/companies/{company_id}"

optional string company = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the company field is set.

hasDisplayName()

public boolean hasDisplayName()

Required. The name of the contact. This attribute has a maximum length of 127 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the displayName field is set.

hasEmail()

public boolean hasEmail()

Optional. The e-mail address where the contact can be reached. This attribute has a maximum length of 128 characters.

optional string email = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the email field is set.

hasFax()

public boolean hasFax()

Optional. The fax number where the contact can be reached. This attribute has a maximum length of 1024 characters.

optional string fax = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the fax field is set.

hasStatus()

public boolean hasStatus()

Output only. The status of the contact. This attribute is assigned by Google.

optional .google.ads.admanager.v1.ContactStatusEnum.ContactStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the status field is set.

hasTitle()

public boolean hasTitle()

Optional. The job title of the contact. This attribute has a maximum length of 1024 characters.

optional string title = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the title field is set.

hasWorkPhone()

public boolean hasWorkPhone()

Optional. The work phone number where the contact can be reached. This attribute has a maximum length of 1024 characters.

optional string work_phone = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the workPhone field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Contact other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAddress(String value)

public Contact.Builder setAddress(String value)

Optional. The address of the contact. This attribute has a maximum length of 1024 characters.

optional string address = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The address to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setAddressBytes(ByteString value)

public Contact.Builder setAddressBytes(ByteString value)

Optional. The address of the contact. This attribute has a maximum length of 1024 characters.

optional string address = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for address to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setCellPhone(String value)

public Contact.Builder setCellPhone(String value)

Optional. The cell phone number where the contact can be reached.

optional string cell_phone = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The cellPhone to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setCellPhoneBytes(ByteString value)

public Contact.Builder setCellPhoneBytes(ByteString value)

Optional. The cell phone number where the contact can be reached.

optional string cell_phone = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for cellPhone to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setComment(String value)

public Contact.Builder setComment(String value)

Optional. A free-form text comment for the contact. This attribute has a maximum length of 1024 characters.

optional string comment = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The comment to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setCommentBytes(ByteString value)

public Contact.Builder setCommentBytes(ByteString value)

Optional. A free-form text comment for the contact. This attribute has a maximum length of 1024 characters.

optional string comment = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for comment to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setCompany(String value)

public Contact.Builder setCompany(String value)

Required. Immutable. The resource name of the Company. Format: "networks/{network_code}/companies/{company_id}"

optional string company = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The company to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setCompanyBytes(ByteString value)

public Contact.Builder setCompanyBytes(ByteString value)

Required. Immutable. The resource name of the Company. Format: "networks/{network_code}/companies/{company_id}"

optional string company = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for company to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setDisplayName(String value)

public Contact.Builder setDisplayName(String value)

Required. The name of the contact. This attribute has a maximum length of 127 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Contact.Builder setDisplayNameBytes(ByteString value)

Required. The name of the contact. This attribute has a maximum length of 127 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setEmail(String value)

public Contact.Builder setEmail(String value)

Optional. The e-mail address where the contact can be reached. This attribute has a maximum length of 128 characters.

optional string email = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The email to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setEmailBytes(ByteString value)

public Contact.Builder setEmailBytes(ByteString value)

Optional. The e-mail address where the contact can be reached. This attribute has a maximum length of 128 characters.

optional string email = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for email to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setFax(String value)

public Contact.Builder setFax(String value)

Optional. The fax number where the contact can be reached. This attribute has a maximum length of 1024 characters.

optional string fax = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The fax to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setFaxBytes(ByteString value)

public Contact.Builder setFaxBytes(ByteString value)

Optional. The fax number where the contact can be reached. This attribute has a maximum length of 1024 characters.

optional string fax = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for fax to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Contact.Builder setName(String value)

Identifier. The resource name of the Contact. Format: networks/{network_code}/contacts/{contact_id}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Contact.Builder setNameBytes(ByteString value)

Identifier. The resource name of the Contact. Format: networks/{network_code}/contacts/{contact_id}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

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

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

setStatus(ContactStatusEnum.ContactStatus value)

public Contact.Builder setStatus(ContactStatusEnum.ContactStatus value)

Output only. The status of the contact. This attribute is assigned by Google.

optional .google.ads.admanager.v1.ContactStatusEnum.ContactStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ContactStatusEnum.ContactStatus

The status to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setStatusValue(int value)

public Contact.Builder setStatusValue(int value)

Output only. The status of the contact. This attribute is assigned by Google.

optional .google.ads.admanager.v1.ContactStatusEnum.ContactStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

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

Returns
Type Description
Contact.Builder

This builder for chaining.

setTitle(String value)

public Contact.Builder setTitle(String value)

Optional. The job title of the contact. This attribute has a maximum length of 1024 characters.

optional string title = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The title to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setTitleBytes(ByteString value)

public Contact.Builder setTitleBytes(ByteString value)

Optional. The job title of the contact. This attribute has a maximum length of 1024 characters.

optional string title = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for title to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setWorkPhone(String value)

public Contact.Builder setWorkPhone(String value)

Optional. The work phone number where the contact can be reached. This attribute has a maximum length of 1024 characters.

optional string work_phone = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The workPhone to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setWorkPhoneBytes(ByteString value)

public Contact.Builder setWorkPhoneBytes(ByteString value)

Optional. The work phone number where the contact can be reached. This attribute has a maximum length of 1024 characters.

optional string work_phone = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for workPhone to set.

Returns
Type Description
Contact.Builder

This builder for chaining.