private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("StreamingDistributionAlreadyExists") .exceptionBuilderSupplier(StreamingDistributionAlreadyExistsException::builder) .httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TrustedSignerDoesNotExist") .exceptionBuilderSupplier(TrustedSignerDoesNotExistException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchInvalidation") .exceptionBuilderSupplier(NoSuchInvalidationException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchFieldLevelEncryptionConfig") .exceptionBuilderSupplier(NoSuchFieldLevelEncryptionConfigException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyHeadersInForwardedValues") .exceptionBuilderSupplier(TooManyHeadersInForwardedValuesException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidOriginReadTimeout") .exceptionBuilderSupplier(InvalidOriginReadTimeoutException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidMinimumProtocolVersion") .exceptionBuilderSupplier(InvalidMinimumProtocolVersionException::builder).httpStatusCode(400) .build()) .registerModeledException(
/** * Registers a new modeled exception by the error code. * * @param errorMetadata metadata for unmarshalling the exceptions * @return This builder for method chaining. */ public final SubclassT registerModeledException(ExceptionMetadata errorMetadata) { modeledExceptions.add(errorMetadata); return getSubclass(); }
private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("StreamingDistributionAlreadyExists") .exceptionBuilderSupplier(StreamingDistributionAlreadyExistsException::builder) .httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TrustedSignerDoesNotExist") .exceptionBuilderSupplier(TrustedSignerDoesNotExistException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchInvalidation") .exceptionBuilderSupplier(NoSuchInvalidationException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchFieldLevelEncryptionConfig") .exceptionBuilderSupplier(NoSuchFieldLevelEncryptionConfigException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyHeadersInForwardedValues") .exceptionBuilderSupplier(TooManyHeadersInForwardedValuesException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidOriginReadTimeout") .exceptionBuilderSupplier(InvalidOriginReadTimeoutException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidMinimumProtocolVersion") .exceptionBuilderSupplier(InvalidMinimumProtocolVersionException::builder).httpStatusCode(400) .build()) .registerModeledException(
private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("StreamingDistributionAlreadyExists") .exceptionBuilderSupplier(StreamingDistributionAlreadyExistsException::builder) .httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TrustedSignerDoesNotExist") .exceptionBuilderSupplier(TrustedSignerDoesNotExistException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchInvalidation") .exceptionBuilderSupplier(NoSuchInvalidationException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchFieldLevelEncryptionConfig") .exceptionBuilderSupplier(NoSuchFieldLevelEncryptionConfigException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyHeadersInForwardedValues") .exceptionBuilderSupplier(TooManyHeadersInForwardedValuesException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidOriginReadTimeout") .exceptionBuilderSupplier(InvalidOriginReadTimeoutException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidMinimumProtocolVersion") .exceptionBuilderSupplier(InvalidMinimumProtocolVersionException::builder).httpStatusCode(400) .build()) .registerModeledException(
private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("StreamingDistributionAlreadyExists") .exceptionBuilderSupplier(StreamingDistributionAlreadyExistsException::builder) .httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TrustedSignerDoesNotExist") .exceptionBuilderSupplier(TrustedSignerDoesNotExistException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchInvalidation") .exceptionBuilderSupplier(NoSuchInvalidationException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchFieldLevelEncryptionConfig") .exceptionBuilderSupplier(NoSuchFieldLevelEncryptionConfigException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyHeadersInForwardedValues") .exceptionBuilderSupplier(TooManyHeadersInForwardedValuesException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidOriginReadTimeout") .exceptionBuilderSupplier(InvalidOriginReadTimeoutException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidMinimumProtocolVersion") .exceptionBuilderSupplier(InvalidMinimumProtocolVersionException::builder).httpStatusCode(400) .build()) .registerModeledException(
private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("ConcurrentModification") .exceptionBuilderSupplier(ConcurrentModificationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyTrafficPolicyVersionsForCurrentPolicy") .exceptionBuilderSupplier(TooManyTrafficPolicyVersionsForCurrentPolicyException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("IncompatibleVersion") .exceptionBuilderSupplier(IncompatibleVersionException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("VPCAssociationAuthorizationNotFound") .exceptionBuilderSupplier(VpcAssociationAuthorizationNotFoundException::builder) .httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchTrafficPolicy") .exceptionBuilderSupplier(NoSuchTrafficPolicyException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyTrafficPolicies") .exceptionBuilderSupplier(TooManyTrafficPoliciesException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DelegationSetAlreadyCreated") .exceptionBuilderSupplier(DelegationSetAlreadyCreatedException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchHostedZone") .exceptionBuilderSupplier(NoSuchHostedZoneException::builder).httpStatusCode(404).build()) .registerModeledException(
private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("ConcurrentModification") .exceptionBuilderSupplier(ConcurrentModificationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyTrafficPolicyVersionsForCurrentPolicy") .exceptionBuilderSupplier(TooManyTrafficPolicyVersionsForCurrentPolicyException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("IncompatibleVersion") .exceptionBuilderSupplier(IncompatibleVersionException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("VPCAssociationAuthorizationNotFound") .exceptionBuilderSupplier(VpcAssociationAuthorizationNotFoundException::builder) .httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchTrafficPolicy") .exceptionBuilderSupplier(NoSuchTrafficPolicyException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyTrafficPolicies") .exceptionBuilderSupplier(TooManyTrafficPoliciesException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DelegationSetAlreadyCreated") .exceptionBuilderSupplier(DelegationSetAlreadyCreatedException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchHostedZone") .exceptionBuilderSupplier(NoSuchHostedZoneException::builder).httpStatusCode(404).build()) .registerModeledException(
private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("ConcurrentModification") .exceptionBuilderSupplier(ConcurrentModificationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyTrafficPolicyVersionsForCurrentPolicy") .exceptionBuilderSupplier(TooManyTrafficPolicyVersionsForCurrentPolicyException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("IncompatibleVersion") .exceptionBuilderSupplier(IncompatibleVersionException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("VPCAssociationAuthorizationNotFound") .exceptionBuilderSupplier(VpcAssociationAuthorizationNotFoundException::builder) .httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchTrafficPolicy") .exceptionBuilderSupplier(NoSuchTrafficPolicyException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyTrafficPolicies") .exceptionBuilderSupplier(TooManyTrafficPoliciesException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DelegationSetAlreadyCreated") .exceptionBuilderSupplier(DelegationSetAlreadyCreatedException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchHostedZone") .exceptionBuilderSupplier(NoSuchHostedZoneException::builder).httpStatusCode(404).build()) .registerModeledException(
private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("ConcurrentModification") .exceptionBuilderSupplier(ConcurrentModificationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyTrafficPolicyVersionsForCurrentPolicy") .exceptionBuilderSupplier(TooManyTrafficPolicyVersionsForCurrentPolicyException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("IncompatibleVersion") .exceptionBuilderSupplier(IncompatibleVersionException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("VPCAssociationAuthorizationNotFound") .exceptionBuilderSupplier(VpcAssociationAuthorizationNotFoundException::builder) .httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchTrafficPolicy") .exceptionBuilderSupplier(NoSuchTrafficPolicyException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyTrafficPolicies") .exceptionBuilderSupplier(TooManyTrafficPoliciesException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DelegationSetAlreadyCreated") .exceptionBuilderSupplier(DelegationSetAlreadyCreatedException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchHostedZone") .exceptionBuilderSupplier(NoSuchHostedZoneException::builder).httpStatusCode(404).build()) .registerModeledException(
public static Builder builder() { return new Builder(); }
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(); }
public static Builder builder() { return new Builder(); }
/** * Sets the {@link SdkClientConfiguration} which contains the service endpoint. * * @param clientConfiguration Configuration of the client. * @return This builder for method chaining. */ public SubclassT clientConfiguration(SdkClientConfiguration clientConfiguration) { this.clientConfiguration = clientConfiguration; return getSubclass(); }
/** * Sets the {@link SdkClientConfiguration} which contains the service endpoint. * * @param clientConfiguration Configuration of the client. * @return This builder for method chaining. */ public SubclassT clientConfiguration(SdkClientConfiguration clientConfiguration) { this.clientConfiguration = clientConfiguration; return getSubclass(); }
/** * A supplier for the services base exception builder. This is used when we can't identify any modeled * exception to unmarshall into. * * @param exceptionBuilderSupplier Suppplier of the base service exceptions Builder. * @return This builder for method chaining. */ public SubclassT defaultServiceExceptionSupplier(Supplier<SdkPojo> exceptionBuilderSupplier) { this.defaultServiceExceptionSupplier = exceptionBuilderSupplier; return getSubclass(); }
/** * Registers a new modeled exception by the error code. * * @param errorMetadata metadata for unmarshalling the exceptions * @return This builder for method chaining. */ public final SubclassT registerModeledException(ExceptionMetadata errorMetadata) { modeledExceptions.add(errorMetadata); return getSubclass(); }
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(); } }
/** * A supplier for the services base exception builder. This is used when we can't identify any modeled * exception to unmarshall into. * * @param exceptionBuilderSupplier Suppplier of the base service exceptions Builder. * @return This builder for method chaining. */ public SubclassT defaultServiceExceptionSupplier(Supplier<SdkPojo> exceptionBuilderSupplier) { this.defaultServiceExceptionSupplier = exceptionBuilderSupplier; return getSubclass(); }