File tree Expand file tree Collapse file tree 1 file changed +54
-3
lines changed
src/main/java/software/amazon/encryption/s3 Expand file tree Collapse file tree 1 file changed +54
-3
lines changed Original file line number Diff line number Diff line change 66
77public class S3EncryptionClientException extends SdkClientException {
88
9+ private S3EncryptionClientException (Builder b ) {
10+ super (b );
11+ }
12+
913 public S3EncryptionClientException (String message ) {
10- super (SdkClientException .builder ()
14+ super (S3EncryptionClientException .builder ()
1115 .message (message ));
1216 }
1317
1418 public S3EncryptionClientException (String message , Throwable cause ) {
15- super (SdkClientException .builder ()
19+ super (S3EncryptionClientException .builder ()
1620 .message (message )
1721 .cause (cause ));
1822 }
19- }
23+
24+ @ Override
25+ public Builder toBuilder () {
26+ return new BuilderImpl (this );
27+ }
28+
29+ public static Builder builder () {
30+ return new BuilderImpl ();
31+ }
32+
33+ public interface Builder extends SdkClientException .Builder {
34+ @ Override
35+ Builder message (String message );
36+
37+ @ Override
38+ Builder cause (Throwable cause );
39+
40+ @ Override
41+ S3EncryptionClientException build ();
42+ }
43+
44+ protected static final class BuilderImpl extends SdkClientException .BuilderImpl implements Builder {
45+
46+ protected BuilderImpl () {
47+ }
48+
49+ protected BuilderImpl (S3EncryptionClientException ex ) {
50+ super (ex );
51+ }
52+
53+ @ Override
54+ public Builder message (String message ) {
55+ this .message = message ;
56+ return this ;
57+ }
58+
59+ @ Override
60+ public Builder cause (Throwable cause ) {
61+ this .cause = cause ;
62+ return this ;
63+ }
64+
65+ @ Override
66+ public S3EncryptionClientException build () {
67+ return new S3EncryptionClientException (this );
68+ }
69+ }
70+ }
You can’t perform that action at this time.
0 commit comments