docktor-api 0.35.2

Autogenerate Docktor API service model
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Prometheus target input structure.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PrometheusTargetOperationInput {}
impl std::fmt::Debug for PrometheusTargetOperationInput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("PrometheusTargetOperationInput");
        formatter.finish()
    }
}
/// See [`PrometheusTargetOperationInput`](crate::input::PrometheusTargetOperationInput)
pub mod prometheus_target_operation_input {
    /// A builder for [`PrometheusTargetOperationInput`](crate::input::PrometheusTargetOperationInput)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {}
    impl Builder {
        /// Consumes the builder and constructs a [`PrometheusTargetOperationInput`](crate::input::PrometheusTargetOperationInput)
        pub fn build(
            self,
        ) -> std::result::Result<
            crate::input::PrometheusTargetOperationInput,
            aws_smithy_http::operation::BuildError,
        > {
            Ok(crate::input::PrometheusTargetOperationInput {})
        }
    }
}
impl PrometheusTargetOperationInput {
    /// Creates a new builder-style object to manufacture [`PrometheusTargetOperationInput`](crate::input::PrometheusTargetOperationInput)
    pub fn builder() -> crate::input::prometheus_target_operation_input::Builder {
        crate::input::prometheus_target_operation_input::Builder::default()
    }
}

/// Systemd input structure.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RestartOperationInput {
    /// Service name.
    pub services: std::option::Option<std::vec::Vec<std::string::String>>,
    /// Hostname.
    pub hostname: std::option::Option<std::string::String>,
}
impl RestartOperationInput {
    /// Service name.
    pub fn services(&self) -> std::option::Option<&[std::string::String]> {
        self.services.as_deref()
    }
    /// Hostname.
    pub fn hostname(&self) -> std::option::Option<&str> {
        self.hostname.as_deref()
    }
}
impl std::fmt::Debug for RestartOperationInput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("RestartOperationInput");
        formatter.field("services", &self.services);
        formatter.field("hostname", &self.hostname);
        formatter.finish()
    }
}
/// See [`RestartOperationInput`](crate::input::RestartOperationInput)
pub mod restart_operation_input {
    /// A builder for [`RestartOperationInput`](crate::input::RestartOperationInput)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) services: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) hostname: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `services`.
        ///
        /// To override the contents of this collection use [`set_services`](Self::set_services).
        ///
        /// Service name.
        pub fn services(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.services.unwrap_or_default();
            v.push(input.into());
            self.services = Some(v);
            self
        }
        /// Service name.
        pub fn set_services(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.services = input;
            self
        }
        /// Hostname.
        pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
            self.hostname = Some(input.into());
            self
        }
        /// Hostname.
        pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.hostname = input;
            self
        }
        /// Consumes the builder and constructs a [`RestartOperationInput`](crate::input::RestartOperationInput)
        pub fn build(
            self,
        ) -> std::result::Result<
            crate::input::RestartOperationInput,
            aws_smithy_http::operation::BuildError,
        > {
            Ok(crate::input::RestartOperationInput {
                services: self.services,
                hostname: self.hostname,
            })
        }
    }
}
impl RestartOperationInput {
    /// Creates a new builder-style object to manufacture [`RestartOperationInput`](crate::input::RestartOperationInput)
    pub fn builder() -> crate::input::restart_operation_input::Builder {
        crate::input::restart_operation_input::Builder::default()
    }
}

/// Systemd input structure.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopOperationInput {
    /// Service name.
    pub services: std::option::Option<std::vec::Vec<std::string::String>>,
    /// Hostname.
    pub hostname: std::option::Option<std::string::String>,
}
impl StopOperationInput {
    /// Service name.
    pub fn services(&self) -> std::option::Option<&[std::string::String]> {
        self.services.as_deref()
    }
    /// Hostname.
    pub fn hostname(&self) -> std::option::Option<&str> {
        self.hostname.as_deref()
    }
}
impl std::fmt::Debug for StopOperationInput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("StopOperationInput");
        formatter.field("services", &self.services);
        formatter.field("hostname", &self.hostname);
        formatter.finish()
    }
}
/// See [`StopOperationInput`](crate::input::StopOperationInput)
pub mod stop_operation_input {
    /// A builder for [`StopOperationInput`](crate::input::StopOperationInput)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) services: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) hostname: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `services`.
        ///
        /// To override the contents of this collection use [`set_services`](Self::set_services).
        ///
        /// Service name.
        pub fn services(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.services.unwrap_or_default();
            v.push(input.into());
            self.services = Some(v);
            self
        }
        /// Service name.
        pub fn set_services(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.services = input;
            self
        }
        /// Hostname.
        pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
            self.hostname = Some(input.into());
            self
        }
        /// Hostname.
        pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.hostname = input;
            self
        }
        /// Consumes the builder and constructs a [`StopOperationInput`](crate::input::StopOperationInput)
        pub fn build(
            self,
        ) -> std::result::Result<
            crate::input::StopOperationInput,
            aws_smithy_http::operation::BuildError,
        > {
            Ok(crate::input::StopOperationInput {
                services: self.services,
                hostname: self.hostname,
            })
        }
    }
}
impl StopOperationInput {
    /// Creates a new builder-style object to manufacture [`StopOperationInput`](crate::input::StopOperationInput)
    pub fn builder() -> crate::input::stop_operation_input::Builder {
        crate::input::stop_operation_input::Builder::default()
    }
}

/// Systemd input structure.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartOperationInput {
    /// Service name.
    pub services: std::option::Option<std::vec::Vec<std::string::String>>,
    /// Hostname.
    pub hostname: std::option::Option<std::string::String>,
}
impl StartOperationInput {
    /// Service name.
    pub fn services(&self) -> std::option::Option<&[std::string::String]> {
        self.services.as_deref()
    }
    /// Hostname.
    pub fn hostname(&self) -> std::option::Option<&str> {
        self.hostname.as_deref()
    }
}
impl std::fmt::Debug for StartOperationInput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("StartOperationInput");
        formatter.field("services", &self.services);
        formatter.field("hostname", &self.hostname);
        formatter.finish()
    }
}
/// See [`StartOperationInput`](crate::input::StartOperationInput)
pub mod start_operation_input {
    /// A builder for [`StartOperationInput`](crate::input::StartOperationInput)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) services: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) hostname: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `services`.
        ///
        /// To override the contents of this collection use [`set_services`](Self::set_services).
        ///
        /// Service name.
        pub fn services(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.services.unwrap_or_default();
            v.push(input.into());
            self.services = Some(v);
            self
        }
        /// Service name.
        pub fn set_services(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.services = input;
            self
        }
        /// Hostname.
        pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
            self.hostname = Some(input.into());
            self
        }
        /// Hostname.
        pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.hostname = input;
            self
        }
        /// Consumes the builder and constructs a [`StartOperationInput`](crate::input::StartOperationInput)
        pub fn build(
            self,
        ) -> std::result::Result<
            crate::input::StartOperationInput,
            aws_smithy_http::operation::BuildError,
        > {
            Ok(crate::input::StartOperationInput {
                services: self.services,
                hostname: self.hostname,
            })
        }
    }
}
impl StartOperationInput {
    /// Creates a new builder-style object to manufacture [`StartOperationInput`](crate::input::StartOperationInput)
    pub fn builder() -> crate::input::start_operation_input::Builder {
        crate::input::start_operation_input::Builder::default()
    }
}

/// ListInput structure
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListOperationInput {}
impl std::fmt::Debug for ListOperationInput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ListOperationInput");
        formatter.finish()
    }
}
/// See [`ListOperationInput`](crate::input::ListOperationInput)
pub mod list_operation_input {
    /// A builder for [`ListOperationInput`](crate::input::ListOperationInput)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {}
    impl Builder {
        /// Consumes the builder and constructs a [`ListOperationInput`](crate::input::ListOperationInput)
        pub fn build(
            self,
        ) -> std::result::Result<
            crate::input::ListOperationInput,
            aws_smithy_http::operation::BuildError,
        > {
            Ok(crate::input::ListOperationInput {})
        }
    }
}
impl ListOperationInput {
    /// Creates a new builder-style object to manufacture [`ListOperationInput`](crate::input::ListOperationInput)
    pub fn builder() -> crate::input::list_operation_input::Builder {
        crate::input::list_operation_input::Builder::default()
    }
}

/// //////////////////////////////////// Model //////////////////////////////////// Service healthcheck input structure
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HealthcheckOperationInput {}
impl std::fmt::Debug for HealthcheckOperationInput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("HealthcheckOperationInput");
        formatter.finish()
    }
}
/// See [`HealthcheckOperationInput`](crate::input::HealthcheckOperationInput)
pub mod healthcheck_operation_input {
    /// A builder for [`HealthcheckOperationInput`](crate::input::HealthcheckOperationInput)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {}
    impl Builder {
        /// Consumes the builder and constructs a [`HealthcheckOperationInput`](crate::input::HealthcheckOperationInput)
        pub fn build(
            self,
        ) -> std::result::Result<
            crate::input::HealthcheckOperationInput,
            aws_smithy_http::operation::BuildError,
        > {
            Ok(crate::input::HealthcheckOperationInput {})
        }
    }
}
impl HealthcheckOperationInput {
    /// Creates a new builder-style object to manufacture [`HealthcheckOperationInput`](crate::input::HealthcheckOperationInput)
    pub fn builder() -> crate::input::healthcheck_operation_input::Builder {
        crate::input::healthcheck_operation_input::Builder::default()
    }
}