Class: Google::Apis::DatamanagerV1::DeviceInfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/datamanager_v1/classes.rb,
lib/google/apis/datamanager_v1/representations.rb,
lib/google/apis/datamanager_v1/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DeviceInfo

Returns a new instance of DeviceInfo.



503
504
505
# File 'lib/google/apis/datamanager_v1/classes.rb', line 503

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#brandString

Optional. The brand of the device. Corresponds to the JSON property brand

Returns:

  • (String)


437
438
439
# File 'lib/google/apis/datamanager_v1/classes.rb', line 437

def brand
  @brand
end

#browserString

Optional. The brand or type of the browser. Corresponds to the JSON property browser

Returns:

  • (String)


442
443
444
# File 'lib/google/apis/datamanager_v1/classes.rb', line 442

def browser
  @browser
end

#browser_versionString

Optional. The version of the browser. Corresponds to the JSON property browserVersion

Returns:

  • (String)


447
448
449
# File 'lib/google/apis/datamanager_v1/classes.rb', line 447

def browser_version
  @browser_version
end

#categoryString

Optional. The category of device. For example, “desktop”, “tablet”, “mobile”, “ smart TV”. Corresponds to the JSON property category

Returns:

  • (String)


453
454
455
# File 'lib/google/apis/datamanager_v1/classes.rb', line 453

def category
  @category
end

#ip_addressString

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. Corresponds to the JSON property ipAddress

Returns:

  • (String)


466
467
468
# File 'lib/google/apis/datamanager_v1/classes.rb', line 466

def ip_address
  @ip_address
end

#language_codeString

Optional. The language the device uses in ISO 639-1 format. Corresponds to the JSON property languageCode

Returns:

  • (String)


471
472
473
# File 'lib/google/apis/datamanager_v1/classes.rb', line 471

def language_code
  @language_code
end

#modelString

Optional. The model of the device. Corresponds to the JSON property model

Returns:

  • (String)


476
477
478
# File 'lib/google/apis/datamanager_v1/classes.rb', line 476

def model
  @model
end

#operating_systemString

Optional. The operating system or platform of the device. Corresponds to the JSON property operatingSystem

Returns:

  • (String)


481
482
483
# File 'lib/google/apis/datamanager_v1/classes.rb', line 481

def operating_system
  @operating_system
end

#operating_system_versionString

Optional. The version of the operating system or platform. Corresponds to the JSON property operatingSystemVersion

Returns:

  • (String)


486
487
488
# File 'lib/google/apis/datamanager_v1/classes.rb', line 486

def operating_system_version
  @operating_system_version
end

#screen_heightFixnum

Optional. The height of the screen in pixels. Corresponds to the JSON property screenHeight

Returns:

  • (Fixnum)


491
492
493
# File 'lib/google/apis/datamanager_v1/classes.rb', line 491

def screen_height
  @screen_height
end

#screen_widthFixnum

Optional. The width of the screen in pixels. Corresponds to the JSON property screenWidth

Returns:

  • (Fixnum)


496
497
498
# File 'lib/google/apis/datamanager_v1/classes.rb', line 496

def screen_width
  @screen_width
end

#user_agentString

Optional. The user-agent string of the device for the given context. Corresponds to the JSON property userAgent

Returns:

  • (String)


501
502
503
# File 'lib/google/apis/datamanager_v1/classes.rb', line 501

def user_agent
  @user_agent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'lib/google/apis/datamanager_v1/classes.rb', line 508

def update!(**args)
  @brand = args[:brand] if args.key?(:brand)
  @browser = args[:browser] if args.key?(:browser)
  @browser_version = args[:browser_version] if args.key?(:browser_version)
  @category = args[:category] if args.key?(:category)
  @ip_address = args[:ip_address] if args.key?(:ip_address)
  @language_code = args[:language_code] if args.key?(:language_code)
  @model = args[:model] if args.key?(:model)
  @operating_system = args[:operating_system] if args.key?(:operating_system)
  @operating_system_version = args[:operating_system_version] if args.key?(:operating_system_version)
  @screen_height = args[:screen_height] if args.key?(:screen_height)
  @screen_width = args[:screen_width] if args.key?(:screen_width)
  @user_agent = args[:user_agent] if args.key?(:user_agent)
end