1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents a single searchable property to search on.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub enum Property {
/// <p>The structure representing EoCloudCover property filter containing a lower bound and upper bound.</p>
EoCloudCover(crate::types::EoCloudCoverInput),
/// <p>The structure representing Land Cloud Cover property filter for Landsat collection containing a lower bound and upper bound.</p>
LandsatCloudCoverLand(crate::types::LandsatCloudCoverLandInput),
/// <p>The structure representing Platform property filter consisting of value and comparison operator.</p>
Platform(crate::types::PlatformInput),
/// <p>The structure representing ViewOffNadir property filter containing a lower bound and upper bound.</p>
ViewOffNadir(crate::types::ViewOffNadirInput),
/// <p>The structure representing ViewSunAzimuth property filter containing a lower bound and upper bound.</p>
ViewSunAzimuth(crate::types::ViewSunAzimuthInput),
/// <p>The structure representing ViewSunElevation property filter containing a lower bound and upper bound.</p>
ViewSunElevation(crate::types::ViewSunElevationInput),
/// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
/// An unknown enum variant
///
/// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
/// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
/// by the client. This can happen when the server adds new functionality, but the client has not been updated.
/// To investigate this, consider turning on debug logging to print the raw HTTP response.
#[non_exhaustive]
Unknown,
}
impl Property {
/// Tries to convert the enum instance into [`EoCloudCover`](crate::types::Property::EoCloudCover), extracting the inner [`EoCloudCoverInput`](crate::types::EoCloudCoverInput).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_eo_cloud_cover(&self) -> ::std::result::Result<&crate::types::EoCloudCoverInput, &Self> {
if let Property::EoCloudCover(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`EoCloudCover`](crate::types::Property::EoCloudCover).
pub fn is_eo_cloud_cover(&self) -> bool {
self.as_eo_cloud_cover().is_ok()
}
/// Tries to convert the enum instance into [`LandsatCloudCoverLand`](crate::types::Property::LandsatCloudCoverLand), extracting the inner [`LandsatCloudCoverLandInput`](crate::types::LandsatCloudCoverLandInput).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_landsat_cloud_cover_land(&self) -> ::std::result::Result<&crate::types::LandsatCloudCoverLandInput, &Self> {
if let Property::LandsatCloudCoverLand(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`LandsatCloudCoverLand`](crate::types::Property::LandsatCloudCoverLand).
pub fn is_landsat_cloud_cover_land(&self) -> bool {
self.as_landsat_cloud_cover_land().is_ok()
}
/// Tries to convert the enum instance into [`Platform`](crate::types::Property::Platform), extracting the inner [`PlatformInput`](crate::types::PlatformInput).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_platform(&self) -> ::std::result::Result<&crate::types::PlatformInput, &Self> {
if let Property::Platform(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`Platform`](crate::types::Property::Platform).
pub fn is_platform(&self) -> bool {
self.as_platform().is_ok()
}
/// Tries to convert the enum instance into [`ViewOffNadir`](crate::types::Property::ViewOffNadir), extracting the inner [`ViewOffNadirInput`](crate::types::ViewOffNadirInput).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_view_off_nadir(&self) -> ::std::result::Result<&crate::types::ViewOffNadirInput, &Self> {
if let Property::ViewOffNadir(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`ViewOffNadir`](crate::types::Property::ViewOffNadir).
pub fn is_view_off_nadir(&self) -> bool {
self.as_view_off_nadir().is_ok()
}
/// Tries to convert the enum instance into [`ViewSunAzimuth`](crate::types::Property::ViewSunAzimuth), extracting the inner [`ViewSunAzimuthInput`](crate::types::ViewSunAzimuthInput).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_view_sun_azimuth(&self) -> ::std::result::Result<&crate::types::ViewSunAzimuthInput, &Self> {
if let Property::ViewSunAzimuth(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`ViewSunAzimuth`](crate::types::Property::ViewSunAzimuth).
pub fn is_view_sun_azimuth(&self) -> bool {
self.as_view_sun_azimuth().is_ok()
}
/// Tries to convert the enum instance into [`ViewSunElevation`](crate::types::Property::ViewSunElevation), extracting the inner [`ViewSunElevationInput`](crate::types::ViewSunElevationInput).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_view_sun_elevation(&self) -> ::std::result::Result<&crate::types::ViewSunElevationInput, &Self> {
if let Property::ViewSunElevation(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`ViewSunElevation`](crate::types::Property::ViewSunElevation).
pub fn is_view_sun_elevation(&self) -> bool {
self.as_view_sun_elevation().is_ok()
}
/// Returns true if the enum instance is the `Unknown` variant.
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}