Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1Context

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

Overview

Represents a context.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2beta1Context

Returns a new instance of GoogleCloudDialogflowV2beta1Context



2420
2421
2422
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 2420

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

Instance Attribute Details

#lifespan_countFixnum

Optional. The number of conversational query requests after which the context expires. If set to 0 (the default) the context expires immediately. Contexts expire automatically after 10 minutes even if there are no matching queries. Corresponds to the JSON property lifespanCount

Returns:

  • (Fixnum)


2398
2399
2400
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 2398

def lifespan_count
  @lifespan_count
end

#nameString

Required. The unique identifier of the context. Format: projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>, or projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/contexts/<Context ID>. Note: Environments and users are under construction and will be available soon. The Context ID is always converted to lowercase. If is not specified, we assume default 'draft' environment. If is not specified, we assume default '-' user. Corresponds to the JSON property name

Returns:

  • (String)


2411
2412
2413
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 2411

def name
  @name
end

#parametersHash<String,Object>

Optional. The collection of parameters associated with this context. Refer to this doc for syntax. Corresponds to the JSON property parameters

Returns:

  • (Hash<String,Object>)


2418
2419
2420
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 2418

def parameters
  @parameters
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2425
2426
2427
2428
2429
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 2425

def update!(**args)
  @lifespan_count = args[:lifespan_count] if args.key?(:lifespan_count)
  @name = args[:name] if args.key?(:name)
  @parameters = args[:parameters] if args.key?(:parameters)
end