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 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Container for the request parameters to the <code>UpgradeDomain</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpgradeDomainInput {
/// <p>Name of the OpenSearch Service domain that you want to upgrade.</p>
pub domain_name: ::std::option::Option<::std::string::String>,
/// <p>OpenSearch or Elasticsearch version to which you want to upgrade, in the format Opensearch_X.Y or Elasticsearch_X.Y.</p>
pub target_version: ::std::option::Option<::std::string::String>,
/// <p>When true, indicates that an upgrade eligibility check needs to be performed. Does not actually perform the upgrade.</p>
pub perform_check_only: ::std::option::Option<bool>,
/// <p>Only supports the <code>override_main_response_version</code> parameter and not other advanced options. You can only include this option when upgrading to an OpenSearch version. Specifies whether the domain reports its version as 7.10 so that it continues to work with Elasticsearch OSS clients and plugins.</p>
pub advanced_options: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl UpgradeDomainInput {
/// <p>Name of the OpenSearch Service domain that you want to upgrade.</p>
pub fn domain_name(&self) -> ::std::option::Option<&str> {
self.domain_name.as_deref()
}
/// <p>OpenSearch or Elasticsearch version to which you want to upgrade, in the format Opensearch_X.Y or Elasticsearch_X.Y.</p>
pub fn target_version(&self) -> ::std::option::Option<&str> {
self.target_version.as_deref()
}
/// <p>When true, indicates that an upgrade eligibility check needs to be performed. Does not actually perform the upgrade.</p>
pub fn perform_check_only(&self) -> ::std::option::Option<bool> {
self.perform_check_only
}
/// <p>Only supports the <code>override_main_response_version</code> parameter and not other advanced options. You can only include this option when upgrading to an OpenSearch version. Specifies whether the domain reports its version as 7.10 so that it continues to work with Elasticsearch OSS clients and plugins.</p>
pub fn advanced_options(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.advanced_options.as_ref()
}
}
impl UpgradeDomainInput {
/// Creates a new builder-style object to manufacture [`UpgradeDomainInput`](crate::operation::upgrade_domain::UpgradeDomainInput).
pub fn builder() -> crate::operation::upgrade_domain::builders::UpgradeDomainInputBuilder {
crate::operation::upgrade_domain::builders::UpgradeDomainInputBuilder::default()
}
}
/// A builder for [`UpgradeDomainInput`](crate::operation::upgrade_domain::UpgradeDomainInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpgradeDomainInputBuilder {
pub(crate) domain_name: ::std::option::Option<::std::string::String>,
pub(crate) target_version: ::std::option::Option<::std::string::String>,
pub(crate) perform_check_only: ::std::option::Option<bool>,
pub(crate) advanced_options: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl UpgradeDomainInputBuilder {
/// <p>Name of the OpenSearch Service domain that you want to upgrade.</p>
/// This field is required.
pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_name = ::std::option::Option::Some(input.into());
self
}
/// <p>Name of the OpenSearch Service domain that you want to upgrade.</p>
pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_name = input;
self
}
/// <p>Name of the OpenSearch Service domain that you want to upgrade.</p>
pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_name
}
/// <p>OpenSearch or Elasticsearch version to which you want to upgrade, in the format Opensearch_X.Y or Elasticsearch_X.Y.</p>
/// This field is required.
pub fn target_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.target_version = ::std::option::Option::Some(input.into());
self
}
/// <p>OpenSearch or Elasticsearch version to which you want to upgrade, in the format Opensearch_X.Y or Elasticsearch_X.Y.</p>
pub fn set_target_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.target_version = input;
self
}
/// <p>OpenSearch or Elasticsearch version to which you want to upgrade, in the format Opensearch_X.Y or Elasticsearch_X.Y.</p>
pub fn get_target_version(&self) -> &::std::option::Option<::std::string::String> {
&self.target_version
}
/// <p>When true, indicates that an upgrade eligibility check needs to be performed. Does not actually perform the upgrade.</p>
pub fn perform_check_only(mut self, input: bool) -> Self {
self.perform_check_only = ::std::option::Option::Some(input);
self
}
/// <p>When true, indicates that an upgrade eligibility check needs to be performed. Does not actually perform the upgrade.</p>
pub fn set_perform_check_only(mut self, input: ::std::option::Option<bool>) -> Self {
self.perform_check_only = input;
self
}
/// <p>When true, indicates that an upgrade eligibility check needs to be performed. Does not actually perform the upgrade.</p>
pub fn get_perform_check_only(&self) -> &::std::option::Option<bool> {
&self.perform_check_only
}
/// Adds a key-value pair to `advanced_options`.
///
/// To override the contents of this collection use [`set_advanced_options`](Self::set_advanced_options).
///
/// <p>Only supports the <code>override_main_response_version</code> parameter and not other advanced options. You can only include this option when upgrading to an OpenSearch version. Specifies whether the domain reports its version as 7.10 so that it continues to work with Elasticsearch OSS clients and plugins.</p>
pub fn advanced_options(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.advanced_options.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.advanced_options = ::std::option::Option::Some(hash_map);
self
}
/// <p>Only supports the <code>override_main_response_version</code> parameter and not other advanced options. You can only include this option when upgrading to an OpenSearch version. Specifies whether the domain reports its version as 7.10 so that it continues to work with Elasticsearch OSS clients and plugins.</p>
pub fn set_advanced_options(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.advanced_options = input;
self
}
/// <p>Only supports the <code>override_main_response_version</code> parameter and not other advanced options. You can only include this option when upgrading to an OpenSearch version. Specifies whether the domain reports its version as 7.10 so that it continues to work with Elasticsearch OSS clients and plugins.</p>
pub fn get_advanced_options(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.advanced_options
}
/// Consumes the builder and constructs a [`UpgradeDomainInput`](crate::operation::upgrade_domain::UpgradeDomainInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::upgrade_domain::UpgradeDomainInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::upgrade_domain::UpgradeDomainInput {
domain_name: self.domain_name,
target_version: self.target_version,
perform_check_only: self.perform_check_only,
advanced_options: self.advanced_options,
})
}
}