#[non_exhaustive]pub struct Tool {
pub name: String,
pub tool_key: String,
pub display_name: String,
pub description: String,
pub action_confirmation_requirement: HashMap<String, ConfirmationRequirement>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub satisfies_pzs: Option<bool>,
pub satisfies_pzi: Option<bool>,
pub specification: Option<Specification>,
/* private fields */
}tools only.Expand description
Represents a tool.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. Identifier. The resource name of the tool. Format:
projects/<Project ID>/locations/<Location ID>/tools/<Tool ID>.
tool_key: StringRequired. A human readable short name of the tool, which should be unique within the project. It should only contain letters, numbers, and underscores, and it will be used by LLM to identify the tool.
display_name: StringOptional. A human readable short name of the tool, to be shown on the UI.
description: StringOptional. A human readable description of the tool.
action_confirmation_requirement: HashMap<String, ConfirmationRequirement>Optional. Confirmation requirement for the actions. Each key is an action name in the action_schemas. If an action’s confirmation requirement is unspecified (either the key is not present, or its value is CONFIRMATION_REQUIREMENT_UNSPECIFIED), the requirement is inferred from the action’s method_type - confirmation is not required if and only if method_type is GET.
create_time: Option<Timestamp>Output only. Creation time of this tool.
update_time: Option<Timestamp>Output only. Update time of this tool.
satisfies_pzs: Option<bool>Output only. A read only boolean field reflecting Zone Separation status of the tool. If the field is absent, it means the status is unknown.
satisfies_pzi: Option<bool>Output only. A read only boolean field reflecting Zone Isolation status of the tool. If the field is absent, it means the status is unknown.
specification: Option<Specification>Specification of the Tool.
Implementations§
Source§impl Tool
impl Tool
pub fn new() -> Self
Sourcepub fn set_tool_key<T: Into<String>>(self, v: T) -> Self
pub fn set_tool_key<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_action_confirmation_requirement<T, K, V>(self, v: T) -> Self
pub fn set_action_confirmation_requirement<T, K, V>(self, v: T) -> Self
Sets the value of action_confirmation_requirement.
§Example
use google_cloud_dialogflow_v2::model::tool::ConfirmationRequirement;
let x = Tool::new().set_action_confirmation_requirement([
("key0", ConfirmationRequirement::Required),
("key1", ConfirmationRequirement::NotRequired),
]);Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Tool::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Tool::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Tool::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Tool::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Tool::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Tool::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_satisfies_pzs<T>(self, v: T) -> Self
pub fn set_satisfies_pzs<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_satisfies_pzs<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_satisfies_pzs<T>(self, v: Option<T>) -> Self
Sets or clears the value of satisfies_pzs.
§Example
let x = Tool::new().set_or_clear_satisfies_pzs(Some(false));
let x = Tool::new().set_or_clear_satisfies_pzs(None::<bool>);Sourcepub fn set_satisfies_pzi<T>(self, v: T) -> Self
pub fn set_satisfies_pzi<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_satisfies_pzi<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_satisfies_pzi<T>(self, v: Option<T>) -> Self
Sets or clears the value of satisfies_pzi.
§Example
let x = Tool::new().set_or_clear_satisfies_pzi(Some(false));
let x = Tool::new().set_or_clear_satisfies_pzi(None::<bool>);Sourcepub fn set_specification<T: Into<Option<Specification>>>(self, v: T) -> Self
pub fn set_specification<T: Into<Option<Specification>>>(self, v: T) -> Self
Sets the value of specification.
Note that all the setters affecting specification are mutually
exclusive.
§Example
use google_cloud_dialogflow_v2::model::tool::FunctionTool;
let x = Tool::new().set_specification(Some(
google_cloud_dialogflow_v2::model::tool::Specification::FunctionSpec(FunctionTool::default().into())));Sourcepub fn extension_spec(&self) -> Option<&Box<ExtensionTool>>
👎Deprecated
pub fn extension_spec(&self) -> Option<&Box<ExtensionTool>>
The value of specification
if it holds a ExtensionSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_extension_spec<T: Into<Box<ExtensionTool>>>(self, v: T) -> Self
👎Deprecated
pub fn set_extension_spec<T: Into<Box<ExtensionTool>>>(self, v: T) -> Self
Sets the value of specification
to hold a ExtensionSpec.
Note that all the setters affecting specification are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::tool::ExtensionTool;
let x = Tool::new().set_extension_spec(ExtensionTool::default()/* use setters */);
assert!(x.extension_spec().is_some());
assert!(x.function_spec().is_none());
assert!(x.connector_spec().is_none());
assert!(x.open_api_spec().is_none());Sourcepub fn function_spec(&self) -> Option<&Box<FunctionTool>>
pub fn function_spec(&self) -> Option<&Box<FunctionTool>>
The value of specification
if it holds a FunctionSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_function_spec<T: Into<Box<FunctionTool>>>(self, v: T) -> Self
pub fn set_function_spec<T: Into<Box<FunctionTool>>>(self, v: T) -> Self
Sets the value of specification
to hold a FunctionSpec.
Note that all the setters affecting specification are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::tool::FunctionTool;
let x = Tool::new().set_function_spec(FunctionTool::default()/* use setters */);
assert!(x.function_spec().is_some());
assert!(x.extension_spec().is_none());
assert!(x.connector_spec().is_none());
assert!(x.open_api_spec().is_none());Sourcepub fn connector_spec(&self) -> Option<&Box<ConnectorTool>>
pub fn connector_spec(&self) -> Option<&Box<ConnectorTool>>
The value of specification
if it holds a ConnectorSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_connector_spec<T: Into<Box<ConnectorTool>>>(self, v: T) -> Self
pub fn set_connector_spec<T: Into<Box<ConnectorTool>>>(self, v: T) -> Self
Sets the value of specification
to hold a ConnectorSpec.
Note that all the setters affecting specification are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::tool::ConnectorTool;
let x = Tool::new().set_connector_spec(ConnectorTool::default()/* use setters */);
assert!(x.connector_spec().is_some());
assert!(x.extension_spec().is_none());
assert!(x.function_spec().is_none());
assert!(x.open_api_spec().is_none());Sourcepub fn open_api_spec(&self) -> Option<&Box<OpenApiTool>>
pub fn open_api_spec(&self) -> Option<&Box<OpenApiTool>>
The value of specification
if it holds a OpenApiSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_open_api_spec<T: Into<Box<OpenApiTool>>>(self, v: T) -> Self
pub fn set_open_api_spec<T: Into<Box<OpenApiTool>>>(self, v: T) -> Self
Sets the value of specification
to hold a OpenApiSpec.
Note that all the setters affecting specification are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::tool::OpenApiTool;
let x = Tool::new().set_open_api_spec(OpenApiTool::default()/* use setters */);
assert!(x.open_api_spec().is_some());
assert!(x.extension_spec().is_none());
assert!(x.function_spec().is_none());
assert!(x.connector_spec().is_none());