@Override public SdkHttpFullRequest marshall(GetClassifiersRequest getClassifiersRequest) { Validate.paramNotNull(getClassifiersRequest, "getClassifiersRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(getClassifiersRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
private String standardizeProtocol(String protocol) { Validate.paramNotNull(protocol, "protocol"); String standardizedProtocol = StringUtils.lowerCase(protocol); Validate.isTrue(standardizedProtocol.equals("http") || standardizedProtocol.equals("https"), "Protocol must be 'http' or 'https', but was %s", protocol); return standardizedProtocol; }
private SdkEventLoopGroup eventLoopGroup(DefaultBuilder builder) { Validate.isTrue(builder.eventLoopGroup == null || builder.eventLoopGroupBuilder == null, "The eventLoopGroup and the eventLoopGroupFactory can't both be configured."); return Either.fromNullable(builder.eventLoopGroup, builder.eventLoopGroupBuilder) .map(e -> e.map(this::nonManagedEventLoopGroup, SdkEventLoopGroup.Builder::build)) .orElseGet(SharedSdkEventLoopGroup::get); }
protected StsCredentialsProvider(BaseBuilder<?, ?> builder, String asyncThreadName) { this.stsClient = Validate.notNull(builder.stsClient, "STS client must not be null."); CachedSupplier.Builder<SessionCredentialsHolder> cacheBuilder = CachedSupplier.builder(this::updateSessionCredentials); if (builder.asyncCredentialUpdateEnabled) { cacheBuilder.prefetchStrategy(new NonBlocking(asyncThreadName)); } this.sessionCache = cacheBuilder.build(); }
public void run() throws Exception { Validate.isTrue(Files.isRegularFile(serviceJson), serviceJson + " is not a file."); Path codegenFileLocation = codegenFileLocation(serviceModuleName); copyFile(serviceJson, codegenFileLocation.resolve("service-2.json")); copyFile(paginatorsJson, codegenFileLocation.resolve("paginators-1.json")); copyFile(waitersJson, codegenFileLocation.resolve("waiters-2.json")); }
@Override public SdkHttpFullRequest marshall(GetCrawlerMetricsRequest getCrawlerMetricsRequest) { Validate.paramNotNull(getCrawlerMetricsRequest, "getCrawlerMetricsRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(getCrawlerMetricsRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public SdkHttpFullRequest marshall(CreateAuthorizerRequest createAuthorizerRequest) { Validate.paramNotNull(createAuthorizerRequest, "createAuthorizerRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(createAuthorizerRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public SdkHttpFullRequest marshall(CancelJobRequest cancelJobRequest) { Validate.paramNotNull(cancelJobRequest, "cancelJobRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(cancelJobRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public SdkHttpFullRequest marshall(CreatePolicyRequest createPolicyRequest) { Validate.paramNotNull(createPolicyRequest, "createPolicyRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(createPolicyRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public SdkHttpFullRequest marshall(UpdateJobRequest updateJobRequest) { Validate.paramNotNull(updateJobRequest, "updateJobRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(updateJobRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public SdkHttpFullRequest marshall(UpdateThingRequest updateThingRequest) { Validate.paramNotNull(updateThingRequest, "updateThingRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(updateThingRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public SdkHttpFullRequest marshall(GetPendingJobExecutionsRequest getPendingJobExecutionsRequest) { Validate.paramNotNull(getPendingJobExecutionsRequest, "getPendingJobExecutionsRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(getPendingJobExecutionsRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@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(); } } }
@Override public SdkHttpFullRequest marshall(GetGroupRequest getGroupRequest) { Validate.paramNotNull(getGroupRequest, "getGroupRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(getGroupRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public SdkHttpFullRequest marshall(CreateJobRequest createJobRequest) { Validate.paramNotNull(createJobRequest, "createJobRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(createJobRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public SdkHttpFullRequest marshall(GetDevicesInPlacementRequest getDevicesInPlacementRequest) { Validate.paramNotNull(getDevicesInPlacementRequest, "getDevicesInPlacementRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(getDevicesInPlacementRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public SdkHttpFullRequest marshall(DescribePlacementRequest describePlacementRequest) { Validate.paramNotNull(describePlacementRequest, "describePlacementRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(describePlacementRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public SdkHttpFullRequest marshall(ListDatastoresRequest listDatastoresRequest) { Validate.paramNotNull(listDatastoresRequest, "listDatastoresRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(listDatastoresRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public SdkHttpFullRequest marshall(DecreaseStreamRetentionPeriodRequest decreaseStreamRetentionPeriodRequest) { Validate.paramNotNull(decreaseStreamRetentionPeriodRequest, "decreaseStreamRetentionPeriodRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(decreaseStreamRetentionPeriodRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public SdkHttpFullRequest marshall(CreateThingRequest createThingRequest) { Validate.paramNotNull(createThingRequest, "createThingRequest"); try { ProtocolMarshaller<SdkHttpFullRequest> protocolMarshaller = protocolFactory .createProtocolMarshaller(SDK_OPERATION_BINDING); return protocolMarshaller.marshall(createThingRequest); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }