// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct StartOntologyInductionInput {
/// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. A retry of the same request with the same token returns the induction that the first request created, and the same token used with a different request returns a <code>ValidationException</code>. If that induction, or the ontology it created, was deleted since, a retry with the token fails with <code>ConflictException</code>.</p>
pub client_token: ::std::option::Option<::std::string::String>,
/// <p>The new ontology's display name.</p>
pub ontology_name: ::std::option::Option<::std::string::String>,
/// <p>Optional. The new ontology's description. An empty string is the same as none.</p>
pub ontology_description: ::std::option::Option<::std::string::String>,
/// <p>The input to induce the ontology from. Set exactly one member.</p>
pub input_config: ::std::option::Option<crate::types::OntologyInductionInputConfig>,
/// <p>Optional. An existing ontology to start from, by ID or ARN. If you omit it, AWS Context induces the ontology from the documents alone. The seed must be an ontology that you own, it must be <code>PUBLISHED</code>, and its current version must be derived from a Turtle source document. You also need <code>context:GetOntology</code> permission on the seed. If the seed doesn't exist, the request fails with <code>ResourceNotFoundException</code>. If it can't be used, the request fails with <code>ValidationException</code>. If the seed's source document is deleted while the induction runs, is larger than 400,000 bytes, or doesn't parse, the induction fails with <code>SEED_INVALID</code>.</p>
pub seed_ontology_id: ::std::option::Option<::std::string::String>,
/// <p>Optional. Instructions for the induction.</p>
pub prompt: ::std::option::Option<::std::string::String>,
/// <p>Tags to add to the induction when you create it: up to 200 in the request, of which at most 50 can be user tags. Keys can't start with <code>aws:</code>. To add tags, you also need <code>context:TagResource</code> permission on the new induction. If you specify more than 50 user tags, the request fails with <code>ServiceQuotaExceededException</code>, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails with <code>ValidationException</code>. These tags go on the induction only. <code>ontologyTags</code> go on the ontology.</p>
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>Tags to add to the ontology the induction creates at DRAFT, with the same limits and rules as <code>tags</code>. They are checked here, and supplying them also requires <code>context:TagResource</code> on the new ontology. These tags go on the ontology only. <code>tags</code> go on the induction.</p>
pub ontology_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl StartOntologyInductionInput {
/// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. A retry of the same request with the same token returns the induction that the first request created, and the same token used with a different request returns a <code>ValidationException</code>. If that induction, or the ontology it created, was deleted since, a retry with the token fails with <code>ConflictException</code>.</p>
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
/// <p>The new ontology's display name.</p>
pub fn ontology_name(&self) -> ::std::option::Option<&str> {
self.ontology_name.as_deref()
}
/// <p>Optional. The new ontology's description. An empty string is the same as none.</p>
pub fn ontology_description(&self) -> ::std::option::Option<&str> {
self.ontology_description.as_deref()
}
/// <p>The input to induce the ontology from. Set exactly one member.</p>
pub fn input_config(&self) -> ::std::option::Option<&crate::types::OntologyInductionInputConfig> {
self.input_config.as_ref()
}
/// <p>Optional. An existing ontology to start from, by ID or ARN. If you omit it, AWS Context induces the ontology from the documents alone. The seed must be an ontology that you own, it must be <code>PUBLISHED</code>, and its current version must be derived from a Turtle source document. You also need <code>context:GetOntology</code> permission on the seed. If the seed doesn't exist, the request fails with <code>ResourceNotFoundException</code>. If it can't be used, the request fails with <code>ValidationException</code>. If the seed's source document is deleted while the induction runs, is larger than 400,000 bytes, or doesn't parse, the induction fails with <code>SEED_INVALID</code>.</p>
pub fn seed_ontology_id(&self) -> ::std::option::Option<&str> {
self.seed_ontology_id.as_deref()
}
/// <p>Optional. Instructions for the induction.</p>
pub fn prompt(&self) -> ::std::option::Option<&str> {
self.prompt.as_deref()
}
/// <p>Tags to add to the induction when you create it: up to 200 in the request, of which at most 50 can be user tags. Keys can't start with <code>aws:</code>. To add tags, you also need <code>context:TagResource</code> permission on the new induction. If you specify more than 50 user tags, the request fails with <code>ServiceQuotaExceededException</code>, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails with <code>ValidationException</code>. These tags go on the induction only. <code>ontologyTags</code> go on the ontology.</p>
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
/// <p>Tags to add to the ontology the induction creates at DRAFT, with the same limits and rules as <code>tags</code>. They are checked here, and supplying them also requires <code>context:TagResource</code> on the new ontology. These tags go on the ontology only. <code>tags</code> go on the induction.</p>
pub fn ontology_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.ontology_tags.as_ref()
}
}
impl ::std::fmt::Debug for StartOntologyInductionInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("StartOntologyInductionInput");
formatter.field("client_token", &self.client_token);
formatter.field("ontology_name", &self.ontology_name);
formatter.field("ontology_description", &self.ontology_description);
formatter.field("input_config", &self.input_config);
formatter.field("seed_ontology_id", &self.seed_ontology_id);
formatter.field("prompt", &"*** Sensitive Data Redacted ***");
formatter.field("tags", &self.tags);
formatter.field("ontology_tags", &self.ontology_tags);
formatter.finish()
}
}
impl StartOntologyInductionInput {
/// Creates a new builder-style object to manufacture [`StartOntologyInductionInput`](crate::operation::start_ontology_induction::StartOntologyInductionInput).
pub fn builder() -> crate::operation::start_ontology_induction::builders::StartOntologyInductionInputBuilder {
crate::operation::start_ontology_induction::builders::StartOntologyInductionInputBuilder::default()
}
}
/// A builder for [`StartOntologyInductionInput`](crate::operation::start_ontology_induction::StartOntologyInductionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct StartOntologyInductionInputBuilder {
pub(crate) client_token: ::std::option::Option<::std::string::String>,
pub(crate) ontology_name: ::std::option::Option<::std::string::String>,
pub(crate) ontology_description: ::std::option::Option<::std::string::String>,
pub(crate) input_config: ::std::option::Option<crate::types::OntologyInductionInputConfig>,
pub(crate) seed_ontology_id: ::std::option::Option<::std::string::String>,
pub(crate) prompt: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) ontology_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl StartOntologyInductionInputBuilder {
/// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. A retry of the same request with the same token returns the induction that the first request created, and the same token used with a different request returns a <code>ValidationException</code>. If that induction, or the ontology it created, was deleted since, a retry with the token fails with <code>ConflictException</code>.</p>
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
/// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. A retry of the same request with the same token returns the induction that the first request created, and the same token used with a different request returns a <code>ValidationException</code>. If that induction, or the ontology it created, was deleted since, a retry with the token fails with <code>ConflictException</code>.</p>
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
/// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. A retry of the same request with the same token returns the induction that the first request created, and the same token used with a different request returns a <code>ValidationException</code>. If that induction, or the ontology it created, was deleted since, a retry with the token fails with <code>ConflictException</code>.</p>
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
/// <p>The new ontology's display name.</p>
/// This field is required.
pub fn ontology_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ontology_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The new ontology's display name.</p>
pub fn set_ontology_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ontology_name = input;
self
}
/// <p>The new ontology's display name.</p>
pub fn get_ontology_name(&self) -> &::std::option::Option<::std::string::String> {
&self.ontology_name
}
/// <p>Optional. The new ontology's description. An empty string is the same as none.</p>
pub fn ontology_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ontology_description = ::std::option::Option::Some(input.into());
self
}
/// <p>Optional. The new ontology's description. An empty string is the same as none.</p>
pub fn set_ontology_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ontology_description = input;
self
}
/// <p>Optional. The new ontology's description. An empty string is the same as none.</p>
pub fn get_ontology_description(&self) -> &::std::option::Option<::std::string::String> {
&self.ontology_description
}
/// <p>The input to induce the ontology from. Set exactly one member.</p>
/// This field is required.
pub fn input_config(mut self, input: crate::types::OntologyInductionInputConfig) -> Self {
self.input_config = ::std::option::Option::Some(input);
self
}
/// <p>The input to induce the ontology from. Set exactly one member.</p>
pub fn set_input_config(mut self, input: ::std::option::Option<crate::types::OntologyInductionInputConfig>) -> Self {
self.input_config = input;
self
}
/// <p>The input to induce the ontology from. Set exactly one member.</p>
pub fn get_input_config(&self) -> &::std::option::Option<crate::types::OntologyInductionInputConfig> {
&self.input_config
}
/// <p>Optional. An existing ontology to start from, by ID or ARN. If you omit it, AWS Context induces the ontology from the documents alone. The seed must be an ontology that you own, it must be <code>PUBLISHED</code>, and its current version must be derived from a Turtle source document. You also need <code>context:GetOntology</code> permission on the seed. If the seed doesn't exist, the request fails with <code>ResourceNotFoundException</code>. If it can't be used, the request fails with <code>ValidationException</code>. If the seed's source document is deleted while the induction runs, is larger than 400,000 bytes, or doesn't parse, the induction fails with <code>SEED_INVALID</code>.</p>
pub fn seed_ontology_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.seed_ontology_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Optional. An existing ontology to start from, by ID or ARN. If you omit it, AWS Context induces the ontology from the documents alone. The seed must be an ontology that you own, it must be <code>PUBLISHED</code>, and its current version must be derived from a Turtle source document. You also need <code>context:GetOntology</code> permission on the seed. If the seed doesn't exist, the request fails with <code>ResourceNotFoundException</code>. If it can't be used, the request fails with <code>ValidationException</code>. If the seed's source document is deleted while the induction runs, is larger than 400,000 bytes, or doesn't parse, the induction fails with <code>SEED_INVALID</code>.</p>
pub fn set_seed_ontology_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.seed_ontology_id = input;
self
}
/// <p>Optional. An existing ontology to start from, by ID or ARN. If you omit it, AWS Context induces the ontology from the documents alone. The seed must be an ontology that you own, it must be <code>PUBLISHED</code>, and its current version must be derived from a Turtle source document. You also need <code>context:GetOntology</code> permission on the seed. If the seed doesn't exist, the request fails with <code>ResourceNotFoundException</code>. If it can't be used, the request fails with <code>ValidationException</code>. If the seed's source document is deleted while the induction runs, is larger than 400,000 bytes, or doesn't parse, the induction fails with <code>SEED_INVALID</code>.</p>
pub fn get_seed_ontology_id(&self) -> &::std::option::Option<::std::string::String> {
&self.seed_ontology_id
}
/// <p>Optional. Instructions for the induction.</p>
pub fn prompt(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.prompt = ::std::option::Option::Some(input.into());
self
}
/// <p>Optional. Instructions for the induction.</p>
pub fn set_prompt(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.prompt = input;
self
}
/// <p>Optional. Instructions for the induction.</p>
pub fn get_prompt(&self) -> &::std::option::Option<::std::string::String> {
&self.prompt
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>Tags to add to the induction when you create it: up to 200 in the request, of which at most 50 can be user tags. Keys can't start with <code>aws:</code>. To add tags, you also need <code>context:TagResource</code> permission on the new induction. If you specify more than 50 user tags, the request fails with <code>ServiceQuotaExceededException</code>, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails with <code>ValidationException</code>. These tags go on the induction only. <code>ontologyTags</code> go on the ontology.</p>
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>Tags to add to the induction when you create it: up to 200 in the request, of which at most 50 can be user tags. Keys can't start with <code>aws:</code>. To add tags, you also need <code>context:TagResource</code> permission on the new induction. If you specify more than 50 user tags, the request fails with <code>ServiceQuotaExceededException</code>, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails with <code>ValidationException</code>. These tags go on the induction only. <code>ontologyTags</code> go on the ontology.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// <p>Tags to add to the induction when you create it: up to 200 in the request, of which at most 50 can be user tags. Keys can't start with <code>aws:</code>. To add tags, you also need <code>context:TagResource</code> permission on the new induction. If you specify more than 50 user tags, the request fails with <code>ServiceQuotaExceededException</code>, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails with <code>ValidationException</code>. These tags go on the induction only. <code>ontologyTags</code> go on the ontology.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
/// Adds a key-value pair to `ontology_tags`.
///
/// To override the contents of this collection use [`set_ontology_tags`](Self::set_ontology_tags).
///
/// <p>Tags to add to the ontology the induction creates at DRAFT, with the same limits and rules as <code>tags</code>. They are checked here, and supplying them also requires <code>context:TagResource</code> on the new ontology. These tags go on the ontology only. <code>tags</code> go on the induction.</p>
pub fn ontology_tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.ontology_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.ontology_tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>Tags to add to the ontology the induction creates at DRAFT, with the same limits and rules as <code>tags</code>. They are checked here, and supplying them also requires <code>context:TagResource</code> on the new ontology. These tags go on the ontology only. <code>tags</code> go on the induction.</p>
pub fn set_ontology_tags(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.ontology_tags = input;
self
}
/// <p>Tags to add to the ontology the induction creates at DRAFT, with the same limits and rules as <code>tags</code>. They are checked here, and supplying them also requires <code>context:TagResource</code> on the new ontology. These tags go on the ontology only. <code>tags</code> go on the induction.</p>
pub fn get_ontology_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.ontology_tags
}
/// Consumes the builder and constructs a [`StartOntologyInductionInput`](crate::operation::start_ontology_induction::StartOntologyInductionInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::start_ontology_induction::StartOntologyInductionInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::start_ontology_induction::StartOntologyInductionInput {
client_token: self.client_token,
ontology_name: self.ontology_name,
ontology_description: self.ontology_description,
input_config: self.input_config,
seed_ontology_id: self.seed_ontology_id,
prompt: self.prompt,
tags: self.tags,
ontology_tags: self.ontology_tags,
})
}
}
impl ::std::fmt::Debug for StartOntologyInductionInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("StartOntologyInductionInputBuilder");
formatter.field("client_token", &self.client_token);
formatter.field("ontology_name", &self.ontology_name);
formatter.field("ontology_description", &self.ontology_description);
formatter.field("input_config", &self.input_config);
formatter.field("seed_ontology_id", &self.seed_ontology_id);
formatter.field("prompt", &"*** Sensitive Data Redacted ***");
formatter.field("tags", &self.tags);
formatter.field("ontology_tags", &self.ontology_tags);
formatter.finish()
}
}