aws_sdk_glue/operation/update_job/
_update_job_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 UpdateJobInput {
6    /// <p>The name of the job definition to update.</p>
7    pub job_name: ::std::option::Option<::std::string::String>,
8    /// <p>Specifies the values with which to update the job definition. Unspecified configuration is removed or reset to default values.</p>
9    pub job_update: ::std::option::Option<crate::types::JobUpdate>,
10}
11impl UpdateJobInput {
12    /// <p>The name of the job definition to update.</p>
13    pub fn job_name(&self) -> ::std::option::Option<&str> {
14        self.job_name.as_deref()
15    }
16    /// <p>Specifies the values with which to update the job definition. Unspecified configuration is removed or reset to default values.</p>
17    pub fn job_update(&self) -> ::std::option::Option<&crate::types::JobUpdate> {
18        self.job_update.as_ref()
19    }
20}
21impl UpdateJobInput {
22    /// Creates a new builder-style object to manufacture [`UpdateJobInput`](crate::operation::update_job::UpdateJobInput).
23    pub fn builder() -> crate::operation::update_job::builders::UpdateJobInputBuilder {
24        crate::operation::update_job::builders::UpdateJobInputBuilder::default()
25    }
26}
27
28/// A builder for [`UpdateJobInput`](crate::operation::update_job::UpdateJobInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct UpdateJobInputBuilder {
32    pub(crate) job_name: ::std::option::Option<::std::string::String>,
33    pub(crate) job_update: ::std::option::Option<crate::types::JobUpdate>,
34}
35impl UpdateJobInputBuilder {
36    /// <p>The name of the job definition to update.</p>
37    /// This field is required.
38    pub fn job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.job_name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name of the job definition to update.</p>
43    pub fn set_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.job_name = input;
45        self
46    }
47    /// <p>The name of the job definition to update.</p>
48    pub fn get_job_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.job_name
50    }
51    /// <p>Specifies the values with which to update the job definition. Unspecified configuration is removed or reset to default values.</p>
52    /// This field is required.
53    pub fn job_update(mut self, input: crate::types::JobUpdate) -> Self {
54        self.job_update = ::std::option::Option::Some(input);
55        self
56    }
57    /// <p>Specifies the values with which to update the job definition. Unspecified configuration is removed or reset to default values.</p>
58    pub fn set_job_update(mut self, input: ::std::option::Option<crate::types::JobUpdate>) -> Self {
59        self.job_update = input;
60        self
61    }
62    /// <p>Specifies the values with which to update the job definition. Unspecified configuration is removed or reset to default values.</p>
63    pub fn get_job_update(&self) -> &::std::option::Option<crate::types::JobUpdate> {
64        &self.job_update
65    }
66    /// Consumes the builder and constructs a [`UpdateJobInput`](crate::operation::update_job::UpdateJobInput).
67    pub fn build(self) -> ::std::result::Result<crate::operation::update_job::UpdateJobInput, ::aws_smithy_types::error::operation::BuildError> {
68        ::std::result::Result::Ok(crate::operation::update_job::UpdateJobInput {
69            job_name: self.job_name,
70            job_update: self.job_update,
71        })
72    }
73}