Skip to content

Commit

Permalink
Update annotations on clients
Browse files Browse the repository at this point in the history
  • Loading branch information
jeskew committed Sep 23, 2015
1 parent 3ecb324 commit ee12b9d
Show file tree
Hide file tree
Showing 52 changed files with 1,461 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ compile-json:
git diff --name-only | grep ^src/data/.*\.json\.php$ || true

annotate-clients: clean
php -dopcache.enable_cli=1 build/annotate-clients.php --tag=latest
php build/annotate-clients.php --tag=latest

annotate-client-locator: clean
php -dopcache.enable_cli=1 build/annotate-client-locator.php
php build/annotate-client-locator.php

build: compile-json annotate-clients annotate-client-locator package

Expand Down
18 changes: 13 additions & 5 deletions build/ClientAnnotator.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function updateApiMethodAnnotations()
$this->reflection,
$this->getMethodAnnotations(),
$this->getDefaultDocComment(),
'/^\* @method \\\\Aws\\\\Result /'
'/^\* @method (\\\\Aws\\\\Result|\\\\GuzzleHttp\\\\Promise\\\\Promise) /'
);

return $updater->update();
Expand All @@ -41,18 +41,26 @@ private function getMethodAnnotations()
$annotations = [];

foreach ($this->getMethods() as $command => $apiVersions) {
foreach ([$command, "{$command}Async"] as $method) {
$annotations []= $this->getAnnotationLine($method, $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, array $versionsWithSupport)
private function getAnnotationLine($method, $return, array $versionsWithSupport)
{
$signature = lcfirst($method) . '(array $args = [])';
$annotation = " * @method \\Aws\\Result $signature";
$annotation = " * @method $return $signature";

if ($versionsWithSupport !== $this->getVersions()) {
$supportedIn = implode(', ', $versionsWithSupport);
Expand Down
48 changes: 48 additions & 0 deletions src/AutoScaling/AutoScalingClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,100 @@
* Auto Scaling client.
*
* @method \Aws\Result attachInstances(array $args = [])
* @method \GuzzleHttp\Promise\Promise attachInstancesAsync(array $args = [])
* @method \Aws\Result attachLoadBalancers(array $args = [])
* @method \GuzzleHttp\Promise\Promise attachLoadBalancersAsync(array $args = [])
* @method \Aws\Result completeLifecycleAction(array $args = [])
* @method \GuzzleHttp\Promise\Promise completeLifecycleActionAsync(array $args = [])
* @method \Aws\Result createAutoScalingGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAutoScalingGroupAsync(array $args = [])
* @method \Aws\Result createLaunchConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise createLaunchConfigurationAsync(array $args = [])
* @method \Aws\Result createOrUpdateTags(array $args = [])
* @method \GuzzleHttp\Promise\Promise createOrUpdateTagsAsync(array $args = [])
* @method \Aws\Result deleteAutoScalingGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAutoScalingGroupAsync(array $args = [])
* @method \Aws\Result deleteLaunchConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteLaunchConfigurationAsync(array $args = [])
* @method \Aws\Result deleteLifecycleHook(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteLifecycleHookAsync(array $args = [])
* @method \Aws\Result deleteNotificationConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteNotificationConfigurationAsync(array $args = [])
* @method \Aws\Result deletePolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePolicyAsync(array $args = [])
* @method \Aws\Result deleteScheduledAction(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteScheduledActionAsync(array $args = [])
* @method \Aws\Result deleteTags(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteTagsAsync(array $args = [])
* @method \Aws\Result describeAccountLimits(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAccountLimitsAsync(array $args = [])
* @method \Aws\Result describeAdjustmentTypes(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAdjustmentTypesAsync(array $args = [])
* @method \Aws\Result describeAutoScalingGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAutoScalingGroupsAsync(array $args = [])
* @method \Aws\Result describeAutoScalingInstances(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAutoScalingInstancesAsync(array $args = [])
* @method \Aws\Result describeAutoScalingNotificationTypes(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAutoScalingNotificationTypesAsync(array $args = [])
* @method \Aws\Result describeLaunchConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeLaunchConfigurationsAsync(array $args = [])
* @method \Aws\Result describeLifecycleHookTypes(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeLifecycleHookTypesAsync(array $args = [])
* @method \Aws\Result describeLifecycleHooks(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeLifecycleHooksAsync(array $args = [])
* @method \Aws\Result describeLoadBalancers(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeLoadBalancersAsync(array $args = [])
* @method \Aws\Result describeMetricCollectionTypes(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeMetricCollectionTypesAsync(array $args = [])
* @method \Aws\Result describeNotificationConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeNotificationConfigurationsAsync(array $args = [])
* @method \Aws\Result describePolicies(array $args = [])
* @method \GuzzleHttp\Promise\Promise describePoliciesAsync(array $args = [])
* @method \Aws\Result describeScalingActivities(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeScalingActivitiesAsync(array $args = [])
* @method \Aws\Result describeScalingProcessTypes(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeScalingProcessTypesAsync(array $args = [])
* @method \Aws\Result describeScheduledActions(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeScheduledActionsAsync(array $args = [])
* @method \Aws\Result describeTags(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeTagsAsync(array $args = [])
* @method \Aws\Result describeTerminationPolicyTypes(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeTerminationPolicyTypesAsync(array $args = [])
* @method \Aws\Result detachInstances(array $args = [])
* @method \GuzzleHttp\Promise\Promise detachInstancesAsync(array $args = [])
* @method \Aws\Result detachLoadBalancers(array $args = [])
* @method \GuzzleHttp\Promise\Promise detachLoadBalancersAsync(array $args = [])
* @method \Aws\Result disableMetricsCollection(array $args = [])
* @method \GuzzleHttp\Promise\Promise disableMetricsCollectionAsync(array $args = [])
* @method \Aws\Result enableMetricsCollection(array $args = [])
* @method \GuzzleHttp\Promise\Promise enableMetricsCollectionAsync(array $args = [])
* @method \Aws\Result enterStandby(array $args = [])
* @method \GuzzleHttp\Promise\Promise enterStandbyAsync(array $args = [])
* @method \Aws\Result executePolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise executePolicyAsync(array $args = [])
* @method \Aws\Result exitStandby(array $args = [])
* @method \GuzzleHttp\Promise\Promise exitStandbyAsync(array $args = [])
* @method \Aws\Result putLifecycleHook(array $args = [])
* @method \GuzzleHttp\Promise\Promise putLifecycleHookAsync(array $args = [])
* @method \Aws\Result putNotificationConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise putNotificationConfigurationAsync(array $args = [])
* @method \Aws\Result putScalingPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise putScalingPolicyAsync(array $args = [])
* @method \Aws\Result putScheduledUpdateGroupAction(array $args = [])
* @method \GuzzleHttp\Promise\Promise putScheduledUpdateGroupActionAsync(array $args = [])
* @method \Aws\Result recordLifecycleActionHeartbeat(array $args = [])
* @method \GuzzleHttp\Promise\Promise recordLifecycleActionHeartbeatAsync(array $args = [])
* @method \Aws\Result resumeProcesses(array $args = [])
* @method \GuzzleHttp\Promise\Promise resumeProcessesAsync(array $args = [])
* @method \Aws\Result setDesiredCapacity(array $args = [])
* @method \GuzzleHttp\Promise\Promise setDesiredCapacityAsync(array $args = [])
* @method \Aws\Result setInstanceHealth(array $args = [])
* @method \GuzzleHttp\Promise\Promise setInstanceHealthAsync(array $args = [])
* @method \Aws\Result suspendProcesses(array $args = [])
* @method \GuzzleHttp\Promise\Promise suspendProcessesAsync(array $args = [])
* @method \Aws\Result terminateInstanceInAutoScalingGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise terminateInstanceInAutoScalingGroupAsync(array $args = [])
* @method \Aws\Result updateAutoScalingGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAutoScalingGroupAsync(array $args = [])
*/
class AutoScalingClient extends AwsClient {}
17 changes: 17 additions & 0 deletions src/CloudFormation/CloudFormationClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,38 @@
* This client is used to interact with the **AWS CloudFormation** service.
*
* @method \Aws\Result cancelUpdateStack(array $args = [])
* @method \GuzzleHttp\Promise\Promise cancelUpdateStackAsync(array $args = [])
* @method \Aws\Result createStack(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStackAsync(array $args = [])
* @method \Aws\Result deleteStack(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteStackAsync(array $args = [])
* @method \Aws\Result describeStackEvents(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeStackEventsAsync(array $args = [])
* @method \Aws\Result describeStackResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeStackResourceAsync(array $args = [])
* @method \Aws\Result describeStackResources(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeStackResourcesAsync(array $args = [])
* @method \Aws\Result describeStacks(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeStacksAsync(array $args = [])
* @method \Aws\Result estimateTemplateCost(array $args = [])
* @method \GuzzleHttp\Promise\Promise estimateTemplateCostAsync(array $args = [])
* @method \Aws\Result getStackPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise getStackPolicyAsync(array $args = [])
* @method \Aws\Result getTemplate(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTemplateAsync(array $args = [])
* @method \Aws\Result getTemplateSummary(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTemplateSummaryAsync(array $args = [])
* @method \Aws\Result listStackResources(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStackResourcesAsync(array $args = [])
* @method \Aws\Result listStacks(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStacksAsync(array $args = [])
* @method \Aws\Result setStackPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise setStackPolicyAsync(array $args = [])
* @method \Aws\Result signalResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise signalResourceAsync(array $args = [])
* @method \Aws\Result updateStack(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateStackAsync(array $args = [])
* @method \Aws\Result validateTemplate(array $args = [])
* @method \GuzzleHttp\Promise\Promise validateTemplateAsync(array $args = [])
*/
class CloudFormationClient extends AwsClient {}
21 changes: 21 additions & 0 deletions src/CloudFront/CloudFrontClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,47 @@
* This client is used to interact with the **Amazon CloudFront** service.
*
* @method \Aws\Result createCloudFrontOriginAccessIdentity(array $args = [])
* @method \GuzzleHttp\Promise\Promise createCloudFrontOriginAccessIdentityAsync(array $args = [])
* @method \Aws\Result createDistribution(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDistributionAsync(array $args = [])
* @method \Aws\Result createInvalidation(array $args = [])
* @method \GuzzleHttp\Promise\Promise createInvalidationAsync(array $args = [])
* @method \Aws\Result createStreamingDistribution(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStreamingDistributionAsync(array $args = [])
* @method \Aws\Result deleteCloudFrontOriginAccessIdentity(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteCloudFrontOriginAccessIdentityAsync(array $args = [])
* @method \Aws\Result deleteDistribution(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDistributionAsync(array $args = [])
* @method \Aws\Result deleteStreamingDistribution(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteStreamingDistributionAsync(array $args = [])
* @method \Aws\Result getCloudFrontOriginAccessIdentity(array $args = [])
* @method \GuzzleHttp\Promise\Promise getCloudFrontOriginAccessIdentityAsync(array $args = [])
* @method \Aws\Result getCloudFrontOriginAccessIdentityConfig(array $args = [])
* @method \GuzzleHttp\Promise\Promise getCloudFrontOriginAccessIdentityConfigAsync(array $args = [])
* @method \Aws\Result getDistribution(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDistributionAsync(array $args = [])
* @method \Aws\Result getDistributionConfig(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDistributionConfigAsync(array $args = [])
* @method \Aws\Result getInvalidation(array $args = [])
* @method \GuzzleHttp\Promise\Promise getInvalidationAsync(array $args = [])
* @method \Aws\Result getStreamingDistribution(array $args = [])
* @method \GuzzleHttp\Promise\Promise getStreamingDistributionAsync(array $args = [])
* @method \Aws\Result getStreamingDistributionConfig(array $args = [])
* @method \GuzzleHttp\Promise\Promise getStreamingDistributionConfigAsync(array $args = [])
* @method \Aws\Result listCloudFrontOriginAccessIdentities(array $args = [])
* @method \GuzzleHttp\Promise\Promise listCloudFrontOriginAccessIdentitiesAsync(array $args = [])
* @method \Aws\Result listDistributions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDistributionsAsync(array $args = [])
* @method \Aws\Result listInvalidations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listInvalidationsAsync(array $args = [])
* @method \Aws\Result listStreamingDistributions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStreamingDistributionsAsync(array $args = [])
* @method \Aws\Result updateCloudFrontOriginAccessIdentity(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateCloudFrontOriginAccessIdentityAsync(array $args = [])
* @method \Aws\Result updateDistribution(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateDistributionAsync(array $args = [])
* @method \Aws\Result updateStreamingDistribution(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateStreamingDistributionAsync(array $args = [])
*/
class CloudFrontClient extends AwsClient
{
Expand Down
17 changes: 17 additions & 0 deletions src/CloudHsm/CloudHsmClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,39 @@
* This client is used to interact with **AWS CloudHSM**.
*
* @method \Aws\Result createHapg(array $args = [])
* @method \GuzzleHttp\Promise\Promise createHapgAsync(array $args = [])
* @method \Aws\Result createHsm(array $args = [])
* @method \GuzzleHttp\Promise\Promise createHsmAsync(array $args = [])
* @method \Aws\Result createLunaClient(array $args = [])
* @method \GuzzleHttp\Promise\Promise createLunaClientAsync(array $args = [])
* @method \Aws\Result deleteHapg(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteHapgAsync(array $args = [])
* @method \Aws\Result deleteHsm(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteHsmAsync(array $args = [])
* @method \Aws\Result deleteLunaClient(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteLunaClientAsync(array $args = [])
* @method \Aws\Result describeHapg(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeHapgAsync(array $args = [])
* @method \Aws\Result describeHsm(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeHsmAsync(array $args = [])
* @method \Aws\Result describeLunaClient(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeLunaClientAsync(array $args = [])
* @method \Aws\Result getConfig(array $args = [])
* @method \GuzzleHttp\Promise\Promise getConfigAsync(array $args = [])
* @method \Aws\Result listAvailableZones(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAvailableZonesAsync(array $args = [])
* @method \Aws\Result listHapgs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listHapgsAsync(array $args = [])
* @method \Aws\Result listHsms(array $args = [])
* @method \GuzzleHttp\Promise\Promise listHsmsAsync(array $args = [])
* @method \Aws\Result listLunaClients(array $args = [])
* @method \GuzzleHttp\Promise\Promise listLunaClientsAsync(array $args = [])
* @method \Aws\Result modifyHapg(array $args = [])
* @method \GuzzleHttp\Promise\Promise modifyHapgAsync(array $args = [])
* @method \Aws\Result modifyHsm(array $args = [])
* @method \GuzzleHttp\Promise\Promise modifyHsmAsync(array $args = [])
* @method \Aws\Result modifyLunaClient(array $args = [])
* @method \GuzzleHttp\Promise\Promise modifyLunaClientAsync(array $args = [])
*/
class CloudHsmClient extends AwsClient
{
Expand Down
Loading

0 comments on commit ee12b9d

Please sign in to comment.