Class DeviceInfo.Builder (0.14.0)

public static final class DeviceInfo.Builder extends GeneratedMessage.Builder<DeviceInfo.Builder> implements DeviceInfoOrBuilder

Information about the device being used (if any) when the event happened.

Protobuf type google.ads.datamanager.v1.DeviceInfo

Implements

DeviceInfoOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public DeviceInfo build()
Returns
Type Description
DeviceInfo

buildPartial()

public DeviceInfo buildPartial()
Returns
Type Description
DeviceInfo

clear()

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

clearBrand()

public DeviceInfo.Builder clearBrand()

Optional. The brand of the device.

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

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

clearBrowser()

public DeviceInfo.Builder clearBrowser()

Optional. The brand or type of the browser.

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

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

clearBrowserVersion()

public DeviceInfo.Builder clearBrowserVersion()

Optional. The version of the browser.

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

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

clearCategory()

public DeviceInfo.Builder clearCategory()

Optional. The category of device. For example, “desktop”, “tablet”, “mobile”, “smart TV”.

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

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

clearIpAddress()

public DeviceInfo.Builder clearIpAddress()

Optional. The IP address of the device for the given context.

Note: Google Ads does not support IP address matching for end users in the European Economic Area (EEA), United Kingdom (UK), or Switzerland (CH). Add logic to conditionally exclude sharing IP addresses from users from these regions and ensure that you provide users with clear and comprehensive information about the data you collect on your sites, apps, and other properties and get consent where required by law or any applicable Google policies. See the About offline conversion imports page for more details.

string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

clearLanguageCode()

public DeviceInfo.Builder clearLanguageCode()

Optional. The language the device uses in ISO 639-1 format.

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

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

clearModel()

public DeviceInfo.Builder clearModel()

Optional. The model of the device.

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

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

clearOperatingSystem()

public DeviceInfo.Builder clearOperatingSystem()

Optional. The operating system or platform of the device.

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

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

clearOperatingSystemVersion()

public DeviceInfo.Builder clearOperatingSystemVersion()

Optional. The version of the operating system or platform.

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

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

clearScreenHeight()

public DeviceInfo.Builder clearScreenHeight()

Optional. The height of the screen in pixels.

int32 screen_height = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

clearScreenWidth()

public DeviceInfo.Builder clearScreenWidth()

Optional. The width of the screen in pixels.

int32 screen_width = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

clearUserAgent()

public DeviceInfo.Builder clearUserAgent()

Optional. The user-agent string of the device for the given context.

string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

getBrand()

public String getBrand()

Optional. The brand of the device.

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

Returns
Type Description
String

The brand.

getBrandBytes()

public ByteString getBrandBytes()

Optional. The brand of the device.

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

Returns
Type Description
ByteString

The bytes for brand.

getBrowser()

public String getBrowser()

Optional. The brand or type of the browser.

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

Returns
Type Description
String

The browser.

getBrowserBytes()

public ByteString getBrowserBytes()

Optional. The brand or type of the browser.

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

Returns
Type Description
ByteString

The bytes for browser.

getBrowserVersion()

public String getBrowserVersion()

Optional. The version of the browser.

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

Returns
Type Description
String

The browserVersion.

getBrowserVersionBytes()

public ByteString getBrowserVersionBytes()

Optional. The version of the browser.

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

Returns
Type Description
ByteString

The bytes for browserVersion.

getCategory()

public String getCategory()

Optional. The category of device. For example, “desktop”, “tablet”, “mobile”, “smart TV”.

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

Returns
Type Description
String

The category.

getCategoryBytes()

public ByteString getCategoryBytes()

Optional. The category of device. For example, “desktop”, “tablet”, “mobile”, “smart TV”.

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

Returns
Type Description
ByteString

The bytes for category.

getDefaultInstanceForType()

public DeviceInfo getDefaultInstanceForType()
Returns
Type Description
DeviceInfo

getDescriptorForType()

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

getIpAddress()

public String getIpAddress()

Optional. The IP address of the device for the given context.

Note: Google Ads does not support IP address matching for end users in the European Economic Area (EEA), United Kingdom (UK), or Switzerland (CH). Add logic to conditionally exclude sharing IP addresses from users from these regions and ensure that you provide users with clear and comprehensive information about the data you collect on your sites, apps, and other properties and get consent where required by law or any applicable Google policies. See the About offline conversion imports page for more details.

string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The ipAddress.

getIpAddressBytes()

public ByteString getIpAddressBytes()

Optional. The IP address of the device for the given context.

Note: Google Ads does not support IP address matching for end users in the European Economic Area (EEA), United Kingdom (UK), or Switzerland (CH). Add logic to conditionally exclude sharing IP addresses from users from these regions and ensure that you provide users with clear and comprehensive information about the data you collect on your sites, apps, and other properties and get consent where required by law or any applicable Google policies. See the About offline conversion imports page for more details.

string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for ipAddress.

getLanguageCode()

public String getLanguageCode()

Optional. The language the device uses in ISO 639-1 format.

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

Returns
Type Description
String

The languageCode.

getLanguageCodeBytes()

public ByteString getLanguageCodeBytes()

Optional. The language the device uses in ISO 639-1 format.

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

Returns
Type Description
ByteString

The bytes for languageCode.

getModel()

public String getModel()

Optional. The model of the device.

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

Returns
Type Description
String

The model.

getModelBytes()

public ByteString getModelBytes()

Optional. The model of the device.

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

Returns
Type Description
ByteString

The bytes for model.

getOperatingSystem()

public String getOperatingSystem()

Optional. The operating system or platform of the device.

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

Returns
Type Description
String

The operatingSystem.

getOperatingSystemBytes()

public ByteString getOperatingSystemBytes()

Optional. The operating system or platform of the device.

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

Returns
Type Description
ByteString

The bytes for operatingSystem.

getOperatingSystemVersion()

public String getOperatingSystemVersion()

Optional. The version of the operating system or platform.

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

Returns
Type Description
String

The operatingSystemVersion.

getOperatingSystemVersionBytes()

public ByteString getOperatingSystemVersionBytes()

Optional. The version of the operating system or platform.

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

Returns
Type Description
ByteString

The bytes for operatingSystemVersion.

getScreenHeight()

public int getScreenHeight()

Optional. The height of the screen in pixels.

int32 screen_height = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The screenHeight.

getScreenWidth()

public int getScreenWidth()

Optional. The width of the screen in pixels.

int32 screen_width = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The screenWidth.

getUserAgent()

public String getUserAgent()

Optional. The user-agent string of the device for the given context.

string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The userAgent.

getUserAgentBytes()

public ByteString getUserAgentBytes()

Optional. The user-agent string of the device for the given context.

string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for userAgent.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(DeviceInfo other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setBrand(String value)

public DeviceInfo.Builder setBrand(String value)

Optional. The brand of the device.

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

Parameter
Name Description
value String

The brand to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setBrandBytes(ByteString value)

public DeviceInfo.Builder setBrandBytes(ByteString value)

Optional. The brand of the device.

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

Parameter
Name Description
value ByteString

The bytes for brand to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setBrowser(String value)

public DeviceInfo.Builder setBrowser(String value)

Optional. The brand or type of the browser.

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

Parameter
Name Description
value String

The browser to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setBrowserBytes(ByteString value)

public DeviceInfo.Builder setBrowserBytes(ByteString value)

Optional. The brand or type of the browser.

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

Parameter
Name Description
value ByteString

The bytes for browser to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setBrowserVersion(String value)

public DeviceInfo.Builder setBrowserVersion(String value)

Optional. The version of the browser.

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

Parameter
Name Description
value String

The browserVersion to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setBrowserVersionBytes(ByteString value)

public DeviceInfo.Builder setBrowserVersionBytes(ByteString value)

Optional. The version of the browser.

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

Parameter
Name Description
value ByteString

The bytes for browserVersion to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setCategory(String value)

public DeviceInfo.Builder setCategory(String value)

Optional. The category of device. For example, “desktop”, “tablet”, “mobile”, “smart TV”.

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

Parameter
Name Description
value String

The category to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setCategoryBytes(ByteString value)

public DeviceInfo.Builder setCategoryBytes(ByteString value)

Optional. The category of device. For example, “desktop”, “tablet”, “mobile”, “smart TV”.

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

Parameter
Name Description
value ByteString

The bytes for category to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setIpAddress(String value)

public DeviceInfo.Builder setIpAddress(String value)

Optional. The IP address of the device for the given context.

Note: Google Ads does not support IP address matching for end users in the European Economic Area (EEA), United Kingdom (UK), or Switzerland (CH). Add logic to conditionally exclude sharing IP addresses from users from these regions and ensure that you provide users with clear and comprehensive information about the data you collect on your sites, apps, and other properties and get consent where required by law or any applicable Google policies. See the About offline conversion imports page for more details.

string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The ipAddress to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setIpAddressBytes(ByteString value)

public DeviceInfo.Builder setIpAddressBytes(ByteString value)

Optional. The IP address of the device for the given context.

Note: Google Ads does not support IP address matching for end users in the European Economic Area (EEA), United Kingdom (UK), or Switzerland (CH). Add logic to conditionally exclude sharing IP addresses from users from these regions and ensure that you provide users with clear and comprehensive information about the data you collect on your sites, apps, and other properties and get consent where required by law or any applicable Google policies. See the About offline conversion imports page for more details.

string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for ipAddress to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setLanguageCode(String value)

public DeviceInfo.Builder setLanguageCode(String value)

Optional. The language the device uses in ISO 639-1 format.

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

Parameter
Name Description
value String

The languageCode to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setLanguageCodeBytes(ByteString value)

public DeviceInfo.Builder setLanguageCodeBytes(ByteString value)

Optional. The language the device uses in ISO 639-1 format.

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

Parameter
Name Description
value ByteString

The bytes for languageCode to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setModel(String value)

public DeviceInfo.Builder setModel(String value)

Optional. The model of the device.

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

Parameter
Name Description
value String

The model to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setModelBytes(ByteString value)

public DeviceInfo.Builder setModelBytes(ByteString value)

Optional. The model of the device.

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

Parameter
Name Description
value ByteString

The bytes for model to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setOperatingSystem(String value)

public DeviceInfo.Builder setOperatingSystem(String value)

Optional. The operating system or platform of the device.

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

Parameter
Name Description
value String

The operatingSystem to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setOperatingSystemBytes(ByteString value)

public DeviceInfo.Builder setOperatingSystemBytes(ByteString value)

Optional. The operating system or platform of the device.

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

Parameter
Name Description
value ByteString

The bytes for operatingSystem to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setOperatingSystemVersion(String value)

public DeviceInfo.Builder setOperatingSystemVersion(String value)

Optional. The version of the operating system or platform.

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

Parameter
Name Description
value String

The operatingSystemVersion to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setOperatingSystemVersionBytes(ByteString value)

public DeviceInfo.Builder setOperatingSystemVersionBytes(ByteString value)

Optional. The version of the operating system or platform.

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

Parameter
Name Description
value ByteString

The bytes for operatingSystemVersion to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setScreenHeight(int value)

public DeviceInfo.Builder setScreenHeight(int value)

Optional. The height of the screen in pixels.

int32 screen_height = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The screenHeight to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setScreenWidth(int value)

public DeviceInfo.Builder setScreenWidth(int value)

Optional. The width of the screen in pixels.

int32 screen_width = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The screenWidth to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setUserAgent(String value)

public DeviceInfo.Builder setUserAgent(String value)

Optional. The user-agent string of the device for the given context.

string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The userAgent to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.

setUserAgentBytes(ByteString value)

public DeviceInfo.Builder setUserAgentBytes(ByteString value)

Optional. The user-agent string of the device for the given context.

string user_agent = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for userAgent to set.

Returns
Type Description
DeviceInfo.Builder

This builder for chaining.