Skip to main content

aws_sdk_elementalinference/operation/associate_feed/
_associate_feed_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct AssociateFeedInput {
6    /// <p>The ID of the feed.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>An identifier for the resource. This name must not resemble an ARN.</p>
9    /// <p>The resource is the source media that the feed will process. The name you assign should help you to later identify the source media that belongs to the feed. In this way, you will know which source media to push to the feed (using PutMedia).</p>
10    pub associated_resource_name: ::std::option::Option<::std::string::String>,
11    /// <p>An array of one or more outputs that you want to add to this feed now, to supplement any outputs that you specified when you created or updated the feed.</p>
12    pub outputs: ::std::option::Option<::std::vec::Vec<crate::types::CreateOutput>>,
13    /// <p>Set to true if you want to do a dry run of the associate action.</p>
14    /// <p>Elemental Inference will validate that the real request would succeed without actually making any changes. A dry run catches errors such as missing IAM permissions, quota limits exceeded, conflicting outputs, and so on. If the dry run fails, the action returns a 4xx error code. After you've fixed the errors, resubmit the request.</p>
15    pub dry_run: ::std::option::Option<bool>,
16}
17impl AssociateFeedInput {
18    /// <p>The ID of the feed.</p>
19    pub fn id(&self) -> ::std::option::Option<&str> {
20        self.id.as_deref()
21    }
22    /// <p>An identifier for the resource. This name must not resemble an ARN.</p>
23    /// <p>The resource is the source media that the feed will process. The name you assign should help you to later identify the source media that belongs to the feed. In this way, you will know which source media to push to the feed (using PutMedia).</p>
24    pub fn associated_resource_name(&self) -> ::std::option::Option<&str> {
25        self.associated_resource_name.as_deref()
26    }
27    /// <p>An array of one or more outputs that you want to add to this feed now, to supplement any outputs that you specified when you created or updated the feed.</p>
28    ///
29    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.outputs.is_none()`.
30    pub fn outputs(&self) -> &[crate::types::CreateOutput] {
31        self.outputs.as_deref().unwrap_or_default()
32    }
33    /// <p>Set to true if you want to do a dry run of the associate action.</p>
34    /// <p>Elemental Inference will validate that the real request would succeed without actually making any changes. A dry run catches errors such as missing IAM permissions, quota limits exceeded, conflicting outputs, and so on. If the dry run fails, the action returns a 4xx error code. After you've fixed the errors, resubmit the request.</p>
35    pub fn dry_run(&self) -> ::std::option::Option<bool> {
36        self.dry_run
37    }
38}
39impl AssociateFeedInput {
40    /// Creates a new builder-style object to manufacture [`AssociateFeedInput`](crate::operation::associate_feed::AssociateFeedInput).
41    pub fn builder() -> crate::operation::associate_feed::builders::AssociateFeedInputBuilder {
42        crate::operation::associate_feed::builders::AssociateFeedInputBuilder::default()
43    }
44}
45
46/// A builder for [`AssociateFeedInput`](crate::operation::associate_feed::AssociateFeedInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct AssociateFeedInputBuilder {
50    pub(crate) id: ::std::option::Option<::std::string::String>,
51    pub(crate) associated_resource_name: ::std::option::Option<::std::string::String>,
52    pub(crate) outputs: ::std::option::Option<::std::vec::Vec<crate::types::CreateOutput>>,
53    pub(crate) dry_run: ::std::option::Option<bool>,
54}
55impl AssociateFeedInputBuilder {
56    /// <p>The ID of the feed.</p>
57    /// This field is required.
58    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.id = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The ID of the feed.</p>
63    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.id = input;
65        self
66    }
67    /// <p>The ID of the feed.</p>
68    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
69        &self.id
70    }
71    /// <p>An identifier for the resource. This name must not resemble an ARN.</p>
72    /// <p>The resource is the source media that the feed will process. The name you assign should help you to later identify the source media that belongs to the feed. In this way, you will know which source media to push to the feed (using PutMedia).</p>
73    /// This field is required.
74    pub fn associated_resource_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.associated_resource_name = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>An identifier for the resource. This name must not resemble an ARN.</p>
79    /// <p>The resource is the source media that the feed will process. The name you assign should help you to later identify the source media that belongs to the feed. In this way, you will know which source media to push to the feed (using PutMedia).</p>
80    pub fn set_associated_resource_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.associated_resource_name = input;
82        self
83    }
84    /// <p>An identifier for the resource. This name must not resemble an ARN.</p>
85    /// <p>The resource is the source media that the feed will process. The name you assign should help you to later identify the source media that belongs to the feed. In this way, you will know which source media to push to the feed (using PutMedia).</p>
86    pub fn get_associated_resource_name(&self) -> &::std::option::Option<::std::string::String> {
87        &self.associated_resource_name
88    }
89    /// Appends an item to `outputs`.
90    ///
91    /// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
92    ///
93    /// <p>An array of one or more outputs that you want to add to this feed now, to supplement any outputs that you specified when you created or updated the feed.</p>
94    pub fn outputs(mut self, input: crate::types::CreateOutput) -> Self {
95        let mut v = self.outputs.unwrap_or_default();
96        v.push(input);
97        self.outputs = ::std::option::Option::Some(v);
98        self
99    }
100    /// <p>An array of one or more outputs that you want to add to this feed now, to supplement any outputs that you specified when you created or updated the feed.</p>
101    pub fn set_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CreateOutput>>) -> Self {
102        self.outputs = input;
103        self
104    }
105    /// <p>An array of one or more outputs that you want to add to this feed now, to supplement any outputs that you specified when you created or updated the feed.</p>
106    pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CreateOutput>> {
107        &self.outputs
108    }
109    /// <p>Set to true if you want to do a dry run of the associate action.</p>
110    /// <p>Elemental Inference will validate that the real request would succeed without actually making any changes. A dry run catches errors such as missing IAM permissions, quota limits exceeded, conflicting outputs, and so on. If the dry run fails, the action returns a 4xx error code. After you've fixed the errors, resubmit the request.</p>
111    pub fn dry_run(mut self, input: bool) -> Self {
112        self.dry_run = ::std::option::Option::Some(input);
113        self
114    }
115    /// <p>Set to true if you want to do a dry run of the associate action.</p>
116    /// <p>Elemental Inference will validate that the real request would succeed without actually making any changes. A dry run catches errors such as missing IAM permissions, quota limits exceeded, conflicting outputs, and so on. If the dry run fails, the action returns a 4xx error code. After you've fixed the errors, resubmit the request.</p>
117    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
118        self.dry_run = input;
119        self
120    }
121    /// <p>Set to true if you want to do a dry run of the associate action.</p>
122    /// <p>Elemental Inference will validate that the real request would succeed without actually making any changes. A dry run catches errors such as missing IAM permissions, quota limits exceeded, conflicting outputs, and so on. If the dry run fails, the action returns a 4xx error code. After you've fixed the errors, resubmit the request.</p>
123    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
124        &self.dry_run
125    }
126    /// Consumes the builder and constructs a [`AssociateFeedInput`](crate::operation::associate_feed::AssociateFeedInput).
127    pub fn build(
128        self,
129    ) -> ::std::result::Result<crate::operation::associate_feed::AssociateFeedInput, ::aws_smithy_types::error::operation::BuildError> {
130        ::std::result::Result::Ok(crate::operation::associate_feed::AssociateFeedInput {
131            id: self.id,
132            associated_resource_name: self.associated_resource_name,
133            outputs: self.outputs,
134            dry_run: self.dry_run,
135        })
136    }
137}