aws_sdk_athena/types/
_capacity_assignment.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CapacityAssignment {
7 pub work_group_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
9}
10impl CapacityAssignment {
11 pub fn work_group_names(&self) -> &[::std::string::String] {
15 self.work_group_names.as_deref().unwrap_or_default()
16 }
17}
18impl CapacityAssignment {
19 pub fn builder() -> crate::types::builders::CapacityAssignmentBuilder {
21 crate::types::builders::CapacityAssignmentBuilder::default()
22 }
23}
24
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
27#[non_exhaustive]
28pub struct CapacityAssignmentBuilder {
29 pub(crate) work_group_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
30}
31impl CapacityAssignmentBuilder {
32 pub fn work_group_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38 let mut v = self.work_group_names.unwrap_or_default();
39 v.push(input.into());
40 self.work_group_names = ::std::option::Option::Some(v);
41 self
42 }
43 pub fn set_work_group_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
45 self.work_group_names = input;
46 self
47 }
48 pub fn get_work_group_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
50 &self.work_group_names
51 }
52 pub fn build(self) -> crate::types::CapacityAssignment {
54 crate::types::CapacityAssignment {
55 work_group_names: self.work_group_names,
56 }
57 }
58}