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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateGraphUsingImportTaskOutput {
/// <p>The unique identifier of the Neptune Analytics graph.</p>
pub graph_id: ::std::option::Option<::std::string::String>,
/// <p>The unique identifier of the import task.</p>
pub task_id: ::std::string::String,
/// <p>A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point to a Neptune database endpoint or snapshot.</p>
pub source: ::std::string::String,
/// <p>Specifies the format of S3 data to be imported. Valid values are <code>CSV</code>, which identifies the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html">Gremlin CSV format</a> or <code>OPENCYPHER</code>, which identies the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-opencypher.html">openCypher load format</a>.</p>
pub format: ::std::option::Option<crate::types::Format>,
/// <p>The ARN of the IAM role that will allow access to the data that is to be imported.</p>
pub role_arn: ::std::string::String,
/// <p>The status of the import task.</p>
pub status: crate::types::ImportTaskStatus,
/// <p>Contains options for controlling the import process. For example, if the <code>failOnError</code> key is set to <code>false</code>, the import skips problem data and attempts to continue (whereas if set to <code>true</code>, the default, or if omitted, the import operation halts immediately when an error is encountered.</p>
pub import_options: ::std::option::Option<crate::types::ImportOptions>,
_request_id: Option<String>,
}
impl CreateGraphUsingImportTaskOutput {
/// <p>The unique identifier of the Neptune Analytics graph.</p>
pub fn graph_id(&self) -> ::std::option::Option<&str> {
self.graph_id.as_deref()
}
/// <p>The unique identifier of the import task.</p>
pub fn task_id(&self) -> &str {
use std::ops::Deref;
self.task_id.deref()
}
/// <p>A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point to a Neptune database endpoint or snapshot.</p>
pub fn source(&self) -> &str {
use std::ops::Deref;
self.source.deref()
}
/// <p>Specifies the format of S3 data to be imported. Valid values are <code>CSV</code>, which identifies the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html">Gremlin CSV format</a> or <code>OPENCYPHER</code>, which identies the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-opencypher.html">openCypher load format</a>.</p>
pub fn format(&self) -> ::std::option::Option<&crate::types::Format> {
self.format.as_ref()
}
/// <p>The ARN of the IAM role that will allow access to the data that is to be imported.</p>
pub fn role_arn(&self) -> &str {
use std::ops::Deref;
self.role_arn.deref()
}
/// <p>The status of the import task.</p>
pub fn status(&self) -> &crate::types::ImportTaskStatus {
&self.status
}
/// <p>Contains options for controlling the import process. For example, if the <code>failOnError</code> key is set to <code>false</code>, the import skips problem data and attempts to continue (whereas if set to <code>true</code>, the default, or if omitted, the import operation halts immediately when an error is encountered.</p>
pub fn import_options(&self) -> ::std::option::Option<&crate::types::ImportOptions> {
self.import_options.as_ref()
}
}
impl ::aws_types::request_id::RequestId for CreateGraphUsingImportTaskOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateGraphUsingImportTaskOutput {
/// Creates a new builder-style object to manufacture [`CreateGraphUsingImportTaskOutput`](crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskOutput).
pub fn builder() -> crate::operation::create_graph_using_import_task::builders::CreateGraphUsingImportTaskOutputBuilder {
crate::operation::create_graph_using_import_task::builders::CreateGraphUsingImportTaskOutputBuilder::default()
}
}
/// A builder for [`CreateGraphUsingImportTaskOutput`](crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateGraphUsingImportTaskOutputBuilder {
pub(crate) graph_id: ::std::option::Option<::std::string::String>,
pub(crate) task_id: ::std::option::Option<::std::string::String>,
pub(crate) source: ::std::option::Option<::std::string::String>,
pub(crate) format: ::std::option::Option<crate::types::Format>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::ImportTaskStatus>,
pub(crate) import_options: ::std::option::Option<crate::types::ImportOptions>,
_request_id: Option<String>,
}
impl CreateGraphUsingImportTaskOutputBuilder {
/// <p>The unique identifier of the Neptune Analytics graph.</p>
pub fn graph_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.graph_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the Neptune Analytics graph.</p>
pub fn set_graph_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.graph_id = input;
self
}
/// <p>The unique identifier of the Neptune Analytics graph.</p>
pub fn get_graph_id(&self) -> &::std::option::Option<::std::string::String> {
&self.graph_id
}
/// <p>The unique identifier of the import task.</p>
/// This field is required.
pub fn task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.task_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the import task.</p>
pub fn set_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.task_id = input;
self
}
/// <p>The unique identifier of the import task.</p>
pub fn get_task_id(&self) -> &::std::option::Option<::std::string::String> {
&self.task_id
}
/// <p>A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point to a Neptune database endpoint or snapshot.</p>
/// This field is required.
pub fn source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source = ::std::option::Option::Some(input.into());
self
}
/// <p>A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point to a Neptune database endpoint or snapshot.</p>
pub fn set_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source = input;
self
}
/// <p>A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point to a Neptune database endpoint or snapshot.</p>
pub fn get_source(&self) -> &::std::option::Option<::std::string::String> {
&self.source
}
/// <p>Specifies the format of S3 data to be imported. Valid values are <code>CSV</code>, which identifies the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html">Gremlin CSV format</a> or <code>OPENCYPHER</code>, which identies the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-opencypher.html">openCypher load format</a>.</p>
pub fn format(mut self, input: crate::types::Format) -> Self {
self.format = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the format of S3 data to be imported. Valid values are <code>CSV</code>, which identifies the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html">Gremlin CSV format</a> or <code>OPENCYPHER</code>, which identies the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-opencypher.html">openCypher load format</a>.</p>
pub fn set_format(mut self, input: ::std::option::Option<crate::types::Format>) -> Self {
self.format = input;
self
}
/// <p>Specifies the format of S3 data to be imported. Valid values are <code>CSV</code>, which identifies the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html">Gremlin CSV format</a> or <code>OPENCYPHER</code>, which identies the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-opencypher.html">openCypher load format</a>.</p>
pub fn get_format(&self) -> &::std::option::Option<crate::types::Format> {
&self.format
}
/// <p>The ARN of the IAM role that will allow access to the data that is to be imported.</p>
/// This field is required.
pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the IAM role that will allow access to the data that is to be imported.</p>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The ARN of the IAM role that will allow access to the data that is to be imported.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// <p>The status of the import task.</p>
/// This field is required.
pub fn status(mut self, input: crate::types::ImportTaskStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The status of the import task.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::ImportTaskStatus>) -> Self {
self.status = input;
self
}
/// <p>The status of the import task.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::ImportTaskStatus> {
&self.status
}
/// <p>Contains options for controlling the import process. For example, if the <code>failOnError</code> key is set to <code>false</code>, the import skips problem data and attempts to continue (whereas if set to <code>true</code>, the default, or if omitted, the import operation halts immediately when an error is encountered.</p>
pub fn import_options(mut self, input: crate::types::ImportOptions) -> Self {
self.import_options = ::std::option::Option::Some(input);
self
}
/// <p>Contains options for controlling the import process. For example, if the <code>failOnError</code> key is set to <code>false</code>, the import skips problem data and attempts to continue (whereas if set to <code>true</code>, the default, or if omitted, the import operation halts immediately when an error is encountered.</p>
pub fn set_import_options(mut self, input: ::std::option::Option<crate::types::ImportOptions>) -> Self {
self.import_options = input;
self
}
/// <p>Contains options for controlling the import process. For example, if the <code>failOnError</code> key is set to <code>false</code>, the import skips problem data and attempts to continue (whereas if set to <code>true</code>, the default, or if omitted, the import operation halts immediately when an error is encountered.</p>
pub fn get_import_options(&self) -> &::std::option::Option<crate::types::ImportOptions> {
&self.import_options
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`CreateGraphUsingImportTaskOutput`](crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskOutput).
/// This method will fail if any of the following fields are not set:
/// - [`task_id`](crate::operation::create_graph_using_import_task::builders::CreateGraphUsingImportTaskOutputBuilder::task_id)
/// - [`source`](crate::operation::create_graph_using_import_task::builders::CreateGraphUsingImportTaskOutputBuilder::source)
/// - [`role_arn`](crate::operation::create_graph_using_import_task::builders::CreateGraphUsingImportTaskOutputBuilder::role_arn)
/// - [`status`](crate::operation::create_graph_using_import_task::builders::CreateGraphUsingImportTaskOutputBuilder::status)
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskOutput {
graph_id: self.graph_id,
task_id: self.task_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"task_id",
"task_id was not specified but it is required when building CreateGraphUsingImportTaskOutput",
)
})?,
source: self.source.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"source",
"source was not specified but it is required when building CreateGraphUsingImportTaskOutput",
)
})?,
format: self.format,
role_arn: self.role_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"role_arn",
"role_arn was not specified but it is required when building CreateGraphUsingImportTaskOutput",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building CreateGraphUsingImportTaskOutput",
)
})?,
import_options: self.import_options,
_request_id: self._request_id,
})
}
}