Close httplib2 connections.
create(parent, body=None, cannedQueryId=None, x__xgafv=None)
Creates a CannedQuery.
Deletes a CannedQuery.
Gets a CannedQuery.
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists all CannedQuerys under an Assistant.
Retrieves the next page of results.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a CannedQuery.
close()
Close httplib2 connections.
create(parent, body=None, cannedQueryId=None, x__xgafv=None)
Creates a CannedQuery.
Args:
parent: string, Required. The parent resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` (required)
body: object, The request body.
The object takes the form of:
{ # Canned query resource of Assistant. It represents a short-cut to a predefined conversation start.
"defaultTexts": { # The text pieces for the canned query, which can be localized. # Required. The default (non-localized) values for the text attributes.
"prefix": "A String", # Optional. The prefix that `suggested_prompts` should start with.
"suggestedPrompts": [ # Required. The prompts the canned query will offer to the user.
{ # A suggested prompt for the canned query.
"promptText": "A String", # Required. The text of the suggested prompt.
},
],
"title": "A String", # Required. The title that is for the end user.
},
"displayName": "A String", # The display name of the canned query. It must be a UTF-8 encoded string with a length limit of 128 characters.
"enabled": True or False, # Whether this canned query is enabled.
"googleDefined": True or False, # Output only. Whether this is a Google-defined, read-only canned query.
"localizedTexts": { # Optional. The translations of the text attributes. The keys should be BCP-47 language codes.
"a_key": { # The text pieces for the canned query, which can be localized.
"prefix": "A String", # Optional. The prefix that `suggested_prompts` should start with.
"suggestedPrompts": [ # Required. The prompts the canned query will offer to the user.
{ # A suggested prompt for the canned query.
"promptText": "A String", # Required. The text of the suggested prompt.
},
],
"title": "A String", # Required. The title that is for the end user.
},
},
"name": "A String", # Immutable. Resource name of the canned query. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/cannedQueries/{canned_query}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
"requiredCapabilities": [ # Optional. The capabilities the Assistant needs to have to use this canned query.
{ # Capability of an assistant needed to use this canned query.
"actionName": "A String", # The name of the action that the Assistant needs to have set up to use this canned query.
},
],
}
cannedQueryId: string, Required. The ID to use for the canned query, which will become the final component of the canned query's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) with a length limit of 63 characters.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Canned query resource of Assistant. It represents a short-cut to a predefined conversation start.
"defaultTexts": { # The text pieces for the canned query, which can be localized. # Required. The default (non-localized) values for the text attributes.
"prefix": "A String", # Optional. The prefix that `suggested_prompts` should start with.
"suggestedPrompts": [ # Required. The prompts the canned query will offer to the user.
{ # A suggested prompt for the canned query.
"promptText": "A String", # Required. The text of the suggested prompt.
},
],
"title": "A String", # Required. The title that is for the end user.
},
"displayName": "A String", # The display name of the canned query. It must be a UTF-8 encoded string with a length limit of 128 characters.
"enabled": True or False, # Whether this canned query is enabled.
"googleDefined": True or False, # Output only. Whether this is a Google-defined, read-only canned query.
"localizedTexts": { # Optional. The translations of the text attributes. The keys should be BCP-47 language codes.
"a_key": { # The text pieces for the canned query, which can be localized.
"prefix": "A String", # Optional. The prefix that `suggested_prompts` should start with.
"suggestedPrompts": [ # Required. The prompts the canned query will offer to the user.
{ # A suggested prompt for the canned query.
"promptText": "A String", # Required. The text of the suggested prompt.
},
],
"title": "A String", # Required. The title that is for the end user.
},
},
"name": "A String", # Immutable. Resource name of the canned query. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/cannedQueries/{canned_query}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
"requiredCapabilities": [ # Optional. The capabilities the Assistant needs to have to use this canned query.
{ # Capability of an assistant needed to use this canned query.
"actionName": "A String", # The name of the action that the Assistant needs to have set up to use this canned query.
},
],
}
delete(name, x__xgafv=None)
Deletes a CannedQuery.
Args:
name: string, Required. Resource name of CannedQuery. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/cannedQueries/{canned_query}` If the caller does not have permission to delete the canned query, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the canned query to delete does not exist, a `NOT_FOUND` error is returned. (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)
Gets a CannedQuery.
Args:
name: string, Required. Resource name of CannedQuery. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/cannedQueries/{canned_query}` (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Canned query resource of Assistant. It represents a short-cut to a predefined conversation start.
"defaultTexts": { # The text pieces for the canned query, which can be localized. # Required. The default (non-localized) values for the text attributes.
"prefix": "A String", # Optional. The prefix that `suggested_prompts` should start with.
"suggestedPrompts": [ # Required. The prompts the canned query will offer to the user.
{ # A suggested prompt for the canned query.
"promptText": "A String", # Required. The text of the suggested prompt.
},
],
"title": "A String", # Required. The title that is for the end user.
},
"displayName": "A String", # The display name of the canned query. It must be a UTF-8 encoded string with a length limit of 128 characters.
"enabled": True or False, # Whether this canned query is enabled.
"googleDefined": True or False, # Output only. Whether this is a Google-defined, read-only canned query.
"localizedTexts": { # Optional. The translations of the text attributes. The keys should be BCP-47 language codes.
"a_key": { # The text pieces for the canned query, which can be localized.
"prefix": "A String", # Optional. The prefix that `suggested_prompts` should start with.
"suggestedPrompts": [ # Required. The prompts the canned query will offer to the user.
{ # A suggested prompt for the canned query.
"promptText": "A String", # Required. The text of the suggested prompt.
},
],
"title": "A String", # Required. The title that is for the end user.
},
},
"name": "A String", # Immutable. Resource name of the canned query. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/cannedQueries/{canned_query}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
"requiredCapabilities": [ # Optional. The capabilities the Assistant needs to have to use this canned query.
{ # Capability of an assistant needed to use this canned query.
"actionName": "A String", # The name of the action that the Assistant needs to have set up to use this canned query.
},
],
}
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists all CannedQuerys under an Assistant.
Args:
parent: string, Required. The parent resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` (required)
filter: string, Optional. The filter expression. Supported fields: * `enabled` * `google_defined` Examples: * `enabled=true` * `google_defined=true` * `enabled=true AND google_defined=true`
pageSize: integer, Maximum number of canned queries to return. If unspecified, defaults to 100. The maximum allowed value is 1000; anything above that will be coerced down to 1000.
pageToken: string, A page token received from a previous CannedQueryService.ListCannedQueries call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to CannedQueryService.ListCannedQueries must match the call that provided the page token.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for the CannedQueryService.ListCannedQueries method.
"cannedQueries": [ # The list of CannedQuerys matching the request.
{ # Canned query resource of Assistant. It represents a short-cut to a predefined conversation start.
"defaultTexts": { # The text pieces for the canned query, which can be localized. # Required. The default (non-localized) values for the text attributes.
"prefix": "A String", # Optional. The prefix that `suggested_prompts` should start with.
"suggestedPrompts": [ # Required. The prompts the canned query will offer to the user.
{ # A suggested prompt for the canned query.
"promptText": "A String", # Required. The text of the suggested prompt.
},
],
"title": "A String", # Required. The title that is for the end user.
},
"displayName": "A String", # The display name of the canned query. It must be a UTF-8 encoded string with a length limit of 128 characters.
"enabled": True or False, # Whether this canned query is enabled.
"googleDefined": True or False, # Output only. Whether this is a Google-defined, read-only canned query.
"localizedTexts": { # Optional. The translations of the text attributes. The keys should be BCP-47 language codes.
"a_key": { # The text pieces for the canned query, which can be localized.
"prefix": "A String", # Optional. The prefix that `suggested_prompts` should start with.
"suggestedPrompts": [ # Required. The prompts the canned query will offer to the user.
{ # A suggested prompt for the canned query.
"promptText": "A String", # Required. The text of the suggested prompt.
},
],
"title": "A String", # Required. The title that is for the end user.
},
},
"name": "A String", # Immutable. Resource name of the canned query. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/cannedQueries/{canned_query}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
"requiredCapabilities": [ # Optional. The capabilities the Assistant needs to have to use this canned query.
{ # Capability of an assistant needed to use this canned query.
"actionName": "A String", # The name of the action that the Assistant needs to have set up to use this canned query.
},
],
},
],
"nextPageToken": "A String", # A token that can be sent as ListCannedQueriesRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
}
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, body=None, updateMask=None, x__xgafv=None)
Updates a CannedQuery.
Args:
name: string, Immutable. Resource name of the canned query. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/cannedQueries/{canned_query}` It must be a UTF-8 encoded string with a length limit of 1024 characters. (required)
body: object, The request body.
The object takes the form of:
{ # Canned query resource of Assistant. It represents a short-cut to a predefined conversation start.
"defaultTexts": { # The text pieces for the canned query, which can be localized. # Required. The default (non-localized) values for the text attributes.
"prefix": "A String", # Optional. The prefix that `suggested_prompts` should start with.
"suggestedPrompts": [ # Required. The prompts the canned query will offer to the user.
{ # A suggested prompt for the canned query.
"promptText": "A String", # Required. The text of the suggested prompt.
},
],
"title": "A String", # Required. The title that is for the end user.
},
"displayName": "A String", # The display name of the canned query. It must be a UTF-8 encoded string with a length limit of 128 characters.
"enabled": True or False, # Whether this canned query is enabled.
"googleDefined": True or False, # Output only. Whether this is a Google-defined, read-only canned query.
"localizedTexts": { # Optional. The translations of the text attributes. The keys should be BCP-47 language codes.
"a_key": { # The text pieces for the canned query, which can be localized.
"prefix": "A String", # Optional. The prefix that `suggested_prompts` should start with.
"suggestedPrompts": [ # Required. The prompts the canned query will offer to the user.
{ # A suggested prompt for the canned query.
"promptText": "A String", # Required. The text of the suggested prompt.
},
],
"title": "A String", # Required. The title that is for the end user.
},
},
"name": "A String", # Immutable. Resource name of the canned query. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/cannedQueries/{canned_query}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
"requiredCapabilities": [ # Optional. The capabilities the Assistant needs to have to use this canned query.
{ # Capability of an assistant needed to use this canned query.
"actionName": "A String", # The name of the action that the Assistant needs to have set up to use this canned query.
},
],
}
updateMask: string, The list of fields to update.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Canned query resource of Assistant. It represents a short-cut to a predefined conversation start.
"defaultTexts": { # The text pieces for the canned query, which can be localized. # Required. The default (non-localized) values for the text attributes.
"prefix": "A String", # Optional. The prefix that `suggested_prompts` should start with.
"suggestedPrompts": [ # Required. The prompts the canned query will offer to the user.
{ # A suggested prompt for the canned query.
"promptText": "A String", # Required. The text of the suggested prompt.
},
],
"title": "A String", # Required. The title that is for the end user.
},
"displayName": "A String", # The display name of the canned query. It must be a UTF-8 encoded string with a length limit of 128 characters.
"enabled": True or False, # Whether this canned query is enabled.
"googleDefined": True or False, # Output only. Whether this is a Google-defined, read-only canned query.
"localizedTexts": { # Optional. The translations of the text attributes. The keys should be BCP-47 language codes.
"a_key": { # The text pieces for the canned query, which can be localized.
"prefix": "A String", # Optional. The prefix that `suggested_prompts` should start with.
"suggestedPrompts": [ # Required. The prompts the canned query will offer to the user.
{ # A suggested prompt for the canned query.
"promptText": "A String", # Required. The text of the suggested prompt.
},
],
"title": "A String", # Required. The title that is for the end user.
},
},
"name": "A String", # Immutable. Resource name of the canned query. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/cannedQueries/{canned_query}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
"requiredCapabilities": [ # Optional. The capabilities the Assistant needs to have to use this canned query.
{ # Capability of an assistant needed to use this canned query.
"actionName": "A String", # The name of the action that the Assistant needs to have set up to use this canned query.
},
],
}