<?php
namespace Aws\WellArchitected;

use Aws\AwsClient;

/**
 * This client is used to interact with the **AWS Well-Architected Tool** service.
 * @method \Aws\Result associateLenses(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateLensesAsync(array $args = [])
 * @method \Aws\Result associateProfiles(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateProfilesAsync(array $args = [])
 * @method \Aws\Result createLensShare(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createLensShareAsync(array $args = [])
 * @method \Aws\Result createLensVersion(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createLensVersionAsync(array $args = [])
 * @method \Aws\Result createMilestone(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createMilestoneAsync(array $args = [])
 * @method \Aws\Result createProfile(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createProfileAsync(array $args = [])
 * @method \Aws\Result createProfileShare(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createProfileShareAsync(array $args = [])
 * @method \Aws\Result createWorkload(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createWorkloadAsync(array $args = [])
 * @method \Aws\Result createWorkloadShare(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createWorkloadShareAsync(array $args = [])
 * @method \Aws\Result deleteLens(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteLensAsync(array $args = [])
 * @method \Aws\Result deleteLensShare(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteLensShareAsync(array $args = [])
 * @method \Aws\Result deleteProfile(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteProfileAsync(array $args = [])
 * @method \Aws\Result deleteProfileShare(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteProfileShareAsync(array $args = [])
 * @method \Aws\Result deleteWorkload(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteWorkloadAsync(array $args = [])
 * @method \Aws\Result deleteWorkloadShare(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteWorkloadShareAsync(array $args = [])
 * @method \Aws\Result disassociateLenses(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateLensesAsync(array $args = [])
 * @method \Aws\Result disassociateProfiles(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateProfilesAsync(array $args = [])
 * @method \Aws\Result exportLens(array $args = [])
 * @method \GuzzleHttp\Promise\Promise exportLensAsync(array $args = [])
 * @method \Aws\Result getAnswer(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getAnswerAsync(array $args = [])
 * @method \Aws\Result getConsolidatedReport(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getConsolidatedReportAsync(array $args = [])
 * @method \Aws\Result getLens(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getLensAsync(array $args = [])
 * @method \Aws\Result getLensReview(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getLensReviewAsync(array $args = [])
 * @method \Aws\Result getLensReviewReport(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getLensReviewReportAsync(array $args = [])
 * @method \Aws\Result getLensVersionDifference(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getLensVersionDifferenceAsync(array $args = [])
 * @method \Aws\Result getMilestone(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getMilestoneAsync(array $args = [])
 * @method \Aws\Result getProfile(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getProfileAsync(array $args = [])
 * @method \Aws\Result getProfileTemplate(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getProfileTemplateAsync(array $args = [])
 * @method \Aws\Result getWorkload(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getWorkloadAsync(array $args = [])
 * @method \Aws\Result importLens(array $args = [])
 * @method \GuzzleHttp\Promise\Promise importLensAsync(array $args = [])
 * @method \Aws\Result listAnswers(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listAnswersAsync(array $args = [])
 * @method \Aws\Result listCheckDetails(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listCheckDetailsAsync(array $args = [])
 * @method \Aws\Result listCheckSummaries(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listCheckSummariesAsync(array $args = [])
 * @method \Aws\Result listLensReviewImprovements(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listLensReviewImprovementsAsync(array $args = [])
 * @method \Aws\Result listLensReviews(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listLensReviewsAsync(array $args = [])
 * @method \Aws\Result listLensShares(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listLensSharesAsync(array $args = [])
 * @method \Aws\Result listLenses(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listLensesAsync(array $args = [])
 * @method \Aws\Result listMilestones(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listMilestonesAsync(array $args = [])
 * @method \Aws\Result listNotifications(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listNotificationsAsync(array $args = [])
 * @method \Aws\Result listProfileNotifications(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listProfileNotificationsAsync(array $args = [])
 * @method \Aws\Result listProfileShares(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listProfileSharesAsync(array $args = [])
 * @method \Aws\Result listProfiles(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listProfilesAsync(array $args = [])
 * @method \Aws\Result listShareInvitations(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listShareInvitationsAsync(array $args = [])
 * @method \Aws\Result listTagsForResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
 * @method \Aws\Result listWorkloadShares(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listWorkloadSharesAsync(array $args = [])
 * @method \Aws\Result listWorkloads(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listWorkloadsAsync(array $args = [])
 * @method \Aws\Result tagResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
 * @method \Aws\Result untagResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
 * @method \Aws\Result updateAnswer(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateAnswerAsync(array $args = [])
 * @method \Aws\Result updateGlobalSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateGlobalSettingsAsync(array $args = [])
 * @method \Aws\Result updateLensReview(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateLensReviewAsync(array $args = [])
 * @method \Aws\Result updateProfile(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateProfileAsync(array $args = [])
 * @method \Aws\Result updateShareInvitation(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateShareInvitationAsync(array $args = [])
 * @method \Aws\Result updateWorkload(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateWorkloadAsync(array $args = [])
 * @method \Aws\Result updateWorkloadShare(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateWorkloadShareAsync(array $args = [])
 * @method \Aws\Result upgradeLensReview(array $args = [])
 * @method \GuzzleHttp\Promise\Promise upgradeLensReviewAsync(array $args = [])
 * @method \Aws\Result upgradeProfileVersion(array $args = [])
 * @method \GuzzleHttp\Promise\Promise upgradeProfileVersionAsync(array $args = [])
 */
class WellArchitectedClient extends AwsClient {}


<?php
namespace Aws\WellArchitected\Exception;

use Aws\Exception\AwsException;

/**
 * Represents an error interacting with the **AWS Well-Architected Tool** service.
 */
class WellArchitectedException extends AwsException {}


<?php
namespace Aws\WorkDocs;

use Aws\AwsClient;

/**
 * This client is used to interact with the **Amazon WorkDocs** service.
 * @method \Aws\Result abortDocumentVersionUpload(array $args = [])
 * @method \GuzzleHttp\Promise\Promise abortDocumentVersionUploadAsync(array $args = [])
 * @method \Aws\Result activateUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise activateUserAsync(array $args = [])
 * @method \Aws\Result addResourcePermissions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise addResourcePermissionsAsync(array $args = [])
 * @method \Aws\Result createComment(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createCommentAsync(array $args = [])
 * @method \Aws\Result createCustomMetadata(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createCustomMetadataAsync(array $args = [])
 * @method \Aws\Result createFolder(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createFolderAsync(array $args = [])
 * @method \Aws\Result createLabels(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createLabelsAsync(array $args = [])
 * @method \Aws\Result createNotificationSubscription(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createNotificationSubscriptionAsync(array $args = [])
 * @method \Aws\Result createUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = [])
 * @method \Aws\Result deactivateUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deactivateUserAsync(array $args = [])
 * @method \Aws\Result deleteComment(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteCommentAsync(array $args = [])
 * @method \Aws\Result deleteCustomMetadata(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteCustomMetadataAsync(array $args = [])
 * @method \Aws\Result deleteDocument(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteDocumentAsync(array $args = [])
 * @method \Aws\Result deleteDocumentVersion(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteDocumentVersionAsync(array $args = [])
 * @method \Aws\Result deleteFolder(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteFolderAsync(array $args = [])
 * @method \Aws\Result deleteFolderContents(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteFolderContentsAsync(array $args = [])
 * @method \Aws\Result deleteLabels(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteLabelsAsync(array $args = [])
 * @method \Aws\Result deleteNotificationSubscription(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteNotificationSubscriptionAsync(array $args = [])
 * @method \Aws\Result deleteUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteUserAsync(array $args = [])
 * @method \Aws\Result describeActivities(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeActivitiesAsync(array $args = [])
 * @method \Aws\Result describeComments(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeCommentsAsync(array $args = [])
 * @method \Aws\Result describeDocumentVersions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeDocumentVersionsAsync(array $args = [])
 * @method \Aws\Result describeFolderContents(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeFolderContentsAsync(array $args = [])
 * @method \Aws\Result describeGroups(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeGroupsAsync(array $args = [])
 * @method \Aws\Result describeNotificationSubscriptions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeNotificationSubscriptionsAsync(array $args = [])
 * @method \Aws\Result describeResourcePermissions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeResourcePermissionsAsync(array $args = [])
 * @method \Aws\Result describeRootFolders(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeRootFoldersAsync(array $args = [])
 * @method \Aws\Result describeUsers(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeUsersAsync(array $args = [])
 * @method \Aws\Result getCurrentUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getCurrentUserAsync(array $args = [])
 * @method \Aws\Result getDocument(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDocumentAsync(array $args = [])
 * @method \Aws\Result getDocumentPath(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDocumentPathAsync(array $args = [])
 * @method \Aws\Result getDocumentVersion(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDocumentVersionAsync(array $args = [])
 * @method \Aws\Result getFolder(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getFolderAsync(array $args = [])
 * @method \Aws\Result getFolderPath(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getFolderPathAsync(array $args = [])
 * @method \Aws\Result getResources(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getResourcesAsync(array $args = [])
 * @method \Aws\Result initiateDocumentVersionUpload(array $args = [])
 * @method \GuzzleHttp\Promise\Promise initiateDocumentVersionUploadAsync(array $args = [])
 * @method \Aws\Result removeAllResourcePermissions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise removeAllResourcePermissionsAsync(array $args = [])
 * @method \Aws\Result removeResourcePermission(array $args = [])
 * @method \GuzzleHttp\Promise\Promise removeResourcePermissionAsync(array $args = [])
 * @method \Aws\Result restoreDocumentVersions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise restoreDocumentVersionsAsync(array $args = [])
 * @method \Aws\Result searchResources(array $args = [])
 * @method \GuzzleHttp\Promise\Promise searchResourcesAsync(array $args = [])
 * @method \Aws\Result updateDocument(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateDocumentAsync(array $args = [])
 * @method \Aws\Result updateDocumentVersion(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateDocumentVersionAsync(array $args = [])
 * @method \Aws\Result updateFolder(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateFolderAsync(array $args = [])
 * @method \Aws\Result updateUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateUserAsync(array $args = [])
 */
class WorkDocsClient extends AwsClient {}


<?php
namespace Aws\WorkDocs\Exception;

use Aws\Exception\AwsException;

/**
 * Represents an error interacting with the **Amazon WorkDocs** service.
 */
class WorkDocsException extends AwsException {}


<?php
namespace Aws\WorkLink;

use Aws\AwsClient;

/**
 * This client is used to interact with the **Amazon WorkLink** service.
 * @method \Aws\Result associateDomain(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateDomainAsync(array $args = [])
 * @method \Aws\Result associateWebsiteAuthorizationProvider(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateWebsiteAuthorizationProviderAsync(array $args = [])
 * @method \Aws\Result associateWebsiteCertificateAuthority(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateWebsiteCertificateAuthorityAsync(array $args = [])
 * @method \Aws\Result createFleet(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createFleetAsync(array $args = [])
 * @method \Aws\Result deleteFleet(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteFleetAsync(array $args = [])
 * @method \Aws\Result describeAuditStreamConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeAuditStreamConfigurationAsync(array $args = [])
 * @method \Aws\Result describeCompanyNetworkConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeCompanyNetworkConfigurationAsync(array $args = [])
 * @method \Aws\Result describeDevice(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeDeviceAsync(array $args = [])
 * @method \Aws\Result describeDevicePolicyConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeDevicePolicyConfigurationAsync(array $args = [])
 * @method \Aws\Result describeDomain(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeDomainAsync(array $args = [])
 * @method \Aws\Result describeFleetMetadata(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeFleetMetadataAsync(array $args = [])
 * @method \Aws\Result describeIdentityProviderConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeIdentityProviderConfigurationAsync(array $args = [])
 * @method \Aws\Result describeWebsiteCertificateAuthority(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeWebsiteCertificateAuthorityAsync(array $args = [])
 * @method \Aws\Result disassociateDomain(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateDomainAsync(array $args = [])
 * @method \Aws\Result disassociateWebsiteAuthorizationProvider(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateWebsiteAuthorizationProviderAsync(array $args = [])
 * @method \Aws\Result disassociateWebsiteCertificateAuthority(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateWebsiteCertificateAuthorityAsync(array $args = [])
 * @method \Aws\Result listDevices(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listDevicesAsync(array $args = [])
 * @method \Aws\Result listDomains(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listDomainsAsync(array $args = [])
 * @method \Aws\Result listFleets(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listFleetsAsync(array $args = [])
 * @method \Aws\Result listTagsForResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
 * @method \Aws\Result listWebsiteAuthorizationProviders(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listWebsiteAuthorizationProvidersAsync(array $args = [])
 * @method \Aws\Result listWebsiteCertificateAuthorities(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listWebsiteCertificateAuthoritiesAsync(array $args = [])
 * @method \Aws\Result restoreDomainAccess(array $args = [])
 * @method \GuzzleHttp\Promise\Promise restoreDomainAccessAsync(array $args = [])
 * @method \Aws\Result revokeDomainAccess(array $args = [])
 * @method \GuzzleHttp\Promise\Promise revokeDomainAccessAsync(array $args = [])
 * @method \Aws\Result signOutUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise signOutUserAsync(array $args = [])
 * @method \Aws\Result tagResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
 * @method \Aws\Result untagResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
 * @method \Aws\Result updateAuditStreamConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateAuditStreamConfigurationAsync(array $args = [])
 * @method \Aws\Result updateCompanyNetworkConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateCompanyNetworkConfigurationAsync(array $args = [])
 * @method \Aws\Result updateDevicePolicyConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateDevicePolicyConfigurationAsync(array $args = [])
 * @method \Aws\Result updateDomainMetadata(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateDomainMetadataAsync(array $args = [])
 * @method \Aws\Result updateFleetMetadata(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateFleetMetadataAsync(array $args = [])
 * @method \Aws\Result updateIdentityProviderConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateIdentityProviderConfigurationAsync(array $args = [])
 */
class WorkLinkClient extends AwsClient {}


<?php
namespace Aws\WorkLink\Exception;

use Aws\Exception\AwsException;

/**
 * Represents an error interacting with the **Amazon WorkLink** service.
 */
class WorkLinkException extends AwsException {}


<?php
namespace Aws\WorkMail;

use Aws\AwsClient;

/**
 * This client is used to interact with the **Amazon WorkMail** service.
 * @method \Aws\Result associateDelegateToResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateDelegateToResourceAsync(array $args = [])
 * @method \Aws\Result associateMemberToGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateMemberToGroupAsync(array $args = [])
 * @method \Aws\Result assumeImpersonationRole(array $args = [])
 * @method \GuzzleHttp\Promise\Promise assumeImpersonationRoleAsync(array $args = [])
 * @method \Aws\Result cancelMailboxExportJob(array $args = [])
 * @method \GuzzleHttp\Promise\Promise cancelMailboxExportJobAsync(array $args = [])
 * @method \Aws\Result createAlias(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createAliasAsync(array $args = [])
 * @method \Aws\Result createAvailabilityConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createAvailabilityConfigurationAsync(array $args = [])
 * @method \Aws\Result createGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createGroupAsync(array $args = [])
 * @method \Aws\Result createImpersonationRole(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createImpersonationRoleAsync(array $args = [])
 * @method \Aws\Result createMobileDeviceAccessRule(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createMobileDeviceAccessRuleAsync(array $args = [])
 * @method \Aws\Result createOrganization(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createOrganizationAsync(array $args = [])
 * @method \Aws\Result createResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createResourceAsync(array $args = [])
 * @method \Aws\Result createUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = [])
 * @method \Aws\Result deleteAccessControlRule(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteAccessControlRuleAsync(array $args = [])
 * @method \Aws\Result deleteAlias(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteAliasAsync(array $args = [])
 * @method \Aws\Result deleteAvailabilityConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteAvailabilityConfigurationAsync(array $args = [])
 * @method \Aws\Result deleteEmailMonitoringConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteEmailMonitoringConfigurationAsync(array $args = [])
 * @method \Aws\Result deleteGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteGroupAsync(array $args = [])
 * @method \Aws\Result deleteImpersonationRole(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteImpersonationRoleAsync(array $args = [])
 * @method \Aws\Result deleteMailboxPermissions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteMailboxPermissionsAsync(array $args = [])
 * @method \Aws\Result deleteMobileDeviceAccessOverride(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteMobileDeviceAccessOverrideAsync(array $args = [])
 * @method \Aws\Result deleteMobileDeviceAccessRule(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteMobileDeviceAccessRuleAsync(array $args = [])
 * @method \Aws\Result deleteOrganization(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteOrganizationAsync(array $args = [])
 * @method \Aws\Result deleteResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteResourceAsync(array $args = [])
 * @method \Aws\Result deleteRetentionPolicy(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteRetentionPolicyAsync(array $args = [])
 * @method \Aws\Result deleteUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteUserAsync(array $args = [])
 * @method \Aws\Result deregisterFromWorkMail(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deregisterFromWorkMailAsync(array $args = [])
 * @method \Aws\Result deregisterMailDomain(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deregisterMailDomainAsync(array $args = [])
 * @method \Aws\Result describeEmailMonitoringConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeEmailMonitoringConfigurationAsync(array $args = [])
 * @method \Aws\Result describeGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeGroupAsync(array $args = [])
 * @method \Aws\Result describeInboundDmarcSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeInboundDmarcSettingsAsync(array $args = [])
 * @method \Aws\Result describeMailboxExportJob(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeMailboxExportJobAsync(array $args = [])
 * @method \Aws\Result describeOrganization(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeOrganizationAsync(array $args = [])
 * @method \Aws\Result describeResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeResourceAsync(array $args = [])
 * @method \Aws\Result describeUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeUserAsync(array $args = [])
 * @method \Aws\Result disassociateDelegateFromResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateDelegateFromResourceAsync(array $args = [])
 * @method \Aws\Result disassociateMemberFromGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateMemberFromGroupAsync(array $args = [])
 * @method \Aws\Result getAccessControlEffect(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getAccessControlEffectAsync(array $args = [])
 * @method \Aws\Result getDefaultRetentionPolicy(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDefaultRetentionPolicyAsync(array $args = [])
 * @method \Aws\Result getImpersonationRole(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getImpersonationRoleAsync(array $args = [])
 * @method \Aws\Result getImpersonationRoleEffect(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getImpersonationRoleEffectAsync(array $args = [])
 * @method \Aws\Result getMailDomain(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getMailDomainAsync(array $args = [])
 * @method \Aws\Result getMailboxDetails(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getMailboxDetailsAsync(array $args = [])
 * @method \Aws\Result getMobileDeviceAccessEffect(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getMobileDeviceAccessEffectAsync(array $args = [])
 * @method \Aws\Result getMobileDeviceAccessOverride(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getMobileDeviceAccessOverrideAsync(array $args = [])
 * @method \Aws\Result listAccessControlRules(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listAccessControlRulesAsync(array $args = [])
 * @method \Aws\Result listAliases(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listAliasesAsync(array $args = [])
 * @method \Aws\Result listAvailabilityConfigurations(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listAvailabilityConfigurationsAsync(array $args = [])
 * @method \Aws\Result listGroupMembers(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listGroupMembersAsync(array $args = [])
 * @method \Aws\Result listGroups(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listGroupsAsync(array $args = [])
 * @method \Aws\Result listImpersonationRoles(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listImpersonationRolesAsync(array $args = [])
 * @method \Aws\Result listMailDomains(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listMailDomainsAsync(array $args = [])
 * @method \Aws\Result listMailboxExportJobs(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listMailboxExportJobsAsync(array $args = [])
 * @method \Aws\Result listMailboxPermissions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listMailboxPermissionsAsync(array $args = [])
 * @method \Aws\Result listMobileDeviceAccessOverrides(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listMobileDeviceAccessOverridesAsync(array $args = [])
 * @method \Aws\Result listMobileDeviceAccessRules(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listMobileDeviceAccessRulesAsync(array $args = [])
 * @method \Aws\Result listOrganizations(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listOrganizationsAsync(array $args = [])
 * @method \Aws\Result listResourceDelegates(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listResourceDelegatesAsync(array $args = [])
 * @method \Aws\Result listResources(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listResourcesAsync(array $args = [])
 * @method \Aws\Result listTagsForResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
 * @method \Aws\Result listUsers(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listUsersAsync(array $args = [])
 * @method \Aws\Result putAccessControlRule(array $args = [])
 * @method \GuzzleHttp\Promise\Promise putAccessControlRuleAsync(array $args = [])
 * @method \Aws\Result putEmailMonitoringConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise putEmailMonitoringConfigurationAsync(array $args = [])
 * @method \Aws\Result putInboundDmarcSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise putInboundDmarcSettingsAsync(array $args = [])
 * @method \Aws\Result putMailboxPermissions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise putMailboxPermissionsAsync(array $args = [])
 * @method \Aws\Result putMobileDeviceAccessOverride(array $args = [])
 * @method \GuzzleHttp\Promise\Promise putMobileDeviceAccessOverrideAsync(array $args = [])
 * @method \Aws\Result putRetentionPolicy(array $args = [])
 * @method \GuzzleHttp\Promise\Promise putRetentionPolicyAsync(array $args = [])
 * @method \Aws\Result registerMailDomain(array $args = [])
 * @method \GuzzleHttp\Promise\Promise registerMailDomainAsync(array $args = [])
 * @method \Aws\Result registerToWorkMail(array $args = [])
 * @method \GuzzleHttp\Promise\Promise registerToWorkMailAsync(array $args = [])
 * @method \Aws\Result resetPassword(array $args = [])
 * @method \GuzzleHttp\Promise\Promise resetPasswordAsync(array $args = [])
 * @method \Aws\Result startMailboxExportJob(array $args = [])
 * @method \GuzzleHttp\Promise\Promise startMailboxExportJobAsync(array $args = [])
 * @method \Aws\Result tagResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
 * @method \Aws\Result testAvailabilityConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise testAvailabilityConfigurationAsync(array $args = [])
 * @method \Aws\Result untagResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
 * @method \Aws\Result updateAvailabilityConfiguration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateAvailabilityConfigurationAsync(array $args = [])
 * @method \Aws\Result updateDefaultMailDomain(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateDefaultMailDomainAsync(array $args = [])
 * @method \Aws\Result updateImpersonationRole(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateImpersonationRoleAsync(array $args = [])
 * @method \Aws\Result updateMailboxQuota(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateMailboxQuotaAsync(array $args = [])
 * @method \Aws\Result updateMobileDeviceAccessRule(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateMobileDeviceAccessRuleAsync(array $args = [])
 * @method \Aws\Result updatePrimaryEmailAddress(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updatePrimaryEmailAddressAsync(array $args = [])
 * @method \Aws\Result updateResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateResourceAsync(array $args = [])
 */
class WorkMailClient extends AwsClient {}


<?php
namespace Aws\WorkMail\Exception;

use Aws\Exception\AwsException;

/**
 * Represents an error interacting with the **Amazon WorkMail** service.
 */
class WorkMailException extends AwsException {}


<?php
namespace Aws\WorkMailMessageFlow;

use Aws\AwsClient;

/**
 * This client is used to interact with the **Amazon WorkMail Message Flow** service.
 * @method \Aws\Result getRawMessageContent(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getRawMessageContentAsync(array $args = [])
 * @method \Aws\Result putRawMessageContent(array $args = [])
 * @method \GuzzleHttp\Promise\Promise putRawMessageContentAsync(array $args = [])
 */
class WorkMailMessageFlowClient extends AwsClient {}


<?php
namespace Aws\WorkMailMessageFlow\Exception;

use Aws\Exception\AwsException;

/**
 * Represents an error interacting with the **Amazon WorkMail Message Flow** service.
 */
class WorkMailMessageFlowException extends AwsException {}


<?php
namespace Aws\WorkSpaces;

use Aws\AwsClient;

/**
 * Amazon WorkSpaces client.
 *
 * @method \Aws\Result associateConnectionAlias(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateConnectionAliasAsync(array $args = [])
 * @method \Aws\Result associateIpGroups(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateIpGroupsAsync(array $args = [])
 * @method \Aws\Result authorizeIpRules(array $args = [])
 * @method \GuzzleHttp\Promise\Promise authorizeIpRulesAsync(array $args = [])
 * @method \Aws\Result copyWorkspaceImage(array $args = [])
 * @method \GuzzleHttp\Promise\Promise copyWorkspaceImageAsync(array $args = [])
 * @method \Aws\Result createConnectClientAddIn(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createConnectClientAddInAsync(array $args = [])
 * @method \Aws\Result createConnectionAlias(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createConnectionAliasAsync(array $args = [])
 * @method \Aws\Result createIpGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createIpGroupAsync(array $args = [])
 * @method \Aws\Result createStandbyWorkspaces(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createStandbyWorkspacesAsync(array $args = [])
 * @method \Aws\Result createTags(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createTagsAsync(array $args = [])
 * @method \Aws\Result createUpdatedWorkspaceImage(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createUpdatedWorkspaceImageAsync(array $args = [])
 * @method \Aws\Result createWorkspaceBundle(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createWorkspaceBundleAsync(array $args = [])
 * @method \Aws\Result createWorkspaceImage(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createWorkspaceImageAsync(array $args = [])
 * @method \Aws\Result createWorkspaces(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createWorkspacesAsync(array $args = [])
 * @method \Aws\Result deleteClientBranding(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteClientBrandingAsync(array $args = [])
 * @method \Aws\Result deleteConnectClientAddIn(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteConnectClientAddInAsync(array $args = [])
 * @method \Aws\Result deleteConnectionAlias(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteConnectionAliasAsync(array $args = [])
 * @method \Aws\Result deleteIpGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteIpGroupAsync(array $args = [])
 * @method \Aws\Result deleteTags(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteTagsAsync(array $args = [])
 * @method \Aws\Result deleteWorkspaceBundle(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteWorkspaceBundleAsync(array $args = [])
 * @method \Aws\Result deleteWorkspaceImage(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteWorkspaceImageAsync(array $args = [])
 * @method \Aws\Result deregisterWorkspaceDirectory(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deregisterWorkspaceDirectoryAsync(array $args = [])
 * @method \Aws\Result describeAccount(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeAccountAsync(array $args = [])
 * @method \Aws\Result describeAccountModifications(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeAccountModificationsAsync(array $args = [])
 * @method \Aws\Result describeClientBranding(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeClientBrandingAsync(array $args = [])
 * @method \Aws\Result describeClientProperties(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeClientPropertiesAsync(array $args = [])
 * @method \Aws\Result describeConnectClientAddIns(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeConnectClientAddInsAsync(array $args = [])
 * @method \Aws\Result describeConnectionAliasPermissions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeConnectionAliasPermissionsAsync(array $args = [])
 * @method \Aws\Result describeConnectionAliases(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeConnectionAliasesAsync(array $args = [])
 * @method \Aws\Result describeIpGroups(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeIpGroupsAsync(array $args = [])
 * @method \Aws\Result describeTags(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeTagsAsync(array $args = [])
 * @method \Aws\Result describeWorkspaceBundles(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeWorkspaceBundlesAsync(array $args = [])
 * @method \Aws\Result describeWorkspaceDirectories(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeWorkspaceDirectoriesAsync(array $args = [])
 * @method \Aws\Result describeWorkspaceImagePermissions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeWorkspaceImagePermissionsAsync(array $args = [])
 * @method \Aws\Result describeWorkspaceImages(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeWorkspaceImagesAsync(array $args = [])
 * @method \Aws\Result describeWorkspaceSnapshots(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeWorkspaceSnapshotsAsync(array $args = [])
 * @method \Aws\Result describeWorkspaces(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeWorkspacesAsync(array $args = [])
 * @method \Aws\Result describeWorkspacesConnectionStatus(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeWorkspacesConnectionStatusAsync(array $args = [])
 * @method \Aws\Result disassociateConnectionAlias(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateConnectionAliasAsync(array $args = [])
 * @method \Aws\Result disassociateIpGroups(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateIpGroupsAsync(array $args = [])
 * @method \Aws\Result importClientBranding(array $args = [])
 * @method \GuzzleHttp\Promise\Promise importClientBrandingAsync(array $args = [])
 * @method \Aws\Result importWorkspaceImage(array $args = [])
 * @method \GuzzleHttp\Promise\Promise importWorkspaceImageAsync(array $args = [])
 * @method \Aws\Result listAvailableManagementCidrRanges(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listAvailableManagementCidrRangesAsync(array $args = [])
 * @method \Aws\Result migrateWorkspace(array $args = [])
 * @method \GuzzleHttp\Promise\Promise migrateWorkspaceAsync(array $args = [])
 * @method \Aws\Result modifyAccount(array $args = [])
 * @method \GuzzleHttp\Promise\Promise modifyAccountAsync(array $args = [])
 * @method \Aws\Result modifyCertificateBasedAuthProperties(array $args = [])
 * @method \GuzzleHttp\Promise\Promise modifyCertificateBasedAuthPropertiesAsync(array $args = [])
 * @method \Aws\Result modifyClientProperties(array $args = [])
 * @method \GuzzleHttp\Promise\Promise modifyClientPropertiesAsync(array $args = [])
 * @method \Aws\Result modifySamlProperties(array $args = [])
 * @method \GuzzleHttp\Promise\Promise modifySamlPropertiesAsync(array $args = [])
 * @method \Aws\Result modifySelfservicePermissions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise modifySelfservicePermissionsAsync(array $args = [])
 * @method \Aws\Result modifyWorkspaceAccessProperties(array $args = [])
 * @method \GuzzleHttp\Promise\Promise modifyWorkspaceAccessPropertiesAsync(array $args = [])
 * @method \Aws\Result modifyWorkspaceCreationProperties(array $args = [])
 * @method \GuzzleHttp\Promise\Promise modifyWorkspaceCreationPropertiesAsync(array $args = [])
 * @method \Aws\Result modifyWorkspaceProperties(array $args = [])
 * @method \GuzzleHttp\Promise\Promise modifyWorkspacePropertiesAsync(array $args = [])
 * @method \Aws\Result modifyWorkspaceState(array $args = [])
 * @method \GuzzleHttp\Promise\Promise modifyWorkspaceStateAsync(array $args = [])
 * @method \Aws\Result rebootWorkspaces(array $args = [])
 * @method \GuzzleHttp\Promise\Promise rebootWorkspacesAsync(array $args = [])
 * @method \Aws\Result rebuildWorkspaces(array $args = [])
 * @method \GuzzleHttp\Promise\Promise rebuildWorkspacesAsync(array $args = [])
 * @method \Aws\Result registerWorkspaceDirectory(array $args = [])
 * @method \GuzzleHttp\Promise\Promise registerWorkspaceDirectoryAsync(array $args = [])
 * @method \Aws\Result restoreWorkspace(array $args = [])
 * @method \GuzzleHttp\Promise\Promise restoreWorkspaceAsync(array $args = [])
 * @method \Aws\Result revokeIpRules(array $args = [])
 * @method \GuzzleHttp\Promise\Promise revokeIpRulesAsync(array $args = [])
 * @method \Aws\Result startWorkspaces(array $args = [])
 * @method \GuzzleHttp\Promise\Promise startWorkspacesAsync(array $args = [])
 * @method \Aws\Result stopWorkspaces(array $args = [])
 * @method \GuzzleHttp\Promise\Promise stopWorkspacesAsync(array $args = [])
 * @method \Aws\Result terminateWorkspaces(array $args = [])
 * @method \GuzzleHttp\Promise\Promise terminateWorkspacesAsync(array $args = [])
 * @method \Aws\Result updateConnectClientAddIn(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateConnectClientAddInAsync(array $args = [])
 * @method \Aws\Result updateConnectionAliasPermission(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateConnectionAliasPermissionAsync(array $args = [])
 * @method \Aws\Result updateRulesOfIpGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateRulesOfIpGroupAsync(array $args = [])
 * @method \Aws\Result updateWorkspaceBundle(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateWorkspaceBundleAsync(array $args = [])
 * @method \Aws\Result updateWorkspaceImagePermission(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateWorkspaceImagePermissionAsync(array $args = [])
 */
class WorkSpacesClient extends AwsClient {}


<?php
namespace Aws\WorkSpaces\Exception;

use Aws\Exception\AwsException;

/**
 * Represents an error while interacting with Amazon WorkSpaces.
 */
class WorkSpacesException extends AwsException {}


<?php
namespace Aws\WorkSpacesWeb;

use Aws\AwsClient;

/**
 * This client is used to interact with the **Amazon WorkSpaces Web** service.
 * @method \Aws\Result associateBrowserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateBrowserSettingsAsync(array $args = [])
 * @method \Aws\Result associateIpAccessSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateIpAccessSettingsAsync(array $args = [])
 * @method \Aws\Result associateNetworkSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateNetworkSettingsAsync(array $args = [])
 * @method \Aws\Result associateTrustStore(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateTrustStoreAsync(array $args = [])
 * @method \Aws\Result associateUserAccessLoggingSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateUserAccessLoggingSettingsAsync(array $args = [])
 * @method \Aws\Result associateUserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateUserSettingsAsync(array $args = [])
 * @method \Aws\Result createBrowserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createBrowserSettingsAsync(array $args = [])
 * @method \Aws\Result createIdentityProvider(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createIdentityProviderAsync(array $args = [])
 * @method \Aws\Result createIpAccessSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createIpAccessSettingsAsync(array $args = [])
 * @method \Aws\Result createNetworkSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createNetworkSettingsAsync(array $args = [])
 * @method \Aws\Result createPortal(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createPortalAsync(array $args = [])
 * @method \Aws\Result createTrustStore(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createTrustStoreAsync(array $args = [])
 * @method \Aws\Result createUserAccessLoggingSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createUserAccessLoggingSettingsAsync(array $args = [])
 * @method \Aws\Result createUserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createUserSettingsAsync(array $args = [])
 * @method \Aws\Result deleteBrowserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteBrowserSettingsAsync(array $args = [])
 * @method \Aws\Result deleteIdentityProvider(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteIdentityProviderAsync(array $args = [])
 * @method \Aws\Result deleteIpAccessSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteIpAccessSettingsAsync(array $args = [])
 * @method \Aws\Result deleteNetworkSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteNetworkSettingsAsync(array $args = [])
 * @method \Aws\Result deletePortal(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deletePortalAsync(array $args = [])
 * @method \Aws\Result deleteTrustStore(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteTrustStoreAsync(array $args = [])
 * @method \Aws\Result deleteUserAccessLoggingSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteUserAccessLoggingSettingsAsync(array $args = [])
 * @method \Aws\Result deleteUserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteUserSettingsAsync(array $args = [])
 * @method \Aws\Result disassociateBrowserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateBrowserSettingsAsync(array $args = [])
 * @method \Aws\Result disassociateIpAccessSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateIpAccessSettingsAsync(array $args = [])
 * @method \Aws\Result disassociateNetworkSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateNetworkSettingsAsync(array $args = [])
 * @method \Aws\Result disassociateTrustStore(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateTrustStoreAsync(array $args = [])
 * @method \Aws\Result disassociateUserAccessLoggingSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateUserAccessLoggingSettingsAsync(array $args = [])
 * @method \Aws\Result disassociateUserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateUserSettingsAsync(array $args = [])
 * @method \Aws\Result getBrowserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getBrowserSettingsAsync(array $args = [])
 * @method \Aws\Result getIdentityProvider(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getIdentityProviderAsync(array $args = [])
 * @method \Aws\Result getIpAccessSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getIpAccessSettingsAsync(array $args = [])
 * @method \Aws\Result getNetworkSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getNetworkSettingsAsync(array $args = [])
 * @method \Aws\Result getPortal(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getPortalAsync(array $args = [])
 * @method \Aws\Result getPortalServiceProviderMetadata(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getPortalServiceProviderMetadataAsync(array $args = [])
 * @method \Aws\Result getTrustStore(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getTrustStoreAsync(array $args = [])
 * @method \Aws\Result getTrustStoreCertificate(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getTrustStoreCertificateAsync(array $args = [])
 * @method \Aws\Result getUserAccessLoggingSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getUserAccessLoggingSettingsAsync(array $args = [])
 * @method \Aws\Result getUserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getUserSettingsAsync(array $args = [])
 * @method \Aws\Result listBrowserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listBrowserSettingsAsync(array $args = [])
 * @method \Aws\Result listIdentityProviders(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listIdentityProvidersAsync(array $args = [])
 * @method \Aws\Result listIpAccessSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listIpAccessSettingsAsync(array $args = [])
 * @method \Aws\Result listNetworkSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listNetworkSettingsAsync(array $args = [])
 * @method \Aws\Result listPortals(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listPortalsAsync(array $args = [])
 * @method \Aws\Result listTagsForResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
 * @method \Aws\Result listTrustStoreCertificates(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listTrustStoreCertificatesAsync(array $args = [])
 * @method \Aws\Result listTrustStores(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listTrustStoresAsync(array $args = [])
 * @method \Aws\Result listUserAccessLoggingSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listUserAccessLoggingSettingsAsync(array $args = [])
 * @method \Aws\Result listUserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listUserSettingsAsync(array $args = [])
 * @method \Aws\Result tagResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
 * @method \Aws\Result untagResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
 * @method \Aws\Result updateBrowserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateBrowserSettingsAsync(array $args = [])
 * @method \Aws\Result updateIdentityProvider(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateIdentityProviderAsync(array $args = [])
 * @method \Aws\Result updateIpAccessSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateIpAccessSettingsAsync(array $args = [])
 * @method \Aws\Result updateNetworkSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateNetworkSettingsAsync(array $args = [])
 * @method \Aws\Result updatePortal(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updatePortalAsync(array $args = [])
 * @method \Aws\Result updateTrustStore(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateTrustStoreAsync(array $args = [])
 * @method \Aws\Result updateUserAccessLoggingSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateUserAccessLoggingSettingsAsync(array $args = [])
 * @method \Aws\Result updateUserSettings(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateUserSettingsAsync(array $args = [])
 */
class WorkSpacesWebClient extends AwsClient {}


<?php
namespace Aws\WorkSpacesWeb\Exception;

use Aws\Exception\AwsException;

/**
 * Represents an error interacting with the **Amazon WorkSpaces Web** service.
 */
class WorkSpacesWebException extends AwsException {}


<?php
namespace Aws\XRay;

use Aws\AwsClient;

/**
 * This client is used to interact with the **AWS X-Ray** service.
 * @method \Aws\Result batchGetTraces(array $args = [])
 * @method \GuzzleHttp\Promise\Promise batchGetTracesAsync(array $args = [])
 * @method \Aws\Result createGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createGroupAsync(array $args = [])
 * @method \Aws\Result createSamplingRule(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createSamplingRuleAsync(array $args = [])
 * @method \Aws\Result deleteGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteGroupAsync(array $args = [])
 * @method \Aws\Result deleteResourcePolicy(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteResourcePolicyAsync(array $args = [])
 * @method \Aws\Result deleteSamplingRule(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteSamplingRuleAsync(array $args = [])
 * @method \Aws\Result getEncryptionConfig(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getEncryptionConfigAsync(array $args = [])
 * @method \Aws\Result getGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getGroupAsync(array $args = [])
 * @method \Aws\Result getGroups(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getGroupsAsync(array $args = [])
 * @method \Aws\Result getInsight(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getInsightAsync(array $args = [])
 * @method \Aws\Result getInsightEvents(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getInsightEventsAsync(array $args = [])
 * @method \Aws\Result getInsightImpactGraph(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getInsightImpactGraphAsync(array $args = [])
 * @method \Aws\Result getInsightSummaries(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getInsightSummariesAsync(array $args = [])
 * @method \Aws\Result getSamplingRules(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getSamplingRulesAsync(array $args = [])
 * @method \Aws\Result getSamplingStatisticSummaries(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getSamplingStatisticSummariesAsync(array $args = [])
 * @method \Aws\Result getSamplingTargets(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getSamplingTargetsAsync(array $args = [])
 * @method \Aws\Result getServiceGraph(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getServiceGraphAsync(array $args = [])
 * @method \Aws\Result getTimeSeriesServiceStatistics(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getTimeSeriesServiceStatisticsAsync(array $args = [])
 * @method \Aws\Result getTraceGraph(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getTraceGraphAsync(array $args = [])
 * @method \Aws\Result getTraceSummaries(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getTraceSummariesAsync(array $args = [])
 * @method \Aws\Result listResourcePolicies(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listResourcePoliciesAsync(array $args = [])
 * @method \Aws\Result listTagsForResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
 * @method \Aws\Result putEncryptionConfig(array $args = [])
 * @method \GuzzleHttp\Promise\Promise putEncryptionConfigAsync(array $args = [])
 * @method \Aws\Result putResourcePolicy(array $args = [])
 * @method \GuzzleHttp\Promise\Promise putResourcePolicyAsync(array $args = [])
 * @method \Aws\Result putTelemetryRecords(array $args = [])
 * @method \GuzzleHttp\Promise\Promise putTelemetryRecordsAsync(array $args = [])
 * @method \Aws\Result putTraceSegments(array $args = [])
 * @method \GuzzleHttp\Promise\Promise putTraceSegmentsAsync(array $args = [])
 * @method \Aws\Result tagResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
 * @method \Aws\Result untagResource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
 * @method \Aws\Result updateGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateGroupAsync(array $args = [])
 * @method \Aws\Result updateSamplingRule(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateSamplingRuleAsync(array $args = [])
 */
class XRayClient extends AwsClient {}


<?php
namespace Aws\XRay\Exception;

use Aws\Exception\AwsException;

/**
 * Represents an error interacting with the **AWS X-Ray** service.
 */
class XRayException extends AwsException {}


<?php

use Aws\Laravel\AwsServiceProvider;

return [

    /*
    |--------------------------------------------------------------------------
    | AWS SDK Configuration
    |--------------------------------------------------------------------------
    |
    | The configuration options set in this file will be passed directly to the
    | `Aws\Sdk` object, from which all client objects are created. This file
    | sets the default minimum configuration used by the service provider even
    | if no configuration is set by the user. The full set of possible options
    | are documented at:
    | http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html
    |
    */
    'region' => env('AWS_REGION', 'us-east-1'),
    'version' => 'latest',
    'ua_append' => [
        'L5MOD/' . AwsServiceProvider::VERSION,
    ],
];


<?php

use Aws\Laravel\AwsServiceProvider;

return [

    /*
    |--------------------------------------------------------------------------
    | AWS SDK Configuration
    |--------------------------------------------------------------------------
    |
    | The configuration options set in this file will be passed directly to the
    | `Aws\Sdk` object, from which all client objects are created. This file
    | is published to the application config directory for modification by the
    | user. The full set of possible options are documented at:
    | http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html
    |
    */
    'credentials' => [
        'key'    => env('AWS_ACCESS_KEY_ID', ''),
        'secret' => env('AWS_SECRET_ACCESS_KEY', ''),
    ],
    'region' => env('AWS_REGION', 'us-east-1'),
    'version' => 'latest',
    'ua_append' => [
        'L5MOD/' . AwsServiceProvider::VERSION,
    ],
];


<?php namespace Aws\Laravel;

use Aws\AwsClientInterface;
use Illuminate\Support\Facades\Facade;

/**
 * Facade for the AWS service
 *
 * @method static AwsClientInterface createClient($name, array $args = []) Get a client from the service builder.
 */
class AwsFacade extends Facade
{

    /**
     * Get the registered name of the component.
     *
     * @return string
     */
    protected static function getFacadeAccessor()
    {
        return 'aws';
    }

}


<?php namespace Aws\Laravel;

use Aws\Sdk;
use Illuminate\Foundation\Application as LaravelApplication;
use Illuminate\Support\ServiceProvider;
use Laravel\Lumen\Application as LumenApplication;

/**
 * AWS SDK for PHP service provider for Laravel applications
 */
class AwsServiceProvider extends ServiceProvider
{
    const VERSION = '3.7.0';

    /**
     * Indicates if loading of the provider is deferred.
     *
     * @var bool
     */
    protected $defer = true;

    /**
     * Bootstrap the configuration
     *
     * @return void
     */
    public function boot()
    {
        if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {
            $this->publishes(
                [__DIR__.'/../config/aws_publish.php' => config_path('aws.php')],
                'aws-config'
            );
        } elseif ($this->app instanceof LumenApplication) {
            $this->app->configure('aws');
        }
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $this->mergeConfigFrom(
            __DIR__.'/../config/aws_default.php',
            'aws'
        );

        $this->app->singleton('aws', function ($app) {
            $config = $app->make('config')->get('aws');

            return new Sdk($config);
        });

        $this->app->alias('aws', 'Aws\Sdk');
    }

    /**
     * Get the services provided by the provider.
     *
     * @return array
     */
    public function provides()
    {
        return ['aws', 'Aws\Sdk'];
    }

}


<?php namespace Aws\Laravel\Test;

use Aws\Laravel\AwsFacade as AWS;
use Aws\Laravel\AwsServiceProvider;
use Illuminate\Container\Container;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

abstract class AwsServiceProviderTest extends TestCase
{

    public function testFacadeCanBeResolvedToServiceInstance()
    {
        $app = $this->setupApplication();
        $this->setupServiceProvider($app);

        // Mount facades
        AWS::setFacadeApplication($app);

        // Get an instance of a client (S3) via the facade.
        $s3 = AWS::createClient('S3');
        $this->assertInstanceOf('Aws\S3\S3Client', $s3);
    }

    public function testRegisterAwsServiceProviderWithPackageConfigAndEnv()
    {
        $app = $this->setupApplication();
        $this->setupServiceProvider($app);

        // Get an instance of a client (S3).
        /** @var $s3 \Aws\S3\S3Client */
        $s3 = $app['aws']->createClient('S3');
        $this->assertInstanceOf('Aws\S3\S3Client', $s3);

        // Verify that the client received the credentials from the package config.
        /** @var \Aws\Credentials\CredentialsInterface $credentials */
        $credentials = $s3->getCredentials()->wait();
        $this->assertEquals('foo', $credentials->getAccessKeyId());
        $this->assertEquals('bar', $credentials->getSecretKey());
        $this->assertEquals('baz', $s3->getRegion());
    }

    public function testServiceNameIsProvided()
    {
        $app = $this->setupApplication();
        $provider = $this->setupServiceProvider($app);
        $this->assertContains('aws', $provider->provides());
    }

    public function testVersionInformationIsProvidedToSdkUserAgent()
    {
        $app = $this->setupApplication();
        $this->setupServiceProvider($app);
        $config = $app['config']->get('aws');

        $this->assertArrayHasKey('ua_append', $config);
        $this->assertIsArray($config['ua_append']);
        $this->assertNotEmpty($config['ua_append']);
        $this->assertNotEmpty(array_filter($config['ua_append'], function ($ua) {
            return false !== strpos($ua, AwsServiceProvider::VERSION);
        }));
    }

    /**
     * @return Container
     */
    abstract protected function setupApplication();

    /**
     * @param Container $app
     *
     * @return AwsServiceProvider
     */
    private function setupServiceProvider(Container $app)
    {
        // Create and register the provider.
        $provider = new AwsServiceProvider($app);
        $app->register($provider);
        $provider->boot();

        return $provider;
    }
}


<?php namespace Aws\Laravel\Test;

use Illuminate\Config\Repository;
use Illuminate\Foundation\Application;

class LaravelAwsServiceProviderTest extends AwsServiceProviderTest
{
    protected function setupApplication()
    {
        if (!class_exists(Application::class)) {
            $this->markTestSkipped();
        }
        // Create the application such that the config is loaded.
        $app = new Application();
        $app->setBasePath(sys_get_temp_dir());
        $app->instance('config', new Repository());

        return $app;
    }
}


<?php
namespace Aws\Laravel\Test;

use Illuminate\Config\Repository;
use Laravel\Lumen\Application;

class LumenAwsServiceProviderTest extends AwsServiceProviderTest
{
    protected function setupApplication()
    {
        if (!class_exists(Application::class)) {
            $this->markTestSkipped();
        }
        // Create the application such that the config is loaded.
        $app = new Application(sys_get_temp_dir());
        $app->instance('config', new Repository());

        return $app;
    }
}


<?php
/**
 * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 *
 * http://aws.amazon.com/apache2.0
 *
 * or in the "license" file accompanying this file. This file is distributed
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

namespace Aws\Silex;

use Aws\Sdk;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
use Silex\Application;

/**
 * AWS SDK for PHP service provider for Silex applications
 */
class AwsServiceProvider implements ServiceProviderInterface
{
    const VERSION = '3.0.0';

    public function register(Container $container)
    {
        $container['aws'] = function (Application $container) {
            $config = isset($container['aws.config']) ? $container['aws.config'] : [];

            return new Sdk($config + ['ua_append' => [
                'Silex/' . Application::VERSION,
                'SXMOD/' . self::VERSION,
            ]]);
        };
    }
}


<?php
/**
 * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 *
 * http://aws.amazon.com/apache2.0
 *
 * or in the "license" file accompanying this file. This file is distributed
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

namespace Aws\Silex;

use Silex\Application;

/**
 * AwsServiceProvider test cases
 */
class AwsServiceProviderTest extends \PHPUnit_Framework_TestCase
{
    public function testRegisterAwsServiceProvider()
    {
        // Setup the Silex app and AWS service provider
        $app = new Application();
        $provider = new AwsServiceProvider();
        $app->register($provider, array(
            'aws.config' => array(
                'version' => '2006-03-01',
                'region' => 'us-east-1',
                'credentials' => [
                    'key' => 'fake-aws-key',
                    'secret' => 'fake-aws-secret',
                ],
            )
        ));

        // Get an instance of a client (S3) to use for testing
        $s3 = $app['aws']->createS3();

        // Verify that the app and clients created by the SDK receive the provided credentials
        $this->assertEquals('2006-03-01', $app['aws.config']['version']);
        $this->assertEquals('us-east-1', $app['aws.config']['region']);
        $this->assertEquals('2006-03-01', $s3->getApi()->getApiVersion());
        $this->assertEquals('us-east-1', $s3->getRegion());
    }

    /**
     * @expectedException \InvalidArgumentException
     */
    public function testNoConfigProvided()
    {
        // Setup the Silex app and AWS service provider
        $app = new Application();
        $provider = new AwsServiceProvider();
        $app->register($provider, array(
            'aws.config' => array(
                'credentials' => [
                    'key' => 'fake-aws-key',
                    'secret' => 'fake-aws-secret',
                ],
            )
        ));

        // Instantiate a client, which should trigger an exception for missing configs
        $s3 = $app['aws']->createS3();
    }
}


<?php

namespace Aws\Symfony;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class AwsBundle extends Bundle
{
    const VERSION = '2.5.0';
}


<?php

namespace Aws\Symfony\DependencyInjection;

use Aws;
use Aws\AwsClient;
use Aws\Symfony\AwsBundle;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\HttpKernel\Kernel;

class AwsExtension extends Extension
{
    public function load(array $configs, ContainerBuilder $container)
    {
        $loader = new YamlFileLoader(
            $container,
            new FileLocator(__DIR__ . '/../Resources/config')
        );
        $loader->load('services.yml');

        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);
        $this->inflateServicesInConfig($config);

        $container
            ->getDefinition('aws_sdk')
            ->replaceArgument(0, $config + ['ua_append' => [
                'Symfony/' . Kernel::VERSION,
                'SYMOD/' . AwsBundle::VERSION,
            ]]);

        foreach (array_column(Aws\manifest(), 'namespace') as $awsService) {
            $serviceName = 'aws.' . strtolower($awsService);
            $serviceDefinition = $this->createServiceDefinition($awsService);
            $container->setDefinition($serviceName, $serviceDefinition);

            $container->setAlias($serviceDefinition->getClass(), $serviceName);
        }
    }

    private function createServiceDefinition($name)
    {
        $clientClass = "Aws\\{$name}\\{$name}Client";
        $serviceDefinition = new Definition(
            class_exists($clientClass) ? $clientClass : AwsClient::class
        );

        $serviceDefinition->setLazy(true);

        // Handle Symfony >= 2.6
        if (method_exists($serviceDefinition, 'setFactory')) {
            return $serviceDefinition->setFactory([
                new Reference('aws_sdk'),
                'createClient',
            ])->setArguments([$name]);
        }

        return $serviceDefinition
                ->setFactoryService('aws_sdk')
                ->setFactoryMethod('createClient')
                ->setArguments([$name]);
    }

    private function inflateServicesInConfig(array &$config)
    {
        array_walk($config, function (&$value) {
            if (is_array($value)) {
                $this->inflateServicesInConfig($value);
            }

            if (is_string($value) && 0 === strpos($value, '@')) {
                // this is either a service reference or a string meant to
                // start with an '@' symbol. In any case, lop off the first '@'
                $value = substr($value, 1);
                if (0 !== strpos($value, '@')) {
                    // this is a service reference, not a string literal
                    $value = new Reference($value);
                }
            }
        });
    }
}


<?php

namespace Aws\Symfony\DependencyInjection;

use Aws;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

class Configuration implements ConfigurationInterface
{
    public function getConfigTreeBuilder()
    {
        // Maintain backwars compatibility, only merge when AWS_MERGE_CONFIG is set
        $mergeConfig = $this->shouldMergeConfig();
        $treeType = 'variable';

        if ($mergeConfig) {
            $treeType = 'array';
        }

        // Most recent versions of TreeBuilder have a constructor
        if (\method_exists(TreeBuilder::class, '__construct')) {
            $treeBuilder = new TreeBuilder('aws', $treeType);
        } else { // which is not the case for older versions
            $treeBuilder = new TreeBuilder;
            $treeBuilder->root('aws', $treeType);
        }

        // If not AWS_MERGE_CONFIG, return empty, variable TreeBuilder
        if (!$mergeConfig) {
            return $treeBuilder;
        }

        if (method_exists($treeBuilder, 'getRootNode')) {
            $rootNode = $treeBuilder->getRootNode();
        } else {
            $rootNode = $treeBuilder->root('aws', $treeType);
        }

        // Define TreeBuilder to allow config validation and merging
        $rootNode
            ->ignoreExtraKeys(false)
            ->children()
                ->variableNode('credentials')->end()
                ->variableNode('debug')->end()
                ->variableNode('stats')->end()
                ->scalarNode('endpoint')->end()
                ->variableNode('endpoint_discovery')->end()
                ->arrayNode('http')
                    ->children()
                        ->floatNode('connect_timeout')->end()
                        ->booleanNode('debug')->end()
                        ->booleanNode('decode_content')->end()
                        ->integerNode('delay')->end()
                        ->variableNode('expect')->end()
                        ->variableNode('proxy')->end()
                        ->scalarNode('sink')->end()
                        ->booleanNode('synchronous')->end()
                        ->booleanNode('stream')->end()
                        ->floatNode('timeout')->end()
                        ->scalarNode('verify')->end()
                    ->end()
                ->end()
                ->scalarNode('profile')->end()
                ->scalarNode('region')->end()
                ->integerNode('retries')->end()
                ->scalarNode('scheme')->end()
                ->scalarNode('service')->end()
                ->scalarNode('signature_version')->end()
                ->variableNode('ua_append')->end()
                ->variableNode('validate')->end()
                ->scalarNode('version')->end()
            ->end()
        ;

        //Setup config trees for each of the services
        foreach (array_column(Aws\manifest(), 'namespace') as $awsService) {
            $rootNode
                ->children()
                    ->arrayNode($awsService)
                        ->ignoreExtraKeys(false)
                        ->children()
                            ->variableNode('credentials')->end()
                            ->variableNode('debug')->end()
                            ->variableNode('stats')->end()
                            ->scalarNode('endpoint')->end()
                            ->variableNode('endpoint_discovery')->end()
                            ->arrayNode('http')
                                ->children()
                                    ->floatNode('connect_timeout')->end()
                                    ->booleanNode('debug')->end()
                                    ->booleanNode('decode_content')->end()
                                    ->integerNode('delay')->end()
                                    ->variableNode('expect')->end()
                                    ->variableNode('proxy')->end()
                                    ->scalarNode('sink')->end()
                                    ->booleanNode('synchronous')->end()
                                    ->booleanNode('stream')->end()
                                    ->floatNode('timeout')->end()
                                    ->scalarNode('verify')->end()
                                ->end()
                            ->end()
                            ->scalarNode('profile')->end()
                            ->scalarNode('region')->end()
                            ->integerNode('retries')->end()
                            ->scalarNode('scheme')->end()
                            ->scalarNode('service')->end()
                            ->scalarNode('signature_version')->end()
                            ->variableNode('ua_append')->end()
                            ->variableNode('validate')->end()
                            ->scalarNode('version')->end()
                        ->end()
                    ->end()
                ->end()
            ;
        }

        return $treeBuilder;
    }

    protected function shouldMergeConfig()
    {
        # works with symfony/dotenv
        if (isset($_ENV['AWS_MERGE_CONFIG'])) {
            return $_ENV['AWS_MERGE_CONFIG'];
        }

        # works with case-insensitive names on windows and doesn't work with symfony/dotenv
        $mergeConfig = getenv('AWS_MERGE_CONFIG');

        if ($mergeConfig) {
            @trigger_error(
                'Since aws/aws-sdk-php-symfony 2.5.0: Support for case-insensitive'
                . ' AWS_MERGE_CONFIG is deprecated and will be removed in 3.0.0',
                \E_USER_DEPRECATED
            );
        }

        return $mergeConfig;
    }
}


<?php

namespace Aws\Symfony\DependencyInjection;

use AppKernel;
use Aws\AwsClient;
use Aws\CodeDeploy\CodeDeployClient;
use Aws\Lambda\LambdaClient;
use Aws\S3\S3Client;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Reference;

class AwsExtensionTest extends TestCase
{
    /**
     * @var AppKernel
     */
    protected $kernel;

    /**
     * @var ContainerInterface
     */
    protected $container;

    public function setUp()
    {
        $this->kernel = new AppKernel('test', true);
        $this->kernel->boot();

        $this->container = $this->kernel->getContainer();
    }

    /**
     * @test
     */
    public function sdk_config_should_be_passed_directly_to_the_constructor_and_resolved_by_the_sdk()
    {
        $config           = $this->kernel->getTestConfig()['aws'];
        $s3Region         = isset($config['S3']['region']) ? $config['S3']['region'] : $config['region'];
        $lambdaRegion     = isset($config['Lambda']['region']) ? $config['Lambda']['region'] : $config['region'];
        $codeDeployRegion = isset($config['CodeDeploy']['region']) ? $config['CodeDeploy']['region'] : $config['region'];

        $testService = $this->container->get('test_service');

        $this->assertSame($s3Region, $testService->getS3Client()->getRegion());
        $this->assertSame($lambdaRegion, $testService->getLambdaClient()->getRegion());
        $this->assertSame($codeDeployRegion, $testService->getCodeDeployClient()->getRegion());
    }

    /**
     * @test
     *
     */
    public function all_web_services_in_sdk_manifest_should_be_accessible_as_container_services() {
        $testService = $this->container->get('test_service');

        $this->assertInstanceOf(S3Client::class, $testService->getS3Client());
        $this->assertInstanceOf(LambdaClient::class, $testService->getLambdaClient());
        $this->assertInstanceOf(CodeDeployClient::class, $testService->getCodeDeployClient());

        foreach ($testService->getClients() as $client) {
            $this->assertInstanceOf(AwsClient::class, $client);
        }
    }

    /**
     * @test
     */
    public function extension_should_escape_strings_that_begin_with_at_sign()
    {
        $extension = new AwsExtension;
        $config = ['credentials' => [
            'key' => '@@key',
            'secret' => '@@secret'
        ]];
        $container = $this->getMockBuilder(ContainerBuilder::class)
            ->setMethods(['getDefinition', 'replaceArgument'])
            ->getMock();
        $container->expects($this->once())
            ->method('getDefinition')
            ->with('aws_sdk')
            ->willReturnSelf();
        $container->expects($this->once())
            ->method('replaceArgument')
            ->with(0, $this->callback(function ($arg) {
                return is_array($arg)
                    && isset($arg['credentials'])
                    && $arg['credentials'] === [
                        'key' => '@key',
                        'secret' => '@secret'
                    ];
            }));

        $extension->load([$config], $container);
    }

    /**
     * @test
     */
    public function extension_should_expand_service_references()
    {
        $extension = new AwsExtension;
        $config = ['credentials' => '@aws_sdk'];
        $container = $this->getMockBuilder(ContainerBuilder::class)
            ->setMethods(['getDefinition', 'replaceArgument'])
            ->getMock();
        $container->expects($this->once())
            ->method('getDefinition')
            ->with('aws_sdk')
            ->willReturnSelf();
        $container->expects($this->once())
            ->method('replaceArgument')
            ->with(0, $this->callback(function ($arg) {
                return is_array($arg)
                    && isset($arg['credentials'])
                    && $arg['credentials'] instanceof Reference
                    && (string) $arg['credentials'] === 'aws_sdk';
            }));

        $extension->load([$config], $container);
    }

    /**
     * @test
     */
    public function extension_should_validate_and_merge_configs()
    {
        putenv('AWS_MERGE_CONFIG=true');
        $extension = new AwsExtension;
        $config = [
            'credentials' => false,
            'debug' => [
                'http' => true
            ],
            'stats' => [
                'http' => true
            ],
            'retries' => 5,
            'endpoint' => 'http://localhost:8000',
            'endpoint_discovery' => [
                'enabled' => true,
                'cache_limit' => 1000
            ],
            'http' => [
                'connect_timeout' => 5.5,
                'debug' => true,
                'decode_content' => true,
                'delay' => 1,
                'expect' => true,
                'proxy' => 'http://localhost:9000',
                'sink' => '/path/to/sink',
                'synchronous' => true,
                'stream' => true,
                'timeout' => 3.14,
                'verify' => '/path/to/ca_cert_bundle'
            ],
            'profile' => 'prod',
            'region' => 'us-west-2',
            'retries' => 5,
            'scheme' => 'http',
            'signature_version' => 'v4',
            'ua_append' => [
                'prod',
                'foo'
            ],
            'validate' => [
                'required' => true
            ],
            'version' => 'latest',
            'S3' => [
                'version' => '2006-03-01',
            ]
        ];
        $configDev = [
            'credentials' => '@aws_sdk',
            'debug' => true,
            'stats' => true,
            'ua_append' => 'dev',
            'validate' => true,
        ];
        $container = $this->getMockBuilder(ContainerBuilder::class)
            ->setMethods(['getDefinition', 'replaceArgument'])
            ->getMock();
        $container->expects($this->once())
            ->method('getDefinition')
            ->with('aws_sdk')
            ->willReturnSelf();
        $container->expects($this->once())
            ->method('replaceArgument')
            ->with(0, $this->callback(function ($arg) {
                return is_array($arg)
                    && isset($arg['credentials'])
                    && $arg['credentials'] instanceof Reference
                    && (string) $arg['credentials'] === 'aws_sdk'
                    && isset($arg['debug'])
                    && (bool) $arg['debug'] === true
                    && isset($arg['stats'])
                    && (bool) $arg['stats'] === true
                    && isset($arg['retries'])
                    && (integer) $arg['retries'] === 5
                    && isset($arg['endpoint'])
                    && (string) $arg['endpoint'] === 'http://localhost:8000'
                    && isset($arg['validate'])
                    && (bool) $arg['validate'] === true
                    && isset($arg['endpoint_discovery']['enabled'])
                    && isset($arg['endpoint_discovery']['cache_limit'])
                    && (bool) $arg['endpoint_discovery']['enabled'] === true
                    && (integer) $arg['endpoint_discovery']['cache_limit'] === 1000
                    && isset($arg['S3']['version'])
                    && (string) $arg['S3']['version'] === '2006-03-01'
                ;
            }));

        $extension->load([$config, $configDev], $container);
    }

    /**
     * @test
     */
    public function extension_should_error_merging_unknown_config_options()
    {
        putenv('AWS_MERGE_CONFIG=true');
        $extension = new AwsExtension;
        $config = [
            'foo' => 'bar'
        ];
        $configDev = [
            'foo' => 'baz'
        ];
        $container = $this->getMockBuilder(ContainerBuilder::class)
            ->setMethods(['getDefinition', 'replaceArgument'])
            ->getMock();

        try {
            $extension->load([$config, $configDev], $container);
            $this->fail('Should have thrown an Error or RuntimeException');
        } catch (\Exception $e) {
            $this->assertTrue($e instanceof \RuntimeException);
        } catch (\Throwable $e) {
            $this->assertTrue($e instanceof \Error);
        }
    }
}


<?php
namespace Aws\Symfony\DependencyInjection;

use AppKernel;
use Aws\DynamoDb\DynamoDbClient;
use Aws\Lambda\LambdaClient;
use Aws\S3\S3Client;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Filesystem\Filesystem;

class ConfigurationTest extends TestCase
{
    public function setUp()
    {
        (new Filesystem)
            ->remove(implode(DIRECTORY_SEPARATOR, [
                dirname(__DIR__),
                'fixtures',
                'cache',
                'test',
            ]));
    }

    /**
     * @test
     * @dataProvider formatProvider
     *
     * @param string $format
     */
    public function container_should_compile_and_load($format)
    {
        $kernel = new AppKernel('test', true, $format);
        $kernel->boot();

        $testService = $kernel->getContainer()->get('test_service');

        $this->assertInstanceOf(S3Client::class, $testService->getS3Client());
        $this->assertInstanceOf(LambdaClient::class, $testService->getLambdaClient());
        $this->assertNotInstanceOf(DynamoDbClient::class, $testService->getCodeDeployClient());
    }

    public function formatProvider()
    {
        return [
            ['yml'],
            ['php'],
            ['xml'],
        ];
    }
}


<?php

use Aws\Symfony\AwsBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Yaml\Yaml;

class AppKernel extends Kernel
{
    private $extension;

    public function __construct($env, $debug, $extension = 'yml')
    {
        $this->extension = $extension;
        parent::__construct($env, $debug);
    }

    public function registerBundles()
    {
        return [
            new FrameworkBundle(),
            new AwsBundle(),
        ];
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load($this->getTestConfigFile($this->extension));
    }

    public function getTestConfig()
    {
        return Yaml::parse(file_get_contents($this->getTestConfigFile('yml')));
    }

    private function getTestConfigFile($extension)
    {
        return __DIR__ . '/config.' . $extension;
    }
}


<?php

use Aws\DynamoDb\DynamoDbClient;
use Symfony\Component\DependencyInjection\Reference;

$container->loadFromExtension('framework', [
    'secret' =>  'Rosebud was the name of his sled.',
]);

$container->loadFromExtension('aws', [
    'version' => 'latest',
    'region' => 'us-east-1',
    'credentials' => [
        'key' => 'not-a-real-key',
        'secret' => '@@not-a-real-secret', // this will be escaped as '@not-a-real-secret'
    ],
    'DynamoDb' =>[
        'region' => 'us-west-2',
    ],
    'S3' => [
        'version' => '2006-03-01',
    ],
    'Lambda' => [
        'region' => 'us-central-1'
    ],
    'CodeDeploy' => [
        'region' => 'us-west-2'
    ],
    'Sqs' =>[
        'credentials' => new Reference('a_service'), // '@a_service' would also work in a PHP config
    ],
    'CloudSearchDomain' => [
        'endpoint' => 'https://search-with-some-subdomain.us-east-1.cloudsearch.amazonaws.com',
    ],
]);

$container
    ->register('a_service', 'Aws\\Credentials\\Credentials')
    ->addArgument('a-different-fake-key')
    ->addArgument('a-different-fake-secret');

$container
    ->register('test_service', 'Aws\\Symfony\\fixtures\\TestService')
    ->setPublic(true)
    ->addArgument(new Reference('aws.s3'))
    ->addArgument(new Reference('aws.lambda'))
    ->addArgument(new Reference('aws.codedeploy'));

$container
    ->register(DynamoDbClient::class, DynamoDbClient::class)
    ->addArgument([
        'region' => 'eu-central-1',
        'version' => '2012-08-10',
    ]);


<?php

namespace Aws\Symfony\fixtures;

use Aws\CodeDeploy\CodeDeployClient;
use Aws\Lambda\LambdaClient;
use Aws\S3\S3Client;

class TestService
{
    /** @var S3Client */
    protected $s3Client;

    /** @var LambdaClient */
    protected $lambdaClient;

    /** @var CodeDeployClient */
    protected $codeDeployClient;

    /**
     * @param S3Client $s3Client
     * @param LambdaClient $lambdaClient
     * @param CodeDeployClient $codeDeployClient
     */
    public function __construct(
        S3Client $s3Client,
        LambdaClient $lambdaClient,
        CodeDeployClient $codeDeployClient
    ) {
        $this->s3Client         = $s3Client;
        $this->lambdaClient     = $lambdaClient;
        $this->codeDeployClient = $codeDeployClient;
    }

    /**
     * @return S3Client
     */
    public function getS3Client()
    {
        return $this->s3Client;
    }

    /**
     * @return LambdaClient
     */
    public function getLambdaClient()
    {
        return $this->lambdaClient;
    }

    /**
     * @return CodeDeployClient
     */
    public function getCodeDeployClient()
    {
        return $this->codeDeployClient;
    }

    /**
     * @return array
     */
    public function getClients()
    {
        return [
            $this->s3Client,
            $this->lambdaClient,
            $this->codeDeployClient
        ];
    }
}


<?php
/**
 * This file is responsible for adding @method annotations to each client class.
 */
require __DIR__ . '/../vendor/autoload.php';

use Aws\SimpleDb\SimpleDbClient;
use Aws\ImportExport\ImportExportClient;

foreach ([SimpleDbClient::class, ImportExportClient::class] as $classToUpdate) {
    // Update the @method annotations on a client.
    $annotator = new ClientAnnotator($classToUpdate);

    if (!$annotator->updateApiMethodAnnotations()) {
        trigger_error(
            "Unable to update annotations on $classToUpdate",
            E_USER_WARNING
        );
    }
}


<?php

/**
 * Adds and removes annotations to a class.
 *
 * @internal
 */
class ClassAnnotationUpdater
{
    use PhpFileLinterTrait;

    /** @var ReflectionClass */
    private $reflection;
    /** @var string[] */
    private $linesToAppend;
    /** @var string */
    private $defaultDocBlock;
    /** @var string */
    private $removeMatching;

    public function __construct(
        ReflectionClass $reflection,
        array $linesToAppend,
        $defaultDocBlock,
        $removeMatching = ''
    ) {
        $this->reflection = $reflection;
        $this->linesToAppend = $linesToAppend;
        $this->defaultDocBlock = $defaultDocBlock;
        $this->removeMatching = $removeMatching;
    }

    /**
     * Performs update on class file and lints the output. If the output fails
     * linting, the change is reverted.
     *
     * @return bool TRUE on success, FALSE on failure
     */
    public function update()
    {
        // copy the code into memory
        $backup = file($this->reflection->getFileName());

        list($preamble, $class) = $this->splitClassFile($backup);
        $preamble = $this->stripOutExistingDocBlock($preamble);
        $preamble .= $this->buildUpdatedDocBlock();

        if ($this->writeClassFile(implode(PHP_EOL, [$preamble, $class]))
            && $this->commandLineLint($this->reflection->getFileName())
        ) {
            return true;
        }

        $this->writeClassFile(implode('', $backup));
        return false;
    }

    private function splitClassFile(array $lines)
    {
        $classLineOffset = $this->reflection->getStartLine() - 1;
        return [
            implode('', array_slice($lines, 0, $classLineOffset)),
            implode('', array_slice($lines, $classLineOffset)),
        ];
    }

    private function stripOutExistingDocBlock($preamble)
    {
        if ($this->reflection->getDocComment()) {
            return str_replace(
                $this->reflection->getDocComment() . PHP_EOL,
                '',
                $preamble
            );
        }

        return $preamble;
    }

    private function buildUpdatedDocBlock()
    {
        $docBlockLines = explode(
            PHP_EOL,
            $this->reflection->getDocComment() ?: $this->defaultDocBlock
        );

        // remove lines matching exclusion patterns
        if ($this->removeMatching) {
            $docBlockLines = array_filter($docBlockLines, function ($line) {
                return !preg_match($this->removeMatching, trim($line));
            });
        }

        // hold on to the closing line
        $lastLine = array_pop($docBlockLines);

        // add a padding line if needed
        if (' *' !== end($docBlockLines)) {
            $docLines []= ' *';
        }

        // append API @method annotations
        $docBlockLines = array_merge($docBlockLines, $this->linesToAppend);

        // add back the closing line
        $docBlockLines []= $lastLine;

        // send everything back as a string
        return implode(PHP_EOL, $docBlockLines);
    }

    private function writeClassFile($contents)
    {
        return (bool) file_put_contents(
            $this->reflection->getFileName(),
            $contents,
            LOCK_EX
        );
    }
}


<?php

use Aws\Api\BridgeApiProvider;

class ClientAnnotator
{
    /** @var ReflectionClass */
    private $reflection;
    /** @var string */
    private $endpoint;
    /** @var string[] */
    private $versions;
    /** @var array */
    private $methods;

    public function __construct($clientClassName)
    {
        $this->reflection = new ReflectionClass($clientClassName);
    }

    /**
     * Adds @method annotations to a client class.
     *
     * @return bool TRUE on success, FALSE on failure
     */
    public function updateApiMethodAnnotations()
    {
        $updater = new ClassAnnotationUpdater(
            $this->reflection,
            $this->getMethodAnnotations(),
            $this->getDefaultDocComment(),
            '/^\* @method (\\\\Aws\\\\Result|\\\\GuzzleHttp\\\\Promise\\\\Promise) /'
        );

        return $updater->update();
    }

    private function getMethodAnnotations()
    {
        $annotations = [];

        foreach ($this->getMethods() as $command => $apiVersions) {
            $commandMethods = [
                $command => '\\Aws\\Result',
                "{$command}Async" => '\\GuzzleHttp\\Promise\\Promise',
            ];
            foreach ($commandMethods as $method => $returnType) {
                $annotations []= $this->getAnnotationLine(
                    $method,
                    $returnType,
                    $apiVersions
                );
            }
        }

        return $annotations;
    }

    private function getAnnotationLine($method, $return, array $versionsWithSupport)
    {
        $signature = lcfirst($method) . '(array $args = [])';
        $annotation = " * @method $return $signature";

        if ($versionsWithSupport !== $this->getVersions()) {
            $supportedIn = implode(', ', $versionsWithSupport);
            $annotation .= " (supported in versions $supportedIn)";
        }

        return $annotation;
    }

    private function getMethods()
    {
        if (empty($this->methods)) {
            $this->methods = [];

            foreach ($this->getVersions() as $version) {
                $methodsInVersion = array_keys(
                    $this->getApiDefinition($version)['operations']
                );
                foreach ($methodsInVersion as $method) {
                    if (empty($this->methods[$method])) {
                        $this->methods[$method] = [];
                    }

                    $this->methods[$method] []= $version;
                }
            }
        }

        return $this->methods;
    }

    private function getVersions()
    {
        if (empty($this->versions)) {
            $this->versions = BridgeApiProvider::defaultProvider()
                ->getVersions($this->getEndpoint());

            // ensure that versions are always iterated from oldest to newest
            sort($this->versions);
        }

        return $this->versions;
    }

    private function getApiDefinition($version = 'latest')
    {
        $provider = BridgeApiProvider::defaultProvider();
        return $provider('api', $this->getEndpoint(), $version);
    }

    private function getEndpoint()
    {
        if (empty($this->endpoint)) {
            $service = strtolower(
                preg_replace('/Client$/', '', $this->reflection->getShortName())
            );

            $this->endpoint = [
                'simpledb' => 'sdb',
                'importexport' => 'importexport'
            ][$service];
        }

        return $this->endpoint;
    }

    private function getDefaultDocComment()
    {
        return <<<EODC
/**
 * **{$this->getApiDefinition()['metadata']['serviceFullName']}** client.
 */
EODC;
    }
}


<?php

$lock = json_decode(file_get_contents(__DIR__ . '/../composer.lock'), true);
$sdkVersion = null;

foreach ($lock['packages'] as $installedPackage) {
    if ('aws/aws-sdk-php' === $installedPackage['name']) {
        $sdkVersion = $installedPackage['version'];
        break;
    }
}

if (isset($sdkVersion)) {
    exec("git clone --branch=$sdkVersion --depth=1 git@github.com:aws/aws-sdk-php.git");
} else {
    exit(255);
}


<?php
require __DIR__ . '/../vendor/autoload.php';

/**
 * Finds all JSON files in src/data, converts them to PHP files that return
 * arrays, and writes those files to $originalFileName.json.php.
 */
$dataFilesIterator = \Aws\recursive_dir_iterator(realpath(__DIR__ . '/../src/data'));

foreach (new RegexIterator($dataFilesIterator, '/\.json$/') as $dataFile) {
    (new JsonCompiler($dataFile))
        ->compile("$dataFile.php");
}