aws_sdk_connect/types/
_real_time_contact_analysis_character_interval.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Begin and end offsets for a part of text.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RealTimeContactAnalysisCharacterInterval {
7    /// <p>The beginning of the character interval.</p>
8    pub begin_offset_char: i32,
9    /// <p>The end of the character interval.</p>
10    pub end_offset_char: i32,
11}
12impl RealTimeContactAnalysisCharacterInterval {
13    /// <p>The beginning of the character interval.</p>
14    pub fn begin_offset_char(&self) -> i32 {
15        self.begin_offset_char
16    }
17    /// <p>The end of the character interval.</p>
18    pub fn end_offset_char(&self) -> i32 {
19        self.end_offset_char
20    }
21}
22impl RealTimeContactAnalysisCharacterInterval {
23    /// Creates a new builder-style object to manufacture [`RealTimeContactAnalysisCharacterInterval`](crate::types::RealTimeContactAnalysisCharacterInterval).
24    pub fn builder() -> crate::types::builders::RealTimeContactAnalysisCharacterIntervalBuilder {
25        crate::types::builders::RealTimeContactAnalysisCharacterIntervalBuilder::default()
26    }
27}
28
29/// A builder for [`RealTimeContactAnalysisCharacterInterval`](crate::types::RealTimeContactAnalysisCharacterInterval).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct RealTimeContactAnalysisCharacterIntervalBuilder {
33    pub(crate) begin_offset_char: ::std::option::Option<i32>,
34    pub(crate) end_offset_char: ::std::option::Option<i32>,
35}
36impl RealTimeContactAnalysisCharacterIntervalBuilder {
37    /// <p>The beginning of the character interval.</p>
38    /// This field is required.
39    pub fn begin_offset_char(mut self, input: i32) -> Self {
40        self.begin_offset_char = ::std::option::Option::Some(input);
41        self
42    }
43    /// <p>The beginning of the character interval.</p>
44    pub fn set_begin_offset_char(mut self, input: ::std::option::Option<i32>) -> Self {
45        self.begin_offset_char = input;
46        self
47    }
48    /// <p>The beginning of the character interval.</p>
49    pub fn get_begin_offset_char(&self) -> &::std::option::Option<i32> {
50        &self.begin_offset_char
51    }
52    /// <p>The end of the character interval.</p>
53    /// This field is required.
54    pub fn end_offset_char(mut self, input: i32) -> Self {
55        self.end_offset_char = ::std::option::Option::Some(input);
56        self
57    }
58    /// <p>The end of the character interval.</p>
59    pub fn set_end_offset_char(mut self, input: ::std::option::Option<i32>) -> Self {
60        self.end_offset_char = input;
61        self
62    }
63    /// <p>The end of the character interval.</p>
64    pub fn get_end_offset_char(&self) -> &::std::option::Option<i32> {
65        &self.end_offset_char
66    }
67    /// Consumes the builder and constructs a [`RealTimeContactAnalysisCharacterInterval`](crate::types::RealTimeContactAnalysisCharacterInterval).
68    pub fn build(self) -> crate::types::RealTimeContactAnalysisCharacterInterval {
69        crate::types::RealTimeContactAnalysisCharacterInterval {
70            begin_offset_char: self.begin_offset_char.unwrap_or_default(),
71            end_offset_char: self.end_offset_char.unwrap_or_default(),
72        }
73    }
74}