use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AddFacetToObjectRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "ObjectAttributeList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_attribute_list: Option<Vec<AttributeKeyAndValue>>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
#[serde(rename = "SchemaFacet")]
pub schema_facet: SchemaFacet,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddFacetToObjectResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ApplySchemaRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "PublishedSchemaArn")]
pub published_schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ApplySchemaResponse {
#[serde(rename = "AppliedSchemaArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub applied_schema_arn: Option<String>,
#[serde(rename = "DirectoryArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AttachObjectRequest {
#[serde(rename = "ChildReference")]
pub child_reference: ObjectReference,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "LinkName")]
pub link_name: String,
#[serde(rename = "ParentReference")]
pub parent_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AttachObjectResponse {
#[serde(rename = "AttachedObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attached_object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AttachPolicyRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
#[serde(rename = "PolicyReference")]
pub policy_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AttachPolicyResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AttachToIndexRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "IndexReference")]
pub index_reference: ObjectReference,
#[serde(rename = "TargetReference")]
pub target_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AttachToIndexResponse {
#[serde(rename = "AttachedObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attached_object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AttachTypedLinkRequest {
#[serde(rename = "Attributes")]
pub attributes: Vec<AttributeNameAndValue>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "SourceObjectReference")]
pub source_object_reference: ObjectReference,
#[serde(rename = "TargetObjectReference")]
pub target_object_reference: ObjectReference,
#[serde(rename = "TypedLinkFacet")]
pub typed_link_facet: TypedLinkSchemaAndFacetName,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AttachTypedLinkResponse {
#[serde(rename = "TypedLinkSpecifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub typed_link_specifier: Option<TypedLinkSpecifier>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AttributeKey {
#[serde(rename = "FacetName")]
pub facet_name: String,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AttributeKeyAndValue {
#[serde(rename = "Key")]
pub key: AttributeKey,
#[serde(rename = "Value")]
pub value: TypedAttributeValue,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AttributeNameAndValue {
#[serde(rename = "AttributeName")]
pub attribute_name: String,
#[serde(rename = "Value")]
pub value: TypedAttributeValue,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchAddFacetToObject {
#[serde(rename = "ObjectAttributeList")]
pub object_attribute_list: Vec<AttributeKeyAndValue>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
#[serde(rename = "SchemaFacet")]
pub schema_facet: SchemaFacet,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchAddFacetToObjectResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchAttachObject {
#[serde(rename = "ChildReference")]
pub child_reference: ObjectReference,
#[serde(rename = "LinkName")]
pub link_name: String,
#[serde(rename = "ParentReference")]
pub parent_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchAttachObjectResponse {
#[serde(rename = "attachedObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attached_object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchAttachPolicy {
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
#[serde(rename = "PolicyReference")]
pub policy_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchAttachPolicyResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchAttachToIndex {
#[serde(rename = "IndexReference")]
pub index_reference: ObjectReference,
#[serde(rename = "TargetReference")]
pub target_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchAttachToIndexResponse {
#[serde(rename = "AttachedObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attached_object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchAttachTypedLink {
#[serde(rename = "Attributes")]
pub attributes: Vec<AttributeNameAndValue>,
#[serde(rename = "SourceObjectReference")]
pub source_object_reference: ObjectReference,
#[serde(rename = "TargetObjectReference")]
pub target_object_reference: ObjectReference,
#[serde(rename = "TypedLinkFacet")]
pub typed_link_facet: TypedLinkSchemaAndFacetName,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchAttachTypedLinkResponse {
#[serde(rename = "TypedLinkSpecifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub typed_link_specifier: Option<TypedLinkSpecifier>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchCreateIndex {
#[serde(rename = "BatchReferenceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub batch_reference_name: Option<String>,
#[serde(rename = "IsUnique")]
pub is_unique: bool,
#[serde(rename = "LinkName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub link_name: Option<String>,
#[serde(rename = "OrderedIndexedAttributeList")]
pub ordered_indexed_attribute_list: Vec<AttributeKey>,
#[serde(rename = "ParentReference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_reference: Option<ObjectReference>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchCreateIndexResponse {
#[serde(rename = "ObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchCreateObject {
#[serde(rename = "BatchReferenceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub batch_reference_name: Option<String>,
#[serde(rename = "LinkName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub link_name: Option<String>,
#[serde(rename = "ObjectAttributeList")]
pub object_attribute_list: Vec<AttributeKeyAndValue>,
#[serde(rename = "ParentReference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_reference: Option<ObjectReference>,
#[serde(rename = "SchemaFacet")]
pub schema_facet: Vec<SchemaFacet>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchCreateObjectResponse {
#[serde(rename = "ObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchDeleteObject {
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchDeleteObjectResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchDetachFromIndex {
#[serde(rename = "IndexReference")]
pub index_reference: ObjectReference,
#[serde(rename = "TargetReference")]
pub target_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchDetachFromIndexResponse {
#[serde(rename = "DetachedObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detached_object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchDetachObject {
#[serde(rename = "BatchReferenceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub batch_reference_name: Option<String>,
#[serde(rename = "LinkName")]
pub link_name: String,
#[serde(rename = "ParentReference")]
pub parent_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchDetachObjectResponse {
#[serde(rename = "detachedObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detached_object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchDetachPolicy {
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
#[serde(rename = "PolicyReference")]
pub policy_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchDetachPolicyResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchDetachTypedLink {
#[serde(rename = "TypedLinkSpecifier")]
pub typed_link_specifier: TypedLinkSpecifier,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchDetachTypedLinkResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchGetLinkAttributes {
#[serde(rename = "AttributeNames")]
pub attribute_names: Vec<String>,
#[serde(rename = "TypedLinkSpecifier")]
pub typed_link_specifier: TypedLinkSpecifier,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchGetLinkAttributesResponse {
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<Vec<AttributeKeyAndValue>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchGetObjectAttributes {
#[serde(rename = "AttributeNames")]
pub attribute_names: Vec<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
#[serde(rename = "SchemaFacet")]
pub schema_facet: SchemaFacet,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchGetObjectAttributesResponse {
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<Vec<AttributeKeyAndValue>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchGetObjectInformation {
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchGetObjectInformationResponse {
#[serde(rename = "ObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifier: Option<String>,
#[serde(rename = "SchemaFacets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_facets: Option<Vec<SchemaFacet>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchListAttachedIndices {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TargetReference")]
pub target_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchListAttachedIndicesResponse {
#[serde(rename = "IndexAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_attachments: Option<Vec<IndexAttachment>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchListIncomingTypedLinks {
#[serde(rename = "FilterAttributeRanges")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_attribute_ranges: Option<Vec<TypedLinkAttributeRange>>,
#[serde(rename = "FilterTypedLink")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_typed_link: Option<TypedLinkSchemaAndFacetName>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchListIncomingTypedLinksResponse {
#[serde(rename = "LinkSpecifiers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub link_specifiers: Option<Vec<TypedLinkSpecifier>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchListIndex {
#[serde(rename = "IndexReference")]
pub index_reference: ObjectReference,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "RangesOnIndexedValues")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ranges_on_indexed_values: Option<Vec<ObjectAttributeRange>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchListIndexResponse {
#[serde(rename = "IndexAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_attachments: Option<Vec<IndexAttachment>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchListObjectAttributes {
#[serde(rename = "FacetFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub facet_filter: Option<SchemaFacet>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchListObjectAttributesResponse {
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<Vec<AttributeKeyAndValue>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchListObjectChildren {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchListObjectChildrenResponse {
#[serde(rename = "Children")]
#[serde(skip_serializing_if = "Option::is_none")]
pub children: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchListObjectParentPaths {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchListObjectParentPathsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "PathToObjectIdentifiersList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path_to_object_identifiers_list: Option<Vec<PathToObjectIdentifiers>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchListObjectPolicies {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchListObjectPoliciesResponse {
#[serde(rename = "AttachedPolicyIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attached_policy_ids: Option<Vec<String>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchListOutgoingTypedLinks {
#[serde(rename = "FilterAttributeRanges")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_attribute_ranges: Option<Vec<TypedLinkAttributeRange>>,
#[serde(rename = "FilterTypedLink")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_typed_link: Option<TypedLinkSchemaAndFacetName>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchListOutgoingTypedLinksResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TypedLinkSpecifiers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub typed_link_specifiers: Option<Vec<TypedLinkSpecifier>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchListPolicyAttachments {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "PolicyReference")]
pub policy_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchListPolicyAttachmentsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectIdentifiers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifiers: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchLookupPolicy {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchLookupPolicyResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "PolicyToPathList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_to_path_list: Option<Vec<PolicyToPath>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchReadException {
#[serde(rename = "Message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchReadOperation {
#[serde(rename = "GetLinkAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub get_link_attributes: Option<BatchGetLinkAttributes>,
#[serde(rename = "GetObjectAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub get_object_attributes: Option<BatchGetObjectAttributes>,
#[serde(rename = "GetObjectInformation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub get_object_information: Option<BatchGetObjectInformation>,
#[serde(rename = "ListAttachedIndices")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_attached_indices: Option<BatchListAttachedIndices>,
#[serde(rename = "ListIncomingTypedLinks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_incoming_typed_links: Option<BatchListIncomingTypedLinks>,
#[serde(rename = "ListIndex")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_index: Option<BatchListIndex>,
#[serde(rename = "ListObjectAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_object_attributes: Option<BatchListObjectAttributes>,
#[serde(rename = "ListObjectChildren")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_object_children: Option<BatchListObjectChildren>,
#[serde(rename = "ListObjectParentPaths")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_object_parent_paths: Option<BatchListObjectParentPaths>,
#[serde(rename = "ListObjectPolicies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_object_policies: Option<BatchListObjectPolicies>,
#[serde(rename = "ListOutgoingTypedLinks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_outgoing_typed_links: Option<BatchListOutgoingTypedLinks>,
#[serde(rename = "ListPolicyAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_policy_attachments: Option<BatchListPolicyAttachments>,
#[serde(rename = "LookupPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lookup_policy: Option<BatchLookupPolicy>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchReadOperationResponse {
#[serde(rename = "ExceptionResponse")]
#[serde(skip_serializing_if = "Option::is_none")]
pub exception_response: Option<BatchReadException>,
#[serde(rename = "SuccessfulResponse")]
#[serde(skip_serializing_if = "Option::is_none")]
pub successful_response: Option<BatchReadSuccessfulResponse>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchReadRequest {
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "Operations")]
pub operations: Vec<BatchReadOperation>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchReadResponse {
#[serde(rename = "Responses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub responses: Option<Vec<BatchReadOperationResponse>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchReadSuccessfulResponse {
#[serde(rename = "GetLinkAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub get_link_attributes: Option<BatchGetLinkAttributesResponse>,
#[serde(rename = "GetObjectAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub get_object_attributes: Option<BatchGetObjectAttributesResponse>,
#[serde(rename = "GetObjectInformation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub get_object_information: Option<BatchGetObjectInformationResponse>,
#[serde(rename = "ListAttachedIndices")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_attached_indices: Option<BatchListAttachedIndicesResponse>,
#[serde(rename = "ListIncomingTypedLinks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_incoming_typed_links: Option<BatchListIncomingTypedLinksResponse>,
#[serde(rename = "ListIndex")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_index: Option<BatchListIndexResponse>,
#[serde(rename = "ListObjectAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_object_attributes: Option<BatchListObjectAttributesResponse>,
#[serde(rename = "ListObjectChildren")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_object_children: Option<BatchListObjectChildrenResponse>,
#[serde(rename = "ListObjectParentPaths")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_object_parent_paths: Option<BatchListObjectParentPathsResponse>,
#[serde(rename = "ListObjectPolicies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_object_policies: Option<BatchListObjectPoliciesResponse>,
#[serde(rename = "ListOutgoingTypedLinks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_outgoing_typed_links: Option<BatchListOutgoingTypedLinksResponse>,
#[serde(rename = "ListPolicyAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub list_policy_attachments: Option<BatchListPolicyAttachmentsResponse>,
#[serde(rename = "LookupPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lookup_policy: Option<BatchLookupPolicyResponse>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchRemoveFacetFromObject {
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
#[serde(rename = "SchemaFacet")]
pub schema_facet: SchemaFacet,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchRemoveFacetFromObjectResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchUpdateLinkAttributes {
#[serde(rename = "AttributeUpdates")]
pub attribute_updates: Vec<LinkAttributeUpdate>,
#[serde(rename = "TypedLinkSpecifier")]
pub typed_link_specifier: TypedLinkSpecifier,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchUpdateLinkAttributesResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchUpdateObjectAttributes {
#[serde(rename = "AttributeUpdates")]
pub attribute_updates: Vec<ObjectAttributeUpdate>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchUpdateObjectAttributesResponse {
#[serde(rename = "ObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchWriteOperation {
#[serde(rename = "AddFacetToObject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub add_facet_to_object: Option<BatchAddFacetToObject>,
#[serde(rename = "AttachObject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attach_object: Option<BatchAttachObject>,
#[serde(rename = "AttachPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attach_policy: Option<BatchAttachPolicy>,
#[serde(rename = "AttachToIndex")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attach_to_index: Option<BatchAttachToIndex>,
#[serde(rename = "AttachTypedLink")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attach_typed_link: Option<BatchAttachTypedLink>,
#[serde(rename = "CreateIndex")]
#[serde(skip_serializing_if = "Option::is_none")]
pub create_index: Option<BatchCreateIndex>,
#[serde(rename = "CreateObject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub create_object: Option<BatchCreateObject>,
#[serde(rename = "DeleteObject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delete_object: Option<BatchDeleteObject>,
#[serde(rename = "DetachFromIndex")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detach_from_index: Option<BatchDetachFromIndex>,
#[serde(rename = "DetachObject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detach_object: Option<BatchDetachObject>,
#[serde(rename = "DetachPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detach_policy: Option<BatchDetachPolicy>,
#[serde(rename = "DetachTypedLink")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detach_typed_link: Option<BatchDetachTypedLink>,
#[serde(rename = "RemoveFacetFromObject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remove_facet_from_object: Option<BatchRemoveFacetFromObject>,
#[serde(rename = "UpdateLinkAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub update_link_attributes: Option<BatchUpdateLinkAttributes>,
#[serde(rename = "UpdateObjectAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub update_object_attributes: Option<BatchUpdateObjectAttributes>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchWriteOperationResponse {
#[serde(rename = "AddFacetToObject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub add_facet_to_object: Option<BatchAddFacetToObjectResponse>,
#[serde(rename = "AttachObject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attach_object: Option<BatchAttachObjectResponse>,
#[serde(rename = "AttachPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attach_policy: Option<BatchAttachPolicyResponse>,
#[serde(rename = "AttachToIndex")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attach_to_index: Option<BatchAttachToIndexResponse>,
#[serde(rename = "AttachTypedLink")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attach_typed_link: Option<BatchAttachTypedLinkResponse>,
#[serde(rename = "CreateIndex")]
#[serde(skip_serializing_if = "Option::is_none")]
pub create_index: Option<BatchCreateIndexResponse>,
#[serde(rename = "CreateObject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub create_object: Option<BatchCreateObjectResponse>,
#[serde(rename = "DeleteObject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delete_object: Option<BatchDeleteObjectResponse>,
#[serde(rename = "DetachFromIndex")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detach_from_index: Option<BatchDetachFromIndexResponse>,
#[serde(rename = "DetachObject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detach_object: Option<BatchDetachObjectResponse>,
#[serde(rename = "DetachPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detach_policy: Option<BatchDetachPolicyResponse>,
#[serde(rename = "DetachTypedLink")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detach_typed_link: Option<BatchDetachTypedLinkResponse>,
#[serde(rename = "RemoveFacetFromObject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remove_facet_from_object: Option<BatchRemoveFacetFromObjectResponse>,
#[serde(rename = "UpdateLinkAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub update_link_attributes: Option<BatchUpdateLinkAttributesResponse>,
#[serde(rename = "UpdateObjectAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub update_object_attributes: Option<BatchUpdateObjectAttributesResponse>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchWriteRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "Operations")]
pub operations: Vec<BatchWriteOperation>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchWriteResponse {
#[serde(rename = "Responses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub responses: Option<Vec<BatchWriteOperationResponse>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDirectoryRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDirectoryResponse {
#[serde(rename = "AppliedSchemaArn")]
pub applied_schema_arn: String,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "ObjectIdentifier")]
pub object_identifier: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateFacetRequest {
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<Vec<FacetAttribute>>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "ObjectType")]
pub object_type: String,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateFacetResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateIndexRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "IsUnique")]
pub is_unique: bool,
#[serde(rename = "LinkName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub link_name: Option<String>,
#[serde(rename = "OrderedIndexedAttributeList")]
pub ordered_indexed_attribute_list: Vec<AttributeKey>,
#[serde(rename = "ParentReference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_reference: Option<ObjectReference>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateIndexResponse {
#[serde(rename = "ObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateObjectRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "LinkName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub link_name: Option<String>,
#[serde(rename = "ObjectAttributeList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_attribute_list: Option<Vec<AttributeKeyAndValue>>,
#[serde(rename = "ParentReference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_reference: Option<ObjectReference>,
#[serde(rename = "SchemaFacets")]
pub schema_facets: Vec<SchemaFacet>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateObjectResponse {
#[serde(rename = "ObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateSchemaRequest {
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateSchemaResponse {
#[serde(rename = "SchemaArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateTypedLinkFacetRequest {
#[serde(rename = "Facet")]
pub facet: TypedLinkFacet,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateTypedLinkFacetResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDirectoryRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteDirectoryResponse {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteFacetRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteFacetResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteObjectRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteObjectResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteSchemaRequest {
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteSchemaResponse {
#[serde(rename = "SchemaArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteTypedLinkFacetRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteTypedLinkFacetResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DetachFromIndexRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "IndexReference")]
pub index_reference: ObjectReference,
#[serde(rename = "TargetReference")]
pub target_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DetachFromIndexResponse {
#[serde(rename = "DetachedObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detached_object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DetachObjectRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "LinkName")]
pub link_name: String,
#[serde(rename = "ParentReference")]
pub parent_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DetachObjectResponse {
#[serde(rename = "DetachedObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detached_object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DetachPolicyRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
#[serde(rename = "PolicyReference")]
pub policy_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DetachPolicyResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DetachTypedLinkRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "TypedLinkSpecifier")]
pub typed_link_specifier: TypedLinkSpecifier,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Directory {
#[serde(rename = "CreationDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date_time: Option<f64>,
#[serde(rename = "DirectoryArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisableDirectoryRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisableDirectoryResponse {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct EnableDirectoryRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EnableDirectoryResponse {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Facet {
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "ObjectType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FacetAttribute {
#[serde(rename = "AttributeDefinition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_definition: Option<FacetAttributeDefinition>,
#[serde(rename = "AttributeReference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_reference: Option<FacetAttributeReference>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "RequiredBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub required_behavior: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FacetAttributeDefinition {
#[serde(rename = "DefaultValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_value: Option<TypedAttributeValue>,
#[serde(rename = "IsImmutable")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_immutable: Option<bool>,
#[serde(rename = "Rules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rules: Option<::std::collections::HashMap<String, Rule>>,
#[serde(rename = "Type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FacetAttributeReference {
#[serde(rename = "TargetAttributeName")]
pub target_attribute_name: String,
#[serde(rename = "TargetFacetName")]
pub target_facet_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct FacetAttributeUpdate {
#[serde(rename = "Action")]
#[serde(skip_serializing_if = "Option::is_none")]
pub action: Option<String>,
#[serde(rename = "Attribute")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute: Option<FacetAttribute>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetAppliedSchemaVersionRequest {
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetAppliedSchemaVersionResponse {
#[serde(rename = "AppliedSchemaArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub applied_schema_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDirectoryRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDirectoryResponse {
#[serde(rename = "Directory")]
pub directory: Directory,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetFacetRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetFacetResponse {
#[serde(rename = "Facet")]
#[serde(skip_serializing_if = "Option::is_none")]
pub facet: Option<Facet>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetLinkAttributesRequest {
#[serde(rename = "AttributeNames")]
pub attribute_names: Vec<String>,
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "TypedLinkSpecifier")]
pub typed_link_specifier: TypedLinkSpecifier,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetLinkAttributesResponse {
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<Vec<AttributeKeyAndValue>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetObjectAttributesRequest {
#[serde(rename = "AttributeNames")]
pub attribute_names: Vec<String>,
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
#[serde(rename = "SchemaFacet")]
pub schema_facet: SchemaFacet,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetObjectAttributesResponse {
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<Vec<AttributeKeyAndValue>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetObjectInformationRequest {
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetObjectInformationResponse {
#[serde(rename = "ObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifier: Option<String>,
#[serde(rename = "SchemaFacets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_facets: Option<Vec<SchemaFacet>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetSchemaAsJsonRequest {
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetSchemaAsJsonResponse {
#[serde(rename = "Document")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetTypedLinkFacetInformationRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetTypedLinkFacetInformationResponse {
#[serde(rename = "IdentityAttributeOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub identity_attribute_order: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct IndexAttachment {
#[serde(rename = "IndexedAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub indexed_attributes: Option<Vec<AttributeKeyAndValue>>,
#[serde(rename = "ObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct LinkAttributeAction {
#[serde(rename = "AttributeActionType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_action_type: Option<String>,
#[serde(rename = "AttributeUpdateValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_update_value: Option<TypedAttributeValue>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct LinkAttributeUpdate {
#[serde(rename = "AttributeAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_action: Option<LinkAttributeAction>,
#[serde(rename = "AttributeKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_key: Option<AttributeKey>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListAppliedSchemaArnsRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SchemaArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListAppliedSchemaArnsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SchemaArns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_arns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListAttachedIndicesRequest {
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TargetReference")]
pub target_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListAttachedIndicesResponse {
#[serde(rename = "IndexAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_attachments: Option<Vec<IndexAttachment>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDevelopmentSchemaArnsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListDevelopmentSchemaArnsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SchemaArns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_arns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDirectoriesRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "state")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListDirectoriesResponse {
#[serde(rename = "Directories")]
pub directories: Vec<Directory>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListFacetAttributesRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListFacetAttributesResponse {
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<Vec<FacetAttribute>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListFacetNamesRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListFacetNamesResponse {
#[serde(rename = "FacetNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub facet_names: Option<Vec<String>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListIncomingTypedLinksRequest {
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "FilterAttributeRanges")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_attribute_ranges: Option<Vec<TypedLinkAttributeRange>>,
#[serde(rename = "FilterTypedLink")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_typed_link: Option<TypedLinkSchemaAndFacetName>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListIncomingTypedLinksResponse {
#[serde(rename = "LinkSpecifiers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub link_specifiers: Option<Vec<TypedLinkSpecifier>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListIndexRequest {
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "IndexReference")]
pub index_reference: ObjectReference,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "RangesOnIndexedValues")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ranges_on_indexed_values: Option<Vec<ObjectAttributeRange>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListIndexResponse {
#[serde(rename = "IndexAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_attachments: Option<Vec<IndexAttachment>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListObjectAttributesRequest {
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "FacetFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub facet_filter: Option<SchemaFacet>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListObjectAttributesResponse {
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<Vec<AttributeKeyAndValue>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListObjectChildrenRequest {
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListObjectChildrenResponse {
#[serde(rename = "Children")]
#[serde(skip_serializing_if = "Option::is_none")]
pub children: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListObjectParentPathsRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListObjectParentPathsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "PathToObjectIdentifiersList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path_to_object_identifiers_list: Option<Vec<PathToObjectIdentifiers>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListObjectParentsRequest {
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListObjectParentsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Parents")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parents: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListObjectPoliciesRequest {
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListObjectPoliciesResponse {
#[serde(rename = "AttachedPolicyIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attached_policy_ids: Option<Vec<String>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListOutgoingTypedLinksRequest {
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "FilterAttributeRanges")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_attribute_ranges: Option<Vec<TypedLinkAttributeRange>>,
#[serde(rename = "FilterTypedLink")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_typed_link: Option<TypedLinkSchemaAndFacetName>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListOutgoingTypedLinksResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TypedLinkSpecifiers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub typed_link_specifiers: Option<Vec<TypedLinkSpecifier>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListPolicyAttachmentsRequest {
#[serde(rename = "ConsistencyLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consistency_level: Option<String>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "PolicyReference")]
pub policy_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListPolicyAttachmentsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectIdentifiers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifiers: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListPublishedSchemaArnsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SchemaArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListPublishedSchemaArnsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SchemaArns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_arns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsForResourceRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsForResourceResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTypedLinkFacetAttributesRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTypedLinkFacetAttributesResponse {
#[serde(rename = "Attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<Vec<TypedLinkAttributeDefinition>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTypedLinkFacetNamesRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTypedLinkFacetNamesResponse {
#[serde(rename = "FacetNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub facet_names: Option<Vec<String>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct LookupPolicyRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct LookupPolicyResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "PolicyToPathList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_to_path_list: Option<Vec<PolicyToPath>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ObjectAttributeAction {
#[serde(rename = "ObjectAttributeActionType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_attribute_action_type: Option<String>,
#[serde(rename = "ObjectAttributeUpdateValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_attribute_update_value: Option<TypedAttributeValue>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ObjectAttributeRange {
#[serde(rename = "AttributeKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_key: Option<AttributeKey>,
#[serde(rename = "Range")]
#[serde(skip_serializing_if = "Option::is_none")]
pub range: Option<TypedAttributeValueRange>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ObjectAttributeUpdate {
#[serde(rename = "ObjectAttributeAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_attribute_action: Option<ObjectAttributeAction>,
#[serde(rename = "ObjectAttributeKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_attribute_key: Option<AttributeKey>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ObjectReference {
#[serde(rename = "Selector")]
#[serde(skip_serializing_if = "Option::is_none")]
pub selector: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PathToObjectIdentifiers {
#[serde(rename = "ObjectIdentifiers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifiers: Option<Vec<String>>,
#[serde(rename = "Path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PolicyAttachment {
#[serde(rename = "ObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifier: Option<String>,
#[serde(rename = "PolicyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_id: Option<String>,
#[serde(rename = "PolicyType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PolicyToPath {
#[serde(rename = "Path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "Policies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policies: Option<Vec<PolicyAttachment>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PublishSchemaRequest {
#[serde(rename = "DevelopmentSchemaArn")]
pub development_schema_arn: String,
#[serde(rename = "MinorVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub minor_version: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Version")]
pub version: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PublishSchemaResponse {
#[serde(rename = "PublishedSchemaArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub published_schema_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutSchemaFromJsonRequest {
#[serde(rename = "Document")]
pub document: String,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutSchemaFromJsonResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RemoveFacetFromObjectRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
#[serde(rename = "SchemaFacet")]
pub schema_facet: SchemaFacet,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RemoveFacetFromObjectResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Rule {
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SchemaFacet {
#[serde(rename = "FacetName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub facet_name: Option<String>,
#[serde(rename = "SchemaArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Tag {
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TagResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TypedAttributeValue {
#[serde(rename = "BinaryValue")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
#[serde(skip_serializing_if = "Option::is_none")]
pub binary_value: Option<bytes::Bytes>,
#[serde(rename = "BooleanValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub boolean_value: Option<bool>,
#[serde(rename = "DatetimeValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub datetime_value: Option<f64>,
#[serde(rename = "NumberValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_value: Option<String>,
#[serde(rename = "StringValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub string_value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TypedAttributeValueRange {
#[serde(rename = "EndMode")]
pub end_mode: String,
#[serde(rename = "EndValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_value: Option<TypedAttributeValue>,
#[serde(rename = "StartMode")]
pub start_mode: String,
#[serde(rename = "StartValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_value: Option<TypedAttributeValue>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TypedLinkAttributeDefinition {
#[serde(rename = "DefaultValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_value: Option<TypedAttributeValue>,
#[serde(rename = "IsImmutable")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_immutable: Option<bool>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "RequiredBehavior")]
pub required_behavior: String,
#[serde(rename = "Rules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rules: Option<::std::collections::HashMap<String, Rule>>,
#[serde(rename = "Type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TypedLinkAttributeRange {
#[serde(rename = "AttributeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_name: Option<String>,
#[serde(rename = "Range")]
pub range: TypedAttributeValueRange,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TypedLinkFacet {
#[serde(rename = "Attributes")]
pub attributes: Vec<TypedLinkAttributeDefinition>,
#[serde(rename = "IdentityAttributeOrder")]
pub identity_attribute_order: Vec<String>,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TypedLinkFacetAttributeUpdate {
#[serde(rename = "Action")]
pub action: String,
#[serde(rename = "Attribute")]
pub attribute: TypedLinkAttributeDefinition,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TypedLinkSchemaAndFacetName {
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
#[serde(rename = "TypedLinkName")]
pub typed_link_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TypedLinkSpecifier {
#[serde(rename = "IdentityAttributeValues")]
pub identity_attribute_values: Vec<AttributeNameAndValue>,
#[serde(rename = "SourceObjectReference")]
pub source_object_reference: ObjectReference,
#[serde(rename = "TargetObjectReference")]
pub target_object_reference: ObjectReference,
#[serde(rename = "TypedLinkFacet")]
pub typed_link_facet: TypedLinkSchemaAndFacetName,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UntagResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UntagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateFacetRequest {
#[serde(rename = "AttributeUpdates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_updates: Option<Vec<FacetAttributeUpdate>>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "ObjectType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_type: Option<String>,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateFacetResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateLinkAttributesRequest {
#[serde(rename = "AttributeUpdates")]
pub attribute_updates: Vec<LinkAttributeUpdate>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "TypedLinkSpecifier")]
pub typed_link_specifier: TypedLinkSpecifier,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateLinkAttributesResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateObjectAttributesRequest {
#[serde(rename = "AttributeUpdates")]
pub attribute_updates: Vec<ObjectAttributeUpdate>,
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "ObjectReference")]
pub object_reference: ObjectReference,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateObjectAttributesResponse {
#[serde(rename = "ObjectIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateSchemaRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateSchemaResponse {
#[serde(rename = "SchemaArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateTypedLinkFacetRequest {
#[serde(rename = "AttributeUpdates")]
pub attribute_updates: Vec<TypedLinkFacetAttributeUpdate>,
#[serde(rename = "IdentityAttributeOrder")]
pub identity_attribute_order: Vec<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SchemaArn")]
pub schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateTypedLinkFacetResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpgradeAppliedSchemaRequest {
#[serde(rename = "DirectoryArn")]
pub directory_arn: String,
#[serde(rename = "DryRun")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dry_run: Option<bool>,
#[serde(rename = "PublishedSchemaArn")]
pub published_schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpgradeAppliedSchemaResponse {
#[serde(rename = "DirectoryArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_arn: Option<String>,
#[serde(rename = "UpgradedSchemaArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub upgraded_schema_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpgradePublishedSchemaRequest {
#[serde(rename = "DevelopmentSchemaArn")]
pub development_schema_arn: String,
#[serde(rename = "DryRun")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dry_run: Option<bool>,
#[serde(rename = "MinorVersion")]
pub minor_version: String,
#[serde(rename = "PublishedSchemaArn")]
pub published_schema_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpgradePublishedSchemaResponse {
#[serde(rename = "UpgradedSchemaArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub upgraded_schema_arn: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum AddFacetToObjectError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl AddFacetToObjectError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddFacetToObjectError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(AddFacetToObjectError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(AddFacetToObjectError::DirectoryNotEnabled(
err.msg,
))
}
"FacetValidationException" => {
return RusotoError::Service(AddFacetToObjectError::FacetValidation(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(AddFacetToObjectError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(AddFacetToObjectError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(AddFacetToObjectError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AddFacetToObjectError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(AddFacetToObjectError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AddFacetToObjectError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddFacetToObjectError {
fn description(&self) -> &str {
match *self {
AddFacetToObjectError::AccessDenied(ref cause) => cause,
AddFacetToObjectError::DirectoryNotEnabled(ref cause) => cause,
AddFacetToObjectError::FacetValidation(ref cause) => cause,
AddFacetToObjectError::InternalService(ref cause) => cause,
AddFacetToObjectError::InvalidArn(ref cause) => cause,
AddFacetToObjectError::LimitExceeded(ref cause) => cause,
AddFacetToObjectError::ResourceNotFound(ref cause) => cause,
AddFacetToObjectError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ApplySchemaError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
InvalidAttachment(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ApplySchemaError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ApplySchemaError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ApplySchemaError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(ApplySchemaError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(ApplySchemaError::InvalidArn(err.msg))
}
"InvalidAttachmentException" => {
return RusotoError::Service(ApplySchemaError::InvalidAttachment(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ApplySchemaError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ApplySchemaError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(ApplySchemaError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ApplySchemaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ApplySchemaError {
fn description(&self) -> &str {
match *self {
ApplySchemaError::AccessDenied(ref cause) => cause,
ApplySchemaError::InternalService(ref cause) => cause,
ApplySchemaError::InvalidArn(ref cause) => cause,
ApplySchemaError::InvalidAttachment(ref cause) => cause,
ApplySchemaError::LimitExceeded(ref cause) => cause,
ApplySchemaError::ResourceNotFound(ref cause) => cause,
ApplySchemaError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachObjectError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
InvalidAttachment(String),
LimitExceeded(String),
LinkNameAlreadyInUse(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl AttachObjectError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AttachObjectError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(AttachObjectError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(AttachObjectError::DirectoryNotEnabled(err.msg))
}
"FacetValidationException" => {
return RusotoError::Service(AttachObjectError::FacetValidation(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(AttachObjectError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(AttachObjectError::InvalidArn(err.msg))
}
"InvalidAttachmentException" => {
return RusotoError::Service(AttachObjectError::InvalidAttachment(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(AttachObjectError::LimitExceeded(err.msg))
}
"LinkNameAlreadyInUseException" => {
return RusotoError::Service(AttachObjectError::LinkNameAlreadyInUse(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AttachObjectError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(AttachObjectError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AttachObjectError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachObjectError {
fn description(&self) -> &str {
match *self {
AttachObjectError::AccessDenied(ref cause) => cause,
AttachObjectError::DirectoryNotEnabled(ref cause) => cause,
AttachObjectError::FacetValidation(ref cause) => cause,
AttachObjectError::InternalService(ref cause) => cause,
AttachObjectError::InvalidArn(ref cause) => cause,
AttachObjectError::InvalidAttachment(ref cause) => cause,
AttachObjectError::LimitExceeded(ref cause) => cause,
AttachObjectError::LinkNameAlreadyInUse(ref cause) => cause,
AttachObjectError::ResourceNotFound(ref cause) => cause,
AttachObjectError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachPolicyError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
NotPolicy(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl AttachPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AttachPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(AttachPolicyError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(AttachPolicyError::DirectoryNotEnabled(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(AttachPolicyError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(AttachPolicyError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(AttachPolicyError::LimitExceeded(err.msg))
}
"NotPolicyException" => {
return RusotoError::Service(AttachPolicyError::NotPolicy(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AttachPolicyError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(AttachPolicyError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AttachPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachPolicyError {
fn description(&self) -> &str {
match *self {
AttachPolicyError::AccessDenied(ref cause) => cause,
AttachPolicyError::DirectoryNotEnabled(ref cause) => cause,
AttachPolicyError::InternalService(ref cause) => cause,
AttachPolicyError::InvalidArn(ref cause) => cause,
AttachPolicyError::LimitExceeded(ref cause) => cause,
AttachPolicyError::NotPolicy(ref cause) => cause,
AttachPolicyError::ResourceNotFound(ref cause) => cause,
AttachPolicyError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachToIndexError {
AccessDenied(String),
DirectoryNotEnabled(String),
IndexedAttributeMissing(String),
InternalService(String),
InvalidArn(String),
InvalidAttachment(String),
LimitExceeded(String),
LinkNameAlreadyInUse(String),
NotIndex(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl AttachToIndexError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AttachToIndexError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(AttachToIndexError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(AttachToIndexError::DirectoryNotEnabled(err.msg))
}
"IndexedAttributeMissingException" => {
return RusotoError::Service(AttachToIndexError::IndexedAttributeMissing(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(AttachToIndexError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(AttachToIndexError::InvalidArn(err.msg))
}
"InvalidAttachmentException" => {
return RusotoError::Service(AttachToIndexError::InvalidAttachment(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(AttachToIndexError::LimitExceeded(err.msg))
}
"LinkNameAlreadyInUseException" => {
return RusotoError::Service(AttachToIndexError::LinkNameAlreadyInUse(err.msg))
}
"NotIndexException" => {
return RusotoError::Service(AttachToIndexError::NotIndex(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AttachToIndexError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(AttachToIndexError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AttachToIndexError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachToIndexError {
fn description(&self) -> &str {
match *self {
AttachToIndexError::AccessDenied(ref cause) => cause,
AttachToIndexError::DirectoryNotEnabled(ref cause) => cause,
AttachToIndexError::IndexedAttributeMissing(ref cause) => cause,
AttachToIndexError::InternalService(ref cause) => cause,
AttachToIndexError::InvalidArn(ref cause) => cause,
AttachToIndexError::InvalidAttachment(ref cause) => cause,
AttachToIndexError::LimitExceeded(ref cause) => cause,
AttachToIndexError::LinkNameAlreadyInUse(ref cause) => cause,
AttachToIndexError::NotIndex(ref cause) => cause,
AttachToIndexError::ResourceNotFound(ref cause) => cause,
AttachToIndexError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachTypedLinkError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
InvalidAttachment(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl AttachTypedLinkError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AttachTypedLinkError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(AttachTypedLinkError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(AttachTypedLinkError::DirectoryNotEnabled(err.msg))
}
"FacetValidationException" => {
return RusotoError::Service(AttachTypedLinkError::FacetValidation(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(AttachTypedLinkError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(AttachTypedLinkError::InvalidArn(err.msg))
}
"InvalidAttachmentException" => {
return RusotoError::Service(AttachTypedLinkError::InvalidAttachment(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(AttachTypedLinkError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AttachTypedLinkError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(AttachTypedLinkError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AttachTypedLinkError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachTypedLinkError {
fn description(&self) -> &str {
match *self {
AttachTypedLinkError::AccessDenied(ref cause) => cause,
AttachTypedLinkError::DirectoryNotEnabled(ref cause) => cause,
AttachTypedLinkError::FacetValidation(ref cause) => cause,
AttachTypedLinkError::InternalService(ref cause) => cause,
AttachTypedLinkError::InvalidArn(ref cause) => cause,
AttachTypedLinkError::InvalidAttachment(ref cause) => cause,
AttachTypedLinkError::LimitExceeded(ref cause) => cause,
AttachTypedLinkError::ResourceNotFound(ref cause) => cause,
AttachTypedLinkError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum BatchReadError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
RetryableConflict(String),
}
impl BatchReadError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchReadError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(BatchReadError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(BatchReadError::DirectoryNotEnabled(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(BatchReadError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(BatchReadError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(BatchReadError::LimitExceeded(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(BatchReadError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for BatchReadError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for BatchReadError {
fn description(&self) -> &str {
match *self {
BatchReadError::AccessDenied(ref cause) => cause,
BatchReadError::DirectoryNotEnabled(ref cause) => cause,
BatchReadError::InternalService(ref cause) => cause,
BatchReadError::InvalidArn(ref cause) => cause,
BatchReadError::LimitExceeded(ref cause) => cause,
BatchReadError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum BatchWriteError {
AccessDenied(String),
BatchWrite(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
RetryableConflict(String),
}
impl BatchWriteError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchWriteError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(BatchWriteError::AccessDenied(err.msg))
}
"BatchWriteException" => {
return RusotoError::Service(BatchWriteError::BatchWrite(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(BatchWriteError::DirectoryNotEnabled(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(BatchWriteError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(BatchWriteError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(BatchWriteError::LimitExceeded(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(BatchWriteError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for BatchWriteError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for BatchWriteError {
fn description(&self) -> &str {
match *self {
BatchWriteError::AccessDenied(ref cause) => cause,
BatchWriteError::BatchWrite(ref cause) => cause,
BatchWriteError::DirectoryNotEnabled(ref cause) => cause,
BatchWriteError::InternalService(ref cause) => cause,
BatchWriteError::InvalidArn(ref cause) => cause,
BatchWriteError::LimitExceeded(ref cause) => cause,
BatchWriteError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDirectoryError {
AccessDenied(String),
DirectoryAlreadyExists(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl CreateDirectoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDirectoryError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(CreateDirectoryError::AccessDenied(err.msg))
}
"DirectoryAlreadyExistsException" => {
return RusotoError::Service(CreateDirectoryError::DirectoryAlreadyExists(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(CreateDirectoryError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(CreateDirectoryError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateDirectoryError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateDirectoryError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(CreateDirectoryError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDirectoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDirectoryError {
fn description(&self) -> &str {
match *self {
CreateDirectoryError::AccessDenied(ref cause) => cause,
CreateDirectoryError::DirectoryAlreadyExists(ref cause) => cause,
CreateDirectoryError::InternalService(ref cause) => cause,
CreateDirectoryError::InvalidArn(ref cause) => cause,
CreateDirectoryError::LimitExceeded(ref cause) => cause,
CreateDirectoryError::ResourceNotFound(ref cause) => cause,
CreateDirectoryError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateFacetError {
AccessDenied(String),
FacetAlreadyExists(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
InvalidRule(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl CreateFacetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateFacetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(CreateFacetError::AccessDenied(err.msg))
}
"FacetAlreadyExistsException" => {
return RusotoError::Service(CreateFacetError::FacetAlreadyExists(err.msg))
}
"FacetValidationException" => {
return RusotoError::Service(CreateFacetError::FacetValidation(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(CreateFacetError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(CreateFacetError::InvalidArn(err.msg))
}
"InvalidRuleException" => {
return RusotoError::Service(CreateFacetError::InvalidRule(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateFacetError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateFacetError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(CreateFacetError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateFacetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateFacetError {
fn description(&self) -> &str {
match *self {
CreateFacetError::AccessDenied(ref cause) => cause,
CreateFacetError::FacetAlreadyExists(ref cause) => cause,
CreateFacetError::FacetValidation(ref cause) => cause,
CreateFacetError::InternalService(ref cause) => cause,
CreateFacetError::InvalidArn(ref cause) => cause,
CreateFacetError::InvalidRule(ref cause) => cause,
CreateFacetError::LimitExceeded(ref cause) => cause,
CreateFacetError::ResourceNotFound(ref cause) => cause,
CreateFacetError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateIndexError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
LinkNameAlreadyInUse(String),
ResourceNotFound(String),
RetryableConflict(String),
UnsupportedIndexType(String),
}
impl CreateIndexError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateIndexError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(CreateIndexError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(CreateIndexError::DirectoryNotEnabled(err.msg))
}
"FacetValidationException" => {
return RusotoError::Service(CreateIndexError::FacetValidation(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(CreateIndexError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(CreateIndexError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateIndexError::LimitExceeded(err.msg))
}
"LinkNameAlreadyInUseException" => {
return RusotoError::Service(CreateIndexError::LinkNameAlreadyInUse(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateIndexError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(CreateIndexError::RetryableConflict(err.msg))
}
"UnsupportedIndexTypeException" => {
return RusotoError::Service(CreateIndexError::UnsupportedIndexType(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateIndexError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateIndexError {
fn description(&self) -> &str {
match *self {
CreateIndexError::AccessDenied(ref cause) => cause,
CreateIndexError::DirectoryNotEnabled(ref cause) => cause,
CreateIndexError::FacetValidation(ref cause) => cause,
CreateIndexError::InternalService(ref cause) => cause,
CreateIndexError::InvalidArn(ref cause) => cause,
CreateIndexError::LimitExceeded(ref cause) => cause,
CreateIndexError::LinkNameAlreadyInUse(ref cause) => cause,
CreateIndexError::ResourceNotFound(ref cause) => cause,
CreateIndexError::RetryableConflict(ref cause) => cause,
CreateIndexError::UnsupportedIndexType(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateObjectError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
LinkNameAlreadyInUse(String),
ResourceNotFound(String),
RetryableConflict(String),
UnsupportedIndexType(String),
}
impl CreateObjectError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateObjectError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(CreateObjectError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(CreateObjectError::DirectoryNotEnabled(err.msg))
}
"FacetValidationException" => {
return RusotoError::Service(CreateObjectError::FacetValidation(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(CreateObjectError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(CreateObjectError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateObjectError::LimitExceeded(err.msg))
}
"LinkNameAlreadyInUseException" => {
return RusotoError::Service(CreateObjectError::LinkNameAlreadyInUse(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateObjectError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(CreateObjectError::RetryableConflict(err.msg))
}
"UnsupportedIndexTypeException" => {
return RusotoError::Service(CreateObjectError::UnsupportedIndexType(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateObjectError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateObjectError {
fn description(&self) -> &str {
match *self {
CreateObjectError::AccessDenied(ref cause) => cause,
CreateObjectError::DirectoryNotEnabled(ref cause) => cause,
CreateObjectError::FacetValidation(ref cause) => cause,
CreateObjectError::InternalService(ref cause) => cause,
CreateObjectError::InvalidArn(ref cause) => cause,
CreateObjectError::LimitExceeded(ref cause) => cause,
CreateObjectError::LinkNameAlreadyInUse(ref cause) => cause,
CreateObjectError::ResourceNotFound(ref cause) => cause,
CreateObjectError::RetryableConflict(ref cause) => cause,
CreateObjectError::UnsupportedIndexType(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSchemaError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
RetryableConflict(String),
SchemaAlreadyExists(String),
}
impl CreateSchemaError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSchemaError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(CreateSchemaError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(CreateSchemaError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(CreateSchemaError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateSchemaError::LimitExceeded(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(CreateSchemaError::RetryableConflict(err.msg))
}
"SchemaAlreadyExistsException" => {
return RusotoError::Service(CreateSchemaError::SchemaAlreadyExists(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateSchemaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSchemaError {
fn description(&self) -> &str {
match *self {
CreateSchemaError::AccessDenied(ref cause) => cause,
CreateSchemaError::InternalService(ref cause) => cause,
CreateSchemaError::InvalidArn(ref cause) => cause,
CreateSchemaError::LimitExceeded(ref cause) => cause,
CreateSchemaError::RetryableConflict(ref cause) => cause,
CreateSchemaError::SchemaAlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTypedLinkFacetError {
AccessDenied(String),
FacetAlreadyExists(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
InvalidRule(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl CreateTypedLinkFacetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTypedLinkFacetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(CreateTypedLinkFacetError::AccessDenied(err.msg))
}
"FacetAlreadyExistsException" => {
return RusotoError::Service(CreateTypedLinkFacetError::FacetAlreadyExists(
err.msg,
))
}
"FacetValidationException" => {
return RusotoError::Service(CreateTypedLinkFacetError::FacetValidation(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(CreateTypedLinkFacetError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(CreateTypedLinkFacetError::InvalidArn(err.msg))
}
"InvalidRuleException" => {
return RusotoError::Service(CreateTypedLinkFacetError::InvalidRule(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateTypedLinkFacetError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateTypedLinkFacetError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(CreateTypedLinkFacetError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateTypedLinkFacetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTypedLinkFacetError {
fn description(&self) -> &str {
match *self {
CreateTypedLinkFacetError::AccessDenied(ref cause) => cause,
CreateTypedLinkFacetError::FacetAlreadyExists(ref cause) => cause,
CreateTypedLinkFacetError::FacetValidation(ref cause) => cause,
CreateTypedLinkFacetError::InternalService(ref cause) => cause,
CreateTypedLinkFacetError::InvalidArn(ref cause) => cause,
CreateTypedLinkFacetError::InvalidRule(ref cause) => cause,
CreateTypedLinkFacetError::LimitExceeded(ref cause) => cause,
CreateTypedLinkFacetError::ResourceNotFound(ref cause) => cause,
CreateTypedLinkFacetError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDirectoryError {
AccessDenied(String),
DirectoryDeleted(String),
DirectoryNotDisabled(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl DeleteDirectoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDirectoryError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DeleteDirectoryError::AccessDenied(err.msg))
}
"DirectoryDeletedException" => {
return RusotoError::Service(DeleteDirectoryError::DirectoryDeleted(err.msg))
}
"DirectoryNotDisabledException" => {
return RusotoError::Service(DeleteDirectoryError::DirectoryNotDisabled(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(DeleteDirectoryError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(DeleteDirectoryError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DeleteDirectoryError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteDirectoryError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(DeleteDirectoryError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDirectoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDirectoryError {
fn description(&self) -> &str {
match *self {
DeleteDirectoryError::AccessDenied(ref cause) => cause,
DeleteDirectoryError::DirectoryDeleted(ref cause) => cause,
DeleteDirectoryError::DirectoryNotDisabled(ref cause) => cause,
DeleteDirectoryError::InternalService(ref cause) => cause,
DeleteDirectoryError::InvalidArn(ref cause) => cause,
DeleteDirectoryError::LimitExceeded(ref cause) => cause,
DeleteDirectoryError::ResourceNotFound(ref cause) => cause,
DeleteDirectoryError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteFacetError {
AccessDenied(String),
FacetInUse(String),
FacetNotFound(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl DeleteFacetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFacetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DeleteFacetError::AccessDenied(err.msg))
}
"FacetInUseException" => {
return RusotoError::Service(DeleteFacetError::FacetInUse(err.msg))
}
"FacetNotFoundException" => {
return RusotoError::Service(DeleteFacetError::FacetNotFound(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(DeleteFacetError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(DeleteFacetError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DeleteFacetError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteFacetError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(DeleteFacetError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteFacetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteFacetError {
fn description(&self) -> &str {
match *self {
DeleteFacetError::AccessDenied(ref cause) => cause,
DeleteFacetError::FacetInUse(ref cause) => cause,
DeleteFacetError::FacetNotFound(ref cause) => cause,
DeleteFacetError::InternalService(ref cause) => cause,
DeleteFacetError::InvalidArn(ref cause) => cause,
DeleteFacetError::LimitExceeded(ref cause) => cause,
DeleteFacetError::ResourceNotFound(ref cause) => cause,
DeleteFacetError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteObjectError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ObjectNotDetached(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl DeleteObjectError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DeleteObjectError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(DeleteObjectError::DirectoryNotEnabled(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(DeleteObjectError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(DeleteObjectError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DeleteObjectError::LimitExceeded(err.msg))
}
"ObjectNotDetachedException" => {
return RusotoError::Service(DeleteObjectError::ObjectNotDetached(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteObjectError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(DeleteObjectError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteObjectError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteObjectError {
fn description(&self) -> &str {
match *self {
DeleteObjectError::AccessDenied(ref cause) => cause,
DeleteObjectError::DirectoryNotEnabled(ref cause) => cause,
DeleteObjectError::InternalService(ref cause) => cause,
DeleteObjectError::InvalidArn(ref cause) => cause,
DeleteObjectError::LimitExceeded(ref cause) => cause,
DeleteObjectError::ObjectNotDetached(ref cause) => cause,
DeleteObjectError::ResourceNotFound(ref cause) => cause,
DeleteObjectError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSchemaError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
StillContainsLinks(String),
}
impl DeleteSchemaError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSchemaError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DeleteSchemaError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(DeleteSchemaError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(DeleteSchemaError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DeleteSchemaError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteSchemaError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(DeleteSchemaError::RetryableConflict(err.msg))
}
"StillContainsLinksException" => {
return RusotoError::Service(DeleteSchemaError::StillContainsLinks(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteSchemaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSchemaError {
fn description(&self) -> &str {
match *self {
DeleteSchemaError::AccessDenied(ref cause) => cause,
DeleteSchemaError::InternalService(ref cause) => cause,
DeleteSchemaError::InvalidArn(ref cause) => cause,
DeleteSchemaError::LimitExceeded(ref cause) => cause,
DeleteSchemaError::ResourceNotFound(ref cause) => cause,
DeleteSchemaError::RetryableConflict(ref cause) => cause,
DeleteSchemaError::StillContainsLinks(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTypedLinkFacetError {
AccessDenied(String),
FacetNotFound(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl DeleteTypedLinkFacetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTypedLinkFacetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DeleteTypedLinkFacetError::AccessDenied(err.msg))
}
"FacetNotFoundException" => {
return RusotoError::Service(DeleteTypedLinkFacetError::FacetNotFound(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(DeleteTypedLinkFacetError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(DeleteTypedLinkFacetError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DeleteTypedLinkFacetError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteTypedLinkFacetError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(DeleteTypedLinkFacetError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteTypedLinkFacetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTypedLinkFacetError {
fn description(&self) -> &str {
match *self {
DeleteTypedLinkFacetError::AccessDenied(ref cause) => cause,
DeleteTypedLinkFacetError::FacetNotFound(ref cause) => cause,
DeleteTypedLinkFacetError::InternalService(ref cause) => cause,
DeleteTypedLinkFacetError::InvalidArn(ref cause) => cause,
DeleteTypedLinkFacetError::LimitExceeded(ref cause) => cause,
DeleteTypedLinkFacetError::ResourceNotFound(ref cause) => cause,
DeleteTypedLinkFacetError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachFromIndexError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
NotIndex(String),
ObjectAlreadyDetached(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl DetachFromIndexError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetachFromIndexError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DetachFromIndexError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(DetachFromIndexError::DirectoryNotEnabled(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(DetachFromIndexError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(DetachFromIndexError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DetachFromIndexError::LimitExceeded(err.msg))
}
"NotIndexException" => {
return RusotoError::Service(DetachFromIndexError::NotIndex(err.msg))
}
"ObjectAlreadyDetachedException" => {
return RusotoError::Service(DetachFromIndexError::ObjectAlreadyDetached(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DetachFromIndexError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(DetachFromIndexError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DetachFromIndexError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachFromIndexError {
fn description(&self) -> &str {
match *self {
DetachFromIndexError::AccessDenied(ref cause) => cause,
DetachFromIndexError::DirectoryNotEnabled(ref cause) => cause,
DetachFromIndexError::InternalService(ref cause) => cause,
DetachFromIndexError::InvalidArn(ref cause) => cause,
DetachFromIndexError::LimitExceeded(ref cause) => cause,
DetachFromIndexError::NotIndex(ref cause) => cause,
DetachFromIndexError::ObjectAlreadyDetached(ref cause) => cause,
DetachFromIndexError::ResourceNotFound(ref cause) => cause,
DetachFromIndexError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachObjectError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
NotNode(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl DetachObjectError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetachObjectError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DetachObjectError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(DetachObjectError::DirectoryNotEnabled(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(DetachObjectError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(DetachObjectError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DetachObjectError::LimitExceeded(err.msg))
}
"NotNodeException" => {
return RusotoError::Service(DetachObjectError::NotNode(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DetachObjectError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(DetachObjectError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DetachObjectError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachObjectError {
fn description(&self) -> &str {
match *self {
DetachObjectError::AccessDenied(ref cause) => cause,
DetachObjectError::DirectoryNotEnabled(ref cause) => cause,
DetachObjectError::InternalService(ref cause) => cause,
DetachObjectError::InvalidArn(ref cause) => cause,
DetachObjectError::LimitExceeded(ref cause) => cause,
DetachObjectError::NotNode(ref cause) => cause,
DetachObjectError::ResourceNotFound(ref cause) => cause,
DetachObjectError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachPolicyError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
NotPolicy(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl DetachPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetachPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DetachPolicyError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(DetachPolicyError::DirectoryNotEnabled(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(DetachPolicyError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(DetachPolicyError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DetachPolicyError::LimitExceeded(err.msg))
}
"NotPolicyException" => {
return RusotoError::Service(DetachPolicyError::NotPolicy(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DetachPolicyError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(DetachPolicyError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DetachPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachPolicyError {
fn description(&self) -> &str {
match *self {
DetachPolicyError::AccessDenied(ref cause) => cause,
DetachPolicyError::DirectoryNotEnabled(ref cause) => cause,
DetachPolicyError::InternalService(ref cause) => cause,
DetachPolicyError::InvalidArn(ref cause) => cause,
DetachPolicyError::LimitExceeded(ref cause) => cause,
DetachPolicyError::NotPolicy(ref cause) => cause,
DetachPolicyError::ResourceNotFound(ref cause) => cause,
DetachPolicyError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachTypedLinkError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl DetachTypedLinkError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetachTypedLinkError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DetachTypedLinkError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(DetachTypedLinkError::DirectoryNotEnabled(err.msg))
}
"FacetValidationException" => {
return RusotoError::Service(DetachTypedLinkError::FacetValidation(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(DetachTypedLinkError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(DetachTypedLinkError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DetachTypedLinkError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DetachTypedLinkError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(DetachTypedLinkError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DetachTypedLinkError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachTypedLinkError {
fn description(&self) -> &str {
match *self {
DetachTypedLinkError::AccessDenied(ref cause) => cause,
DetachTypedLinkError::DirectoryNotEnabled(ref cause) => cause,
DetachTypedLinkError::FacetValidation(ref cause) => cause,
DetachTypedLinkError::InternalService(ref cause) => cause,
DetachTypedLinkError::InvalidArn(ref cause) => cause,
DetachTypedLinkError::LimitExceeded(ref cause) => cause,
DetachTypedLinkError::ResourceNotFound(ref cause) => cause,
DetachTypedLinkError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisableDirectoryError {
AccessDenied(String),
DirectoryDeleted(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl DisableDirectoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisableDirectoryError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DisableDirectoryError::AccessDenied(err.msg))
}
"DirectoryDeletedException" => {
return RusotoError::Service(DisableDirectoryError::DirectoryDeleted(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(DisableDirectoryError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(DisableDirectoryError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DisableDirectoryError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DisableDirectoryError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(DisableDirectoryError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisableDirectoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisableDirectoryError {
fn description(&self) -> &str {
match *self {
DisableDirectoryError::AccessDenied(ref cause) => cause,
DisableDirectoryError::DirectoryDeleted(ref cause) => cause,
DisableDirectoryError::InternalService(ref cause) => cause,
DisableDirectoryError::InvalidArn(ref cause) => cause,
DisableDirectoryError::LimitExceeded(ref cause) => cause,
DisableDirectoryError::ResourceNotFound(ref cause) => cause,
DisableDirectoryError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum EnableDirectoryError {
AccessDenied(String),
DirectoryDeleted(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl EnableDirectoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EnableDirectoryError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(EnableDirectoryError::AccessDenied(err.msg))
}
"DirectoryDeletedException" => {
return RusotoError::Service(EnableDirectoryError::DirectoryDeleted(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(EnableDirectoryError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(EnableDirectoryError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(EnableDirectoryError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(EnableDirectoryError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(EnableDirectoryError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for EnableDirectoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EnableDirectoryError {
fn description(&self) -> &str {
match *self {
EnableDirectoryError::AccessDenied(ref cause) => cause,
EnableDirectoryError::DirectoryDeleted(ref cause) => cause,
EnableDirectoryError::InternalService(ref cause) => cause,
EnableDirectoryError::InvalidArn(ref cause) => cause,
EnableDirectoryError::LimitExceeded(ref cause) => cause,
EnableDirectoryError::ResourceNotFound(ref cause) => cause,
EnableDirectoryError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAppliedSchemaVersionError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl GetAppliedSchemaVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAppliedSchemaVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(GetAppliedSchemaVersionError::AccessDenied(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(GetAppliedSchemaVersionError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(GetAppliedSchemaVersionError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetAppliedSchemaVersionError::LimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetAppliedSchemaVersionError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(GetAppliedSchemaVersionError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetAppliedSchemaVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAppliedSchemaVersionError {
fn description(&self) -> &str {
match *self {
GetAppliedSchemaVersionError::AccessDenied(ref cause) => cause,
GetAppliedSchemaVersionError::InternalService(ref cause) => cause,
GetAppliedSchemaVersionError::InvalidArn(ref cause) => cause,
GetAppliedSchemaVersionError::LimitExceeded(ref cause) => cause,
GetAppliedSchemaVersionError::ResourceNotFound(ref cause) => cause,
GetAppliedSchemaVersionError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDirectoryError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
RetryableConflict(String),
}
impl GetDirectoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDirectoryError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(GetDirectoryError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(GetDirectoryError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(GetDirectoryError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetDirectoryError::LimitExceeded(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(GetDirectoryError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDirectoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDirectoryError {
fn description(&self) -> &str {
match *self {
GetDirectoryError::AccessDenied(ref cause) => cause,
GetDirectoryError::InternalService(ref cause) => cause,
GetDirectoryError::InvalidArn(ref cause) => cause,
GetDirectoryError::LimitExceeded(ref cause) => cause,
GetDirectoryError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetFacetError {
AccessDenied(String),
FacetNotFound(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl GetFacetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetFacetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(GetFacetError::AccessDenied(err.msg))
}
"FacetNotFoundException" => {
return RusotoError::Service(GetFacetError::FacetNotFound(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(GetFacetError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(GetFacetError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetFacetError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetFacetError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(GetFacetError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetFacetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetFacetError {
fn description(&self) -> &str {
match *self {
GetFacetError::AccessDenied(ref cause) => cause,
GetFacetError::FacetNotFound(ref cause) => cause,
GetFacetError::InternalService(ref cause) => cause,
GetFacetError::InvalidArn(ref cause) => cause,
GetFacetError::LimitExceeded(ref cause) => cause,
GetFacetError::ResourceNotFound(ref cause) => cause,
GetFacetError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetLinkAttributesError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl GetLinkAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetLinkAttributesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(GetLinkAttributesError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(GetLinkAttributesError::DirectoryNotEnabled(
err.msg,
))
}
"FacetValidationException" => {
return RusotoError::Service(GetLinkAttributesError::FacetValidation(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(GetLinkAttributesError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(GetLinkAttributesError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetLinkAttributesError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetLinkAttributesError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(GetLinkAttributesError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetLinkAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetLinkAttributesError {
fn description(&self) -> &str {
match *self {
GetLinkAttributesError::AccessDenied(ref cause) => cause,
GetLinkAttributesError::DirectoryNotEnabled(ref cause) => cause,
GetLinkAttributesError::FacetValidation(ref cause) => cause,
GetLinkAttributesError::InternalService(ref cause) => cause,
GetLinkAttributesError::InvalidArn(ref cause) => cause,
GetLinkAttributesError::LimitExceeded(ref cause) => cause,
GetLinkAttributesError::ResourceNotFound(ref cause) => cause,
GetLinkAttributesError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetObjectAttributesError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl GetObjectAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectAttributesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(GetObjectAttributesError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(GetObjectAttributesError::DirectoryNotEnabled(
err.msg,
))
}
"FacetValidationException" => {
return RusotoError::Service(GetObjectAttributesError::FacetValidation(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(GetObjectAttributesError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(GetObjectAttributesError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetObjectAttributesError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetObjectAttributesError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(GetObjectAttributesError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetObjectAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetObjectAttributesError {
fn description(&self) -> &str {
match *self {
GetObjectAttributesError::AccessDenied(ref cause) => cause,
GetObjectAttributesError::DirectoryNotEnabled(ref cause) => cause,
GetObjectAttributesError::FacetValidation(ref cause) => cause,
GetObjectAttributesError::InternalService(ref cause) => cause,
GetObjectAttributesError::InvalidArn(ref cause) => cause,
GetObjectAttributesError::LimitExceeded(ref cause) => cause,
GetObjectAttributesError::ResourceNotFound(ref cause) => cause,
GetObjectAttributesError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetObjectInformationError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl GetObjectInformationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectInformationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(GetObjectInformationError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(GetObjectInformationError::DirectoryNotEnabled(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(GetObjectInformationError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(GetObjectInformationError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetObjectInformationError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetObjectInformationError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(GetObjectInformationError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetObjectInformationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetObjectInformationError {
fn description(&self) -> &str {
match *self {
GetObjectInformationError::AccessDenied(ref cause) => cause,
GetObjectInformationError::DirectoryNotEnabled(ref cause) => cause,
GetObjectInformationError::InternalService(ref cause) => cause,
GetObjectInformationError::InvalidArn(ref cause) => cause,
GetObjectInformationError::LimitExceeded(ref cause) => cause,
GetObjectInformationError::ResourceNotFound(ref cause) => cause,
GetObjectInformationError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSchemaAsJsonError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl GetSchemaAsJsonError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSchemaAsJsonError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(GetSchemaAsJsonError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(GetSchemaAsJsonError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(GetSchemaAsJsonError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetSchemaAsJsonError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetSchemaAsJsonError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(GetSchemaAsJsonError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetSchemaAsJsonError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSchemaAsJsonError {
fn description(&self) -> &str {
match *self {
GetSchemaAsJsonError::AccessDenied(ref cause) => cause,
GetSchemaAsJsonError::InternalService(ref cause) => cause,
GetSchemaAsJsonError::InvalidArn(ref cause) => cause,
GetSchemaAsJsonError::LimitExceeded(ref cause) => cause,
GetSchemaAsJsonError::ResourceNotFound(ref cause) => cause,
GetSchemaAsJsonError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetTypedLinkFacetInformationError {
AccessDenied(String),
FacetNotFound(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl GetTypedLinkFacetInformationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetTypedLinkFacetInformationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(GetTypedLinkFacetInformationError::AccessDenied(
err.msg,
))
}
"FacetNotFoundException" => {
return RusotoError::Service(GetTypedLinkFacetInformationError::FacetNotFound(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(
GetTypedLinkFacetInformationError::InternalService(err.msg),
)
}
"InvalidArnException" => {
return RusotoError::Service(GetTypedLinkFacetInformationError::InvalidArn(
err.msg,
))
}
"InvalidNextTokenException" => {
return RusotoError::Service(
GetTypedLinkFacetInformationError::InvalidNextToken(err.msg),
)
}
"LimitExceededException" => {
return RusotoError::Service(GetTypedLinkFacetInformationError::LimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(
GetTypedLinkFacetInformationError::ResourceNotFound(err.msg),
)
}
"RetryableConflictException" => {
return RusotoError::Service(
GetTypedLinkFacetInformationError::RetryableConflict(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetTypedLinkFacetInformationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetTypedLinkFacetInformationError {
fn description(&self) -> &str {
match *self {
GetTypedLinkFacetInformationError::AccessDenied(ref cause) => cause,
GetTypedLinkFacetInformationError::FacetNotFound(ref cause) => cause,
GetTypedLinkFacetInformationError::InternalService(ref cause) => cause,
GetTypedLinkFacetInformationError::InvalidArn(ref cause) => cause,
GetTypedLinkFacetInformationError::InvalidNextToken(ref cause) => cause,
GetTypedLinkFacetInformationError::LimitExceeded(ref cause) => cause,
GetTypedLinkFacetInformationError::ResourceNotFound(ref cause) => cause,
GetTypedLinkFacetInformationError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAppliedSchemaArnsError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListAppliedSchemaArnsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAppliedSchemaArnsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListAppliedSchemaArnsError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(ListAppliedSchemaArnsError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(ListAppliedSchemaArnsError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListAppliedSchemaArnsError::InvalidNextToken(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ListAppliedSchemaArnsError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListAppliedSchemaArnsError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(ListAppliedSchemaArnsError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListAppliedSchemaArnsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAppliedSchemaArnsError {
fn description(&self) -> &str {
match *self {
ListAppliedSchemaArnsError::AccessDenied(ref cause) => cause,
ListAppliedSchemaArnsError::InternalService(ref cause) => cause,
ListAppliedSchemaArnsError::InvalidArn(ref cause) => cause,
ListAppliedSchemaArnsError::InvalidNextToken(ref cause) => cause,
ListAppliedSchemaArnsError::LimitExceeded(ref cause) => cause,
ListAppliedSchemaArnsError::ResourceNotFound(ref cause) => cause,
ListAppliedSchemaArnsError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAttachedIndicesError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListAttachedIndicesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAttachedIndicesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListAttachedIndicesError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(ListAttachedIndicesError::DirectoryNotEnabled(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(ListAttachedIndicesError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(ListAttachedIndicesError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ListAttachedIndicesError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListAttachedIndicesError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(ListAttachedIndicesError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListAttachedIndicesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAttachedIndicesError {
fn description(&self) -> &str {
match *self {
ListAttachedIndicesError::AccessDenied(ref cause) => cause,
ListAttachedIndicesError::DirectoryNotEnabled(ref cause) => cause,
ListAttachedIndicesError::InternalService(ref cause) => cause,
ListAttachedIndicesError::InvalidArn(ref cause) => cause,
ListAttachedIndicesError::LimitExceeded(ref cause) => cause,
ListAttachedIndicesError::ResourceNotFound(ref cause) => cause,
ListAttachedIndicesError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDevelopmentSchemaArnsError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListDevelopmentSchemaArnsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDevelopmentSchemaArnsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListDevelopmentSchemaArnsError::AccessDenied(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(ListDevelopmentSchemaArnsError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(ListDevelopmentSchemaArnsError::InvalidArn(
err.msg,
))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListDevelopmentSchemaArnsError::InvalidNextToken(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ListDevelopmentSchemaArnsError::LimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListDevelopmentSchemaArnsError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(ListDevelopmentSchemaArnsError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDevelopmentSchemaArnsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDevelopmentSchemaArnsError {
fn description(&self) -> &str {
match *self {
ListDevelopmentSchemaArnsError::AccessDenied(ref cause) => cause,
ListDevelopmentSchemaArnsError::InternalService(ref cause) => cause,
ListDevelopmentSchemaArnsError::InvalidArn(ref cause) => cause,
ListDevelopmentSchemaArnsError::InvalidNextToken(ref cause) => cause,
ListDevelopmentSchemaArnsError::LimitExceeded(ref cause) => cause,
ListDevelopmentSchemaArnsError::ResourceNotFound(ref cause) => cause,
ListDevelopmentSchemaArnsError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDirectoriesError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
RetryableConflict(String),
}
impl ListDirectoriesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDirectoriesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListDirectoriesError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(ListDirectoriesError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(ListDirectoriesError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListDirectoriesError::InvalidNextToken(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ListDirectoriesError::LimitExceeded(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(ListDirectoriesError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDirectoriesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDirectoriesError {
fn description(&self) -> &str {
match *self {
ListDirectoriesError::AccessDenied(ref cause) => cause,
ListDirectoriesError::InternalService(ref cause) => cause,
ListDirectoriesError::InvalidArn(ref cause) => cause,
ListDirectoriesError::InvalidNextToken(ref cause) => cause,
ListDirectoriesError::LimitExceeded(ref cause) => cause,
ListDirectoriesError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListFacetAttributesError {
AccessDenied(String),
FacetNotFound(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListFacetAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListFacetAttributesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListFacetAttributesError::AccessDenied(err.msg))
}
"FacetNotFoundException" => {
return RusotoError::Service(ListFacetAttributesError::FacetNotFound(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(ListFacetAttributesError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(ListFacetAttributesError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListFacetAttributesError::InvalidNextToken(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ListFacetAttributesError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListFacetAttributesError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(ListFacetAttributesError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListFacetAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListFacetAttributesError {
fn description(&self) -> &str {
match *self {
ListFacetAttributesError::AccessDenied(ref cause) => cause,
ListFacetAttributesError::FacetNotFound(ref cause) => cause,
ListFacetAttributesError::InternalService(ref cause) => cause,
ListFacetAttributesError::InvalidArn(ref cause) => cause,
ListFacetAttributesError::InvalidNextToken(ref cause) => cause,
ListFacetAttributesError::LimitExceeded(ref cause) => cause,
ListFacetAttributesError::ResourceNotFound(ref cause) => cause,
ListFacetAttributesError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListFacetNamesError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListFacetNamesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListFacetNamesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListFacetNamesError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(ListFacetNamesError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(ListFacetNamesError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListFacetNamesError::InvalidNextToken(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ListFacetNamesError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListFacetNamesError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(ListFacetNamesError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListFacetNamesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListFacetNamesError {
fn description(&self) -> &str {
match *self {
ListFacetNamesError::AccessDenied(ref cause) => cause,
ListFacetNamesError::InternalService(ref cause) => cause,
ListFacetNamesError::InvalidArn(ref cause) => cause,
ListFacetNamesError::InvalidNextToken(ref cause) => cause,
ListFacetNamesError::LimitExceeded(ref cause) => cause,
ListFacetNamesError::ResourceNotFound(ref cause) => cause,
ListFacetNamesError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListIncomingTypedLinksError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListIncomingTypedLinksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListIncomingTypedLinksError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListIncomingTypedLinksError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(ListIncomingTypedLinksError::DirectoryNotEnabled(
err.msg,
))
}
"FacetValidationException" => {
return RusotoError::Service(ListIncomingTypedLinksError::FacetValidation(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(ListIncomingTypedLinksError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(ListIncomingTypedLinksError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListIncomingTypedLinksError::InvalidNextToken(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ListIncomingTypedLinksError::LimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListIncomingTypedLinksError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(ListIncomingTypedLinksError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListIncomingTypedLinksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListIncomingTypedLinksError {
fn description(&self) -> &str {
match *self {
ListIncomingTypedLinksError::AccessDenied(ref cause) => cause,
ListIncomingTypedLinksError::DirectoryNotEnabled(ref cause) => cause,
ListIncomingTypedLinksError::FacetValidation(ref cause) => cause,
ListIncomingTypedLinksError::InternalService(ref cause) => cause,
ListIncomingTypedLinksError::InvalidArn(ref cause) => cause,
ListIncomingTypedLinksError::InvalidNextToken(ref cause) => cause,
ListIncomingTypedLinksError::LimitExceeded(ref cause) => cause,
ListIncomingTypedLinksError::ResourceNotFound(ref cause) => cause,
ListIncomingTypedLinksError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListIndexError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
NotIndex(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListIndexError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListIndexError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListIndexError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(ListIndexError::DirectoryNotEnabled(err.msg))
}
"FacetValidationException" => {
return RusotoError::Service(ListIndexError::FacetValidation(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(ListIndexError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(ListIndexError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListIndexError::InvalidNextToken(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ListIndexError::LimitExceeded(err.msg))
}
"NotIndexException" => {
return RusotoError::Service(ListIndexError::NotIndex(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListIndexError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(ListIndexError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListIndexError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListIndexError {
fn description(&self) -> &str {
match *self {
ListIndexError::AccessDenied(ref cause) => cause,
ListIndexError::DirectoryNotEnabled(ref cause) => cause,
ListIndexError::FacetValidation(ref cause) => cause,
ListIndexError::InternalService(ref cause) => cause,
ListIndexError::InvalidArn(ref cause) => cause,
ListIndexError::InvalidNextToken(ref cause) => cause,
ListIndexError::LimitExceeded(ref cause) => cause,
ListIndexError::NotIndex(ref cause) => cause,
ListIndexError::ResourceNotFound(ref cause) => cause,
ListIndexError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListObjectAttributesError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListObjectAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectAttributesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListObjectAttributesError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(ListObjectAttributesError::DirectoryNotEnabled(
err.msg,
))
}
"FacetValidationException" => {
return RusotoError::Service(ListObjectAttributesError::FacetValidation(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(ListObjectAttributesError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(ListObjectAttributesError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListObjectAttributesError::InvalidNextToken(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ListObjectAttributesError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListObjectAttributesError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(ListObjectAttributesError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListObjectAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListObjectAttributesError {
fn description(&self) -> &str {
match *self {
ListObjectAttributesError::AccessDenied(ref cause) => cause,
ListObjectAttributesError::DirectoryNotEnabled(ref cause) => cause,
ListObjectAttributesError::FacetValidation(ref cause) => cause,
ListObjectAttributesError::InternalService(ref cause) => cause,
ListObjectAttributesError::InvalidArn(ref cause) => cause,
ListObjectAttributesError::InvalidNextToken(ref cause) => cause,
ListObjectAttributesError::LimitExceeded(ref cause) => cause,
ListObjectAttributesError::ResourceNotFound(ref cause) => cause,
ListObjectAttributesError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListObjectChildrenError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
NotNode(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListObjectChildrenError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectChildrenError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListObjectChildrenError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(ListObjectChildrenError::DirectoryNotEnabled(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(ListObjectChildrenError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(ListObjectChildrenError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListObjectChildrenError::InvalidNextToken(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ListObjectChildrenError::LimitExceeded(err.msg))
}
"NotNodeException" => {
return RusotoError::Service(ListObjectChildrenError::NotNode(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListObjectChildrenError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(ListObjectChildrenError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListObjectChildrenError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListObjectChildrenError {
fn description(&self) -> &str {
match *self {
ListObjectChildrenError::AccessDenied(ref cause) => cause,
ListObjectChildrenError::DirectoryNotEnabled(ref cause) => cause,
ListObjectChildrenError::InternalService(ref cause) => cause,
ListObjectChildrenError::InvalidArn(ref cause) => cause,
ListObjectChildrenError::InvalidNextToken(ref cause) => cause,
ListObjectChildrenError::LimitExceeded(ref cause) => cause,
ListObjectChildrenError::NotNode(ref cause) => cause,
ListObjectChildrenError::ResourceNotFound(ref cause) => cause,
ListObjectChildrenError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListObjectParentPathsError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListObjectParentPathsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectParentPathsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListObjectParentPathsError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(ListObjectParentPathsError::DirectoryNotEnabled(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(ListObjectParentPathsError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(ListObjectParentPathsError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListObjectParentPathsError::InvalidNextToken(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ListObjectParentPathsError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListObjectParentPathsError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(ListObjectParentPathsError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListObjectParentPathsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListObjectParentPathsError {
fn description(&self) -> &str {
match *self {
ListObjectParentPathsError::AccessDenied(ref cause) => cause,
ListObjectParentPathsError::DirectoryNotEnabled(ref cause) => cause,
ListObjectParentPathsError::InternalService(ref cause) => cause,
ListObjectParentPathsError::InvalidArn(ref cause) => cause,
ListObjectParentPathsError::InvalidNextToken(ref cause) => cause,
ListObjectParentPathsError::LimitExceeded(ref cause) => cause,
ListObjectParentPathsError::ResourceNotFound(ref cause) => cause,
ListObjectParentPathsError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListObjectParentsError {
AccessDenied(String),
CannotListParentOfRoot(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListObjectParentsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectParentsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListObjectParentsError::AccessDenied(err.msg))
}
"CannotListParentOfRootException" => {
return RusotoError::Service(ListObjectParentsError::CannotListParentOfRoot(
err.msg,
))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(ListObjectParentsError::DirectoryNotEnabled(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(ListObjectParentsError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(ListObjectParentsError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListObjectParentsError::InvalidNextToken(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ListObjectParentsError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListObjectParentsError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(ListObjectParentsError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListObjectParentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListObjectParentsError {
fn description(&self) -> &str {
match *self {
ListObjectParentsError::AccessDenied(ref cause) => cause,
ListObjectParentsError::CannotListParentOfRoot(ref cause) => cause,
ListObjectParentsError::DirectoryNotEnabled(ref cause) => cause,
ListObjectParentsError::InternalService(ref cause) => cause,
ListObjectParentsError::InvalidArn(ref cause) => cause,
ListObjectParentsError::InvalidNextToken(ref cause) => cause,
ListObjectParentsError::LimitExceeded(ref cause) => cause,
ListObjectParentsError::ResourceNotFound(ref cause) => cause,
ListObjectParentsError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListObjectPoliciesError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListObjectPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectPoliciesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListObjectPoliciesError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(ListObjectPoliciesError::DirectoryNotEnabled(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(ListObjectPoliciesError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(ListObjectPoliciesError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListObjectPoliciesError::InvalidNextToken(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ListObjectPoliciesError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListObjectPoliciesError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(ListObjectPoliciesError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListObjectPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListObjectPoliciesError {
fn description(&self) -> &str {
match *self {
ListObjectPoliciesError::AccessDenied(ref cause) => cause,
ListObjectPoliciesError::DirectoryNotEnabled(ref cause) => cause,
ListObjectPoliciesError::InternalService(ref cause) => cause,
ListObjectPoliciesError::InvalidArn(ref cause) => cause,
ListObjectPoliciesError::InvalidNextToken(ref cause) => cause,
ListObjectPoliciesError::LimitExceeded(ref cause) => cause,
ListObjectPoliciesError::ResourceNotFound(ref cause) => cause,
ListObjectPoliciesError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListOutgoingTypedLinksError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListOutgoingTypedLinksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListOutgoingTypedLinksError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListOutgoingTypedLinksError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(ListOutgoingTypedLinksError::DirectoryNotEnabled(
err.msg,
))
}
"FacetValidationException" => {
return RusotoError::Service(ListOutgoingTypedLinksError::FacetValidation(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(ListOutgoingTypedLinksError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(ListOutgoingTypedLinksError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListOutgoingTypedLinksError::InvalidNextToken(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ListOutgoingTypedLinksError::LimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListOutgoingTypedLinksError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(ListOutgoingTypedLinksError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListOutgoingTypedLinksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListOutgoingTypedLinksError {
fn description(&self) -> &str {
match *self {
ListOutgoingTypedLinksError::AccessDenied(ref cause) => cause,
ListOutgoingTypedLinksError::DirectoryNotEnabled(ref cause) => cause,
ListOutgoingTypedLinksError::FacetValidation(ref cause) => cause,
ListOutgoingTypedLinksError::InternalService(ref cause) => cause,
ListOutgoingTypedLinksError::InvalidArn(ref cause) => cause,
ListOutgoingTypedLinksError::InvalidNextToken(ref cause) => cause,
ListOutgoingTypedLinksError::LimitExceeded(ref cause) => cause,
ListOutgoingTypedLinksError::ResourceNotFound(ref cause) => cause,
ListOutgoingTypedLinksError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPolicyAttachmentsError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
NotPolicy(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListPolicyAttachmentsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPolicyAttachmentsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListPolicyAttachmentsError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(ListPolicyAttachmentsError::DirectoryNotEnabled(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(ListPolicyAttachmentsError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(ListPolicyAttachmentsError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListPolicyAttachmentsError::InvalidNextToken(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ListPolicyAttachmentsError::LimitExceeded(err.msg))
}
"NotPolicyException" => {
return RusotoError::Service(ListPolicyAttachmentsError::NotPolicy(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListPolicyAttachmentsError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(ListPolicyAttachmentsError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListPolicyAttachmentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPolicyAttachmentsError {
fn description(&self) -> &str {
match *self {
ListPolicyAttachmentsError::AccessDenied(ref cause) => cause,
ListPolicyAttachmentsError::DirectoryNotEnabled(ref cause) => cause,
ListPolicyAttachmentsError::InternalService(ref cause) => cause,
ListPolicyAttachmentsError::InvalidArn(ref cause) => cause,
ListPolicyAttachmentsError::InvalidNextToken(ref cause) => cause,
ListPolicyAttachmentsError::LimitExceeded(ref cause) => cause,
ListPolicyAttachmentsError::NotPolicy(ref cause) => cause,
ListPolicyAttachmentsError::ResourceNotFound(ref cause) => cause,
ListPolicyAttachmentsError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPublishedSchemaArnsError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListPublishedSchemaArnsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPublishedSchemaArnsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListPublishedSchemaArnsError::AccessDenied(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(ListPublishedSchemaArnsError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(ListPublishedSchemaArnsError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListPublishedSchemaArnsError::InvalidNextToken(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ListPublishedSchemaArnsError::LimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListPublishedSchemaArnsError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(ListPublishedSchemaArnsError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListPublishedSchemaArnsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPublishedSchemaArnsError {
fn description(&self) -> &str {
match *self {
ListPublishedSchemaArnsError::AccessDenied(ref cause) => cause,
ListPublishedSchemaArnsError::InternalService(ref cause) => cause,
ListPublishedSchemaArnsError::InvalidArn(ref cause) => cause,
ListPublishedSchemaArnsError::InvalidNextToken(ref cause) => cause,
ListPublishedSchemaArnsError::LimitExceeded(ref cause) => cause,
ListPublishedSchemaArnsError::ResourceNotFound(ref cause) => cause,
ListPublishedSchemaArnsError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
InvalidTaggingRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListTagsForResourceError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(ListTagsForResourceError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(ListTagsForResourceError::InvalidArn(err.msg))
}
"InvalidTaggingRequestException" => {
return RusotoError::Service(ListTagsForResourceError::InvalidTaggingRequest(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ListTagsForResourceError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListTagsForResourceError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(ListTagsForResourceError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourceError {
fn description(&self) -> &str {
match *self {
ListTagsForResourceError::AccessDenied(ref cause) => cause,
ListTagsForResourceError::InternalService(ref cause) => cause,
ListTagsForResourceError::InvalidArn(ref cause) => cause,
ListTagsForResourceError::InvalidTaggingRequest(ref cause) => cause,
ListTagsForResourceError::LimitExceeded(ref cause) => cause,
ListTagsForResourceError::ResourceNotFound(ref cause) => cause,
ListTagsForResourceError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTypedLinkFacetAttributesError {
AccessDenied(String),
FacetNotFound(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListTypedLinkFacetAttributesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListTypedLinkFacetAttributesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListTypedLinkFacetAttributesError::AccessDenied(
err.msg,
))
}
"FacetNotFoundException" => {
return RusotoError::Service(ListTypedLinkFacetAttributesError::FacetNotFound(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(
ListTypedLinkFacetAttributesError::InternalService(err.msg),
)
}
"InvalidArnException" => {
return RusotoError::Service(ListTypedLinkFacetAttributesError::InvalidArn(
err.msg,
))
}
"InvalidNextTokenException" => {
return RusotoError::Service(
ListTypedLinkFacetAttributesError::InvalidNextToken(err.msg),
)
}
"LimitExceededException" => {
return RusotoError::Service(ListTypedLinkFacetAttributesError::LimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(
ListTypedLinkFacetAttributesError::ResourceNotFound(err.msg),
)
}
"RetryableConflictException" => {
return RusotoError::Service(
ListTypedLinkFacetAttributesError::RetryableConflict(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTypedLinkFacetAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTypedLinkFacetAttributesError {
fn description(&self) -> &str {
match *self {
ListTypedLinkFacetAttributesError::AccessDenied(ref cause) => cause,
ListTypedLinkFacetAttributesError::FacetNotFound(ref cause) => cause,
ListTypedLinkFacetAttributesError::InternalService(ref cause) => cause,
ListTypedLinkFacetAttributesError::InvalidArn(ref cause) => cause,
ListTypedLinkFacetAttributesError::InvalidNextToken(ref cause) => cause,
ListTypedLinkFacetAttributesError::LimitExceeded(ref cause) => cause,
ListTypedLinkFacetAttributesError::ResourceNotFound(ref cause) => cause,
ListTypedLinkFacetAttributesError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTypedLinkFacetNamesError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl ListTypedLinkFacetNamesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTypedLinkFacetNamesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ListTypedLinkFacetNamesError::AccessDenied(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(ListTypedLinkFacetNamesError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(ListTypedLinkFacetNamesError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListTypedLinkFacetNamesError::InvalidNextToken(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ListTypedLinkFacetNamesError::LimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListTypedLinkFacetNamesError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(ListTypedLinkFacetNamesError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTypedLinkFacetNamesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTypedLinkFacetNamesError {
fn description(&self) -> &str {
match *self {
ListTypedLinkFacetNamesError::AccessDenied(ref cause) => cause,
ListTypedLinkFacetNamesError::InternalService(ref cause) => cause,
ListTypedLinkFacetNamesError::InvalidArn(ref cause) => cause,
ListTypedLinkFacetNamesError::InvalidNextToken(ref cause) => cause,
ListTypedLinkFacetNamesError::LimitExceeded(ref cause) => cause,
ListTypedLinkFacetNamesError::ResourceNotFound(ref cause) => cause,
ListTypedLinkFacetNamesError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum LookupPolicyError {
AccessDenied(String),
DirectoryNotEnabled(String),
InternalService(String),
InvalidArn(String),
InvalidNextToken(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl LookupPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<LookupPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(LookupPolicyError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(LookupPolicyError::DirectoryNotEnabled(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(LookupPolicyError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(LookupPolicyError::InvalidArn(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(LookupPolicyError::InvalidNextToken(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(LookupPolicyError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(LookupPolicyError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(LookupPolicyError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for LookupPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for LookupPolicyError {
fn description(&self) -> &str {
match *self {
LookupPolicyError::AccessDenied(ref cause) => cause,
LookupPolicyError::DirectoryNotEnabled(ref cause) => cause,
LookupPolicyError::InternalService(ref cause) => cause,
LookupPolicyError::InvalidArn(ref cause) => cause,
LookupPolicyError::InvalidNextToken(ref cause) => cause,
LookupPolicyError::LimitExceeded(ref cause) => cause,
LookupPolicyError::ResourceNotFound(ref cause) => cause,
LookupPolicyError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PublishSchemaError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
SchemaAlreadyPublished(String),
}
impl PublishSchemaError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PublishSchemaError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(PublishSchemaError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(PublishSchemaError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(PublishSchemaError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(PublishSchemaError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(PublishSchemaError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(PublishSchemaError::RetryableConflict(err.msg))
}
"SchemaAlreadyPublishedException" => {
return RusotoError::Service(PublishSchemaError::SchemaAlreadyPublished(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PublishSchemaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PublishSchemaError {
fn description(&self) -> &str {
match *self {
PublishSchemaError::AccessDenied(ref cause) => cause,
PublishSchemaError::InternalService(ref cause) => cause,
PublishSchemaError::InvalidArn(ref cause) => cause,
PublishSchemaError::LimitExceeded(ref cause) => cause,
PublishSchemaError::ResourceNotFound(ref cause) => cause,
PublishSchemaError::RetryableConflict(ref cause) => cause,
PublishSchemaError::SchemaAlreadyPublished(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutSchemaFromJsonError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
InvalidRule(String),
InvalidSchemaDoc(String),
LimitExceeded(String),
RetryableConflict(String),
}
impl PutSchemaFromJsonError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutSchemaFromJsonError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(PutSchemaFromJsonError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(PutSchemaFromJsonError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(PutSchemaFromJsonError::InvalidArn(err.msg))
}
"InvalidRuleException" => {
return RusotoError::Service(PutSchemaFromJsonError::InvalidRule(err.msg))
}
"InvalidSchemaDocException" => {
return RusotoError::Service(PutSchemaFromJsonError::InvalidSchemaDoc(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(PutSchemaFromJsonError::LimitExceeded(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(PutSchemaFromJsonError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutSchemaFromJsonError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutSchemaFromJsonError {
fn description(&self) -> &str {
match *self {
PutSchemaFromJsonError::AccessDenied(ref cause) => cause,
PutSchemaFromJsonError::InternalService(ref cause) => cause,
PutSchemaFromJsonError::InvalidArn(ref cause) => cause,
PutSchemaFromJsonError::InvalidRule(ref cause) => cause,
PutSchemaFromJsonError::InvalidSchemaDoc(ref cause) => cause,
PutSchemaFromJsonError::LimitExceeded(ref cause) => cause,
PutSchemaFromJsonError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveFacetFromObjectError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl RemoveFacetFromObjectError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveFacetFromObjectError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(RemoveFacetFromObjectError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(RemoveFacetFromObjectError::DirectoryNotEnabled(
err.msg,
))
}
"FacetValidationException" => {
return RusotoError::Service(RemoveFacetFromObjectError::FacetValidation(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(RemoveFacetFromObjectError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(RemoveFacetFromObjectError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(RemoveFacetFromObjectError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(RemoveFacetFromObjectError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(RemoveFacetFromObjectError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RemoveFacetFromObjectError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveFacetFromObjectError {
fn description(&self) -> &str {
match *self {
RemoveFacetFromObjectError::AccessDenied(ref cause) => cause,
RemoveFacetFromObjectError::DirectoryNotEnabled(ref cause) => cause,
RemoveFacetFromObjectError::FacetValidation(ref cause) => cause,
RemoveFacetFromObjectError::InternalService(ref cause) => cause,
RemoveFacetFromObjectError::InvalidArn(ref cause) => cause,
RemoveFacetFromObjectError::LimitExceeded(ref cause) => cause,
RemoveFacetFromObjectError::ResourceNotFound(ref cause) => cause,
RemoveFacetFromObjectError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
InvalidTaggingRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(TagResourceError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(TagResourceError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(TagResourceError::InvalidArn(err.msg))
}
"InvalidTaggingRequestException" => {
return RusotoError::Service(TagResourceError::InvalidTaggingRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(TagResourceError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(TagResourceError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TagResourceError {
fn description(&self) -> &str {
match *self {
TagResourceError::AccessDenied(ref cause) => cause,
TagResourceError::InternalService(ref cause) => cause,
TagResourceError::InvalidArn(ref cause) => cause,
TagResourceError::InvalidTaggingRequest(ref cause) => cause,
TagResourceError::LimitExceeded(ref cause) => cause,
TagResourceError::ResourceNotFound(ref cause) => cause,
TagResourceError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
InvalidTaggingRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(UntagResourceError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(UntagResourceError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(UntagResourceError::InvalidArn(err.msg))
}
"InvalidTaggingRequestException" => {
return RusotoError::Service(UntagResourceError::InvalidTaggingRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UntagResourceError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(UntagResourceError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UntagResourceError {
fn description(&self) -> &str {
match *self {
UntagResourceError::AccessDenied(ref cause) => cause,
UntagResourceError::InternalService(ref cause) => cause,
UntagResourceError::InvalidArn(ref cause) => cause,
UntagResourceError::InvalidTaggingRequest(ref cause) => cause,
UntagResourceError::LimitExceeded(ref cause) => cause,
UntagResourceError::ResourceNotFound(ref cause) => cause,
UntagResourceError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateFacetError {
AccessDenied(String),
FacetNotFound(String),
InternalService(String),
InvalidArn(String),
InvalidFacetUpdate(String),
InvalidRule(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl UpdateFacetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFacetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(UpdateFacetError::AccessDenied(err.msg))
}
"FacetNotFoundException" => {
return RusotoError::Service(UpdateFacetError::FacetNotFound(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(UpdateFacetError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(UpdateFacetError::InvalidArn(err.msg))
}
"InvalidFacetUpdateException" => {
return RusotoError::Service(UpdateFacetError::InvalidFacetUpdate(err.msg))
}
"InvalidRuleException" => {
return RusotoError::Service(UpdateFacetError::InvalidRule(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateFacetError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateFacetError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(UpdateFacetError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateFacetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateFacetError {
fn description(&self) -> &str {
match *self {
UpdateFacetError::AccessDenied(ref cause) => cause,
UpdateFacetError::FacetNotFound(ref cause) => cause,
UpdateFacetError::InternalService(ref cause) => cause,
UpdateFacetError::InvalidArn(ref cause) => cause,
UpdateFacetError::InvalidFacetUpdate(ref cause) => cause,
UpdateFacetError::InvalidRule(ref cause) => cause,
UpdateFacetError::LimitExceeded(ref cause) => cause,
UpdateFacetError::ResourceNotFound(ref cause) => cause,
UpdateFacetError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateLinkAttributesError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl UpdateLinkAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateLinkAttributesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(UpdateLinkAttributesError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(UpdateLinkAttributesError::DirectoryNotEnabled(
err.msg,
))
}
"FacetValidationException" => {
return RusotoError::Service(UpdateLinkAttributesError::FacetValidation(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(UpdateLinkAttributesError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(UpdateLinkAttributesError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateLinkAttributesError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateLinkAttributesError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(UpdateLinkAttributesError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateLinkAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateLinkAttributesError {
fn description(&self) -> &str {
match *self {
UpdateLinkAttributesError::AccessDenied(ref cause) => cause,
UpdateLinkAttributesError::DirectoryNotEnabled(ref cause) => cause,
UpdateLinkAttributesError::FacetValidation(ref cause) => cause,
UpdateLinkAttributesError::InternalService(ref cause) => cause,
UpdateLinkAttributesError::InvalidArn(ref cause) => cause,
UpdateLinkAttributesError::LimitExceeded(ref cause) => cause,
UpdateLinkAttributesError::ResourceNotFound(ref cause) => cause,
UpdateLinkAttributesError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateObjectAttributesError {
AccessDenied(String),
DirectoryNotEnabled(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
LinkNameAlreadyInUse(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl UpdateObjectAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateObjectAttributesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(UpdateObjectAttributesError::AccessDenied(err.msg))
}
"DirectoryNotEnabledException" => {
return RusotoError::Service(UpdateObjectAttributesError::DirectoryNotEnabled(
err.msg,
))
}
"FacetValidationException" => {
return RusotoError::Service(UpdateObjectAttributesError::FacetValidation(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(UpdateObjectAttributesError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(UpdateObjectAttributesError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateObjectAttributesError::LimitExceeded(
err.msg,
))
}
"LinkNameAlreadyInUseException" => {
return RusotoError::Service(UpdateObjectAttributesError::LinkNameAlreadyInUse(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateObjectAttributesError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(UpdateObjectAttributesError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateObjectAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateObjectAttributesError {
fn description(&self) -> &str {
match *self {
UpdateObjectAttributesError::AccessDenied(ref cause) => cause,
UpdateObjectAttributesError::DirectoryNotEnabled(ref cause) => cause,
UpdateObjectAttributesError::FacetValidation(ref cause) => cause,
UpdateObjectAttributesError::InternalService(ref cause) => cause,
UpdateObjectAttributesError::InvalidArn(ref cause) => cause,
UpdateObjectAttributesError::LimitExceeded(ref cause) => cause,
UpdateObjectAttributesError::LinkNameAlreadyInUse(ref cause) => cause,
UpdateObjectAttributesError::ResourceNotFound(ref cause) => cause,
UpdateObjectAttributesError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateSchemaError {
AccessDenied(String),
InternalService(String),
InvalidArn(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl UpdateSchemaError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateSchemaError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(UpdateSchemaError::AccessDenied(err.msg))
}
"InternalServiceException" => {
return RusotoError::Service(UpdateSchemaError::InternalService(err.msg))
}
"InvalidArnException" => {
return RusotoError::Service(UpdateSchemaError::InvalidArn(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateSchemaError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateSchemaError::ResourceNotFound(err.msg))
}
"RetryableConflictException" => {
return RusotoError::Service(UpdateSchemaError::RetryableConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateSchemaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateSchemaError {
fn description(&self) -> &str {
match *self {
UpdateSchemaError::AccessDenied(ref cause) => cause,
UpdateSchemaError::InternalService(ref cause) => cause,
UpdateSchemaError::InvalidArn(ref cause) => cause,
UpdateSchemaError::LimitExceeded(ref cause) => cause,
UpdateSchemaError::ResourceNotFound(ref cause) => cause,
UpdateSchemaError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateTypedLinkFacetError {
AccessDenied(String),
FacetNotFound(String),
FacetValidation(String),
InternalService(String),
InvalidArn(String),
InvalidFacetUpdate(String),
InvalidRule(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl UpdateTypedLinkFacetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTypedLinkFacetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(UpdateTypedLinkFacetError::AccessDenied(err.msg))
}
"FacetNotFoundException" => {
return RusotoError::Service(UpdateTypedLinkFacetError::FacetNotFound(err.msg))
}
"FacetValidationException" => {
return RusotoError::Service(UpdateTypedLinkFacetError::FacetValidation(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(UpdateTypedLinkFacetError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(UpdateTypedLinkFacetError::InvalidArn(err.msg))
}
"InvalidFacetUpdateException" => {
return RusotoError::Service(UpdateTypedLinkFacetError::InvalidFacetUpdate(
err.msg,
))
}
"InvalidRuleException" => {
return RusotoError::Service(UpdateTypedLinkFacetError::InvalidRule(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateTypedLinkFacetError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateTypedLinkFacetError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(UpdateTypedLinkFacetError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateTypedLinkFacetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateTypedLinkFacetError {
fn description(&self) -> &str {
match *self {
UpdateTypedLinkFacetError::AccessDenied(ref cause) => cause,
UpdateTypedLinkFacetError::FacetNotFound(ref cause) => cause,
UpdateTypedLinkFacetError::FacetValidation(ref cause) => cause,
UpdateTypedLinkFacetError::InternalService(ref cause) => cause,
UpdateTypedLinkFacetError::InvalidArn(ref cause) => cause,
UpdateTypedLinkFacetError::InvalidFacetUpdate(ref cause) => cause,
UpdateTypedLinkFacetError::InvalidRule(ref cause) => cause,
UpdateTypedLinkFacetError::LimitExceeded(ref cause) => cause,
UpdateTypedLinkFacetError::ResourceNotFound(ref cause) => cause,
UpdateTypedLinkFacetError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpgradeAppliedSchemaError {
AccessDenied(String),
IncompatibleSchema(String),
InternalService(String),
InvalidArn(String),
InvalidAttachment(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl UpgradeAppliedSchemaError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpgradeAppliedSchemaError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(UpgradeAppliedSchemaError::AccessDenied(err.msg))
}
"IncompatibleSchemaException" => {
return RusotoError::Service(UpgradeAppliedSchemaError::IncompatibleSchema(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(UpgradeAppliedSchemaError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(UpgradeAppliedSchemaError::InvalidArn(err.msg))
}
"InvalidAttachmentException" => {
return RusotoError::Service(UpgradeAppliedSchemaError::InvalidAttachment(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpgradeAppliedSchemaError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(UpgradeAppliedSchemaError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpgradeAppliedSchemaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpgradeAppliedSchemaError {
fn description(&self) -> &str {
match *self {
UpgradeAppliedSchemaError::AccessDenied(ref cause) => cause,
UpgradeAppliedSchemaError::IncompatibleSchema(ref cause) => cause,
UpgradeAppliedSchemaError::InternalService(ref cause) => cause,
UpgradeAppliedSchemaError::InvalidArn(ref cause) => cause,
UpgradeAppliedSchemaError::InvalidAttachment(ref cause) => cause,
UpgradeAppliedSchemaError::ResourceNotFound(ref cause) => cause,
UpgradeAppliedSchemaError::RetryableConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpgradePublishedSchemaError {
AccessDenied(String),
IncompatibleSchema(String),
InternalService(String),
InvalidArn(String),
InvalidAttachment(String),
LimitExceeded(String),
ResourceNotFound(String),
RetryableConflict(String),
}
impl UpgradePublishedSchemaError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpgradePublishedSchemaError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(UpgradePublishedSchemaError::AccessDenied(err.msg))
}
"IncompatibleSchemaException" => {
return RusotoError::Service(UpgradePublishedSchemaError::IncompatibleSchema(
err.msg,
))
}
"InternalServiceException" => {
return RusotoError::Service(UpgradePublishedSchemaError::InternalService(
err.msg,
))
}
"InvalidArnException" => {
return RusotoError::Service(UpgradePublishedSchemaError::InvalidArn(err.msg))
}
"InvalidAttachmentException" => {
return RusotoError::Service(UpgradePublishedSchemaError::InvalidAttachment(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(UpgradePublishedSchemaError::LimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpgradePublishedSchemaError::ResourceNotFound(
err.msg,
))
}
"RetryableConflictException" => {
return RusotoError::Service(UpgradePublishedSchemaError::RetryableConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpgradePublishedSchemaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpgradePublishedSchemaError {
fn description(&self) -> &str {
match *self {
UpgradePublishedSchemaError::AccessDenied(ref cause) => cause,
UpgradePublishedSchemaError::IncompatibleSchema(ref cause) => cause,
UpgradePublishedSchemaError::InternalService(ref cause) => cause,
UpgradePublishedSchemaError::InvalidArn(ref cause) => cause,
UpgradePublishedSchemaError::InvalidAttachment(ref cause) => cause,
UpgradePublishedSchemaError::LimitExceeded(ref cause) => cause,
UpgradePublishedSchemaError::ResourceNotFound(ref cause) => cause,
UpgradePublishedSchemaError::RetryableConflict(ref cause) => cause,
}
}
}
pub trait CloudDirectory {
fn add_facet_to_object(
&self,
input: AddFacetToObjectRequest,
) -> RusotoFuture<AddFacetToObjectResponse, AddFacetToObjectError>;
fn apply_schema(
&self,
input: ApplySchemaRequest,
) -> RusotoFuture<ApplySchemaResponse, ApplySchemaError>;
fn attach_object(
&self,
input: AttachObjectRequest,
) -> RusotoFuture<AttachObjectResponse, AttachObjectError>;
fn attach_policy(
&self,
input: AttachPolicyRequest,
) -> RusotoFuture<AttachPolicyResponse, AttachPolicyError>;
fn attach_to_index(
&self,
input: AttachToIndexRequest,
) -> RusotoFuture<AttachToIndexResponse, AttachToIndexError>;
fn attach_typed_link(
&self,
input: AttachTypedLinkRequest,
) -> RusotoFuture<AttachTypedLinkResponse, AttachTypedLinkError>;
fn batch_read(
&self,
input: BatchReadRequest,
) -> RusotoFuture<BatchReadResponse, BatchReadError>;
fn batch_write(
&self,
input: BatchWriteRequest,
) -> RusotoFuture<BatchWriteResponse, BatchWriteError>;
fn create_directory(
&self,
input: CreateDirectoryRequest,
) -> RusotoFuture<CreateDirectoryResponse, CreateDirectoryError>;
fn create_facet(
&self,
input: CreateFacetRequest,
) -> RusotoFuture<CreateFacetResponse, CreateFacetError>;
fn create_index(
&self,
input: CreateIndexRequest,
) -> RusotoFuture<CreateIndexResponse, CreateIndexError>;
fn create_object(
&self,
input: CreateObjectRequest,
) -> RusotoFuture<CreateObjectResponse, CreateObjectError>;
fn create_schema(
&self,
input: CreateSchemaRequest,
) -> RusotoFuture<CreateSchemaResponse, CreateSchemaError>;
fn create_typed_link_facet(
&self,
input: CreateTypedLinkFacetRequest,
) -> RusotoFuture<CreateTypedLinkFacetResponse, CreateTypedLinkFacetError>;
fn delete_directory(
&self,
input: DeleteDirectoryRequest,
) -> RusotoFuture<DeleteDirectoryResponse, DeleteDirectoryError>;
fn delete_facet(
&self,
input: DeleteFacetRequest,
) -> RusotoFuture<DeleteFacetResponse, DeleteFacetError>;
fn delete_object(
&self,
input: DeleteObjectRequest,
) -> RusotoFuture<DeleteObjectResponse, DeleteObjectError>;
fn delete_schema(
&self,
input: DeleteSchemaRequest,
) -> RusotoFuture<DeleteSchemaResponse, DeleteSchemaError>;
fn delete_typed_link_facet(
&self,
input: DeleteTypedLinkFacetRequest,
) -> RusotoFuture<DeleteTypedLinkFacetResponse, DeleteTypedLinkFacetError>;
fn detach_from_index(
&self,
input: DetachFromIndexRequest,
) -> RusotoFuture<DetachFromIndexResponse, DetachFromIndexError>;
fn detach_object(
&self,
input: DetachObjectRequest,
) -> RusotoFuture<DetachObjectResponse, DetachObjectError>;
fn detach_policy(
&self,
input: DetachPolicyRequest,
) -> RusotoFuture<DetachPolicyResponse, DetachPolicyError>;
fn detach_typed_link(
&self,
input: DetachTypedLinkRequest,
) -> RusotoFuture<(), DetachTypedLinkError>;
fn disable_directory(
&self,
input: DisableDirectoryRequest,
) -> RusotoFuture<DisableDirectoryResponse, DisableDirectoryError>;
fn enable_directory(
&self,
input: EnableDirectoryRequest,
) -> RusotoFuture<EnableDirectoryResponse, EnableDirectoryError>;
fn get_applied_schema_version(
&self,
input: GetAppliedSchemaVersionRequest,
) -> RusotoFuture<GetAppliedSchemaVersionResponse, GetAppliedSchemaVersionError>;
fn get_directory(
&self,
input: GetDirectoryRequest,
) -> RusotoFuture<GetDirectoryResponse, GetDirectoryError>;
fn get_facet(&self, input: GetFacetRequest) -> RusotoFuture<GetFacetResponse, GetFacetError>;
fn get_link_attributes(
&self,
input: GetLinkAttributesRequest,
) -> RusotoFuture<GetLinkAttributesResponse, GetLinkAttributesError>;
fn get_object_attributes(
&self,
input: GetObjectAttributesRequest,
) -> RusotoFuture<GetObjectAttributesResponse, GetObjectAttributesError>;
fn get_object_information(
&self,
input: GetObjectInformationRequest,
) -> RusotoFuture<GetObjectInformationResponse, GetObjectInformationError>;
fn get_schema_as_json(
&self,
input: GetSchemaAsJsonRequest,
) -> RusotoFuture<GetSchemaAsJsonResponse, GetSchemaAsJsonError>;
fn get_typed_link_facet_information(
&self,
input: GetTypedLinkFacetInformationRequest,
) -> RusotoFuture<GetTypedLinkFacetInformationResponse, GetTypedLinkFacetInformationError>;
fn list_applied_schema_arns(
&self,
input: ListAppliedSchemaArnsRequest,
) -> RusotoFuture<ListAppliedSchemaArnsResponse, ListAppliedSchemaArnsError>;
fn list_attached_indices(
&self,
input: ListAttachedIndicesRequest,
) -> RusotoFuture<ListAttachedIndicesResponse, ListAttachedIndicesError>;
fn list_development_schema_arns(
&self,
input: ListDevelopmentSchemaArnsRequest,
) -> RusotoFuture<ListDevelopmentSchemaArnsResponse, ListDevelopmentSchemaArnsError>;
fn list_directories(
&self,
input: ListDirectoriesRequest,
) -> RusotoFuture<ListDirectoriesResponse, ListDirectoriesError>;
fn list_facet_attributes(
&self,
input: ListFacetAttributesRequest,
) -> RusotoFuture<ListFacetAttributesResponse, ListFacetAttributesError>;
fn list_facet_names(
&self,
input: ListFacetNamesRequest,
) -> RusotoFuture<ListFacetNamesResponse, ListFacetNamesError>;
fn list_incoming_typed_links(
&self,
input: ListIncomingTypedLinksRequest,
) -> RusotoFuture<ListIncomingTypedLinksResponse, ListIncomingTypedLinksError>;
fn list_index(
&self,
input: ListIndexRequest,
) -> RusotoFuture<ListIndexResponse, ListIndexError>;
fn list_object_attributes(
&self,
input: ListObjectAttributesRequest,
) -> RusotoFuture<ListObjectAttributesResponse, ListObjectAttributesError>;
fn list_object_children(
&self,
input: ListObjectChildrenRequest,
) -> RusotoFuture<ListObjectChildrenResponse, ListObjectChildrenError>;
fn list_object_parent_paths(
&self,
input: ListObjectParentPathsRequest,
) -> RusotoFuture<ListObjectParentPathsResponse, ListObjectParentPathsError>;
fn list_object_parents(
&self,
input: ListObjectParentsRequest,
) -> RusotoFuture<ListObjectParentsResponse, ListObjectParentsError>;
fn list_object_policies(
&self,
input: ListObjectPoliciesRequest,
) -> RusotoFuture<ListObjectPoliciesResponse, ListObjectPoliciesError>;
fn list_outgoing_typed_links(
&self,
input: ListOutgoingTypedLinksRequest,
) -> RusotoFuture<ListOutgoingTypedLinksResponse, ListOutgoingTypedLinksError>;
fn list_policy_attachments(
&self,
input: ListPolicyAttachmentsRequest,
) -> RusotoFuture<ListPolicyAttachmentsResponse, ListPolicyAttachmentsError>;
fn list_published_schema_arns(
&self,
input: ListPublishedSchemaArnsRequest,
) -> RusotoFuture<ListPublishedSchemaArnsResponse, ListPublishedSchemaArnsError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError>;
fn list_typed_link_facet_attributes(
&self,
input: ListTypedLinkFacetAttributesRequest,
) -> RusotoFuture<ListTypedLinkFacetAttributesResponse, ListTypedLinkFacetAttributesError>;
fn list_typed_link_facet_names(
&self,
input: ListTypedLinkFacetNamesRequest,
) -> RusotoFuture<ListTypedLinkFacetNamesResponse, ListTypedLinkFacetNamesError>;
fn lookup_policy(
&self,
input: LookupPolicyRequest,
) -> RusotoFuture<LookupPolicyResponse, LookupPolicyError>;
fn publish_schema(
&self,
input: PublishSchemaRequest,
) -> RusotoFuture<PublishSchemaResponse, PublishSchemaError>;
fn put_schema_from_json(
&self,
input: PutSchemaFromJsonRequest,
) -> RusotoFuture<PutSchemaFromJsonResponse, PutSchemaFromJsonError>;
fn remove_facet_from_object(
&self,
input: RemoveFacetFromObjectRequest,
) -> RusotoFuture<RemoveFacetFromObjectResponse, RemoveFacetFromObjectError>;
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError>;
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError>;
fn update_facet(
&self,
input: UpdateFacetRequest,
) -> RusotoFuture<UpdateFacetResponse, UpdateFacetError>;
fn update_link_attributes(
&self,
input: UpdateLinkAttributesRequest,
) -> RusotoFuture<UpdateLinkAttributesResponse, UpdateLinkAttributesError>;
fn update_object_attributes(
&self,
input: UpdateObjectAttributesRequest,
) -> RusotoFuture<UpdateObjectAttributesResponse, UpdateObjectAttributesError>;
fn update_schema(
&self,
input: UpdateSchemaRequest,
) -> RusotoFuture<UpdateSchemaResponse, UpdateSchemaError>;
fn update_typed_link_facet(
&self,
input: UpdateTypedLinkFacetRequest,
) -> RusotoFuture<UpdateTypedLinkFacetResponse, UpdateTypedLinkFacetError>;
fn upgrade_applied_schema(
&self,
input: UpgradeAppliedSchemaRequest,
) -> RusotoFuture<UpgradeAppliedSchemaResponse, UpgradeAppliedSchemaError>;
fn upgrade_published_schema(
&self,
input: UpgradePublishedSchemaRequest,
) -> RusotoFuture<UpgradePublishedSchemaResponse, UpgradePublishedSchemaError>;
}
#[derive(Clone)]
pub struct CloudDirectoryClient {
client: Client,
region: region::Region,
}
impl CloudDirectoryClient {
pub fn new(region: region::Region) -> CloudDirectoryClient {
CloudDirectoryClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> CloudDirectoryClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
CloudDirectoryClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl CloudDirectory for CloudDirectoryClient {
fn add_facet_to_object(
&self,
input: AddFacetToObjectRequest,
) -> RusotoFuture<AddFacetToObjectResponse, AddFacetToObjectError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/facets";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AddFacetToObjectResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AddFacetToObjectError::from_response(response))),
)
}
})
}
fn apply_schema(
&self,
input: ApplySchemaRequest,
) -> RusotoFuture<ApplySchemaResponse, ApplySchemaError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema/apply";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ApplySchemaResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ApplySchemaError::from_response(response))),
)
}
})
}
fn attach_object(
&self,
input: AttachObjectRequest,
) -> RusotoFuture<AttachObjectResponse, AttachObjectError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/attach";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AttachObjectResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AttachObjectError::from_response(response))),
)
}
})
}
fn attach_policy(
&self,
input: AttachPolicyRequest,
) -> RusotoFuture<AttachPolicyResponse, AttachPolicyError> {
let request_uri = "/amazonclouddirectory/2017-01-11/policy/attach";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AttachPolicyResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AttachPolicyError::from_response(response))),
)
}
})
}
fn attach_to_index(
&self,
input: AttachToIndexRequest,
) -> RusotoFuture<AttachToIndexResponse, AttachToIndexError> {
let request_uri = "/amazonclouddirectory/2017-01-11/index/attach";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AttachToIndexResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AttachToIndexError::from_response(response))),
)
}
})
}
fn attach_typed_link(
&self,
input: AttachTypedLinkRequest,
) -> RusotoFuture<AttachTypedLinkResponse, AttachTypedLinkError> {
let request_uri = "/amazonclouddirectory/2017-01-11/typedlink/attach";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AttachTypedLinkResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AttachTypedLinkError::from_response(response))),
)
}
})
}
fn batch_read(
&self,
input: BatchReadRequest,
) -> RusotoFuture<BatchReadResponse, BatchReadError> {
let request_uri = "/amazonclouddirectory/2017-01-11/batchread";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref consistency_level) = input.consistency_level {
request.add_header("x-amz-consistency-level", &consistency_level.to_string());
}
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchReadResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(BatchReadError::from_response(response))),
)
}
})
}
fn batch_write(
&self,
input: BatchWriteRequest,
) -> RusotoFuture<BatchWriteResponse, BatchWriteError> {
let request_uri = "/amazonclouddirectory/2017-01-11/batchwrite";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchWriteResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(BatchWriteError::from_response(response))),
)
}
})
}
fn create_directory(
&self,
input: CreateDirectoryRequest,
) -> RusotoFuture<CreateDirectoryResponse, CreateDirectoryError> {
let request_uri = "/amazonclouddirectory/2017-01-11/directory/create";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateDirectoryResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateDirectoryError::from_response(response))),
)
}
})
}
fn create_facet(
&self,
input: CreateFacetRequest,
) -> RusotoFuture<CreateFacetResponse, CreateFacetError> {
let request_uri = "/amazonclouddirectory/2017-01-11/facet/create";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateFacetResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateFacetError::from_response(response))),
)
}
})
}
fn create_index(
&self,
input: CreateIndexRequest,
) -> RusotoFuture<CreateIndexResponse, CreateIndexError> {
let request_uri = "/amazonclouddirectory/2017-01-11/index";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateIndexResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateIndexError::from_response(response))),
)
}
})
}
fn create_object(
&self,
input: CreateObjectRequest,
) -> RusotoFuture<CreateObjectResponse, CreateObjectError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateObjectResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateObjectError::from_response(response))),
)
}
})
}
fn create_schema(
&self,
input: CreateSchemaRequest,
) -> RusotoFuture<CreateSchemaResponse, CreateSchemaError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema/create";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateSchemaResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateSchemaError::from_response(response))),
)
}
})
}
fn create_typed_link_facet(
&self,
input: CreateTypedLinkFacetRequest,
) -> RusotoFuture<CreateTypedLinkFacetResponse, CreateTypedLinkFacetError> {
let request_uri = "/amazonclouddirectory/2017-01-11/typedlink/facet/create";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateTypedLinkFacetResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateTypedLinkFacetError::from_response(response))
}),
)
}
})
}
fn delete_directory(
&self,
input: DeleteDirectoryRequest,
) -> RusotoFuture<DeleteDirectoryResponse, DeleteDirectoryError> {
let request_uri = "/amazonclouddirectory/2017-01-11/directory";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteDirectoryResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteDirectoryError::from_response(response))),
)
}
})
}
fn delete_facet(
&self,
input: DeleteFacetRequest,
) -> RusotoFuture<DeleteFacetResponse, DeleteFacetError> {
let request_uri = "/amazonclouddirectory/2017-01-11/facet/delete";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteFacetResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteFacetError::from_response(response))),
)
}
})
}
fn delete_object(
&self,
input: DeleteObjectRequest,
) -> RusotoFuture<DeleteObjectResponse, DeleteObjectError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/delete";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteObjectResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteObjectError::from_response(response))),
)
}
})
}
fn delete_schema(
&self,
input: DeleteSchemaRequest,
) -> RusotoFuture<DeleteSchemaResponse, DeleteSchemaError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteSchemaResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteSchemaError::from_response(response))),
)
}
})
}
fn delete_typed_link_facet(
&self,
input: DeleteTypedLinkFacetRequest,
) -> RusotoFuture<DeleteTypedLinkFacetResponse, DeleteTypedLinkFacetError> {
let request_uri = "/amazonclouddirectory/2017-01-11/typedlink/facet/delete";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteTypedLinkFacetResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteTypedLinkFacetError::from_response(response))
}),
)
}
})
}
fn detach_from_index(
&self,
input: DetachFromIndexRequest,
) -> RusotoFuture<DetachFromIndexResponse, DetachFromIndexError> {
let request_uri = "/amazonclouddirectory/2017-01-11/index/detach";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DetachFromIndexResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DetachFromIndexError::from_response(response))),
)
}
})
}
fn detach_object(
&self,
input: DetachObjectRequest,
) -> RusotoFuture<DetachObjectResponse, DetachObjectError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/detach";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DetachObjectResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DetachObjectError::from_response(response))),
)
}
})
}
fn detach_policy(
&self,
input: DetachPolicyRequest,
) -> RusotoFuture<DetachPolicyResponse, DetachPolicyError> {
let request_uri = "/amazonclouddirectory/2017-01-11/policy/detach";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DetachPolicyResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DetachPolicyError::from_response(response))),
)
}
})
}
fn detach_typed_link(
&self,
input: DetachTypedLinkRequest,
) -> RusotoFuture<(), DetachTypedLinkError> {
let request_uri = "/amazonclouddirectory/2017-01-11/typedlink/detach";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DetachTypedLinkError::from_response(response))),
)
}
})
}
fn disable_directory(
&self,
input: DisableDirectoryRequest,
) -> RusotoFuture<DisableDirectoryResponse, DisableDirectoryError> {
let request_uri = "/amazonclouddirectory/2017-01-11/directory/disable";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisableDirectoryResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DisableDirectoryError::from_response(response))),
)
}
})
}
fn enable_directory(
&self,
input: EnableDirectoryRequest,
) -> RusotoFuture<EnableDirectoryResponse, EnableDirectoryError> {
let request_uri = "/amazonclouddirectory/2017-01-11/directory/enable";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<EnableDirectoryResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(EnableDirectoryError::from_response(response))),
)
}
})
}
fn get_applied_schema_version(
&self,
input: GetAppliedSchemaVersionRequest,
) -> RusotoFuture<GetAppliedSchemaVersionResponse, GetAppliedSchemaVersionError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema/getappliedschema";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetAppliedSchemaVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetAppliedSchemaVersionError::from_response(response))
}))
}
})
}
fn get_directory(
&self,
input: GetDirectoryRequest,
) -> RusotoFuture<GetDirectoryResponse, GetDirectoryError> {
let request_uri = "/amazonclouddirectory/2017-01-11/directory/get";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetDirectoryResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDirectoryError::from_response(response))),
)
}
})
}
fn get_facet(&self, input: GetFacetRequest) -> RusotoFuture<GetFacetResponse, GetFacetError> {
let request_uri = "/amazonclouddirectory/2017-01-11/facet";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetFacetResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetFacetError::from_response(response))),
)
}
})
}
fn get_link_attributes(
&self,
input: GetLinkAttributesRequest,
) -> RusotoFuture<GetLinkAttributesResponse, GetLinkAttributesError> {
let request_uri = "/amazonclouddirectory/2017-01-11/typedlink/attributes/get";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetLinkAttributesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetLinkAttributesError::from_response(response))),
)
}
})
}
fn get_object_attributes(
&self,
input: GetObjectAttributesRequest,
) -> RusotoFuture<GetObjectAttributesResponse, GetObjectAttributesError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/attributes/get";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref consistency_level) = input.consistency_level {
request.add_header("x-amz-consistency-level", &consistency_level.to_string());
}
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetObjectAttributesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetObjectAttributesError::from_response(response))
}),
)
}
})
}
fn get_object_information(
&self,
input: GetObjectInformationRequest,
) -> RusotoFuture<GetObjectInformationResponse, GetObjectInformationError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/information";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref consistency_level) = input.consistency_level {
request.add_header("x-amz-consistency-level", &consistency_level.to_string());
}
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetObjectInformationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetObjectInformationError::from_response(response))
}),
)
}
})
}
fn get_schema_as_json(
&self,
input: GetSchemaAsJsonRequest,
) -> RusotoFuture<GetSchemaAsJsonResponse, GetSchemaAsJsonError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema/json";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetSchemaAsJsonResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetSchemaAsJsonError::from_response(response))),
)
}
})
}
fn get_typed_link_facet_information(
&self,
input: GetTypedLinkFacetInformationRequest,
) -> RusotoFuture<GetTypedLinkFacetInformationResponse, GetTypedLinkFacetInformationError> {
let request_uri = "/amazonclouddirectory/2017-01-11/typedlink/facet/get";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetTypedLinkFacetInformationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetTypedLinkFacetInformationError::from_response(response))
}))
}
})
}
fn list_applied_schema_arns(
&self,
input: ListAppliedSchemaArnsRequest,
) -> RusotoFuture<ListAppliedSchemaArnsResponse, ListAppliedSchemaArnsError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema/applied";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListAppliedSchemaArnsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListAppliedSchemaArnsError::from_response(response))
}),
)
}
})
}
fn list_attached_indices(
&self,
input: ListAttachedIndicesRequest,
) -> RusotoFuture<ListAttachedIndicesResponse, ListAttachedIndicesError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/indices";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref consistency_level) = input.consistency_level {
request.add_header("x-amz-consistency-level", &consistency_level.to_string());
}
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListAttachedIndicesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListAttachedIndicesError::from_response(response))
}),
)
}
})
}
fn list_development_schema_arns(
&self,
input: ListDevelopmentSchemaArnsRequest,
) -> RusotoFuture<ListDevelopmentSchemaArnsResponse, ListDevelopmentSchemaArnsError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema/development";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListDevelopmentSchemaArnsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListDevelopmentSchemaArnsError::from_response(response))
}))
}
})
}
fn list_directories(
&self,
input: ListDirectoriesRequest,
) -> RusotoFuture<ListDirectoriesResponse, ListDirectoriesError> {
let request_uri = "/amazonclouddirectory/2017-01-11/directory/list";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListDirectoriesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListDirectoriesError::from_response(response))),
)
}
})
}
fn list_facet_attributes(
&self,
input: ListFacetAttributesRequest,
) -> RusotoFuture<ListFacetAttributesResponse, ListFacetAttributesError> {
let request_uri = "/amazonclouddirectory/2017-01-11/facet/attributes";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListFacetAttributesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListFacetAttributesError::from_response(response))
}),
)
}
})
}
fn list_facet_names(
&self,
input: ListFacetNamesRequest,
) -> RusotoFuture<ListFacetNamesResponse, ListFacetNamesError> {
let request_uri = "/amazonclouddirectory/2017-01-11/facet/list";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListFacetNamesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListFacetNamesError::from_response(response))),
)
}
})
}
fn list_incoming_typed_links(
&self,
input: ListIncomingTypedLinksRequest,
) -> RusotoFuture<ListIncomingTypedLinksResponse, ListIncomingTypedLinksError> {
let request_uri = "/amazonclouddirectory/2017-01-11/typedlink/incoming";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListIncomingTypedLinksResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListIncomingTypedLinksError::from_response(response))
}),
)
}
})
}
fn list_index(
&self,
input: ListIndexRequest,
) -> RusotoFuture<ListIndexResponse, ListIndexError> {
let request_uri = "/amazonclouddirectory/2017-01-11/index/targets";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref consistency_level) = input.consistency_level {
request.add_header("x-amz-consistency-level", &consistency_level.to_string());
}
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListIndexResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListIndexError::from_response(response))),
)
}
})
}
fn list_object_attributes(
&self,
input: ListObjectAttributesRequest,
) -> RusotoFuture<ListObjectAttributesResponse, ListObjectAttributesError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/attributes";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref consistency_level) = input.consistency_level {
request.add_header("x-amz-consistency-level", &consistency_level.to_string());
}
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListObjectAttributesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListObjectAttributesError::from_response(response))
}),
)
}
})
}
fn list_object_children(
&self,
input: ListObjectChildrenRequest,
) -> RusotoFuture<ListObjectChildrenResponse, ListObjectChildrenError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/children";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref consistency_level) = input.consistency_level {
request.add_header("x-amz-consistency-level", &consistency_level.to_string());
}
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListObjectChildrenResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListObjectChildrenError::from_response(response))),
)
}
})
}
fn list_object_parent_paths(
&self,
input: ListObjectParentPathsRequest,
) -> RusotoFuture<ListObjectParentPathsResponse, ListObjectParentPathsError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/parentpaths";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListObjectParentPathsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListObjectParentPathsError::from_response(response))
}),
)
}
})
}
fn list_object_parents(
&self,
input: ListObjectParentsRequest,
) -> RusotoFuture<ListObjectParentsResponse, ListObjectParentsError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/parent";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref consistency_level) = input.consistency_level {
request.add_header("x-amz-consistency-level", &consistency_level.to_string());
}
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListObjectParentsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListObjectParentsError::from_response(response))),
)
}
})
}
fn list_object_policies(
&self,
input: ListObjectPoliciesRequest,
) -> RusotoFuture<ListObjectPoliciesResponse, ListObjectPoliciesError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/policy";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref consistency_level) = input.consistency_level {
request.add_header("x-amz-consistency-level", &consistency_level.to_string());
}
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListObjectPoliciesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListObjectPoliciesError::from_response(response))),
)
}
})
}
fn list_outgoing_typed_links(
&self,
input: ListOutgoingTypedLinksRequest,
) -> RusotoFuture<ListOutgoingTypedLinksResponse, ListOutgoingTypedLinksError> {
let request_uri = "/amazonclouddirectory/2017-01-11/typedlink/outgoing";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListOutgoingTypedLinksResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListOutgoingTypedLinksError::from_response(response))
}),
)
}
})
}
fn list_policy_attachments(
&self,
input: ListPolicyAttachmentsRequest,
) -> RusotoFuture<ListPolicyAttachmentsResponse, ListPolicyAttachmentsError> {
let request_uri = "/amazonclouddirectory/2017-01-11/policy/attachment";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref consistency_level) = input.consistency_level {
request.add_header("x-amz-consistency-level", &consistency_level.to_string());
}
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListPolicyAttachmentsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListPolicyAttachmentsError::from_response(response))
}),
)
}
})
}
fn list_published_schema_arns(
&self,
input: ListPublishedSchemaArnsRequest,
) -> RusotoFuture<ListPublishedSchemaArnsResponse, ListPublishedSchemaArnsError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema/published";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListPublishedSchemaArnsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListPublishedSchemaArnsError::from_response(response))
}))
}
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError> {
let request_uri = "/amazonclouddirectory/2017-01-11/tags";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListTagsForResourceResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourceError::from_response(response))
}),
)
}
})
}
fn list_typed_link_facet_attributes(
&self,
input: ListTypedLinkFacetAttributesRequest,
) -> RusotoFuture<ListTypedLinkFacetAttributesResponse, ListTypedLinkFacetAttributesError> {
let request_uri = "/amazonclouddirectory/2017-01-11/typedlink/facet/attributes";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListTypedLinkFacetAttributesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListTypedLinkFacetAttributesError::from_response(response))
}))
}
})
}
fn list_typed_link_facet_names(
&self,
input: ListTypedLinkFacetNamesRequest,
) -> RusotoFuture<ListTypedLinkFacetNamesResponse, ListTypedLinkFacetNamesError> {
let request_uri = "/amazonclouddirectory/2017-01-11/typedlink/facet/list";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListTypedLinkFacetNamesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListTypedLinkFacetNamesError::from_response(response))
}))
}
})
}
fn lookup_policy(
&self,
input: LookupPolicyRequest,
) -> RusotoFuture<LookupPolicyResponse, LookupPolicyError> {
let request_uri = "/amazonclouddirectory/2017-01-11/policy/lookup";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<LookupPolicyResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(LookupPolicyError::from_response(response))),
)
}
})
}
fn publish_schema(
&self,
input: PublishSchemaRequest,
) -> RusotoFuture<PublishSchemaResponse, PublishSchemaError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema/publish";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.development_schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PublishSchemaResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PublishSchemaError::from_response(response))),
)
}
})
}
fn put_schema_from_json(
&self,
input: PutSchemaFromJsonRequest,
) -> RusotoFuture<PutSchemaFromJsonResponse, PutSchemaFromJsonError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema/json";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutSchemaFromJsonResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutSchemaFromJsonError::from_response(response))),
)
}
})
}
fn remove_facet_from_object(
&self,
input: RemoveFacetFromObjectRequest,
) -> RusotoFuture<RemoveFacetFromObjectResponse, RemoveFacetFromObjectError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/facets/delete";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RemoveFacetFromObjectResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RemoveFacetFromObjectError::from_response(response))
}),
)
}
})
}
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError> {
let request_uri = "/amazonclouddirectory/2017-01-11/tags/add";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<TagResourceResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TagResourceError::from_response(response))),
)
}
})
}
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError> {
let request_uri = "/amazonclouddirectory/2017-01-11/tags/remove";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UntagResourceResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UntagResourceError::from_response(response))),
)
}
})
}
fn update_facet(
&self,
input: UpdateFacetRequest,
) -> RusotoFuture<UpdateFacetResponse, UpdateFacetError> {
let request_uri = "/amazonclouddirectory/2017-01-11/facet";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateFacetResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateFacetError::from_response(response))),
)
}
})
}
fn update_link_attributes(
&self,
input: UpdateLinkAttributesRequest,
) -> RusotoFuture<UpdateLinkAttributesResponse, UpdateLinkAttributesError> {
let request_uri = "/amazonclouddirectory/2017-01-11/typedlink/attributes/update";
let mut request = SignedRequest::new("POST", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateLinkAttributesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateLinkAttributesError::from_response(response))
}),
)
}
})
}
fn update_object_attributes(
&self,
input: UpdateObjectAttributesRequest,
) -> RusotoFuture<UpdateObjectAttributesResponse, UpdateObjectAttributesError> {
let request_uri = "/amazonclouddirectory/2017-01-11/object/update";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.directory_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateObjectAttributesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateObjectAttributesError::from_response(response))
}),
)
}
})
}
fn update_schema(
&self,
input: UpdateSchemaRequest,
) -> RusotoFuture<UpdateSchemaResponse, UpdateSchemaError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema/update";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateSchemaResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateSchemaError::from_response(response))),
)
}
})
}
fn update_typed_link_facet(
&self,
input: UpdateTypedLinkFacetRequest,
) -> RusotoFuture<UpdateTypedLinkFacetResponse, UpdateTypedLinkFacetError> {
let request_uri = "/amazonclouddirectory/2017-01-11/typedlink/facet";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
request.add_header("x-amz-data-partition", &input.schema_arn);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateTypedLinkFacetResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateTypedLinkFacetError::from_response(response))
}),
)
}
})
}
fn upgrade_applied_schema(
&self,
input: UpgradeAppliedSchemaRequest,
) -> RusotoFuture<UpgradeAppliedSchemaResponse, UpgradeAppliedSchemaError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema/upgradeapplied";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpgradeAppliedSchemaResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpgradeAppliedSchemaError::from_response(response))
}),
)
}
})
}
fn upgrade_published_schema(
&self,
input: UpgradePublishedSchemaRequest,
) -> RusotoFuture<UpgradePublishedSchemaResponse, UpgradePublishedSchemaError> {
let request_uri = "/amazonclouddirectory/2017-01-11/schema/upgradepublished";
let mut request = SignedRequest::new("PUT", "clouddirectory", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpgradePublishedSchemaResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpgradePublishedSchemaError::from_response(response))
}),
)
}
})
}
}