@Override public SdkHttpFullRequest marshall(DeleteCloudFrontOriginAccessIdentityRequest deleteCloudFrontOriginAccessIdentityRequest) { Validate.paramNotNull(deleteCloudFrontOriginAccessIdentityRequest, "deleteCloudFrontOriginAccessIdentityRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(deleteCloudFrontOriginAccessIdentityRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
public AwsXmlProtocolFactory build() { return new AwsXmlProtocolFactory(this); } }
/** * Invokes the IdempotentOperation operation. * * @param idempotentOperationRequest * @return Result of the IdempotentOperation operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws ProtocolRestXmlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample ProtocolRestXmlClient.IdempotentOperation */ @Override public IdempotentOperationResponse idempotentOperation(IdempotentOperationRequest idempotentOperationRequest) throws AwsServiceException, SdkClientException, ProtocolRestXmlException { HttpResponseHandler<IdempotentOperationResponse> responseHandler = protocolFactory.createResponseHandler( IdempotentOperationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<IdempotentOperationRequest, IdempotentOperationResponse>() .withOperationName("IdempotentOperation").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(idempotentOperationRequest) .withMarshaller(new IdempotentOperationRequestMarshaller(protocolFactory))); }
private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("ExplicitPayloadAndHeadersException") .exceptionBuilderSupplier(ExplicitPayloadAndHeadersException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ImplicitPayloadException") .exceptionBuilderSupplier(ImplicitPayloadException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EmptyModeledException") .exceptionBuilderSupplier(EmptyModeledException::builder).build()) .clientConfiguration(clientConfiguration).defaultServiceExceptionSupplier(ProtocolRestXmlException::builder) .build(); }
/** * Creates an instance of {@link XmlProtocolMarshaller} to be used for marshalling the requess. * * @param operationInfo Info required to marshall the request */ public ProtocolMarshaller<SdkHttpFullRequest> createProtocolMarshaller(OperationInfo operationInfo) { return XmlProtocolMarshaller.builder() .endpoint(clientConfiguration.option(SdkClientOption.ENDPOINT)) .xmlGenerator(createGenerator(operationInfo)) .operationInfo(operationInfo) .build(); }
/** * Invokes the MembersInHeaders operation. * * @param membersInHeadersRequest * @return Result of the MembersInHeaders operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws ProtocolRestXmlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample ProtocolRestXmlClient.MembersInHeaders */ @Override public MembersInHeadersResponse membersInHeaders(MembersInHeadersRequest membersInHeadersRequest) throws AwsServiceException, SdkClientException, ProtocolRestXmlException { HttpResponseHandler<MembersInHeadersResponse> responseHandler = protocolFactory.createResponseHandler( MembersInHeadersResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<MembersInHeadersRequest, MembersInHeadersResponse>() .withOperationName("MembersInHeaders").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(membersInHeadersRequest) .withMarshaller(new MembersInHeadersRequestMarshaller(protocolFactory))); }
private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("ExplicitPayloadAndHeadersException") .exceptionBuilderSupplier(ExplicitPayloadAndHeadersException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ImplicitPayloadException") .exceptionBuilderSupplier(ImplicitPayloadException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EmptyModeledException") .exceptionBuilderSupplier(EmptyModeledException::builder).build()) .clientConfiguration(clientConfiguration).defaultServiceExceptionSupplier(ProtocolRestXmlException::builder) .build(); } }
/** * Creates an instance of {@link XmlProtocolMarshaller} to be used for marshalling the requess. * * @param operationInfo Info required to marshall the request */ public ProtocolMarshaller<SdkHttpFullRequest> createProtocolMarshaller(OperationInfo operationInfo) { return XmlProtocolMarshaller.builder() .endpoint(clientConfiguration.option(SdkClientOption.ENDPOINT)) .xmlGenerator(createGenerator(operationInfo)) .operationInfo(operationInfo) .build(); }
/** * Invokes the MultiLocationOperation operation. * * @param multiLocationOperationRequest * @return Result of the MultiLocationOperation operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws ProtocolRestXmlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample ProtocolRestXmlClient.MultiLocationOperation */ @Override public MultiLocationOperationResponse multiLocationOperation(MultiLocationOperationRequest multiLocationOperationRequest) throws AwsServiceException, SdkClientException, ProtocolRestXmlException { HttpResponseHandler<MultiLocationOperationResponse> responseHandler = protocolFactory.createResponseHandler( MultiLocationOperationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<MultiLocationOperationRequest, MultiLocationOperationResponse>() .withOperationName("MultiLocationOperation").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(multiLocationOperationRequest) .withMarshaller(new MultiLocationOperationRequestMarshaller(protocolFactory))); }
@Override public SdkHttpFullRequest marshall(ListReusableDelegationSetsRequest listReusableDelegationSetsRequest) { Validate.paramNotNull(listReusableDelegationSetsRequest, "listReusableDelegationSetsRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(listReusableDelegationSetsRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
public AwsXmlProtocolFactory build() { return new AwsXmlProtocolFactory(this); } }
/** * Invokes the MembersInQueryParams operation. * * @param membersInQueryParamsRequest * @return Result of the MembersInQueryParams operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws ProtocolRestXmlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample ProtocolRestXmlClient.MembersInQueryParams */ @Override public MembersInQueryParamsResponse membersInQueryParams(MembersInQueryParamsRequest membersInQueryParamsRequest) throws AwsServiceException, SdkClientException, ProtocolRestXmlException { HttpResponseHandler<MembersInQueryParamsResponse> responseHandler = protocolFactory.createResponseHandler( MembersInQueryParamsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<MembersInQueryParamsRequest, MembersInQueryParamsResponse>() .withOperationName("MembersInQueryParams").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(membersInQueryParamsRequest) .withMarshaller(new MembersInQueryParamsRequestMarshaller(protocolFactory))); }
@Override public SdkHttpFullRequest marshall(DeleteBucketInventoryConfigurationRequest deleteBucketInventoryConfigurationRequest) { Validate.paramNotNull(deleteBucketInventoryConfigurationRequest, "deleteBucketInventoryConfigurationRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(deleteBucketInventoryConfigurationRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
/** * Invokes the RestXmlTypes operation. * * @param restXmlTypesRequest * @return Result of the RestXmlTypes operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws ProtocolRestXmlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample ProtocolRestXmlClient.RestXmlTypes */ @Override public RestXmlTypesResponse restXmlTypes(RestXmlTypesRequest restXmlTypesRequest) throws AwsServiceException, SdkClientException, ProtocolRestXmlException { HttpResponseHandler<RestXmlTypesResponse> responseHandler = protocolFactory.createResponseHandler( RestXmlTypesResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<RestXmlTypesRequest, RestXmlTypesResponse>() .withOperationName("RestXmlTypes").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(restXmlTypesRequest) .withMarshaller(new RestXmlTypesRequestMarshaller(protocolFactory))); }
@Override public SdkHttpFullRequest marshall(DeleteObjectTaggingRequest deleteObjectTaggingRequest) { Validate.paramNotNull(deleteObjectTaggingRequest, "deleteObjectTaggingRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(deleteObjectTaggingRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
/** * Invokes the DeleteOperation operation. * * @param deleteOperationRequest * @return Result of the DeleteOperation operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws ProtocolRestXmlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample ProtocolRestXmlClient.DeleteOperation */ @Override public DeleteOperationResponse deleteOperation(DeleteOperationRequest deleteOperationRequest) throws AwsServiceException, SdkClientException, ProtocolRestXmlException { HttpResponseHandler<DeleteOperationResponse> responseHandler = protocolFactory.createResponseHandler( DeleteOperationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<DeleteOperationRequest, DeleteOperationResponse>() .withOperationName("DeleteOperation").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteOperationRequest) .withMarshaller(new DeleteOperationRequestMarshaller(protocolFactory))); }
@Override public SdkHttpFullRequest marshall(ListPublicKeysRequest listPublicKeysRequest) { Validate.paramNotNull(listPublicKeysRequest, "listPublicKeysRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(listPublicKeysRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
/** * Invokes the QueryParamWithoutValue operation. * * @param queryParamWithoutValueRequest * @return Result of the QueryParamWithoutValue operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws ProtocolRestXmlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample ProtocolRestXmlClient.QueryParamWithoutValue */ @Override public QueryParamWithoutValueResponse queryParamWithoutValue(QueryParamWithoutValueRequest queryParamWithoutValueRequest) throws AwsServiceException, SdkClientException, ProtocolRestXmlException { HttpResponseHandler<QueryParamWithoutValueResponse> responseHandler = protocolFactory.createResponseHandler( QueryParamWithoutValueResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<QueryParamWithoutValueRequest, QueryParamWithoutValueResponse>() .withOperationName("QueryParamWithoutValue").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(queryParamWithoutValueRequest) .withMarshaller(new QueryParamWithoutValueRequestMarshaller(protocolFactory))); }
@Override public SdkHttpFullRequest marshall(UploadPartCopyRequest uploadPartCopyRequest) { Validate.paramNotNull(uploadPartCopyRequest, "uploadPartCopyRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(uploadPartCopyRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
/** * Invokes the MapOfStringToListOfStringInQueryParams operation. * * @param mapOfStringToListOfStringInQueryParamsRequest * @return Result of the MapOfStringToListOfStringInQueryParams operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws ProtocolRestXmlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample ProtocolRestXmlClient.MapOfStringToListOfStringInQueryParams */ @Override public MapOfStringToListOfStringInQueryParamsResponse mapOfStringToListOfStringInQueryParams( MapOfStringToListOfStringInQueryParamsRequest mapOfStringToListOfStringInQueryParamsRequest) throws AwsServiceException, SdkClientException, ProtocolRestXmlException { HttpResponseHandler<MapOfStringToListOfStringInQueryParamsResponse> responseHandler = protocolFactory .createResponseHandler(MapOfStringToListOfStringInQueryParamsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler .execute(new ClientExecutionParams<MapOfStringToListOfStringInQueryParamsRequest, MapOfStringToListOfStringInQueryParamsResponse>() .withOperationName("MapOfStringToListOfStringInQueryParams").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(mapOfStringToListOfStringInQueryParamsRequest) .withMarshaller(new MapOfStringToListOfStringInQueryParamsRequestMarshaller(protocolFactory))); }