Record Class S3Config
java.lang.Object
java.lang.Record
br.com.xadm.comum.armazenamento.S3Config
- Record Components:
endpoint- URL do endpoint S3.region- região S3 (deve bater com o servidor; defaultgarage).accessKey- access key.secretKey- secret key.bucket- bucket dedicado deste app.criarBucket- setrue, cria o bucket no startup quando ausente.
@ConfigurationProperties("s3")
public record S3Config(String endpoint, String region, String accessKey, String secretKey, String bucket, boolean criarBucket)
extends Record
Configuração do object storage S3-compatível (Garage) — prefixo
s3.*.
Binding relaxado: s3.access-key → accessKey(),
s3.criar-bucket → criarBucket().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessKeyrecord component.bucket()Returns the value of thebucketrecord component.booleanReturns the value of thecriarBucketrecord component.endpoint()Returns the value of theendpointrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.region()Returns the value of theregionrecord component.Returns the value of thesecretKeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
S3Config
public S3Config(String endpoint, @Bindable(defaultValue="garage") String region, String accessKey, String secretKey, String bucket, @Bindable(defaultValue="false") boolean criarBucket) Creates an instance of aS3Configrecord class.- Parameters:
endpoint- the value for theendpointrecord componentregion- the value for theregionrecord componentaccessKey- the value for theaccessKeyrecord componentsecretKey- the value for thesecretKeyrecord componentbucket- the value for thebucketrecord componentcriarBucket- the value for thecriarBucketrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
endpoint
-
region
-
accessKey
-
secretKey
-
bucket
-
criarBucket
@Bindable(defaultValue="false") public boolean criarBucket()Returns the value of thecriarBucketrecord component.- Returns:
- the value of the
criarBucketrecord component
-