├── .gitattributes
├── .github
└── workflows
│ ├── codeql-analysis.yml
│ └── gradle.yml
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE
├── MAINTAINERS.md
├── README.md
├── README_zh_CN.md
├── adminapi
└── src
│ ├── main
│ └── java
│ │ └── io
│ │ └── minio
│ │ └── admin
│ │ ├── AddServiceAccountResp.java
│ │ ├── Crypto.java
│ │ ├── GetServiceAccountInfoResp.java
│ │ ├── GroupAddUpdateRemoveInfo.java
│ │ ├── GroupInfo.java
│ │ ├── ListServiceAccountResp.java
│ │ ├── MinioAdminClient.java
│ │ ├── QuotaUnit.java
│ │ ├── Status.java
│ │ ├── UserInfo.java
│ │ └── messages
│ │ ├── AllTierStats.java
│ │ ├── BucketTargetUsageInfo.java
│ │ ├── BucketUsageInfo.java
│ │ ├── DataUsageInfo.java
│ │ ├── TierStats.java
│ │ └── info
│ │ ├── Backend.java
│ │ ├── Buckets.java
│ │ ├── Disk.java
│ │ ├── DiskMetrics.java
│ │ ├── ErasureSetInfo.java
│ │ ├── GCStats.java
│ │ ├── HealingDisk.java
│ │ ├── MemStats.java
│ │ ├── Message.java
│ │ ├── Objects.java
│ │ ├── ServerProperties.java
│ │ ├── TimedAction.java
│ │ ├── Usage.java
│ │ └── Versions.java
│ └── test
│ ├── java
│ └── io
│ │ └── minio
│ │ └── admin
│ │ ├── QuotaUnitTest.java
│ │ └── messages
│ │ └── DataUsageInfoTest.java
│ └── resources
│ └── messages
│ └── datausageinfo.json
├── api
└── src
│ ├── main
│ └── java
│ │ └── io
│ │ └── minio
│ │ ├── AbortMultipartUploadResponse.java
│ │ ├── BaseArgs.java
│ │ ├── BucketArgs.java
│ │ ├── BucketExistsArgs.java
│ │ ├── ByteBufferStream.java
│ │ ├── CloseableIterator.java
│ │ ├── ComposeObjectArgs.java
│ │ ├── ComposeSource.java
│ │ ├── CopyObjectArgs.java
│ │ ├── CopySource.java
│ │ ├── CreateMultipartUploadResponse.java
│ │ ├── DeleteBucketCorsArgs.java
│ │ ├── DeleteBucketEncryptionArgs.java
│ │ ├── DeleteBucketLifecycleArgs.java
│ │ ├── DeleteBucketNotificationArgs.java
│ │ ├── DeleteBucketPolicyArgs.java
│ │ ├── DeleteBucketReplicationArgs.java
│ │ ├── DeleteBucketTagsArgs.java
│ │ ├── DeleteObjectLockConfigurationArgs.java
│ │ ├── DeleteObjectTagsArgs.java
│ │ ├── DeleteObjectsResponse.java
│ │ ├── Digest.java
│ │ ├── Directive.java
│ │ ├── DisableObjectLegalHoldArgs.java
│ │ ├── DownloadObjectArgs.java
│ │ ├── EnableObjectLegalHoldArgs.java
│ │ ├── GenericResponse.java
│ │ ├── GenericUploadResponse.java
│ │ ├── GetBucketCorsArgs.java
│ │ ├── GetBucketEncryptionArgs.java
│ │ ├── GetBucketLifecycleArgs.java
│ │ ├── GetBucketNotificationArgs.java
│ │ ├── GetBucketPolicyArgs.java
│ │ ├── GetBucketReplicationArgs.java
│ │ ├── GetBucketTagsArgs.java
│ │ ├── GetBucketVersioningArgs.java
│ │ ├── GetObjectAclArgs.java
│ │ ├── GetObjectArgs.java
│ │ ├── GetObjectAttributesArgs.java
│ │ ├── GetObjectAttributesResponse.java
│ │ ├── GetObjectLockConfigurationArgs.java
│ │ ├── GetObjectResponse.java
│ │ ├── GetObjectRetentionArgs.java
│ │ ├── GetObjectTagsArgs.java
│ │ ├── GetPresignedObjectUrlArgs.java
│ │ ├── HttpRequestBody.java
│ │ ├── IsObjectLegalHoldEnabledArgs.java
│ │ ├── ListBucketsArgs.java
│ │ ├── ListBucketsResponse.java
│ │ ├── ListMultipartUploadsResponse.java
│ │ ├── ListObjectVersionsResponse.java
│ │ ├── ListObjectsArgs.java
│ │ ├── ListObjectsV1Response.java
│ │ ├── ListObjectsV2Response.java
│ │ ├── ListPartsResponse.java
│ │ ├── ListenBucketNotificationArgs.java
│ │ ├── MakeBucketArgs.java
│ │ ├── MinioAsyncClient.java
│ │ ├── MinioClient.java
│ │ ├── MinioProperties.java
│ │ ├── ObjectArgs.java
│ │ ├── ObjectConditionalReadArgs.java
│ │ ├── ObjectReadArgs.java
│ │ ├── ObjectVersionArgs.java
│ │ ├── ObjectWriteArgs.java
│ │ ├── ObjectWriteResponse.java
│ │ ├── PartReader.java
│ │ ├── PartSource.java
│ │ ├── PostPolicy.java
│ │ ├── PromptObjectArgs.java
│ │ ├── PromptObjectResponse.java
│ │ ├── PutObjectArgs.java
│ │ ├── PutObjectBaseArgs.java
│ │ ├── PutObjectFanOutArgs.java
│ │ ├── PutObjectFanOutEntry.java
│ │ ├── PutObjectFanOutResponse.java
│ │ ├── RemoveBucketArgs.java
│ │ ├── RemoveObjectArgs.java
│ │ ├── RemoveObjectsArgs.java
│ │ ├── RestoreObjectArgs.java
│ │ ├── Result.java
│ │ ├── S3Base.java
│ │ ├── S3Escaper.java
│ │ ├── SelectObjectContentArgs.java
│ │ ├── SelectResponseStream.java
│ │ ├── ServerSideEncryption.java
│ │ ├── ServerSideEncryptionCustomerKey.java
│ │ ├── ServerSideEncryptionKms.java
│ │ ├── ServerSideEncryptionS3.java
│ │ ├── SetBucketCorsArgs.java
│ │ ├── SetBucketEncryptionArgs.java
│ │ ├── SetBucketLifecycleArgs.java
│ │ ├── SetBucketNotificationArgs.java
│ │ ├── SetBucketPolicyArgs.java
│ │ ├── SetBucketReplicationArgs.java
│ │ ├── SetBucketTagsArgs.java
│ │ ├── SetBucketVersioningArgs.java
│ │ ├── SetObjectLockConfigurationArgs.java
│ │ ├── SetObjectRetentionArgs.java
│ │ ├── SetObjectTagsArgs.java
│ │ ├── Signer.java
│ │ ├── SnowballObject.java
│ │ ├── StatObjectArgs.java
│ │ ├── StatObjectResponse.java
│ │ ├── Time.java
│ │ ├── UploadObjectArgs.java
│ │ ├── UploadPartCopyResponse.java
│ │ ├── UploadPartResponse.java
│ │ ├── UploadSnowballObjectsArgs.java
│ │ ├── Utils.java
│ │ ├── Xml.java
│ │ ├── credentials
│ │ ├── AssumeRoleBaseProvider.java
│ │ ├── AssumeRoleProvider.java
│ │ ├── AwsConfigProvider.java
│ │ ├── AwsEnvironmentProvider.java
│ │ ├── CertificateIdentityProvider.java
│ │ ├── ChainedProvider.java
│ │ ├── ClientGrantsProvider.java
│ │ ├── Credentials.java
│ │ ├── EnvironmentProvider.java
│ │ ├── IamAwsProvider.java
│ │ ├── Jwt.java
│ │ ├── LdapIdentityProvider.java
│ │ ├── MinioClientConfigProvider.java
│ │ ├── MinioEnvironmentProvider.java
│ │ ├── Provider.java
│ │ ├── StaticProvider.java
│ │ ├── WebIdentityClientGrantsProvider.java
│ │ └── WebIdentityProvider.java
│ │ ├── errors
│ │ ├── BucketPolicyTooLargeException.java
│ │ ├── ErrorResponseException.java
│ │ ├── InsufficientDataException.java
│ │ ├── InternalException.java
│ │ ├── InvalidResponseException.java
│ │ ├── MinioException.java
│ │ ├── ServerException.java
│ │ └── XmlParserException.java
│ │ ├── http
│ │ ├── HttpUtils.java
│ │ └── Method.java
│ │ ├── messages
│ │ ├── AbortIncompleteMultipartUpload.java
│ │ ├── AccessControlList.java
│ │ ├── AccessControlPolicy.java
│ │ ├── AccessControlTranslation.java
│ │ ├── AndOperator.java
│ │ ├── Bucket.java
│ │ ├── BucketMetadata.java
│ │ ├── CORSConfiguration.java
│ │ ├── CannedAcl.java
│ │ ├── Checksum.java
│ │ ├── CloudFunctionConfiguration.java
│ │ ├── CompleteMultipartUpload.java
│ │ ├── CompleteMultipartUploadOutput.java
│ │ ├── CompleteMultipartUploadResult.java
│ │ ├── CompressionType.java
│ │ ├── Contents.java
│ │ ├── CopyObjectResult.java
│ │ ├── CopyPartResult.java
│ │ ├── CreateBucketConfiguration.java
│ │ ├── CsvInputSerialization.java
│ │ ├── CsvOutputSerialization.java
│ │ ├── DateDays.java
│ │ ├── DeleteError.java
│ │ ├── DeleteMarker.java
│ │ ├── DeleteMarkerReplication.java
│ │ ├── DeleteObject.java
│ │ ├── DeleteReplication.java
│ │ ├── DeleteRequest.java
│ │ ├── DeleteResult.java
│ │ ├── DeletedObject.java
│ │ ├── Encryption.java
│ │ ├── EncryptionConfiguration.java
│ │ ├── ErrorResponse.java
│ │ ├── Event.java
│ │ ├── EventMetadata.java
│ │ ├── EventType.java
│ │ ├── ExistingObjectReplication.java
│ │ ├── Expiration.java
│ │ ├── FileHeaderInfo.java
│ │ ├── Filter.java
│ │ ├── FilterRule.java
│ │ ├── GetObjectAttributesOutput.java
│ │ ├── GlacierJobParameters.java
│ │ ├── Grant.java
│ │ ├── Grantee.java
│ │ ├── GranteeType.java
│ │ ├── Identity.java
│ │ ├── InitiateMultipartUploadResult.java
│ │ ├── Initiator.java
│ │ ├── InputSerialization.java
│ │ ├── Item.java
│ │ ├── JsonInputSerialization.java
│ │ ├── JsonOutputSerialization.java
│ │ ├── JsonType.java
│ │ ├── LegalHold.java
│ │ ├── LifecycleConfiguration.java
│ │ ├── LifecycleRule.java
│ │ ├── ListAllMyBucketsResult.java
│ │ ├── ListBucketResultV1.java
│ │ ├── ListBucketResultV2.java
│ │ ├── ListMultipartUploadsResult.java
│ │ ├── ListObjectsResult.java
│ │ ├── ListPartsResult.java
│ │ ├── ListVersionsResult.java
│ │ ├── LocationConstraint.java
│ │ ├── Metadata.java
│ │ ├── Metrics.java
│ │ ├── NoncurrentVersionExpiration.java
│ │ ├── NoncurrentVersionTransition.java
│ │ ├── NotificationCommonConfiguration.java
│ │ ├── NotificationConfiguration.java
│ │ ├── NotificationRecords.java
│ │ ├── ObjectLockConfiguration.java
│ │ ├── ObjectMetadata.java
│ │ ├── OutputLocation.java
│ │ ├── OutputSerialization.java
│ │ ├── Owner.java
│ │ ├── ParquetInputSerialization.java
│ │ ├── Part.java
│ │ ├── Permission.java
│ │ ├── Prefix.java
│ │ ├── PrefixConverter.java
│ │ ├── Progress.java
│ │ ├── QueueConfiguration.java
│ │ ├── QuoteFields.java
│ │ ├── ReplicaModifications.java
│ │ ├── ReplicationConfiguration.java
│ │ ├── ReplicationDestination.java
│ │ ├── ReplicationRule.java
│ │ ├── ReplicationTime.java
│ │ ├── ReplicationTimeValue.java
│ │ ├── RequestProgress.java
│ │ ├── ResponseDate.java
│ │ ├── RestoreRequest.java
│ │ ├── Retention.java
│ │ ├── RetentionDuration.java
│ │ ├── RetentionDurationDays.java
│ │ ├── RetentionDurationUnit.java
│ │ ├── RetentionDurationYears.java
│ │ ├── RetentionMode.java
│ │ ├── Rule.java
│ │ ├── RuleFilter.java
│ │ ├── S3OutputLocation.java
│ │ ├── ScanRange.java
│ │ ├── SelectObjectContentRequest.java
│ │ ├── SelectObjectContentRequestBase.java
│ │ ├── SelectParameters.java
│ │ ├── Source.java
│ │ ├── SourceSelectionCriteria.java
│ │ ├── SseAlgorithm.java
│ │ ├── SseConfiguration.java
│ │ ├── SseConfigurationRule.java
│ │ ├── SseKmsEncryptedObjects.java
│ │ ├── Stats.java
│ │ ├── Status.java
│ │ ├── Tag.java
│ │ ├── Tags.java
│ │ ├── Tier.java
│ │ ├── TopicConfiguration.java
│ │ ├── Transition.java
│ │ ├── Upload.java
│ │ ├── UserMetadata.java
│ │ ├── Version.java
│ │ └── VersioningConfiguration.java
│ │ └── org
│ │ └── apache
│ │ └── commons
│ │ └── validator
│ │ └── routines
│ │ ├── InetAddressValidator.java
│ │ └── RegexValidator.java
│ └── test
│ └── java
│ └── io
│ └── minio
│ ├── MakeBucketArgsTest.java
│ ├── MinioClientTest.java
│ └── StatObjectArgsTest.java
├── build.gradle
├── docs
├── API.md
└── zh_CN
│ ├── API.md
│ └── CONTRIBUTING.md
├── examples
├── BucketExists.java
├── ComposeObject.java
├── CopyObject.java
├── DeleteBucketCors.java
├── DeleteBucketEncryption.java
├── DeleteBucketLifecycle.java
├── DeleteBucketNotification.java
├── DeleteBucketPolicy.java
├── DeleteBucketReplication.java
├── DeleteBucketTags.java
├── DeleteObjectLockConfiguration.java
├── DeleteObjectTags.java
├── DisableObjectLegalHold.java
├── DownloadObject.java
├── EnableObjectLegalHold.java
├── GetBucketCors.java
├── GetBucketEncryption.java
├── GetBucketLifecycle.java
├── GetBucketNotification.java
├── GetBucketPolicy.java
├── GetBucketReplication.java
├── GetBucketTags.java
├── GetBucketVersioning.java
├── GetObject.java
├── GetObjectAcl.java
├── GetObjectAttributes.java
├── GetObjectLockConfiguration.java
├── GetObjectProgressBar.java
├── GetObjectResume.java
├── GetObjectRetention.java
├── GetObjectTags.java
├── GetPartialObject.java
├── GetPresignedObjectUrl.java
├── GetPresignedPostFormData.java
├── IsObjectLegalHoldEnabled.java
├── ListBuckets.java
├── ListObjects.java
├── ListenBucketNotification.java
├── MakeBucket.java
├── MinioClientWithAssumeRoleProvider.java
├── MinioClientWithAwsConfigProvider.java
├── MinioClientWithCertificateIdentityProvider.java
├── MinioClientWithChainedProvider.java
├── MinioClientWithClientGrantsProvider.java
├── MinioClientWithIamAwsProvider.java
├── MinioClientWithLdapIdentityProvider.java
├── MinioClientWithMinioClientConfigProvider.java
├── MinioClientWithWebIdentityProvider.java
├── PresignedGetObject.java
├── PresignedPutObject.java
├── ProgressStream.java
├── PutObject.java
├── PutObjectFanOut.java
├── PutObjectProgressBar.java
├── PutObjectUiProgressBar.java
├── RemoveBucket.java
├── RemoveObject.java
├── RemoveObjects.java
├── RestoreObject.java
├── SelectObjectContent.java
├── SetBucketCors.java
├── SetBucketEncryption.java
├── SetBucketLifecycle.java
├── SetBucketNotification.java
├── SetBucketPolicy.java
├── SetBucketReplication.java
├── SetBucketTags.java
├── SetBucketVersioning.java
├── SetObjectLockConfiguration.java
├── SetObjectRetention.java
├── SetObjectTags.java
├── StatObject.java
├── UploadObject.java
└── UploadSnowballObjects.java
├── functional
├── .cfg
│ └── certs
│ │ ├── private.key
│ │ └── public.crt
├── ContentInputStream.java
├── FunctionalTest.java
├── MintLogger.java
├── PutObjectRunnable.java
├── TestMinioAdminClient.java
├── TestUserAgent.java
├── play.min.io.kes.root.cert
└── play.min.io.kes.root.key
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── spotbugs-filter.xml
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text eol=lf
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | *.class
3 |
4 | # Mobile Tools for Java (J2ME)
5 | .mtj.tmp/
6 |
7 | # Package Files #
8 | *.jar
9 | *.war
10 | *.ear
11 |
12 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
13 | hs_err_pid*
14 |
15 | # gradle working files
16 | .gradle/
17 | build/
18 |
19 | # sbt files
20 | lib/
21 | project/
22 | target/
23 |
24 | # IntelliJ IDEA
25 | .idea/
26 |
27 | .metadata/
28 | .project
29 | .settings/
30 | api/.classpath
31 | api/.gitignore
32 | api/.project
33 | api/.settings/
34 | examples/.classpath
35 | examples/.project
36 | examples/.settings/
37 | examples/bin/
38 | functional/.classpath
39 | functional/.project
40 | functional/.settings/
41 | functional/bin/
42 | functional/.d*/
43 | minio
44 | !minio/
45 | minio.exe
46 | minio.*log
47 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributors Guide
2 | `minio-java` welcomes your contribution. Below steps can be followed to create a pull request.
3 |
4 | * Fork this minio-java repository into your account.
5 | * Create a feature branch in your fork (`$ git checkout -b my-new-feature`).
6 | * Hack, hack, hack...
7 | * Do test build (`$ ./gradlew build`).
8 | * Do functional test (`$ ./gradlew runFunctionalTest`).
9 | * Commit your changes (`$ git commit -am 'Add some feature'`).
10 | * Push the feature branch into your fork (`$ git push origin -u my-new-feature`).
11 | * Create new pull request to `master` branch.
12 |
--------------------------------------------------------------------------------
/adminapi/src/main/java/io/minio/admin/AddServiceAccountResp.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2021 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.admin;
19 |
20 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21 | import com.fasterxml.jackson.annotation.JsonProperty;
22 | import io.minio.credentials.Credentials;
23 |
24 | /**
25 | * add service account response.
26 | *
27 | *
* @see user-commands.go
29 | */
30 | @JsonIgnoreProperties(ignoreUnknown = true)
31 | public class AddServiceAccountResp {
32 | @JsonProperty("credentials")
33 | private Credentials credentials;
34 |
35 | public Credentials credentials() {
36 | return credentials;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/adminapi/src/main/java/io/minio/admin/GroupInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2022 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.admin;
19 |
20 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21 | import com.fasterxml.jackson.annotation.JsonProperty;
22 | import java.util.Collections;
23 | import java.util.LinkedList;
24 | import java.util.List;
25 |
26 | /** Represents group information. */
27 | @JsonIgnoreProperties(ignoreUnknown = true)
28 | public class GroupInfo {
29 | @JsonProperty("name")
30 | private String name;
31 |
32 | @JsonProperty("status")
33 | private Status status;
34 |
35 | @JsonProperty("members")
36 | private List members;
37 |
38 | @JsonProperty("policy")
39 | private String policy;
40 |
41 | public String name() {
42 | return name;
43 | }
44 |
45 | public Status status() {
46 | return status;
47 | }
48 |
49 | public List members() {
50 | return Collections.unmodifiableList(members == null ? new LinkedList<>() : members);
51 | }
52 |
53 | public String policy() {
54 | return policy;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/adminapi/src/main/java/io/minio/admin/QuotaUnit.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2021 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.admin;
19 |
20 | /** Bucket Quota QuotaUnit. */
21 | public enum QuotaUnit {
22 | KB(1024),
23 | MB(1024 * KB.unit),
24 | GB(1024 * MB.unit),
25 | TB(1024 * GB.unit);
26 |
27 | private final long unit;
28 |
29 | QuotaUnit(long unit) {
30 | this.unit = unit;
31 | }
32 |
33 | public long toBytes(long size) {
34 | long totalSize = size * this.unit;
35 | if (totalSize < 0) {
36 | throw new IllegalArgumentException(
37 | "Quota size must be greater than zero.But actual is " + totalSize);
38 | }
39 | if (totalSize / this.unit != size) {
40 | throw new IllegalArgumentException("Quota size overflow");
41 | }
42 | return totalSize;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/adminapi/src/main/java/io/minio/admin/Status.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2022 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.admin;
19 |
20 | import com.fasterxml.jackson.annotation.JsonCreator;
21 | import com.fasterxml.jackson.annotation.JsonValue;
22 |
23 | public enum Status {
24 | ENABLED("enabled"),
25 | DISABLED("disabled");
26 |
27 | private final String value;
28 |
29 | Status(String value) {
30 | this.value = value;
31 | }
32 |
33 | @JsonValue
34 | public String toString() {
35 | return this.value;
36 | }
37 |
38 | @JsonCreator
39 | public static Status fromString(String statusString) {
40 | if ("enabled".equals(statusString)) {
41 | return ENABLED;
42 | }
43 |
44 | if ("disabled".equals(statusString)) {
45 | return DISABLED;
46 | }
47 |
48 | if (statusString.isEmpty()) {
49 | return null;
50 | }
51 |
52 | throw new IllegalArgumentException("Unknown status " + statusString);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/adminapi/src/main/java/io/minio/admin/messages/AllTierStats.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2022 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.admin.messages;
19 |
20 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21 | import com.fasterxml.jackson.annotation.JsonProperty;
22 | import java.util.Collections;
23 | import java.util.Map;
24 |
25 | /**
26 | * Collection of per-tier stats across all configured remote tiers
27 | *
28 | * @see data-usage-cache.go
30 | */
31 | @JsonIgnoreProperties(ignoreUnknown = true)
32 | public class AllTierStats {
33 | @JsonProperty("Tiers")
34 | private Map tiers;
35 |
36 | public Map tiers() {
37 | return Collections.unmodifiableMap(this.tiers);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/adminapi/src/main/java/io/minio/admin/messages/TierStats.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2022 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.admin.messages;
19 |
20 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21 | import com.fasterxml.jackson.annotation.JsonProperty;
22 |
23 | /**
24 | * Per-tier stats of a remote tier.
25 | *
26 | * @see data-usage-cache.go
28 | */
29 | @JsonIgnoreProperties(ignoreUnknown = true)
30 | public class TierStats {
31 | @JsonProperty("TotalSize")
32 | private long totalSize;
33 |
34 | @JsonProperty("NumVersions")
35 | private int numVersions;
36 |
37 | @JsonProperty("NumObjects")
38 | private int numObjects;
39 |
40 | public long totalSize() {
41 | return totalSize;
42 | }
43 |
44 | public int numVersions() {
45 | return numVersions;
46 | }
47 |
48 | public int numObjects() {
49 | return numObjects;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/adminapi/src/main/java/io/minio/admin/messages/info/Buckets.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2022 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.admin.messages.info;
19 |
20 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21 | import com.fasterxml.jackson.annotation.JsonProperty;
22 |
23 | /**
24 | * Buckets contains the number of buckets
25 | *
26 | * @see info-commands.go
28 | */
29 | @JsonIgnoreProperties(ignoreUnknown = true)
30 | public class Buckets {
31 | @JsonProperty("count")
32 | private Integer count;
33 |
34 | @JsonProperty("error")
35 | private String error;
36 |
37 | public Integer count() {
38 | return count;
39 | }
40 |
41 | public String error() {
42 | return error;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/adminapi/src/main/java/io/minio/admin/messages/info/Objects.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2022 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.admin.messages.info;
19 |
20 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21 | import com.fasterxml.jackson.annotation.JsonProperty;
22 |
23 | /**
24 | * Objects contains the number of objects
25 | *
26 | * @see info-commands.go
28 | */
29 | @JsonIgnoreProperties(ignoreUnknown = true)
30 | public class Objects {
31 | @JsonProperty("count")
32 | private Integer count;
33 |
34 | @JsonProperty("error")
35 | private String error;
36 |
37 | public Integer count() {
38 | return count;
39 | }
40 |
41 | public String error() {
42 | return error;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/adminapi/src/main/java/io/minio/admin/messages/info/TimedAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2022 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.admin.messages.info;
19 |
20 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21 | import com.fasterxml.jackson.annotation.JsonProperty;
22 | import java.math.BigDecimal;
23 |
24 | /**
25 | * TimedAction contains a number of actions and their accumulated duration in nanoseconds.
26 | *
27 | * @see metrics.go
28 | */
29 | @JsonIgnoreProperties(ignoreUnknown = true)
30 | public class TimedAction {
31 | @JsonProperty("count")
32 | private BigDecimal count;
33 |
34 | @JsonProperty("acc_time_ns")
35 | private BigDecimal accTime;
36 |
37 | @JsonProperty("bytes")
38 | private BigDecimal bytes;
39 |
40 | public BigDecimal count() {
41 | return count;
42 | }
43 |
44 | public BigDecimal accTime() {
45 | return accTime;
46 | }
47 |
48 | public BigDecimal bytes() {
49 | return bytes;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/adminapi/src/main/java/io/minio/admin/messages/info/Usage.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2022 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.admin.messages.info;
19 |
20 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21 | import com.fasterxml.jackson.annotation.JsonProperty;
22 |
23 | /**
24 | * Usage contains the total size used
25 | *
26 | * @see info-commands.go
28 | */
29 | @JsonIgnoreProperties(ignoreUnknown = true)
30 | public class Usage {
31 | @JsonProperty("size")
32 | private Long size;
33 |
34 | @JsonProperty("error")
35 | private String error;
36 |
37 | public Long size() {
38 | return size;
39 | }
40 |
41 | public String error() {
42 | return error;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/adminapi/src/main/java/io/minio/admin/messages/info/Versions.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2022 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.admin.messages.info;
19 |
20 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21 | import com.fasterxml.jackson.annotation.JsonProperty;
22 |
23 | /**
24 | * Versions contains the number of versions
25 | *
26 | * @see info-commands.go
28 | */
29 | @JsonIgnoreProperties(ignoreUnknown = true)
30 | public class Versions {
31 | @JsonProperty("count")
32 | private Integer count;
33 |
34 | @JsonProperty("error")
35 | private String error;
36 |
37 | public Integer count() {
38 | return count;
39 | }
40 |
41 | public String error() {
42 | return error;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/adminapi/src/test/java/io/minio/admin/QuotaUnitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2021 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.admin;
19 |
20 | import org.junit.Test;
21 |
22 | public class QuotaUnitTest {
23 | @Test(expected = IllegalArgumentException.class)
24 | public void testBytesOverflow() {
25 | QuotaUnit.GB.toBytes(Long.MAX_VALUE);
26 | }
27 |
28 | @Test(expected = IllegalArgumentException.class)
29 | public void testBytesLessThanZero() {
30 | QuotaUnit.KB.toBytes(-1);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/adminapi/src/test/resources/messages/datausageinfo.json:
--------------------------------------------------------------------------------
1 | {
2 | "bucketsCount": 1,
3 | "bucketsSizes": {
4 | "tier-bucket": 7155
5 | },
6 | "bucketsUsageInfo": {
7 | "tier-bucket": {
8 | "objectReplicaTotalSize": 0,
9 | "objectsCount": 1,
10 | "objectsFailedReplicationCount": 0,
11 | "objectsFailedReplicationTotalSize": 0,
12 | "objectsPendingReplicationCount": 0,
13 | "objectsPendingReplicationTotalSize": 0,
14 | "objectsReplicatedTotalSize": 0,
15 | "objectsReplicationInfo": {},
16 | "objectsSizesHistogram": {
17 | "BETWEEN_1024_B_AND_1_MB": 1,
18 | "BETWEEN_10_MB_AND_64_MB": 0,
19 | "BETWEEN_128_MB_AND_512_MB": 0,
20 | "BETWEEN_1_MB_AND_10_MB": 0,
21 | "BETWEEN_64_MB_AND_128_MB": 0,
22 | "GREATER_THAN_512_MB": 0,
23 | "LESS_THAN_1024_B": 0
24 | },
25 | "size": 7155,
26 | "versionsCount": 1
27 | }
28 | },
29 | "lastUpdate": "2022-11-08T16:15:56.277821865+01:00",
30 | "objectsCount": 57,
31 | "objectsReplicationInfo": null,
32 | "objectsTotalSize": 4296263795,
33 | "tierStats": {
34 | "Tiers": {
35 | "STANDARD": {
36 | "NumObjects": 2,
37 | "NumVersions": 2,
38 | "TotalSize": 14310
39 | }
40 | }
41 | },
42 | "versionsCount": 1
43 | }
44 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/AbortMultipartUploadResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import okhttp3.Headers;
20 |
21 | /** Response class of {@link S3Base#abortMultipartUploadAsync}. */
22 | public class AbortMultipartUploadResponse extends GenericResponse {
23 | private String uploadId;
24 |
25 | public AbortMultipartUploadResponse(
26 | Headers headers, String bucket, String region, String object, String uploadId) {
27 | super(headers, bucket, region, object);
28 | this.uploadId = uploadId;
29 | }
30 |
31 | public String uploadId() {
32 | return uploadId;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/BucketExistsArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /** Argument class of {@link MinioAsyncClient#bucketExists} and {@link MinioClient#bucketExists}. */
20 | public class BucketExistsArgs extends BucketArgs {
21 | public static Builder builder() {
22 | return new Builder();
23 | }
24 |
25 | /** Argument builder of {@link BucketExistsArgs}. */
26 | public static final class Builder extends BucketArgs.Builder {}
27 | }
28 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/ByteBufferStream.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2021 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio;
19 |
20 | import java.io.ByteArrayInputStream;
21 | import java.io.ByteArrayOutputStream;
22 | import java.io.InputStream;
23 |
24 | /** ByteArrayOutputStream exposes underneath buffer as input stream. */
25 | class ByteBufferStream extends ByteArrayOutputStream {
26 | public ByteBufferStream() {
27 | super();
28 | }
29 |
30 | public InputStream inputStream() {
31 | return new ByteArrayInputStream(this.buf, 0, this.count);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/CloseableIterator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2020 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio;
19 |
20 | import java.io.Closeable;
21 | import java.util.Iterator;
22 |
23 | /** Unification of Iterator and Closeable. */
24 | public interface CloseableIterator extends Iterator, Closeable {}
25 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/CopySource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /** A source object defintion for {@link CopyObjectArgs}. */
20 | public class CopySource extends ObjectConditionalReadArgs {
21 | protected CopySource() {}
22 |
23 | public CopySource(ObjectConditionalReadArgs args) {
24 | this.extraHeaders = args.extraHeaders;
25 | this.extraQueryParams = args.extraQueryParams;
26 | this.bucketName = args.bucketName;
27 | this.region = args.region;
28 | this.objectName = args.objectName;
29 | this.versionId = args.versionId;
30 | this.ssec = args.ssec;
31 | this.offset = args.offset;
32 | this.length = args.length;
33 | this.matchETag = args.matchETag;
34 | this.notMatchETag = args.notMatchETag;
35 | this.modifiedSince = args.modifiedSince;
36 | this.unmodifiedSince = args.unmodifiedSince;
37 | }
38 |
39 | public static Builder builder() {
40 | return new Builder();
41 | }
42 |
43 | /** Argument builder of {@link CopySource}. */
44 | public static final class Builder
45 | extends ObjectConditionalReadArgs.Builder {}
46 | }
47 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/CreateMultipartUploadResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import io.minio.messages.InitiateMultipartUploadResult;
20 | import okhttp3.Headers;
21 |
22 | /** Response class of {@link S3Base#createMultipartUploadAsync}. */
23 | public class CreateMultipartUploadResponse extends GenericResponse {
24 | private InitiateMultipartUploadResult result;
25 |
26 | public CreateMultipartUploadResponse(
27 | Headers headers,
28 | String bucket,
29 | String region,
30 | String object,
31 | InitiateMultipartUploadResult result) {
32 | super(headers, bucket, region, object);
33 | this.result = result;
34 | }
35 |
36 | public InitiateMultipartUploadResult result() {
37 | return result;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/DeleteBucketCorsArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#deleteBucketCors} and {@link
21 | * MinioClient#deleteBucketCors}.
22 | */
23 | public class DeleteBucketCorsArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link DeleteBucketCorsArgs}. */
29 | public static final class Builder extends BucketArgs.Builder {}
30 | }
31 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/DeleteBucketEncryptionArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#deleteBucketEncryption} and {@link
21 | * MinioClient#deleteBucketEncryption}.
22 | */
23 | public class DeleteBucketEncryptionArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link DeleteBucketEncryptionArgs}. */
29 | public static final class Builder
30 | extends BucketArgs.Builder {}
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/DeleteBucketLifecycleArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#deleteBucketLifecycle} and {@link
21 | * MinioClient#deleteBucketLifecycle}.
22 | */
23 | public class DeleteBucketLifecycleArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link DeleteBucketLifecycleArgs}. */
29 | public static final class Builder
30 | extends BucketArgs.Builder {}
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/DeleteBucketNotificationArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#deleteBucketNotification} and {@link
21 | * MinioClient#deleteBucketNotification}.
22 | */
23 | public class DeleteBucketNotificationArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link DeleteBucketNotificationArgs}. */
29 | public static final class Builder
30 | extends BucketArgs.Builder {}
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/DeleteBucketPolicyArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#deleteBucketPolicy} and {@link
21 | * MinioClient#deleteBucketPolicy}.
22 | */
23 | public class DeleteBucketPolicyArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link DeleteBucketPolicyArgs}. */
29 | public static final class Builder extends BucketArgs.Builder {}
30 | }
31 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/DeleteBucketReplicationArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#deleteBucketReplication} and {@link
21 | * MinioClient#deleteBucketReplication}.
22 | */
23 | public class DeleteBucketReplicationArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link DeleteBucketReplicationArgs}. */
29 | public static final class Builder
30 | extends BucketArgs.Builder {}
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/DeleteBucketTagsArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#deleteBucketTags} and {@link
21 | * MinioClient#deleteBucketTags}.
22 | */
23 | public class DeleteBucketTagsArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link DeleteBucketTagsArgs}. */
29 | public static final class Builder extends BucketArgs.Builder {}
30 | }
31 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/DeleteObjectLockConfigurationArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#deleteObjectLockConfiguration} and {@link
21 | * MinioClient#deleteObjectLockConfiguration}.
22 | */
23 | public class DeleteObjectLockConfigurationArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link DeleteObjectLockConfigurationArgs}. */
29 | public static final class Builder
30 | extends BucketArgs.Builder {}
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/DeleteObjectTagsArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#deleteObjectTags} and {@link
21 | * MinioClient#deleteObjectTags}.
22 | */
23 | public class DeleteObjectTagsArgs extends ObjectVersionArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link DeleteObjectTagsArgs}. */
29 | public static final class Builder
30 | extends ObjectVersionArgs.Builder {}
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/DeleteObjectsResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import io.minio.messages.DeleteResult;
20 | import okhttp3.Headers;
21 |
22 | /** Response class of {@link S3Base#deleteObjectsAsync}. */
23 | public class DeleteObjectsResponse extends GenericResponse {
24 | private DeleteResult result;
25 |
26 | public DeleteObjectsResponse(Headers headers, String bucket, String region, DeleteResult result) {
27 | super(headers, bucket, region, null);
28 | this.result = result;
29 | }
30 |
31 | public DeleteResult result() {
32 | return result;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/Directive.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /** Copy object directive for metadata and tags. */
20 | public enum Directive {
21 | COPY,
22 | REPLACE;
23 | }
24 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/DisableObjectLegalHoldArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#disableObjectLegalHold} and {@link
21 | * MinioClient#disableObjectLegalHold}.
22 | */
23 | public class DisableObjectLegalHoldArgs extends ObjectVersionArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link DisableObjectLegalHoldArgs}. */
29 | public static final class Builder
30 | extends ObjectVersionArgs.Builder {}
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/EnableObjectLegalHoldArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#enableObjectLegalHold} and {@link
21 | * MinioClient#enableObjectLegalHold}.
22 | */
23 | public class EnableObjectLegalHoldArgs extends ObjectVersionArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link EnableObjectLegalHoldArgs}. */
29 | public static final class Builder
30 | extends ObjectVersionArgs.Builder {}
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GenericResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import okhttp3.Headers;
20 |
21 | /** Generic response class of any APIs. */
22 | public class GenericResponse {
23 | private Headers headers;
24 | private String bucket;
25 | private String region;
26 | private String object;
27 |
28 | public GenericResponse(Headers headers, String bucket, String region, String object) {
29 | this.headers = headers;
30 | this.bucket = bucket;
31 | this.region = region;
32 | this.object = object;
33 | }
34 |
35 | public Headers headers() {
36 | return headers;
37 | }
38 |
39 | public String bucket() {
40 | return bucket;
41 | }
42 |
43 | public String region() {
44 | return region;
45 | }
46 |
47 | public String object() {
48 | return object;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetBucketCorsArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#getBucketCors} and {@link MinioClient#getBucketCors}.
21 | */
22 | public class GetBucketCorsArgs extends BucketArgs {
23 | public static Builder builder() {
24 | return new Builder();
25 | }
26 |
27 | /** Argument builder of {@link GetBucketCorsArgs}. */
28 | public static final class Builder extends BucketArgs.Builder {}
29 | }
30 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetBucketEncryptionArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#getBucketEncryption} and {@link
21 | * MinioClient#getBucketEncryption}.
22 | */
23 | public class GetBucketEncryptionArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link GetBucketEncryptionArgs}. */
29 | public static final class Builder extends BucketArgs.Builder {}
30 | }
31 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetBucketLifecycleArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#getBucketLifecycle} and {@link
21 | * MinioClient#getBucketLifecycle}.
22 | */
23 | public class GetBucketLifecycleArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link GetBucketLifecycleArgs}. */
29 | public static final class Builder extends BucketArgs.Builder {}
30 | }
31 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetBucketNotificationArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#getBucketNotification} and {@link
21 | * MinioClient#getBucketNotification}.
22 | */
23 | public class GetBucketNotificationArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link GetBucketNotificationArgs}. */
29 | public static final class Builder
30 | extends BucketArgs.Builder {}
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetBucketPolicyArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#getBucketPolicy} and {@link
21 | * MinioClient#getBucketPolicy}.
22 | */
23 | public class GetBucketPolicyArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link GetBucketPolicyArgs}. */
29 | public static final class Builder extends BucketArgs.Builder {}
30 | }
31 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetBucketReplicationArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#getBucketReplication} and {@link
21 | * MinioClient#getBucketReplication}.
22 | */
23 | public class GetBucketReplicationArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link GetBucketReplicationArgs}. */
29 | public static final class Builder extends BucketArgs.Builder {}
30 | }
31 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetBucketTagsArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#getBucketTags} and {@link MinioClient#getBucketTags}.
21 | */
22 | public class GetBucketTagsArgs extends BucketArgs {
23 | public static Builder builder() {
24 | return new Builder();
25 | }
26 |
27 | /** Argument builder of {@link GetBucketTagsArgs}. */
28 | public static final class Builder extends BucketArgs.Builder {}
29 | }
30 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetBucketVersioningArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#getBucketVersioning} and {@link
21 | * MinioClient#getBucketVersioning}.
22 | */
23 | public class GetBucketVersioningArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link GetBucketVersioningArgs}. */
29 | public static final class Builder extends BucketArgs.Builder {}
30 | }
31 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetObjectAclArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2025 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /** Argument class of {@link MinioAsyncClient#getObjectAcl} and {@link MinioClient#getObjectAcl}. */
20 | public class GetObjectAclArgs extends ObjectVersionArgs {
21 | public static Builder builder() {
22 | return new Builder();
23 | }
24 |
25 | /** Argument builder of {@link GetObjectAclArgs}. */
26 | public static final class Builder extends ObjectVersionArgs.Builder {}
27 | }
28 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetObjectArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /** Argument class of {@link MinioAsyncClient#getObject} and {@link MinioClient#getObject}. */
20 | public class GetObjectArgs extends ObjectConditionalReadArgs {
21 | protected GetObjectArgs() {}
22 |
23 | public GetObjectArgs(DownloadObjectArgs args) {
24 | this.extraHeaders = args.extraHeaders;
25 | this.extraQueryParams = args.extraQueryParams;
26 | this.bucketName = args.bucketName;
27 | this.region = args.region;
28 | this.objectName = args.objectName;
29 | this.versionId = args.versionId;
30 | this.ssec = args.ssec;
31 | }
32 |
33 | public static Builder builder() {
34 | return new Builder();
35 | }
36 |
37 | /** Argument builder of {@link GetObjectArgs}. */
38 | public static final class Builder
39 | extends ObjectConditionalReadArgs.Builder {}
40 | }
41 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetObjectAttributesResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2025 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import io.minio.messages.GetObjectAttributesOutput;
20 | import okhttp3.Headers;
21 |
22 | /**
23 | * Response class of {@link MinioAsyncClient#getObjectAttributes} and {@link
24 | * MinioClient#getObjectAttributes}.
25 | */
26 | public class GetObjectAttributesResponse extends GenericResponse {
27 | private GetObjectAttributesOutput result;
28 |
29 | public GetObjectAttributesResponse(
30 | Headers headers,
31 | String bucket,
32 | String region,
33 | String object,
34 | GetObjectAttributesOutput result) {
35 | super(headers, bucket, region, object);
36 | this.result = result;
37 | }
38 |
39 | public GetObjectAttributesOutput result() {
40 | return result;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetObjectLockConfigurationArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#getObjectLockConfiguration} and {@link
21 | * MinioClient#getObjectLockConfiguration}.
22 | */
23 | public class GetObjectLockConfigurationArgs extends BucketArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link GetObjectLockConfigurationArgs}. */
29 | public static final class Builder
30 | extends BucketArgs.Builder {}
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetObjectResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import java.io.FilterInputStream;
20 | import java.io.InputStream;
21 | import okhttp3.Headers;
22 |
23 | /**
24 | * Response class of {@link MinioAsyncClient#getObject} and {@link MinioClient#getObject}. This
25 | * class is {@link InputStream} interface compatible and it must be closed after use to release
26 | * underneath network resources.
27 | */
28 | public class GetObjectResponse extends FilterInputStream {
29 | private GenericResponse response;
30 |
31 | public GetObjectResponse(
32 | Headers headers, String bucket, String region, String object, InputStream body) {
33 | super(body);
34 | this.response = new GenericResponse(headers, bucket, region, object);
35 | }
36 |
37 | public Headers headers() {
38 | return response.headers();
39 | }
40 |
41 | public String bucket() {
42 | return response.bucket();
43 | }
44 |
45 | public String region() {
46 | return response.region();
47 | }
48 |
49 | public String object() {
50 | return response.object();
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetObjectRetentionArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#getObjectRetention} and {@link
21 | * MinioClient#getObjectRetention}.
22 | */
23 | public class GetObjectRetentionArgs extends ObjectVersionArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link GetObjectRetentionArgs}. */
29 | public static final class Builder
30 | extends ObjectVersionArgs.Builder {}
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/GetObjectTagsArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#getObjectTags} and {@link MinioClient#getObjectTags}.
21 | */
22 | public class GetObjectTagsArgs extends ObjectVersionArgs {
23 | public static Builder builder() {
24 | return new Builder();
25 | }
26 |
27 | /** Argument builder of {@link GetObjectTagsArgs}. */
28 | public static final class Builder extends ObjectVersionArgs.Builder {}
29 | }
30 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/IsObjectLegalHoldEnabledArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /**
20 | * Argument class of {@link MinioAsyncClient#isObjectLegalHoldEnabled} and {@link
21 | * MinioClient#isObjectLegalHoldEnabled}.
22 | */
23 | public class IsObjectLegalHoldEnabledArgs extends ObjectVersionArgs {
24 | public static Builder builder() {
25 | return new Builder();
26 | }
27 |
28 | /** Argument builder of {@link IsObjectLegalHoldEnabledArgs}. */
29 | public static final class Builder
30 | extends ObjectVersionArgs.Builder {}
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/ListBucketsResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2025 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import io.minio.messages.ListAllMyBucketsResult;
20 | import okhttp3.Headers;
21 |
22 | /** Response class of {@link S3Base#listBucketsAsync}. */
23 | public class ListBucketsResponse extends GenericResponse {
24 | private ListAllMyBucketsResult result;
25 |
26 | public ListBucketsResponse(Headers headers, ListAllMyBucketsResult result) {
27 | super(headers, null, null, null);
28 | this.result = result;
29 | }
30 |
31 | public ListAllMyBucketsResult result() {
32 | return result;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/ListMultipartUploadsResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import io.minio.messages.ListMultipartUploadsResult;
20 | import okhttp3.Headers;
21 |
22 | /** Response class of {@link S3Base#listMultipartUploadsAsync}. */
23 | public class ListMultipartUploadsResponse extends GenericResponse {
24 | private ListMultipartUploadsResult result;
25 |
26 | public ListMultipartUploadsResponse(
27 | Headers headers, String bucket, String region, ListMultipartUploadsResult result) {
28 | super(headers, bucket, region, null);
29 | this.result = result;
30 | }
31 |
32 | public ListMultipartUploadsResult result() {
33 | return result;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/ListObjectVersionsResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import io.minio.messages.ListVersionsResult;
20 | import okhttp3.Headers;
21 |
22 | /** Response class of {@link S3Base#listObjectVersionsAsync}. */
23 | public class ListObjectVersionsResponse extends GenericResponse {
24 | private ListVersionsResult result;
25 |
26 | public ListObjectVersionsResponse(
27 | Headers headers, String bucket, String region, ListVersionsResult result) {
28 | super(headers, bucket, region, null);
29 | this.result = result;
30 | }
31 |
32 | public ListVersionsResult result() {
33 | return result;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/ListObjectsV1Response.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import io.minio.messages.ListBucketResultV1;
20 | import okhttp3.Headers;
21 |
22 | /** Response class of {@link S3Base#listObjectsV1Async}. */
23 | public class ListObjectsV1Response extends GenericResponse {
24 | private ListBucketResultV1 result;
25 |
26 | public ListObjectsV1Response(
27 | Headers headers, String bucket, String region, ListBucketResultV1 result) {
28 | super(headers, bucket, region, null);
29 | this.result = result;
30 | }
31 |
32 | public ListBucketResultV1 result() {
33 | return result;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/ListObjectsV2Response.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import io.minio.messages.ListBucketResultV2;
20 | import okhttp3.Headers;
21 |
22 | /** Response class of {@link S3Base#listObjectsV2Async}. */
23 | public class ListObjectsV2Response extends GenericResponse {
24 | private ListBucketResultV2 result;
25 |
26 | public ListObjectsV2Response(
27 | Headers headers, String bucket, String region, ListBucketResultV2 result) {
28 | super(headers, bucket, region, null);
29 | this.result = result;
30 | }
31 |
32 | public ListBucketResultV2 result() {
33 | return result;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/ListPartsResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import io.minio.messages.ListPartsResult;
20 | import okhttp3.Headers;
21 |
22 | /** Response class of {@link S3Base#listPartsAsync}. */
23 | public class ListPartsResponse extends GenericResponse {
24 | private ListPartsResult result;
25 |
26 | public ListPartsResponse(
27 | Headers headers, String bucket, String region, String object, ListPartsResult result) {
28 | super(headers, bucket, region, object);
29 | this.result = result;
30 | }
31 |
32 | public ListPartsResult result() {
33 | return result;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/MakeBucketArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import java.util.Objects;
20 |
21 | /** Argument class of {@link MinioAsyncClient#makeBucket} and {@link MinioClient#makeBucket}. */
22 | public class MakeBucketArgs extends BucketArgs {
23 | private boolean objectLock;
24 |
25 | public boolean objectLock() {
26 | return objectLock;
27 | }
28 |
29 | public static Builder builder() {
30 | return new Builder();
31 | }
32 |
33 | /** Argument builder of {@link MakeBucketArgs}. */
34 | public static final class Builder extends BucketArgs.Builder {
35 | public Builder objectLock(boolean objectLock) {
36 | operations.add(args -> args.objectLock = objectLock);
37 | return this;
38 | }
39 | }
40 |
41 | @Override
42 | public boolean equals(Object o) {
43 | if (this == o) return true;
44 | if (!(o instanceof MakeBucketArgs)) return false;
45 | if (!super.equals(o)) return false;
46 | MakeBucketArgs that = (MakeBucketArgs) o;
47 | return objectLock == that.objectLock;
48 | }
49 |
50 | @Override
51 | public int hashCode() {
52 | return Objects.hash(super.hashCode(), objectLock);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/PromptObjectResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2025 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import java.io.FilterInputStream;
20 | import java.io.InputStream;
21 | import okhttp3.Headers;
22 |
23 | /**
24 | * Response class of {@link MinioAsyncClient#promptObject} and {@link MinioClient#promptObject}.
25 | * This class is {@link InputStream} interface compatible and it must be closed after use to release
26 | * underneath network resources.
27 | */
28 | public class PromptObjectResponse extends FilterInputStream {
29 | private GenericResponse response;
30 |
31 | public PromptObjectResponse(
32 | Headers headers, String bucket, String region, String object, InputStream body) {
33 | super(body);
34 | this.response = new GenericResponse(headers, bucket, region, object);
35 | }
36 |
37 | public Headers headers() {
38 | return response.headers();
39 | }
40 |
41 | public String bucket() {
42 | return response.bucket();
43 | }
44 |
45 | public String region() {
46 | return response.region();
47 | }
48 |
49 | public String object() {
50 | return response.object();
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/RemoveBucketArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /** Argument class of {@link MinioAsyncClient#removeBucket} and {@link MinioClient#removeBucket}. */
20 | public class RemoveBucketArgs extends BucketArgs {
21 |
22 | public static Builder builder() {
23 | return new Builder();
24 | }
25 |
26 | /** Argument builder of {@link RemoveBucketArgs}. */
27 | public static final class Builder extends BucketArgs.Builder {}
28 | }
29 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/ServerSideEncryption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2018 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import java.util.Map;
20 |
21 | /** Base class of server-side encryption. */
22 | public abstract class ServerSideEncryption {
23 | private static final Map emptyHeaders = Utils.unmodifiableMap(null);
24 |
25 | public abstract Map headers();
26 |
27 | public boolean tlsRequired() {
28 | return true;
29 | }
30 |
31 | public Map copySourceHeaders() {
32 | return emptyHeaders;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/ServerSideEncryptionS3.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import java.util.HashMap;
20 | import java.util.Map;
21 |
22 | /** S3 type of Server-side encryption. */
23 | public class ServerSideEncryptionS3 extends ServerSideEncryption {
24 | private static final Map headers;
25 |
26 | static {
27 | Map map = new HashMap<>();
28 | map.put("X-Amz-Server-Side-Encryption", "AES256");
29 | headers = Utils.unmodifiableMap(map);
30 | }
31 |
32 | @Override
33 | public final Map headers() {
34 | return headers;
35 | }
36 |
37 | @Override
38 | public final boolean tlsRequired() {
39 | return false;
40 | }
41 |
42 | @Override
43 | public String toString() {
44 | return "SSE-S3";
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/StatObjectArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | /** Argument class of {@link MinioAsyncClient#statObject} and {@link MinioClient#statObject}. */
20 | public class StatObjectArgs extends ObjectConditionalReadArgs {
21 | protected StatObjectArgs() {}
22 |
23 | public StatObjectArgs(ObjectReadArgs args) {
24 | this.extraHeaders = args.extraHeaders;
25 | this.extraQueryParams = args.extraQueryParams;
26 | this.bucketName = args.bucketName;
27 | this.region = args.region;
28 | this.objectName = args.objectName;
29 | this.versionId = args.versionId;
30 | this.ssec = args.ssec;
31 | }
32 |
33 | public static Builder builder() {
34 | return new Builder();
35 | }
36 |
37 | /** Argument builder of {@link StatObjectArgs}. */
38 | public static final class Builder
39 | extends ObjectConditionalReadArgs.Builder {}
40 | }
41 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/UploadPartCopyResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import io.minio.messages.CopyPartResult;
20 | import okhttp3.Headers;
21 |
22 | /** Response class of {@link S3Base#uploadPartCopyAsync}. */
23 | public class UploadPartCopyResponse extends GenericResponse {
24 | private String uploadId;
25 | private int partNumber;
26 | private CopyPartResult result;
27 |
28 | public UploadPartCopyResponse(
29 | Headers headers,
30 | String bucket,
31 | String region,
32 | String object,
33 | String uploadId,
34 | int partNumber,
35 | CopyPartResult result) {
36 | super(headers, bucket, region, object);
37 | this.uploadId = uploadId;
38 | this.partNumber = partNumber;
39 | this.result = result;
40 | }
41 |
42 | public String uploadId() {
43 | return uploadId;
44 | }
45 |
46 | public int partNumber() {
47 | return partNumber;
48 | }
49 |
50 | public CopyPartResult result() {
51 | return result;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/UploadPartResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import okhttp3.Headers;
20 |
21 | /** Response class of {@link S3Base#uploadPartAsync}. */
22 | public class UploadPartResponse extends GenericResponse {
23 | private String uploadId;
24 | private int partNumber;
25 | private String etag;
26 |
27 | public UploadPartResponse(
28 | Headers headers,
29 | String bucket,
30 | String region,
31 | String object,
32 | String uploadId,
33 | int partNumber,
34 | String etag) {
35 | super(headers, bucket, region, object);
36 | this.uploadId = uploadId;
37 | this.partNumber = partNumber;
38 | this.etag = etag;
39 | }
40 |
41 | public String uploadId() {
42 | return uploadId;
43 | }
44 |
45 | public int partNumber() {
46 | return partNumber;
47 | }
48 |
49 | public String etag() {
50 | return etag;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/Utils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2025 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio;
18 |
19 | import java.io.UnsupportedEncodingException;
20 | import java.net.URLDecoder;
21 | import java.nio.charset.StandardCharsets;
22 | import java.util.Collections;
23 | import java.util.HashMap;
24 | import java.util.LinkedList;
25 | import java.util.List;
26 | import java.util.Map;
27 |
28 | /** Collection of utility functions. */
29 | public class Utils {
30 | public static final String UTF_8 = StandardCharsets.UTF_8.toString();
31 |
32 | public static String urlDecode(String value, String type) {
33 | if (!"url".equals(type)) return value;
34 | try {
35 | return value == null ? null : URLDecoder.decode(value, UTF_8);
36 | } catch (UnsupportedEncodingException e) {
37 | // This never happens as 'enc' name comes from JDK's own StandardCharsets.
38 | throw new RuntimeException(e);
39 | }
40 | }
41 |
42 | public static List unmodifiableList(List extends T> value) {
43 | return Collections.unmodifiableList(value == null ? new LinkedList() : value);
44 | }
45 |
46 | public static Map unmodifiableMap(Map extends K, ? extends V> value) {
47 | return Collections.unmodifiableMap(value == null ? new HashMap() : value);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/credentials/AwsEnvironmentProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.credentials;
18 |
19 | /** Credential provider using Amazon AWS specific environment variables. */
20 | public class AwsEnvironmentProvider extends EnvironmentProvider {
21 | public AwsEnvironmentProvider() {}
22 |
23 | private final String getAccessKey() {
24 | String value = getProperty("AWS_ACCESS_KEY_ID");
25 | return (value != null) ? value : getProperty("AWS_ACCESS_KEY");
26 | }
27 |
28 | private final String getSecretKey() {
29 | String value = getProperty("AWS_SECRET_ACCESS_KEY");
30 | return (value != null) ? value : getProperty("AWS_SECRET_KEY");
31 | }
32 |
33 | @Override
34 | public Credentials fetch() {
35 | return new Credentials(getAccessKey(), getSecretKey(), getProperty("AWS_SESSION_TOKEN"), null);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/credentials/EnvironmentProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.credentials;
18 |
19 | import javax.annotation.Nonnull;
20 | import javax.annotation.Nullable;
21 |
22 | /** Base class of credential providers using environment variables. */
23 | public abstract class EnvironmentProvider implements Provider {
24 | /** Get value of a property from system property or environment variable. */
25 | @Nullable
26 | protected String getProperty(@Nonnull String name) {
27 | final String value = System.getProperty(name);
28 | return (value != null) ? value : System.getenv(name);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/credentials/Jwt.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.credentials;
18 |
19 | import com.fasterxml.jackson.annotation.JsonProperty;
20 | import java.beans.ConstructorProperties;
21 | import java.util.Objects;
22 | import javax.annotation.Nonnull;
23 |
24 | /** JSON web token used in WebIdentity and ClientGrants providers. */
25 | public class Jwt {
26 | @JsonProperty("access_token")
27 | private final String token;
28 |
29 | @JsonProperty("expires_in")
30 | private final int expiry;
31 |
32 | @ConstructorProperties({"access_token", "expires_in"})
33 | public Jwt(@Nonnull String token, int expiry) {
34 | this.token = Objects.requireNonNull(token);
35 | this.expiry = expiry;
36 | }
37 |
38 | public String token() {
39 | return token;
40 | }
41 |
42 | public int expiry() {
43 | return expiry;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/credentials/MinioEnvironmentProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.credentials;
18 |
19 | /** Credential provider using MinIO server specific environment variables. */
20 | public class MinioEnvironmentProvider extends EnvironmentProvider {
21 | @Override
22 | public Credentials fetch() {
23 | return new Credentials(
24 | getProperty("MINIO_ACCESS_KEY"), getProperty("MINIO_SECRET_KEY"), null, null);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/credentials/Provider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.credentials;
18 |
19 | /**
20 | * Definition of credential provider. Provider always gives a valid, non-expired credentials to be
21 | * used to perform S3 operations. Credential consumer like {@link io.minio.MinioClient} calls {@link
22 | * #fetch()} to get credentials. It is provider's responsibility to retrieve credentials upon expiry
23 | * when {@link #fetch()} is called.
24 | */
25 | public interface Provider {
26 | /**
27 | * Returns a valid {@link Credentials} instance by retrieving from credential provider service if
28 | * neccessary.
29 | */
30 | Credentials fetch();
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/credentials/StaticProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.credentials;
18 |
19 | import javax.annotation.Nonnull;
20 | import javax.annotation.Nullable;
21 |
22 | /** Fixed credential provider. */
23 | public class StaticProvider implements Provider {
24 | private final Credentials credentials;
25 |
26 | public StaticProvider(
27 | @Nonnull String accessKey, @Nonnull String secretKey, @Nullable String sessionToken) {
28 | this.credentials = new Credentials(accessKey, secretKey, sessionToken, null);
29 | }
30 |
31 | @Override
32 | public Credentials fetch() {
33 | return credentials;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/errors/BucketPolicyTooLargeException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2015 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.errors;
18 |
19 | /** Thrown to indicate that received bucket policy is larger than 20KiB size. */
20 | @SuppressWarnings("WeakerAccess")
21 | public class BucketPolicyTooLargeException extends MinioException {
22 | private static final long serialVersionUID = -4589481215582512545L;
23 |
24 | public BucketPolicyTooLargeException(String bucketName) {
25 | super("Bucket policy is larger than 20KiB size for bucket " + bucketName);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/errors/InsufficientDataException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2015 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.errors;
18 |
19 | /**
20 | * Thrown to indicate that reading given InputStream gets EOFException before reading given length.
21 | */
22 | public class InsufficientDataException extends MinioException {
23 | private static final long serialVersionUID = -1619719290805056566L;
24 |
25 | /** Constructs a new InsufficientDataException with given error message. */
26 | public InsufficientDataException(String message) {
27 | super(message);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/errors/InternalException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2015 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.errors;
18 |
19 | /**
20 | * Thrown to indicate that unexpected internal library error occured while processing given request.
21 | */
22 | public class InternalException extends MinioException {
23 | private static final long serialVersionUID = 138336287983212416L;
24 |
25 | /** Constructs a new InternalException with given error message. */
26 | public InternalException(String message, String httpTrace) {
27 | super(message, httpTrace);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/errors/InvalidResponseException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2019 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.errors;
18 |
19 | /** Thrown to indicate that non-xml response thrown from server. */
20 | public class InvalidResponseException extends MinioException {
21 | private static final long serialVersionUID = -4793742105569629274L;
22 |
23 | public InvalidResponseException(
24 | int responseCode, String contentType, String body, String httpTrace) {
25 | super(
26 | "Non-XML response from server. Response code: "
27 | + responseCode
28 | + ", Content-Type: "
29 | + contentType
30 | + ", body: "
31 | + body,
32 | httpTrace);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/errors/MinioException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2015 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.errors;
18 |
19 | /** Base Exception class for all minio-java exceptions. */
20 | public class MinioException extends Exception {
21 | private static final long serialVersionUID = -7241010318779326306L;
22 |
23 | String httpTrace = null;
24 |
25 | /** Constructs a new MinioException. */
26 | public MinioException() {
27 | super();
28 | }
29 |
30 | /** Constructs a new MinioException with given error message. */
31 | public MinioException(String message) {
32 | super(message);
33 | }
34 |
35 | /** Constructs a new MinioException with given error message. */
36 | public MinioException(String message, String httpTrace) {
37 | super(message);
38 | this.httpTrace = httpTrace;
39 | }
40 |
41 | public String httpTrace() {
42 | return this.httpTrace;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/errors/ServerException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.errors;
18 |
19 | /** Thrown to indicate that S3 service returning HTTP server error. */
20 | public class ServerException extends MinioException {
21 | private static final long serialVersionUID = 6395201577368980633L;
22 |
23 | private int statusCode;
24 |
25 | public ServerException(String message, int statusCode, String httpTrace) {
26 | super(message, httpTrace);
27 | this.statusCode = statusCode;
28 | }
29 |
30 | public int statusCode() {
31 | return statusCode;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/errors/XmlParserException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2015 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.errors;
18 |
19 | /** Thrown to indicate that error at XML marshalling or unmarshalling. */
20 | public class XmlParserException extends MinioException {
21 | private static final long serialVersionUID = -3877568719271880309L;
22 |
23 | public XmlParserException(Exception e) {
24 | super(e.toString());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/http/Method.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2015 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.http;
18 |
19 | /** HTTP methods. */
20 | public enum Method {
21 | GET,
22 | HEAD,
23 | POST,
24 | PUT,
25 | DELETE;
26 | }
27 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/AbortIncompleteMultipartUpload.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /**
23 | * Helper class to denote abort incomplete multipart upload information for {@link LifecycleRule}.
24 | */
25 | @Root(name = "AbortIncompleteMultipartUpload")
26 | public class AbortIncompleteMultipartUpload {
27 | @Element(name = "DaysAfterInitiation")
28 | private int daysAfterInitiation;
29 |
30 | public AbortIncompleteMultipartUpload(
31 | @Element(name = "DaysAfterInitiation") int daysAfterInitiation) {
32 | this.daysAfterInitiation = daysAfterInitiation;
33 | }
34 |
35 | public int daysAfterInitiation() {
36 | return daysAfterInitiation;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/AccessControlList.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2021 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import io.minio.Utils;
20 | import java.util.List;
21 | import java.util.Objects;
22 | import javax.annotation.Nonnull;
23 | import org.simpleframework.xml.ElementList;
24 | import org.simpleframework.xml.Root;
25 |
26 | /** Helper class to denote access control list of {@link S3OutputLocation}. */
27 | @Root(name = "AccessControlList")
28 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
29 | public class AccessControlList {
30 | @ElementList(name = "Grant", inline = true)
31 | private List grants;
32 |
33 | public AccessControlList(
34 | @Nonnull @ElementList(name = "Grant", inline = true) List grants) {
35 | Objects.requireNonNull(grants, "Grants must not be null");
36 | if (grants.size() == 0) {
37 | throw new IllegalArgumentException("Grants must not be empty");
38 | }
39 | this.grants = Utils.unmodifiableList(grants);
40 | }
41 |
42 | public List grants() {
43 | return Utils.unmodifiableList(grants);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/AccessControlTranslation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.util.Objects;
20 | import javax.annotation.Nonnull;
21 | import org.simpleframework.xml.Element;
22 | import org.simpleframework.xml.Root;
23 |
24 | /**
25 | * Helper class to denote access control translation information for {@link ReplicationDestination}.
26 | */
27 | @Root(name = "AccessControlTranslation")
28 | public class AccessControlTranslation {
29 | @Element(name = "Owner")
30 | private String owner = "Destination";
31 |
32 | public AccessControlTranslation(@Nonnull @Element(name = "Owner") String owner) {
33 | this.owner = Objects.requireNonNull(owner, "Owner must not be null");
34 | }
35 |
36 | public String owner() {
37 | return this.owner;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Bucket.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2015 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.time.ZonedDateTime;
20 | import org.simpleframework.xml.Element;
21 | import org.simpleframework.xml.Root;
22 |
23 | /** Helper class to denote bucket information for {@link ListAllMyBucketsResult}. */
24 | @Root(name = "Bucket", strict = false)
25 | public class Bucket {
26 | @Element(name = "Name")
27 | private String name;
28 |
29 | @Element(name = "CreationDate")
30 | private ResponseDate creationDate;
31 |
32 | @Element(name = "BucketRegion", required = false)
33 | private String bucketRegion;
34 |
35 | public Bucket() {}
36 |
37 | /** Returns bucket name. */
38 | public String name() {
39 | return name;
40 | }
41 |
42 | /** Returns creation date. */
43 | public ZonedDateTime creationDate() {
44 | return creationDate.zonedDateTime();
45 | }
46 |
47 | public String bucketRegion() {
48 | return bucketRegion;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/BucketMetadata.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2020 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.messages;
19 |
20 | import com.fasterxml.jackson.annotation.JsonProperty;
21 |
22 | /** Helper class to denote bucket information for {@link EventMetadata}. */
23 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(
24 | value = "UwF",
25 | justification = "Everything in this class is initialized by JSON unmarshalling.")
26 | public class BucketMetadata {
27 | @JsonProperty private String name;
28 | @JsonProperty private Identity ownerIdentity;
29 | @JsonProperty private String arn;
30 |
31 | public String name() {
32 | return name;
33 | }
34 |
35 | public String owner() {
36 | if (ownerIdentity == null) {
37 | return null;
38 | }
39 |
40 | return ownerIdentity.principalId();
41 | }
42 |
43 | public String arn() {
44 | return arn;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/CloudFunctionConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2017 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /** Helper class to denote CloudFunction configuration of {@link NotificationConfiguration}. */
23 | @Root(name = "CloudFunctionConfiguration", strict = false)
24 | public class CloudFunctionConfiguration extends NotificationCommonConfiguration {
25 | @Element(name = "CloudFunction")
26 | private String cloudFunction;
27 |
28 | public CloudFunctionConfiguration() {
29 | super();
30 | }
31 |
32 | /** Returns cloudFunction. */
33 | public String cloudFunction() {
34 | return cloudFunction;
35 | }
36 |
37 | /** Sets cloudFunction. */
38 | public void setCloudFunction(String cloudFunction) {
39 | this.cloudFunction = cloudFunction;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/CompleteMultipartUploadOutput.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2015 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Namespace;
20 | import org.simpleframework.xml.Root;
21 |
22 | /**
23 | * Object representation of response XML of CompleteMultipartUpload
25 | * API.
26 | */
27 | @Root(name = "CompleteMultipartUploadOutput")
28 | @Namespace(reference = "http://s3.amazonaws.com/doc/2006-03-01/")
29 | public class CompleteMultipartUploadOutput extends CompleteMultipartUploadResult {}
30 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/CompressionType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2019 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | /** CSV/JSON object's compression format for select object content. */
20 | public enum CompressionType {
21 | NONE,
22 | GZIP,
23 | BZIP2;
24 | }
25 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Contents.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Root;
20 |
21 | /**
22 | * Helper class to denote Object information in {@link ListBucketResultV1} and {@link
23 | * ListBucketResultV2}
24 | */
25 | @Root(name = "Contents", strict = false)
26 | public class Contents extends Item {
27 | public Contents() {
28 | super();
29 | }
30 |
31 | public Contents(String prefix) {
32 | super(prefix);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/CopyPartResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Minio Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2019 Minio, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.messages;
19 |
20 | import org.simpleframework.xml.Namespace;
21 | import org.simpleframework.xml.Root;
22 |
23 | /**
24 | * Object representation of response XML of UploadPartCopy
26 | * API.
27 | */
28 | @Root(name = "CopyPartResult", strict = false)
29 | @Namespace(reference = "http://s3.amazonaws.com/doc/2006-03-01/")
30 | public class CopyPartResult extends CopyObjectResult {}
31 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/DateDays.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.time.ZonedDateTime;
20 | import org.simpleframework.xml.Element;
21 |
22 | /** Base class for {@link Transition} and {@link Expiration}. */
23 | public abstract class DateDays {
24 | @Element(name = "Date", required = false)
25 | protected ResponseDate date;
26 |
27 | @Element(name = "Days", required = false)
28 | protected Integer days;
29 |
30 | public ZonedDateTime date() {
31 | return (date != null) ? date.zonedDateTime() : null;
32 | }
33 |
34 | public Integer days() {
35 | return days;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/DeleteError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2017 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Namespace;
20 | import org.simpleframework.xml.Root;
21 |
22 | /** Helper class to denote error for {@link DeleteResult}. */
23 | @Root(name = "Error", strict = false)
24 | @Namespace(reference = "http://s3.amazonaws.com/doc/2006-03-01/")
25 | public class DeleteError extends ErrorResponse {
26 | private static final long serialVersionUID = 1905162041950251407L; // fix SE_BAD_FIELD
27 | }
28 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/DeleteMarker.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Root;
20 |
21 | /** Helper class to denote delete marker information in {@link ListVersionsResult}. */
22 | @Root(name = "DeleteMarker", strict = false)
23 | public class DeleteMarker extends Item {
24 | public DeleteMarker() {
25 | super();
26 | }
27 |
28 | public DeleteMarker(String prefix) {
29 | super(prefix);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/DeleteMarkerReplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import javax.annotation.Nullable;
20 | import org.simpleframework.xml.Element;
21 | import org.simpleframework.xml.Root;
22 |
23 | /** Helper class to denote delete marker replication information for {@link ReplicationRule}. */
24 | @Root(name = "DeleteMarkerReplication")
25 | public class DeleteMarkerReplication {
26 | @Element(name = "Status", required = false)
27 | private Status status;
28 |
29 | /** Constructs new server-side encryption configuration rule. */
30 | public DeleteMarkerReplication(
31 | @Nullable @Element(name = "Status", required = false) Status status) {
32 | this.status = (status == null) ? Status.DISABLED : status;
33 | }
34 |
35 | public Status status() {
36 | return status;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/DeleteReplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import javax.annotation.Nullable;
20 | import org.simpleframework.xml.Element;
21 | import org.simpleframework.xml.Root;
22 |
23 | /**
24 | * Helper class to denote delete replication information for {@link ReplicationRule}. This is MinIO
25 | * specific extension.
26 | */
27 | @Root(name = "DeleteReplication")
28 | public class DeleteReplication {
29 | @Element(name = "Status", required = false)
30 | private Status status;
31 |
32 | public DeleteReplication(@Nullable @Element(name = "Status", required = false) Status status) {
33 | this.status = (status == null) ? Status.DISABLED : status;
34 | }
35 |
36 | public Status status() {
37 | return status;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/DeletedObject.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2017 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /** Helper class to denote deleted object for {@link DeleteResult}. */
23 | @Root(name = "Deleted", strict = false)
24 | public class DeletedObject {
25 | @Element(name = "Key")
26 | private String name;
27 |
28 | @Element(name = "VersionId", required = false)
29 | private String versionId;
30 |
31 | @Element(name = "DeleteMarker", required = false)
32 | private boolean deleteMarker;
33 |
34 | @Element(name = "DeleteMarkerVersionId", required = false)
35 | private String deleteMarkerVersionId;
36 |
37 | public DeletedObject() {}
38 |
39 | public String name() {
40 | return name;
41 | }
42 |
43 | public String versionId() {
44 | return versionId;
45 | }
46 |
47 | public boolean deleteMarker() {
48 | return deleteMarker;
49 | }
50 |
51 | public String deleteMarkerVersionId() {
52 | return deleteMarkerVersionId;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Encryption.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2021 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.util.Objects;
20 | import javax.annotation.Nonnull;
21 | import javax.annotation.Nullable;
22 | import org.simpleframework.xml.Element;
23 | import org.simpleframework.xml.Root;
24 |
25 | /** Helper class to denote encryption information of {@link S3OutputLocation}. */
26 | @Root(name = "Encryption")
27 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
28 | public class Encryption {
29 | @Element(name = "EncryptionType")
30 | private SseAlgorithm encryptionType;
31 |
32 | @Element(name = "KMSContext", required = false)
33 | private String kmsContext;
34 |
35 | @Element(name = "KMSKeyId", required = false)
36 | private String kmsKeyId;
37 |
38 | public Encryption(
39 | @Nonnull SseAlgorithm encryptionType,
40 | @Nullable String kmsContext,
41 | @Nullable String kmsKeyId) {
42 | this.encryptionType =
43 | Objects.requireNonNull(encryptionType, "Encryption type must not be null");
44 | this.kmsContext = kmsContext;
45 | this.kmsKeyId = kmsKeyId;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/EncryptionConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import javax.annotation.Nullable;
20 | import org.simpleframework.xml.Element;
21 | import org.simpleframework.xml.Root;
22 |
23 | /**
24 | * Helper class to denote encryption configuration information for {@link ReplicationDestination}.
25 | */
26 | @Root(name = "EncryptionConfiguration")
27 | public class EncryptionConfiguration {
28 | @Element(name = "ReplicaKmsKeyID", required = false)
29 | private String replicaKmsKeyID;
30 |
31 | public EncryptionConfiguration(
32 | @Nullable @Element(name = "ReplicaKmsKeyID", required = false) String replicaKmsKeyID) {
33 | this.replicaKmsKeyID = replicaKmsKeyID;
34 | }
35 |
36 | public String replicaKmsKeyID() {
37 | return this.replicaKmsKeyID;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/ExistingObjectReplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.util.Objects;
20 | import javax.annotation.Nonnull;
21 | import org.simpleframework.xml.Element;
22 | import org.simpleframework.xml.Root;
23 |
24 | /** Helper class to denote existing object replication information for {@link ReplicationRule}. */
25 | @Root(name = "ExistingObjectReplication")
26 | public class ExistingObjectReplication {
27 | @Element(name = "Status")
28 | private Status status;
29 |
30 | public ExistingObjectReplication(@Nonnull @Element(name = "Status") Status status) {
31 | this.status = Objects.requireNonNull(status, "Status must not be null");
32 | }
33 |
34 | public Status status() {
35 | return this.status;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/FileHeaderInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2019 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | /** Description the first line of input in CSV object. */
20 | public enum FileHeaderInfo {
21 | USE,
22 | IGNORE,
23 | NONE;
24 | }
25 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/FilterRule.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2017 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /**
23 | * Helper class to denote FilterRule configuration of {@link CloudFunctionConfiguration}, {@link
24 | * QueueConfiguration} or {@link TopicConfiguration}.
25 | */
26 | @Root(name = "FilterRule", strict = false)
27 | public class FilterRule {
28 | @Element(name = "Name")
29 | private String name;
30 |
31 | @Element(name = "Value")
32 | private String value;
33 |
34 | public FilterRule() {}
35 |
36 | public FilterRule(String name, String value) {
37 | this.name = name;
38 | this.value = value;
39 | }
40 |
41 | /** Returns filter name. */
42 | public String name() {
43 | return name;
44 | }
45 |
46 | /** Returns filter value. */
47 | public String value() {
48 | return value;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/GlacierJobParameters.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2021 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.util.Objects;
20 | import javax.annotation.Nonnull;
21 | import org.simpleframework.xml.Element;
22 | import org.simpleframework.xml.Root;
23 |
24 | /** Helper class to denote S3 Glacier job parameters of {@link RestoreRequest}. */
25 | @Root(name = "GlacierJobParameters")
26 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
27 | public class GlacierJobParameters {
28 | @Element(name = "Tier")
29 | private Tier tier;
30 |
31 | public GlacierJobParameters(@Nonnull Tier tier) {
32 | this.tier = Objects.requireNonNull(tier, "Tier must not be null");
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Identity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2020 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.messages;
19 |
20 | import com.fasterxml.jackson.annotation.JsonProperty;
21 |
22 | /** Helper class to denote user or owner identity for {@link Event} and {@link BucketMetadata}. */
23 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(
24 | value = "UwF",
25 | justification = "Everything in this class is initialized by JSON unmarshalling.")
26 | public class Identity {
27 | @JsonProperty private String principalId;
28 |
29 | public String principalId() {
30 | return principalId;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/InitiateMultipartUploadResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2015 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Namespace;
21 | import org.simpleframework.xml.Root;
22 |
23 | /**
24 | * Object representation of response XML of CreateMultipartUpload
26 | * API.
27 | */
28 | @Root(name = "InitiateMultipartUploadResult", strict = false)
29 | @Namespace(reference = "http://s3.amazonaws.com/doc/2006-03-01/")
30 | public class InitiateMultipartUploadResult {
31 | @Element(name = "Bucket")
32 | private String bucketName;
33 |
34 | @Element(name = "Key")
35 | private String objectName;
36 |
37 | @Element(name = "UploadId")
38 | private String uploadId;
39 |
40 | public InitiateMultipartUploadResult() {}
41 |
42 | /** Returns bucket name. */
43 | public String bucketName() {
44 | return bucketName;
45 | }
46 |
47 | /** Returns object name. */
48 | public String objectName() {
49 | return objectName;
50 | }
51 |
52 | /** Returns upload ID. */
53 | public String uploadId() {
54 | return uploadId;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Initiator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2015 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /**
23 | * Helper class to denote Initator information of a multipart upload and used in {@link
24 | * ListMultipartUploadsResult} and {@link ListPartsResult}.
25 | */
26 | @Root(name = "Initiator", strict = false)
27 | public class Initiator {
28 | @Element(name = "ID", required = false)
29 | private String id;
30 |
31 | @Element(name = "DisplayName", required = false)
32 | private String displayName;
33 |
34 | public Initiator() {}
35 |
36 | /** Returns initiator ID. */
37 | public String id() {
38 | return id;
39 | }
40 |
41 | /** Returns initiator display name. */
42 | public String displayName() {
43 | return displayName;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/JsonInputSerialization.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2019 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /**
23 | * Helper class to denote JSON input serialization request XML as per {@link
24 | * SelectObjectContentRequest}.
25 | */
26 | @Root(name = "JSON")
27 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
28 | public class JsonInputSerialization {
29 | @Element(name = "Type", required = false)
30 | private JsonType type;
31 |
32 | /** Constructs a new JsonInputSerialization object. */
33 | public JsonInputSerialization(JsonType type) {
34 | this.type = type;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/JsonOutputSerialization.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2019 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /**
23 | * Helper class to denote JSON output serialization request XML as per {@link
24 | * SelectObjectContentRequest}.
25 | */
26 | @Root(name = "JSON")
27 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
28 | public class JsonOutputSerialization {
29 | @Element(name = "RecordDelimiter", required = false)
30 | private Character recordDelimiter;
31 |
32 | /** Constructs a new JsonOutputSerialization object. */
33 | public JsonOutputSerialization(Character recordDelimiter) {
34 | this.recordDelimiter = recordDelimiter;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/JsonType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2019 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | /** The type of JSON. */
20 | public enum JsonType {
21 | DOCUMENT,
22 | LINES;
23 | }
24 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/LegalHold.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Namespace;
21 | import org.simpleframework.xml.Root;
22 |
23 | /**
24 | * Object representation of request XML of PutObjectLegalHold
26 | * API and response XML of GetObjectLegalHold
28 | * API.
29 | */
30 | @Root(name = "LegalHold", strict = false)
31 | @Namespace(reference = "http://s3.amazonaws.com/doc/2006-03-01/")
32 | public class LegalHold {
33 | @Element(name = "Status", required = false)
34 | private String status;
35 |
36 | public LegalHold() {}
37 |
38 | /** Constructs a new LegalHold object with given status. */
39 | public LegalHold(boolean status) {
40 | if (status) {
41 | this.status = "ON";
42 | } else {
43 | this.status = "OFF";
44 | }
45 | }
46 |
47 | /** Indicates whether the specified object has a Legal Hold in place or not. */
48 | public boolean status() {
49 | return status != null && status.equals("ON");
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/LocationConstraint.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Namespace;
20 | import org.simpleframework.xml.Root;
21 | import org.simpleframework.xml.Text;
22 |
23 | /**
24 | * Object representation of response XML of GetBucketLocation
26 | * API.
27 | */
28 | @Root(name = "LocationConstraint", strict = false)
29 | @Namespace(reference = "http://s3.amazonaws.com/doc/2006-03-01/")
30 | public class LocationConstraint {
31 | @Text(required = false)
32 | private String location = "";
33 |
34 | public LocationConstraint() {}
35 |
36 | public String location() {
37 | return location;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Metrics.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.util.Objects;
20 | import javax.annotation.Nonnull;
21 | import org.simpleframework.xml.Element;
22 | import org.simpleframework.xml.Root;
23 |
24 | /** Helper class to denote metrics information for {@link ReplicationDestination}. */
25 | @Root(name = "Metrics")
26 | public class Metrics {
27 | @Element(name = "EventThreshold")
28 | private ReplicationTimeValue eventThreshold;
29 |
30 | @Element(name = "Status")
31 | private Status status;
32 |
33 | public Metrics(
34 | @Nonnull @Element(name = "EventThreshold") ReplicationTimeValue eventThreshold,
35 | @Nonnull @Element(name = "Status") Status status) {
36 | this.eventThreshold =
37 | Objects.requireNonNull(eventThreshold, "Event threshold must not be null");
38 | this.status = Objects.requireNonNull(status, "Status must not be null");
39 | }
40 |
41 | public ReplicationTimeValue eventThreshold() {
42 | return this.eventThreshold;
43 | }
44 |
45 | public Status status() {
46 | return this.status;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/NotificationRecords.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2020 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.messages;
19 |
20 | import com.fasterxml.jackson.annotation.JsonProperty;
21 | import io.minio.Utils;
22 | import java.util.List;
23 |
24 | /**
25 | * Object representation of JSON format of Event
27 | * Message Structure.
28 | */
29 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(
30 | value = "UwF",
31 | justification = "Everything in this class is initialized by JSON unmarshalling.")
32 | public class NotificationRecords {
33 | @JsonProperty("Records")
34 | private List events;
35 |
36 | public List events() {
37 | return Utils.unmodifiableList(events);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/ObjectMetadata.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2020 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.messages;
19 |
20 | import com.fasterxml.jackson.annotation.JsonProperty;
21 | import io.minio.Utils;
22 | import java.util.Map;
23 |
24 | /** Helper class to denote object information for {@link EventMetadata}. */
25 | public class ObjectMetadata {
26 | @JsonProperty private String key;
27 | @JsonProperty private long size;
28 | @JsonProperty private String eTag;
29 | @JsonProperty private String versionId;
30 | @JsonProperty private String sequencer;
31 | @JsonProperty private Map userMetadata; // MinIO specific extension.
32 |
33 | public String key() {
34 | return key;
35 | }
36 |
37 | public long size() {
38 | return size;
39 | }
40 |
41 | public String etag() {
42 | return eTag;
43 | }
44 |
45 | public String versionId() {
46 | return versionId;
47 | }
48 |
49 | public String sequencer() {
50 | return sequencer;
51 | }
52 |
53 | public Map userMetadata() {
54 | return Utils.unmodifiableMap(userMetadata);
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/OutputLocation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2021 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.util.Objects;
20 | import javax.annotation.Nonnull;
21 | import org.simpleframework.xml.Element;
22 | import org.simpleframework.xml.Root;
23 |
24 | /** Helper class to denote output location information of {@link RestoreRequest}. */
25 | @Root(name = "OutputLocation")
26 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
27 | public class OutputLocation {
28 | @Element(name = "S3")
29 | private S3OutputLocation s3OutputLocation;
30 |
31 | public OutputLocation(@Nonnull S3OutputLocation s3OutputLocation) {
32 | this.s3OutputLocation =
33 | Objects.requireNonNull(s3OutputLocation, "S3OutputLocation must not be null");
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Owner.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2015 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /**
23 | * Helper class to denote owner information for {@link ListAllMyBucketsResult}, {@link
24 | * ListBucketResultV1}, {@link ListBucketResultV2}, {@link ListVersionsResult}, {@link
25 | * ListMultipartUploadsResult} and {@link ListPartsResult}.
26 | */
27 | @Root(name = "Owner", strict = false)
28 | public class Owner {
29 | @Element(name = "ID", required = false)
30 | private String id;
31 |
32 | @Element(name = "DisplayName", required = false)
33 | private String displayName;
34 |
35 | public Owner() {}
36 |
37 | /** Returns owner ID. */
38 | public String id() {
39 | return id;
40 | }
41 |
42 | /** Returns owner display name. */
43 | public String displayName() {
44 | return displayName;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/ParquetInputSerialization.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2019 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Root;
20 |
21 | /**
22 | * Helper class to denote Parquet input serialization request XML as per {@link
23 | * SelectObjectContentRequest}.
24 | */
25 | @Root(name = "Parquet")
26 | public class ParquetInputSerialization {}
27 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Permission.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2021 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Root;
20 |
21 | /** Permission represents type of grantee. */
22 | @Root(name = "Permission")
23 | public enum Permission {
24 | FULL_CONTROL,
25 | WRITE,
26 | WRITE_ACP,
27 | READ,
28 | READ_ACP;
29 | }
30 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Prefix.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2015 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /**
23 | * Helper class to denote Prefix information in {@link ListBucketResultV1}, {@link
24 | * ListBucketResultV2} and {@link ListVersionsResult}.
25 | */
26 | @Root(name = "CommonPrefixes", strict = false)
27 | public class Prefix {
28 | @Element(name = "Prefix")
29 | private String prefix;
30 |
31 | public Prefix() {}
32 |
33 | public Item toItem() {
34 | return new Contents(prefix);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/PrefixConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.convert.Converter;
20 | import org.simpleframework.xml.stream.InputNode;
21 | import org.simpleframework.xml.stream.OutputNode;
22 |
23 | /**
24 | * XML converter class for prefix due to SimpleXML limitation in converting empty tag
25 | * to empty string.
26 | */
27 | public class PrefixConverter implements Converter {
28 | @Override
29 | public String read(InputNode node) throws Exception {
30 | String value = node.getValue();
31 | return value != null ? value : "";
32 | }
33 |
34 | @Override
35 | public void write(OutputNode node, String prefix) throws Exception {
36 | node.setValue(prefix);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Progress.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Namespace;
20 | import org.simpleframework.xml.Root;
21 |
22 | /** Helper class to denote Progress information of S3 select response message. */
23 | @Root(name = "Progress", strict = false)
24 | @Namespace(reference = "http://s3.amazonaws.com/doc/2006-03-01/")
25 | public class Progress extends Stats {}
26 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/QueueConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2017 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /** Helper class to denote Queue configuration of {@link NotificationConfiguration}. */
23 | @Root(name = "QueueConfiguration", strict = false)
24 | public class QueueConfiguration extends NotificationCommonConfiguration {
25 | @Element(name = "Queue")
26 | private String queue;
27 |
28 | public QueueConfiguration() {
29 | super();
30 | }
31 |
32 | /** Returns queue. */
33 | public String queue() {
34 | return queue;
35 | }
36 |
37 | /** Sets queue. */
38 | public void setQueue(String queue) {
39 | this.queue = queue;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/QuoteFields.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2019 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | /** Indicates whether to use quotation marks around output fields. */
20 | public enum QuoteFields {
21 | ALWAYS,
22 | ASNEEDED;
23 | }
24 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/ReplicaModifications.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2022 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.util.Objects;
20 | import javax.annotation.Nonnull;
21 | import org.simpleframework.xml.Element;
22 | import org.simpleframework.xml.Root;
23 |
24 | /** Helper class to denote replica modifications information for {@link SourceSelectionCriteria}. */
25 | @Root(name = "ReplicaModifications")
26 | public class ReplicaModifications {
27 | @Element(name = "Status")
28 | private Status status;
29 |
30 | public ReplicaModifications(@Nonnull @Element(name = "Status") Status status) {
31 | this.status = Objects.requireNonNull(status, "Status must not be null");
32 | }
33 |
34 | public Status status() {
35 | return this.status;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/ReplicationTime.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.util.Objects;
20 | import javax.annotation.Nonnull;
21 | import org.simpleframework.xml.Element;
22 | import org.simpleframework.xml.Root;
23 |
24 | /** Helper class to denote replication time information for {@link ReplicationDestination}. */
25 | @Root(name = "ReplicationTime")
26 | public class ReplicationTime {
27 | @Element(name = "Time")
28 | private ReplicationTimeValue time;
29 |
30 | @Element(name = "Status")
31 | private Status status;
32 |
33 | public ReplicationTime(
34 | @Nonnull @Element(name = "Time") ReplicationTimeValue time,
35 | @Nonnull @Element(name = "Status") Status status) {
36 | this.time = Objects.requireNonNull(time, "Time must not be null");
37 | this.status = Objects.requireNonNull(status, "Status must not be null");
38 | }
39 |
40 | public ReplicationTimeValue time() {
41 | return this.time;
42 | }
43 |
44 | public Status status() {
45 | return this.status;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/ReplicationTimeValue.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import javax.annotation.Nullable;
20 | import org.simpleframework.xml.Element;
21 | import org.simpleframework.xml.Root;
22 |
23 | /** Helper class to denote replication time value information for {@link Metrics}. */
24 | @Root(name = "ReplicationTimeValue")
25 | public class ReplicationTimeValue {
26 | @Element(name = "Minutes", required = false)
27 | private Integer minutes = 15;
28 |
29 | public ReplicationTimeValue(
30 | @Nullable @Element(name = "Minutes", required = false) Integer minutes) {
31 | this.minutes = minutes;
32 | }
33 |
34 | public Integer minutes() {
35 | return this.minutes;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/RequestProgress.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2019 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /**
23 | * Helper class to denote progress request in select object content request XML for {@link
24 | * SelectObjectContentRequest}.
25 | */
26 | @Root(name = "RequestProgress", strict = false)
27 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
28 | public class RequestProgress {
29 | @Element(name = "Enabled")
30 | private boolean enabled = true;
31 |
32 | /** Constructs a new RequestProgress object. */
33 | public RequestProgress() {}
34 | }
35 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/RetentionDuration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | /** Retention duration of {@link ObjectLockConfiguration} */
20 | public interface RetentionDuration {
21 | public RetentionDurationUnit unit();
22 |
23 | public int duration();
24 | }
25 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/RetentionDurationDays.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Root;
20 | import org.simpleframework.xml.Text;
21 |
22 | /** Days type retention duration of {@link ObjectLockConfiguration} */
23 | @Root(name = "Days")
24 | public class RetentionDurationDays implements RetentionDuration {
25 | @Text(required = false)
26 | private Integer days;
27 |
28 | public RetentionDurationDays() {}
29 |
30 | public RetentionDurationDays(int days) {
31 | this.days = Integer.valueOf(days);
32 | }
33 |
34 | public RetentionDurationUnit unit() {
35 | return RetentionDurationUnit.DAYS;
36 | }
37 |
38 | public int duration() {
39 | return days;
40 | }
41 |
42 | /** Returns RetentionDurationDays as string. */
43 | @Override
44 | public String toString() {
45 | if (days == null) {
46 | return "";
47 | }
48 | return days.toString() + ((days == 1) ? " day" : " days");
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/RetentionDurationUnit.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | /** Duration unit of default retention configuration. */
20 | public enum RetentionDurationUnit {
21 | DAYS,
22 | YEARS;
23 | }
24 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/RetentionDurationYears.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Root;
20 | import org.simpleframework.xml.Text;
21 |
22 | /** Years type retention duration of {@link ObjectLockConfiguration} */
23 | @Root(name = "Years")
24 | public class RetentionDurationYears implements RetentionDuration {
25 | @Text(required = false)
26 | private Integer years;
27 |
28 | public RetentionDurationYears() {}
29 |
30 | public RetentionDurationYears(int years) {
31 | this.years = Integer.valueOf(years);
32 | }
33 |
34 | public RetentionDurationUnit unit() {
35 | return RetentionDurationUnit.YEARS;
36 | }
37 |
38 | public int duration() {
39 | return years;
40 | }
41 |
42 | /** Returns RetentionDurationYears as string. */
43 | @Override
44 | public String toString() {
45 | if (years == null) {
46 | return "";
47 | }
48 | return years.toString() + ((years == 1) ? " year" : " years");
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/RetentionMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2019 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | /** Retention mode for the specified object. */
20 | public enum RetentionMode {
21 | GOVERNANCE,
22 | COMPLIANCE;
23 | }
24 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/ScanRange.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2019 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /**
23 | * Helper class to denote scan range in select object content request XML for {@link
24 | * SelectObjectContentRequest}.
25 | */
26 | @Root(name = "ScanRange")
27 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
28 | public class ScanRange {
29 | @Element(name = "Start", required = false)
30 | private Long start;
31 |
32 | @Element(name = "End", required = false)
33 | private Long end;
34 |
35 | /** Constructs new ScanRange object for given start and end. */
36 | public ScanRange(Long start, Long end) {
37 | this.start = start;
38 | this.end = end;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/SelectObjectContentRequestBase.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2021 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.util.Objects;
20 | import javax.annotation.Nonnull;
21 | import org.simpleframework.xml.Element;
22 |
23 | /** Base class for {@link SelectObjectContentRequest} and {@link SelectParameters}. */
24 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
25 | public abstract class SelectObjectContentRequestBase {
26 | @Element(name = "Expression")
27 | private String expression;
28 |
29 | @Element(name = "ExpressionType")
30 | private String expressionType = "SQL";
31 |
32 | @Element(name = "InputSerialization")
33 | private InputSerialization inputSerialization;
34 |
35 | @Element(name = "OutputSerialization")
36 | private OutputSerialization outputSerialization;
37 |
38 | public SelectObjectContentRequestBase(
39 | @Nonnull String expression, @Nonnull InputSerialization is, @Nonnull OutputSerialization os) {
40 | this.expression = Objects.requireNonNull(expression, "Expression must not be null");
41 | this.inputSerialization = Objects.requireNonNull(is, "InputSerialization must not be null");
42 | this.outputSerialization = Objects.requireNonNull(os, "OutputSerialization must not be null");
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/SelectParameters.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2021 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import javax.annotation.Nonnull;
20 | import org.simpleframework.xml.Root;
21 |
22 | /**
23 | * Helper class to denote the parameters for Select job types information of {@link RestoreRequest}.
24 | */
25 | @Root(name = "SelectParameters")
26 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
27 | public class SelectParameters extends SelectObjectContentRequestBase {
28 | public SelectParameters(
29 | @Nonnull String expression, @Nonnull InputSerialization is, @Nonnull OutputSerialization os) {
30 | super(expression, is, os);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Source.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2020 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package io.minio.messages;
19 |
20 | import com.fasterxml.jackson.annotation.JsonProperty;
21 |
22 | /**
23 | * Helper class to denote client information causes this event. This is MinIO extension to Event
25 | * Message Structure
26 | */
27 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(
28 | value = "UwF",
29 | justification = "Everything in this class is initialized by JSON unmarshalling.")
30 | public class Source {
31 | @JsonProperty private String host;
32 | @JsonProperty private String port;
33 | @JsonProperty private String userAgent;
34 |
35 | public String host() {
36 | return host;
37 | }
38 |
39 | public String port() {
40 | return port;
41 | }
42 |
43 | public String userAgent() {
44 | return userAgent;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/SseKmsEncryptedObjects.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.util.Objects;
20 | import javax.annotation.Nonnull;
21 | import org.simpleframework.xml.Element;
22 | import org.simpleframework.xml.Root;
23 |
24 | /**
25 | * Helper class to denote SSE KMS encrypted objects information for {@link SourceSelectionCriteria}.
26 | */
27 | @Root(name = "SseKmsEncryptedObjects")
28 | public class SseKmsEncryptedObjects {
29 | @Element(name = "Status")
30 | private Status status;
31 |
32 | public SseKmsEncryptedObjects(@Nonnull @Element(name = "Status") Status status) {
33 | this.status = Objects.requireNonNull(status, "Status must not be null");
34 | }
35 |
36 | public Status status() {
37 | return this.status;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Stats.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2019 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Namespace;
21 | import org.simpleframework.xml.Root;
22 |
23 | /** Helper class to denote Stats information of S3 select response message. */
24 | @Root(name = "Stats", strict = false)
25 | @Namespace(reference = "http://s3.amazonaws.com/doc/2006-03-01/")
26 | public class Stats {
27 | @Element(name = "BytesScanned")
28 | private long bytesScanned = -1;
29 |
30 | @Element(name = "BytesProcessed")
31 | private long bytesProcessed = -1;
32 |
33 | @Element(name = "BytesReturned")
34 | private long bytesReturned = -1;
35 |
36 | /** Constructs a new Stats object. */
37 | public Stats() {}
38 |
39 | /** Returns bytes scanned. */
40 | public long bytesScanned() {
41 | return this.bytesScanned;
42 | }
43 |
44 | /** Returns bytes processed. */
45 | public long bytesProcessed() {
46 | return this.bytesProcessed;
47 | }
48 |
49 | /** Returns bytes returned. */
50 | public long bytesReturned() {
51 | return this.bytesReturned;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Tag.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import java.util.Objects;
20 | import javax.annotation.Nonnull;
21 | import org.simpleframework.xml.Element;
22 | import org.simpleframework.xml.Root;
23 |
24 | /** Helper class to denote tag information for {@link RuleFilter}. */
25 | @Root(name = "Tag")
26 | public class Tag {
27 | @Element(name = "Key")
28 | private String key;
29 |
30 | @Element(name = "Value")
31 | private String value;
32 |
33 | public Tag(
34 | @Nonnull @Element(name = "Key") String key, @Nonnull @Element(name = "Value") String value) {
35 | Objects.requireNonNull(key, "Key must not be null");
36 | if (key.isEmpty()) {
37 | throw new IllegalArgumentException("Key must not be empty");
38 | }
39 |
40 | this.key = key;
41 | this.value = Objects.requireNonNull(value, "Value must not be null");
42 | }
43 |
44 | public String key() {
45 | return this.key;
46 | }
47 |
48 | public String value() {
49 | return this.value;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/TopicConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2017 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Element;
20 | import org.simpleframework.xml.Root;
21 |
22 | /** Helper class to denote Topic configuration of {@link NotificationConfiguration}. */
23 | @Root(name = "TopicConfiguration", strict = false)
24 | public class TopicConfiguration extends NotificationCommonConfiguration {
25 | @Element(name = "Topic")
26 | private String topic;
27 |
28 | public TopicConfiguration() {
29 | super();
30 | }
31 |
32 | /** Returns topic. */
33 | public String topic() {
34 | return topic;
35 | }
36 |
37 | /** Sets topic. */
38 | public void setTopic(String topic) {
39 | this.topic = topic;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/UserMetadata.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2021 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import io.minio.Utils;
20 | import java.util.Map;
21 | import java.util.Objects;
22 | import javax.annotation.Nonnull;
23 | import org.simpleframework.xml.ElementMap;
24 | import org.simpleframework.xml.Namespace;
25 | import org.simpleframework.xml.Root;
26 |
27 | /** Helper class to denote user metadata information of {@link S3OutputLocation}. */
28 | @Root(name = "UserMetadata", strict = false)
29 | @Namespace(reference = "http://s3.amazonaws.com/doc/2006-03-01/")
30 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
31 | public class UserMetadata {
32 | @ElementMap(
33 | attribute = false,
34 | entry = "MetadataEntry",
35 | inline = true,
36 | key = "Name",
37 | value = "Value",
38 | required = false)
39 | Map metadataEntries;
40 |
41 | private UserMetadata(@Nonnull Map metadataEntries) {
42 | Objects.requireNonNull(metadataEntries, "Metadata entries must not be null");
43 | if (metadataEntries.size() == 0) {
44 | throw new IllegalArgumentException("Metadata entries must not be empty");
45 | }
46 | this.metadataEntries = Utils.unmodifiableMap(metadataEntries);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/api/src/main/java/io/minio/messages/Version.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.minio.messages;
18 |
19 | import org.simpleframework.xml.Root;
20 |
21 | /** Helper class to denote object and it's version information in {@link ListVersionsResult}. */
22 | @Root(name = "Version", strict = false)
23 | public class Version extends Item {
24 | public Version() {
25 | super();
26 | }
27 |
28 | public Version(String prefix) {
29 | super(prefix);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/docs/zh_CN/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # 贡献者指南
2 | * Fork minio-java.
3 | * 创建你的分支 (`$ git checkout -b my-new-feature`)。
4 | * 敲代码,敲代码...
5 | * Commit你的修改(`$ git commit -am 'Add some feature'`)。
6 | * 构建测试包 (`$ ./gradlew build`)。
7 | * 功能测试 (`$ ./gradlew runFunctionalTest`)。
8 | * Push到你的分支 (`$ git push origin my-new-feature`)。
9 | * 创建一个Pull Request。
10 |
--------------------------------------------------------------------------------
/examples/GetObjectResume.java:
--------------------------------------------------------------------------------
1 | import com.google.common.io.ByteStreams;
2 | import io.minio.GetObjectArgs;
3 | import io.minio.MinioClient;
4 | import io.minio.StatObjectArgs;
5 | import io.minio.StatObjectResponse;
6 | import java.io.InputStream;
7 | import java.io.OutputStream;
8 | import java.nio.file.Files;
9 | import java.nio.file.Path;
10 | import java.nio.file.Paths;
11 | import java.nio.file.StandardOpenOption;
12 |
13 | public class GetObjectResume {
14 | public static void main(String[] args) throws Exception {
15 | MinioClient minioClient =
16 | MinioClient.builder()
17 | .endpoint("https://play.min.io")
18 | .credentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
19 | .build();
20 |
21 | String filename = "my-objectname";
22 | Path path = Paths.get(filename);
23 | long fileSize = 0;
24 | if (Files.exists(path)) fileSize = Files.size(path);
25 |
26 | StatObjectResponse stat =
27 | minioClient.statObject(
28 | StatObjectArgs.builder().bucket("my-bucketname").object("my-objectname").build());
29 |
30 | if (fileSize == stat.size()) {
31 | // Already fully downloaded.
32 | return;
33 | }
34 |
35 | if (fileSize > stat.size()) {
36 | throw new Exception("stored file size is greater than object size");
37 | }
38 |
39 | InputStream stream =
40 | minioClient.getObject(
41 | GetObjectArgs.builder()
42 | .bucket("my-bucketname")
43 | .object("my-objectname")
44 | .offset(fileSize)
45 | .build());
46 |
47 | try (OutputStream os =
48 | Files.newOutputStream(
49 | path, StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.APPEND)) {
50 | ByteStreams.copy(stream, os);
51 | } finally {
52 | stream.close();
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/examples/MinioClientWithAwsConfigProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | import io.minio.MinioClient;
18 | import io.minio.StatObjectArgs;
19 | import io.minio.StatObjectResponse;
20 | import io.minio.credentials.AwsConfigProvider;
21 | import io.minio.credentials.Provider;
22 |
23 | public class MinioClientWithAwsConfigProvider {
24 | public static void main(String[] args) throws Exception {
25 | Provider provider = new AwsConfigProvider(null, null);
26 |
27 | MinioClient minioClient =
28 | MinioClient.builder()
29 | .endpoint("https://MINIO-HOST:MINIO-PORT")
30 | .credentialsProvider(provider)
31 | .build();
32 |
33 | // Get information of an object.
34 | StatObjectResponse stat =
35 | minioClient.statObject(
36 | StatObjectArgs.builder().bucket("my-bucketname").object("my-objectname").build());
37 | System.out.println(stat);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/examples/MinioClientWithChainedProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | import io.minio.MinioClient;
18 | import io.minio.StatObjectArgs;
19 | import io.minio.StatObjectResponse;
20 | import io.minio.credentials.AwsEnvironmentProvider;
21 | import io.minio.credentials.ChainedProvider;
22 | import io.minio.credentials.MinioEnvironmentProvider;
23 | import io.minio.credentials.Provider;
24 |
25 | public class MinioClientWithChainedProvider {
26 | public static void main(String[] args) throws Exception {
27 | Provider provider =
28 | new ChainedProvider(new AwsEnvironmentProvider(), new MinioEnvironmentProvider());
29 |
30 | MinioClient minioClient =
31 | MinioClient.builder()
32 | .endpoint("https://MINIO-HOST:MINIO-PORT")
33 | .credentialsProvider(provider)
34 | .build();
35 |
36 | // Get information of an object.
37 | StatObjectResponse stat =
38 | minioClient.statObject(
39 | StatObjectArgs.builder().bucket("my-bucketname").object("my-objectname").build());
40 | System.out.println(stat);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/examples/MinioClientWithIamAwsProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | import io.minio.MinioClient;
18 | import io.minio.StatObjectArgs;
19 | import io.minio.StatObjectResponse;
20 | import io.minio.credentials.IamAwsProvider;
21 | import io.minio.credentials.Provider;
22 |
23 | public class MinioClientWithIamAwsProvider {
24 | public static void main(String[] args) throws Exception {
25 | Provider provider = new IamAwsProvider(null, null);
26 |
27 | MinioClient minioClient =
28 | MinioClient.builder()
29 | .endpoint("https://MINIO-HOST:MINIO-PORT")
30 | .credentialsProvider(provider)
31 | .build();
32 |
33 | // Get information of an object.
34 | StatObjectResponse stat =
35 | minioClient.statObject(
36 | StatObjectArgs.builder().bucket("my-bucketname").object("my-objectname").build());
37 | System.out.println(stat);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/examples/MinioClientWithLdapIdentityProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | import io.minio.MinioClient;
18 | import io.minio.StatObjectArgs;
19 | import io.minio.StatObjectResponse;
20 | import io.minio.credentials.LdapIdentityProvider;
21 | import io.minio.credentials.Provider;
22 |
23 | public class MinioClientWithLdapIdentityProvider {
24 | public static void main(String[] args) throws Exception {
25 | // STS endpoint usually point to MinIO server.
26 | String stsEndpoint = "http://STS-HOST:STS-PORT/";
27 |
28 | // LDAP username.
29 | String ldapUsername = "USERNAME";
30 |
31 | // LDAP password.
32 | String ldapPassword = "PASSWORD";
33 |
34 | Provider provider = new LdapIdentityProvider(stsEndpoint, ldapUsername, ldapPassword, null);
35 |
36 | MinioClient minioClient =
37 | MinioClient.builder()
38 | .endpoint("https://MINIO-HOST:MINIO-PORT")
39 | .credentialsProvider(provider)
40 | .build();
41 |
42 | // Get information of an object.
43 | StatObjectResponse stat =
44 | minioClient.statObject(
45 | StatObjectArgs.builder().bucket("my-bucketname").object("my-objectname").build());
46 | System.out.println(stat);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/examples/MinioClientWithMinioClientConfigProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | import io.minio.MinioClient;
18 | import io.minio.StatObjectArgs;
19 | import io.minio.StatObjectResponse;
20 | import io.minio.credentials.MinioClientConfigProvider;
21 | import io.minio.credentials.Provider;
22 |
23 | public class MinioClientWithMinioClientConfigProvider {
24 | public static void main(String[] args) throws Exception {
25 | Provider provider = new MinioClientConfigProvider(null, null);
26 |
27 | MinioClient minioClient =
28 | MinioClient.builder()
29 | .endpoint("https://MINIO-HOST:MINIO-PORT")
30 | .credentialsProvider(provider)
31 | .build();
32 |
33 | // Get information of an object.
34 | StatObjectResponse stat =
35 | minioClient.statObject(
36 | StatObjectArgs.builder().bucket("my-bucketname").object("my-objectname").build());
37 | System.out.println(stat);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/functional/.cfg/certs/private.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC3G9IiC+adjf0p
3 | i/2KYc+4dizeuzUFN7wraSdhiOMdQgCnu9Dc3t2YEsQhNdrARjOTyXd36KeM3TwI
4 | rPJ61dRGQSuN12l+mzngFJQjE0sysZHUJOLQC3rVvIrHSQ57utPg8ifxt/SunlPY
5 | fhcUcq03onMGq44yOfE6mIhoe0Y9wcPQ3RjjNNS44bgmXiXwa+Do0h2hEn6/essq
6 | 5KjHL8WW2vGg7G9edpYdxINA/A2fdLtr8BwPNrZhOx84eee2XcUNdBuTtUUxE+0L
7 | 9yRqItqddriRxJFwOXb5OPW8xx2WGaV2a0wbE4gB2PTwwDvfo72mo9HXHZUHM1A8
8 | 4TD/RXMbAgMBAAECggEBAJ7r1oUWLyGvinn0tijUm6RNbMQjVvEgXoCO008jr3pF
9 | PqxVpgEMrOa/4tmwFBus0jcCNF4t3r2zhddBw3I5A/O1vEdvHnBz6NdDBQ8sP6fP
10 | 1fF50iEe1Y2MBibQkXFxxVMG2QRB1Gt5nuvXA9ELdqtCovK3EsMk5ukkWb/UvjH5
11 | 8hcmQsaSqvzFEF4wJSY2mkeGSGIJTphPhhuA22xbhaBMInQyhZu8EHsn0h6s/Wgy
12 | C4Cp2+4qZTKaaf6x3/ZjJ8CuKiSX+ZsJKjOEv8sqx7j/Y7QFOmJPewInKDhwazr/
13 | xIK+N0KXPbUzeSEz6ZvExNDTxtR5ZlQP2UrRDg28yQECgYEA4Is1O2BvKVzNFOkj
14 | bTVz25a/bb0Xrcfgi0Y9rdfLzlNdItFjAkxLTVRSW2Hv9ICl0RDDAG+wTlktXRdh
15 | rfvDjwG2CvLQo1VEdMWTTkKVg03SwMEy2hFiWV69lENFGSaY8Y6unZDbia5HQinA
16 | EgSS4sCojS+a2jtzG5FVVHJDKlkCgYEA0MKhMhD4SUhr2y1idPBrmLxuW5mVozuW
17 | 8bYaBeSzmfS0BRsN4fP9JGODPBPDdNbfGfGC9ezWLgD/lmCgjIEyBOq8EmqWSsiS
18 | Kihds1+Z7hXtbzGsFGAFJJTIh7blBCsK5QFuyuih2UG0fL9z6K/dy+UUJkzrYqph
19 | vSfKixyM8pMCgYEAmUPLsNyw4325aeV8TeWnUCJERaZFDFQa21W1cfyS2yEhuEtN
20 | llr3JzBACqn9vFk3VU1onNqfb8sE4L696KCpKeqUFEMK0AG6eS4Gzus53Gb5TKJS
21 | kHA/PhshsZp9Bp7G1FJ8s4YVo5N2hh2zQVkn3Wh9Y+kzfHQJrK51nO9lEvkCgYBi
22 | BuKWle1gzAcJdnhDHRoJMIJJtQbVDYhFnBMALXJAmu1lcFzGe0GlMq1PKqCfXr6I
23 | eiXawQmZtJJP1LPPBmOsd2U06KQGHcS00xucvQmVCOrjSdnZ/3SqxsqbH8DOgj+t
24 | ZUzXLwHA+N99rJEK9Hob4kfh7ECjpgobPnIXfKKazQKBgQChAuiXHtf/Qq18hY3u
25 | x48zFWjGgfd6GpOBZYkXOwGdCJgnYjZbE26LZEnYbwPh8ZUA2vp7mgHRJkD5e3Fj
26 | ERuJLCw86WqyYZmLEuBciYGjCZqR5nbavfwsziWD00jeNruds2ZwKxRfFm4V7o2S
27 | WLd/RUatd2Uu9f3B2J78OUdnxg==
28 | -----END PRIVATE KEY-----
29 |
--------------------------------------------------------------------------------
/functional/.cfg/certs/public.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDCzCCAfOgAwIBAgIUaIUOMI78LCu+r1zl0mmFHK8n5/AwDQYJKoZIhvcNAQEL
3 | BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MCAXDTE5MTAyNDE5NTMxOVoYDzIxMTkw
4 | OTMwMTk1MzE5WjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEB
5 | AQUAA4IBDwAwggEKAoIBAQC3G9IiC+adjf0pi/2KYc+4dizeuzUFN7wraSdhiOMd
6 | QgCnu9Dc3t2YEsQhNdrARjOTyXd36KeM3TwIrPJ61dRGQSuN12l+mzngFJQjE0sy
7 | sZHUJOLQC3rVvIrHSQ57utPg8ifxt/SunlPYfhcUcq03onMGq44yOfE6mIhoe0Y9
8 | wcPQ3RjjNNS44bgmXiXwa+Do0h2hEn6/essq5KjHL8WW2vGg7G9edpYdxINA/A2f
9 | dLtr8BwPNrZhOx84eee2XcUNdBuTtUUxE+0L9yRqItqddriRxJFwOXb5OPW8xx2W
10 | GaV2a0wbE4gB2PTwwDvfo72mo9HXHZUHM1A84TD/RXMbAgMBAAGjUzBRMB0GA1Ud
11 | DgQWBBSEWXQ2JRD+OK7/KTmlD+OW16pGmzAfBgNVHSMEGDAWgBSEWXQ2JRD+OK7/
12 | KTmlD+OW16pGmzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCF
13 | 0zYRaabB3X0jzGI9/Lr3Phrb90GvoL1DFLRuiOuTlDkz0vrm/HrZskwHCgMNrkCj
14 | OTD9Vpas4D1QZBbQbRzfnf3OOoG4bgmcCwLFZl3dy27yIDAhrmbUP++g9l1Jmy4v
15 | vBR/M4lt2scQ8LcZYEPqhEaE5EzFQEjtaxDcKdWDNKY9W1NUzSIABhF9eHiAUNdH
16 | AFNJlYeBlCHxcWIeqgon184Dqp/CsvKtz3z3Ni+rlwPM/zuJCFHh1VF+z++0LJjG
17 | roBCV0Tro4XyiEz9yp7Cb5kQYMaj1KL9TqBG0tZx0pmv7y+lXc4TT6DEllXz6USy
18 | rbIba9/uUet3BqeIMTqj
19 | -----END CERTIFICATE-----
20 |
--------------------------------------------------------------------------------
/functional/TestUserAgent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
3 | * (C) 2020 MinIO, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | import io.minio.BucketExistsArgs;
19 | import io.minio.MinioClient;
20 | import java.io.ByteArrayOutputStream;
21 | import java.nio.charset.StandardCharsets;
22 | import java.util.Scanner;
23 |
24 | public class TestUserAgent {
25 | public static void main(String[] args) throws Exception {
26 | MinioClient client = MinioClient.builder().endpoint("http://httpbin.org").build();
27 | ByteArrayOutputStream baos = new ByteArrayOutputStream();
28 | client.traceOn(baos);
29 | client.bucketExists(BucketExistsArgs.builder().bucket("any-bucket-name-works").build());
30 | client.traceOff();
31 |
32 | String expectedVersion = System.getProperty("version");
33 | String version = null;
34 | try (Scanner scanner = new Scanner(new String(baos.toByteArray(), StandardCharsets.UTF_8))) {
35 | while (scanner.hasNextLine()) {
36 | String line = scanner.nextLine();
37 | if (line.startsWith("User-Agent:")) {
38 | version = line.split("/")[1];
39 | break;
40 | }
41 | }
42 | }
43 |
44 | if (!expectedVersion.equals(version)) {
45 | throw new Exception(
46 | "version does not match; expected=" + expectedVersion + ", got=" + version);
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/functional/play.min.io.kes.root.cert:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIBKDCB26ADAgECAhB6vebGMUfKnmBKyqoApRSOMAUGAytlcDAbMRkwFwYDVQQD
3 | DBByb290QHBsYXkubWluLmlvMB4XDTIwMDQzMDE1MjIyNVoXDTI1MDQyOTE1MjIy
4 | NVowGzEZMBcGA1UEAwwQcm9vdEBwbGF5Lm1pbi5pbzAqMAUGAytlcAMhALzn735W
5 | fmSH/ghKs+4iPWziZMmWdiWr/sqvqeW+WwSxozUwMzAOBgNVHQ8BAf8EBAMCB4Aw
6 | EwYDVR0lBAwwCgYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAFBgMrZXADQQDZOrGK
7 | b2ATkDlu2pTcP3LyhSBDpYh7V4TvjRkBTRgjkacCzwFLm+mh+7US8V4dBpIDsJ4u
8 | uWoF0y6vbLVGIlkG
9 | -----END CERTIFICATE-----
10 |
--------------------------------------------------------------------------------
/functional/play.min.io.kes.root.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MC4CAQAwBQYDK2VwBCIEID9E7FSYWrMD+VjhI6q545cYT9YOyFxZb7UnjEepYDRc
3 | -----END PRIVATE KEY-----
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minio/minio-java/3835bee80ece65e2ed32db2027c8b74e346e3ef1/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include 'adminapi', 'api', 'examples', 'functional'
2 |
--------------------------------------------------------------------------------
/spotbugs-filter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------