text:
package com.amazonaws.services.directory;

import javax.annotation.Generated;

import com.amazonaws.*;
import com.amazonaws.regions.*;

import com.amazonaws.services.directory.model.*;

/**
 * Interface for accessing Directory Service.
 *

 * Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
 * {@link com.amazonaws.services.directory.AbstractAWSDirectoryService} instead.
 *

 *

 * <fullname>Directory Service</fullname>
 *

 * Directory Service is a web service that makes it easy for you to setup and run directories in the Amazon Web Services
 * cloud, or connect your Amazon Web Services resources with an existing self-managed Microsoft Active Directory. This
 * guide provides detailed information about Directory Service operations, data types, parameters, and errors. For
 * information about Directory Services features, see Directory
 * Service and the Directory
 * Service Administration Guide.
 *

 * <note>
 *

 * Amazon Web Services provides SDKs that consist of libraries and sample code for various programming languages and
 * platforms (Java, Ruby, .Net, iOS, Android, etc.). The SDKs provide a convenient way to create programmatic access to
 * Directory Service and other Amazon Web Services services. For more information about the Amazon Web Services SDKs,
 * including how to download and install them, see Tools for Amazon Web
 * Services.
 *

 * </note>
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public interface AWSDirectoryService {

    /**
     * The region metadata service name for computing region endpoints. You can use this value to retrieve metadata
     * (such as supported regions) of the service.
     *
     * @see RegionUtils#getRegionsForService(String)
     */
    String ENDPOINT_PREFIX = "ds";

    /**
     * Overrides the default endpoint for this client ("https://ds.us-east-1.amazonaws.com"). Callers can use this
     * method to control which AWS region they want to work with.
     *

     * Callers can pass in just the endpoint (ex: "ds.us-east-1.amazonaws.com") or a full URL, including the protocol
     * (ex: "https://ds.us-east-1.amazonaws.com"). If the protocol is not specified here, the default protocol from this
     * client's {@link ClientConfiguration} will be used, which by default is HTTPS.
     *

     * For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available
     * endpoints for all AWS services, see:  https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/java-dg-region-selection.html#region-selection-
     * choose-endpoint
     *

     * This method is not threadsafe. An endpoint should be configured when the client is created and before any
     * service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in
     * transit or retrying.
     *
     * @param endpoint
     *        The endpoint (ex: "ds.us-east-1.amazonaws.com") or a full URL, including the protocol (ex:
     *        "https://ds.us-east-1.amazonaws.com") of the region specific AWS endpoint this client will communicate
     *        with.
     * @deprecated use {@link AwsClientBuilder#setEndpointConfiguration(AwsClientBuilder.EndpointConfiguration)} for
     *             example:
     *             {@code builder.setEndpointConfiguration(new EndpointConfiguration(endpoint, signingRegion));}
     */
    @Deprecated
    void setEndpoint(String endpoint);

    /**
     * An alternative to {@link AWSDirectoryService#setEndpoint(String)}, sets the regional endpoint for this client's
     * service calls. Callers can use this method to control which AWS region they want to work with.
     *

     * By default, all service endpoints in all regions use the https protocol. To use http instead, specify it in the
     * {@link ClientConfiguration} supplied at construction.
     *

     * This method is not threadsafe. A region should be configured when the client is created and before any service
     * requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit
     * or retrying.
     *
     * @param region
     *        The region this client will communicate with. See {@link Region#getRegion(com.amazonaws.regions.Regions)}
     *        for accessing a given region. Must not be null and must be a region where the service is available.
     *
     * @see Region#getRegion(com.amazonaws.regions.Regions)
     * @see Region#createClient(Class, com.amazonaws.auth.AWSCredentialsProvider, ClientConfiguration)
     * @see Region#isServiceSupported(String)
     * @deprecated use {@link AwsClientBuilder#setRegion(String)}
     */
    @Deprecated
    void setRegion(Region region);

    /**
     *

     * Accepts a directory sharing request that was sent from the directory owner account.
     *

     *
     * @param acceptSharedDirectoryRequest
     * @return Result of the AcceptSharedDirectory operation returned by the service.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws DirectoryAlreadySharedException
     *         The specified directory has already been shared with this Amazon Web Services account.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.AcceptSharedDirectory
     * @see AWS API
     *      Documentation
     */
    AcceptSharedDirectoryResult acceptSharedDirectory(AcceptSharedDirectoryRequest acceptSharedDirectoryRequest);

    /**
     *

     * If the DNS server for your self-managed domain uses a publicly addressable IP address, you must add a CIDR
     * address block to correctly route traffic to and from your Microsoft AD on Amazon Web Services. AddIpRoutes
     * adds this address block. You can also use AddIpRoutes to facilitate routing traffic that uses public IP
     * ranges from your Microsoft AD on Amazon Web Services to a peer VPC.
     *

     *

     * Before you call AddIpRoutes, ensure that all of the required permissions have been explicitly granted
     * through a policy. For details about what permissions are required to run the AddIpRoutes operation, see
     * Directory Service API Permissions: Actions, Resources, and Conditions Reference.
     *

     *
     * @param addIpRoutesRequest
     * @return Result of the AddIpRoutes operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws EntityAlreadyExistsException
     *         The specified entity already exists.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws IpRouteLimitExceededException
     *         The maximum allowed number of IP addresses was exceeded. The default limit is 100 IP address blocks.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.AddIpRoutes
     * @see AWS API
     *      Documentation
     */
    AddIpRoutesResult addIpRoutes(AddIpRoutesRequest addIpRoutesRequest);

    /**
     *

     * Adds two domain controllers in the specified Region for the specified directory.
     *

     *
     * @param addRegionRequest
     * @return Result of the AddRegion operation returned by the service.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws DirectoryAlreadyInRegionException
     *         The Region you specified is the same Region where the Managed Microsoft AD directory was created. Specify
     *         a different Region and try again.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws RegionLimitExceededException
     *         You have reached the limit for maximum number of simultaneous Region replications per directory.
     * @throws AccessDeniedException
     *         Client authentication is not available in this region at this time.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.AddRegion
     * @see AWS API
     *      Documentation
     */
    AddRegionResult addRegion(AddRegionRequest addRegionRequest);

    /**
     *

     * Adds or overwrites one or more tags for the specified directory. Each directory can have a maximum of 50 tags.
     * Each tag consists of a key and optional value. Tag keys must be unique to each resource.
     *

     *
     * @param addTagsToResourceRequest
     * @return Result of the AddTagsToResource operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws TagLimitExceededException
     *         The maximum allowed number of tags was exceeded.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.AddTagsToResource
     * @see AWS API
     *      Documentation
     */
    AddTagsToResourceResult addTagsToResource(AddTagsToResourceRequest addTagsToResourceRequest);

    /**
     *

     * Cancels an in-progress schema extension to a Microsoft AD directory. Once a schema extension has started
     * replicating to all domain controllers, the task can no longer be canceled. A schema extension can be canceled
     * during any of the following states; Initializing, CreatingSnapshot, and
     * UpdatingSchema.
     *

     *
     * @param cancelSchemaExtensionRequest
     * @return Result of the CancelSchemaExtension operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.CancelSchemaExtension
     * @see AWS API
     *      Documentation
     */
    CancelSchemaExtensionResult cancelSchemaExtension(CancelSchemaExtensionRequest cancelSchemaExtensionRequest);

    /**
     *

     * Creates an AD Connector to connect to a self-managed directory.
     *

     *

     * Before you call ConnectDirectory, ensure that all of the required permissions have been explicitly
     * granted through a policy. For details about what permissions are required to run the
     * ConnectDirectory operation, see Directory Service API Permissions: Actions, Resources, and Conditions Reference.
     *

     *
     * @param connectDirectoryRequest
     *        Contains the inputs for the ConnectDirectory operation.
     * @return Result of the ConnectDirectory operation returned by the service.
     * @throws DirectoryLimitExceededException
     *         The maximum number of directories in the region has been reached. You can use the
     *         GetDirectoryLimits operation to determine your directory limits in the region.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.ConnectDirectory
     * @see AWS API
     *      Documentation
     */
    ConnectDirectoryResult connectDirectory(ConnectDirectoryRequest connectDirectoryRequest);

    /**
     *

     * Creates an alias for a directory and assigns the alias to the directory. The alias is used to construct the
     * access URL for the directory, such as http://<alias>.awsapps.com.
     *

     * <important>
     *

     * After an alias has been created, it cannot be deleted or reused, so this operation should only be used when
     * absolutely necessary.
     *

     * </important>
     *
     * @param createAliasRequest
     *        Contains the inputs for the CreateAlias operation.
     * @return Result of the CreateAlias operation returned by the service.
     * @throws EntityAlreadyExistsException
     *         The specified entity already exists.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.CreateAlias
     * @see AWS API
     *      Documentation
     */
    CreateAliasResult createAlias(CreateAliasRequest createAliasRequest);

    /**
     *

     * Creates an Active Directory computer object in the specified directory.
     *

     *
     * @param createComputerRequest
     *        Contains the inputs for the CreateComputer operation.
     * @return Result of the CreateComputer operation returned by the service.
     * @throws AuthenticationFailedException
     *         An authentication error occurred.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws EntityAlreadyExistsException
     *         The specified entity already exists.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.CreateComputer
     * @see AWS API
     *      Documentation
     */
    CreateComputerResult createComputer(CreateComputerRequest createComputerRequest);

    /**
     *

     * Creates a conditional forwarder associated with your Amazon Web Services directory. Conditional forwarders are
     * required in order to set up a trust relationship with another domain. The conditional forwarder points to the
     * trusted domain.
     *

     *
     * @param createConditionalForwarderRequest
     *        Initiates the creation of a conditional forwarder for your Directory Service for Microsoft Active
     *        Directory. Conditional forwarders are required in order to set up a trust relationship with another
     *        domain.
     * @return Result of the CreateConditionalForwarder operation returned by the service.
     * @throws EntityAlreadyExistsException
     *         The specified entity already exists.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.CreateConditionalForwarder
     * @see AWS
     *      API Documentation
     */
    CreateConditionalForwarderResult createConditionalForwarder(CreateConditionalForwarderRequest createConditionalForwarderRequest);

    /**
     *

     * Creates a Simple AD directory. For more information, see Simple Active
     * Directory in the Directory Service Admin Guide.
     *

     *

     * Before you call CreateDirectory, ensure that all of the required permissions have been explicitly
     * granted through a policy. For details about what permissions are required to run the CreateDirectory
     * operation, see Directory Service API Permissions: Actions, Resources, and Conditions Reference.
     *

     *
     * @param createDirectoryRequest
     *        Contains the inputs for the CreateDirectory operation.
     * @return Result of the CreateDirectory operation returned by the service.
     * @throws DirectoryLimitExceededException
     *         The maximum number of directories in the region has been reached. You can use the
     *         GetDirectoryLimits operation to determine your directory limits in the region.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.CreateDirectory
     * @see AWS API
     *      Documentation
     */
    CreateDirectoryResult createDirectory(CreateDirectoryRequest createDirectoryRequest);

    /**
     *

     * Creates a subscription to forward real-time Directory Service domain controller security logs to the specified
     * Amazon CloudWatch log group in your Amazon Web Services account.
     *

     *
     * @param createLogSubscriptionRequest
     * @return Result of the CreateLogSubscription operation returned by the service.
     * @throws EntityAlreadyExistsException
     *         The specified entity already exists.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws InsufficientPermissionsException
     *         The account does not have sufficient permission to perform the operation.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.CreateLogSubscription
     * @see AWS API
     *      Documentation
     */
    CreateLogSubscriptionResult createLogSubscription(CreateLogSubscriptionRequest createLogSubscriptionRequest);

    /**
     *

     * Creates a Microsoft AD directory in the Amazon Web Services Cloud. For more information, see Managed
     * Microsoft AD in the Directory Service Admin Guide.
     *

     *

     * Before you call CreateMicrosoftAD, ensure that all of the required permissions have been explicitly
     * granted through a policy. For details about what permissions are required to run the CreateMicrosoftAD
     * operation, see Directory Service API Permissions: Actions, Resources, and Conditions Reference.
     *

     *
     * @param createMicrosoftADRequest
     *        Creates an Managed Microsoft AD directory.
     * @return Result of the CreateMicrosoftAD operation returned by the service.
     * @throws DirectoryLimitExceededException
     *         The maximum number of directories in the region has been reached. You can use the
     *         GetDirectoryLimits operation to determine your directory limits in the region.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @sample AWSDirectoryService.CreateMicrosoftAD
     * @see AWS API
     *      Documentation
     */
    CreateMicrosoftADResult createMicrosoftAD(CreateMicrosoftADRequest createMicrosoftADRequest);

    /**
     *

     * Creates a snapshot of a Simple AD or Microsoft AD directory in the Amazon Web Services cloud.
     *

     * <note>
     *

     * You cannot take snapshots of AD Connector directories.
     *

     * </note>
     *
     * @param createSnapshotRequest
     *        Contains the inputs for the CreateSnapshot operation.
     * @return Result of the CreateSnapshot operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws SnapshotLimitExceededException
     *         The maximum number of manual snapshots for the directory has been reached. You can use the
     *         GetSnapshotLimits operation to determine the snapshot limits for a directory.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.CreateSnapshot
     * @see AWS API
     *      Documentation
     */
    CreateSnapshotResult createSnapshot(CreateSnapshotRequest createSnapshotRequest);

    /**
     *

     * Directory Service for Microsoft Active Directory allows you to configure trust relationships. For example, you
     * can establish a trust between your Managed Microsoft AD directory, and your existing self-managed Microsoft
     * Active Directory. This would allow you to provide users and groups access to resources in either domain, with a
     * single set of credentials.
     *

     *

     * This action initiates the creation of the Amazon Web Services side of a trust relationship between an Managed
     * Microsoft AD directory and an external domain. You can create either a forest trust or an external trust.
     *

     *
     * @param createTrustRequest
     *        Directory Service for Microsoft Active Directory allows you to configure trust relationships. For example,
     *        you can establish a trust between your Managed Microsoft AD directory, and your existing self-managed
     *        Microsoft Active Directory. This would allow you to provide users and groups access to resources in either
     *        domain, with a single set of credentials.

     *

     *        This action initiates the creation of the Amazon Web Services side of a trust relationship between an
     *        Managed Microsoft AD directory and an external domain.
     * @return Result of the CreateTrust operation returned by the service.
     * @throws EntityAlreadyExistsException
     *         The specified entity already exists.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @sample AWSDirectoryService.CreateTrust
     * @see AWS API
     *      Documentation
     */
    CreateTrustResult createTrust(CreateTrustRequest createTrustRequest);

    /**
     *

     * Deletes a conditional forwarder that has been set up for your Amazon Web Services directory.
     *

     *
     * @param deleteConditionalForwarderRequest
     *        Deletes a conditional forwarder.
     * @return Result of the DeleteConditionalForwarder operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DeleteConditionalForwarder
     * @see AWS
     *      API Documentation
     */
    DeleteConditionalForwarderResult deleteConditionalForwarder(DeleteConditionalForwarderRequest deleteConditionalForwarderRequest);

    /**
     *

     * Deletes an Directory Service directory.
     *

     *

     * Before you call DeleteDirectory, ensure that all of the required permissions have been explicitly
     * granted through a policy. For details about what permissions are required to run the DeleteDirectory
     * operation, see Directory Service API Permissions: Actions, Resources, and Conditions Reference.
     *

     *
     * @param deleteDirectoryRequest
     *        Contains the inputs for the DeleteDirectory operation.
     * @return Result of the DeleteDirectory operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DeleteDirectory
     * @see AWS API
     *      Documentation
     */
    DeleteDirectoryResult deleteDirectory(DeleteDirectoryRequest deleteDirectoryRequest);

    /**
     *

     * Deletes the specified log subscription.
     *

     *
     * @param deleteLogSubscriptionRequest
     * @return Result of the DeleteLogSubscription operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DeleteLogSubscription
     * @see AWS API
     *      Documentation
     */
    DeleteLogSubscriptionResult deleteLogSubscription(DeleteLogSubscriptionRequest deleteLogSubscriptionRequest);

    /**
     *

     * Deletes a directory snapshot.
     *

     *
     * @param deleteSnapshotRequest
     *        Contains the inputs for the DeleteSnapshot operation.
     * @return Result of the DeleteSnapshot operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DeleteSnapshot
     * @see AWS API
     *      Documentation
     */
    DeleteSnapshotResult deleteSnapshot(DeleteSnapshotRequest deleteSnapshotRequest);

    /**
     *

     * Deletes an existing trust relationship between your Managed Microsoft AD directory and an external domain.
     *

     *
     * @param deleteTrustRequest
     *        Deletes the local side of an existing trust relationship between the Managed Microsoft AD directory and
     *        the external domain.
     * @return Result of the DeleteTrust operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @sample AWSDirectoryService.DeleteTrust
     * @see AWS API
     *      Documentation
     */
    DeleteTrustResult deleteTrust(DeleteTrustRequest deleteTrustRequest);

    /**
     *

     * Deletes from the system the certificate that was registered for secure LDAP or client certificate authentication.
     *

     *
     * @param deregisterCertificateRequest
     * @return Result of the DeregisterCertificate operation returned by the service.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws CertificateDoesNotExistException
     *         The certificate is not present in the system for describe or deregister activities.
     * @throws CertificateInUseException
     *         The certificate is being used for the LDAP security connection and cannot be removed without disabling
     *         LDAP security.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DeregisterCertificate
     * @see AWS API
     *      Documentation
     */
    DeregisterCertificateResult deregisterCertificate(DeregisterCertificateRequest deregisterCertificateRequest);

    /**
     *

     * Removes the specified directory as a publisher to the specified Amazon SNS topic.
     *

     *
     * @param deregisterEventTopicRequest
     *        Removes the specified directory as a publisher to the specified Amazon SNS topic.
     * @return Result of the DeregisterEventTopic operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DeregisterEventTopic
     * @see AWS API
     *      Documentation
     */
    DeregisterEventTopicResult deregisterEventTopic(DeregisterEventTopicRequest deregisterEventTopicRequest);

    /**
     *

     * Displays information about the certificate registered for secure LDAP or client certificate authentication.
     *

     *
     * @param describeCertificateRequest
     * @return Result of the DescribeCertificate operation returned by the service.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws CertificateDoesNotExistException
     *         The certificate is not present in the system for describe or deregister activities.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DescribeCertificate
     * @see AWS API
     *      Documentation
     */
    DescribeCertificateResult describeCertificate(DescribeCertificateRequest describeCertificateRequest);

    /**
     *

     * Retrieves information about the type of client authentication for the specified directory, if the type is
     * specified. If no type is specified, information about all client authentication types that are supported for the
     * specified directory is retrieved. Currently, only SmartCard is supported.
     *

     *
     * @param describeClientAuthenticationSettingsRequest
     * @return Result of the DescribeClientAuthenticationSettings operation returned by the service.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws AccessDeniedException
     *         Client authentication is not available in this region at this time.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DescribeClientAuthenticationSettings
     * @see AWS API Documentation
     */
    DescribeClientAuthenticationSettingsResult describeClientAuthenticationSettings(
            DescribeClientAuthenticationSettingsRequest describeClientAuthenticationSettingsRequest);

    /**
     *

     * Obtains information about the conditional forwarders for this account.
     *

     *

     * If no input parameters are provided for RemoteDomainNames, this request describes all conditional forwarders for
     * the specified directory ID.
     *

     *
     * @param describeConditionalForwardersRequest
     *        Describes a conditional forwarder.
     * @return Result of the DescribeConditionalForwarders operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DescribeConditionalForwarders
     * @see AWS API Documentation
     */
    DescribeConditionalForwardersResult describeConditionalForwarders(DescribeConditionalForwardersRequest describeConditionalForwardersRequest);

    /**
     *

     * Obtains information about the directories that belong to this account.
     *

     *

     * You can retrieve information about specific directories by passing the directory identifiers in the
     * DirectoryIds parameter. Otherwise, all directories that belong to the current account are returned.
     *

     *

     * This operation supports pagination with the use of the NextToken request and response parameters. If
     * more results are available, the DescribeDirectoriesResult.NextToken member contains a token that you
     * pass in the next call to DescribeDirectories to retrieve the next set of items.
     *

     *

     * You can also specify a maximum number of return results with the Limit parameter.
     *

     *
     * @param describeDirectoriesRequest
     *        Contains the inputs for the DescribeDirectories operation.
     * @return Result of the DescribeDirectories operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DescribeDirectories
     * @see AWS API
     *      Documentation
     */
    DescribeDirectoriesResult describeDirectories(DescribeDirectoriesRequest describeDirectoriesRequest);

    /**
     * Simplified method form for invoking the DescribeDirectories operation.
     *
     * @see #describeDirectories(DescribeDirectoriesRequest)
     */
    DescribeDirectoriesResult describeDirectories();

    /**
     *

     * Provides information about any domain controllers in your directory.
     *

     *
     * @param describeDomainControllersRequest
     * @return Result of the DescribeDomainControllers operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @sample AWSDirectoryService.DescribeDomainControllers
     * @see AWS
     *      API Documentation
     */
    DescribeDomainControllersResult describeDomainControllers(DescribeDomainControllersRequest describeDomainControllersRequest);

    /**
     *

     * Obtains information about which Amazon SNS topics receive status messages from the specified directory.
     *

     *

     * If no input parameters are provided, such as DirectoryId or TopicName, this request describes all of the
     * associations in the account.
     *

     *
     * @param describeEventTopicsRequest
     *        Describes event topics.
     * @return Result of the DescribeEventTopics operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DescribeEventTopics
     * @see AWS API
     *      Documentation
     */
    DescribeEventTopicsResult describeEventTopics(DescribeEventTopicsRequest describeEventTopicsRequest);

    /**
     *

     * Describes the status of LDAP security for the specified directory.
     *

     *
     * @param describeLDAPSSettingsRequest
     * @return Result of the DescribeLDAPSSettings operation returned by the service.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DescribeLDAPSSettings
     * @see AWS API
     *      Documentation
     */
    DescribeLDAPSSettingsResult describeLDAPSSettings(DescribeLDAPSSettingsRequest describeLDAPSSettingsRequest);

    /**
     *

     * Provides information about the Regions that are configured for multi-Region replication.
     *

     *
     * @param describeRegionsRequest
     * @return Result of the DescribeRegions operation returned by the service.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws AccessDeniedException
     *         Client authentication is not available in this region at this time.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DescribeRegions
     * @see AWS API
     *      Documentation
     */
    DescribeRegionsResult describeRegions(DescribeRegionsRequest describeRegionsRequest);

    /**
     *

     * Retrieves information about the configurable settings for the specified directory.
     *

     *
     * @param describeSettingsRequest
     * @return Result of the DescribeSettings operation returned by the service.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DescribeSettings
     * @see AWS API
     *      Documentation
     */
    DescribeSettingsResult describeSettings(DescribeSettingsRequest describeSettingsRequest);

    /**
     *

     * Returns the shared directories in your account.
     *

     *
     * @param describeSharedDirectoriesRequest
     * @return Result of the DescribeSharedDirectories operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DescribeSharedDirectories
     * @see AWS
     *      API Documentation
     */
    DescribeSharedDirectoriesResult describeSharedDirectories(DescribeSharedDirectoriesRequest describeSharedDirectoriesRequest);

    /**
     *

     * Obtains information about the directory snapshots that belong to this account.
     *

     *

     * This operation supports pagination with the use of the NextToken request and response parameters. If more
     * results are available, the DescribeSnapshots.NextToken member contains a token that you pass in the next
     * call to DescribeSnapshots to retrieve the next set of items.
     *

     *

     * You can also specify a maximum number of return results with the Limit parameter.
     *

     *
     * @param describeSnapshotsRequest
     *        Contains the inputs for the DescribeSnapshots operation.
     * @return Result of the DescribeSnapshots operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DescribeSnapshots
     * @see AWS API
     *      Documentation
     */
    DescribeSnapshotsResult describeSnapshots(DescribeSnapshotsRequest describeSnapshotsRequest);

    /**
     * Simplified method form for invoking the DescribeSnapshots operation.
     *
     * @see #describeSnapshots(DescribeSnapshotsRequest)
     */
    DescribeSnapshotsResult describeSnapshots();

    /**
     *

     * Obtains information about the trust relationships for this account.
     *

     *

     * If no input parameters are provided, such as DirectoryId or TrustIds, this request describes all the trust
     * relationships belonging to the account.
     *

     *
     * @param describeTrustsRequest
     *        Describes the trust relationships for a particular Managed Microsoft AD directory. If no input parameters
     *        are provided, such as directory ID or trust ID, this request describes all the trust relationships.
     * @return Result of the DescribeTrusts operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @sample AWSDirectoryService.DescribeTrusts
     * @see AWS API
     *      Documentation
     */
    DescribeTrustsResult describeTrusts(DescribeTrustsRequest describeTrustsRequest);

    /**
     *

     * Describes the updates of a directory for a particular update type.
     *

     *
     * @param describeUpdateDirectoryRequest
     * @return Result of the DescribeUpdateDirectory operation returned by the service.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws AccessDeniedException
     *         Client authentication is not available in this region at this time.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @sample AWSDirectoryService.DescribeUpdateDirectory
     * @see AWS API
     *      Documentation
     */
    DescribeUpdateDirectoryResult describeUpdateDirectory(DescribeUpdateDirectoryRequest describeUpdateDirectoryRequest);

    /**
     *

     * Disables alternative client authentication methods for the specified directory.
     *

     *
     * @param disableClientAuthenticationRequest
     * @return Result of the DisableClientAuthentication operation returned by the service.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws InvalidClientAuthStatusException
     *         Client authentication is already enabled.
     * @throws AccessDeniedException
     *         Client authentication is not available in this region at this time.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DisableClientAuthentication
     * @see AWS
     *      API Documentation
     */
    DisableClientAuthenticationResult disableClientAuthentication(DisableClientAuthenticationRequest disableClientAuthenticationRequest);

    /**
     *

     * Deactivates LDAP secure calls for the specified directory.
     *

     *
     * @param disableLDAPSRequest
     * @return Result of the DisableLDAPS operation returned by the service.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws InvalidLDAPSStatusException
     *         The LDAP activities could not be performed because they are limited by the LDAPS status.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DisableLDAPS
     * @see AWS API
     *      Documentation
     */
    DisableLDAPSResult disableLDAPS(DisableLDAPSRequest disableLDAPSRequest);

    /**
     *

     * Disables multi-factor authentication (MFA) with the Remote Authentication Dial In User Service (RADIUS) server
     * for an AD Connector or Microsoft AD directory.
     *

     *
     * @param disableRadiusRequest
     *        Contains the inputs for the DisableRadius operation.
     * @return Result of the DisableRadius operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DisableRadius
     * @see AWS API
     *      Documentation
     */
    DisableRadiusResult disableRadius(DisableRadiusRequest disableRadiusRequest);

    /**
     *

     * Disables single-sign on for a directory.
     *

     *
     * @param disableSsoRequest
     *        Contains the inputs for the DisableSso operation.
     * @return Result of the DisableSso operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InsufficientPermissionsException
     *         The account does not have sufficient permission to perform the operation.
     * @throws AuthenticationFailedException
     *         An authentication error occurred.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.DisableSso
     * @see AWS API
     *      Documentation
     */
    DisableSsoResult disableSso(DisableSsoRequest disableSsoRequest);

    /**
     *

     * Enables alternative client authentication methods for the specified directory.
     *

     *
     * @param enableClientAuthenticationRequest
     * @return Result of the EnableClientAuthentication operation returned by the service.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws InvalidClientAuthStatusException
     *         Client authentication is already enabled.
     * @throws AccessDeniedException
     *         Client authentication is not available in this region at this time.
     * @throws NoAvailableCertificateException
     *         Client authentication setup could not be completed because at least one valid certificate must be
     *         registered in the system.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.EnableClientAuthentication
     * @see AWS
     *      API Documentation
     */
    EnableClientAuthenticationResult enableClientAuthentication(EnableClientAuthenticationRequest enableClientAuthenticationRequest);

    /**
     *

     * Activates the switch for the specific directory to always use LDAP secure calls.
     *

     *
     * @param enableLDAPSRequest
     * @return Result of the EnableLDAPS operation returned by the service.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws NoAvailableCertificateException
     *         Client authentication setup could not be completed because at least one valid certificate must be
     *         registered in the system.
     * @throws InvalidLDAPSStatusException
     *         The LDAP activities could not be performed because they are limited by the LDAPS status.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.EnableLDAPS
     * @see AWS API
     *      Documentation
     */
    EnableLDAPSResult enableLDAPS(EnableLDAPSRequest enableLDAPSRequest);

    /**
     *

     * Enables multi-factor authentication (MFA) with the Remote Authentication Dial In User Service (RADIUS) server for
     * an AD Connector or Microsoft AD directory.
     *

     *
     * @param enableRadiusRequest
     *        Contains the inputs for the EnableRadius operation.
     * @return Result of the EnableRadius operation returned by the service.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws EntityAlreadyExistsException
     *         The specified entity already exists.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.EnableRadius
     * @see AWS API
     *      Documentation
     */
    EnableRadiusResult enableRadius(EnableRadiusRequest enableRadiusRequest);

    /**
     *

     * Enables single sign-on for a directory. Single sign-on allows users in your directory to access certain Amazon
     * Web Services services from a computer joined to the directory without having to enter their credentials
     * separately.
     *

     *
     * @param enableSsoRequest
     *        Contains the inputs for the EnableSso operation.
     * @return Result of the EnableSso operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InsufficientPermissionsException
     *         The account does not have sufficient permission to perform the operation.
     * @throws AuthenticationFailedException
     *         An authentication error occurred.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.EnableSso
     * @see AWS API
     *      Documentation
     */
    EnableSsoResult enableSso(EnableSsoRequest enableSsoRequest);

    /**
     *

     * Obtains directory limit information for the current Region.
     *

     *
     * @param getDirectoryLimitsRequest
     *        Contains the inputs for the GetDirectoryLimits operation.
     * @return Result of the GetDirectoryLimits operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.GetDirectoryLimits
     * @see AWS API
     *      Documentation
     */
    GetDirectoryLimitsResult getDirectoryLimits(GetDirectoryLimitsRequest getDirectoryLimitsRequest);

    /**
     * Simplified method form for invoking the GetDirectoryLimits operation.
     *
     * @see #getDirectoryLimits(GetDirectoryLimitsRequest)
     */
    GetDirectoryLimitsResult getDirectoryLimits();

    /**
     *

     * Obtains the manual snapshot limits for a directory.
     *

     *
     * @param getSnapshotLimitsRequest
     *        Contains the inputs for the GetSnapshotLimits operation.
     * @return Result of the GetSnapshotLimits operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.GetSnapshotLimits
     * @see AWS API
     *      Documentation
     */
    GetSnapshotLimitsResult getSnapshotLimits(GetSnapshotLimitsRequest getSnapshotLimitsRequest);

    /**
     *

     * For the specified directory, lists all the certificates registered for a secure LDAP or client certificate
     * authentication.
     *

     *
     * @param listCertificatesRequest
     * @return Result of the ListCertificates operation returned by the service.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.ListCertificates
     * @see AWS API
     *      Documentation
     */
    ListCertificatesResult listCertificates(ListCertificatesRequest listCertificatesRequest);

    /**
     *

     * Lists the address blocks that you have added to a directory.
     *

     *
     * @param listIpRoutesRequest
     * @return Result of the ListIpRoutes operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.ListIpRoutes
     * @see AWS API
     *      Documentation
     */
    ListIpRoutesResult listIpRoutes(ListIpRoutesRequest listIpRoutesRequest);

    /**
     *

     * Lists the active log subscriptions for the Amazon Web Services account.
     *

     *
     * @param listLogSubscriptionsRequest
     * @return Result of the ListLogSubscriptions operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.ListLogSubscriptions
     * @see AWS API
     *      Documentation
     */
    ListLogSubscriptionsResult listLogSubscriptions(ListLogSubscriptionsRequest listLogSubscriptionsRequest);

    /**
     *

     * Lists all schema extensions applied to a Microsoft AD Directory.
     *

     *
     * @param listSchemaExtensionsRequest
     * @return Result of the ListSchemaExtensions operation returned by the service.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.ListSchemaExtensions
     * @see AWS API
     *      Documentation
     */
    ListSchemaExtensionsResult listSchemaExtensions(ListSchemaExtensionsRequest listSchemaExtensionsRequest);

    /**
     *

     * Lists all tags on a directory.
     *

     *
     * @param listTagsForResourceRequest
     * @return Result of the ListTagsForResource operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidNextTokenException
     *         The NextToken value is not valid.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.ListTagsForResource
     * @see AWS API
     *      Documentation
     */
    ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest);

    /**
     *

     * Registers a certificate for a secure LDAP or client certificate authentication.
     *

     *
     * @param registerCertificateRequest
     * @return Result of the RegisterCertificate operation returned by the service.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws InvalidCertificateException
     *         The certificate PEM that was provided has incorrect encoding.
     * @throws CertificateLimitExceededException
     *         The certificate could not be added because the certificate limit has been reached.
     * @throws CertificateAlreadyExistsException
     *         The certificate has already been registered into the system.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.RegisterCertificate
     * @see AWS API
     *      Documentation
     */
    RegisterCertificateResult registerCertificate(RegisterCertificateRequest registerCertificateRequest);

    /**
     *

     * Associates a directory with an Amazon SNS topic. This establishes the directory as a publisher to the specified
     * Amazon SNS topic. You can then receive email or text (SMS) messages when the status of your directory changes.
     * You get notified if your directory goes from an Active status to an Impaired or Inoperable status. You also
     * receive a notification when the directory returns to an Active status.
     *

     *
     * @param registerEventTopicRequest
     *        Registers a new event topic.
     * @return Result of the RegisterEventTopic operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.RegisterEventTopic
     * @see AWS API
     *      Documentation
     */
    RegisterEventTopicResult registerEventTopic(RegisterEventTopicRequest registerEventTopicRequest);

    /**
     *

     * Rejects a directory sharing request that was sent from the directory owner account.
     *

     *
     * @param rejectSharedDirectoryRequest
     * @return Result of the RejectSharedDirectory operation returned by the service.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws DirectoryAlreadySharedException
     *         The specified directory has already been shared with this Amazon Web Services account.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.RejectSharedDirectory
     * @see AWS API
     *      Documentation
     */
    RejectSharedDirectoryResult rejectSharedDirectory(RejectSharedDirectoryRequest rejectSharedDirectoryRequest);

    /**
     *

     * Removes IP address blocks from a directory.
     *

     *
     * @param removeIpRoutesRequest
     * @return Result of the RemoveIpRoutes operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.RemoveIpRoutes
     * @see AWS API
     *      Documentation
     */
    RemoveIpRoutesResult removeIpRoutes(RemoveIpRoutesRequest removeIpRoutesRequest);

    /**
     *

     * Stops all replication and removes the domain controllers from the specified Region. You cannot remove the primary
     * Region with this operation. Instead, use the DeleteDirectory API.
     *

     *
     * @param removeRegionRequest
     * @return Result of the RemoveRegion operation returned by the service.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws AccessDeniedException
     *         Client authentication is not available in this region at this time.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.RemoveRegion
     * @see AWS API
     *      Documentation
     */
    RemoveRegionResult removeRegion(RemoveRegionRequest removeRegionRequest);

    /**
     *

     * Removes tags from a directory.
     *

     *
     * @param removeTagsFromResourceRequest
     * @return Result of the RemoveTagsFromResource operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.RemoveTagsFromResource
     * @see AWS API
     *      Documentation
     */
    RemoveTagsFromResourceResult removeTagsFromResource(RemoveTagsFromResourceRequest removeTagsFromResourceRequest);

    /**
     *

     * Resets the password for any user in your Managed Microsoft AD or Simple AD directory.
     *

     *

     * You can reset the password for any user in your directory with the following exceptions:
     *

     *

     *

     *

     * For Simple AD, you cannot reset the password for any user that is a member of either the Domain Admins or
     * Enterprise Admins group except for the administrator user.
     *

     *

     *

     *

     * For Managed Microsoft AD, you can only reset the password for a user that is in an OU based off of the NetBIOS
     * name that you typed when you created your directory. For example, you cannot reset the password for a user in the
     * Amazon Web Services Reserved OU. For more information about the OU structure for an Managed Microsoft AD
     * directory, see What Gets Created in the Directory Service Administration Guide.
     *

     *

     *

     *
     * @param resetUserPasswordRequest
     * @return Result of the ResetUserPassword operation returned by the service.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws UserDoesNotExistException
     *         The user provided a username that does not exist in your directory.
     * @throws InvalidPasswordException
     *         The new password provided by the user does not meet the password complexity requirements defined in your
     *         directory.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.ResetUserPassword
     * @see AWS API
     *      Documentation
     */
    ResetUserPasswordResult resetUserPassword(ResetUserPasswordRequest resetUserPasswordRequest);

    /**
     *

     * Restores a directory using an existing directory snapshot.
     *

     *

     * When you restore a directory from a snapshot, any changes made to the directory after the snapshot date are
     * overwritten.
     *

     *

     * This action returns as soon as the restore operation is initiated. You can monitor the progress of the restore
     * operation by calling the DescribeDirectories operation with the directory identifier. When the
     * DirectoryDescription.Stage value changes to Active, the restore operation is complete.
     *

     *
     * @param restoreFromSnapshotRequest
     *        An object representing the inputs for the RestoreFromSnapshot operation.
     * @return Result of the RestoreFromSnapshot operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.RestoreFromSnapshot
     * @see AWS API
     *      Documentation
     */
    RestoreFromSnapshotResult restoreFromSnapshot(RestoreFromSnapshotRequest restoreFromSnapshotRequest);

    /**
     *

     * Shares a specified directory (DirectoryId) in your Amazon Web Services account (directory owner)
     * with another Amazon Web Services account (directory consumer). With this operation you can use your directory
     * from any Amazon Web Services account and from any Amazon VPC within an Amazon Web Services Region.
     *

     *

     * When you share your Managed Microsoft AD directory, Directory Service creates a shared directory in the directory
     * consumer account. This shared directory contains the metadata to provide access to the directory within the
     * directory owner account. The shared directory is visible in all VPCs in the directory consumer account.
     *

     *

     * The ShareMethod parameter determines whether the specified directory can be shared between Amazon
     * Web Services accounts inside the same Amazon Web Services organization (ORGANIZATIONS). It also
     * determines whether you can share the directory with any other Amazon Web Services account either inside or
     * outside of the organization (HANDSHAKE).
     *

     *

     * The ShareNotes parameter is only used when HANDSHAKE is called, which sends a directory
     * sharing request to the directory consumer.
     *

     *
     * @param shareDirectoryRequest
     * @return Result of the ShareDirectory operation returned by the service.
     * @throws DirectoryAlreadySharedException
     *         The specified directory has already been shared with this Amazon Web Services account.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidTargetException
     *         The specified shared target is not valid.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ShareLimitExceededException
     *         The maximum number of Amazon Web Services accounts that you can share with this directory has been
     *         reached.
     * @throws OrganizationsException
     *         Exception encountered while trying to access your Amazon Web Services organization.
     * @throws AccessDeniedException
     *         Client authentication is not available in this region at this time.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.ShareDirectory
     * @see AWS API
     *      Documentation
     */
    ShareDirectoryResult shareDirectory(ShareDirectoryRequest shareDirectoryRequest);

    /**
     *

     * Applies a schema extension to a Microsoft AD directory.
     *

     *
     * @param startSchemaExtensionRequest
     * @return Result of the StartSchemaExtension operation returned by the service.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws SnapshotLimitExceededException
     *         The maximum number of manual snapshots for the directory has been reached. You can use the
     *         GetSnapshotLimits operation to determine the snapshot limits for a directory.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.StartSchemaExtension
     * @see AWS API
     *      Documentation
     */
    StartSchemaExtensionResult startSchemaExtension(StartSchemaExtensionRequest startSchemaExtensionRequest);

    /**
     *

     * Stops the directory sharing between the directory owner and consumer accounts.
     *

     *
     * @param unshareDirectoryRequest
     * @return Result of the UnshareDirectory operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidTargetException
     *         The specified shared target is not valid.
     * @throws DirectoryNotSharedException
     *         The specified directory has not been shared with this Amazon Web Services account.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.UnshareDirectory
     * @see AWS API
     *      Documentation
     */
    UnshareDirectoryResult unshareDirectory(UnshareDirectoryRequest unshareDirectoryRequest);

    /**
     *

     * Updates a conditional forwarder that has been set up for your Amazon Web Services directory.
     *

     *
     * @param updateConditionalForwarderRequest
     *        Updates a conditional forwarder.
     * @return Result of the UpdateConditionalForwarder operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.UpdateConditionalForwarder
     * @see AWS
     *      API Documentation
     */
    UpdateConditionalForwarderResult updateConditionalForwarder(UpdateConditionalForwarderRequest updateConditionalForwarderRequest);

    /**
     *

     * Updates the directory for a particular update type.
     *

     *
     * @param updateDirectorySetupRequest
     * @return Result of the UpdateDirectorySetup operation returned by the service.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws DirectoryInDesiredStateException
     *         The directory is already updated to desired update type settings.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws SnapshotLimitExceededException
     *         The maximum number of manual snapshots for the directory has been reached. You can use the
     *         GetSnapshotLimits operation to determine the snapshot limits for a directory.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws AccessDeniedException
     *         Client authentication is not available in this region at this time.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.UpdateDirectorySetup
     * @see AWS API
     *      Documentation
     */
    UpdateDirectorySetupResult updateDirectorySetup(UpdateDirectorySetupRequest updateDirectorySetupRequest);

    /**
     *

     * Adds or removes domain controllers to or from the directory. Based on the difference between current value and
     * new value (provided through this API call), domain controllers will be added or removed. It may take up to 45
     * minutes for any new domain controllers to become fully active once the requested number of domain controllers is
     * updated. During this time, you cannot make another update request.
     *

     *
     * @param updateNumberOfDomainControllersRequest
     * @return Result of the UpdateNumberOfDomainControllers operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws DomainControllerLimitExceededException
     *         The maximum allowed number of domain controllers per directory was exceeded. The default limit per
     *         directory is 20 domain controllers.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.UpdateNumberOfDomainControllers
     * @see AWS API Documentation
     */
    UpdateNumberOfDomainControllersResult updateNumberOfDomainControllers(UpdateNumberOfDomainControllersRequest updateNumberOfDomainControllersRequest);

    /**
     *

     * Updates the Remote Authentication Dial In User Service (RADIUS) server information for an AD Connector or
     * Microsoft AD directory.
     *

     *
     * @param updateRadiusRequest
     *        Contains the inputs for the UpdateRadius operation.
     * @return Result of the UpdateRadius operation returned by the service.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.UpdateRadius
     * @see AWS API
     *      Documentation
     */
    UpdateRadiusResult updateRadius(UpdateRadiusRequest updateRadiusRequest);

    /**
     *

     * Updates the configurable settings for the specified directory.
     *

     *
     * @param updateSettingsRequest
     * @return Result of the UpdateSettings operation returned by the service.
     * @throws DirectoryDoesNotExistException
     *         The specified directory does not exist in the system.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @throws DirectoryUnavailableException
     *         The specified directory is unavailable or could not be found.
     * @throws IncompatibleSettingsException
     *         The specified directory setting is not compatible with other settings.
     * @throws UnsupportedSettingsException
     *         The specified directory setting is not supported.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.UpdateSettings
     * @see AWS API
     *      Documentation
     */
    UpdateSettingsResult updateSettings(UpdateSettingsRequest updateSettingsRequest);

    /**
     *

     * Updates the trust that has been set up between your Managed Microsoft AD directory and an self-managed Active
     * Directory.
     *

     *
     * @param updateTrustRequest
     * @return Result of the UpdateTrust operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @sample AWSDirectoryService.UpdateTrust
     * @see AWS API
     *      Documentation
     */
    UpdateTrustResult updateTrust(UpdateTrustRequest updateTrustRequest);

    /**
     *

     * Directory Service for Microsoft Active Directory allows you to configure and verify trust relationships.
     *

     *

     * This action verifies a trust relationship between your Managed Microsoft AD directory and an external domain.
     *

     *
     * @param verifyTrustRequest
     *        Initiates the verification of an existing trust relationship between an Managed Microsoft AD directory and
     *        an external domain.
     * @return Result of the VerifyTrust operation returned by the service.
     * @throws EntityDoesNotExistException
     *         The specified entity could not be found.
     * @throws InvalidParameterException
     *         One or more parameters are not valid.
     * @throws ClientException
     *         A client exception has occurred.
     * @throws ServiceException
     *         An exception has occurred in Directory Service.
     * @throws UnsupportedOperationException
     *         The operation is not supported.
     * @sample AWSDirectoryService.VerifyTrust
     * @see AWS API
     *      Documentation
     */
    VerifyTrustResult verifyTrust(VerifyTrustRequest verifyTrustRequest);

    /**
     * Shuts down this client object, releasing any resources that might be held open. This is an optional method, and
     * callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client
     * has been shutdown, it should not be used to make any more requests.
     */
    void shutdown();

    /**
     * Returns additional metadata for a previously executed successful request, typically used for debugging issues
     * where a service isn't acting as expected. This data isn't considered part of the result data returned by an
     * operation, so it's available through this separate, diagnostic interface.
     *

     * Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
     * information for an executed request, you should use this method to retrieve it as soon as possible after
     * executing a request.
     *
     * @param request
     *        The originally executed request.
     *
     * @return The response metadata for the specified request, or null if none is available.
     */
    ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request);

}


text:
class Lammps < Formula
  homepage "http://lammps.sandia.gov"
  url "http://lammps.sandia.gov/tars/lammps-10Feb15.tar.gz"
  sha256 "f7b785b656537507feaa7d669e9b676ff87967223f7c153aa01ed89e4e7b9e92"
  # lammps releases are named after their release date. We transform it to
  # YYYY.MM.DD (year.month.day) so that we get a comparable version numbering (for brew outdated)
  version "2015.02.10"
  revision 2

  head "http://git.icms.temple.edu/lammps-ro.git"

  bottle do
    cellar :any
    sha256 "2f90ba6263c289926dbad7327df2264d21c477edca98a3f1b62a2b946f0783d4" => :el_capitan
    sha256 "e47498dbc526a81fbae00189a80af7a0ef166f6e7d365b8fb71bfc960b9837e9" => :yosemite
    sha256 "b29cc59b3e3f139a9dc4ff04743ef0f1a4ba953394c2da70d8e645174ae05111" => :mavericks
  end

  # user-submitted packages not considered "standard"
  USER_PACKAGES = %w[
    user-misc
    user-awpmd
    user-cg-cmm
    user-colvars
    user-eff
    user-molfile
    user-reaxc
    user-sph
  ]

  # could not get gpu or user-cuda to install (hardware problem?)
  # kim requires openkim software, which is not currently in homebrew.
  # user-atc would not install without mpi and then would not link to blas-lapack
  # user-omp requires gcc dependency (tricky). clang does not have OMP support, yet.
  DISABLED_PACKAGES = %w[
    gpu
    kim
    user-omp
    kokkos
  ]
  DISABLED_USER_PACKAGES = %w[
    user-atc
    user-cuda
  ]

  # setup user-packages as options
  USER_PACKAGES.each do |package|
    option "enable-#{package}", "Build lammps with the '#{package}' package"
  end

  depends_on "fftw"
  depends_on "jpeg"
  depends_on "voro++"
  depends_on :mpi => [:cxx, :f90, :recommended] # dummy MPI library provided in src/STUBS
  depends_on :fortran

  def build_lib(comp, lmp_lib, opts = {})
    change_compiler_var = opts[:change_compiler_var] # a non-standard compiler name to replace
    prefix_make_var = opts[:prefix_make_var] || "" # prepended to makefile variable names

    cd "lib/" + lmp_lib do
      if comp == "FC"
        make_file = "Makefile.gfortran" # make file
        compiler_var = "F90" # replace compiler
      elsif comp == "CXX"
        make_file = "Makefile.g++" # make file
        compiler_var = "CC" # replace compiler
      elsif comp == "MPICXX"
        make_file = "Makefile.openmpi" # make file
        compiler_var = "CC" # replace compiler
        comp = "CXX" unless ENV["MPICXX"]
      end
      compiler_var = change_compiler_var if change_compiler_var

      # force compiler
      inreplace make_file do |s|
        s.change_make_var! compiler_var, ENV[comp]
      end

      system "make", "-f", make_file

      if File.exist? "Makefile.lammps"
        # empty it to reduce chance of conflicts
        inreplace "Makefile.lammps" do |s|
          s.change_make_var! prefix_make_var + lmp_lib + "_SYSINC", ""
          s.change_make_var! prefix_make_var + lmp_lib + "_SYSLIB", ""
          s.change_make_var! prefix_make_var + lmp_lib + "_SYSPATH", ""
        end
      end
    end
  end

  def pyver
    Language::Python.major_minor_version "python"
  end

  # This fixes the python module to point to the absolute path of the lammps library
  # without this the module cannot find the library when homebrew is installed in a
  # custom directory.
  patch :DATA

  def install
    ENV.j1 # not parallel safe (some packages have race conditions :meam:)

    # make sure to optimize the installation
    ENV.append "CFLAGS", "-O"
    ENV.append "LDFLAGS", "-O"

    if build.with? :mpi
      # Simplify by relying on the mpi compilers
      ENV["FC"]  = ENV["MPIFC"]
      ENV["CXX"] = ENV["MPICXX"]
    end

    # build package libraries
    build_lib "FC",    "reax"
    build_lib "FC",    "meam"
    build_lib "CXX",   "poems"
    build_lib "CXX",   "colvars", :change_compiler_var => "CXX" if build.include? "enable-user-colvars"
    if build.include? "enable-user-awpmd"
      build_lib "MPICXX", "awpmd", :prefix_make_var => "user-"
      ENV.append "LDFLAGS", "-lblas -llapack"
    end

    # Locate gfortran library
    libgfortran = `$FC --print-file-name libgfortran.a`.chomp
    ENV.append "LDFLAGS", "-L#{File.dirname libgfortran} -lgfortran"

    inreplace "lib/voronoi/Makefile.lammps" do |s|
      s.change_make_var! "voronoi_SYSINC", "-I#{Formula["voro++"].opt_include}/voro++"
    end

    # build the lammps program and library
    cd "src" do
      # setup the make file variabls for fftw, jpeg, and mpi
      inreplace "MAKE/MACHINES/Makefile.mac" do |s|
        # We will stick with "make mac" type and forget about
        # "make mac_mpi" because it has some unnecessary
        # settings. We get a nice clean slate with "mac"
        if build.with? :mpi
          #-DOMPI_SKIP_MPICXX is to speed up c++ compilation
          s.change_make_var! "MPI_INC",  "-DOMPI_SKIP_MPICXX"
          s.change_make_var! "MPI_PATH", ""
          s.change_make_var! "MPI_LIB",  ""
        end
        s.change_make_var! "CC",   ENV["CXX"]
        s.change_make_var! "LINK", ENV["CXX"]

        # installing with FFTW and JPEG
        s.change_make_var! "FFT_INC",  "-DFFT_FFTW3 -I#{Formula["fftw"].opt_prefix}/include"
        s.change_make_var! "FFT_PATH", "-L#{Formula["fftw"].opt_prefix}/lib"
        s.change_make_var! "FFT_LIB",  "-lfftw3"

        s.change_make_var! "JPG_INC",  "-DLAMMPS_JPEG -I#{Formula["jpeg"].opt_prefix}/include"
        s.change_make_var! "JPG_PATH", "-L#{Formula["jpeg"].opt_prefix}/lib"
        s.change_make_var! "JPG_LIB",  "-ljpeg"

        s.change_make_var! "CCFLAGS",  ENV["CFLAGS"]
        s.change_make_var! "LIB",      ENV["LDFLAGS"]
      end

      # setup standard packages
      system "make", "yes-standard"
      DISABLED_PACKAGES.each do |pkg|
        system "make", "no-" + pkg
      end

      # setup optional packages
      USER_PACKAGES.each do |pkg|
        system "make", "yes-" + pkg if build.include? "enable-" + pkg
      end

      if build.without? :mpi
        # build fake mpi library
        cd "STUBS" do
          system "make"
        end
      end

      system "make", "mac"
      mv "lmp_mac", "lammps" # rename it to make it easier to find

      # build the lammps library
      system "make", "makeshlib"
      system "make", "-f", "Makefile.shlib", "mac"

      # install them
      bin.install("lammps")
      lib.install("liblammps_mac.so")
      lib.install("liblammps.so") # this is just a soft-link to liblamps_mac.so
    end

    # get the python module
    cd "python" do
      temp_site_packages = lib/"python#{pyver}/site-packages"
      mkdir_p temp_site_packages
      ENV["PYTHONPATH"] = temp_site_packages

      system "python", "install.py", lib, temp_site_packages
      mv "examples", "python-examples"
      prefix.install("python-examples")
    end

    # install additional materials
    (share / "lammps").install(%w[doc potentials tools bench examples])
  end

  test do
    ENV.prepend_create_path "PYTHONPATH", lib + "python#{pyver}/site-packages"
    # to prevent log files, move them to a temporary directory
    mktemp do
      system "lammps", "-in", "#{HOMEBREW_PREFIX}/share/lammps/bench/in.lj"
      system "python", "-c", "from lammps import lammps ; lammps().file('#{HOMEBREW_PREFIX}/share/lammps/bench/in.lj')"
    end
  end

  def caveats
    <<-EOS.undent
    You should run a benchmark test or two. There are plenty available.

      cd #{HOMEBREW_PREFIX}/share/lammps/bench
      lammps -in in.lj
      # with mpi
      mpiexec -n 2 lammps -in in.lj

    The following directories could come in handy

      Documentation:
      #{HOMEBREW_PREFIX}/share/lammps/doc/Manual.html

      Potential files:
      #{HOMEBREW_PREFIX}/share/lammps/potentials

      Python examples:
      #{HOMEBREW_PREFIX}/share/lammps/python-examples

      Additional tools (may require manual installation):
      #{HOMEBREW_PREFIX}/share/lammps/tools

    To use the Python module with Python, you may need to amend your
    PYTHONPATH like:
      export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/python#{pyver}/site-packages:$PYTHONPATH

    EOS
  end
end

__END__
diff --git a/python/lammps.py b/python/lammps.py
index c65e84c..b2b28a2 100644
--- a/python/lammps.py
+++ b/python/lammps.py
@@ -23,8 +23,8 @@ class lammps:
     # if name = "g++", load liblammps_g++.so

     try:
-      if not name: self.lib = CDLL("liblammps.so",RTLD_GLOBAL)
-      else: self.lib = CDLL("liblammps_%s.so" % name,RTLD_GLOBAL)
+      if not name: self.lib = CDLL("HOMEBREW_PREFIX/lib/liblammps.so",RTLD_GLOBAL)
+      else: self.lib = CDLL("HOMEBREW_PREFIX/lib/liblammps_%s.so" % name,RTLD_GLOBAL)
     except:
       type,value,tb = sys.exc_info()
       traceback.print_exception(type,value,tb)

redpajama_set_name: RedPajamaGithub


text:
import pytest
from django.contrib.auth.models import User, Permission
from django.core.files.uploadedfile import SimpleUploadedFile
from tinycontent.models import TinyContent, TinyContentFileUpload

@pytest.fixture()
def simple_content():
    content, _ = TinyContent.objects.get_or_create(
        name='foobar',
        content='This is a test.'
    )
    return content

@pytest.fixture()
def simple_content_with_space():
    content, _ = TinyContent.objects.get_or_create(
        name='foo bar',
        content='This is a test with a space.'
    )
    return content

@pytest.fixture()
def split_content():
    content, _ = TinyContent.objects.get_or_create(
        name='foo:bar',
        content='This is a second test.'
    )
    return content

@pytest.fixture()
def html_content():
    content, _ = TinyContent.objects.get_or_create(
        name='html',
        content='<strong>&</strong>'
    )
    return content

@pytest.fixture()
def user():
    user, _ = User.objects.get_or_create(username='dom')

    add_perm = Permission.objects.get(
        codename='add_tinycontent'
    )
    change_perm = Permission.objects.get(
        codename='change_tinycontent'
    )

    user.user_permissions.add(add_perm)
    user.user_permissions.add(change_perm)
    user.save()

    return user

@pytest.fixture()
def user_noauth():
    user, _ = User.objects.get_or_create(username='barry')

    return user

@pytest.fixture()
def file_upload():
    upload, _ = TinyContentFileUpload.objects.get_or_create(
        name='Foobar',
        file=SimpleUploadedFile(
            'simple_file.txt', b'Hello, world!'
        )
    )

    return upload