// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The proposal after this call, in its new status.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RejectCurationProposalOutput {
/// <p>The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.</p>
pub change_set_id: ::std::string::String,
/// <p>A one-line English title that AWS Context composes for the proposal, at most 1,024 characters. For example, <code>Add 'orders' and 2 more entities, and 20 relationships</code>, <code>Add 'orders → customers' and 2 more relationships</code>, or <code>Associate ontology 'my-ontology' version 2</code>. The title names the lead node (the node that starts the most edges, otherwise the first node) by its name, or by its ID if it has no name. For an edge-only change, it names the lead relationship's two node IDs. For an ontology load, it names the ontology ID and version. The title is for display only. It is not translated and is not meant to be parsed.</p>
/// <p>For an <code>ACL_RESTRICTED</code> change set (see <code>accessControl</code>), the title contains only the verb and the counts, with no node, edge, type, or ontology. The title is absent when the change set is unreadable or has nothing to describe, such as a change set that records a connection's removal. A node name or ID, ontology ID, or ontology version longer than 128 characters is truncated to 128 characters, ending in <code>…</code>.</p>
pub title: ::std::option::Option<::std::string::String>,
/// <p>The activity that generated the change set (see <code>Activity</code>). This member can be absent, so handle a proposal that has no activity. For example, it's absent when the change set is unreadable, when AWS Context wrote the change set to load an ontology's schema, when the change set records a connection's removal, and when this API version doesn't recognize the activity.</p>
pub generated_by: ::std::option::Option<crate::types::Activity>,
/// <p>An opaque revision token. Pass it back as <code>revisionId</code> when you accept or reject the proposal.</p>
pub revision_id: ::std::string::String,
/// <p>The status of the curation proposal, such as <code>PENDING_REVIEW</code> while it waits for a decision, <code>APPROVED</code> or <code>REJECTED</code> once it is decided, or <code>ARCHIVED</code> when the connection that produced it was removed from the agent context. New values can be added, so handle a status that you don't recognize.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>PENDING_REVIEW</code> - Waiting for a curator's decision. The only status Accept and Reject act on.</p></li>
/// <li>
/// <p><code>APPROVED</code> - A curator accepted it. Its change set is published or publishing.</p></li>
/// <li>
/// <p><code>REJECTED</code> - Closed without applying its change set: a curator rejected it, or the service did when a holding policy's review window passed with no decision (<code>statusReasonCode</code> REQUEST_EXPIRED).</p></li>
/// <li>
/// <p><code>SUPERSEDED</code> - A newer proposal for the same document replaced it.</p></li>
/// <li>
/// <p><code>FAILED</code> - The proposal was accepted, but publishing its change set failed. This status is final. To apply the change, submit it again.</p></li>
/// <li>
/// <p><code>PUBLISHING</code> - Accepted and publishing asynchronously (an ontology-schema publish). The status then changes to APPROVED or FAILED.</p></li>
/// <li>
/// <p><code>ARCHIVED</code> - The connection that produced it was removed from the agent context. <code>statusReason.code</code> is CONNECTION_REMOVED.</p></li>
/// </ul>
pub status: crate::types::CurationProposalStatus,
/// <p>Why the service decided the proposal, when it did: REQUEST_EXPIRED when a holding policy's auto-reject window passed with no decision. Absent when a curator decided it.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>REQUEST_EXPIRED</code> - The auto-reject window of a policy that held the proposal passed with no decision, so the service rejected it.</p></li>
/// <li>
/// <p><code>CONNECTION_REMOVED</code> - The connection was removed from the agent context. AWS Context removes the data that only that connection produced, and archives the connection's pending proposals.</p></li>
/// </ul>
pub status_reason_code: ::std::option::Option<crate::types::StatusReasonCode>,
/// <p>Who can read the authorizing change set's content. See <code>AccessControl</code>. If the value is <code>ACL_RESTRICTED</code>, <code>ListChangeSetOperations</code> on <code>changeSetId</code> returns the operations only to an allowed end user. Any other caller gets <code>AccessDeniedException</code>, and <code>GetChangeSet</code> returns only metadata, and the proposal's title has no node names or edge endpoints. The service returns <code>accessControl</code> on every proposal.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>ACL_RESTRICTED</code> - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's <code>title</code> names no nodes or edges.</p></li>
/// <li>
/// <p><code>NO_ACL</code> - Every caller can read the content.</p></li>
/// </ul>
pub access_control: ::std::option::Option<crate::types::AccessControl>,
/// <p>The agent context's ID.</p>
pub agent_context_id: ::std::string::String,
/// <p>The date and time when the review window closes, which is when a holding policy's <code>autoRejectAfterSeconds</code> elapses. If no curator has decided the proposal by then, AWS Context rejects it with <code>statusReasonCode</code> <code>REQUEST_EXPIRED</code>. Present only while <code>status</code> is <code>PENDING_REVIEW</code> and a holding policy set a window. Absent on every other status.</p>
pub expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The date and time when the curation proposal was created.</p>
pub created_at: ::aws_smithy_types::DateTime,
/// <p>The date and time when the curation proposal was last updated, such as when its change set was edited or the proposal was decided. Equal to <code>createdAt</code> until the first update.</p>
pub updated_at: ::aws_smithy_types::DateTime,
/// <p>Why AWS Context closed the proposal. Set on an <code>ARCHIVED</code> proposal. Absent otherwise.</p>
pub status_reason: ::std::option::Option<crate::types::StatusReason>,
/// <p>The proposal's opaque instance ID. Requests take it as <code>curationProposalId</code>.</p>
pub id: ::std::string::String,
/// <p>The policies that routed this change set to review (the <code>HOLD_FOR_REVIEW</code> entries in the change set's evaluation). Absent if none held it.</p>
pub triggering_policies: ::std::option::Option<::std::vec::Vec<crate::types::TriggeringPolicy>>,
_request_id: Option<String>,
}
impl RejectCurationProposalOutput {
/// <p>The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.</p>
pub fn change_set_id(&self) -> &str {
use std::ops::Deref;
self.change_set_id.deref()
}
/// <p>A one-line English title that AWS Context composes for the proposal, at most 1,024 characters. For example, <code>Add 'orders' and 2 more entities, and 20 relationships</code>, <code>Add 'orders → customers' and 2 more relationships</code>, or <code>Associate ontology 'my-ontology' version 2</code>. The title names the lead node (the node that starts the most edges, otherwise the first node) by its name, or by its ID if it has no name. For an edge-only change, it names the lead relationship's two node IDs. For an ontology load, it names the ontology ID and version. The title is for display only. It is not translated and is not meant to be parsed.</p>
/// <p>For an <code>ACL_RESTRICTED</code> change set (see <code>accessControl</code>), the title contains only the verb and the counts, with no node, edge, type, or ontology. The title is absent when the change set is unreadable or has nothing to describe, such as a change set that records a connection's removal. A node name or ID, ontology ID, or ontology version longer than 128 characters is truncated to 128 characters, ending in <code>…</code>.</p>
pub fn title(&self) -> ::std::option::Option<&str> {
self.title.as_deref()
}
/// <p>The activity that generated the change set (see <code>Activity</code>). This member can be absent, so handle a proposal that has no activity. For example, it's absent when the change set is unreadable, when AWS Context wrote the change set to load an ontology's schema, when the change set records a connection's removal, and when this API version doesn't recognize the activity.</p>
pub fn generated_by(&self) -> ::std::option::Option<&crate::types::Activity> {
self.generated_by.as_ref()
}
/// <p>An opaque revision token. Pass it back as <code>revisionId</code> when you accept or reject the proposal.</p>
pub fn revision_id(&self) -> &str {
use std::ops::Deref;
self.revision_id.deref()
}
/// <p>The status of the curation proposal, such as <code>PENDING_REVIEW</code> while it waits for a decision, <code>APPROVED</code> or <code>REJECTED</code> once it is decided, or <code>ARCHIVED</code> when the connection that produced it was removed from the agent context. New values can be added, so handle a status that you don't recognize.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>PENDING_REVIEW</code> - Waiting for a curator's decision. The only status Accept and Reject act on.</p></li>
/// <li>
/// <p><code>APPROVED</code> - A curator accepted it. Its change set is published or publishing.</p></li>
/// <li>
/// <p><code>REJECTED</code> - Closed without applying its change set: a curator rejected it, or the service did when a holding policy's review window passed with no decision (<code>statusReasonCode</code> REQUEST_EXPIRED).</p></li>
/// <li>
/// <p><code>SUPERSEDED</code> - A newer proposal for the same document replaced it.</p></li>
/// <li>
/// <p><code>FAILED</code> - The proposal was accepted, but publishing its change set failed. This status is final. To apply the change, submit it again.</p></li>
/// <li>
/// <p><code>PUBLISHING</code> - Accepted and publishing asynchronously (an ontology-schema publish). The status then changes to APPROVED or FAILED.</p></li>
/// <li>
/// <p><code>ARCHIVED</code> - The connection that produced it was removed from the agent context. <code>statusReason.code</code> is CONNECTION_REMOVED.</p></li>
/// </ul>
pub fn status(&self) -> &crate::types::CurationProposalStatus {
&self.status
}
/// <p>Why the service decided the proposal, when it did: REQUEST_EXPIRED when a holding policy's auto-reject window passed with no decision. Absent when a curator decided it.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>REQUEST_EXPIRED</code> - The auto-reject window of a policy that held the proposal passed with no decision, so the service rejected it.</p></li>
/// <li>
/// <p><code>CONNECTION_REMOVED</code> - The connection was removed from the agent context. AWS Context removes the data that only that connection produced, and archives the connection's pending proposals.</p></li>
/// </ul>
pub fn status_reason_code(&self) -> ::std::option::Option<&crate::types::StatusReasonCode> {
self.status_reason_code.as_ref()
}
/// <p>Who can read the authorizing change set's content. See <code>AccessControl</code>. If the value is <code>ACL_RESTRICTED</code>, <code>ListChangeSetOperations</code> on <code>changeSetId</code> returns the operations only to an allowed end user. Any other caller gets <code>AccessDeniedException</code>, and <code>GetChangeSet</code> returns only metadata, and the proposal's title has no node names or edge endpoints. The service returns <code>accessControl</code> on every proposal.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>ACL_RESTRICTED</code> - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's <code>title</code> names no nodes or edges.</p></li>
/// <li>
/// <p><code>NO_ACL</code> - Every caller can read the content.</p></li>
/// </ul>
pub fn access_control(&self) -> ::std::option::Option<&crate::types::AccessControl> {
self.access_control.as_ref()
}
/// <p>The agent context's ID.</p>
pub fn agent_context_id(&self) -> &str {
use std::ops::Deref;
self.agent_context_id.deref()
}
/// <p>The date and time when the review window closes, which is when a holding policy's <code>autoRejectAfterSeconds</code> elapses. If no curator has decided the proposal by then, AWS Context rejects it with <code>statusReasonCode</code> <code>REQUEST_EXPIRED</code>. Present only while <code>status</code> is <code>PENDING_REVIEW</code> and a holding policy set a window. Absent on every other status.</p>
pub fn expires_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.expires_at.as_ref()
}
/// <p>The date and time when the curation proposal was created.</p>
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
/// <p>The date and time when the curation proposal was last updated, such as when its change set was edited or the proposal was decided. Equal to <code>createdAt</code> until the first update.</p>
pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.updated_at
}
/// <p>Why AWS Context closed the proposal. Set on an <code>ARCHIVED</code> proposal. Absent otherwise.</p>
pub fn status_reason(&self) -> ::std::option::Option<&crate::types::StatusReason> {
self.status_reason.as_ref()
}
/// <p>The proposal's opaque instance ID. Requests take it as <code>curationProposalId</code>.</p>
pub fn id(&self) -> &str {
use std::ops::Deref;
self.id.deref()
}
/// <p>The policies that routed this change set to review (the <code>HOLD_FOR_REVIEW</code> entries in the change set's evaluation). Absent if none held it.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.triggering_policies.is_none()`.
pub fn triggering_policies(&self) -> &[crate::types::TriggeringPolicy] {
self.triggering_policies.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for RejectCurationProposalOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl RejectCurationProposalOutput {
/// Creates a new builder-style object to manufacture [`RejectCurationProposalOutput`](crate::operation::reject_curation_proposal::RejectCurationProposalOutput).
pub fn builder() -> crate::operation::reject_curation_proposal::builders::RejectCurationProposalOutputBuilder {
crate::operation::reject_curation_proposal::builders::RejectCurationProposalOutputBuilder::default()
}
}
/// A builder for [`RejectCurationProposalOutput`](crate::operation::reject_curation_proposal::RejectCurationProposalOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RejectCurationProposalOutputBuilder {
pub(crate) change_set_id: ::std::option::Option<::std::string::String>,
pub(crate) title: ::std::option::Option<::std::string::String>,
pub(crate) generated_by: ::std::option::Option<crate::types::Activity>,
pub(crate) revision_id: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::CurationProposalStatus>,
pub(crate) status_reason_code: ::std::option::Option<crate::types::StatusReasonCode>,
pub(crate) access_control: ::std::option::Option<crate::types::AccessControl>,
pub(crate) agent_context_id: ::std::option::Option<::std::string::String>,
pub(crate) expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) status_reason: ::std::option::Option<crate::types::StatusReason>,
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) triggering_policies: ::std::option::Option<::std::vec::Vec<crate::types::TriggeringPolicy>>,
_request_id: Option<String>,
}
impl RejectCurationProposalOutputBuilder {
/// <p>The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.</p>
/// This field is required.
pub fn change_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.change_set_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.</p>
pub fn set_change_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.change_set_id = input;
self
}
/// <p>The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.</p>
pub fn get_change_set_id(&self) -> &::std::option::Option<::std::string::String> {
&self.change_set_id
}
/// <p>A one-line English title that AWS Context composes for the proposal, at most 1,024 characters. For example, <code>Add 'orders' and 2 more entities, and 20 relationships</code>, <code>Add 'orders → customers' and 2 more relationships</code>, or <code>Associate ontology 'my-ontology' version 2</code>. The title names the lead node (the node that starts the most edges, otherwise the first node) by its name, or by its ID if it has no name. For an edge-only change, it names the lead relationship's two node IDs. For an ontology load, it names the ontology ID and version. The title is for display only. It is not translated and is not meant to be parsed.</p>
/// <p>For an <code>ACL_RESTRICTED</code> change set (see <code>accessControl</code>), the title contains only the verb and the counts, with no node, edge, type, or ontology. The title is absent when the change set is unreadable or has nothing to describe, such as a change set that records a connection's removal. A node name or ID, ontology ID, or ontology version longer than 128 characters is truncated to 128 characters, ending in <code>…</code>.</p>
pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.title = ::std::option::Option::Some(input.into());
self
}
/// <p>A one-line English title that AWS Context composes for the proposal, at most 1,024 characters. For example, <code>Add 'orders' and 2 more entities, and 20 relationships</code>, <code>Add 'orders → customers' and 2 more relationships</code>, or <code>Associate ontology 'my-ontology' version 2</code>. The title names the lead node (the node that starts the most edges, otherwise the first node) by its name, or by its ID if it has no name. For an edge-only change, it names the lead relationship's two node IDs. For an ontology load, it names the ontology ID and version. The title is for display only. It is not translated and is not meant to be parsed.</p>
/// <p>For an <code>ACL_RESTRICTED</code> change set (see <code>accessControl</code>), the title contains only the verb and the counts, with no node, edge, type, or ontology. The title is absent when the change set is unreadable or has nothing to describe, such as a change set that records a connection's removal. A node name or ID, ontology ID, or ontology version longer than 128 characters is truncated to 128 characters, ending in <code>…</code>.</p>
pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.title = input;
self
}
/// <p>A one-line English title that AWS Context composes for the proposal, at most 1,024 characters. For example, <code>Add 'orders' and 2 more entities, and 20 relationships</code>, <code>Add 'orders → customers' and 2 more relationships</code>, or <code>Associate ontology 'my-ontology' version 2</code>. The title names the lead node (the node that starts the most edges, otherwise the first node) by its name, or by its ID if it has no name. For an edge-only change, it names the lead relationship's two node IDs. For an ontology load, it names the ontology ID and version. The title is for display only. It is not translated and is not meant to be parsed.</p>
/// <p>For an <code>ACL_RESTRICTED</code> change set (see <code>accessControl</code>), the title contains only the verb and the counts, with no node, edge, type, or ontology. The title is absent when the change set is unreadable or has nothing to describe, such as a change set that records a connection's removal. A node name or ID, ontology ID, or ontology version longer than 128 characters is truncated to 128 characters, ending in <code>…</code>.</p>
pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
&self.title
}
/// <p>The activity that generated the change set (see <code>Activity</code>). This member can be absent, so handle a proposal that has no activity. For example, it's absent when the change set is unreadable, when AWS Context wrote the change set to load an ontology's schema, when the change set records a connection's removal, and when this API version doesn't recognize the activity.</p>
pub fn generated_by(mut self, input: crate::types::Activity) -> Self {
self.generated_by = ::std::option::Option::Some(input);
self
}
/// <p>The activity that generated the change set (see <code>Activity</code>). This member can be absent, so handle a proposal that has no activity. For example, it's absent when the change set is unreadable, when AWS Context wrote the change set to load an ontology's schema, when the change set records a connection's removal, and when this API version doesn't recognize the activity.</p>
pub fn set_generated_by(mut self, input: ::std::option::Option<crate::types::Activity>) -> Self {
self.generated_by = input;
self
}
/// <p>The activity that generated the change set (see <code>Activity</code>). This member can be absent, so handle a proposal that has no activity. For example, it's absent when the change set is unreadable, when AWS Context wrote the change set to load an ontology's schema, when the change set records a connection's removal, and when this API version doesn't recognize the activity.</p>
pub fn get_generated_by(&self) -> &::std::option::Option<crate::types::Activity> {
&self.generated_by
}
/// <p>An opaque revision token. Pass it back as <code>revisionId</code> when you accept or reject the proposal.</p>
/// This field is required.
pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.revision_id = ::std::option::Option::Some(input.into());
self
}
/// <p>An opaque revision token. Pass it back as <code>revisionId</code> when you accept or reject the proposal.</p>
pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.revision_id = input;
self
}
/// <p>An opaque revision token. Pass it back as <code>revisionId</code> when you accept or reject the proposal.</p>
pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
&self.revision_id
}
/// <p>The status of the curation proposal, such as <code>PENDING_REVIEW</code> while it waits for a decision, <code>APPROVED</code> or <code>REJECTED</code> once it is decided, or <code>ARCHIVED</code> when the connection that produced it was removed from the agent context. New values can be added, so handle a status that you don't recognize.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>PENDING_REVIEW</code> - Waiting for a curator's decision. The only status Accept and Reject act on.</p></li>
/// <li>
/// <p><code>APPROVED</code> - A curator accepted it. Its change set is published or publishing.</p></li>
/// <li>
/// <p><code>REJECTED</code> - Closed without applying its change set: a curator rejected it, or the service did when a holding policy's review window passed with no decision (<code>statusReasonCode</code> REQUEST_EXPIRED).</p></li>
/// <li>
/// <p><code>SUPERSEDED</code> - A newer proposal for the same document replaced it.</p></li>
/// <li>
/// <p><code>FAILED</code> - The proposal was accepted, but publishing its change set failed. This status is final. To apply the change, submit it again.</p></li>
/// <li>
/// <p><code>PUBLISHING</code> - Accepted and publishing asynchronously (an ontology-schema publish). The status then changes to APPROVED or FAILED.</p></li>
/// <li>
/// <p><code>ARCHIVED</code> - The connection that produced it was removed from the agent context. <code>statusReason.code</code> is CONNECTION_REMOVED.</p></li>
/// </ul>
/// This field is required.
pub fn status(mut self, input: crate::types::CurationProposalStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The status of the curation proposal, such as <code>PENDING_REVIEW</code> while it waits for a decision, <code>APPROVED</code> or <code>REJECTED</code> once it is decided, or <code>ARCHIVED</code> when the connection that produced it was removed from the agent context. New values can be added, so handle a status that you don't recognize.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>PENDING_REVIEW</code> - Waiting for a curator's decision. The only status Accept and Reject act on.</p></li>
/// <li>
/// <p><code>APPROVED</code> - A curator accepted it. Its change set is published or publishing.</p></li>
/// <li>
/// <p><code>REJECTED</code> - Closed without applying its change set: a curator rejected it, or the service did when a holding policy's review window passed with no decision (<code>statusReasonCode</code> REQUEST_EXPIRED).</p></li>
/// <li>
/// <p><code>SUPERSEDED</code> - A newer proposal for the same document replaced it.</p></li>
/// <li>
/// <p><code>FAILED</code> - The proposal was accepted, but publishing its change set failed. This status is final. To apply the change, submit it again.</p></li>
/// <li>
/// <p><code>PUBLISHING</code> - Accepted and publishing asynchronously (an ontology-schema publish). The status then changes to APPROVED or FAILED.</p></li>
/// <li>
/// <p><code>ARCHIVED</code> - The connection that produced it was removed from the agent context. <code>statusReason.code</code> is CONNECTION_REMOVED.</p></li>
/// </ul>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::CurationProposalStatus>) -> Self {
self.status = input;
self
}
/// <p>The status of the curation proposal, such as <code>PENDING_REVIEW</code> while it waits for a decision, <code>APPROVED</code> or <code>REJECTED</code> once it is decided, or <code>ARCHIVED</code> when the connection that produced it was removed from the agent context. New values can be added, so handle a status that you don't recognize.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>PENDING_REVIEW</code> - Waiting for a curator's decision. The only status Accept and Reject act on.</p></li>
/// <li>
/// <p><code>APPROVED</code> - A curator accepted it. Its change set is published or publishing.</p></li>
/// <li>
/// <p><code>REJECTED</code> - Closed without applying its change set: a curator rejected it, or the service did when a holding policy's review window passed with no decision (<code>statusReasonCode</code> REQUEST_EXPIRED).</p></li>
/// <li>
/// <p><code>SUPERSEDED</code> - A newer proposal for the same document replaced it.</p></li>
/// <li>
/// <p><code>FAILED</code> - The proposal was accepted, but publishing its change set failed. This status is final. To apply the change, submit it again.</p></li>
/// <li>
/// <p><code>PUBLISHING</code> - Accepted and publishing asynchronously (an ontology-schema publish). The status then changes to APPROVED or FAILED.</p></li>
/// <li>
/// <p><code>ARCHIVED</code> - The connection that produced it was removed from the agent context. <code>statusReason.code</code> is CONNECTION_REMOVED.</p></li>
/// </ul>
pub fn get_status(&self) -> &::std::option::Option<crate::types::CurationProposalStatus> {
&self.status
}
/// <p>Why the service decided the proposal, when it did: REQUEST_EXPIRED when a holding policy's auto-reject window passed with no decision. Absent when a curator decided it.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>REQUEST_EXPIRED</code> - The auto-reject window of a policy that held the proposal passed with no decision, so the service rejected it.</p></li>
/// <li>
/// <p><code>CONNECTION_REMOVED</code> - The connection was removed from the agent context. AWS Context removes the data that only that connection produced, and archives the connection's pending proposals.</p></li>
/// </ul>
pub fn status_reason_code(mut self, input: crate::types::StatusReasonCode) -> Self {
self.status_reason_code = ::std::option::Option::Some(input);
self
}
/// <p>Why the service decided the proposal, when it did: REQUEST_EXPIRED when a holding policy's auto-reject window passed with no decision. Absent when a curator decided it.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>REQUEST_EXPIRED</code> - The auto-reject window of a policy that held the proposal passed with no decision, so the service rejected it.</p></li>
/// <li>
/// <p><code>CONNECTION_REMOVED</code> - The connection was removed from the agent context. AWS Context removes the data that only that connection produced, and archives the connection's pending proposals.</p></li>
/// </ul>
pub fn set_status_reason_code(mut self, input: ::std::option::Option<crate::types::StatusReasonCode>) -> Self {
self.status_reason_code = input;
self
}
/// <p>Why the service decided the proposal, when it did: REQUEST_EXPIRED when a holding policy's auto-reject window passed with no decision. Absent when a curator decided it.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>REQUEST_EXPIRED</code> - The auto-reject window of a policy that held the proposal passed with no decision, so the service rejected it.</p></li>
/// <li>
/// <p><code>CONNECTION_REMOVED</code> - The connection was removed from the agent context. AWS Context removes the data that only that connection produced, and archives the connection's pending proposals.</p></li>
/// </ul>
pub fn get_status_reason_code(&self) -> &::std::option::Option<crate::types::StatusReasonCode> {
&self.status_reason_code
}
/// <p>Who can read the authorizing change set's content. See <code>AccessControl</code>. If the value is <code>ACL_RESTRICTED</code>, <code>ListChangeSetOperations</code> on <code>changeSetId</code> returns the operations only to an allowed end user. Any other caller gets <code>AccessDeniedException</code>, and <code>GetChangeSet</code> returns only metadata, and the proposal's title has no node names or edge endpoints. The service returns <code>accessControl</code> on every proposal.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>ACL_RESTRICTED</code> - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's <code>title</code> names no nodes or edges.</p></li>
/// <li>
/// <p><code>NO_ACL</code> - Every caller can read the content.</p></li>
/// </ul>
pub fn access_control(mut self, input: crate::types::AccessControl) -> Self {
self.access_control = ::std::option::Option::Some(input);
self
}
/// <p>Who can read the authorizing change set's content. See <code>AccessControl</code>. If the value is <code>ACL_RESTRICTED</code>, <code>ListChangeSetOperations</code> on <code>changeSetId</code> returns the operations only to an allowed end user. Any other caller gets <code>AccessDeniedException</code>, and <code>GetChangeSet</code> returns only metadata, and the proposal's title has no node names or edge endpoints. The service returns <code>accessControl</code> on every proposal.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>ACL_RESTRICTED</code> - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's <code>title</code> names no nodes or edges.</p></li>
/// <li>
/// <p><code>NO_ACL</code> - Every caller can read the content.</p></li>
/// </ul>
pub fn set_access_control(mut self, input: ::std::option::Option<crate::types::AccessControl>) -> Self {
self.access_control = input;
self
}
/// <p>Who can read the authorizing change set's content. See <code>AccessControl</code>. If the value is <code>ACL_RESTRICTED</code>, <code>ListChangeSetOperations</code> on <code>changeSetId</code> returns the operations only to an allowed end user. Any other caller gets <code>AccessDeniedException</code>, and <code>GetChangeSet</code> returns only metadata, and the proposal's title has no node names or edge endpoints. The service returns <code>accessControl</code> on every proposal.</p>
/// <p>Valid values:</p>
/// <ul>
/// <li>
/// <p><code>ACL_RESTRICTED</code> - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's <code>title</code> names no nodes or edges.</p></li>
/// <li>
/// <p><code>NO_ACL</code> - Every caller can read the content.</p></li>
/// </ul>
pub fn get_access_control(&self) -> &::std::option::Option<crate::types::AccessControl> {
&self.access_control
}
/// <p>The agent context's ID.</p>
/// This field is required.
pub fn agent_context_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.agent_context_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The agent context's ID.</p>
pub fn set_agent_context_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_context_id = input;
self
}
/// <p>The agent context's ID.</p>
pub fn get_agent_context_id(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_context_id
}
/// <p>The date and time when the review window closes, which is when a holding policy's <code>autoRejectAfterSeconds</code> elapses. If no curator has decided the proposal by then, AWS Context rejects it with <code>statusReasonCode</code> <code>REQUEST_EXPIRED</code>. Present only while <code>status</code> is <code>PENDING_REVIEW</code> and a holding policy set a window. Absent on every other status.</p>
pub fn expires_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.expires_at = ::std::option::Option::Some(input);
self
}
/// <p>The date and time when the review window closes, which is when a holding policy's <code>autoRejectAfterSeconds</code> elapses. If no curator has decided the proposal by then, AWS Context rejects it with <code>statusReasonCode</code> <code>REQUEST_EXPIRED</code>. Present only while <code>status</code> is <code>PENDING_REVIEW</code> and a holding policy set a window. Absent on every other status.</p>
pub fn set_expires_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.expires_at = input;
self
}
/// <p>The date and time when the review window closes, which is when a holding policy's <code>autoRejectAfterSeconds</code> elapses. If no curator has decided the proposal by then, AWS Context rejects it with <code>statusReasonCode</code> <code>REQUEST_EXPIRED</code>. Present only while <code>status</code> is <code>PENDING_REVIEW</code> and a holding policy set a window. Absent on every other status.</p>
pub fn get_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.expires_at
}
/// <p>The date and time when the curation proposal was created.</p>
/// This field is required.
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
/// <p>The date and time when the curation proposal was created.</p>
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
/// <p>The date and time when the curation proposal was created.</p>
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
/// <p>The date and time when the curation proposal was last updated, such as when its change set was edited or the proposal was decided. Equal to <code>createdAt</code> until the first update.</p>
/// This field is required.
pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
/// <p>The date and time when the curation proposal was last updated, such as when its change set was edited or the proposal was decided. Equal to <code>createdAt</code> until the first update.</p>
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
/// <p>The date and time when the curation proposal was last updated, such as when its change set was edited or the proposal was decided. Equal to <code>createdAt</code> until the first update.</p>
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
/// <p>Why AWS Context closed the proposal. Set on an <code>ARCHIVED</code> proposal. Absent otherwise.</p>
pub fn status_reason(mut self, input: crate::types::StatusReason) -> Self {
self.status_reason = ::std::option::Option::Some(input);
self
}
/// <p>Why AWS Context closed the proposal. Set on an <code>ARCHIVED</code> proposal. Absent otherwise.</p>
pub fn set_status_reason(mut self, input: ::std::option::Option<crate::types::StatusReason>) -> Self {
self.status_reason = input;
self
}
/// <p>Why AWS Context closed the proposal. Set on an <code>ARCHIVED</code> proposal. Absent otherwise.</p>
pub fn get_status_reason(&self) -> &::std::option::Option<crate::types::StatusReason> {
&self.status_reason
}
/// <p>The proposal's opaque instance ID. Requests take it as <code>curationProposalId</code>.</p>
/// This field is required.
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
/// <p>The proposal's opaque instance ID. Requests take it as <code>curationProposalId</code>.</p>
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
/// <p>The proposal's opaque instance ID. Requests take it as <code>curationProposalId</code>.</p>
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
/// Appends an item to `triggering_policies`.
///
/// To override the contents of this collection use [`set_triggering_policies`](Self::set_triggering_policies).
///
/// <p>The policies that routed this change set to review (the <code>HOLD_FOR_REVIEW</code> entries in the change set's evaluation). Absent if none held it.</p>
pub fn triggering_policies(mut self, input: crate::types::TriggeringPolicy) -> Self {
let mut v = self.triggering_policies.unwrap_or_default();
v.push(input);
self.triggering_policies = ::std::option::Option::Some(v);
self
}
/// <p>The policies that routed this change set to review (the <code>HOLD_FOR_REVIEW</code> entries in the change set's evaluation). Absent if none held it.</p>
pub fn set_triggering_policies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TriggeringPolicy>>) -> Self {
self.triggering_policies = input;
self
}
/// <p>The policies that routed this change set to review (the <code>HOLD_FOR_REVIEW</code> entries in the change set's evaluation). Absent if none held it.</p>
pub fn get_triggering_policies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TriggeringPolicy>> {
&self.triggering_policies
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`RejectCurationProposalOutput`](crate::operation::reject_curation_proposal::RejectCurationProposalOutput).
/// This method will fail if any of the following fields are not set:
/// - [`change_set_id`](crate::operation::reject_curation_proposal::builders::RejectCurationProposalOutputBuilder::change_set_id)
/// - [`revision_id`](crate::operation::reject_curation_proposal::builders::RejectCurationProposalOutputBuilder::revision_id)
/// - [`status`](crate::operation::reject_curation_proposal::builders::RejectCurationProposalOutputBuilder::status)
/// - [`agent_context_id`](crate::operation::reject_curation_proposal::builders::RejectCurationProposalOutputBuilder::agent_context_id)
/// - [`created_at`](crate::operation::reject_curation_proposal::builders::RejectCurationProposalOutputBuilder::created_at)
/// - [`updated_at`](crate::operation::reject_curation_proposal::builders::RejectCurationProposalOutputBuilder::updated_at)
/// - [`id`](crate::operation::reject_curation_proposal::builders::RejectCurationProposalOutputBuilder::id)
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::reject_curation_proposal::RejectCurationProposalOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::reject_curation_proposal::RejectCurationProposalOutput {
change_set_id: self.change_set_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"change_set_id",
"change_set_id was not specified but it is required when building RejectCurationProposalOutput",
)
})?,
title: self.title,
generated_by: self.generated_by,
revision_id: self.revision_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"revision_id",
"revision_id was not specified but it is required when building RejectCurationProposalOutput",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building RejectCurationProposalOutput",
)
})?,
status_reason_code: self.status_reason_code,
access_control: self.access_control,
agent_context_id: self.agent_context_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"agent_context_id",
"agent_context_id was not specified but it is required when building RejectCurationProposalOutput",
)
})?,
expires_at: self.expires_at,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building RejectCurationProposalOutput",
)
})?,
updated_at: self.updated_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"updated_at",
"updated_at was not specified but it is required when building RejectCurationProposalOutput",
)
})?,
status_reason: self.status_reason,
id: self.id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"id",
"id was not specified but it is required when building RejectCurationProposalOutput",
)
})?,
triggering_policies: self.triggering_policies,
_request_id: self._request_id,
})
}
}