// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.

// Package clouddirectory provides a client for Amazon CloudDirectory.
package clouddirectory

import (
	"fmt"
	"time"

	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/aws/request"
)

const opAddFacetToObject = "AddFacetToObject"

// AddFacetToObjectRequest generates a "aws/request.Request" representing the
// client's request for the AddFacetToObject operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See AddFacetToObject for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the AddFacetToObject method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the AddFacetToObjectRequest method.
//    req, resp := client.AddFacetToObjectRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AddFacetToObject
func (c *CloudDirectory) AddFacetToObjectRequest(input *AddFacetToObjectInput) (req *request.Request, output *AddFacetToObjectOutput) {
	op := &request.Operation{
		Name:       opAddFacetToObject,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object/facets",
	}

	if input == nil {
		input = &AddFacetToObjectInput{}
	}

	output = &AddFacetToObjectOutput{}
	req = c.newRequest(op, input, output)
	return
}

// AddFacetToObject API operation for Amazon CloudDirectory.
//
// Adds a new Facet to an object.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation AddFacetToObject for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeFacetValidationException "FacetValidationException"
//   The Facet you provided was not well formed or could not be validated with
//   the schema.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AddFacetToObject
func (c *CloudDirectory) AddFacetToObject(input *AddFacetToObjectInput) (*AddFacetToObjectOutput, error) {
	req, out := c.AddFacetToObjectRequest(input)
	err := req.Send()
	return out, err
}

const opApplySchema = "ApplySchema"

// ApplySchemaRequest generates a "aws/request.Request" representing the
// client's request for the ApplySchema operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ApplySchema for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ApplySchema method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ApplySchemaRequest method.
//    req, resp := client.ApplySchemaRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ApplySchema
func (c *CloudDirectory) ApplySchemaRequest(input *ApplySchemaInput) (req *request.Request, output *ApplySchemaOutput) {
	op := &request.Operation{
		Name:       opApplySchema,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/schema/apply",
	}

	if input == nil {
		input = &ApplySchemaInput{}
	}

	output = &ApplySchemaOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ApplySchema API operation for Amazon CloudDirectory.
//
// Copies input published schema into Directory with same name and version as
// that of published schema .
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ApplySchema for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeInvalidAttachmentException "InvalidAttachmentException"
//   Indicates that an attempt to attach an object with the same link name or
//   to apply a schema with same name has occurred. Rename the link or the schema
//   and then try again.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ApplySchema
func (c *CloudDirectory) ApplySchema(input *ApplySchemaInput) (*ApplySchemaOutput, error) {
	req, out := c.ApplySchemaRequest(input)
	err := req.Send()
	return out, err
}

const opAttachObject = "AttachObject"

// AttachObjectRequest generates a "aws/request.Request" representing the
// client's request for the AttachObject operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See AttachObject for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the AttachObject method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the AttachObjectRequest method.
//    req, resp := client.AttachObjectRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachObject
func (c *CloudDirectory) AttachObjectRequest(input *AttachObjectInput) (req *request.Request, output *AttachObjectOutput) {
	op := &request.Operation{
		Name:       opAttachObject,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object/attach",
	}

	if input == nil {
		input = &AttachObjectInput{}
	}

	output = &AttachObjectOutput{}
	req = c.newRequest(op, input, output)
	return
}

// AttachObject API operation for Amazon CloudDirectory.
//
// Attaches an existing object to another object. An object can be accessed
// in two ways:
//
// Using the path
//
// Using ObjectIdentifier
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation AttachObject for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeLinkNameAlreadyInUseException "LinkNameAlreadyInUseException"
//   Indicates that a link could not be created due to a naming conflict. Choose
//   a different name and then try again.
//
//   * ErrCodeInvalidAttachmentException "InvalidAttachmentException"
//   Indicates that an attempt to attach an object with the same link name or
//   to apply a schema with same name has occurred. Rename the link or the schema
//   and then try again.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachObject
func (c *CloudDirectory) AttachObject(input *AttachObjectInput) (*AttachObjectOutput, error) {
	req, out := c.AttachObjectRequest(input)
	err := req.Send()
	return out, err
}

const opAttachPolicy = "AttachPolicy"

// AttachPolicyRequest generates a "aws/request.Request" representing the
// client's request for the AttachPolicy operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See AttachPolicy for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the AttachPolicy method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the AttachPolicyRequest method.
//    req, resp := client.AttachPolicyRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachPolicy
func (c *CloudDirectory) AttachPolicyRequest(input *AttachPolicyInput) (req *request.Request, output *AttachPolicyOutput) {
	op := &request.Operation{
		Name:       opAttachPolicy,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/policy/attach",
	}

	if input == nil {
		input = &AttachPolicyInput{}
	}

	output = &AttachPolicyOutput{}
	req = c.newRequest(op, input, output)
	return
}

// AttachPolicy API operation for Amazon CloudDirectory.
//
// Attaches a policy object to a regular object. An object can have a limited
// number of attached policies.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation AttachPolicy for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeNotPolicyException "NotPolicyException"
//   Indicates the requested operation can only operate on policy objects.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachPolicy
func (c *CloudDirectory) AttachPolicy(input *AttachPolicyInput) (*AttachPolicyOutput, error) {
	req, out := c.AttachPolicyRequest(input)
	err := req.Send()
	return out, err
}

const opAttachToIndex = "AttachToIndex"

// AttachToIndexRequest generates a "aws/request.Request" representing the
// client's request for the AttachToIndex operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See AttachToIndex for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the AttachToIndex method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the AttachToIndexRequest method.
//    req, resp := client.AttachToIndexRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachToIndex
func (c *CloudDirectory) AttachToIndexRequest(input *AttachToIndexInput) (req *request.Request, output *AttachToIndexOutput) {
	op := &request.Operation{
		Name:       opAttachToIndex,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/index/attach",
	}

	if input == nil {
		input = &AttachToIndexInput{}
	}

	output = &AttachToIndexOutput{}
	req = c.newRequest(op, input, output)
	return
}

// AttachToIndex API operation for Amazon CloudDirectory.
//
// Attaches the specified object to the specified index.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation AttachToIndex for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeLinkNameAlreadyInUseException "LinkNameAlreadyInUseException"
//   Indicates that a link could not be created due to a naming conflict. Choose
//   a different name and then try again.
//
//   * ErrCodeIndexedAttributeMissingException "IndexedAttributeMissingException"
//   An object has been attempted to be attached to an object that does not have
//   the appropriate attribute value.
//
//   * ErrCodeNotIndexException "NotIndexException"
//   Indicates the requested operation can only operate on index objects.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachToIndex
func (c *CloudDirectory) AttachToIndex(input *AttachToIndexInput) (*AttachToIndexOutput, error) {
	req, out := c.AttachToIndexRequest(input)
	err := req.Send()
	return out, err
}

const opBatchRead = "BatchRead"

// BatchReadRequest generates a "aws/request.Request" representing the
// client's request for the BatchRead operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See BatchRead for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the BatchRead method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the BatchReadRequest method.
//    req, resp := client.BatchReadRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchRead
func (c *CloudDirectory) BatchReadRequest(input *BatchReadInput) (req *request.Request, output *BatchReadOutput) {
	op := &request.Operation{
		Name:       opBatchRead,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/batchread",
	}

	if input == nil {
		input = &BatchReadInput{}
	}

	output = &BatchReadOutput{}
	req = c.newRequest(op, input, output)
	return
}

// BatchRead API operation for Amazon CloudDirectory.
//
// Performs all the read operations in a batch.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation BatchRead for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchRead
func (c *CloudDirectory) BatchRead(input *BatchReadInput) (*BatchReadOutput, error) {
	req, out := c.BatchReadRequest(input)
	err := req.Send()
	return out, err
}

const opBatchWrite = "BatchWrite"

// BatchWriteRequest generates a "aws/request.Request" representing the
// client's request for the BatchWrite operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See BatchWrite for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the BatchWrite method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the BatchWriteRequest method.
//    req, resp := client.BatchWriteRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchWrite
func (c *CloudDirectory) BatchWriteRequest(input *BatchWriteInput) (req *request.Request, output *BatchWriteOutput) {
	op := &request.Operation{
		Name:       opBatchWrite,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/batchwrite",
	}

	if input == nil {
		input = &BatchWriteInput{}
	}

	output = &BatchWriteOutput{}
	req = c.newRequest(op, input, output)
	return
}

// BatchWrite API operation for Amazon CloudDirectory.
//
// Performs all the write operations in a batch. Either all the operations succeed
// or none. Batch writes supports only object-related operations.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation BatchWrite for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeBatchWriteException "BatchWriteException"
//   A BatchWrite exception has occurred.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchWrite
func (c *CloudDirectory) BatchWrite(input *BatchWriteInput) (*BatchWriteOutput, error) {
	req, out := c.BatchWriteRequest(input)
	err := req.Send()
	return out, err
}

const opCreateDirectory = "CreateDirectory"

// CreateDirectoryRequest generates a "aws/request.Request" representing the
// client's request for the CreateDirectory operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateDirectory for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateDirectory method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the CreateDirectoryRequest method.
//    req, resp := client.CreateDirectoryRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateDirectory
func (c *CloudDirectory) CreateDirectoryRequest(input *CreateDirectoryInput) (req *request.Request, output *CreateDirectoryOutput) {
	op := &request.Operation{
		Name:       opCreateDirectory,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/directory/create",
	}

	if input == nil {
		input = &CreateDirectoryInput{}
	}

	output = &CreateDirectoryOutput{}
	req = c.newRequest(op, input, output)
	return
}

// CreateDirectory API operation for Amazon CloudDirectory.
//
// Creates a Directory by copying the published schema into the directory. A
// directory cannot be created without a schema.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation CreateDirectory for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryAlreadyExistsException "DirectoryAlreadyExistsException"
//   Indicates that a Directory could not be created due to a naming conflict.
//   Choose a different name and try again.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateDirectory
func (c *CloudDirectory) CreateDirectory(input *CreateDirectoryInput) (*CreateDirectoryOutput, error) {
	req, out := c.CreateDirectoryRequest(input)
	err := req.Send()
	return out, err
}

const opCreateFacet = "CreateFacet"

// CreateFacetRequest generates a "aws/request.Request" representing the
// client's request for the CreateFacet operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateFacet for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateFacet method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the CreateFacetRequest method.
//    req, resp := client.CreateFacetRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateFacet
func (c *CloudDirectory) CreateFacetRequest(input *CreateFacetInput) (req *request.Request, output *CreateFacetOutput) {
	op := &request.Operation{
		Name:       opCreateFacet,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/facet/create",
	}

	if input == nil {
		input = &CreateFacetInput{}
	}

	output = &CreateFacetOutput{}
	req = c.newRequest(op, input, output)
	return
}

// CreateFacet API operation for Amazon CloudDirectory.
//
// Creates a new Facet in a schema. Facet creation is allowed only in development
// or applied schemas.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation CreateFacet for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeFacetAlreadyExistsException "FacetAlreadyExistsException"
//   A facet with the same name already exists.
//
//   * ErrCodeInvalidRuleException "InvalidRuleException"
//   Occurs when any of the rule parameter keys or values are invalid.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateFacet
func (c *CloudDirectory) CreateFacet(input *CreateFacetInput) (*CreateFacetOutput, error) {
	req, out := c.CreateFacetRequest(input)
	err := req.Send()
	return out, err
}

const opCreateIndex = "CreateIndex"

// CreateIndexRequest generates a "aws/request.Request" representing the
// client's request for the CreateIndex operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateIndex for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateIndex method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the CreateIndexRequest method.
//    req, resp := client.CreateIndexRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateIndex
func (c *CloudDirectory) CreateIndexRequest(input *CreateIndexInput) (req *request.Request, output *CreateIndexOutput) {
	op := &request.Operation{
		Name:       opCreateIndex,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/index",
	}

	if input == nil {
		input = &CreateIndexInput{}
	}

	output = &CreateIndexOutput{}
	req = c.newRequest(op, input, output)
	return
}

// CreateIndex API operation for Amazon CloudDirectory.
//
// Creates an index object. See Indexing (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_indexing.html)
// for more information.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation CreateIndex for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeFacetValidationException "FacetValidationException"
//   The Facet you provided was not well formed or could not be validated with
//   the schema.
//
//   * ErrCodeLinkNameAlreadyInUseException "LinkNameAlreadyInUseException"
//   Indicates that a link could not be created due to a naming conflict. Choose
//   a different name and then try again.
//
//   * ErrCodeUnsupportedIndexTypeException "UnsupportedIndexTypeException"
//   Indicates the requested index type is not supported.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateIndex
func (c *CloudDirectory) CreateIndex(input *CreateIndexInput) (*CreateIndexOutput, error) {
	req, out := c.CreateIndexRequest(input)
	err := req.Send()
	return out, err
}

const opCreateObject = "CreateObject"

// CreateObjectRequest generates a "aws/request.Request" representing the
// client's request for the CreateObject operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateObject for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateObject method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the CreateObjectRequest method.
//    req, resp := client.CreateObjectRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateObject
func (c *CloudDirectory) CreateObjectRequest(input *CreateObjectInput) (req *request.Request, output *CreateObjectOutput) {
	op := &request.Operation{
		Name:       opCreateObject,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object",
	}

	if input == nil {
		input = &CreateObjectInput{}
	}

	output = &CreateObjectOutput{}
	req = c.newRequest(op, input, output)
	return
}

// CreateObject API operation for Amazon CloudDirectory.
//
// Creates an object in a Directory. Additionally attaches the object to a parent,
// if a parent reference and LinkName is specified. An object is simply a collection
// of Facet attributes. You can also use this API call to create a policy object,
// if the facet from which you create the object is a policy facet.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation CreateObject for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeFacetValidationException "FacetValidationException"
//   The Facet you provided was not well formed or could not be validated with
//   the schema.
//
//   * ErrCodeLinkNameAlreadyInUseException "LinkNameAlreadyInUseException"
//   Indicates that a link could not be created due to a naming conflict. Choose
//   a different name and then try again.
//
//   * ErrCodeUnsupportedIndexTypeException "UnsupportedIndexTypeException"
//   Indicates the requested index type is not supported.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateObject
func (c *CloudDirectory) CreateObject(input *CreateObjectInput) (*CreateObjectOutput, error) {
	req, out := c.CreateObjectRequest(input)
	err := req.Send()
	return out, err
}

const opCreateSchema = "CreateSchema"

// CreateSchemaRequest generates a "aws/request.Request" representing the
// client's request for the CreateSchema operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateSchema for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateSchema method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the CreateSchemaRequest method.
//    req, resp := client.CreateSchemaRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateSchema
func (c *CloudDirectory) CreateSchemaRequest(input *CreateSchemaInput) (req *request.Request, output *CreateSchemaOutput) {
	op := &request.Operation{
		Name:       opCreateSchema,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/schema/create",
	}

	if input == nil {
		input = &CreateSchemaInput{}
	}

	output = &CreateSchemaOutput{}
	req = c.newRequest(op, input, output)
	return
}

// CreateSchema API operation for Amazon CloudDirectory.
//
// Creates a new schema in a development state. A schema can exist in three
// phases:
//
//    * Development: This is a mutable phase of the schema. All new schemas
//    are in the development phase. Once the schema is finalized, it can be
//    published.
//
//    * Published: Published schemas are immutable and have a version associated
//    with them.
//
//    * Applied: Applied schemas are mutable in a way that allows you to add
//    new schema facets. You can also add new, nonrequired attributes to existing
//    schema facets. You can apply only published schemas to directories.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation CreateSchema for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeSchemaAlreadyExistsException "SchemaAlreadyExistsException"
//   Indicates that a schema could not be created due to a naming conflict. Please
//   select a different name and then try again.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateSchema
func (c *CloudDirectory) CreateSchema(input *CreateSchemaInput) (*CreateSchemaOutput, error) {
	req, out := c.CreateSchemaRequest(input)
	err := req.Send()
	return out, err
}

const opDeleteDirectory = "DeleteDirectory"

// DeleteDirectoryRequest generates a "aws/request.Request" representing the
// client's request for the DeleteDirectory operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteDirectory for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteDirectory method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the DeleteDirectoryRequest method.
//    req, resp := client.DeleteDirectoryRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteDirectory
func (c *CloudDirectory) DeleteDirectoryRequest(input *DeleteDirectoryInput) (req *request.Request, output *DeleteDirectoryOutput) {
	op := &request.Operation{
		Name:       opDeleteDirectory,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/directory",
	}

	if input == nil {
		input = &DeleteDirectoryInput{}
	}

	output = &DeleteDirectoryOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DeleteDirectory API operation for Amazon CloudDirectory.
//
// Deletes a directory. Only disabled directories can be deleted. A deleted
// directory cannot be undone. Exercise extreme caution when deleting directories.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation DeleteDirectory for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeDirectoryNotDisabledException "DirectoryNotDisabledException"
//   An operation can only operate on a disabled directory.
//
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryDeletedException "DirectoryDeletedException"
//   A directory that has been deleted has been attempted to be accessed. Note:
//   The requested resource will eventually cease to exist.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteDirectory
func (c *CloudDirectory) DeleteDirectory(input *DeleteDirectoryInput) (*DeleteDirectoryOutput, error) {
	req, out := c.DeleteDirectoryRequest(input)
	err := req.Send()
	return out, err
}

const opDeleteFacet = "DeleteFacet"

// DeleteFacetRequest generates a "aws/request.Request" representing the
// client's request for the DeleteFacet operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteFacet for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteFacet method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the DeleteFacetRequest method.
//    req, resp := client.DeleteFacetRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteFacet
func (c *CloudDirectory) DeleteFacetRequest(input *DeleteFacetInput) (req *request.Request, output *DeleteFacetOutput) {
	op := &request.Operation{
		Name:       opDeleteFacet,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/facet/delete",
	}

	if input == nil {
		input = &DeleteFacetInput{}
	}

	output = &DeleteFacetOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DeleteFacet API operation for Amazon CloudDirectory.
//
// Deletes a given Facet. All attributes and Rules associated with the facet
// will be deleted. Only development schema facets are allowed deletion.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation DeleteFacet for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeFacetNotFoundException "FacetNotFoundException"
//   The specified Facet could not be found.
//
//   * ErrCodeFacetInUseException "FacetInUseException"
//   Occurs when deleting a facet that contains an attribute which is a target
//   to an attribute reference in a different facet.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteFacet
func (c *CloudDirectory) DeleteFacet(input *DeleteFacetInput) (*DeleteFacetOutput, error) {
	req, out := c.DeleteFacetRequest(input)
	err := req.Send()
	return out, err
}

const opDeleteObject = "DeleteObject"

// DeleteObjectRequest generates a "aws/request.Request" representing the
// client's request for the DeleteObject operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteObject for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteObject method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the DeleteObjectRequest method.
//    req, resp := client.DeleteObjectRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteObject
func (c *CloudDirectory) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
	op := &request.Operation{
		Name:       opDeleteObject,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object/delete",
	}

	if input == nil {
		input = &DeleteObjectInput{}
	}

	output = &DeleteObjectOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DeleteObject API operation for Amazon CloudDirectory.
//
// Deletes an object and its associated attributes. Only objects with no children
// and no parents can be deleted.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation DeleteObject for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeObjectNotDetachedException "ObjectNotDetachedException"
//   Indicates the requested operation cannot be completed because the object
//   has not been detached from the tree.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteObject
func (c *CloudDirectory) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
	req, out := c.DeleteObjectRequest(input)
	err := req.Send()
	return out, err
}

const opDeleteSchema = "DeleteSchema"

// DeleteSchemaRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSchema operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteSchema for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteSchema method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the DeleteSchemaRequest method.
//    req, resp := client.DeleteSchemaRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteSchema
func (c *CloudDirectory) DeleteSchemaRequest(input *DeleteSchemaInput) (req *request.Request, output *DeleteSchemaOutput) {
	op := &request.Operation{
		Name:       opDeleteSchema,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/schema",
	}

	if input == nil {
		input = &DeleteSchemaInput{}
	}

	output = &DeleteSchemaOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DeleteSchema API operation for Amazon CloudDirectory.
//
// Deletes a given schema. Schemas in a development and published state can
// only be deleted.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation DeleteSchema for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeStillContainsLinksException "StillContainsLinksException"
//   The object could not be deleted because links still exist. Remove the links
//   and then try the operation again.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteSchema
func (c *CloudDirectory) DeleteSchema(input *DeleteSchemaInput) (*DeleteSchemaOutput, error) {
	req, out := c.DeleteSchemaRequest(input)
	err := req.Send()
	return out, err
}

const opDetachFromIndex = "DetachFromIndex"

// DetachFromIndexRequest generates a "aws/request.Request" representing the
// client's request for the DetachFromIndex operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DetachFromIndex for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DetachFromIndex method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the DetachFromIndexRequest method.
//    req, resp := client.DetachFromIndexRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachFromIndex
func (c *CloudDirectory) DetachFromIndexRequest(input *DetachFromIndexInput) (req *request.Request, output *DetachFromIndexOutput) {
	op := &request.Operation{
		Name:       opDetachFromIndex,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/index/detach",
	}

	if input == nil {
		input = &DetachFromIndexInput{}
	}

	output = &DetachFromIndexOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DetachFromIndex API operation for Amazon CloudDirectory.
//
// Detaches the specified object from the specified index.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation DetachFromIndex for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeObjectAlreadyDetachedException "ObjectAlreadyDetachedException"
//   Indicates the object is not attached to the index.
//
//   * ErrCodeNotIndexException "NotIndexException"
//   Indicates the requested operation can only operate on index objects.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachFromIndex
func (c *CloudDirectory) DetachFromIndex(input *DetachFromIndexInput) (*DetachFromIndexOutput, error) {
	req, out := c.DetachFromIndexRequest(input)
	err := req.Send()
	return out, err
}

const opDetachObject = "DetachObject"

// DetachObjectRequest generates a "aws/request.Request" representing the
// client's request for the DetachObject operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DetachObject for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DetachObject method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the DetachObjectRequest method.
//    req, resp := client.DetachObjectRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachObject
func (c *CloudDirectory) DetachObjectRequest(input *DetachObjectInput) (req *request.Request, output *DetachObjectOutput) {
	op := &request.Operation{
		Name:       opDetachObject,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object/detach",
	}

	if input == nil {
		input = &DetachObjectInput{}
	}

	output = &DetachObjectOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DetachObject API operation for Amazon CloudDirectory.
//
// Detaches a given object from the parent object. The object that is to be
// detached from the parent is specified by the link name.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation DetachObject for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachObject
func (c *CloudDirectory) DetachObject(input *DetachObjectInput) (*DetachObjectOutput, error) {
	req, out := c.DetachObjectRequest(input)
	err := req.Send()
	return out, err
}

const opDetachPolicy = "DetachPolicy"

// DetachPolicyRequest generates a "aws/request.Request" representing the
// client's request for the DetachPolicy operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DetachPolicy for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DetachPolicy method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the DetachPolicyRequest method.
//    req, resp := client.DetachPolicyRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachPolicy
func (c *CloudDirectory) DetachPolicyRequest(input *DetachPolicyInput) (req *request.Request, output *DetachPolicyOutput) {
	op := &request.Operation{
		Name:       opDetachPolicy,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/policy/detach",
	}

	if input == nil {
		input = &DetachPolicyInput{}
	}

	output = &DetachPolicyOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DetachPolicy API operation for Amazon CloudDirectory.
//
// Detaches a policy from an object.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation DetachPolicy for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeNotPolicyException "NotPolicyException"
//   Indicates the requested operation can only operate on policy objects.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachPolicy
func (c *CloudDirectory) DetachPolicy(input *DetachPolicyInput) (*DetachPolicyOutput, error) {
	req, out := c.DetachPolicyRequest(input)
	err := req.Send()
	return out, err
}

const opDisableDirectory = "DisableDirectory"

// DisableDirectoryRequest generates a "aws/request.Request" representing the
// client's request for the DisableDirectory operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DisableDirectory for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DisableDirectory method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the DisableDirectoryRequest method.
//    req, resp := client.DisableDirectoryRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DisableDirectory
func (c *CloudDirectory) DisableDirectoryRequest(input *DisableDirectoryInput) (req *request.Request, output *DisableDirectoryOutput) {
	op := &request.Operation{
		Name:       opDisableDirectory,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/directory/disable",
	}

	if input == nil {
		input = &DisableDirectoryInput{}
	}

	output = &DisableDirectoryOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DisableDirectory API operation for Amazon CloudDirectory.
//
// Disables the specified directory. Disabled directories cannot be read or
// written to. Only enabled directories can be disabled. Disabled directories
// may be reenabled.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation DisableDirectory for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeDirectoryDeletedException "DirectoryDeletedException"
//   A directory that has been deleted has been attempted to be accessed. Note:
//   The requested resource will eventually cease to exist.
//
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DisableDirectory
func (c *CloudDirectory) DisableDirectory(input *DisableDirectoryInput) (*DisableDirectoryOutput, error) {
	req, out := c.DisableDirectoryRequest(input)
	err := req.Send()
	return out, err
}

const opEnableDirectory = "EnableDirectory"

// EnableDirectoryRequest generates a "aws/request.Request" representing the
// client's request for the EnableDirectory operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See EnableDirectory for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the EnableDirectory method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the EnableDirectoryRequest method.
//    req, resp := client.EnableDirectoryRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/EnableDirectory
func (c *CloudDirectory) EnableDirectoryRequest(input *EnableDirectoryInput) (req *request.Request, output *EnableDirectoryOutput) {
	op := &request.Operation{
		Name:       opEnableDirectory,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/directory/enable",
	}

	if input == nil {
		input = &EnableDirectoryInput{}
	}

	output = &EnableDirectoryOutput{}
	req = c.newRequest(op, input, output)
	return
}

// EnableDirectory API operation for Amazon CloudDirectory.
//
// Enables the specified directory. Only disabled directories can be enabled.
// Once enabled, the directory can then be read and written to.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation EnableDirectory for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeDirectoryDeletedException "DirectoryDeletedException"
//   A directory that has been deleted has been attempted to be accessed. Note:
//   The requested resource will eventually cease to exist.
//
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/EnableDirectory
func (c *CloudDirectory) EnableDirectory(input *EnableDirectoryInput) (*EnableDirectoryOutput, error) {
	req, out := c.EnableDirectoryRequest(input)
	err := req.Send()
	return out, err
}

const opGetDirectory = "GetDirectory"

// GetDirectoryRequest generates a "aws/request.Request" representing the
// client's request for the GetDirectory operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See GetDirectory for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetDirectory method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the GetDirectoryRequest method.
//    req, resp := client.GetDirectoryRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetDirectory
func (c *CloudDirectory) GetDirectoryRequest(input *GetDirectoryInput) (req *request.Request, output *GetDirectoryOutput) {
	op := &request.Operation{
		Name:       opGetDirectory,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/directory/get",
	}

	if input == nil {
		input = &GetDirectoryInput{}
	}

	output = &GetDirectoryOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetDirectory API operation for Amazon CloudDirectory.
//
// Retrieves metadata about a directory.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation GetDirectory for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetDirectory
func (c *CloudDirectory) GetDirectory(input *GetDirectoryInput) (*GetDirectoryOutput, error) {
	req, out := c.GetDirectoryRequest(input)
	err := req.Send()
	return out, err
}

const opGetFacet = "GetFacet"

// GetFacetRequest generates a "aws/request.Request" representing the
// client's request for the GetFacet operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See GetFacet for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetFacet method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the GetFacetRequest method.
//    req, resp := client.GetFacetRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetFacet
func (c *CloudDirectory) GetFacetRequest(input *GetFacetInput) (req *request.Request, output *GetFacetOutput) {
	op := &request.Operation{
		Name:       opGetFacet,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/facet",
	}

	if input == nil {
		input = &GetFacetInput{}
	}

	output = &GetFacetOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetFacet API operation for Amazon CloudDirectory.
//
// Gets details of the Facet, such as Facet Name, Attributes, Rules, or ObjectType.
// You can call this on all kinds of schema facets -- published, development,
// or applied.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation GetFacet for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeFacetNotFoundException "FacetNotFoundException"
//   The specified Facet could not be found.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetFacet
func (c *CloudDirectory) GetFacet(input *GetFacetInput) (*GetFacetOutput, error) {
	req, out := c.GetFacetRequest(input)
	err := req.Send()
	return out, err
}

const opGetObjectInformation = "GetObjectInformation"

// GetObjectInformationRequest generates a "aws/request.Request" representing the
// client's request for the GetObjectInformation operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See GetObjectInformation for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetObjectInformation method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the GetObjectInformationRequest method.
//    req, resp := client.GetObjectInformationRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetObjectInformation
func (c *CloudDirectory) GetObjectInformationRequest(input *GetObjectInformationInput) (req *request.Request, output *GetObjectInformationOutput) {
	op := &request.Operation{
		Name:       opGetObjectInformation,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object/information",
	}

	if input == nil {
		input = &GetObjectInformationInput{}
	}

	output = &GetObjectInformationOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetObjectInformation API operation for Amazon CloudDirectory.
//
// Retrieves metadata about an object.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation GetObjectInformation for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetObjectInformation
func (c *CloudDirectory) GetObjectInformation(input *GetObjectInformationInput) (*GetObjectInformationOutput, error) {
	req, out := c.GetObjectInformationRequest(input)
	err := req.Send()
	return out, err
}

const opGetSchemaAsJson = "GetSchemaAsJson"

// GetSchemaAsJsonRequest generates a "aws/request.Request" representing the
// client's request for the GetSchemaAsJson operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See GetSchemaAsJson for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetSchemaAsJson method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the GetSchemaAsJsonRequest method.
//    req, resp := client.GetSchemaAsJsonRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetSchemaAsJson
func (c *CloudDirectory) GetSchemaAsJsonRequest(input *GetSchemaAsJsonInput) (req *request.Request, output *GetSchemaAsJsonOutput) {
	op := &request.Operation{
		Name:       opGetSchemaAsJson,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/schema/json",
	}

	if input == nil {
		input = &GetSchemaAsJsonInput{}
	}

	output = &GetSchemaAsJsonOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetSchemaAsJson API operation for Amazon CloudDirectory.
//
// Retrieves a JSON representation of the schema. See JSON Schema Format (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_schemas.html#jsonformat)
// for more information.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation GetSchemaAsJson for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetSchemaAsJson
func (c *CloudDirectory) GetSchemaAsJson(input *GetSchemaAsJsonInput) (*GetSchemaAsJsonOutput, error) {
	req, out := c.GetSchemaAsJsonRequest(input)
	err := req.Send()
	return out, err
}

const opListAppliedSchemaArns = "ListAppliedSchemaArns"

// ListAppliedSchemaArnsRequest generates a "aws/request.Request" representing the
// client's request for the ListAppliedSchemaArns operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListAppliedSchemaArns for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListAppliedSchemaArns method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListAppliedSchemaArnsRequest method.
//    req, resp := client.ListAppliedSchemaArnsRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListAppliedSchemaArns
func (c *CloudDirectory) ListAppliedSchemaArnsRequest(input *ListAppliedSchemaArnsInput) (req *request.Request, output *ListAppliedSchemaArnsOutput) {
	op := &request.Operation{
		Name:       opListAppliedSchemaArns,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/schema/applied",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListAppliedSchemaArnsInput{}
	}

	output = &ListAppliedSchemaArnsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListAppliedSchemaArns API operation for Amazon CloudDirectory.
//
// Lists schemas applied to a directory.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListAppliedSchemaArns for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
//   Indicates that the NextToken value is not valid.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListAppliedSchemaArns
func (c *CloudDirectory) ListAppliedSchemaArns(input *ListAppliedSchemaArnsInput) (*ListAppliedSchemaArnsOutput, error) {
	req, out := c.ListAppliedSchemaArnsRequest(input)
	err := req.Send()
	return out, err
}

// ListAppliedSchemaArnsPages iterates over the pages of a ListAppliedSchemaArns operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListAppliedSchemaArns method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListAppliedSchemaArns operation.
//    pageNum := 0
//    err := client.ListAppliedSchemaArnsPages(params,
//        func(page *ListAppliedSchemaArnsOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListAppliedSchemaArnsPages(input *ListAppliedSchemaArnsInput, fn func(p *ListAppliedSchemaArnsOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListAppliedSchemaArnsRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListAppliedSchemaArnsOutput), lastPage)
	})
}

const opListAttachedIndices = "ListAttachedIndices"

// ListAttachedIndicesRequest generates a "aws/request.Request" representing the
// client's request for the ListAttachedIndices operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListAttachedIndices for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListAttachedIndices method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListAttachedIndicesRequest method.
//    req, resp := client.ListAttachedIndicesRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListAttachedIndices
func (c *CloudDirectory) ListAttachedIndicesRequest(input *ListAttachedIndicesInput) (req *request.Request, output *ListAttachedIndicesOutput) {
	op := &request.Operation{
		Name:       opListAttachedIndices,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object/indices",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListAttachedIndicesInput{}
	}

	output = &ListAttachedIndicesOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListAttachedIndices API operation for Amazon CloudDirectory.
//
// Lists indices attached to an object.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListAttachedIndices for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListAttachedIndices
func (c *CloudDirectory) ListAttachedIndices(input *ListAttachedIndicesInput) (*ListAttachedIndicesOutput, error) {
	req, out := c.ListAttachedIndicesRequest(input)
	err := req.Send()
	return out, err
}

// ListAttachedIndicesPages iterates over the pages of a ListAttachedIndices operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListAttachedIndices method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListAttachedIndices operation.
//    pageNum := 0
//    err := client.ListAttachedIndicesPages(params,
//        func(page *ListAttachedIndicesOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListAttachedIndicesPages(input *ListAttachedIndicesInput, fn func(p *ListAttachedIndicesOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListAttachedIndicesRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListAttachedIndicesOutput), lastPage)
	})
}

const opListDevelopmentSchemaArns = "ListDevelopmentSchemaArns"

// ListDevelopmentSchemaArnsRequest generates a "aws/request.Request" representing the
// client's request for the ListDevelopmentSchemaArns operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListDevelopmentSchemaArns for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListDevelopmentSchemaArns method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListDevelopmentSchemaArnsRequest method.
//    req, resp := client.ListDevelopmentSchemaArnsRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListDevelopmentSchemaArns
func (c *CloudDirectory) ListDevelopmentSchemaArnsRequest(input *ListDevelopmentSchemaArnsInput) (req *request.Request, output *ListDevelopmentSchemaArnsOutput) {
	op := &request.Operation{
		Name:       opListDevelopmentSchemaArns,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/schema/development",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListDevelopmentSchemaArnsInput{}
	}

	output = &ListDevelopmentSchemaArnsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListDevelopmentSchemaArns API operation for Amazon CloudDirectory.
//
// Retrieves the ARNs of schemas in the development state.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListDevelopmentSchemaArns for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
//   Indicates that the NextToken value is not valid.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListDevelopmentSchemaArns
func (c *CloudDirectory) ListDevelopmentSchemaArns(input *ListDevelopmentSchemaArnsInput) (*ListDevelopmentSchemaArnsOutput, error) {
	req, out := c.ListDevelopmentSchemaArnsRequest(input)
	err := req.Send()
	return out, err
}

// ListDevelopmentSchemaArnsPages iterates over the pages of a ListDevelopmentSchemaArns operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListDevelopmentSchemaArns method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListDevelopmentSchemaArns operation.
//    pageNum := 0
//    err := client.ListDevelopmentSchemaArnsPages(params,
//        func(page *ListDevelopmentSchemaArnsOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListDevelopmentSchemaArnsPages(input *ListDevelopmentSchemaArnsInput, fn func(p *ListDevelopmentSchemaArnsOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListDevelopmentSchemaArnsRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListDevelopmentSchemaArnsOutput), lastPage)
	})
}

const opListDirectories = "ListDirectories"

// ListDirectoriesRequest generates a "aws/request.Request" representing the
// client's request for the ListDirectories operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListDirectories for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListDirectories method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListDirectoriesRequest method.
//    req, resp := client.ListDirectoriesRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListDirectories
func (c *CloudDirectory) ListDirectoriesRequest(input *ListDirectoriesInput) (req *request.Request, output *ListDirectoriesOutput) {
	op := &request.Operation{
		Name:       opListDirectories,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/directory/list",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListDirectoriesInput{}
	}

	output = &ListDirectoriesOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListDirectories API operation for Amazon CloudDirectory.
//
// Lists directories created within an account.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListDirectories for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
//   Indicates that the NextToken value is not valid.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListDirectories
func (c *CloudDirectory) ListDirectories(input *ListDirectoriesInput) (*ListDirectoriesOutput, error) {
	req, out := c.ListDirectoriesRequest(input)
	err := req.Send()
	return out, err
}

// ListDirectoriesPages iterates over the pages of a ListDirectories operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListDirectories method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListDirectories operation.
//    pageNum := 0
//    err := client.ListDirectoriesPages(params,
//        func(page *ListDirectoriesOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListDirectoriesPages(input *ListDirectoriesInput, fn func(p *ListDirectoriesOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListDirectoriesRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListDirectoriesOutput), lastPage)
	})
}

const opListFacetAttributes = "ListFacetAttributes"

// ListFacetAttributesRequest generates a "aws/request.Request" representing the
// client's request for the ListFacetAttributes operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListFacetAttributes for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListFacetAttributes method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListFacetAttributesRequest method.
//    req, resp := client.ListFacetAttributesRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListFacetAttributes
func (c *CloudDirectory) ListFacetAttributesRequest(input *ListFacetAttributesInput) (req *request.Request, output *ListFacetAttributesOutput) {
	op := &request.Operation{
		Name:       opListFacetAttributes,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/facet/attributes",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListFacetAttributesInput{}
	}

	output = &ListFacetAttributesOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListFacetAttributes API operation for Amazon CloudDirectory.
//
// Retrieves attributes attached to the facet.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListFacetAttributes for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeFacetNotFoundException "FacetNotFoundException"
//   The specified Facet could not be found.
//
//   * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
//   Indicates that the NextToken value is not valid.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListFacetAttributes
func (c *CloudDirectory) ListFacetAttributes(input *ListFacetAttributesInput) (*ListFacetAttributesOutput, error) {
	req, out := c.ListFacetAttributesRequest(input)
	err := req.Send()
	return out, err
}

// ListFacetAttributesPages iterates over the pages of a ListFacetAttributes operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListFacetAttributes method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListFacetAttributes operation.
//    pageNum := 0
//    err := client.ListFacetAttributesPages(params,
//        func(page *ListFacetAttributesOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListFacetAttributesPages(input *ListFacetAttributesInput, fn func(p *ListFacetAttributesOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListFacetAttributesRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListFacetAttributesOutput), lastPage)
	})
}

const opListFacetNames = "ListFacetNames"

// ListFacetNamesRequest generates a "aws/request.Request" representing the
// client's request for the ListFacetNames operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListFacetNames for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListFacetNames method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListFacetNamesRequest method.
//    req, resp := client.ListFacetNamesRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListFacetNames
func (c *CloudDirectory) ListFacetNamesRequest(input *ListFacetNamesInput) (req *request.Request, output *ListFacetNamesOutput) {
	op := &request.Operation{
		Name:       opListFacetNames,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/facet/list",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListFacetNamesInput{}
	}

	output = &ListFacetNamesOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListFacetNames API operation for Amazon CloudDirectory.
//
// Retrieves the names of facets that exist in a schema.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListFacetNames for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
//   Indicates that the NextToken value is not valid.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListFacetNames
func (c *CloudDirectory) ListFacetNames(input *ListFacetNamesInput) (*ListFacetNamesOutput, error) {
	req, out := c.ListFacetNamesRequest(input)
	err := req.Send()
	return out, err
}

// ListFacetNamesPages iterates over the pages of a ListFacetNames operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListFacetNames method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListFacetNames operation.
//    pageNum := 0
//    err := client.ListFacetNamesPages(params,
//        func(page *ListFacetNamesOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListFacetNamesPages(input *ListFacetNamesInput, fn func(p *ListFacetNamesOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListFacetNamesRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListFacetNamesOutput), lastPage)
	})
}

const opListIndex = "ListIndex"

// ListIndexRequest generates a "aws/request.Request" representing the
// client's request for the ListIndex operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListIndex for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListIndex method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListIndexRequest method.
//    req, resp := client.ListIndexRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListIndex
func (c *CloudDirectory) ListIndexRequest(input *ListIndexInput) (req *request.Request, output *ListIndexOutput) {
	op := &request.Operation{
		Name:       opListIndex,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/index/targets",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListIndexInput{}
	}

	output = &ListIndexOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListIndex API operation for Amazon CloudDirectory.
//
// Lists objects attached to the specified index.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListIndex for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeNotIndexException "NotIndexException"
//   Indicates the requested operation can only operate on index objects.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListIndex
func (c *CloudDirectory) ListIndex(input *ListIndexInput) (*ListIndexOutput, error) {
	req, out := c.ListIndexRequest(input)
	err := req.Send()
	return out, err
}

// ListIndexPages iterates over the pages of a ListIndex operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListIndex method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListIndex operation.
//    pageNum := 0
//    err := client.ListIndexPages(params,
//        func(page *ListIndexOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListIndexPages(input *ListIndexInput, fn func(p *ListIndexOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListIndexRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListIndexOutput), lastPage)
	})
}

const opListObjectAttributes = "ListObjectAttributes"

// ListObjectAttributesRequest generates a "aws/request.Request" representing the
// client's request for the ListObjectAttributes operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListObjectAttributes for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListObjectAttributes method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListObjectAttributesRequest method.
//    req, resp := client.ListObjectAttributesRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectAttributes
func (c *CloudDirectory) ListObjectAttributesRequest(input *ListObjectAttributesInput) (req *request.Request, output *ListObjectAttributesOutput) {
	op := &request.Operation{
		Name:       opListObjectAttributes,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object/attributes",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListObjectAttributesInput{}
	}

	output = &ListObjectAttributesOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListObjectAttributes API operation for Amazon CloudDirectory.
//
// Lists all attributes associated with an object.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListObjectAttributes for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
//   Indicates that the NextToken value is not valid.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectAttributes
func (c *CloudDirectory) ListObjectAttributes(input *ListObjectAttributesInput) (*ListObjectAttributesOutput, error) {
	req, out := c.ListObjectAttributesRequest(input)
	err := req.Send()
	return out, err
}

// ListObjectAttributesPages iterates over the pages of a ListObjectAttributes operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListObjectAttributes method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListObjectAttributes operation.
//    pageNum := 0
//    err := client.ListObjectAttributesPages(params,
//        func(page *ListObjectAttributesOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListObjectAttributesPages(input *ListObjectAttributesInput, fn func(p *ListObjectAttributesOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListObjectAttributesRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListObjectAttributesOutput), lastPage)
	})
}

const opListObjectChildren = "ListObjectChildren"

// ListObjectChildrenRequest generates a "aws/request.Request" representing the
// client's request for the ListObjectChildren operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListObjectChildren for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListObjectChildren method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListObjectChildrenRequest method.
//    req, resp := client.ListObjectChildrenRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectChildren
func (c *CloudDirectory) ListObjectChildrenRequest(input *ListObjectChildrenInput) (req *request.Request, output *ListObjectChildrenOutput) {
	op := &request.Operation{
		Name:       opListObjectChildren,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object/children",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListObjectChildrenInput{}
	}

	output = &ListObjectChildrenOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListObjectChildren API operation for Amazon CloudDirectory.
//
// Returns a paginated list of child objects associated with a given object.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListObjectChildren for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
//   Indicates that the NextToken value is not valid.
//
//   * ErrCodeNotNodeException "NotNodeException"
//   Occurs when any invalid operations are performed on an object which is not
//   a node, such as calling ListObjectChildren for a leaf node object.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectChildren
func (c *CloudDirectory) ListObjectChildren(input *ListObjectChildrenInput) (*ListObjectChildrenOutput, error) {
	req, out := c.ListObjectChildrenRequest(input)
	err := req.Send()
	return out, err
}

// ListObjectChildrenPages iterates over the pages of a ListObjectChildren operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListObjectChildren method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListObjectChildren operation.
//    pageNum := 0
//    err := client.ListObjectChildrenPages(params,
//        func(page *ListObjectChildrenOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListObjectChildrenPages(input *ListObjectChildrenInput, fn func(p *ListObjectChildrenOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListObjectChildrenRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListObjectChildrenOutput), lastPage)
	})
}

const opListObjectParents = "ListObjectParents"

// ListObjectParentsRequest generates a "aws/request.Request" representing the
// client's request for the ListObjectParents operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListObjectParents for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListObjectParents method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListObjectParentsRequest method.
//    req, resp := client.ListObjectParentsRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectParents
func (c *CloudDirectory) ListObjectParentsRequest(input *ListObjectParentsInput) (req *request.Request, output *ListObjectParentsOutput) {
	op := &request.Operation{
		Name:       opListObjectParents,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object/parent",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListObjectParentsInput{}
	}

	output = &ListObjectParentsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListObjectParents API operation for Amazon CloudDirectory.
//
// Lists parent objects associated with a given object in pagination fashion.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListObjectParents for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
//   Indicates that the NextToken value is not valid.
//
//   * ErrCodeCannotListParentOfRootException "CannotListParentOfRootException"
//   Cannot list the parents of a Directory root.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectParents
func (c *CloudDirectory) ListObjectParents(input *ListObjectParentsInput) (*ListObjectParentsOutput, error) {
	req, out := c.ListObjectParentsRequest(input)
	err := req.Send()
	return out, err
}

// ListObjectParentsPages iterates over the pages of a ListObjectParents operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListObjectParents method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListObjectParents operation.
//    pageNum := 0
//    err := client.ListObjectParentsPages(params,
//        func(page *ListObjectParentsOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListObjectParentsPages(input *ListObjectParentsInput, fn func(p *ListObjectParentsOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListObjectParentsRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListObjectParentsOutput), lastPage)
	})
}

const opListObjectPolicies = "ListObjectPolicies"

// ListObjectPoliciesRequest generates a "aws/request.Request" representing the
// client's request for the ListObjectPolicies operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListObjectPolicies for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListObjectPolicies method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListObjectPoliciesRequest method.
//    req, resp := client.ListObjectPoliciesRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectPolicies
func (c *CloudDirectory) ListObjectPoliciesRequest(input *ListObjectPoliciesInput) (req *request.Request, output *ListObjectPoliciesOutput) {
	op := &request.Operation{
		Name:       opListObjectPolicies,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object/policy",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListObjectPoliciesInput{}
	}

	output = &ListObjectPoliciesOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListObjectPolicies API operation for Amazon CloudDirectory.
//
// Returns policies attached to an object in pagination fashion.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListObjectPolicies for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
//   Indicates that the NextToken value is not valid.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectPolicies
func (c *CloudDirectory) ListObjectPolicies(input *ListObjectPoliciesInput) (*ListObjectPoliciesOutput, error) {
	req, out := c.ListObjectPoliciesRequest(input)
	err := req.Send()
	return out, err
}

// ListObjectPoliciesPages iterates over the pages of a ListObjectPolicies operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListObjectPolicies method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListObjectPolicies operation.
//    pageNum := 0
//    err := client.ListObjectPoliciesPages(params,
//        func(page *ListObjectPoliciesOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListObjectPoliciesPages(input *ListObjectPoliciesInput, fn func(p *ListObjectPoliciesOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListObjectPoliciesRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListObjectPoliciesOutput), lastPage)
	})
}

const opListPolicyAttachments = "ListPolicyAttachments"

// ListPolicyAttachmentsRequest generates a "aws/request.Request" representing the
// client's request for the ListPolicyAttachments operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListPolicyAttachments for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListPolicyAttachments method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListPolicyAttachmentsRequest method.
//    req, resp := client.ListPolicyAttachmentsRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListPolicyAttachments
func (c *CloudDirectory) ListPolicyAttachmentsRequest(input *ListPolicyAttachmentsInput) (req *request.Request, output *ListPolicyAttachmentsOutput) {
	op := &request.Operation{
		Name:       opListPolicyAttachments,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/policy/attachment",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListPolicyAttachmentsInput{}
	}

	output = &ListPolicyAttachmentsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListPolicyAttachments API operation for Amazon CloudDirectory.
//
// Returns all of the ObjectIdentifiers to which a given policy is attached.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListPolicyAttachments for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
//   Indicates that the NextToken value is not valid.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeNotPolicyException "NotPolicyException"
//   Indicates the requested operation can only operate on policy objects.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListPolicyAttachments
func (c *CloudDirectory) ListPolicyAttachments(input *ListPolicyAttachmentsInput) (*ListPolicyAttachmentsOutput, error) {
	req, out := c.ListPolicyAttachmentsRequest(input)
	err := req.Send()
	return out, err
}

// ListPolicyAttachmentsPages iterates over the pages of a ListPolicyAttachments operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListPolicyAttachments method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListPolicyAttachments operation.
//    pageNum := 0
//    err := client.ListPolicyAttachmentsPages(params,
//        func(page *ListPolicyAttachmentsOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListPolicyAttachmentsPages(input *ListPolicyAttachmentsInput, fn func(p *ListPolicyAttachmentsOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListPolicyAttachmentsRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListPolicyAttachmentsOutput), lastPage)
	})
}

const opListPublishedSchemaArns = "ListPublishedSchemaArns"

// ListPublishedSchemaArnsRequest generates a "aws/request.Request" representing the
// client's request for the ListPublishedSchemaArns operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListPublishedSchemaArns for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListPublishedSchemaArns method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListPublishedSchemaArnsRequest method.
//    req, resp := client.ListPublishedSchemaArnsRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListPublishedSchemaArns
func (c *CloudDirectory) ListPublishedSchemaArnsRequest(input *ListPublishedSchemaArnsInput) (req *request.Request, output *ListPublishedSchemaArnsOutput) {
	op := &request.Operation{
		Name:       opListPublishedSchemaArns,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/schema/published",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListPublishedSchemaArnsInput{}
	}

	output = &ListPublishedSchemaArnsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListPublishedSchemaArns API operation for Amazon CloudDirectory.
//
// Retrieves published schema ARNs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListPublishedSchemaArns for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
//   Indicates that the NextToken value is not valid.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListPublishedSchemaArns
func (c *CloudDirectory) ListPublishedSchemaArns(input *ListPublishedSchemaArnsInput) (*ListPublishedSchemaArnsOutput, error) {
	req, out := c.ListPublishedSchemaArnsRequest(input)
	err := req.Send()
	return out, err
}

// ListPublishedSchemaArnsPages iterates over the pages of a ListPublishedSchemaArns operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListPublishedSchemaArns method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListPublishedSchemaArns operation.
//    pageNum := 0
//    err := client.ListPublishedSchemaArnsPages(params,
//        func(page *ListPublishedSchemaArnsOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListPublishedSchemaArnsPages(input *ListPublishedSchemaArnsInput, fn func(p *ListPublishedSchemaArnsOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListPublishedSchemaArnsRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListPublishedSchemaArnsOutput), lastPage)
	})
}

const opListTagsForResource = "ListTagsForResource"

// ListTagsForResourceRequest generates a "aws/request.Request" representing the
// client's request for the ListTagsForResource operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See ListTagsForResource for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListTagsForResource method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the ListTagsForResourceRequest method.
//    req, resp := client.ListTagsForResourceRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListTagsForResource
func (c *CloudDirectory) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
	op := &request.Operation{
		Name:       opListTagsForResource,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/tags",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListTagsForResourceInput{}
	}

	output = &ListTagsForResourceOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListTagsForResource API operation for Amazon CloudDirectory.
//
// Returns tags for a resource. Tagging is currently supported only for directories
// with a limit of 50 tags per directory. All 50 tags are returned for a given
// directory with this API call.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation ListTagsForResource for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeInvalidTaggingRequestException "InvalidTaggingRequestException"
//   Can occur for multiple reasons such as when you tag a resource that doesn’t
//   exist or if you specify a higher number of tags for a resource than the allowed
//   limit. Allowed limit is 50 tags per resource.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListTagsForResource
func (c *CloudDirectory) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
	req, out := c.ListTagsForResourceRequest(input)
	err := req.Send()
	return out, err
}

// ListTagsForResourcePages iterates over the pages of a ListTagsForResource operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListTagsForResource method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a ListTagsForResource operation.
//    pageNum := 0
//    err := client.ListTagsForResourcePages(params,
//        func(page *ListTagsForResourceOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) ListTagsForResourcePages(input *ListTagsForResourceInput, fn func(p *ListTagsForResourceOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.ListTagsForResourceRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*ListTagsForResourceOutput), lastPage)
	})
}

const opLookupPolicy = "LookupPolicy"

// LookupPolicyRequest generates a "aws/request.Request" representing the
// client's request for the LookupPolicy operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See LookupPolicy for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the LookupPolicy method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the LookupPolicyRequest method.
//    req, resp := client.LookupPolicyRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/LookupPolicy
func (c *CloudDirectory) LookupPolicyRequest(input *LookupPolicyInput) (req *request.Request, output *LookupPolicyOutput) {
	op := &request.Operation{
		Name:       opLookupPolicy,
		HTTPMethod: "POST",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/policy/lookup",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &LookupPolicyInput{}
	}

	output = &LookupPolicyOutput{}
	req = c.newRequest(op, input, output)
	return
}

// LookupPolicy API operation for Amazon CloudDirectory.
//
// Lists all policies from the root of the Directory to the object specified.
// If there are no policies present, an empty list is returned. If policies
// are present, and if some objects don't have the policies attached, it returns
// the objectIdentifier for such objects. If policies are present, it returns
// objectIdentifier, policyId, and policyType. Paths that don't lead to the
// root from the target object are ignored.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation LookupPolicy for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
//   Indicates that the NextToken value is not valid.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/LookupPolicy
func (c *CloudDirectory) LookupPolicy(input *LookupPolicyInput) (*LookupPolicyOutput, error) {
	req, out := c.LookupPolicyRequest(input)
	err := req.Send()
	return out, err
}

// LookupPolicyPages iterates over the pages of a LookupPolicy operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See LookupPolicy method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//    // Example iterating over at most 3 pages of a LookupPolicy operation.
//    pageNum := 0
//    err := client.LookupPolicyPages(params,
//        func(page *LookupPolicyOutput, lastPage bool) bool {
//            pageNum++
//            fmt.Println(page)
//            return pageNum <= 3
//        })
//
func (c *CloudDirectory) LookupPolicyPages(input *LookupPolicyInput, fn func(p *LookupPolicyOutput, lastPage bool) (shouldContinue bool)) error {
	page, _ := c.LookupPolicyRequest(input)
	page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
	return page.EachPage(func(p interface{}, lastPage bool) bool {
		return fn(p.(*LookupPolicyOutput), lastPage)
	})
}

const opPublishSchema = "PublishSchema"

// PublishSchemaRequest generates a "aws/request.Request" representing the
// client's request for the PublishSchema operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See PublishSchema for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the PublishSchema method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the PublishSchemaRequest method.
//    req, resp := client.PublishSchemaRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PublishSchema
func (c *CloudDirectory) PublishSchemaRequest(input *PublishSchemaInput) (req *request.Request, output *PublishSchemaOutput) {
	op := &request.Operation{
		Name:       opPublishSchema,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/schema/publish",
	}

	if input == nil {
		input = &PublishSchemaInput{}
	}

	output = &PublishSchemaOutput{}
	req = c.newRequest(op, input, output)
	return
}

// PublishSchema API operation for Amazon CloudDirectory.
//
// Publishes a development schema with a version. If description and attributes
// are specified, PublishSchema overrides the development schema description
// and attributes. If not, the development schema description and attributes
// are used.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation PublishSchema for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeSchemaAlreadyPublishedException "SchemaAlreadyPublishedException"
//   Indicates a schema is already published.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PublishSchema
func (c *CloudDirectory) PublishSchema(input *PublishSchemaInput) (*PublishSchemaOutput, error) {
	req, out := c.PublishSchemaRequest(input)
	err := req.Send()
	return out, err
}

const opPutSchemaFromJson = "PutSchemaFromJson"

// PutSchemaFromJsonRequest generates a "aws/request.Request" representing the
// client's request for the PutSchemaFromJson operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See PutSchemaFromJson for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the PutSchemaFromJson method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the PutSchemaFromJsonRequest method.
//    req, resp := client.PutSchemaFromJsonRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PutSchemaFromJson
func (c *CloudDirectory) PutSchemaFromJsonRequest(input *PutSchemaFromJsonInput) (req *request.Request, output *PutSchemaFromJsonOutput) {
	op := &request.Operation{
		Name:       opPutSchemaFromJson,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/schema/json",
	}

	if input == nil {
		input = &PutSchemaFromJsonInput{}
	}

	output = &PutSchemaFromJsonOutput{}
	req = c.newRequest(op, input, output)
	return
}

// PutSchemaFromJson API operation for Amazon CloudDirectory.
//
// Allows a schema to be updated using JSON upload. Only available for development
// schemas. See JSON Schema Format (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_schemas.html#jsonformat)
// for more information.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation PutSchemaFromJson for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeInvalidSchemaDocException "InvalidSchemaDocException"
//   Indicates that the provided SchemaDoc value is not valid.
//
//   * ErrCodeInvalidRuleException "InvalidRuleException"
//   Occurs when any of the rule parameter keys or values are invalid.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PutSchemaFromJson
func (c *CloudDirectory) PutSchemaFromJson(input *PutSchemaFromJsonInput) (*PutSchemaFromJsonOutput, error) {
	req, out := c.PutSchemaFromJsonRequest(input)
	err := req.Send()
	return out, err
}

const opRemoveFacetFromObject = "RemoveFacetFromObject"

// RemoveFacetFromObjectRequest generates a "aws/request.Request" representing the
// client's request for the RemoveFacetFromObject operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See RemoveFacetFromObject for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the RemoveFacetFromObject method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the RemoveFacetFromObjectRequest method.
//    req, resp := client.RemoveFacetFromObjectRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/RemoveFacetFromObject
func (c *CloudDirectory) RemoveFacetFromObjectRequest(input *RemoveFacetFromObjectInput) (req *request.Request, output *RemoveFacetFromObjectOutput) {
	op := &request.Operation{
		Name:       opRemoveFacetFromObject,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object/facets/delete",
	}

	if input == nil {
		input = &RemoveFacetFromObjectInput{}
	}

	output = &RemoveFacetFromObjectOutput{}
	req = c.newRequest(op, input, output)
	return
}

// RemoveFacetFromObject API operation for Amazon CloudDirectory.
//
// Removes the specified facet from the specified object.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation RemoveFacetFromObject for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeFacetValidationException "FacetValidationException"
//   The Facet you provided was not well formed or could not be validated with
//   the schema.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/RemoveFacetFromObject
func (c *CloudDirectory) RemoveFacetFromObject(input *RemoveFacetFromObjectInput) (*RemoveFacetFromObjectOutput, error) {
	req, out := c.RemoveFacetFromObjectRequest(input)
	err := req.Send()
	return out, err
}

const opTagResource = "TagResource"

// TagResourceRequest generates a "aws/request.Request" representing the
// client's request for the TagResource operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See TagResource for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the TagResource method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the TagResourceRequest method.
//    req, resp := client.TagResourceRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TagResource
func (c *CloudDirectory) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
	op := &request.Operation{
		Name:       opTagResource,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/tags/add",
	}

	if input == nil {
		input = &TagResourceInput{}
	}

	output = &TagResourceOutput{}
	req = c.newRequest(op, input, output)
	return
}

// TagResource API operation for Amazon CloudDirectory.
//
// API for adding tags to a resource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation TagResource for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeInvalidTaggingRequestException "InvalidTaggingRequestException"
//   Can occur for multiple reasons such as when you tag a resource that doesn’t
//   exist or if you specify a higher number of tags for a resource than the allowed
//   limit. Allowed limit is 50 tags per resource.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TagResource
func (c *CloudDirectory) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
	req, out := c.TagResourceRequest(input)
	err := req.Send()
	return out, err
}

const opUntagResource = "UntagResource"

// UntagResourceRequest generates a "aws/request.Request" representing the
// client's request for the UntagResource operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See UntagResource for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the UntagResource method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the UntagResourceRequest method.
//    req, resp := client.UntagResourceRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UntagResource
func (c *CloudDirectory) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
	op := &request.Operation{
		Name:       opUntagResource,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/tags/remove",
	}

	if input == nil {
		input = &UntagResourceInput{}
	}

	output = &UntagResourceOutput{}
	req = c.newRequest(op, input, output)
	return
}

// UntagResource API operation for Amazon CloudDirectory.
//
// API for removing tags from a resource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation UntagResource for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeInvalidTaggingRequestException "InvalidTaggingRequestException"
//   Can occur for multiple reasons such as when you tag a resource that doesn’t
//   exist or if you specify a higher number of tags for a resource than the allowed
//   limit. Allowed limit is 50 tags per resource.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UntagResource
func (c *CloudDirectory) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
	req, out := c.UntagResourceRequest(input)
	err := req.Send()
	return out, err
}

const opUpdateFacet = "UpdateFacet"

// UpdateFacetRequest generates a "aws/request.Request" representing the
// client's request for the UpdateFacet operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See UpdateFacet for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the UpdateFacet method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the UpdateFacetRequest method.
//    req, resp := client.UpdateFacetRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateFacet
func (c *CloudDirectory) UpdateFacetRequest(input *UpdateFacetInput) (req *request.Request, output *UpdateFacetOutput) {
	op := &request.Operation{
		Name:       opUpdateFacet,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/facet",
	}

	if input == nil {
		input = &UpdateFacetInput{}
	}

	output = &UpdateFacetOutput{}
	req = c.newRequest(op, input, output)
	return
}

// UpdateFacet API operation for Amazon CloudDirectory.
//
// Does the following:
//
// Adds new Attributes, Rules, or ObjectTypes.
//
// Updates existing Attributes, Rules, or ObjectTypes.
//
// Deletes existing Attributes, Rules, or ObjectTypes.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation UpdateFacet for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeInvalidFacetUpdateException "InvalidFacetUpdateException"
//   An attempt to modify a Facet resulted in an invalid schema exception.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeFacetNotFoundException "FacetNotFoundException"
//   The specified Facet could not be found.
//
//   * ErrCodeInvalidRuleException "InvalidRuleException"
//   Occurs when any of the rule parameter keys or values are invalid.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateFacet
func (c *CloudDirectory) UpdateFacet(input *UpdateFacetInput) (*UpdateFacetOutput, error) {
	req, out := c.UpdateFacetRequest(input)
	err := req.Send()
	return out, err
}

const opUpdateObjectAttributes = "UpdateObjectAttributes"

// UpdateObjectAttributesRequest generates a "aws/request.Request" representing the
// client's request for the UpdateObjectAttributes operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See UpdateObjectAttributes for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the UpdateObjectAttributes method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the UpdateObjectAttributesRequest method.
//    req, resp := client.UpdateObjectAttributesRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateObjectAttributes
func (c *CloudDirectory) UpdateObjectAttributesRequest(input *UpdateObjectAttributesInput) (req *request.Request, output *UpdateObjectAttributesOutput) {
	op := &request.Operation{
		Name:       opUpdateObjectAttributes,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/object/update",
	}

	if input == nil {
		input = &UpdateObjectAttributesInput{}
	}

	output = &UpdateObjectAttributesOutput{}
	req = c.newRequest(op, input, output)
	return
}

// UpdateObjectAttributes API operation for Amazon CloudDirectory.
//
// Updates a given object's attributes.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation UpdateObjectAttributes for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeDirectoryNotEnabledException "DirectoryNotEnabledException"
//   An operation can only operate on a directory that is not enabled.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
//   * ErrCodeFacetValidationException "FacetValidationException"
//   The Facet you provided was not well formed or could not be validated with
//   the schema.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateObjectAttributes
func (c *CloudDirectory) UpdateObjectAttributes(input *UpdateObjectAttributesInput) (*UpdateObjectAttributesOutput, error) {
	req, out := c.UpdateObjectAttributesRequest(input)
	err := req.Send()
	return out, err
}

const opUpdateSchema = "UpdateSchema"

// UpdateSchemaRequest generates a "aws/request.Request" representing the
// client's request for the UpdateSchema operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See UpdateSchema for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the UpdateSchema method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
//    // Example sending a request using the UpdateSchemaRequest method.
//    req, resp := client.UpdateSchemaRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateSchema
func (c *CloudDirectory) UpdateSchemaRequest(input *UpdateSchemaInput) (req *request.Request, output *UpdateSchemaOutput) {
	op := &request.Operation{
		Name:       opUpdateSchema,
		HTTPMethod: "PUT",
		HTTPPath:   "/amazonclouddirectory/2017-01-11/schema/update",
	}

	if input == nil {
		input = &UpdateSchemaInput{}
	}

	output = &UpdateSchemaOutput{}
	req = c.newRequest(op, input, output)
	return
}

// UpdateSchema API operation for Amazon CloudDirectory.
//
// Updates the schema name with a new name. Only development schema names can
// be updated.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudDirectory's
// API operation UpdateSchema for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeInternalServiceException "InternalServiceException"
//   Indicates a problem that must be resolved by Amazon Web Services. This might
//   be a transient error in which case you can retry your request until it succeeds.
//   Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
//   site to see if there are any operational issues with the service.
//
//   * ErrCodeInvalidArnException "InvalidArnException"
//   Indicates that the provided ARN value is not valid.
//
//   * ErrCodeRetryableConflictException "RetryableConflictException"
//   Occurs when a conflict with a previous successful write is detected. For
//   example, if a write operation occurs on an object and then an attempt is
//   made to read the object using “SERIALIZABLE” consistency, this exception
//   may result. This generally occurs when the previous write did not have time
//   to propagate to the host serving the current request. A retry (with appropriate
//   backoff logic) is the recommended response to this exception.
//
//   * ErrCodeValidationException "ValidationException"
//   Indicates your request is malformed in some manner. See the exception message.
//
//   * ErrCodeLimitExceededException "LimitExceededException"
//   Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
//   for more information.
//
//   * ErrCodeAccessDeniedException "AccessDeniedException"
//   Access denied. Check your permissions.
//
//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
//   The specified resource could not be found.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateSchema
func (c *CloudDirectory) UpdateSchema(input *UpdateSchemaInput) (*UpdateSchemaOutput, error) {
	req, out := c.UpdateSchemaRequest(input)
	err := req.Send()
	return out, err
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AddFacetToObjectRequest
type AddFacetToObjectInput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the Directory where the object resides. For more information,
	// see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Attributes on the facet you are adding to the object.
	ObjectAttributeList []*AttributeKeyAndValue `type:"list"`

	// A reference to the object you are adding the specified facet to.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`

	// Identifiers for the facet that you are adding to the object.
	//
	// SchemaFacet is a required field
	SchemaFacet *SchemaFacet `type:"structure" required:"true"`
}

// String returns the string representation
func (s AddFacetToObjectInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s AddFacetToObjectInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *AddFacetToObjectInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "AddFacetToObjectInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}
	if s.SchemaFacet == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaFacet"))
	}
	if s.ObjectAttributeList != nil {
		for i, v := range s.ObjectAttributeList {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ObjectAttributeList", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.SchemaFacet != nil {
		if err := s.SchemaFacet.Validate(); err != nil {
			invalidParams.AddNested("SchemaFacet", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *AddFacetToObjectInput) SetDirectoryArn(v string) *AddFacetToObjectInput {
	s.DirectoryArn = &v
	return s
}

// SetObjectAttributeList sets the ObjectAttributeList field's value.
func (s *AddFacetToObjectInput) SetObjectAttributeList(v []*AttributeKeyAndValue) *AddFacetToObjectInput {
	s.ObjectAttributeList = v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *AddFacetToObjectInput) SetObjectReference(v *ObjectReference) *AddFacetToObjectInput {
	s.ObjectReference = v
	return s
}

// SetSchemaFacet sets the SchemaFacet field's value.
func (s *AddFacetToObjectInput) SetSchemaFacet(v *SchemaFacet) *AddFacetToObjectInput {
	s.SchemaFacet = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AddFacetToObjectResponse
type AddFacetToObjectOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s AddFacetToObjectOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s AddFacetToObjectOutput) GoString() string {
	return s.String()
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ApplySchemaRequest
type ApplySchemaInput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the Directory into which the schema is copied. For more
	// information, see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Published schema ARN that needs to be copied. For more information, see arns.
	//
	// PublishedSchemaArn is a required field
	PublishedSchemaArn *string `type:"string" required:"true"`
}

// String returns the string representation
func (s ApplySchemaInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ApplySchemaInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ApplySchemaInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ApplySchemaInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.PublishedSchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("PublishedSchemaArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *ApplySchemaInput) SetDirectoryArn(v string) *ApplySchemaInput {
	s.DirectoryArn = &v
	return s
}

// SetPublishedSchemaArn sets the PublishedSchemaArn field's value.
func (s *ApplySchemaInput) SetPublishedSchemaArn(v string) *ApplySchemaInput {
	s.PublishedSchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ApplySchemaResponse
type ApplySchemaOutput struct {
	_ struct{} `type:"structure"`

	// Applied schema ARN associated with the copied schema in the Directory. You
	// can use this ARN to describe the schema information applied on this directory.
	// For more information, see arns.
	AppliedSchemaArn *string `type:"string"`

	// ARN associated with the Directory. For more information, see arns.
	DirectoryArn *string `type:"string"`
}

// String returns the string representation
func (s ApplySchemaOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ApplySchemaOutput) GoString() string {
	return s.String()
}

// SetAppliedSchemaArn sets the AppliedSchemaArn field's value.
func (s *ApplySchemaOutput) SetAppliedSchemaArn(v string) *ApplySchemaOutput {
	s.AppliedSchemaArn = &v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *ApplySchemaOutput) SetDirectoryArn(v string) *ApplySchemaOutput {
	s.DirectoryArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachObjectRequest
type AttachObjectInput struct {
	_ struct{} `type:"structure"`

	// Child object reference to be attached to the object.
	//
	// ChildReference is a required field
	ChildReference *ObjectReference `type:"structure" required:"true"`

	// ARN associated with the Directory where both objects reside. For more information,
	// see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Link name with which the child object is attached to the parent.
	//
	// LinkName is a required field
	LinkName *string `type:"string" required:"true"`

	// Parent object reference.
	//
	// ParentReference is a required field
	ParentReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s AttachObjectInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s AttachObjectInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *AttachObjectInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "AttachObjectInput"}
	if s.ChildReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ChildReference"))
	}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.LinkName == nil {
		invalidParams.Add(request.NewErrParamRequired("LinkName"))
	}
	if s.ParentReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ParentReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetChildReference sets the ChildReference field's value.
func (s *AttachObjectInput) SetChildReference(v *ObjectReference) *AttachObjectInput {
	s.ChildReference = v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *AttachObjectInput) SetDirectoryArn(v string) *AttachObjectInput {
	s.DirectoryArn = &v
	return s
}

// SetLinkName sets the LinkName field's value.
func (s *AttachObjectInput) SetLinkName(v string) *AttachObjectInput {
	s.LinkName = &v
	return s
}

// SetParentReference sets the ParentReference field's value.
func (s *AttachObjectInput) SetParentReference(v *ObjectReference) *AttachObjectInput {
	s.ParentReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachObjectResponse
type AttachObjectOutput struct {
	_ struct{} `type:"structure"`

	// Attached ObjectIdentifier, which is the child ObjectIdentifier.
	AttachedObjectIdentifier *string `type:"string"`
}

// String returns the string representation
func (s AttachObjectOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s AttachObjectOutput) GoString() string {
	return s.String()
}

// SetAttachedObjectIdentifier sets the AttachedObjectIdentifier field's value.
func (s *AttachObjectOutput) SetAttachedObjectIdentifier(v string) *AttachObjectOutput {
	s.AttachedObjectIdentifier = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachPolicyRequest
type AttachPolicyInput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the Directory where both objects reside. For more information,
	// see arns.
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string"`

	// Reference that identifies the object to which the policy will be attached.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`

	// Reference associated with the policy object.
	//
	// PolicyReference is a required field
	PolicyReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s AttachPolicyInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s AttachPolicyInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *AttachPolicyInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "AttachPolicyInput"}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}
	if s.PolicyReference == nil {
		invalidParams.Add(request.NewErrParamRequired("PolicyReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *AttachPolicyInput) SetDirectoryArn(v string) *AttachPolicyInput {
	s.DirectoryArn = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *AttachPolicyInput) SetObjectReference(v *ObjectReference) *AttachPolicyInput {
	s.ObjectReference = v
	return s
}

// SetPolicyReference sets the PolicyReference field's value.
func (s *AttachPolicyInput) SetPolicyReference(v *ObjectReference) *AttachPolicyInput {
	s.PolicyReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachPolicyResponse
type AttachPolicyOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s AttachPolicyOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s AttachPolicyOutput) GoString() string {
	return s.String()
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachToIndexRequest
type AttachToIndexInput struct {
	_ struct{} `type:"structure"`

	// The ARN of the directory where the object and index exist.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// A reference to the index that you are attaching the object to.
	//
	// IndexReference is a required field
	IndexReference *ObjectReference `type:"structure" required:"true"`

	// A reference to the object that you are attaching to the index.
	//
	// TargetReference is a required field
	TargetReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s AttachToIndexInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s AttachToIndexInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *AttachToIndexInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "AttachToIndexInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.IndexReference == nil {
		invalidParams.Add(request.NewErrParamRequired("IndexReference"))
	}
	if s.TargetReference == nil {
		invalidParams.Add(request.NewErrParamRequired("TargetReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *AttachToIndexInput) SetDirectoryArn(v string) *AttachToIndexInput {
	s.DirectoryArn = &v
	return s
}

// SetIndexReference sets the IndexReference field's value.
func (s *AttachToIndexInput) SetIndexReference(v *ObjectReference) *AttachToIndexInput {
	s.IndexReference = v
	return s
}

// SetTargetReference sets the TargetReference field's value.
func (s *AttachToIndexInput) SetTargetReference(v *ObjectReference) *AttachToIndexInput {
	s.TargetReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachToIndexResponse
type AttachToIndexOutput struct {
	_ struct{} `type:"structure"`

	// The ObjectIdentifier of the object that was attached to the index.
	AttachedObjectIdentifier *string `type:"string"`
}

// String returns the string representation
func (s AttachToIndexOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s AttachToIndexOutput) GoString() string {
	return s.String()
}

// SetAttachedObjectIdentifier sets the AttachedObjectIdentifier field's value.
func (s *AttachToIndexOutput) SetAttachedObjectIdentifier(v string) *AttachToIndexOutput {
	s.AttachedObjectIdentifier = &v
	return s
}

// A unique identifier for an attribute.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttributeKey
type AttributeKey struct {
	_ struct{} `type:"structure"`

	// The name of the facet the attribute exists within.
	//
	// FacetName is a required field
	FacetName *string `min:"1" type:"string" required:"true"`

	// The name of the attribute.
	//
	// Name is a required field
	Name *string `min:"1" type:"string" required:"true"`

	// The ARN of the schema that contains the facet and attribute.
	//
	// SchemaArn is a required field
	SchemaArn *string `type:"string" required:"true"`
}

// String returns the string representation
func (s AttributeKey) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s AttributeKey) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *AttributeKey) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "AttributeKey"}
	if s.FacetName == nil {
		invalidParams.Add(request.NewErrParamRequired("FacetName"))
	}
	if s.FacetName != nil && len(*s.FacetName) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("FacetName", 1))
	}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
	}
	if s.SchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetFacetName sets the FacetName field's value.
func (s *AttributeKey) SetFacetName(v string) *AttributeKey {
	s.FacetName = &v
	return s
}

// SetName sets the Name field's value.
func (s *AttributeKey) SetName(v string) *AttributeKey {
	s.Name = &v
	return s
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *AttributeKey) SetSchemaArn(v string) *AttributeKey {
	s.SchemaArn = &v
	return s
}

// The combination of an attribute key and an attribute value.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttributeKeyAndValue
type AttributeKeyAndValue struct {
	_ struct{} `type:"structure"`

	// The key of the attribute.
	//
	// Key is a required field
	Key *AttributeKey `type:"structure" required:"true"`

	// The value of the attribute.
	//
	// Value is a required field
	Value *TypedAttributeValue `type:"structure" required:"true"`
}

// String returns the string representation
func (s AttributeKeyAndValue) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s AttributeKeyAndValue) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *AttributeKeyAndValue) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "AttributeKeyAndValue"}
	if s.Key == nil {
		invalidParams.Add(request.NewErrParamRequired("Key"))
	}
	if s.Value == nil {
		invalidParams.Add(request.NewErrParamRequired("Value"))
	}
	if s.Key != nil {
		if err := s.Key.Validate(); err != nil {
			invalidParams.AddNested("Key", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetKey sets the Key field's value.
func (s *AttributeKeyAndValue) SetKey(v *AttributeKey) *AttributeKeyAndValue {
	s.Key = v
	return s
}

// SetValue sets the Value field's value.
func (s *AttributeKeyAndValue) SetValue(v *TypedAttributeValue) *AttributeKeyAndValue {
	s.Value = v
	return s
}

// Represents the output of a batch add facet to object operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAddFacetToObject
type BatchAddFacetToObject struct {
	_ struct{} `type:"structure"`

	// The attributes to set on the object.
	//
	// ObjectAttributeList is a required field
	ObjectAttributeList []*AttributeKeyAndValue `type:"list" required:"true"`

	// A reference to the object being mutated.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`

	// Represents the facet being added to the object.
	//
	// SchemaFacet is a required field
	SchemaFacet *SchemaFacet `type:"structure" required:"true"`
}

// String returns the string representation
func (s BatchAddFacetToObject) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchAddFacetToObject) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchAddFacetToObject) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchAddFacetToObject"}
	if s.ObjectAttributeList == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectAttributeList"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}
	if s.SchemaFacet == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaFacet"))
	}
	if s.ObjectAttributeList != nil {
		for i, v := range s.ObjectAttributeList {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ObjectAttributeList", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.SchemaFacet != nil {
		if err := s.SchemaFacet.Validate(); err != nil {
			invalidParams.AddNested("SchemaFacet", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetObjectAttributeList sets the ObjectAttributeList field's value.
func (s *BatchAddFacetToObject) SetObjectAttributeList(v []*AttributeKeyAndValue) *BatchAddFacetToObject {
	s.ObjectAttributeList = v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *BatchAddFacetToObject) SetObjectReference(v *ObjectReference) *BatchAddFacetToObject {
	s.ObjectReference = v
	return s
}

// SetSchemaFacet sets the SchemaFacet field's value.
func (s *BatchAddFacetToObject) SetSchemaFacet(v *SchemaFacet) *BatchAddFacetToObject {
	s.SchemaFacet = v
	return s
}

// The result of a batch add facet to object operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAddFacetToObjectResponse
type BatchAddFacetToObjectResponse struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s BatchAddFacetToObjectResponse) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchAddFacetToObjectResponse) GoString() string {
	return s.String()
}

// Represents the output of an AttachObject operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAttachObject
type BatchAttachObject struct {
	_ struct{} `type:"structure"`

	// Child object reference to be attached to the object.
	//
	// ChildReference is a required field
	ChildReference *ObjectReference `type:"structure" required:"true"`

	// The name of the link.
	//
	// LinkName is a required field
	LinkName *string `type:"string" required:"true"`

	// Parent object reference.
	//
	// ParentReference is a required field
	ParentReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s BatchAttachObject) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchAttachObject) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchAttachObject) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchAttachObject"}
	if s.ChildReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ChildReference"))
	}
	if s.LinkName == nil {
		invalidParams.Add(request.NewErrParamRequired("LinkName"))
	}
	if s.ParentReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ParentReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetChildReference sets the ChildReference field's value.
func (s *BatchAttachObject) SetChildReference(v *ObjectReference) *BatchAttachObject {
	s.ChildReference = v
	return s
}

// SetLinkName sets the LinkName field's value.
func (s *BatchAttachObject) SetLinkName(v string) *BatchAttachObject {
	s.LinkName = &v
	return s
}

// SetParentReference sets the ParentReference field's value.
func (s *BatchAttachObject) SetParentReference(v *ObjectReference) *BatchAttachObject {
	s.ParentReference = v
	return s
}

// Represents the output batch AttachObject response operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAttachObjectResponse
type BatchAttachObjectResponse struct {
	_ struct{} `type:"structure"`

	// The ObjectIdentifier of the object that has been attached.
	AttachedObjectIdentifier *string `locationName:"attachedObjectIdentifier" type:"string"`
}

// String returns the string representation
func (s BatchAttachObjectResponse) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchAttachObjectResponse) GoString() string {
	return s.String()
}

// SetAttachedObjectIdentifier sets the AttachedObjectIdentifier field's value.
func (s *BatchAttachObjectResponse) SetAttachedObjectIdentifier(v string) *BatchAttachObjectResponse {
	s.AttachedObjectIdentifier = &v
	return s
}

// Represents the output of a CreateObject operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchCreateObject
type BatchCreateObject struct {
	_ struct{} `type:"structure"`

	// The batch reference name. See Batches (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_advanced.html#batches)
	// for more information.
	//
	// BatchReferenceName is a required field
	BatchReferenceName *string `type:"string" required:"true"`

	// The name of the link.
	//
	// LinkName is a required field
	LinkName *string `type:"string" required:"true"`

	// Attribute map, which contains an attribute ARN as the key and attribute value
	// as the map value.
	//
	// ObjectAttributeList is a required field
	ObjectAttributeList []*AttributeKeyAndValue `type:"list" required:"true"`

	// If specified, the parent reference to which this object will be attached.
	//
	// ParentReference is a required field
	ParentReference *ObjectReference `type:"structure" required:"true"`

	// List of FacetArns that will be associated with the object. For more information,
	// see arns.
	//
	// SchemaFacet is a required field
	SchemaFacet []*SchemaFacet `type:"list" required:"true"`
}

// String returns the string representation
func (s BatchCreateObject) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchCreateObject) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchCreateObject) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchCreateObject"}
	if s.BatchReferenceName == nil {
		invalidParams.Add(request.NewErrParamRequired("BatchReferenceName"))
	}
	if s.LinkName == nil {
		invalidParams.Add(request.NewErrParamRequired("LinkName"))
	}
	if s.ObjectAttributeList == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectAttributeList"))
	}
	if s.ParentReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ParentReference"))
	}
	if s.SchemaFacet == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaFacet"))
	}
	if s.ObjectAttributeList != nil {
		for i, v := range s.ObjectAttributeList {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ObjectAttributeList", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.SchemaFacet != nil {
		for i, v := range s.SchemaFacet {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SchemaFacet", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetBatchReferenceName sets the BatchReferenceName field's value.
func (s *BatchCreateObject) SetBatchReferenceName(v string) *BatchCreateObject {
	s.BatchReferenceName = &v
	return s
}

// SetLinkName sets the LinkName field's value.
func (s *BatchCreateObject) SetLinkName(v string) *BatchCreateObject {
	s.LinkName = &v
	return s
}

// SetObjectAttributeList sets the ObjectAttributeList field's value.
func (s *BatchCreateObject) SetObjectAttributeList(v []*AttributeKeyAndValue) *BatchCreateObject {
	s.ObjectAttributeList = v
	return s
}

// SetParentReference sets the ParentReference field's value.
func (s *BatchCreateObject) SetParentReference(v *ObjectReference) *BatchCreateObject {
	s.ParentReference = v
	return s
}

// SetSchemaFacet sets the SchemaFacet field's value.
func (s *BatchCreateObject) SetSchemaFacet(v []*SchemaFacet) *BatchCreateObject {
	s.SchemaFacet = v
	return s
}

// Represents the output of a CreateObject response operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchCreateObjectResponse
type BatchCreateObjectResponse struct {
	_ struct{} `type:"structure"`

	// ID associated with the object.
	ObjectIdentifier *string `type:"string"`
}

// String returns the string representation
func (s BatchCreateObjectResponse) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchCreateObjectResponse) GoString() string {
	return s.String()
}

// SetObjectIdentifier sets the ObjectIdentifier field's value.
func (s *BatchCreateObjectResponse) SetObjectIdentifier(v string) *BatchCreateObjectResponse {
	s.ObjectIdentifier = &v
	return s
}

// Represents the output of a DeleteObject operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDeleteObject
type BatchDeleteObject struct {
	_ struct{} `type:"structure"`

	// Reference that identifies the object.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s BatchDeleteObject) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchDeleteObject) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchDeleteObject) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchDeleteObject"}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetObjectReference sets the ObjectReference field's value.
func (s *BatchDeleteObject) SetObjectReference(v *ObjectReference) *BatchDeleteObject {
	s.ObjectReference = v
	return s
}

// Represents the output of a DeleteObject response operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDeleteObjectResponse
type BatchDeleteObjectResponse struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s BatchDeleteObjectResponse) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchDeleteObjectResponse) GoString() string {
	return s.String()
}

// Represents the output of a DetachObject operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDetachObject
type BatchDetachObject struct {
	_ struct{} `type:"structure"`

	// The batch reference name. See Batches (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_advanced.html#batches)
	// for more information.
	//
	// BatchReferenceName is a required field
	BatchReferenceName *string `type:"string" required:"true"`

	// The name of the link.
	//
	// LinkName is a required field
	LinkName *string `type:"string" required:"true"`

	// Parent reference from which the object with the specified link name is detached.
	//
	// ParentReference is a required field
	ParentReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s BatchDetachObject) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchDetachObject) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchDetachObject) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchDetachObject"}
	if s.BatchReferenceName == nil {
		invalidParams.Add(request.NewErrParamRequired("BatchReferenceName"))
	}
	if s.LinkName == nil {
		invalidParams.Add(request.NewErrParamRequired("LinkName"))
	}
	if s.ParentReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ParentReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetBatchReferenceName sets the BatchReferenceName field's value.
func (s *BatchDetachObject) SetBatchReferenceName(v string) *BatchDetachObject {
	s.BatchReferenceName = &v
	return s
}

// SetLinkName sets the LinkName field's value.
func (s *BatchDetachObject) SetLinkName(v string) *BatchDetachObject {
	s.LinkName = &v
	return s
}

// SetParentReference sets the ParentReference field's value.
func (s *BatchDetachObject) SetParentReference(v *ObjectReference) *BatchDetachObject {
	s.ParentReference = v
	return s
}

// Represents the output of a DetachObject response operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDetachObjectResponse
type BatchDetachObjectResponse struct {
	_ struct{} `type:"structure"`

	// The ObjectIdentifier of the detached object.
	DetachedObjectIdentifier *string `locationName:"detachedObjectIdentifier" type:"string"`
}

// String returns the string representation
func (s BatchDetachObjectResponse) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchDetachObjectResponse) GoString() string {
	return s.String()
}

// SetDetachedObjectIdentifier sets the DetachedObjectIdentifier field's value.
func (s *BatchDetachObjectResponse) SetDetachedObjectIdentifier(v string) *BatchDetachObjectResponse {
	s.DetachedObjectIdentifier = &v
	return s
}

// Represents the output of a ListObjectAttributes operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListObjectAttributes
type BatchListObjectAttributes struct {
	_ struct{} `type:"structure"`

	// Maximum number of items to be retrieved in a single call. This is an approximate
	// number.
	MaxResults *int64 `type:"integer"`

	// Token used for pagination.
	NextToken *string `type:"string"`

	// Reference of the object whose attributes need to be listed.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s BatchListObjectAttributes) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchListObjectAttributes) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchListObjectAttributes) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchListObjectAttributes"}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetMaxResults sets the MaxResults field's value.
func (s *BatchListObjectAttributes) SetMaxResults(v int64) *BatchListObjectAttributes {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *BatchListObjectAttributes) SetNextToken(v string) *BatchListObjectAttributes {
	s.NextToken = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *BatchListObjectAttributes) SetObjectReference(v *ObjectReference) *BatchListObjectAttributes {
	s.ObjectReference = v
	return s
}

// Represents the output of a ListObjectAttributes response operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListObjectAttributesResponse
type BatchListObjectAttributesResponse struct {
	_ struct{} `type:"structure"`

	// Attributes map associated with the object. AttributeArn is the key; attribute
	// value is the value.
	Attributes []*AttributeKeyAndValue `type:"list"`

	// Token used for pagination.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s BatchListObjectAttributesResponse) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchListObjectAttributesResponse) GoString() string {
	return s.String()
}

// SetAttributes sets the Attributes field's value.
func (s *BatchListObjectAttributesResponse) SetAttributes(v []*AttributeKeyAndValue) *BatchListObjectAttributesResponse {
	s.Attributes = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *BatchListObjectAttributesResponse) SetNextToken(v string) *BatchListObjectAttributesResponse {
	s.NextToken = &v
	return s
}

// Represents the output of a ListObjectChildren operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListObjectChildren
type BatchListObjectChildren struct {
	_ struct{} `type:"structure"`

	// Maximum number of items to be retrieved in a single call. This is an approximate
	// number.
	MaxResults *int64 `type:"integer"`

	// Token used for pagination.
	NextToken *string `type:"string"`

	// Reference of the object for which child objects are being listed.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s BatchListObjectChildren) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchListObjectChildren) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchListObjectChildren) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchListObjectChildren"}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetMaxResults sets the MaxResults field's value.
func (s *BatchListObjectChildren) SetMaxResults(v int64) *BatchListObjectChildren {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *BatchListObjectChildren) SetNextToken(v string) *BatchListObjectChildren {
	s.NextToken = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *BatchListObjectChildren) SetObjectReference(v *ObjectReference) *BatchListObjectChildren {
	s.ObjectReference = v
	return s
}

// Represents the output of a ListObjectChildren response operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListObjectChildrenResponse
type BatchListObjectChildrenResponse struct {
	_ struct{} `type:"structure"`

	// Children structure, which is a map with key as the LinkName and ObjectIdentifier
	// as the value.
	Children map[string]*string `type:"map"`

	// Token used for pagination.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s BatchListObjectChildrenResponse) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchListObjectChildrenResponse) GoString() string {
	return s.String()
}

// SetChildren sets the Children field's value.
func (s *BatchListObjectChildrenResponse) SetChildren(v map[string]*string) *BatchListObjectChildrenResponse {
	s.Children = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *BatchListObjectChildrenResponse) SetNextToken(v string) *BatchListObjectChildrenResponse {
	s.NextToken = &v
	return s
}

// Batch Read Exception structure, which contains exception type and message.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchReadException
type BatchReadException struct {
	_ struct{} `type:"structure"`

	// Exception message associated with the failure.
	Message *string `type:"string"`

	// Type of exception, such as InvalidArnException.
	Type *string `type:"string" enum:"BatchReadExceptionType"`
}

// String returns the string representation
func (s BatchReadException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchReadException) GoString() string {
	return s.String()
}

// SetMessage sets the Message field's value.
func (s *BatchReadException) SetMessage(v string) *BatchReadException {
	s.Message = &v
	return s
}

// SetType sets the Type field's value.
func (s *BatchReadException) SetType(v string) *BatchReadException {
	s.Type = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchReadRequest
type BatchReadInput struct {
	_ struct{} `type:"structure"`

	// Represents the manner and timing in which the successful write or update
	// of an object is reflected in a subsequent read operation of that same object.
	ConsistencyLevel *string `location:"header" locationName:"x-amz-consistency-level" type:"string" enum:"ConsistencyLevel"`

	// ARN associated with the Directory. For more information, see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// List of operations that are part of the batch.
	//
	// Operations is a required field
	Operations []*BatchReadOperation `type:"list" required:"true"`
}

// String returns the string representation
func (s BatchReadInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchReadInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchReadInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchReadInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.Operations == nil {
		invalidParams.Add(request.NewErrParamRequired("Operations"))
	}
	if s.Operations != nil {
		for i, v := range s.Operations {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Operations", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetConsistencyLevel sets the ConsistencyLevel field's value.
func (s *BatchReadInput) SetConsistencyLevel(v string) *BatchReadInput {
	s.ConsistencyLevel = &v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *BatchReadInput) SetDirectoryArn(v string) *BatchReadInput {
	s.DirectoryArn = &v
	return s
}

// SetOperations sets the Operations field's value.
func (s *BatchReadInput) SetOperations(v []*BatchReadOperation) *BatchReadInput {
	s.Operations = v
	return s
}

// Represents the output of a BatchRead operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchReadOperation
type BatchReadOperation struct {
	_ struct{} `type:"structure"`

	// Lists all attributes associated with an object.
	ListObjectAttributes *BatchListObjectAttributes `type:"structure"`

	// Returns a paginated list of child objects that are associated with a given
	// object.
	ListObjectChildren *BatchListObjectChildren `type:"structure"`
}

// String returns the string representation
func (s BatchReadOperation) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchReadOperation) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchReadOperation) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchReadOperation"}
	if s.ListObjectAttributes != nil {
		if err := s.ListObjectAttributes.Validate(); err != nil {
			invalidParams.AddNested("ListObjectAttributes", err.(request.ErrInvalidParams))
		}
	}
	if s.ListObjectChildren != nil {
		if err := s.ListObjectChildren.Validate(); err != nil {
			invalidParams.AddNested("ListObjectChildren", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetListObjectAttributes sets the ListObjectAttributes field's value.
func (s *BatchReadOperation) SetListObjectAttributes(v *BatchListObjectAttributes) *BatchReadOperation {
	s.ListObjectAttributes = v
	return s
}

// SetListObjectChildren sets the ListObjectChildren field's value.
func (s *BatchReadOperation) SetListObjectChildren(v *BatchListObjectChildren) *BatchReadOperation {
	s.ListObjectChildren = v
	return s
}

// Represents the output of a BatchRead response operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchReadOperationResponse
type BatchReadOperationResponse struct {
	_ struct{} `type:"structure"`

	// Identifies which operation in a batch has failed.
	ExceptionResponse *BatchReadException `type:"structure"`

	// Identifies which operation in a batch has succeeded.
	SuccessfulResponse *BatchReadSuccessfulResponse `type:"structure"`
}

// String returns the string representation
func (s BatchReadOperationResponse) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchReadOperationResponse) GoString() string {
	return s.String()
}

// SetExceptionResponse sets the ExceptionResponse field's value.
func (s *BatchReadOperationResponse) SetExceptionResponse(v *BatchReadException) *BatchReadOperationResponse {
	s.ExceptionResponse = v
	return s
}

// SetSuccessfulResponse sets the SuccessfulResponse field's value.
func (s *BatchReadOperationResponse) SetSuccessfulResponse(v *BatchReadSuccessfulResponse) *BatchReadOperationResponse {
	s.SuccessfulResponse = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchReadResponse
type BatchReadOutput struct {
	_ struct{} `type:"structure"`

	// List of all the responses for each batch read.
	Responses []*BatchReadOperationResponse `type:"list"`
}

// String returns the string representation
func (s BatchReadOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchReadOutput) GoString() string {
	return s.String()
}

// SetResponses sets the Responses field's value.
func (s *BatchReadOutput) SetResponses(v []*BatchReadOperationResponse) *BatchReadOutput {
	s.Responses = v
	return s
}

// Represents the output of a BatchRead success response operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchReadSuccessfulResponse
type BatchReadSuccessfulResponse struct {
	_ struct{} `type:"structure"`

	// Lists all attributes associated with an object.
	ListObjectAttributes *BatchListObjectAttributesResponse `type:"structure"`

	// Returns a paginated list of child objects associated with a given object.
	ListObjectChildren *BatchListObjectChildrenResponse `type:"structure"`
}

// String returns the string representation
func (s BatchReadSuccessfulResponse) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchReadSuccessfulResponse) GoString() string {
	return s.String()
}

// SetListObjectAttributes sets the ListObjectAttributes field's value.
func (s *BatchReadSuccessfulResponse) SetListObjectAttributes(v *BatchListObjectAttributesResponse) *BatchReadSuccessfulResponse {
	s.ListObjectAttributes = v
	return s
}

// SetListObjectChildren sets the ListObjectChildren field's value.
func (s *BatchReadSuccessfulResponse) SetListObjectChildren(v *BatchListObjectChildrenResponse) *BatchReadSuccessfulResponse {
	s.ListObjectChildren = v
	return s
}

// Batch operation to remove a facet from an object.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchRemoveFacetFromObject
type BatchRemoveFacetFromObject struct {
	_ struct{} `type:"structure"`

	// A reference to the object whose facet will be removed.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`

	// The facet to remove from the object.
	//
	// SchemaFacet is a required field
	SchemaFacet *SchemaFacet `type:"structure" required:"true"`
}

// String returns the string representation
func (s BatchRemoveFacetFromObject) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchRemoveFacetFromObject) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchRemoveFacetFromObject) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchRemoveFacetFromObject"}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}
	if s.SchemaFacet == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaFacet"))
	}
	if s.SchemaFacet != nil {
		if err := s.SchemaFacet.Validate(); err != nil {
			invalidParams.AddNested("SchemaFacet", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetObjectReference sets the ObjectReference field's value.
func (s *BatchRemoveFacetFromObject) SetObjectReference(v *ObjectReference) *BatchRemoveFacetFromObject {
	s.ObjectReference = v
	return s
}

// SetSchemaFacet sets the SchemaFacet field's value.
func (s *BatchRemoveFacetFromObject) SetSchemaFacet(v *SchemaFacet) *BatchRemoveFacetFromObject {
	s.SchemaFacet = v
	return s
}

// Empty result representing success.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchRemoveFacetFromObjectResponse
type BatchRemoveFacetFromObjectResponse struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s BatchRemoveFacetFromObjectResponse) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchRemoveFacetFromObjectResponse) GoString() string {
	return s.String()
}

// Represents the output of a BatchUpdate operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchUpdateObjectAttributes
type BatchUpdateObjectAttributes struct {
	_ struct{} `type:"structure"`

	// Attributes update structure.
	//
	// AttributeUpdates is a required field
	AttributeUpdates []*ObjectAttributeUpdate `type:"list" required:"true"`

	// Reference that identifies the object.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s BatchUpdateObjectAttributes) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchUpdateObjectAttributes) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchUpdateObjectAttributes) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchUpdateObjectAttributes"}
	if s.AttributeUpdates == nil {
		invalidParams.Add(request.NewErrParamRequired("AttributeUpdates"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}
	if s.AttributeUpdates != nil {
		for i, v := range s.AttributeUpdates {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AttributeUpdates", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAttributeUpdates sets the AttributeUpdates field's value.
func (s *BatchUpdateObjectAttributes) SetAttributeUpdates(v []*ObjectAttributeUpdate) *BatchUpdateObjectAttributes {
	s.AttributeUpdates = v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *BatchUpdateObjectAttributes) SetObjectReference(v *ObjectReference) *BatchUpdateObjectAttributes {
	s.ObjectReference = v
	return s
}

// Represents the output of a BatchUpdate response operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchUpdateObjectAttributesResponse
type BatchUpdateObjectAttributesResponse struct {
	_ struct{} `type:"structure"`

	// ID associated with the object.
	ObjectIdentifier *string `type:"string"`
}

// String returns the string representation
func (s BatchUpdateObjectAttributesResponse) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchUpdateObjectAttributesResponse) GoString() string {
	return s.String()
}

// SetObjectIdentifier sets the ObjectIdentifier field's value.
func (s *BatchUpdateObjectAttributesResponse) SetObjectIdentifier(v string) *BatchUpdateObjectAttributesResponse {
	s.ObjectIdentifier = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchWriteRequest
type BatchWriteInput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the Directory. For more information, see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// List of operations that are part of the batch.
	//
	// Operations is a required field
	Operations []*BatchWriteOperation `type:"list" required:"true"`
}

// String returns the string representation
func (s BatchWriteInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchWriteInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchWriteInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchWriteInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.Operations == nil {
		invalidParams.Add(request.NewErrParamRequired("Operations"))
	}
	if s.Operations != nil {
		for i, v := range s.Operations {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Operations", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *BatchWriteInput) SetDirectoryArn(v string) *BatchWriteInput {
	s.DirectoryArn = &v
	return s
}

// SetOperations sets the Operations field's value.
func (s *BatchWriteInput) SetOperations(v []*BatchWriteOperation) *BatchWriteInput {
	s.Operations = v
	return s
}

// Represents the output of a BatchWrite operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchWriteOperation
type BatchWriteOperation struct {
	_ struct{} `type:"structure"`

	// Batch operation adding a facet to an object.
	AddFacetToObject *BatchAddFacetToObject `type:"structure"`

	// Attaches an object to a Directory.
	AttachObject *BatchAttachObject `type:"structure"`

	// Creates an object.
	CreateObject *BatchCreateObject `type:"structure"`

	// Deletes an object in a Directory.
	DeleteObject *BatchDeleteObject `type:"structure"`

	// Detaches an object from a Directory.
	DetachObject *BatchDetachObject `type:"structure"`

	// Batch operation removing a facet from an object.
	RemoveFacetFromObject *BatchRemoveFacetFromObject `type:"structure"`

	// Update a given object's attributes.
	UpdateObjectAttributes *BatchUpdateObjectAttributes `type:"structure"`
}

// String returns the string representation
func (s BatchWriteOperation) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchWriteOperation) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchWriteOperation) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "BatchWriteOperation"}
	if s.AddFacetToObject != nil {
		if err := s.AddFacetToObject.Validate(); err != nil {
			invalidParams.AddNested("AddFacetToObject", err.(request.ErrInvalidParams))
		}
	}
	if s.AttachObject != nil {
		if err := s.AttachObject.Validate(); err != nil {
			invalidParams.AddNested("AttachObject", err.(request.ErrInvalidParams))
		}
	}
	if s.CreateObject != nil {
		if err := s.CreateObject.Validate(); err != nil {
			invalidParams.AddNested("CreateObject", err.(request.ErrInvalidParams))
		}
	}
	if s.DeleteObject != nil {
		if err := s.DeleteObject.Validate(); err != nil {
			invalidParams.AddNested("DeleteObject", err.(request.ErrInvalidParams))
		}
	}
	if s.DetachObject != nil {
		if err := s.DetachObject.Validate(); err != nil {
			invalidParams.AddNested("DetachObject", err.(request.ErrInvalidParams))
		}
	}
	if s.RemoveFacetFromObject != nil {
		if err := s.RemoveFacetFromObject.Validate(); err != nil {
			invalidParams.AddNested("RemoveFacetFromObject", err.(request.ErrInvalidParams))
		}
	}
	if s.UpdateObjectAttributes != nil {
		if err := s.UpdateObjectAttributes.Validate(); err != nil {
			invalidParams.AddNested("UpdateObjectAttributes", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAddFacetToObject sets the AddFacetToObject field's value.
func (s *BatchWriteOperation) SetAddFacetToObject(v *BatchAddFacetToObject) *BatchWriteOperation {
	s.AddFacetToObject = v
	return s
}

// SetAttachObject sets the AttachObject field's value.
func (s *BatchWriteOperation) SetAttachObject(v *BatchAttachObject) *BatchWriteOperation {
	s.AttachObject = v
	return s
}

// SetCreateObject sets the CreateObject field's value.
func (s *BatchWriteOperation) SetCreateObject(v *BatchCreateObject) *BatchWriteOperation {
	s.CreateObject = v
	return s
}

// SetDeleteObject sets the DeleteObject field's value.
func (s *BatchWriteOperation) SetDeleteObject(v *BatchDeleteObject) *BatchWriteOperation {
	s.DeleteObject = v
	return s
}

// SetDetachObject sets the DetachObject field's value.
func (s *BatchWriteOperation) SetDetachObject(v *BatchDetachObject) *BatchWriteOperation {
	s.DetachObject = v
	return s
}

// SetRemoveFacetFromObject sets the RemoveFacetFromObject field's value.
func (s *BatchWriteOperation) SetRemoveFacetFromObject(v *BatchRemoveFacetFromObject) *BatchWriteOperation {
	s.RemoveFacetFromObject = v
	return s
}

// SetUpdateObjectAttributes sets the UpdateObjectAttributes field's value.
func (s *BatchWriteOperation) SetUpdateObjectAttributes(v *BatchUpdateObjectAttributes) *BatchWriteOperation {
	s.UpdateObjectAttributes = v
	return s
}

// Represents the output of a BatchWrite response operation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchWriteOperationResponse
type BatchWriteOperationResponse struct {
	_ struct{} `type:"structure"`

	// Result of an add facet to object batch operation.
	AddFacetToObject *BatchAddFacetToObjectResponse `type:"structure"`

	// Attaches an object to a Directory.
	AttachObject *BatchAttachObjectResponse `type:"structure"`

	// Creates an object in a Directory.
	CreateObject *BatchCreateObjectResponse `type:"structure"`

	// Deletes an object in a Directory.
	DeleteObject *BatchDeleteObjectResponse `type:"structure"`

	// Detaches an object from a Directory.
	DetachObject *BatchDetachObjectResponse `type:"structure"`

	// Result of a batch remove facet from object operation.
	RemoveFacetFromObject *BatchRemoveFacetFromObjectResponse `type:"structure"`

	// Updates a given object’s attributes.
	UpdateObjectAttributes *BatchUpdateObjectAttributesResponse `type:"structure"`
}

// String returns the string representation
func (s BatchWriteOperationResponse) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchWriteOperationResponse) GoString() string {
	return s.String()
}

// SetAddFacetToObject sets the AddFacetToObject field's value.
func (s *BatchWriteOperationResponse) SetAddFacetToObject(v *BatchAddFacetToObjectResponse) *BatchWriteOperationResponse {
	s.AddFacetToObject = v
	return s
}

// SetAttachObject sets the AttachObject field's value.
func (s *BatchWriteOperationResponse) SetAttachObject(v *BatchAttachObjectResponse) *BatchWriteOperationResponse {
	s.AttachObject = v
	return s
}

// SetCreateObject sets the CreateObject field's value.
func (s *BatchWriteOperationResponse) SetCreateObject(v *BatchCreateObjectResponse) *BatchWriteOperationResponse {
	s.CreateObject = v
	return s
}

// SetDeleteObject sets the DeleteObject field's value.
func (s *BatchWriteOperationResponse) SetDeleteObject(v *BatchDeleteObjectResponse) *BatchWriteOperationResponse {
	s.DeleteObject = v
	return s
}

// SetDetachObject sets the DetachObject field's value.
func (s *BatchWriteOperationResponse) SetDetachObject(v *BatchDetachObjectResponse) *BatchWriteOperationResponse {
	s.DetachObject = v
	return s
}

// SetRemoveFacetFromObject sets the RemoveFacetFromObject field's value.
func (s *BatchWriteOperationResponse) SetRemoveFacetFromObject(v *BatchRemoveFacetFromObjectResponse) *BatchWriteOperationResponse {
	s.RemoveFacetFromObject = v
	return s
}

// SetUpdateObjectAttributes sets the UpdateObjectAttributes field's value.
func (s *BatchWriteOperationResponse) SetUpdateObjectAttributes(v *BatchUpdateObjectAttributesResponse) *BatchWriteOperationResponse {
	s.UpdateObjectAttributes = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchWriteResponse
type BatchWriteOutput struct {
	_ struct{} `type:"structure"`

	// List of all the responses for each batch write.
	Responses []*BatchWriteOperationResponse `type:"list"`
}

// String returns the string representation
func (s BatchWriteOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s BatchWriteOutput) GoString() string {
	return s.String()
}

// SetResponses sets the Responses field's value.
func (s *BatchWriteOutput) SetResponses(v []*BatchWriteOperationResponse) *BatchWriteOutput {
	s.Responses = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateDirectoryRequest
type CreateDirectoryInput struct {
	_ struct{} `type:"structure"`

	// Name of the Directory. Should be unique per account, per region.
	//
	// Name is a required field
	Name *string `min:"1" type:"string" required:"true"`

	// ARN of the published schema that will be copied into the data Directory.
	// For more information, see arns.
	//
	// SchemaArn is a required field
	SchemaArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s CreateDirectoryInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s CreateDirectoryInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateDirectoryInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "CreateDirectoryInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
	}
	if s.SchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetName sets the Name field's value.
func (s *CreateDirectoryInput) SetName(v string) *CreateDirectoryInput {
	s.Name = &v
	return s
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *CreateDirectoryInput) SetSchemaArn(v string) *CreateDirectoryInput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateDirectoryResponse
type CreateDirectoryOutput struct {
	_ struct{} `type:"structure"`

	// ARN of the published schema in the Directory. Once a published schema is
	// copied into the directory, it has its own ARN which is referred to applied
	// schema ARN. For more information, see arns.
	//
	// AppliedSchemaArn is a required field
	AppliedSchemaArn *string `type:"string" required:"true"`

	// ARN associated with the Directory. For more information, see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `type:"string" required:"true"`

	// Name of the Directory.
	//
	// Name is a required field
	Name *string `min:"1" type:"string" required:"true"`

	// The root object node of the created directory.
	//
	// ObjectIdentifier is a required field
	ObjectIdentifier *string `type:"string" required:"true"`
}

// String returns the string representation
func (s CreateDirectoryOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s CreateDirectoryOutput) GoString() string {
	return s.String()
}

// SetAppliedSchemaArn sets the AppliedSchemaArn field's value.
func (s *CreateDirectoryOutput) SetAppliedSchemaArn(v string) *CreateDirectoryOutput {
	s.AppliedSchemaArn = &v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *CreateDirectoryOutput) SetDirectoryArn(v string) *CreateDirectoryOutput {
	s.DirectoryArn = &v
	return s
}

// SetName sets the Name field's value.
func (s *CreateDirectoryOutput) SetName(v string) *CreateDirectoryOutput {
	s.Name = &v
	return s
}

// SetObjectIdentifier sets the ObjectIdentifier field's value.
func (s *CreateDirectoryOutput) SetObjectIdentifier(v string) *CreateDirectoryOutput {
	s.ObjectIdentifier = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateFacetRequest
type CreateFacetInput struct {
	_ struct{} `type:"structure"`

	// Attributes associated with the Facet.e
	Attributes []*FacetAttribute `type:"list"`

	// Name of the Facet, which is unique for a given schema.
	//
	// Name is a required field
	Name *string `min:"1" type:"string" required:"true"`

	// Specifies whether a given object created from this facet is of type Node,
	// Leaf Node, Policy or Index.
	//
	//    * Node: Can have multiple children but one parent.
	//
	//    * Leaf Node: Cannot have children but can have multiple parents.
	//
	//    * Policy: Allows you to store a policy document and policy type. For more
	//    information, see Policies (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_key_concepts.html#policies).
	//
	//    * Index: Can be created with the Index API.
	//
	// ObjectType is a required field
	ObjectType *string `type:"string" required:"true" enum:"ObjectType"`

	// Schema ARN in which the new Facet will be created. For more information,
	// see arns.
	//
	// SchemaArn is a required field
	SchemaArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s CreateFacetInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s CreateFacetInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateFacetInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "CreateFacetInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
	}
	if s.ObjectType == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectType"))
	}
	if s.SchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaArn"))
	}
	if s.Attributes != nil {
		for i, v := range s.Attributes {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAttributes sets the Attributes field's value.
func (s *CreateFacetInput) SetAttributes(v []*FacetAttribute) *CreateFacetInput {
	s.Attributes = v
	return s
}

// SetName sets the Name field's value.
func (s *CreateFacetInput) SetName(v string) *CreateFacetInput {
	s.Name = &v
	return s
}

// SetObjectType sets the ObjectType field's value.
func (s *CreateFacetInput) SetObjectType(v string) *CreateFacetInput {
	s.ObjectType = &v
	return s
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *CreateFacetInput) SetSchemaArn(v string) *CreateFacetInput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateFacetResponse
type CreateFacetOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s CreateFacetOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s CreateFacetOutput) GoString() string {
	return s.String()
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateIndexRequest
type CreateIndexInput struct {
	_ struct{} `type:"structure"`

	// The ARN of the directory where the index should be created.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Indicates whether objects with the same indexed attribute value can be added
	// to the index.
	//
	// IsUnique is a required field
	IsUnique *bool `type:"boolean" required:"true"`

	// The name of the link between the parent object and the index object.
	LinkName *string `type:"string"`

	// Specifies the Attributes that should be indexed on. Currently only a single
	// attribute is supported.
	//
	// OrderedIndexedAttributeList is a required field
	OrderedIndexedAttributeList []*AttributeKey `type:"list" required:"true"`

	// A reference to the parent object that contains the index object.
	ParentReference *ObjectReference `type:"structure"`
}

// String returns the string representation
func (s CreateIndexInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s CreateIndexInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateIndexInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "CreateIndexInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.IsUnique == nil {
		invalidParams.Add(request.NewErrParamRequired("IsUnique"))
	}
	if s.OrderedIndexedAttributeList == nil {
		invalidParams.Add(request.NewErrParamRequired("OrderedIndexedAttributeList"))
	}
	if s.OrderedIndexedAttributeList != nil {
		for i, v := range s.OrderedIndexedAttributeList {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OrderedIndexedAttributeList", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *CreateIndexInput) SetDirectoryArn(v string) *CreateIndexInput {
	s.DirectoryArn = &v
	return s
}

// SetIsUnique sets the IsUnique field's value.
func (s *CreateIndexInput) SetIsUnique(v bool) *CreateIndexInput {
	s.IsUnique = &v
	return s
}

// SetLinkName sets the LinkName field's value.
func (s *CreateIndexInput) SetLinkName(v string) *CreateIndexInput {
	s.LinkName = &v
	return s
}

// SetOrderedIndexedAttributeList sets the OrderedIndexedAttributeList field's value.
func (s *CreateIndexInput) SetOrderedIndexedAttributeList(v []*AttributeKey) *CreateIndexInput {
	s.OrderedIndexedAttributeList = v
	return s
}

// SetParentReference sets the ParentReference field's value.
func (s *CreateIndexInput) SetParentReference(v *ObjectReference) *CreateIndexInput {
	s.ParentReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateIndexResponse
type CreateIndexOutput struct {
	_ struct{} `type:"structure"`

	// The ObjectIdentifier of the index created by this operation.
	ObjectIdentifier *string `type:"string"`
}

// String returns the string representation
func (s CreateIndexOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s CreateIndexOutput) GoString() string {
	return s.String()
}

// SetObjectIdentifier sets the ObjectIdentifier field's value.
func (s *CreateIndexOutput) SetObjectIdentifier(v string) *CreateIndexOutput {
	s.ObjectIdentifier = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateObjectRequest
type CreateObjectInput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the Directory in which the object will be created. For
	// more information, see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// The name of link that is used to attach this object to a parent.
	LinkName *string `type:"string"`

	// Attribute map whose attribute ARN contains the key and attribute value as
	// the map value.
	ObjectAttributeList []*AttributeKeyAndValue `type:"list"`

	// If specified, the parent reference to which this object will be attached.
	ParentReference *ObjectReference `type:"structure"`

	// List of facet ARNs to be associated with the object. For more information,
	// see arns.
	//
	// SchemaFacets is a required field
	SchemaFacets []*SchemaFacet `type:"list" required:"true"`
}

// String returns the string representation
func (s CreateObjectInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s CreateObjectInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateObjectInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "CreateObjectInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.SchemaFacets == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaFacets"))
	}
	if s.ObjectAttributeList != nil {
		for i, v := range s.ObjectAttributeList {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ObjectAttributeList", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.SchemaFacets != nil {
		for i, v := range s.SchemaFacets {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SchemaFacets", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *CreateObjectInput) SetDirectoryArn(v string) *CreateObjectInput {
	s.DirectoryArn = &v
	return s
}

// SetLinkName sets the LinkName field's value.
func (s *CreateObjectInput) SetLinkName(v string) *CreateObjectInput {
	s.LinkName = &v
	return s
}

// SetObjectAttributeList sets the ObjectAttributeList field's value.
func (s *CreateObjectInput) SetObjectAttributeList(v []*AttributeKeyAndValue) *CreateObjectInput {
	s.ObjectAttributeList = v
	return s
}

// SetParentReference sets the ParentReference field's value.
func (s *CreateObjectInput) SetParentReference(v *ObjectReference) *CreateObjectInput {
	s.ParentReference = v
	return s
}

// SetSchemaFacets sets the SchemaFacets field's value.
func (s *CreateObjectInput) SetSchemaFacets(v []*SchemaFacet) *CreateObjectInput {
	s.SchemaFacets = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateObjectResponse
type CreateObjectOutput struct {
	_ struct{} `type:"structure"`

	// Identifier associated with the object.
	ObjectIdentifier *string `type:"string"`
}

// String returns the string representation
func (s CreateObjectOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s CreateObjectOutput) GoString() string {
	return s.String()
}

// SetObjectIdentifier sets the ObjectIdentifier field's value.
func (s *CreateObjectOutput) SetObjectIdentifier(v string) *CreateObjectOutput {
	s.ObjectIdentifier = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateSchemaRequest
type CreateSchemaInput struct {
	_ struct{} `type:"structure"`

	// Name associated with the schema. This is unique to each account and in each
	// region.
	//
	// Name is a required field
	Name *string `min:"1" type:"string" required:"true"`
}

// String returns the string representation
func (s CreateSchemaInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s CreateSchemaInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateSchemaInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "CreateSchemaInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetName sets the Name field's value.
func (s *CreateSchemaInput) SetName(v string) *CreateSchemaInput {
	s.Name = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateSchemaResponse
type CreateSchemaOutput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the schema. For more information, see arns.
	SchemaArn *string `type:"string"`
}

// String returns the string representation
func (s CreateSchemaOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s CreateSchemaOutput) GoString() string {
	return s.String()
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *CreateSchemaOutput) SetSchemaArn(v string) *CreateSchemaOutput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteDirectoryRequest
type DeleteDirectoryInput struct {
	_ struct{} `type:"structure"`

	// The ARN of the directory to delete.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s DeleteDirectoryInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DeleteDirectoryInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteDirectoryInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DeleteDirectoryInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *DeleteDirectoryInput) SetDirectoryArn(v string) *DeleteDirectoryInput {
	s.DirectoryArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteDirectoryResponse
type DeleteDirectoryOutput struct {
	_ struct{} `type:"structure"`

	// The ARN of the deleted directory.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `type:"string" required:"true"`
}

// String returns the string representation
func (s DeleteDirectoryOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DeleteDirectoryOutput) GoString() string {
	return s.String()
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *DeleteDirectoryOutput) SetDirectoryArn(v string) *DeleteDirectoryOutput {
	s.DirectoryArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteFacetRequest
type DeleteFacetInput struct {
	_ struct{} `type:"structure"`

	// The name of the facet to delete.
	//
	// Name is a required field
	Name *string `min:"1" type:"string" required:"true"`

	// ARN associated with the Facet. For more information, see arns.
	//
	// SchemaArn is a required field
	SchemaArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s DeleteFacetInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DeleteFacetInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteFacetInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DeleteFacetInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
	}
	if s.SchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetName sets the Name field's value.
func (s *DeleteFacetInput) SetName(v string) *DeleteFacetInput {
	s.Name = &v
	return s
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *DeleteFacetInput) SetSchemaArn(v string) *DeleteFacetInput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteFacetResponse
type DeleteFacetOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s DeleteFacetOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DeleteFacetOutput) GoString() string {
	return s.String()
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteObjectRequest
type DeleteObjectInput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the Directory where the object resides. For more information,
	// see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Reference that identifies the object.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s DeleteObjectInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DeleteObjectInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteObjectInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *DeleteObjectInput) SetDirectoryArn(v string) *DeleteObjectInput {
	s.DirectoryArn = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *DeleteObjectInput) SetObjectReference(v *ObjectReference) *DeleteObjectInput {
	s.ObjectReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteObjectResponse
type DeleteObjectOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s DeleteObjectOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DeleteObjectOutput) GoString() string {
	return s.String()
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteSchemaRequest
type DeleteSchemaInput struct {
	_ struct{} `type:"structure"`

	// ARN of the development schema. For more information, see arns.
	//
	// SchemaArn is a required field
	SchemaArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s DeleteSchemaInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DeleteSchemaInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteSchemaInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DeleteSchemaInput"}
	if s.SchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *DeleteSchemaInput) SetSchemaArn(v string) *DeleteSchemaInput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteSchemaResponse
type DeleteSchemaOutput struct {
	_ struct{} `type:"structure"`

	// Input ARN that is returned as part of the response. For more information,
	// see arns.
	SchemaArn *string `type:"string"`
}

// String returns the string representation
func (s DeleteSchemaOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DeleteSchemaOutput) GoString() string {
	return s.String()
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *DeleteSchemaOutput) SetSchemaArn(v string) *DeleteSchemaOutput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachFromIndexRequest
type DetachFromIndexInput struct {
	_ struct{} `type:"structure"`

	// The ARN of the directory the index and object exist in.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// A reference to the index object.
	//
	// IndexReference is a required field
	IndexReference *ObjectReference `type:"structure" required:"true"`

	// A reference to the object being detached from the index.
	//
	// TargetReference is a required field
	TargetReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s DetachFromIndexInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DetachFromIndexInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DetachFromIndexInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DetachFromIndexInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.IndexReference == nil {
		invalidParams.Add(request.NewErrParamRequired("IndexReference"))
	}
	if s.TargetReference == nil {
		invalidParams.Add(request.NewErrParamRequired("TargetReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *DetachFromIndexInput) SetDirectoryArn(v string) *DetachFromIndexInput {
	s.DirectoryArn = &v
	return s
}

// SetIndexReference sets the IndexReference field's value.
func (s *DetachFromIndexInput) SetIndexReference(v *ObjectReference) *DetachFromIndexInput {
	s.IndexReference = v
	return s
}

// SetTargetReference sets the TargetReference field's value.
func (s *DetachFromIndexInput) SetTargetReference(v *ObjectReference) *DetachFromIndexInput {
	s.TargetReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachFromIndexResponse
type DetachFromIndexOutput struct {
	_ struct{} `type:"structure"`

	// The ObjectIdentifier of the object that was detached from the index.
	DetachedObjectIdentifier *string `type:"string"`
}

// String returns the string representation
func (s DetachFromIndexOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DetachFromIndexOutput) GoString() string {
	return s.String()
}

// SetDetachedObjectIdentifier sets the DetachedObjectIdentifier field's value.
func (s *DetachFromIndexOutput) SetDetachedObjectIdentifier(v string) *DetachFromIndexOutput {
	s.DetachedObjectIdentifier = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachObjectRequest
type DetachObjectInput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the Directory where objects reside. For more information,
	// see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Link name associated with the object that needs to be detached.
	//
	// LinkName is a required field
	LinkName *string `type:"string" required:"true"`

	// Parent reference from which the object with the specified link name is detached.
	//
	// ParentReference is a required field
	ParentReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s DetachObjectInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DetachObjectInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DetachObjectInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DetachObjectInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.LinkName == nil {
		invalidParams.Add(request.NewErrParamRequired("LinkName"))
	}
	if s.ParentReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ParentReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *DetachObjectInput) SetDirectoryArn(v string) *DetachObjectInput {
	s.DirectoryArn = &v
	return s
}

// SetLinkName sets the LinkName field's value.
func (s *DetachObjectInput) SetLinkName(v string) *DetachObjectInput {
	s.LinkName = &v
	return s
}

// SetParentReference sets the ParentReference field's value.
func (s *DetachObjectInput) SetParentReference(v *ObjectReference) *DetachObjectInput {
	s.ParentReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachObjectResponse
type DetachObjectOutput struct {
	_ struct{} `type:"structure"`

	// The ObjectIdentifier that was detached from the object.
	DetachedObjectIdentifier *string `type:"string"`
}

// String returns the string representation
func (s DetachObjectOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DetachObjectOutput) GoString() string {
	return s.String()
}

// SetDetachedObjectIdentifier sets the DetachedObjectIdentifier field's value.
func (s *DetachObjectOutput) SetDetachedObjectIdentifier(v string) *DetachObjectOutput {
	s.DetachedObjectIdentifier = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachPolicyRequest
type DetachPolicyInput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the Directory where both objects reside. For more information,
	// see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Reference that identifies the object whose policy object will be detached.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`

	// Reference that identifies the policy object.
	//
	// PolicyReference is a required field
	PolicyReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s DetachPolicyInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DetachPolicyInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DetachPolicyInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DetachPolicyInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}
	if s.PolicyReference == nil {
		invalidParams.Add(request.NewErrParamRequired("PolicyReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *DetachPolicyInput) SetDirectoryArn(v string) *DetachPolicyInput {
	s.DirectoryArn = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *DetachPolicyInput) SetObjectReference(v *ObjectReference) *DetachPolicyInput {
	s.ObjectReference = v
	return s
}

// SetPolicyReference sets the PolicyReference field's value.
func (s *DetachPolicyInput) SetPolicyReference(v *ObjectReference) *DetachPolicyInput {
	s.PolicyReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachPolicyResponse
type DetachPolicyOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s DetachPolicyOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DetachPolicyOutput) GoString() string {
	return s.String()
}

// Directory structure that includes the directory name and directory ARN.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/Directory
type Directory struct {
	_ struct{} `type:"structure"`

	// The date and time when the directory was created.
	CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// ARN associated with the directory. For more information, see arns.
	DirectoryArn *string `type:"string"`

	// The name of the directory.
	Name *string `min:"1" type:"string"`

	// The state of the directory. Can be either Enabled, Disabled, or Deleted.
	State *string `type:"string" enum:"DirectoryState"`
}

// String returns the string representation
func (s Directory) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s Directory) GoString() string {
	return s.String()
}

// SetCreationDateTime sets the CreationDateTime field's value.
func (s *Directory) SetCreationDateTime(v time.Time) *Directory {
	s.CreationDateTime = &v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *Directory) SetDirectoryArn(v string) *Directory {
	s.DirectoryArn = &v
	return s
}

// SetName sets the Name field's value.
func (s *Directory) SetName(v string) *Directory {
	s.Name = &v
	return s
}

// SetState sets the State field's value.
func (s *Directory) SetState(v string) *Directory {
	s.State = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DisableDirectoryRequest
type DisableDirectoryInput struct {
	_ struct{} `type:"structure"`

	// The ARN of the directory to disable.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s DisableDirectoryInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DisableDirectoryInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DisableDirectoryInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DisableDirectoryInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *DisableDirectoryInput) SetDirectoryArn(v string) *DisableDirectoryInput {
	s.DirectoryArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DisableDirectoryResponse
type DisableDirectoryOutput struct {
	_ struct{} `type:"structure"`

	// The ARN of the directory that has been disabled.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `type:"string" required:"true"`
}

// String returns the string representation
func (s DisableDirectoryOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DisableDirectoryOutput) GoString() string {
	return s.String()
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *DisableDirectoryOutput) SetDirectoryArn(v string) *DisableDirectoryOutput {
	s.DirectoryArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/EnableDirectoryRequest
type EnableDirectoryInput struct {
	_ struct{} `type:"structure"`

	// The ARN of the directory to enable.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s EnableDirectoryInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s EnableDirectoryInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *EnableDirectoryInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "EnableDirectoryInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *EnableDirectoryInput) SetDirectoryArn(v string) *EnableDirectoryInput {
	s.DirectoryArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/EnableDirectoryResponse
type EnableDirectoryOutput struct {
	_ struct{} `type:"structure"`

	// The ARN of the enabled directory.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `type:"string" required:"true"`
}

// String returns the string representation
func (s EnableDirectoryOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s EnableDirectoryOutput) GoString() string {
	return s.String()
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *EnableDirectoryOutput) SetDirectoryArn(v string) *EnableDirectoryOutput {
	s.DirectoryArn = &v
	return s
}

// A structure that contains Name, ARN, Attributes, Rules, and ObjectTypes.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/Facet
type Facet struct {
	_ struct{} `type:"structure"`

	// The name of the Facet.
	Name *string `min:"1" type:"string"`

	// Object type associated with the facet. See CreateFacetRequest$ObjectType
	// for more details.
	ObjectType *string `type:"string" enum:"ObjectType"`
}

// String returns the string representation
func (s Facet) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s Facet) GoString() string {
	return s.String()
}

// SetName sets the Name field's value.
func (s *Facet) SetName(v string) *Facet {
	s.Name = &v
	return s
}

// SetObjectType sets the ObjectType field's value.
func (s *Facet) SetObjectType(v string) *Facet {
	s.ObjectType = &v
	return s
}

// Attribute associated with the Facet.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/FacetAttribute
type FacetAttribute struct {
	_ struct{} `type:"structure"`

	// A facet attribute consists of either a definition or a reference. This structure
	// contains the attribute definition. See Attribute References (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_advanced.html#attributereferences)
	// for more information.
	AttributeDefinition *FacetAttributeDefinition `type:"structure"`

	// Attribute reference associated with the attribute. See Attribute References
	// (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_advanced.html#attributereferences)
	// for more information.
	AttributeReference *FacetAttributeReference `type:"structure"`

	// The name of the facet attribute.
	//
	// Name is a required field
	Name *string `min:"1" type:"string" required:"true"`

	// The required behavior of the FacetAttribute.
	RequiredBehavior *string `type:"string" enum:"RequiredAttributeBehavior"`
}

// String returns the string representation
func (s FacetAttribute) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s FacetAttribute) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *FacetAttribute) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "FacetAttribute"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
	}
	if s.AttributeDefinition != nil {
		if err := s.AttributeDefinition.Validate(); err != nil {
			invalidParams.AddNested("AttributeDefinition", err.(request.ErrInvalidParams))
		}
	}
	if s.AttributeReference != nil {
		if err := s.AttributeReference.Validate(); err != nil {
			invalidParams.AddNested("AttributeReference", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAttributeDefinition sets the AttributeDefinition field's value.
func (s *FacetAttribute) SetAttributeDefinition(v *FacetAttributeDefinition) *FacetAttribute {
	s.AttributeDefinition = v
	return s
}

// SetAttributeReference sets the AttributeReference field's value.
func (s *FacetAttribute) SetAttributeReference(v *FacetAttributeReference) *FacetAttribute {
	s.AttributeReference = v
	return s
}

// SetName sets the Name field's value.
func (s *FacetAttribute) SetName(v string) *FacetAttribute {
	s.Name = &v
	return s
}

// SetRequiredBehavior sets the RequiredBehavior field's value.
func (s *FacetAttribute) SetRequiredBehavior(v string) *FacetAttribute {
	s.RequiredBehavior = &v
	return s
}

// A facet attribute definition. See Attribute References (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_advanced.html#attributereferences)
// for more information.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/FacetAttributeDefinition
type FacetAttributeDefinition struct {
	_ struct{} `type:"structure"`

	// The default value of the attribute (if configured).
	DefaultValue *TypedAttributeValue `type:"structure"`

	// Whether the attribute is mutable or not.
	IsImmutable *bool `type:"boolean"`

	// Validation rules attached to the attribute definition.
	Rules map[string]*Rule `type:"map"`

	// The type of the attribute.
	//
	// Type is a required field
	Type *string `type:"string" required:"true" enum:"FacetAttributeType"`
}

// String returns the string representation
func (s FacetAttributeDefinition) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s FacetAttributeDefinition) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *FacetAttributeDefinition) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "FacetAttributeDefinition"}
	if s.Type == nil {
		invalidParams.Add(request.NewErrParamRequired("Type"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDefaultValue sets the DefaultValue field's value.
func (s *FacetAttributeDefinition) SetDefaultValue(v *TypedAttributeValue) *FacetAttributeDefinition {
	s.DefaultValue = v
	return s
}

// SetIsImmutable sets the IsImmutable field's value.
func (s *FacetAttributeDefinition) SetIsImmutable(v bool) *FacetAttributeDefinition {
	s.IsImmutable = &v
	return s
}

// SetRules sets the Rules field's value.
func (s *FacetAttributeDefinition) SetRules(v map[string]*Rule) *FacetAttributeDefinition {
	s.Rules = v
	return s
}

// SetType sets the Type field's value.
func (s *FacetAttributeDefinition) SetType(v string) *FacetAttributeDefinition {
	s.Type = &v
	return s
}

// Facet attribute reference that specifies the attribute definition which contains
// attribute facet name and attribute name.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/FacetAttributeReference
type FacetAttributeReference struct {
	_ struct{} `type:"structure"`

	// Target attribute name associated with the facet reference. See Attribute
	// References (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_advanced.html#attributereferences)
	// for more information.
	//
	// TargetAttributeName is a required field
	TargetAttributeName *string `min:"1" type:"string" required:"true"`

	// Target facet name associated with the facet reference. See Attribute References
	// (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_advanced.html#attributereferences)
	// for more information.
	//
	// TargetFacetName is a required field
	TargetFacetName *string `min:"1" type:"string" required:"true"`
}

// String returns the string representation
func (s FacetAttributeReference) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s FacetAttributeReference) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *FacetAttributeReference) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "FacetAttributeReference"}
	if s.TargetAttributeName == nil {
		invalidParams.Add(request.NewErrParamRequired("TargetAttributeName"))
	}
	if s.TargetAttributeName != nil && len(*s.TargetAttributeName) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("TargetAttributeName", 1))
	}
	if s.TargetFacetName == nil {
		invalidParams.Add(request.NewErrParamRequired("TargetFacetName"))
	}
	if s.TargetFacetName != nil && len(*s.TargetFacetName) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("TargetFacetName", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetTargetAttributeName sets the TargetAttributeName field's value.
func (s *FacetAttributeReference) SetTargetAttributeName(v string) *FacetAttributeReference {
	s.TargetAttributeName = &v
	return s
}

// SetTargetFacetName sets the TargetFacetName field's value.
func (s *FacetAttributeReference) SetTargetFacetName(v string) *FacetAttributeReference {
	s.TargetFacetName = &v
	return s
}

// A structure that contains information used to update an attribute.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/FacetAttributeUpdate
type FacetAttributeUpdate struct {
	_ struct{} `type:"structure"`

	// The action to perform when updating the attribute.
	Action *string `type:"string" enum:"UpdateActionType"`

	// The attribute to update.
	Attribute *FacetAttribute `type:"structure"`
}

// String returns the string representation
func (s FacetAttributeUpdate) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s FacetAttributeUpdate) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *FacetAttributeUpdate) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "FacetAttributeUpdate"}
	if s.Attribute != nil {
		if err := s.Attribute.Validate(); err != nil {
			invalidParams.AddNested("Attribute", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAction sets the Action field's value.
func (s *FacetAttributeUpdate) SetAction(v string) *FacetAttributeUpdate {
	s.Action = &v
	return s
}

// SetAttribute sets the Attribute field's value.
func (s *FacetAttributeUpdate) SetAttribute(v *FacetAttribute) *FacetAttributeUpdate {
	s.Attribute = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetDirectoryRequest
type GetDirectoryInput struct {
	_ struct{} `type:"structure"`

	// The ARN of the directory.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s GetDirectoryInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s GetDirectoryInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetDirectoryInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetDirectoryInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *GetDirectoryInput) SetDirectoryArn(v string) *GetDirectoryInput {
	s.DirectoryArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetDirectoryResponse
type GetDirectoryOutput struct {
	_ struct{} `type:"structure"`

	// Metadata about the directory.
	//
	// Directory is a required field
	Directory *Directory `type:"structure" required:"true"`
}

// String returns the string representation
func (s GetDirectoryOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s GetDirectoryOutput) GoString() string {
	return s.String()
}

// SetDirectory sets the Directory field's value.
func (s *GetDirectoryOutput) SetDirectory(v *Directory) *GetDirectoryOutput {
	s.Directory = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetFacetRequest
type GetFacetInput struct {
	_ struct{} `type:"structure"`

	// The name of the facet to retrieve.
	//
	// Name is a required field
	Name *string `min:"1" type:"string" required:"true"`

	// ARN associated with the Facet. For more information, see arns.
	//
	// SchemaArn is a required field
	SchemaArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s GetFacetInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s GetFacetInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetFacetInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetFacetInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
	}
	if s.SchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetName sets the Name field's value.
func (s *GetFacetInput) SetName(v string) *GetFacetInput {
	s.Name = &v
	return s
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *GetFacetInput) SetSchemaArn(v string) *GetFacetInput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetFacetResponse
type GetFacetOutput struct {
	_ struct{} `type:"structure"`

	// Facet structure associated with the facet.
	Facet *Facet `type:"structure"`
}

// String returns the string representation
func (s GetFacetOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s GetFacetOutput) GoString() string {
	return s.String()
}

// SetFacet sets the Facet field's value.
func (s *GetFacetOutput) SetFacet(v *Facet) *GetFacetOutput {
	s.Facet = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetObjectInformationRequest
type GetObjectInformationInput struct {
	_ struct{} `type:"structure"`

	// The consistency level at which to retrieve the object information.
	ConsistencyLevel *string `location:"header" locationName:"x-amz-consistency-level" type:"string" enum:"ConsistencyLevel"`

	// The ARN of the directory being retrieved.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// A reference to the object.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s GetObjectInformationInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s GetObjectInformationInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetObjectInformationInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetObjectInformationInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetConsistencyLevel sets the ConsistencyLevel field's value.
func (s *GetObjectInformationInput) SetConsistencyLevel(v string) *GetObjectInformationInput {
	s.ConsistencyLevel = &v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *GetObjectInformationInput) SetDirectoryArn(v string) *GetObjectInformationInput {
	s.DirectoryArn = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *GetObjectInformationInput) SetObjectReference(v *ObjectReference) *GetObjectInformationInput {
	s.ObjectReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetObjectInformationResponse
type GetObjectInformationOutput struct {
	_ struct{} `type:"structure"`

	// The ObjectIdentifier of the specified object.
	ObjectIdentifier *string `type:"string"`

	// The facets attached to the specified object.
	SchemaFacets []*SchemaFacet `type:"list"`
}

// String returns the string representation
func (s GetObjectInformationOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s GetObjectInformationOutput) GoString() string {
	return s.String()
}

// SetObjectIdentifier sets the ObjectIdentifier field's value.
func (s *GetObjectInformationOutput) SetObjectIdentifier(v string) *GetObjectInformationOutput {
	s.ObjectIdentifier = &v
	return s
}

// SetSchemaFacets sets the SchemaFacets field's value.
func (s *GetObjectInformationOutput) SetSchemaFacets(v []*SchemaFacet) *GetObjectInformationOutput {
	s.SchemaFacets = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetSchemaAsJsonRequest
type GetSchemaAsJsonInput struct {
	_ struct{} `type:"structure"`

	// The ARN of the schema to retrieve.
	//
	// SchemaArn is a required field
	SchemaArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s GetSchemaAsJsonInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s GetSchemaAsJsonInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetSchemaAsJsonInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetSchemaAsJsonInput"}
	if s.SchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *GetSchemaAsJsonInput) SetSchemaArn(v string) *GetSchemaAsJsonInput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetSchemaAsJsonResponse
type GetSchemaAsJsonOutput struct {
	_ struct{} `type:"structure"`

	// The JSON representation of the schema document.
	Document *string `type:"string"`

	// The name of the retrieved schema.
	Name *string `min:"1" type:"string"`
}

// String returns the string representation
func (s GetSchemaAsJsonOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s GetSchemaAsJsonOutput) GoString() string {
	return s.String()
}

// SetDocument sets the Document field's value.
func (s *GetSchemaAsJsonOutput) SetDocument(v string) *GetSchemaAsJsonOutput {
	s.Document = &v
	return s
}

// SetName sets the Name field's value.
func (s *GetSchemaAsJsonOutput) SetName(v string) *GetSchemaAsJsonOutput {
	s.Name = &v
	return s
}

// Represents an index and an attached object.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/IndexAttachment
type IndexAttachment struct {
	_ struct{} `type:"structure"`

	// The indexed attribute values.
	IndexedAttributes []*AttributeKeyAndValue `type:"list"`

	// The ObjectIdentifier of the object attached to the index.
	ObjectIdentifier *string `type:"string"`
}

// String returns the string representation
func (s IndexAttachment) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s IndexAttachment) GoString() string {
	return s.String()
}

// SetIndexedAttributes sets the IndexedAttributes field's value.
func (s *IndexAttachment) SetIndexedAttributes(v []*AttributeKeyAndValue) *IndexAttachment {
	s.IndexedAttributes = v
	return s
}

// SetObjectIdentifier sets the ObjectIdentifier field's value.
func (s *IndexAttachment) SetObjectIdentifier(v string) *IndexAttachment {
	s.ObjectIdentifier = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListAppliedSchemaArnsRequest
type ListAppliedSchemaArnsInput struct {
	_ struct{} `type:"structure"`

	// The ARN of the directory you are listing.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `type:"string" required:"true"`

	// The maximum number of results to retrieve.
	MaxResults *int64 `type:"integer"`

	// The pagination token.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s ListAppliedSchemaArnsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListAppliedSchemaArnsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListAppliedSchemaArnsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListAppliedSchemaArnsInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *ListAppliedSchemaArnsInput) SetDirectoryArn(v string) *ListAppliedSchemaArnsInput {
	s.DirectoryArn = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListAppliedSchemaArnsInput) SetMaxResults(v int64) *ListAppliedSchemaArnsInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListAppliedSchemaArnsInput) SetNextToken(v string) *ListAppliedSchemaArnsInput {
	s.NextToken = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListAppliedSchemaArnsResponse
type ListAppliedSchemaArnsOutput struct {
	_ struct{} `type:"structure"`

	// The pagination token.
	NextToken *string `type:"string"`

	// The ARNs of schemas that are applied to the directory.
	SchemaArns []*string `type:"list"`
}

// String returns the string representation
func (s ListAppliedSchemaArnsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListAppliedSchemaArnsOutput) GoString() string {
	return s.String()
}

// SetNextToken sets the NextToken field's value.
func (s *ListAppliedSchemaArnsOutput) SetNextToken(v string) *ListAppliedSchemaArnsOutput {
	s.NextToken = &v
	return s
}

// SetSchemaArns sets the SchemaArns field's value.
func (s *ListAppliedSchemaArnsOutput) SetSchemaArns(v []*string) *ListAppliedSchemaArnsOutput {
	s.SchemaArns = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListAttachedIndicesRequest
type ListAttachedIndicesInput struct {
	_ struct{} `type:"structure"`

	// The consistency level to use for this operation.
	ConsistencyLevel *string `location:"header" locationName:"x-amz-consistency-level" type:"string" enum:"ConsistencyLevel"`

	// The ARN of the directory.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// The maximum number of results to retrieve.
	MaxResults *int64 `type:"integer"`

	// The pagination token.
	NextToken *string `type:"string"`

	// A reference to the object to that has indices attached.
	//
	// TargetReference is a required field
	TargetReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s ListAttachedIndicesInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListAttachedIndicesInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListAttachedIndicesInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListAttachedIndicesInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.TargetReference == nil {
		invalidParams.Add(request.NewErrParamRequired("TargetReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetConsistencyLevel sets the ConsistencyLevel field's value.
func (s *ListAttachedIndicesInput) SetConsistencyLevel(v string) *ListAttachedIndicesInput {
	s.ConsistencyLevel = &v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *ListAttachedIndicesInput) SetDirectoryArn(v string) *ListAttachedIndicesInput {
	s.DirectoryArn = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListAttachedIndicesInput) SetMaxResults(v int64) *ListAttachedIndicesInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListAttachedIndicesInput) SetNextToken(v string) *ListAttachedIndicesInput {
	s.NextToken = &v
	return s
}

// SetTargetReference sets the TargetReference field's value.
func (s *ListAttachedIndicesInput) SetTargetReference(v *ObjectReference) *ListAttachedIndicesInput {
	s.TargetReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListAttachedIndicesResponse
type ListAttachedIndicesOutput struct {
	_ struct{} `type:"structure"`

	// The indices attached to the specified object.
	IndexAttachments []*IndexAttachment `type:"list"`

	// The pagination token.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s ListAttachedIndicesOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListAttachedIndicesOutput) GoString() string {
	return s.String()
}

// SetIndexAttachments sets the IndexAttachments field's value.
func (s *ListAttachedIndicesOutput) SetIndexAttachments(v []*IndexAttachment) *ListAttachedIndicesOutput {
	s.IndexAttachments = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListAttachedIndicesOutput) SetNextToken(v string) *ListAttachedIndicesOutput {
	s.NextToken = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListDevelopmentSchemaArnsRequest
type ListDevelopmentSchemaArnsInput struct {
	_ struct{} `type:"structure"`

	// The maximum number of results to retrieve.
	MaxResults *int64 `type:"integer"`

	// The pagination token.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s ListDevelopmentSchemaArnsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListDevelopmentSchemaArnsInput) GoString() string {
	return s.String()
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListDevelopmentSchemaArnsInput) SetMaxResults(v int64) *ListDevelopmentSchemaArnsInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListDevelopmentSchemaArnsInput) SetNextToken(v string) *ListDevelopmentSchemaArnsInput {
	s.NextToken = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListDevelopmentSchemaArnsResponse
type ListDevelopmentSchemaArnsOutput struct {
	_ struct{} `type:"structure"`

	// The pagination token.
	NextToken *string `type:"string"`

	// The ARNs of retrieved development schemas.
	SchemaArns []*string `type:"list"`
}

// String returns the string representation
func (s ListDevelopmentSchemaArnsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListDevelopmentSchemaArnsOutput) GoString() string {
	return s.String()
}

// SetNextToken sets the NextToken field's value.
func (s *ListDevelopmentSchemaArnsOutput) SetNextToken(v string) *ListDevelopmentSchemaArnsOutput {
	s.NextToken = &v
	return s
}

// SetSchemaArns sets the SchemaArns field's value.
func (s *ListDevelopmentSchemaArnsOutput) SetSchemaArns(v []*string) *ListDevelopmentSchemaArnsOutput {
	s.SchemaArns = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListDirectoriesRequest
type ListDirectoriesInput struct {
	_ struct{} `type:"structure"`

	// The maximum number of results to retrieve.
	MaxResults *int64 `type:"integer"`

	// The pagination token.
	NextToken *string `type:"string"`

	// The state of the directories in the list. Can be either Enabled, Disabled,
	// or Deleted.
	State *string `locationName:"state" type:"string" enum:"DirectoryState"`
}

// String returns the string representation
func (s ListDirectoriesInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListDirectoriesInput) GoString() string {
	return s.String()
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListDirectoriesInput) SetMaxResults(v int64) *ListDirectoriesInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListDirectoriesInput) SetNextToken(v string) *ListDirectoriesInput {
	s.NextToken = &v
	return s
}

// SetState sets the State field's value.
func (s *ListDirectoriesInput) SetState(v string) *ListDirectoriesInput {
	s.State = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListDirectoriesResponse
type ListDirectoriesOutput struct {
	_ struct{} `type:"structure"`

	// Lists all directories associated with your account in pagination fashion.
	//
	// Directories is a required field
	Directories []*Directory `type:"list" required:"true"`

	// The pagination token.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s ListDirectoriesOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListDirectoriesOutput) GoString() string {
	return s.String()
}

// SetDirectories sets the Directories field's value.
func (s *ListDirectoriesOutput) SetDirectories(v []*Directory) *ListDirectoriesOutput {
	s.Directories = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListDirectoriesOutput) SetNextToken(v string) *ListDirectoriesOutput {
	s.NextToken = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListFacetAttributesRequest
type ListFacetAttributesInput struct {
	_ struct{} `type:"structure"`

	// The maximum number of results to retrieve.
	MaxResults *int64 `type:"integer"`

	// The name of the facet whose attributes will be retrieved.
	//
	// Name is a required field
	Name *string `min:"1" type:"string" required:"true"`

	// The pagination token.
	NextToken *string `type:"string"`

	// The ARN of the schema where the facet resides.
	//
	// SchemaArn is a required field
	SchemaArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s ListFacetAttributesInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListFacetAttributesInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListFacetAttributesInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListFacetAttributesInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
	}
	if s.SchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListFacetAttributesInput) SetMaxResults(v int64) *ListFacetAttributesInput {
	s.MaxResults = &v
	return s
}

// SetName sets the Name field's value.
func (s *ListFacetAttributesInput) SetName(v string) *ListFacetAttributesInput {
	s.Name = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListFacetAttributesInput) SetNextToken(v string) *ListFacetAttributesInput {
	s.NextToken = &v
	return s
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *ListFacetAttributesInput) SetSchemaArn(v string) *ListFacetAttributesInput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListFacetAttributesResponse
type ListFacetAttributesOutput struct {
	_ struct{} `type:"structure"`

	// The attributes attached to the facet.
	Attributes []*FacetAttribute `type:"list"`

	// The pagination token.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s ListFacetAttributesOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListFacetAttributesOutput) GoString() string {
	return s.String()
}

// SetAttributes sets the Attributes field's value.
func (s *ListFacetAttributesOutput) SetAttributes(v []*FacetAttribute) *ListFacetAttributesOutput {
	s.Attributes = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListFacetAttributesOutput) SetNextToken(v string) *ListFacetAttributesOutput {
	s.NextToken = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListFacetNamesRequest
type ListFacetNamesInput struct {
	_ struct{} `type:"structure"`

	// The maximum number of results to retrieve
	MaxResults *int64 `type:"integer"`

	// The pagination token.
	NextToken *string `type:"string"`

	// The ARN to retrieve facet names from.
	//
	// SchemaArn is a required field
	SchemaArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s ListFacetNamesInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListFacetNamesInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListFacetNamesInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListFacetNamesInput"}
	if s.SchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListFacetNamesInput) SetMaxResults(v int64) *ListFacetNamesInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListFacetNamesInput) SetNextToken(v string) *ListFacetNamesInput {
	s.NextToken = &v
	return s
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *ListFacetNamesInput) SetSchemaArn(v string) *ListFacetNamesInput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListFacetNamesResponse
type ListFacetNamesOutput struct {
	_ struct{} `type:"structure"`

	// The names of facets that exist within the schema.
	FacetNames []*string `type:"list"`

	// The pagination token.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s ListFacetNamesOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListFacetNamesOutput) GoString() string {
	return s.String()
}

// SetFacetNames sets the FacetNames field's value.
func (s *ListFacetNamesOutput) SetFacetNames(v []*string) *ListFacetNamesOutput {
	s.FacetNames = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListFacetNamesOutput) SetNextToken(v string) *ListFacetNamesOutput {
	s.NextToken = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListIndexRequest
type ListIndexInput struct {
	_ struct{} `type:"structure"`

	// The consistency level to execute the request at.
	ConsistencyLevel *string `location:"header" locationName:"x-amz-consistency-level" type:"string" enum:"ConsistencyLevel"`

	// The ARN of the directory that the index exists in.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// The reference to the index to list.
	//
	// IndexReference is a required field
	IndexReference *ObjectReference `type:"structure" required:"true"`

	// The maximum number of results to retrieve from the index.
	MaxResults *int64 `type:"integer"`

	// The pagination token.
	NextToken *string `type:"string"`

	// Specifies the ranges of indexed values that you want to query.
	RangesOnIndexedValues []*ObjectAttributeRange `type:"list"`
}

// String returns the string representation
func (s ListIndexInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListIndexInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListIndexInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListIndexInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.IndexReference == nil {
		invalidParams.Add(request.NewErrParamRequired("IndexReference"))
	}
	if s.RangesOnIndexedValues != nil {
		for i, v := range s.RangesOnIndexedValues {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RangesOnIndexedValues", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetConsistencyLevel sets the ConsistencyLevel field's value.
func (s *ListIndexInput) SetConsistencyLevel(v string) *ListIndexInput {
	s.ConsistencyLevel = &v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *ListIndexInput) SetDirectoryArn(v string) *ListIndexInput {
	s.DirectoryArn = &v
	return s
}

// SetIndexReference sets the IndexReference field's value.
func (s *ListIndexInput) SetIndexReference(v *ObjectReference) *ListIndexInput {
	s.IndexReference = v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListIndexInput) SetMaxResults(v int64) *ListIndexInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListIndexInput) SetNextToken(v string) *ListIndexInput {
	s.NextToken = &v
	return s
}

// SetRangesOnIndexedValues sets the RangesOnIndexedValues field's value.
func (s *ListIndexInput) SetRangesOnIndexedValues(v []*ObjectAttributeRange) *ListIndexInput {
	s.RangesOnIndexedValues = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListIndexResponse
type ListIndexOutput struct {
	_ struct{} `type:"structure"`

	// The objects and indexed values attached to the index.
	IndexAttachments []*IndexAttachment `type:"list"`

	// The pagination token.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s ListIndexOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListIndexOutput) GoString() string {
	return s.String()
}

// SetIndexAttachments sets the IndexAttachments field's value.
func (s *ListIndexOutput) SetIndexAttachments(v []*IndexAttachment) *ListIndexOutput {
	s.IndexAttachments = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListIndexOutput) SetNextToken(v string) *ListIndexOutput {
	s.NextToken = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectAttributesRequest
type ListObjectAttributesInput struct {
	_ struct{} `type:"structure"`

	// Represents the manner and timing in which the successful write or update
	// of an object is reflected in a subsequent read operation of that same object.
	ConsistencyLevel *string `location:"header" locationName:"x-amz-consistency-level" type:"string" enum:"ConsistencyLevel"`

	// ARN associated with the Directory where the object resides. For more information,
	// see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Maximum number of items to be retrieved in a single call. This is an approximate
	// number.
	MaxResults *int64 `type:"integer"`

	// Token used for pagination.
	NextToken *string `type:"string"`

	// Reference that identifies the object whose attributes will be listed.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s ListObjectAttributesInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListObjectAttributesInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListObjectAttributesInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListObjectAttributesInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetConsistencyLevel sets the ConsistencyLevel field's value.
func (s *ListObjectAttributesInput) SetConsistencyLevel(v string) *ListObjectAttributesInput {
	s.ConsistencyLevel = &v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *ListObjectAttributesInput) SetDirectoryArn(v string) *ListObjectAttributesInput {
	s.DirectoryArn = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListObjectAttributesInput) SetMaxResults(v int64) *ListObjectAttributesInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListObjectAttributesInput) SetNextToken(v string) *ListObjectAttributesInput {
	s.NextToken = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *ListObjectAttributesInput) SetObjectReference(v *ObjectReference) *ListObjectAttributesInput {
	s.ObjectReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectAttributesResponse
type ListObjectAttributesOutput struct {
	_ struct{} `type:"structure"`

	// Attributes map associated with the object. AttributeArn is the key, and attribute
	// value is the value.
	Attributes []*AttributeKeyAndValue `type:"list"`

	// Token used for pagination.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s ListObjectAttributesOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListObjectAttributesOutput) GoString() string {
	return s.String()
}

// SetAttributes sets the Attributes field's value.
func (s *ListObjectAttributesOutput) SetAttributes(v []*AttributeKeyAndValue) *ListObjectAttributesOutput {
	s.Attributes = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListObjectAttributesOutput) SetNextToken(v string) *ListObjectAttributesOutput {
	s.NextToken = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectChildrenRequest
type ListObjectChildrenInput struct {
	_ struct{} `type:"structure"`

	// Represents the manner and timing in which the successful write or update
	// of an object is reflected in a subsequent read operation of that same object.
	ConsistencyLevel *string `location:"header" locationName:"x-amz-consistency-level" type:"string" enum:"ConsistencyLevel"`

	// ARN associated with the Directory where the object resides. For more information,
	// see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Maximum number of items to be retrieved in a single call. This is an approximate
	// number.
	MaxResults *int64 `type:"integer"`

	// Token used for pagination.
	NextToken *string `type:"string"`

	// Reference that identifies the object for which child objects are being listed.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s ListObjectChildrenInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListObjectChildrenInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListObjectChildrenInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListObjectChildrenInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetConsistencyLevel sets the ConsistencyLevel field's value.
func (s *ListObjectChildrenInput) SetConsistencyLevel(v string) *ListObjectChildrenInput {
	s.ConsistencyLevel = &v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *ListObjectChildrenInput) SetDirectoryArn(v string) *ListObjectChildrenInput {
	s.DirectoryArn = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListObjectChildrenInput) SetMaxResults(v int64) *ListObjectChildrenInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListObjectChildrenInput) SetNextToken(v string) *ListObjectChildrenInput {
	s.NextToken = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *ListObjectChildrenInput) SetObjectReference(v *ObjectReference) *ListObjectChildrenInput {
	s.ObjectReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectChildrenResponse
type ListObjectChildrenOutput struct {
	_ struct{} `type:"structure"`

	// Children structure, which is a map with key as the LinkName and ObjectIdentifier
	// as the value.
	Children map[string]*string `type:"map"`

	// Token used for pagination.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s ListObjectChildrenOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListObjectChildrenOutput) GoString() string {
	return s.String()
}

// SetChildren sets the Children field's value.
func (s *ListObjectChildrenOutput) SetChildren(v map[string]*string) *ListObjectChildrenOutput {
	s.Children = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListObjectChildrenOutput) SetNextToken(v string) *ListObjectChildrenOutput {
	s.NextToken = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectParentsRequest
type ListObjectParentsInput struct {
	_ struct{} `type:"structure"`

	// Represents the manner and timing in which the successful write or update
	// of an object is reflected in a subsequent read operation of that same object.
	ConsistencyLevel *string `location:"header" locationName:"x-amz-consistency-level" type:"string" enum:"ConsistencyLevel"`

	// ARN associated with the Directory where the object resides. For more information,
	// see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Maximum number of items to be retrieved in a single call. This is an approximate
	// number.
	MaxResults *int64 `type:"integer"`

	// Token used for pagination.
	NextToken *string `type:"string"`

	// Reference that identifies the object for which parent objects are being listed.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s ListObjectParentsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListObjectParentsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListObjectParentsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListObjectParentsInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetConsistencyLevel sets the ConsistencyLevel field's value.
func (s *ListObjectParentsInput) SetConsistencyLevel(v string) *ListObjectParentsInput {
	s.ConsistencyLevel = &v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *ListObjectParentsInput) SetDirectoryArn(v string) *ListObjectParentsInput {
	s.DirectoryArn = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListObjectParentsInput) SetMaxResults(v int64) *ListObjectParentsInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListObjectParentsInput) SetNextToken(v string) *ListObjectParentsInput {
	s.NextToken = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *ListObjectParentsInput) SetObjectReference(v *ObjectReference) *ListObjectParentsInput {
	s.ObjectReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectParentsResponse
type ListObjectParentsOutput struct {
	_ struct{} `type:"structure"`

	// Token used for pagination.
	NextToken *string `type:"string"`

	// Parent structure, which is a map with key as the ObjectIdentifier and LinkName
	// as the value.
	Parents map[string]*string `type:"map"`
}

// String returns the string representation
func (s ListObjectParentsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListObjectParentsOutput) GoString() string {
	return s.String()
}

// SetNextToken sets the NextToken field's value.
func (s *ListObjectParentsOutput) SetNextToken(v string) *ListObjectParentsOutput {
	s.NextToken = &v
	return s
}

// SetParents sets the Parents field's value.
func (s *ListObjectParentsOutput) SetParents(v map[string]*string) *ListObjectParentsOutput {
	s.Parents = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectPoliciesRequest
type ListObjectPoliciesInput struct {
	_ struct{} `type:"structure"`

	// Represents the manner and timing in which the successful write or update
	// of an object is reflected in a subsequent read operation of that same object.
	ConsistencyLevel *string `location:"header" locationName:"x-amz-consistency-level" type:"string" enum:"ConsistencyLevel"`

	// ARN associated with the Directory where objects reside. For more information,
	// see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Maximum number of items to be retrieved in a single call. This is an approximate
	// number.
	MaxResults *int64 `type:"integer"`

	// Token used for pagination.
	NextToken *string `type:"string"`

	// Reference that identifies the object for which policies will be listed.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s ListObjectPoliciesInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListObjectPoliciesInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListObjectPoliciesInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListObjectPoliciesInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetConsistencyLevel sets the ConsistencyLevel field's value.
func (s *ListObjectPoliciesInput) SetConsistencyLevel(v string) *ListObjectPoliciesInput {
	s.ConsistencyLevel = &v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *ListObjectPoliciesInput) SetDirectoryArn(v string) *ListObjectPoliciesInput {
	s.DirectoryArn = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListObjectPoliciesInput) SetMaxResults(v int64) *ListObjectPoliciesInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListObjectPoliciesInput) SetNextToken(v string) *ListObjectPoliciesInput {
	s.NextToken = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *ListObjectPoliciesInput) SetObjectReference(v *ObjectReference) *ListObjectPoliciesInput {
	s.ObjectReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectPoliciesResponse
type ListObjectPoliciesOutput struct {
	_ struct{} `type:"structure"`

	// List of policy ObjectIdentifiers, that are attached to the object.
	AttachedPolicyIds []*string `type:"list"`

	// Token used for pagination.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s ListObjectPoliciesOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListObjectPoliciesOutput) GoString() string {
	return s.String()
}

// SetAttachedPolicyIds sets the AttachedPolicyIds field's value.
func (s *ListObjectPoliciesOutput) SetAttachedPolicyIds(v []*string) *ListObjectPoliciesOutput {
	s.AttachedPolicyIds = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListObjectPoliciesOutput) SetNextToken(v string) *ListObjectPoliciesOutput {
	s.NextToken = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListPolicyAttachmentsRequest
type ListPolicyAttachmentsInput struct {
	_ struct{} `type:"structure"`

	// Represents the manner and timing in which the successful write or update
	// of an object is reflected in a subsequent read operation of that same object.
	ConsistencyLevel *string `location:"header" locationName:"x-amz-consistency-level" type:"string" enum:"ConsistencyLevel"`

	// ARN associated with the Directory where objects reside. For more information,
	// see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Maximum number of items to be retrieved in a single call. This is an approximate
	// number.
	MaxResults *int64 `type:"integer"`

	// Token used for pagination.
	NextToken *string `type:"string"`

	// Reference that identifies the policy object.
	//
	// PolicyReference is a required field
	PolicyReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s ListPolicyAttachmentsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListPolicyAttachmentsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListPolicyAttachmentsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListPolicyAttachmentsInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.PolicyReference == nil {
		invalidParams.Add(request.NewErrParamRequired("PolicyReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetConsistencyLevel sets the ConsistencyLevel field's value.
func (s *ListPolicyAttachmentsInput) SetConsistencyLevel(v string) *ListPolicyAttachmentsInput {
	s.ConsistencyLevel = &v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *ListPolicyAttachmentsInput) SetDirectoryArn(v string) *ListPolicyAttachmentsInput {
	s.DirectoryArn = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListPolicyAttachmentsInput) SetMaxResults(v int64) *ListPolicyAttachmentsInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListPolicyAttachmentsInput) SetNextToken(v string) *ListPolicyAttachmentsInput {
	s.NextToken = &v
	return s
}

// SetPolicyReference sets the PolicyReference field's value.
func (s *ListPolicyAttachmentsInput) SetPolicyReference(v *ObjectReference) *ListPolicyAttachmentsInput {
	s.PolicyReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListPolicyAttachmentsResponse
type ListPolicyAttachmentsOutput struct {
	_ struct{} `type:"structure"`

	// Token used for pagination.
	NextToken *string `type:"string"`

	// List of ObjectIdentifiers to which the policy is attached.
	ObjectIdentifiers []*string `type:"list"`
}

// String returns the string representation
func (s ListPolicyAttachmentsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListPolicyAttachmentsOutput) GoString() string {
	return s.String()
}

// SetNextToken sets the NextToken field's value.
func (s *ListPolicyAttachmentsOutput) SetNextToken(v string) *ListPolicyAttachmentsOutput {
	s.NextToken = &v
	return s
}

// SetObjectIdentifiers sets the ObjectIdentifiers field's value.
func (s *ListPolicyAttachmentsOutput) SetObjectIdentifiers(v []*string) *ListPolicyAttachmentsOutput {
	s.ObjectIdentifiers = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListPublishedSchemaArnsRequest
type ListPublishedSchemaArnsInput struct {
	_ struct{} `type:"structure"`

	// The maximum number of results to retrieve.
	MaxResults *int64 `type:"integer"`

	// The pagination token.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s ListPublishedSchemaArnsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListPublishedSchemaArnsInput) GoString() string {
	return s.String()
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListPublishedSchemaArnsInput) SetMaxResults(v int64) *ListPublishedSchemaArnsInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListPublishedSchemaArnsInput) SetNextToken(v string) *ListPublishedSchemaArnsInput {
	s.NextToken = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListPublishedSchemaArnsResponse
type ListPublishedSchemaArnsOutput struct {
	_ struct{} `type:"structure"`

	// The pagination token.
	NextToken *string `type:"string"`

	// The ARNs of published schemas.
	SchemaArns []*string `type:"list"`
}

// String returns the string representation
func (s ListPublishedSchemaArnsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListPublishedSchemaArnsOutput) GoString() string {
	return s.String()
}

// SetNextToken sets the NextToken field's value.
func (s *ListPublishedSchemaArnsOutput) SetNextToken(v string) *ListPublishedSchemaArnsOutput {
	s.NextToken = &v
	return s
}

// SetSchemaArns sets the SchemaArns field's value.
func (s *ListPublishedSchemaArnsOutput) SetSchemaArns(v []*string) *ListPublishedSchemaArnsOutput {
	s.SchemaArns = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListTagsForResourceRequest
type ListTagsForResourceInput struct {
	_ struct{} `type:"structure"`

	// The MaxResults parameter sets the maximum number of results returned in a
	// single page. This is for future use and is not supported currently.
	MaxResults *int64 `min:"50" type:"integer"`

	// Next token used for pagination. This is for future use. Currently pagination
	// is not supported for tagging.
	NextToken *string `type:"string"`

	// ARN of the resource. Tagging is only supported for directories.
	//
	// ResourceArn is a required field
	ResourceArn *string `type:"string" required:"true"`
}

// String returns the string representation
func (s ListTagsForResourceInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListTagsForResourceInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListTagsForResourceInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
	if s.MaxResults != nil && *s.MaxResults < 50 {
		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 50))
	}
	if s.ResourceArn == nil {
		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput {
	s.NextToken = &v
	return s
}

// SetResourceArn sets the ResourceArn field's value.
func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput {
	s.ResourceArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListTagsForResourceResponse
type ListTagsForResourceOutput struct {
	_ struct{} `type:"structure"`

	// The token to use to retrieve the next page of results. This value is null
	// when there are no more results to return.
	NextToken *string `type:"string"`

	// List of tag key value pairs associated with the response.
	Tags []*Tag `type:"list"`
}

// String returns the string representation
func (s ListTagsForResourceOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListTagsForResourceOutput) GoString() string {
	return s.String()
}

// SetNextToken sets the NextToken field's value.
func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput {
	s.NextToken = &v
	return s
}

// SetTags sets the Tags field's value.
func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput {
	s.Tags = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/LookupPolicyRequest
type LookupPolicyInput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the Directory. For more information, see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Maximum number of items to be retrieved in a single call. This is an approximate
	// number.
	MaxResults *int64 `type:"integer"`

	// The token to request the next page of results.
	NextToken *string `type:"string"`

	// Reference that identifies the object whose policies will be looked up.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s LookupPolicyInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s LookupPolicyInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *LookupPolicyInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "LookupPolicyInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *LookupPolicyInput) SetDirectoryArn(v string) *LookupPolicyInput {
	s.DirectoryArn = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *LookupPolicyInput) SetMaxResults(v int64) *LookupPolicyInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *LookupPolicyInput) SetNextToken(v string) *LookupPolicyInput {
	s.NextToken = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *LookupPolicyInput) SetObjectReference(v *ObjectReference) *LookupPolicyInput {
	s.ObjectReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/LookupPolicyResponse
type LookupPolicyOutput struct {
	_ struct{} `type:"structure"`

	// Token used for pagination.
	NextToken *string `type:"string"`

	// Provides list of path to policies. Policies contain PolicyId, ObjectIdentifier,
	// and PolicyType.
	PolicyToPathList []*PolicyToPath `type:"list"`
}

// String returns the string representation
func (s LookupPolicyOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s LookupPolicyOutput) GoString() string {
	return s.String()
}

// SetNextToken sets the NextToken field's value.
func (s *LookupPolicyOutput) SetNextToken(v string) *LookupPolicyOutput {
	s.NextToken = &v
	return s
}

// SetPolicyToPathList sets the PolicyToPathList field's value.
func (s *LookupPolicyOutput) SetPolicyToPathList(v []*PolicyToPath) *LookupPolicyOutput {
	s.PolicyToPathList = v
	return s
}

// The action to take on the object attribute.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ObjectAttributeAction
type ObjectAttributeAction struct {
	_ struct{} `type:"structure"`

	// Type can be either Update or Delete.
	ObjectAttributeActionType *string `type:"string" enum:"UpdateActionType"`

	// The value that you want to update to.
	ObjectAttributeUpdateValue *TypedAttributeValue `type:"structure"`
}

// String returns the string representation
func (s ObjectAttributeAction) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ObjectAttributeAction) GoString() string {
	return s.String()
}

// SetObjectAttributeActionType sets the ObjectAttributeActionType field's value.
func (s *ObjectAttributeAction) SetObjectAttributeActionType(v string) *ObjectAttributeAction {
	s.ObjectAttributeActionType = &v
	return s
}

// SetObjectAttributeUpdateValue sets the ObjectAttributeUpdateValue field's value.
func (s *ObjectAttributeAction) SetObjectAttributeUpdateValue(v *TypedAttributeValue) *ObjectAttributeAction {
	s.ObjectAttributeUpdateValue = v
	return s
}

// A range of attributes.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ObjectAttributeRange
type ObjectAttributeRange struct {
	_ struct{} `type:"structure"`

	// The key of the attribute the attribute range covers.
	AttributeKey *AttributeKey `type:"structure"`

	// The range of attribute values being selected.
	Range *TypedAttributeValueRange `type:"structure"`
}

// String returns the string representation
func (s ObjectAttributeRange) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ObjectAttributeRange) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ObjectAttributeRange) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ObjectAttributeRange"}
	if s.AttributeKey != nil {
		if err := s.AttributeKey.Validate(); err != nil {
			invalidParams.AddNested("AttributeKey", err.(request.ErrInvalidParams))
		}
	}
	if s.Range != nil {
		if err := s.Range.Validate(); err != nil {
			invalidParams.AddNested("Range", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAttributeKey sets the AttributeKey field's value.
func (s *ObjectAttributeRange) SetAttributeKey(v *AttributeKey) *ObjectAttributeRange {
	s.AttributeKey = v
	return s
}

// SetRange sets the Range field's value.
func (s *ObjectAttributeRange) SetRange(v *TypedAttributeValueRange) *ObjectAttributeRange {
	s.Range = v
	return s
}

// Structure that contains attribute update information.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ObjectAttributeUpdate
type ObjectAttributeUpdate struct {
	_ struct{} `type:"structure"`

	// The action to perform as part of the attribute update.
	ObjectAttributeAction *ObjectAttributeAction `type:"structure"`

	// The key of the attribute being updated.
	ObjectAttributeKey *AttributeKey `type:"structure"`
}

// String returns the string representation
func (s ObjectAttributeUpdate) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ObjectAttributeUpdate) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ObjectAttributeUpdate) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ObjectAttributeUpdate"}
	if s.ObjectAttributeKey != nil {
		if err := s.ObjectAttributeKey.Validate(); err != nil {
			invalidParams.AddNested("ObjectAttributeKey", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetObjectAttributeAction sets the ObjectAttributeAction field's value.
func (s *ObjectAttributeUpdate) SetObjectAttributeAction(v *ObjectAttributeAction) *ObjectAttributeUpdate {
	s.ObjectAttributeAction = v
	return s
}

// SetObjectAttributeKey sets the ObjectAttributeKey field's value.
func (s *ObjectAttributeUpdate) SetObjectAttributeKey(v *AttributeKey) *ObjectAttributeUpdate {
	s.ObjectAttributeKey = v
	return s
}

// Reference that identifies an object.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ObjectReference
type ObjectReference struct {
	_ struct{} `type:"structure"`

	// Allows you to specify an object. You can identify an object in one of the
	// following ways:
	//
	//    * $ObjectIdentifier - Identifies the object by ObjectIdentifier
	//
	//    * /some/path - Identifies the object based on path
	//
	//    * #SomeBatchReference - Identifies the object in a batch call
	Selector *string `type:"string"`
}

// String returns the string representation
func (s ObjectReference) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ObjectReference) GoString() string {
	return s.String()
}

// SetSelector sets the Selector field's value.
func (s *ObjectReference) SetSelector(v string) *ObjectReference {
	s.Selector = &v
	return s
}

// Contains the PolicyType, PolicyId, and the ObjectIdentifier to which it is
// attached.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PolicyAttachment
type PolicyAttachment struct {
	_ struct{} `type:"structure"`

	// The ObjectIdentifier associated with PolicyAttachment.
	ObjectIdentifier *string `type:"string"`

	// The ID of PolicyAttachment.
	PolicyId *string `type:"string"`

	// The type of policy that can be associated with PolicyAttachment.
	PolicyType *string `type:"string"`
}

// String returns the string representation
func (s PolicyAttachment) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s PolicyAttachment) GoString() string {
	return s.String()
}

// SetObjectIdentifier sets the ObjectIdentifier field's value.
func (s *PolicyAttachment) SetObjectIdentifier(v string) *PolicyAttachment {
	s.ObjectIdentifier = &v
	return s
}

// SetPolicyId sets the PolicyId field's value.
func (s *PolicyAttachment) SetPolicyId(v string) *PolicyAttachment {
	s.PolicyId = &v
	return s
}

// SetPolicyType sets the PolicyType field's value.
func (s *PolicyAttachment) SetPolicyType(v string) *PolicyAttachment {
	s.PolicyType = &v
	return s
}

// Used when a regular object exists in a Directory and you want to find all
// of the policies associated with that object and the parent to that object.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PolicyToPath
type PolicyToPath struct {
	_ struct{} `type:"structure"`

	// The path that is referenced from the root.
	Path *string `type:"string"`

	// List of policy objects.
	Policies []*PolicyAttachment `type:"list"`
}

// String returns the string representation
func (s PolicyToPath) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s PolicyToPath) GoString() string {
	return s.String()
}

// SetPath sets the Path field's value.
func (s *PolicyToPath) SetPath(v string) *PolicyToPath {
	s.Path = &v
	return s
}

// SetPolicies sets the Policies field's value.
func (s *PolicyToPath) SetPolicies(v []*PolicyAttachment) *PolicyToPath {
	s.Policies = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PublishSchemaRequest
type PublishSchemaInput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the development schema. For more information, see arns.
	//
	// DevelopmentSchemaArn is a required field
	DevelopmentSchemaArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// New name under which the schema will be published. If this is not provided,
	// the development schema is considered.
	Name *string `min:"1" type:"string"`

	// Version under which the schema will be published.
	//
	// Version is a required field
	Version *string `min:"1" type:"string" required:"true"`
}

// String returns the string representation
func (s PublishSchemaInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s PublishSchemaInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *PublishSchemaInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "PublishSchemaInput"}
	if s.DevelopmentSchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DevelopmentSchemaArn"))
	}
	if s.Name != nil && len(*s.Name) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
	}
	if s.Version == nil {
		invalidParams.Add(request.NewErrParamRequired("Version"))
	}
	if s.Version != nil && len(*s.Version) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Version", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDevelopmentSchemaArn sets the DevelopmentSchemaArn field's value.
func (s *PublishSchemaInput) SetDevelopmentSchemaArn(v string) *PublishSchemaInput {
	s.DevelopmentSchemaArn = &v
	return s
}

// SetName sets the Name field's value.
func (s *PublishSchemaInput) SetName(v string) *PublishSchemaInput {
	s.Name = &v
	return s
}

// SetVersion sets the Version field's value.
func (s *PublishSchemaInput) SetVersion(v string) *PublishSchemaInput {
	s.Version = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PublishSchemaResponse
type PublishSchemaOutput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the published schema. For more information, see arns.
	PublishedSchemaArn *string `type:"string"`
}

// String returns the string representation
func (s PublishSchemaOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s PublishSchemaOutput) GoString() string {
	return s.String()
}

// SetPublishedSchemaArn sets the PublishedSchemaArn field's value.
func (s *PublishSchemaOutput) SetPublishedSchemaArn(v string) *PublishSchemaOutput {
	s.PublishedSchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PutSchemaFromJsonRequest
type PutSchemaFromJsonInput struct {
	_ struct{} `type:"structure"`

	// The replacement JSON schema.
	//
	// Document is a required field
	Document *string `type:"string" required:"true"`

	// The ARN of the schema to update.
	//
	// SchemaArn is a required field
	SchemaArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s PutSchemaFromJsonInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s PutSchemaFromJsonInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *PutSchemaFromJsonInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "PutSchemaFromJsonInput"}
	if s.Document == nil {
		invalidParams.Add(request.NewErrParamRequired("Document"))
	}
	if s.SchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDocument sets the Document field's value.
func (s *PutSchemaFromJsonInput) SetDocument(v string) *PutSchemaFromJsonInput {
	s.Document = &v
	return s
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *PutSchemaFromJsonInput) SetSchemaArn(v string) *PutSchemaFromJsonInput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PutSchemaFromJsonResponse
type PutSchemaFromJsonOutput struct {
	_ struct{} `type:"structure"`

	// The ARN of the schema to update.
	Arn *string `type:"string"`
}

// String returns the string representation
func (s PutSchemaFromJsonOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s PutSchemaFromJsonOutput) GoString() string {
	return s.String()
}

// SetArn sets the Arn field's value.
func (s *PutSchemaFromJsonOutput) SetArn(v string) *PutSchemaFromJsonOutput {
	s.Arn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/RemoveFacetFromObjectRequest
type RemoveFacetFromObjectInput struct {
	_ struct{} `type:"structure"`

	// The ARN of the directory in which the object resides.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// A reference to the object to remove the facet from.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`

	// The facet to remove.
	//
	// SchemaFacet is a required field
	SchemaFacet *SchemaFacet `type:"structure" required:"true"`
}

// String returns the string representation
func (s RemoveFacetFromObjectInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s RemoveFacetFromObjectInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *RemoveFacetFromObjectInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "RemoveFacetFromObjectInput"}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}
	if s.SchemaFacet == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaFacet"))
	}
	if s.SchemaFacet != nil {
		if err := s.SchemaFacet.Validate(); err != nil {
			invalidParams.AddNested("SchemaFacet", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *RemoveFacetFromObjectInput) SetDirectoryArn(v string) *RemoveFacetFromObjectInput {
	s.DirectoryArn = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *RemoveFacetFromObjectInput) SetObjectReference(v *ObjectReference) *RemoveFacetFromObjectInput {
	s.ObjectReference = v
	return s
}

// SetSchemaFacet sets the SchemaFacet field's value.
func (s *RemoveFacetFromObjectInput) SetSchemaFacet(v *SchemaFacet) *RemoveFacetFromObjectInput {
	s.SchemaFacet = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/RemoveFacetFromObjectResponse
type RemoveFacetFromObjectOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s RemoveFacetFromObjectOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s RemoveFacetFromObjectOutput) GoString() string {
	return s.String()
}

// Contains an ARN and parameters associated with the rule.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/Rule
type Rule struct {
	_ struct{} `type:"structure"`

	// Min and max parameters associated with the rule.
	Parameters map[string]*string `type:"map"`

	// The type of attribute validation rule.
	Type *string `type:"string" enum:"RuleType"`
}

// String returns the string representation
func (s Rule) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s Rule) GoString() string {
	return s.String()
}

// SetParameters sets the Parameters field's value.
func (s *Rule) SetParameters(v map[string]*string) *Rule {
	s.Parameters = v
	return s
}

// SetType sets the Type field's value.
func (s *Rule) SetType(v string) *Rule {
	s.Type = &v
	return s
}

// A facet.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/SchemaFacet
type SchemaFacet struct {
	_ struct{} `type:"structure"`

	// The name of the facet.
	FacetName *string `min:"1" type:"string"`

	// The ARN of the schema that contains the facet.
	SchemaArn *string `type:"string"`
}

// String returns the string representation
func (s SchemaFacet) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s SchemaFacet) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *SchemaFacet) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "SchemaFacet"}
	if s.FacetName != nil && len(*s.FacetName) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("FacetName", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetFacetName sets the FacetName field's value.
func (s *SchemaFacet) SetFacetName(v string) *SchemaFacet {
	s.FacetName = &v
	return s
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *SchemaFacet) SetSchemaArn(v string) *SchemaFacet {
	s.SchemaArn = &v
	return s
}

// Tag structure which contains tag key and value.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/Tag
type Tag struct {
	_ struct{} `type:"structure"`

	// Key associated with the tag.
	Key *string `type:"string"`

	// Value associated with the tag.
	Value *string `type:"string"`
}

// String returns the string representation
func (s Tag) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s Tag) GoString() string {
	return s.String()
}

// SetKey sets the Key field's value.
func (s *Tag) SetKey(v string) *Tag {
	s.Key = &v
	return s
}

// SetValue sets the Value field's value.
func (s *Tag) SetValue(v string) *Tag {
	s.Value = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TagResourceRequest
type TagResourceInput struct {
	_ struct{} `type:"structure"`

	// ARN of the resource. Tagging is only supported for directories.
	//
	// ResourceArn is a required field
	ResourceArn *string `type:"string" required:"true"`

	// List of tag key value pairs.
	//
	// Tags is a required field
	Tags []*Tag `type:"list" required:"true"`
}

// String returns the string representation
func (s TagResourceInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s TagResourceInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *TagResourceInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
	if s.ResourceArn == nil {
		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
	}
	if s.Tags == nil {
		invalidParams.Add(request.NewErrParamRequired("Tags"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetResourceArn sets the ResourceArn field's value.
func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput {
	s.ResourceArn = &v
	return s
}

// SetTags sets the Tags field's value.
func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
	s.Tags = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TagResourceResponse
type TagResourceOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s TagResourceOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s TagResourceOutput) GoString() string {
	return s.String()
}

// Represents the data for a typed attribute. You can set one, and only one,
// of the elements. Each attribute in an item is a name-value pair. Attributes
// have a single value.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TypedAttributeValue
type TypedAttributeValue struct {
	_ struct{} `type:"structure"`

	// A binary data value.
	//
	// BinaryValue is automatically base64 encoded/decoded by the SDK.
	BinaryValue []byte `type:"blob"`

	// A Boolean data value.
	BooleanValue *bool `type:"boolean"`

	// A date and time value.
	DatetimeValue *time.Time `type:"timestamp" timestampFormat:"unix"`

	// A number data value.
	NumberValue *string `type:"string"`

	// A string data value.
	StringValue *string `type:"string"`
}

// String returns the string representation
func (s TypedAttributeValue) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s TypedAttributeValue) GoString() string {
	return s.String()
}

// SetBinaryValue sets the BinaryValue field's value.
func (s *TypedAttributeValue) SetBinaryValue(v []byte) *TypedAttributeValue {
	s.BinaryValue = v
	return s
}

// SetBooleanValue sets the BooleanValue field's value.
func (s *TypedAttributeValue) SetBooleanValue(v bool) *TypedAttributeValue {
	s.BooleanValue = &v
	return s
}

// SetDatetimeValue sets the DatetimeValue field's value.
func (s *TypedAttributeValue) SetDatetimeValue(v time.Time) *TypedAttributeValue {
	s.DatetimeValue = &v
	return s
}

// SetNumberValue sets the NumberValue field's value.
func (s *TypedAttributeValue) SetNumberValue(v string) *TypedAttributeValue {
	s.NumberValue = &v
	return s
}

// SetStringValue sets the StringValue field's value.
func (s *TypedAttributeValue) SetStringValue(v string) *TypedAttributeValue {
	s.StringValue = &v
	return s
}

// A range of attribute values.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TypedAttributeValueRange
type TypedAttributeValueRange struct {
	_ struct{} `type:"structure"`

	// Inclusive or exclusive range end.
	//
	// EndMode is a required field
	EndMode *string `type:"string" required:"true" enum:"RangeMode"`

	// The attribute value to terminate the range at.
	EndValue *TypedAttributeValue `type:"structure"`

	// Inclusive or exclusive range start.
	//
	// StartMode is a required field
	StartMode *string `type:"string" required:"true" enum:"RangeMode"`

	// The value to start the range at.
	StartValue *TypedAttributeValue `type:"structure"`
}

// String returns the string representation
func (s TypedAttributeValueRange) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s TypedAttributeValueRange) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *TypedAttributeValueRange) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "TypedAttributeValueRange"}
	if s.EndMode == nil {
		invalidParams.Add(request.NewErrParamRequired("EndMode"))
	}
	if s.StartMode == nil {
		invalidParams.Add(request.NewErrParamRequired("StartMode"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEndMode sets the EndMode field's value.
func (s *TypedAttributeValueRange) SetEndMode(v string) *TypedAttributeValueRange {
	s.EndMode = &v
	return s
}

// SetEndValue sets the EndValue field's value.
func (s *TypedAttributeValueRange) SetEndValue(v *TypedAttributeValue) *TypedAttributeValueRange {
	s.EndValue = v
	return s
}

// SetStartMode sets the StartMode field's value.
func (s *TypedAttributeValueRange) SetStartMode(v string) *TypedAttributeValueRange {
	s.StartMode = &v
	return s
}

// SetStartValue sets the StartValue field's value.
func (s *TypedAttributeValueRange) SetStartValue(v *TypedAttributeValue) *TypedAttributeValueRange {
	s.StartValue = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UntagResourceRequest
type UntagResourceInput struct {
	_ struct{} `type:"structure"`

	// ARN of the resource. Tagging is only supported for directories.
	//
	// ResourceArn is a required field
	ResourceArn *string `type:"string" required:"true"`

	// Keys of the tag that needs to be removed from the resource.
	//
	// TagKeys is a required field
	TagKeys []*string `type:"list" required:"true"`
}

// String returns the string representation
func (s UntagResourceInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s UntagResourceInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *UntagResourceInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
	if s.ResourceArn == nil {
		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
	}
	if s.TagKeys == nil {
		invalidParams.Add(request.NewErrParamRequired("TagKeys"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetResourceArn sets the ResourceArn field's value.
func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput {
	s.ResourceArn = &v
	return s
}

// SetTagKeys sets the TagKeys field's value.
func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
	s.TagKeys = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UntagResourceResponse
type UntagResourceOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s UntagResourceOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s UntagResourceOutput) GoString() string {
	return s.String()
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateFacetRequest
type UpdateFacetInput struct {
	_ struct{} `type:"structure"`

	// List of attributes that need to be updated in a given schema Facet. Each
	// attribute is followed by AttributeAction, which specifies the type of update
	// operation to perform.
	AttributeUpdates []*FacetAttributeUpdate `type:"list"`

	// Name is a required field
	Name *string `min:"1" type:"string" required:"true"`

	// Object type associated with the facet. See CreateFacetRequest$ObjectType
	// for more details.
	ObjectType *string `type:"string" enum:"ObjectType"`

	// ARN associated with the Facet. For more information, see arns.
	//
	// SchemaArn is a required field
	SchemaArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s UpdateFacetInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s UpdateFacetInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateFacetInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "UpdateFacetInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
	}
	if s.SchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaArn"))
	}
	if s.AttributeUpdates != nil {
		for i, v := range s.AttributeUpdates {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AttributeUpdates", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAttributeUpdates sets the AttributeUpdates field's value.
func (s *UpdateFacetInput) SetAttributeUpdates(v []*FacetAttributeUpdate) *UpdateFacetInput {
	s.AttributeUpdates = v
	return s
}

// SetName sets the Name field's value.
func (s *UpdateFacetInput) SetName(v string) *UpdateFacetInput {
	s.Name = &v
	return s
}

// SetObjectType sets the ObjectType field's value.
func (s *UpdateFacetInput) SetObjectType(v string) *UpdateFacetInput {
	s.ObjectType = &v
	return s
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *UpdateFacetInput) SetSchemaArn(v string) *UpdateFacetInput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateFacetResponse
type UpdateFacetOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s UpdateFacetOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s UpdateFacetOutput) GoString() string {
	return s.String()
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateObjectAttributesRequest
type UpdateObjectAttributesInput struct {
	_ struct{} `type:"structure"`

	// Attributes update structure.
	//
	// AttributeUpdates is a required field
	AttributeUpdates []*ObjectAttributeUpdate `type:"list" required:"true"`

	// ARN associated with the Directory where the object resides. For more information,
	// see arns.
	//
	// DirectoryArn is a required field
	DirectoryArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`

	// Reference that identifies the object.
	//
	// ObjectReference is a required field
	ObjectReference *ObjectReference `type:"structure" required:"true"`
}

// String returns the string representation
func (s UpdateObjectAttributesInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s UpdateObjectAttributesInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateObjectAttributesInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "UpdateObjectAttributesInput"}
	if s.AttributeUpdates == nil {
		invalidParams.Add(request.NewErrParamRequired("AttributeUpdates"))
	}
	if s.DirectoryArn == nil {
		invalidParams.Add(request.NewErrParamRequired("DirectoryArn"))
	}
	if s.ObjectReference == nil {
		invalidParams.Add(request.NewErrParamRequired("ObjectReference"))
	}
	if s.AttributeUpdates != nil {
		for i, v := range s.AttributeUpdates {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AttributeUpdates", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAttributeUpdates sets the AttributeUpdates field's value.
func (s *UpdateObjectAttributesInput) SetAttributeUpdates(v []*ObjectAttributeUpdate) *UpdateObjectAttributesInput {
	s.AttributeUpdates = v
	return s
}

// SetDirectoryArn sets the DirectoryArn field's value.
func (s *UpdateObjectAttributesInput) SetDirectoryArn(v string) *UpdateObjectAttributesInput {
	s.DirectoryArn = &v
	return s
}

// SetObjectReference sets the ObjectReference field's value.
func (s *UpdateObjectAttributesInput) SetObjectReference(v *ObjectReference) *UpdateObjectAttributesInput {
	s.ObjectReference = v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateObjectAttributesResponse
type UpdateObjectAttributesOutput struct {
	_ struct{} `type:"structure"`

	// ObjectIdentifier of the updated object.
	ObjectIdentifier *string `type:"string"`
}

// String returns the string representation
func (s UpdateObjectAttributesOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s UpdateObjectAttributesOutput) GoString() string {
	return s.String()
}

// SetObjectIdentifier sets the ObjectIdentifier field's value.
func (s *UpdateObjectAttributesOutput) SetObjectIdentifier(v string) *UpdateObjectAttributesOutput {
	s.ObjectIdentifier = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateSchemaRequest
type UpdateSchemaInput struct {
	_ struct{} `type:"structure"`

	// Name of the schema.
	//
	// Name is a required field
	Name *string `min:"1" type:"string" required:"true"`

	// ARN of the development schema. For more information, see arns.
	//
	// SchemaArn is a required field
	SchemaArn *string `location:"header" locationName:"x-amz-data-partition" type:"string" required:"true"`
}

// String returns the string representation
func (s UpdateSchemaInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s UpdateSchemaInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateSchemaInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "UpdateSchemaInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
	}
	if s.SchemaArn == nil {
		invalidParams.Add(request.NewErrParamRequired("SchemaArn"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetName sets the Name field's value.
func (s *UpdateSchemaInput) SetName(v string) *UpdateSchemaInput {
	s.Name = &v
	return s
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *UpdateSchemaInput) SetSchemaArn(v string) *UpdateSchemaInput {
	s.SchemaArn = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateSchemaResponse
type UpdateSchemaOutput struct {
	_ struct{} `type:"structure"`

	// ARN associated with the updated schema. For more information, see arns.
	SchemaArn *string `type:"string"`
}

// String returns the string representation
func (s UpdateSchemaOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s UpdateSchemaOutput) GoString() string {
	return s.String()
}

// SetSchemaArn sets the SchemaArn field's value.
func (s *UpdateSchemaOutput) SetSchemaArn(v string) *UpdateSchemaOutput {
	s.SchemaArn = &v
	return s
}

const (
	// BatchReadExceptionTypeValidationException is a BatchReadExceptionType enum value
	BatchReadExceptionTypeValidationException = "ValidationException"

	// BatchReadExceptionTypeInvalidArnException is a BatchReadExceptionType enum value
	BatchReadExceptionTypeInvalidArnException = "InvalidArnException"

	// BatchReadExceptionTypeResourceNotFoundException is a BatchReadExceptionType enum value
	BatchReadExceptionTypeResourceNotFoundException = "ResourceNotFoundException"

	// BatchReadExceptionTypeInvalidNextTokenException is a BatchReadExceptionType enum value
	BatchReadExceptionTypeInvalidNextTokenException = "InvalidNextTokenException"

	// BatchReadExceptionTypeAccessDeniedException is a BatchReadExceptionType enum value
	BatchReadExceptionTypeAccessDeniedException = "AccessDeniedException"

	// BatchReadExceptionTypeNotNodeException is a BatchReadExceptionType enum value
	BatchReadExceptionTypeNotNodeException = "NotNodeException"
)

const (
	// BatchWriteExceptionTypeInternalServiceException is a BatchWriteExceptionType enum value
	BatchWriteExceptionTypeInternalServiceException = "InternalServiceException"

	// BatchWriteExceptionTypeValidationException is a BatchWriteExceptionType enum value
	BatchWriteExceptionTypeValidationException = "ValidationException"

	// BatchWriteExceptionTypeInvalidArnException is a BatchWriteExceptionType enum value
	BatchWriteExceptionTypeInvalidArnException = "InvalidArnException"

	// BatchWriteExceptionTypeLinkNameAlreadyInUseException is a BatchWriteExceptionType enum value
	BatchWriteExceptionTypeLinkNameAlreadyInUseException = "LinkNameAlreadyInUseException"

	// BatchWriteExceptionTypeStillContainsLinksException is a BatchWriteExceptionType enum value
	BatchWriteExceptionTypeStillContainsLinksException = "StillContainsLinksException"

	// BatchWriteExceptionTypeFacetValidationException is a BatchWriteExceptionType enum value
	BatchWriteExceptionTypeFacetValidationException = "FacetValidationException"

	// BatchWriteExceptionTypeObjectNotDetachedException is a BatchWriteExceptionType enum value
	BatchWriteExceptionTypeObjectNotDetachedException = "ObjectNotDetachedException"

	// BatchWriteExceptionTypeResourceNotFoundException is a BatchWriteExceptionType enum value
	BatchWriteExceptionTypeResourceNotFoundException = "ResourceNotFoundException"

	// BatchWriteExceptionTypeAccessDeniedException is a BatchWriteExceptionType enum value
	BatchWriteExceptionTypeAccessDeniedException = "AccessDeniedException"
)

const (
	// ConsistencyLevelSerializable is a ConsistencyLevel enum value
	ConsistencyLevelSerializable = "SERIALIZABLE"

	// ConsistencyLevelEventual is a ConsistencyLevel enum value
	ConsistencyLevelEventual = "EVENTUAL"
)

const (
	// DirectoryStateEnabled is a DirectoryState enum value
	DirectoryStateEnabled = "ENABLED"

	// DirectoryStateDisabled is a DirectoryState enum value
	DirectoryStateDisabled = "DISABLED"

	// DirectoryStateDeleted is a DirectoryState enum value
	DirectoryStateDeleted = "DELETED"
)

const (
	// FacetAttributeTypeString is a FacetAttributeType enum value
	FacetAttributeTypeString = "STRING"

	// FacetAttributeTypeBinary is a FacetAttributeType enum value
	FacetAttributeTypeBinary = "BINARY"

	// FacetAttributeTypeBoolean is a FacetAttributeType enum value
	FacetAttributeTypeBoolean = "BOOLEAN"

	// FacetAttributeTypeNumber is a FacetAttributeType enum value
	FacetAttributeTypeNumber = "NUMBER"

	// FacetAttributeTypeDatetime is a FacetAttributeType enum value
	FacetAttributeTypeDatetime = "DATETIME"
)

const (
	// ObjectTypeNode is a ObjectType enum value
	ObjectTypeNode = "NODE"

	// ObjectTypeLeafNode is a ObjectType enum value
	ObjectTypeLeafNode = "LEAF_NODE"

	// ObjectTypePolicy is a ObjectType enum value
	ObjectTypePolicy = "POLICY"

	// ObjectTypeIndex is a ObjectType enum value
	ObjectTypeIndex = "INDEX"
)

const (
	// RangeModeFirst is a RangeMode enum value
	RangeModeFirst = "FIRST"

	// RangeModeLast is a RangeMode enum value
	RangeModeLast = "LAST"

	// RangeModeLastBeforeMissingValues is a RangeMode enum value
	RangeModeLastBeforeMissingValues = "LAST_BEFORE_MISSING_VALUES"

	// RangeModeInclusive is a RangeMode enum value
	RangeModeInclusive = "INCLUSIVE"

	// RangeModeExclusive is a RangeMode enum value
	RangeModeExclusive = "EXCLUSIVE"
)

const (
	// RequiredAttributeBehaviorRequiredAlways is a RequiredAttributeBehavior enum value
	RequiredAttributeBehaviorRequiredAlways = "REQUIRED_ALWAYS"

	// RequiredAttributeBehaviorNotRequired is a RequiredAttributeBehavior enum value
	RequiredAttributeBehaviorNotRequired = "NOT_REQUIRED"
)

const (
	// RuleTypeBinaryLength is a RuleType enum value
	RuleTypeBinaryLength = "BINARY_LENGTH"

	// RuleTypeNumberComparison is a RuleType enum value
	RuleTypeNumberComparison = "NUMBER_COMPARISON"

	// RuleTypeStringFromSet is a RuleType enum value
	RuleTypeStringFromSet = "STRING_FROM_SET"

	// RuleTypeStringLength is a RuleType enum value
	RuleTypeStringLength = "STRING_LENGTH"
)

const (
	// UpdateActionTypeCreateOrUpdate is a UpdateActionType enum value
	UpdateActionTypeCreateOrUpdate = "CREATE_OR_UPDATE"

	// UpdateActionTypeDelete is a UpdateActionType enum value
	UpdateActionTypeDelete = "DELETE"
)
