Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment

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

Overview

You can create multiple versions of your agent and publish them to separate environments. When you edit an agent, you are editing the draft agent. At any point, you can save the draft agent as an agent version, which is an immutable snapshot of your agent. When you save the draft agent, it is published to the default environment. When you create agent versions, you can publish them to custom environments. You can create a variety of custom environments for: - testing - development - production - etc. For more information, see the versions and environments guide.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2Environment

Returns a new instance of GoogleCloudDialogflowV2Environment.



7961
7962
7963
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 7961

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

Instance Attribute Details

#agent_versionString

Optional. The agent version loaded into this environment. Supported formats: - projects//agent/versions/ - projects//locations//agent/versions/ Corresponds to the JSON property agentVersion

Returns:

  • (String)


7917
7918
7919
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 7917

def agent_version
  @agent_version
end

#descriptionString

Optional. The developer-provided description for this environment. The maximum length is 500 characters. If exceeded, the request is rejected. Corresponds to the JSON property description

Returns:

  • (String)


7923
7924
7925
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 7923

def description
  @description
end

#fulfillmentGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment

By default, your agent responds to a matched intent with a static response. As an alternative, you can provide a more dynamic response by using fulfillment. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. For example, if an end-user wants to schedule a haircut on Friday, your service can check your database and respond to the end-user with availability information for Friday. For more information, see the fulfillment guide. Corresponds to the JSON property fulfillment



7935
7936
7937
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 7935

def fulfillment
  @fulfillment
end

#nameString

Output only. The unique identifier of this agent environment. Supported formats: - projects//agent/environments/ - projects//locations//agent/ environments/ The environment ID for the default environment is -. Corresponds to the JSON property name

Returns:

  • (String)


7942
7943
7944
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 7942

def name
  @name
end

#stateString

Output only. The state of this environment. This field is read-only, i.e., it cannot be set by create and update methods. Corresponds to the JSON property state

Returns:

  • (String)


7948
7949
7950
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 7948

def state
  @state
end

#text_to_speech_settingsGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2TextToSpeechSettings

Instructs the speech synthesizer on how to generate the output audio content. Corresponds to the JSON property textToSpeechSettings



7953
7954
7955
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 7953

def text_to_speech_settings
  @text_to_speech_settings
end

#update_timeString

Output only. The last update time of this environment. This field is read-only, i.e., it cannot be set by create and update methods. Corresponds to the JSON property updateTime

Returns:

  • (String)


7959
7960
7961
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 7959

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7966
7967
7968
7969
7970
7971
7972
7973
7974
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 7966

def update!(**args)
  @agent_version = args[:agent_version] if args.key?(:agent_version)
  @description = args[:description] if args.key?(:description)
  @fulfillment = args[:fulfillment] if args.key?(:fulfillment)
  @name = args[:name] if args.key?(:name)
  @state = args[:state] if args.key?(:state)
  @text_to_speech_settings = args[:text_to_speech_settings] if args.key?(:text_to_speech_settings)
  @update_time = args[:update_time] if args.key?(:update_time)
end