Dialogflow API . projects . agent . environments

Instance Methods

intents()

Returns the intents Resource.

users()

Returns the users Resource.

close()

Close httplib2 connections.

create(parent, body=None, environmentId=None, x__xgafv=None)

Creates an agent environment.

delete(name, x__xgafv=None)

Deletes the specified agent environment.

get(name, x__xgafv=None)

Retrieves the specified agent environment.

getHistory(parent, pageSize=None, pageToken=None, x__xgafv=None)

Gets the history of the specified environment.

getHistory_next()

Retrieves the next page of results.

list(parent, pageSize=None, pageToken=None, x__xgafv=None)

Returns the list of all non-draft environments of the specified agent.

list_next()

Retrieves the next page of results.

patch(name, allowLoadToDraftAndDiscardChanges=None, body=None, updateMask=None, x__xgafv=None)

Updates the specified agent environment. This method allows you to deploy new agent versions into the environment. When an environment is pointed to a new agent version by setting `environment.agent_version`, the environment is temporarily set to the `LOADING` state. During that time, the environment keeps on serving the previous version of the agent. After the new agent version is done loading, the environment is set back to the `RUNNING` state. You can use "-" as Environment ID in environment name to update version in "draft" environment. WARNING: this will negate all recent changes to draft and can't be undone. You may want to save the draft to a version before calling this function.

Method Details

close()
Close httplib2 connections.
create(parent, body=None, environmentId=None, x__xgafv=None)
Creates an agent environment.

Args:
  parent: string, Required. The agent to create an environment for. Supported formats: - `projects//agent` - `projects//locations//agent` (required)
  body: object, The request body.
    The object takes the form of:

{ # 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](https://cloud.google.com/dialogflow/docs/agents-versions).
  "agentVersion": "A String", # Optional. The agent version loaded into this environment. Supported formats: - `projects//agent/versions/` - `projects//locations//agent/versions/`
  "description": "A String", # Optional. The developer-provided description for this environment. The maximum length is 500 characters. If exceeded, the request is rejected.
  "fulfillment": { # 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](https://cloud.google.com/dialogflow/docs/fulfillment-overview). # Optional. The fulfillment settings to use for this environment.
    "displayName": "A String", # The human-readable name of the fulfillment, unique within the agent. This field is not used for Fulfillment in an Environment.
    "enabled": True or False, # Whether fulfillment is enabled.
    "features": [ # The field defines whether the fulfillment is enabled for certain features.
      { # Whether fulfillment is enabled for the specific feature.
        "type": "A String", # The type of the feature that enabled for fulfillment.
      },
    ],
    "genericWebService": { # Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. More information could be found at: https://cloud.google.com/dialogflow/docs/fulfillment-configure. # Configuration for a generic web service.
      "isCloudFunction": True or False, # Optional. Indicates if generic web service is created through Cloud Functions integration. Defaults to false. is_cloud_function is deprecated. Cloud functions can be configured by its uri as a regular web service now.
      "password": "A String", # The password for HTTP Basic authentication.
      "requestHeaders": { # The HTTP request headers to send together with fulfillment requests.
        "a_key": "A String",
      },
      "uri": "A String", # Required. The fulfillment URI for receiving POST requests. It must use https protocol.
      "username": "A String", # The user name for HTTP Basic authentication.
    },
    "name": "A String", # Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment.
  },
  "name": "A String", # Output only. The unique identifier of this agent environment. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`
  "state": "A String", # Output only. The state of this environment. This field is read-only, i.e., it cannot be set by create and update methods.
  "textToSpeechSettings": { # Instructs the speech synthesizer on how to generate the output audio content. # Optional. Text to speech settings for this environment.
    "enableTextToSpeech": True or False, # Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.
    "outputAudioEncoding": "A String", # Required. Audio encoding of the synthesized audio content.
    "sampleRateHertz": 42, # Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).
    "synthesizeSpeechConfigs": { # Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.
      "a_key": { # Configuration of how speech should be synthesized.
        "effectsProfileId": [ # Optional. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given.
          "A String",
        ],
        "pitch": 3.14, # Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.
        "speakingRate": 3.14, # Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 will return an error.
        "voice": { # Description of which voice to use for speech synthesis. # Optional. The desired voice of the synthesized audio.
          "name": "A String", # Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and ssml_gender. For the list of available voices, please refer to [Supported voices and languages](https://cloud.google.com/text-to-speech/docs/voices).
          "ssmlGender": "A String", # Optional. The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement. If a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
        },
        "volumeGainDb": 3.14, # Optional. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.
      },
    },
  },
  "updateTime": "A String", # 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.
}

  environmentId: string, Required. The unique id of the new environment.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # 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](https://cloud.google.com/dialogflow/docs/agents-versions).
  "agentVersion": "A String", # Optional. The agent version loaded into this environment. Supported formats: - `projects//agent/versions/` - `projects//locations//agent/versions/`
  "description": "A String", # Optional. The developer-provided description for this environment. The maximum length is 500 characters. If exceeded, the request is rejected.
  "fulfillment": { # 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](https://cloud.google.com/dialogflow/docs/fulfillment-overview). # Optional. The fulfillment settings to use for this environment.
    "displayName": "A String", # The human-readable name of the fulfillment, unique within the agent. This field is not used for Fulfillment in an Environment.
    "enabled": True or False, # Whether fulfillment is enabled.
    "features": [ # The field defines whether the fulfillment is enabled for certain features.
      { # Whether fulfillment is enabled for the specific feature.
        "type": "A String", # The type of the feature that enabled for fulfillment.
      },
    ],
    "genericWebService": { # Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. More information could be found at: https://cloud.google.com/dialogflow/docs/fulfillment-configure. # Configuration for a generic web service.
      "isCloudFunction": True or False, # Optional. Indicates if generic web service is created through Cloud Functions integration. Defaults to false. is_cloud_function is deprecated. Cloud functions can be configured by its uri as a regular web service now.
      "password": "A String", # The password for HTTP Basic authentication.
      "requestHeaders": { # The HTTP request headers to send together with fulfillment requests.
        "a_key": "A String",
      },
      "uri": "A String", # Required. The fulfillment URI for receiving POST requests. It must use https protocol.
      "username": "A String", # The user name for HTTP Basic authentication.
    },
    "name": "A String", # Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment.
  },
  "name": "A String", # Output only. The unique identifier of this agent environment. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`
  "state": "A String", # Output only. The state of this environment. This field is read-only, i.e., it cannot be set by create and update methods.
  "textToSpeechSettings": { # Instructs the speech synthesizer on how to generate the output audio content. # Optional. Text to speech settings for this environment.
    "enableTextToSpeech": True or False, # Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.
    "outputAudioEncoding": "A String", # Required. Audio encoding of the synthesized audio content.
    "sampleRateHertz": 42, # Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).
    "synthesizeSpeechConfigs": { # Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.
      "a_key": { # Configuration of how speech should be synthesized.
        "effectsProfileId": [ # Optional. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given.
          "A String",
        ],
        "pitch": 3.14, # Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.
        "speakingRate": 3.14, # Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 will return an error.
        "voice": { # Description of which voice to use for speech synthesis. # Optional. The desired voice of the synthesized audio.
          "name": "A String", # Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and ssml_gender. For the list of available voices, please refer to [Supported voices and languages](https://cloud.google.com/text-to-speech/docs/voices).
          "ssmlGender": "A String", # Optional. The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement. If a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
        },
        "volumeGainDb": 3.14, # Optional. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.
      },
    },
  },
  "updateTime": "A String", # 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.
}
delete(name, x__xgafv=None)
Deletes the specified agent environment.

Args:
  name: string, Required. The name of the environment to delete. / Format: - `projects//agent/environments/` - `projects//locations//agent/environments/` (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
get(name, x__xgafv=None)
Retrieves the specified agent environment.

Args:
  name: string, Required. The name of the environment. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/` (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # 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](https://cloud.google.com/dialogflow/docs/agents-versions).
  "agentVersion": "A String", # Optional. The agent version loaded into this environment. Supported formats: - `projects//agent/versions/` - `projects//locations//agent/versions/`
  "description": "A String", # Optional. The developer-provided description for this environment. The maximum length is 500 characters. If exceeded, the request is rejected.
  "fulfillment": { # 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](https://cloud.google.com/dialogflow/docs/fulfillment-overview). # Optional. The fulfillment settings to use for this environment.
    "displayName": "A String", # The human-readable name of the fulfillment, unique within the agent. This field is not used for Fulfillment in an Environment.
    "enabled": True or False, # Whether fulfillment is enabled.
    "features": [ # The field defines whether the fulfillment is enabled for certain features.
      { # Whether fulfillment is enabled for the specific feature.
        "type": "A String", # The type of the feature that enabled for fulfillment.
      },
    ],
    "genericWebService": { # Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. More information could be found at: https://cloud.google.com/dialogflow/docs/fulfillment-configure. # Configuration for a generic web service.
      "isCloudFunction": True or False, # Optional. Indicates if generic web service is created through Cloud Functions integration. Defaults to false. is_cloud_function is deprecated. Cloud functions can be configured by its uri as a regular web service now.
      "password": "A String", # The password for HTTP Basic authentication.
      "requestHeaders": { # The HTTP request headers to send together with fulfillment requests.
        "a_key": "A String",
      },
      "uri": "A String", # Required. The fulfillment URI for receiving POST requests. It must use https protocol.
      "username": "A String", # The user name for HTTP Basic authentication.
    },
    "name": "A String", # Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment.
  },
  "name": "A String", # Output only. The unique identifier of this agent environment. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`
  "state": "A String", # Output only. The state of this environment. This field is read-only, i.e., it cannot be set by create and update methods.
  "textToSpeechSettings": { # Instructs the speech synthesizer on how to generate the output audio content. # Optional. Text to speech settings for this environment.
    "enableTextToSpeech": True or False, # Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.
    "outputAudioEncoding": "A String", # Required. Audio encoding of the synthesized audio content.
    "sampleRateHertz": 42, # Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).
    "synthesizeSpeechConfigs": { # Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.
      "a_key": { # Configuration of how speech should be synthesized.
        "effectsProfileId": [ # Optional. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given.
          "A String",
        ],
        "pitch": 3.14, # Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.
        "speakingRate": 3.14, # Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 will return an error.
        "voice": { # Description of which voice to use for speech synthesis. # Optional. The desired voice of the synthesized audio.
          "name": "A String", # Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and ssml_gender. For the list of available voices, please refer to [Supported voices and languages](https://cloud.google.com/text-to-speech/docs/voices).
          "ssmlGender": "A String", # Optional. The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement. If a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
        },
        "volumeGainDb": 3.14, # Optional. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.
      },
    },
  },
  "updateTime": "A String", # 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.
}
getHistory(parent, pageSize=None, pageToken=None, x__xgafv=None)
Gets the history of the specified environment.

Args:
  parent: string, Required. The name of the environment to retrieve history for. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/` (required)
  pageSize: integer, Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
  pageToken: string, Optional. The next_page_token value returned from a previous list request.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response message for Environments.GetEnvironmentHistory.
  "entries": [ # Output only. The list of agent environments. There will be a maximum number of items returned based on the page_size field in the request.
    { # Represents an environment history entry.
      "agentVersion": "A String", # The agent version loaded into this environment history entry.
      "createTime": "A String", # The creation time of this environment history entry.
      "description": "A String", # The developer-provided description for this environment history entry.
    },
  ],
  "nextPageToken": "A String", # Output only. Token to retrieve the next page of results, or empty if there are no more results in the list.
  "parent": "A String", # Output only. The name of the environment this history is for. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`
}
getHistory_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Returns the list of all non-draft environments of the specified agent.

Args:
  parent: string, Required. The agent to list all environments from. Format: - `projects//agent` - `projects//locations//agent` (required)
  pageSize: integer, Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
  pageToken: string, Optional. The next_page_token value returned from a previous list request.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response message for Environments.ListEnvironments.
  "environments": [ # The list of agent environments. There will be a maximum number of items returned based on the page_size field in the request.
    { # 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](https://cloud.google.com/dialogflow/docs/agents-versions).
      "agentVersion": "A String", # Optional. The agent version loaded into this environment. Supported formats: - `projects//agent/versions/` - `projects//locations//agent/versions/`
      "description": "A String", # Optional. The developer-provided description for this environment. The maximum length is 500 characters. If exceeded, the request is rejected.
      "fulfillment": { # 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](https://cloud.google.com/dialogflow/docs/fulfillment-overview). # Optional. The fulfillment settings to use for this environment.
        "displayName": "A String", # The human-readable name of the fulfillment, unique within the agent. This field is not used for Fulfillment in an Environment.
        "enabled": True or False, # Whether fulfillment is enabled.
        "features": [ # The field defines whether the fulfillment is enabled for certain features.
          { # Whether fulfillment is enabled for the specific feature.
            "type": "A String", # The type of the feature that enabled for fulfillment.
          },
        ],
        "genericWebService": { # Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. More information could be found at: https://cloud.google.com/dialogflow/docs/fulfillment-configure. # Configuration for a generic web service.
          "isCloudFunction": True or False, # Optional. Indicates if generic web service is created through Cloud Functions integration. Defaults to false. is_cloud_function is deprecated. Cloud functions can be configured by its uri as a regular web service now.
          "password": "A String", # The password for HTTP Basic authentication.
          "requestHeaders": { # The HTTP request headers to send together with fulfillment requests.
            "a_key": "A String",
          },
          "uri": "A String", # Required. The fulfillment URI for receiving POST requests. It must use https protocol.
          "username": "A String", # The user name for HTTP Basic authentication.
        },
        "name": "A String", # Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment.
      },
      "name": "A String", # Output only. The unique identifier of this agent environment. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`
      "state": "A String", # Output only. The state of this environment. This field is read-only, i.e., it cannot be set by create and update methods.
      "textToSpeechSettings": { # Instructs the speech synthesizer on how to generate the output audio content. # Optional. Text to speech settings for this environment.
        "enableTextToSpeech": True or False, # Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.
        "outputAudioEncoding": "A String", # Required. Audio encoding of the synthesized audio content.
        "sampleRateHertz": 42, # Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).
        "synthesizeSpeechConfigs": { # Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.
          "a_key": { # Configuration of how speech should be synthesized.
            "effectsProfileId": [ # Optional. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given.
              "A String",
            ],
            "pitch": 3.14, # Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.
            "speakingRate": 3.14, # Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 will return an error.
            "voice": { # Description of which voice to use for speech synthesis. # Optional. The desired voice of the synthesized audio.
              "name": "A String", # Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and ssml_gender. For the list of available voices, please refer to [Supported voices and languages](https://cloud.google.com/text-to-speech/docs/voices).
              "ssmlGender": "A String", # Optional. The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement. If a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
            },
            "volumeGainDb": 3.14, # Optional. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.
          },
        },
      },
      "updateTime": "A String", # 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.
    },
  ],
  "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list.
}
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
patch(name, allowLoadToDraftAndDiscardChanges=None, body=None, updateMask=None, x__xgafv=None)
Updates the specified agent environment. This method allows you to deploy new agent versions into the environment. When an environment is pointed to a new agent version by setting `environment.agent_version`, the environment is temporarily set to the `LOADING` state. During that time, the environment keeps on serving the previous version of the agent. After the new agent version is done loading, the environment is set back to the `RUNNING` state. You can use "-" as Environment ID in environment name to update version in "draft" environment. WARNING: this will negate all recent changes to draft and can't be undone. You may want to save the draft to a version before calling this function.

Args:
  name: string, Output only. The unique identifier of this agent environment. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/` (required)
  body: object, The request body.
    The object takes the form of:

{ # 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](https://cloud.google.com/dialogflow/docs/agents-versions).
  "agentVersion": "A String", # Optional. The agent version loaded into this environment. Supported formats: - `projects//agent/versions/` - `projects//locations//agent/versions/`
  "description": "A String", # Optional. The developer-provided description for this environment. The maximum length is 500 characters. If exceeded, the request is rejected.
  "fulfillment": { # 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](https://cloud.google.com/dialogflow/docs/fulfillment-overview). # Optional. The fulfillment settings to use for this environment.
    "displayName": "A String", # The human-readable name of the fulfillment, unique within the agent. This field is not used for Fulfillment in an Environment.
    "enabled": True or False, # Whether fulfillment is enabled.
    "features": [ # The field defines whether the fulfillment is enabled for certain features.
      { # Whether fulfillment is enabled for the specific feature.
        "type": "A String", # The type of the feature that enabled for fulfillment.
      },
    ],
    "genericWebService": { # Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. More information could be found at: https://cloud.google.com/dialogflow/docs/fulfillment-configure. # Configuration for a generic web service.
      "isCloudFunction": True or False, # Optional. Indicates if generic web service is created through Cloud Functions integration. Defaults to false. is_cloud_function is deprecated. Cloud functions can be configured by its uri as a regular web service now.
      "password": "A String", # The password for HTTP Basic authentication.
      "requestHeaders": { # The HTTP request headers to send together with fulfillment requests.
        "a_key": "A String",
      },
      "uri": "A String", # Required. The fulfillment URI for receiving POST requests. It must use https protocol.
      "username": "A String", # The user name for HTTP Basic authentication.
    },
    "name": "A String", # Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment.
  },
  "name": "A String", # Output only. The unique identifier of this agent environment. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`
  "state": "A String", # Output only. The state of this environment. This field is read-only, i.e., it cannot be set by create and update methods.
  "textToSpeechSettings": { # Instructs the speech synthesizer on how to generate the output audio content. # Optional. Text to speech settings for this environment.
    "enableTextToSpeech": True or False, # Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.
    "outputAudioEncoding": "A String", # Required. Audio encoding of the synthesized audio content.
    "sampleRateHertz": 42, # Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).
    "synthesizeSpeechConfigs": { # Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.
      "a_key": { # Configuration of how speech should be synthesized.
        "effectsProfileId": [ # Optional. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given.
          "A String",
        ],
        "pitch": 3.14, # Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.
        "speakingRate": 3.14, # Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 will return an error.
        "voice": { # Description of which voice to use for speech synthesis. # Optional. The desired voice of the synthesized audio.
          "name": "A String", # Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and ssml_gender. For the list of available voices, please refer to [Supported voices and languages](https://cloud.google.com/text-to-speech/docs/voices).
          "ssmlGender": "A String", # Optional. The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement. If a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
        },
        "volumeGainDb": 3.14, # Optional. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.
      },
    },
  },
  "updateTime": "A String", # 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.
}

  allowLoadToDraftAndDiscardChanges: boolean, Optional. This field is used to prevent accidental overwrite of the draft environment, which is an operation that cannot be undone. To confirm that the caller desires this overwrite, this field must be explicitly set to true when updating the draft environment (environment ID = `-`).
  updateMask: string, Required. The mask to control which fields get updated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # 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](https://cloud.google.com/dialogflow/docs/agents-versions).
  "agentVersion": "A String", # Optional. The agent version loaded into this environment. Supported formats: - `projects//agent/versions/` - `projects//locations//agent/versions/`
  "description": "A String", # Optional. The developer-provided description for this environment. The maximum length is 500 characters. If exceeded, the request is rejected.
  "fulfillment": { # 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](https://cloud.google.com/dialogflow/docs/fulfillment-overview). # Optional. The fulfillment settings to use for this environment.
    "displayName": "A String", # The human-readable name of the fulfillment, unique within the agent. This field is not used for Fulfillment in an Environment.
    "enabled": True or False, # Whether fulfillment is enabled.
    "features": [ # The field defines whether the fulfillment is enabled for certain features.
      { # Whether fulfillment is enabled for the specific feature.
        "type": "A String", # The type of the feature that enabled for fulfillment.
      },
    ],
    "genericWebService": { # Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. More information could be found at: https://cloud.google.com/dialogflow/docs/fulfillment-configure. # Configuration for a generic web service.
      "isCloudFunction": True or False, # Optional. Indicates if generic web service is created through Cloud Functions integration. Defaults to false. is_cloud_function is deprecated. Cloud functions can be configured by its uri as a regular web service now.
      "password": "A String", # The password for HTTP Basic authentication.
      "requestHeaders": { # The HTTP request headers to send together with fulfillment requests.
        "a_key": "A String",
      },
      "uri": "A String", # Required. The fulfillment URI for receiving POST requests. It must use https protocol.
      "username": "A String", # The user name for HTTP Basic authentication.
    },
    "name": "A String", # Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment.
  },
  "name": "A String", # Output only. The unique identifier of this agent environment. Supported formats: - `projects//agent/environments/` - `projects//locations//agent/environments/`
  "state": "A String", # Output only. The state of this environment. This field is read-only, i.e., it cannot be set by create and update methods.
  "textToSpeechSettings": { # Instructs the speech synthesizer on how to generate the output audio content. # Optional. Text to speech settings for this environment.
    "enableTextToSpeech": True or False, # Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.
    "outputAudioEncoding": "A String", # Required. Audio encoding of the synthesized audio content.
    "sampleRateHertz": 42, # Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).
    "synthesizeSpeechConfigs": { # Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.
      "a_key": { # Configuration of how speech should be synthesized.
        "effectsProfileId": [ # Optional. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given.
          "A String",
        ],
        "pitch": 3.14, # Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.
        "speakingRate": 3.14, # Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 will return an error.
        "voice": { # Description of which voice to use for speech synthesis. # Optional. The desired voice of the synthesized audio.
          "name": "A String", # Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and ssml_gender. For the list of available voices, please refer to [Supported voices and languages](https://cloud.google.com/text-to-speech/docs/voices).
          "ssmlGender": "A String", # Optional. The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement. If a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
        },
        "volumeGainDb": 3.14, # Optional. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.
      },
    },
  },
  "updateTime": "A String", # 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.
}