Class: Google::Apis::CesV1::Example

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

Overview

An example represents a sample conversation between the user and the agent(s).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Example

Returns a new instance of Example.



3154
3155
3156
# File 'lib/google/apis/ces_v1/classes.rb', line 3154

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

Instance Attribute Details

#create_timeString

Output only. Timestamp when the example was created. Corresponds to the JSON property createTime

Returns:

  • (String)


3105
3106
3107
# File 'lib/google/apis/ces_v1/classes.rb', line 3105

def create_time
  @create_time
end

#descriptionString

Optional. Human-readable description of the example. Corresponds to the JSON property description

Returns:

  • (String)


3110
3111
3112
# File 'lib/google/apis/ces_v1/classes.rb', line 3110

def description
  @description
end

#display_nameString

Required. Display name of the example. Corresponds to the JSON property displayName

Returns:

  • (String)


3115
3116
3117
# File 'lib/google/apis/ces_v1/classes.rb', line 3115

def display_name
  @display_name
end

#entry_agentString

Optional. The agent that initially handles the conversation. If not specified, the example represents a conversation that is handled by the root agent. Format: projects/project/locations/location/apps/app/agents/agent` Corresponds to the JSON propertyentryAgent`

Returns:

  • (String)


3122
3123
3124
# File 'lib/google/apis/ces_v1/classes.rb', line 3122

def entry_agent
  @entry_agent
end

#etagString

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes. Corresponds to the JSON property etag

Returns:

  • (String)


3129
3130
3131
# File 'lib/google/apis/ces_v1/classes.rb', line 3129

def etag
  @etag
end

#invalidBoolean Also known as: invalid?

Output only. The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples. Corresponds to the JSON property invalid

Returns:

  • (Boolean)


3135
3136
3137
# File 'lib/google/apis/ces_v1/classes.rb', line 3135

def invalid
  @invalid
end

#messagesArray<Google::Apis::CesV1::Message>

Optional. The collection of messages that make up the conversation. Corresponds to the JSON property messages

Returns:



3141
3142
3143
# File 'lib/google/apis/ces_v1/classes.rb', line 3141

def messages
  @messages
end

#nameString

Identifier. The unique identifier of the example. Format: projects/project/ locations/location/apps/app/examples/example` Corresponds to the JSON propertyname`

Returns:

  • (String)


3147
3148
3149
# File 'lib/google/apis/ces_v1/classes.rb', line 3147

def name
  @name
end

#update_timeString

Output only. Timestamp when the example was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


3152
3153
3154
# File 'lib/google/apis/ces_v1/classes.rb', line 3152

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
# File 'lib/google/apis/ces_v1/classes.rb', line 3159

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @display_name = args[:display_name] if args.key?(:display_name)
  @entry_agent = args[:entry_agent] if args.key?(:entry_agent)
  @etag = args[:etag] if args.key?(:etag)
  @invalid = args[:invalid] if args.key?(:invalid)
  @messages = args[:messages] if args.key?(:messages)
  @name = args[:name] if args.key?(:name)
  @update_time = args[:update_time] if args.key?(:update_time)
end