Class: Google::Apis::HomegraphV1::QueryRequest

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

Overview

Request type for the Query call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ QueryRequest

Returns a new instance of QueryRequest.



505
506
507
# File 'lib/google/apis/homegraph_v1/classes.rb', line 505

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

Instance Attribute Details

#agent_user_idString

Required. Third-party user ID. Corresponds to the JSON property agentUserId

Returns:

  • (String)


477
478
479
# File 'lib/google/apis/homegraph_v1/classes.rb', line 477

def agent_user_id
  @agent_user_id
end

#device_viewString

Optional. Specifies the type of device data to be returned in the response. This allows callers to request traditional Smart Home traits, Unified Device Data Model (UDDM) traits, or both. If unspecified, defaults to SMART_HOME_TRAIT_ONLY. Corresponds to the JSON property deviceView

Returns:

  • (String)


485
486
487
# File 'lib/google/apis/homegraph_v1/classes.rb', line 485

def device_view
  @device_view
end

#include_device_metadataBoolean Also known as: include_device_metadata?

Optional. If true, the response will include device metadata in the device_metadata field. Corresponds to the JSON property includeDeviceMetadata

Returns:

  • (Boolean)


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

def 
  @include_device_metadata
end

#inputsArray<Google::Apis::HomegraphV1::QueryRequestInput>

Required. Inputs containing third-party device IDs for which to get the device states. Corresponds to the JSON property inputs



498
499
500
# File 'lib/google/apis/homegraph_v1/classes.rb', line 498

def inputs
  @inputs
end

#request_idString

Request ID used for debugging. Corresponds to the JSON property requestId

Returns:

  • (String)


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

def request_id
  @request_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



510
511
512
513
514
515
516
# File 'lib/google/apis/homegraph_v1/classes.rb', line 510

def update!(**args)
  @agent_user_id = args[:agent_user_id] if args.key?(:agent_user_id)
  @device_view = args[:device_view] if args.key?(:device_view)
  @include_device_metadata = args[:include_device_metadata] if args.key?(:include_device_metadata)
  @inputs = args[:inputs] if args.key?(:inputs)
  @request_id = args[:request_id] if args.key?(:request_id)
end