@Override
  public java.util.concurrent.Future<UpdatePipelineStatusResult> updatePipelineStatusAsync(
      final UpdatePipelineStatusRequest request,
      final com.amazonaws.handlers.AsyncHandler<
              UpdatePipelineStatusRequest, UpdatePipelineStatusResult>
          asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<UpdatePipelineStatusResult>() {
          @Override
          public UpdatePipelineStatusResult call() throws Exception {
            UpdatePipelineStatusResult result;

            try {
              result = updatePipelineStatus(request);
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }
  @Override
  public java.util.concurrent.Future<ReadPresetResult> readPresetAsync(
      final ReadPresetRequest request,
      final com.amazonaws.handlers.AsyncHandler<ReadPresetRequest, ReadPresetResult> asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<ReadPresetResult>() {
          @Override
          public ReadPresetResult call() throws Exception {
            ReadPresetResult result;

            try {
              result = readPreset(request);
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }
  @Override
  @Deprecated
  public java.util.concurrent.Future<TestRoleResult> testRoleAsync(
      final TestRoleRequest request,
      final com.amazonaws.handlers.AsyncHandler<TestRoleRequest, TestRoleResult> asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<TestRoleResult>() {
          @Override
          public TestRoleResult call() throws Exception {
            TestRoleResult result;

            try {
              result = testRole(request);
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }
  @Override
  public java.util.concurrent.Future<ListJobsByPipelineResult> listJobsByPipelineAsync(
      final ListJobsByPipelineRequest request,
      final com.amazonaws.handlers.AsyncHandler<ListJobsByPipelineRequest, ListJobsByPipelineResult>
          asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<ListJobsByPipelineResult>() {
          @Override
          public ListJobsByPipelineResult call() throws Exception {
            ListJobsByPipelineResult result;

            try {
              result = listJobsByPipeline(request);
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }
 /**
  * Shuts down the client, releasing all managed resources. This includes forcibly terminating all
  * pending asynchronous service calls. Clients who wish to give pending asynchronous service calls
  * time to complete should call {@code getExecutorService().shutdown()} followed by {@code
  * getExecutorService().awaitTermination()} prior to calling this method.
  */
 @Override
 public void shutdown() {
   super.shutdown();
   executorService.shutdownNow();
 }