├── .gitignore ├── .pre-commit-config.yaml ├── .secrets.baseline ├── .whitesource ├── CHANGELOG.md ├── LICENSE.txt ├── NOTICE.txt ├── README.md ├── build.properties ├── ibm-cos-java-sdk-bom ├── build.properties └── pom.xml ├── ibm-cos-java-sdk-bundle ├── .gitignore ├── build.properties └── pom.xml ├── ibm-cos-java-sdk-core ├── .gitignore ├── build.properties ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── ibm │ │ │ └── cloud │ │ │ └── objectstorage │ │ │ ├── AbortedException.java │ │ │ ├── AmazonClientException.java │ │ │ ├── AmazonServiceException.java │ │ │ ├── AmazonWebServiceClient.java │ │ │ ├── AmazonWebServiceRequest.java │ │ │ ├── AmazonWebServiceResponse.java │ │ │ ├── AmazonWebServiceResult.java │ │ │ ├── ApacheHttpClientConfig.java │ │ │ ├── ClientConfiguration.java │ │ │ ├── ClientConfigurationFactory.java │ │ │ ├── DefaultRequest.java │ │ │ ├── DnsResolver.java │ │ │ ├── HandlerContextAware.java │ │ │ ├── HttpMethod.java │ │ │ ├── ImmutableRequest.java │ │ │ ├── PredefinedClientConfigurations.java │ │ │ ├── Protocol.java │ │ │ ├── ProxyAuthenticationMethod.java │ │ │ ├── ReadLimitInfo.java │ │ │ ├── Request.java │ │ │ ├── RequestClientOptions.java │ │ │ ├── RequestConfig.java │ │ │ ├── ResetException.java │ │ │ ├── Response.java │ │ │ ├── ResponseMetadata.java │ │ │ ├── SDKGlobalConfiguration.java │ │ │ ├── SDKGlobalTime.java │ │ │ ├── SdkBaseException.java │ │ │ ├── SdkClientException.java │ │ │ ├── ServiceNameFactory.java │ │ │ ├── SignableRequest.java │ │ │ ├── SystemDefaultDnsResolver.java │ │ │ ├── adapters │ │ │ └── types │ │ │ │ ├── StringToByteBufferAdapter.java │ │ │ │ ├── StringToInputStreamAdapter.java │ │ │ │ └── TypeAdapter.java │ │ │ ├── annotation │ │ │ ├── Beta.java │ │ │ ├── ExcludeDoclet.java │ │ │ ├── GuardedBy.java │ │ │ ├── Immutable.java │ │ │ ├── NotThreadSafe.java │ │ │ ├── SdkInternalApi.java │ │ │ ├── SdkProtectedApi.java │ │ │ ├── SdkTestInternalApi.java │ │ │ ├── ThreadSafe.java │ │ │ └── package-info.java │ │ │ ├── arn │ │ │ ├── Arn.java │ │ │ ├── ArnConverter.java │ │ │ ├── ArnResource.java │ │ │ └── AwsResource.java │ │ │ ├── auth │ │ │ ├── AWS3Signer.java │ │ │ ├── AWS4Signer.java │ │ │ ├── AWS4UnsignedPayloadSigner.java │ │ │ ├── AWSCredentials.java │ │ │ ├── AWSCredentialsProvider.java │ │ │ ├── AWSCredentialsProviderChain.java │ │ │ ├── AWSRefreshableSessionCredentials.java │ │ │ ├── AWSSessionCredentials.java │ │ │ ├── AWSSessionCredentialsProvider.java │ │ │ ├── AWSStaticCredentialsProvider.java │ │ │ ├── AbstractAWSSigner.java │ │ │ ├── AnonymousAWSCredentials.java │ │ │ ├── BaseCredentialsFetcher.java │ │ │ ├── BasicAWSCredentials.java │ │ │ ├── BasicSessionCredentials.java │ │ │ ├── CanHandleNullCredentials.java │ │ │ ├── ClasspathJsonFileCredentialsProvider.java │ │ │ ├── ClasspathPropertiesFileCredentialsProvider.java │ │ │ ├── ContainerCredentialsFetcher.java │ │ │ ├── ContainerCredentialsProvider.java │ │ │ ├── ContainerCredentialsRetryPolicy.java │ │ │ ├── DefaultAWSCredentialsProviderChain.java │ │ │ ├── EC2ContainerCredentialsProviderWrapper.java │ │ │ ├── EnvironmentVariableCredentialsProvider.java │ │ │ ├── InstanceMetadataServiceCredentialsFetcher.java │ │ │ ├── InstanceProfileCredentialsProvider.java │ │ │ ├── JsonCredentials.java │ │ │ ├── JsonFileCredentialsProvider.java │ │ │ ├── NoOpSigner.java │ │ │ ├── Presigner.java │ │ │ ├── PropertiesCredentials.java │ │ │ ├── PropertiesFileCredentialsProvider.java │ │ │ ├── QueryStringSigner.java │ │ │ ├── RegionAwareSigner.java │ │ │ ├── RegionFromEndpointResolverAwareSigner.java │ │ │ ├── RequestSigner.java │ │ │ ├── SdkClock.java │ │ │ ├── ServiceAwareSigner.java │ │ │ ├── SignatureVersion.java │ │ │ ├── Signer.java │ │ │ ├── SignerAsRequestSigner.java │ │ │ ├── SignerFactory.java │ │ │ ├── SignerParams.java │ │ │ ├── SignerTypeAware.java │ │ │ ├── SigningAlgorithm.java │ │ │ ├── StaticSignerProvider.java │ │ │ ├── SystemPropertiesCredentialsProvider.java │ │ │ ├── WebIdentityTokenCredentialsProvider.java │ │ │ ├── internal │ │ │ │ ├── AWS4SignerRequestParams.java │ │ │ │ ├── AWS4SignerUtils.java │ │ │ │ ├── SignerConstants.java │ │ │ │ └── SignerKey.java │ │ │ ├── json │ │ │ │ ├── BasicJsonConfigLoader.java │ │ │ │ ├── JsonConfigFile.java │ │ │ │ ├── JsonCredentialsProvider.java │ │ │ │ └── internal │ │ │ │ │ ├── JsonKeyConstants.java │ │ │ │ │ └── JsonStaticCredentialsProvider.java │ │ │ ├── policy │ │ │ │ ├── Action.java │ │ │ │ ├── Condition.java │ │ │ │ ├── Policy.java │ │ │ │ ├── PolicyReaderOptions.java │ │ │ │ ├── Principal.java │ │ │ │ ├── Resource.java │ │ │ │ ├── Statement.java │ │ │ │ ├── actions │ │ │ │ │ └── package-info.java │ │ │ │ ├── conditions │ │ │ │ │ ├── ArnCondition.java │ │ │ │ │ ├── BooleanCondition.java │ │ │ │ │ ├── ConditionFactory.java │ │ │ │ │ ├── DateCondition.java │ │ │ │ │ ├── IpAddressCondition.java │ │ │ │ │ ├── NumericCondition.java │ │ │ │ │ ├── StringCondition.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── internal │ │ │ │ │ ├── JsonDocumentFields.java │ │ │ │ │ ├── JsonPolicyReader.java │ │ │ │ │ └── JsonPolicyWriter.java │ │ │ │ ├── package-info.java │ │ │ │ └── resources │ │ │ │ │ └── package-info.java │ │ │ ├── presign │ │ │ │ ├── PresignerFacade.java │ │ │ │ └── PresignerParams.java │ │ │ └── profile │ │ │ │ ├── ProfileCredentialsProvider.java │ │ │ │ ├── ProfilesConfigFile.java │ │ │ │ ├── ProfilesConfigFileWriter.java │ │ │ │ ├── internal │ │ │ │ ├── AbstractProfilesConfigFileScanner.java │ │ │ │ ├── AllProfiles.java │ │ │ │ ├── AwsProfileNameLoader.java │ │ │ │ ├── BasicProfile.java │ │ │ │ ├── BasicProfileConfigFileLoader.java │ │ │ │ ├── BasicProfileConfigLoader.java │ │ │ │ ├── Profile.java │ │ │ │ ├── ProfileAssumeRoleCredentialsProvider.java │ │ │ │ ├── ProfileKeyConstants.java │ │ │ │ ├── ProfileStaticCredentialsProvider.java │ │ │ │ └── securitytoken │ │ │ │ │ ├── ProfileCredentialsService.java │ │ │ │ │ ├── RoleInfo.java │ │ │ │ │ ├── STSProfileCredentialsServiceLoader.java │ │ │ │ │ └── STSProfileCredentialsServiceProvider.java │ │ │ │ └── package-info.java │ │ │ ├── client │ │ │ ├── AwsAsyncClientParams.java │ │ │ ├── AwsSyncClientParams.java │ │ │ ├── ClientExecutionParams.java │ │ │ ├── ClientHandler.java │ │ │ ├── ClientHandlerImpl.java │ │ │ ├── ClientHandlerParams.java │ │ │ └── builder │ │ │ │ ├── AdvancedConfig.java │ │ │ │ ├── AwsAsyncClientBuilder.java │ │ │ │ ├── AwsClientBuilder.java │ │ │ │ ├── AwsSyncClientBuilder.java │ │ │ │ └── ExecutorFactory.java │ │ │ ├── event │ │ │ ├── DeliveryMode.java │ │ │ ├── ProgressEvent.java │ │ │ ├── ProgressEventFilter.java │ │ │ ├── ProgressEventType.java │ │ │ ├── ProgressInputStream.java │ │ │ ├── ProgressListener.java │ │ │ ├── ProgressListenerChain.java │ │ │ ├── ProgressTracker.java │ │ │ ├── RequestProgressInputStream.java │ │ │ ├── ResponseProgressInputStream.java │ │ │ ├── SDKProgressPublisher.java │ │ │ ├── SyncProgressListener.java │ │ │ └── request │ │ │ │ ├── Progress.java │ │ │ │ └── ProgressSupport.java │ │ │ ├── handlers │ │ │ ├── AbstractRequestHandler.java │ │ │ ├── AsyncHandler.java │ │ │ ├── CredentialsRequestHandler.java │ │ │ ├── HandlerAfterAttemptContext.java │ │ │ ├── HandlerBeforeAttemptContext.java │ │ │ ├── HandlerChainFactory.java │ │ │ ├── HandlerContextKey.java │ │ │ ├── IRequestHandler2.java │ │ │ ├── RequestHandler.java │ │ │ ├── RequestHandler2.java │ │ │ ├── RequestHandler2Adaptor.java │ │ │ └── StackedRequestHandler.java │ │ │ ├── http │ │ │ ├── AbstractFileTlsKeyManagersProvider.java │ │ │ ├── AmazonHttpClient.java │ │ │ ├── AwsErrorResponseHandler.java │ │ │ ├── DefaultErrorResponseHandler.java │ │ │ ├── DelegatingDnsResolver.java │ │ │ ├── ExecutionContext.java │ │ │ ├── FileStoreTlsKeyManagersProvider.java │ │ │ ├── HttpMethodName.java │ │ │ ├── HttpResponse.java │ │ │ ├── HttpResponseHandler.java │ │ │ ├── IdleConnectionReaper.java │ │ │ ├── JsonErrorResponseHandler.java │ │ │ ├── JsonResponseHandler.java │ │ │ ├── NoneTlsKeyManagersProvider.java │ │ │ ├── RepeatableInputStreamRequestEntity.java │ │ │ ├── SdkHttpMetadata.java │ │ │ ├── StaxResponseHandler.java │ │ │ ├── SystemPropertyTlsKeyManagersProvider.java │ │ │ ├── TlsKeyManagersProvider.java │ │ │ ├── UnreliableTestConfig.java │ │ │ ├── apache │ │ │ │ ├── SdkProxyRoutePlanner.java │ │ │ │ ├── client │ │ │ │ │ └── impl │ │ │ │ │ │ ├── ApacheConnectionManagerFactory.java │ │ │ │ │ │ ├── ApacheHttpClientFactory.java │ │ │ │ │ │ ├── CRC32ChecksumResponseInterceptor.java │ │ │ │ │ │ ├── ConnectionManagerAwareHttpClient.java │ │ │ │ │ │ └── SdkHttpClient.java │ │ │ │ ├── request │ │ │ │ │ └── impl │ │ │ │ │ │ ├── ApacheHttpRequestFactory.java │ │ │ │ │ │ └── HttpGetWithBody.java │ │ │ │ └── utils │ │ │ │ │ ├── ApacheUtils.java │ │ │ │ │ └── HttpContextUtils.java │ │ │ ├── client │ │ │ │ ├── ConnectionManagerFactory.java │ │ │ │ └── HttpClientFactory.java │ │ │ ├── conn │ │ │ │ ├── ClientConnectionManagerFactory.java │ │ │ │ ├── ClientConnectionRequestFactory.java │ │ │ │ ├── SdkConnectionKeepAliveStrategy.java │ │ │ │ ├── SdkPlainSocketFactory.java │ │ │ │ ├── Wrapped.java │ │ │ │ └── ssl │ │ │ │ │ ├── MasterSecretValidators.java │ │ │ │ │ ├── SdkTLSSocketFactory.java │ │ │ │ │ ├── ShouldClearSslSessionPredicate.java │ │ │ │ │ ├── TLSProtocol.java │ │ │ │ │ └── privileged │ │ │ │ │ └── PrivilegedMasterSecretValidator.java │ │ │ ├── exception │ │ │ │ └── HttpRequestTimeoutException.java │ │ │ ├── impl │ │ │ │ └── client │ │ │ │ │ ├── HttpRequestNoRetryHandler.java │ │ │ │ │ └── SdkHttpRequestRetryHandler.java │ │ │ ├── protocol │ │ │ │ └── SdkHttpRequestExecutor.java │ │ │ ├── request │ │ │ │ └── HttpRequestFactory.java │ │ │ ├── response │ │ │ │ └── AwsResponseHandlerAdapter.java │ │ │ ├── settings │ │ │ │ └── HttpClientSettings.java │ │ │ └── timers │ │ │ │ ├── TimeoutThreadPoolBuilder.java │ │ │ │ ├── client │ │ │ │ ├── ClientExecutionAbortTask.java │ │ │ │ ├── ClientExecutionAbortTaskImpl.java │ │ │ │ ├── ClientExecutionAbortTrackerTask.java │ │ │ │ ├── ClientExecutionAbortTrackerTaskImpl.java │ │ │ │ ├── ClientExecutionTimeoutException.java │ │ │ │ ├── ClientExecutionTimer.java │ │ │ │ ├── NoOpClientExecutionAbortTrackerTask.java │ │ │ │ └── SdkInterruptedException.java │ │ │ │ ├── package-info.java │ │ │ │ └── request │ │ │ │ ├── HttpRequestAbortTask.java │ │ │ │ ├── HttpRequestAbortTaskImpl.java │ │ │ │ ├── HttpRequestAbortTaskTracker.java │ │ │ │ ├── HttpRequestAbortTaskTrackerImpl.java │ │ │ │ ├── HttpRequestTimer.java │ │ │ │ └── NoOpHttpRequestAbortTaskTracker.java │ │ │ ├── internal │ │ │ ├── AmazonWebServiceRequestAdapter.java │ │ │ ├── BoundedLinkedHashMap.java │ │ │ ├── CRC32MismatchException.java │ │ │ ├── ConnectionUtils.java │ │ │ ├── CredentialsEndpointProvider.java │ │ │ ├── CustomBackoffStrategy.java │ │ │ ├── DateTimeJsonSerializer.java │ │ │ ├── DefaultServiceEndpointBuilder.java │ │ │ ├── DelegateInputStream.java │ │ │ ├── DelegateSSLSocket.java │ │ │ ├── DelegateSocket.java │ │ │ ├── DynamoDBBackoffStrategy.java │ │ │ ├── EC2MetadataClient.java │ │ │ ├── EC2ResourceFetcher.java │ │ │ ├── ExceptionUtils.java │ │ │ ├── FIFOCache.java │ │ │ ├── IdentityEndpointBuilder.java │ │ │ ├── InputShutdownCheckingSslSocket.java │ │ │ ├── InstanceMetadataServiceResourceFetcher.java │ │ │ ├── ListWithAutoConstructFlag.java │ │ │ ├── MetricAware.java │ │ │ ├── MetricsInputStream.java │ │ │ ├── Releasable.java │ │ │ ├── ReleasableInputStream.java │ │ │ ├── ResettableInputStream.java │ │ │ ├── SdkBufferedInputStream.java │ │ │ ├── SdkDigestInputStream.java │ │ │ ├── SdkFilterInputStream.java │ │ │ ├── SdkFilterOutputStream.java │ │ │ ├── SdkFunction.java │ │ │ ├── SdkIOUtils.java │ │ │ ├── SdkInputStream.java │ │ │ ├── SdkInternalList.java │ │ │ ├── SdkInternalMap.java │ │ │ ├── SdkMetricsSocket.java │ │ │ ├── SdkPredicate.java │ │ │ ├── SdkRequestRetryHeaderProvider.java │ │ │ ├── SdkSSLContext.java │ │ │ ├── SdkSSLMetricsSocket.java │ │ │ ├── SdkSSLSocket.java │ │ │ ├── SdkSocket.java │ │ │ ├── SdkThreadLocalsRegistry.java │ │ │ ├── ServiceEndpointBuilder.java │ │ │ ├── StaticCredentialsProvider.java │ │ │ ├── TokenBucket.java │ │ │ ├── auth │ │ │ │ ├── DefaultSignerProvider.java │ │ │ │ ├── NoOpSignerProvider.java │ │ │ │ ├── SignerProvider.java │ │ │ │ └── SignerProviderContext.java │ │ │ ├── config │ │ │ │ ├── Builder.java │ │ │ │ ├── HostRegexToRegionMapping.java │ │ │ │ ├── HostRegexToRegionMappingJsonHelper.java │ │ │ │ ├── HttpClientConfig.java │ │ │ │ ├── HttpClientConfigJsonHelper.java │ │ │ │ ├── InternalConfig.java │ │ │ │ ├── InternalConfigJsonHelper.java │ │ │ │ ├── JsonIndex.java │ │ │ │ ├── SignerConfig.java │ │ │ │ └── SignerConfigJsonHelper.java │ │ │ └── http │ │ │ │ ├── CompositeErrorCodeParser.java │ │ │ │ ├── ErrorCodeParser.java │ │ │ │ ├── IonErrorCodeParser.java │ │ │ │ ├── JsonErrorCodeParser.java │ │ │ │ └── JsonErrorMessageParser.java │ │ │ ├── jmx │ │ │ ├── JmxInfoProviderSupport.java │ │ │ ├── MBeans.java │ │ │ ├── SdkMBeanRegistrySupport.java │ │ │ └── spi │ │ │ │ ├── JmxInfoProvider.java │ │ │ │ └── SdkMBeanRegistry.java │ │ │ ├── log │ │ │ ├── CommonsLog.java │ │ │ ├── CommonsLogFactory.java │ │ │ ├── InternalLog.java │ │ │ ├── InternalLogApi.java │ │ │ ├── InternalLogFactory.java │ │ │ ├── JulLog.java │ │ │ └── JulLogFactory.java │ │ │ ├── metrics │ │ │ ├── AwsSdkMetrics.java │ │ │ ├── ByteThroughputHelper.java │ │ │ ├── ByteThroughputProvider.java │ │ │ ├── MetricAdmin.java │ │ │ ├── MetricAdminMBean.java │ │ │ ├── MetricCollector.java │ │ │ ├── MetricFilterInputStream.java │ │ │ ├── MetricInputStreamEntity.java │ │ │ ├── MetricType.java │ │ │ ├── RequestMetricCollector.java │ │ │ ├── RequestMetricType.java │ │ │ ├── ServiceLatencyProvider.java │ │ │ ├── ServiceMetricCollector.java │ │ │ ├── ServiceMetricType.java │ │ │ ├── SimpleMetricType.java │ │ │ ├── SimpleServiceMetricType.java │ │ │ ├── SimpleThroughputMetricType.java │ │ │ ├── ThroughputMetricType.java │ │ │ ├── internal │ │ │ │ └── ServiceMetricTypeGuesser.java │ │ │ └── package-info.java │ │ │ ├── monitoring │ │ │ ├── ApiCallAttemptMonitoringEvent.java │ │ │ ├── ApiCallMonitoringEvent.java │ │ │ ├── ApiMonitoringEvent.java │ │ │ ├── MonitoringEvent.java │ │ │ ├── MonitoringListener.java │ │ │ └── internal │ │ │ │ └── ClientSideMonitoringRequestHandler.java │ │ │ ├── oauth │ │ │ ├── BasicIBMOAuthCredentials.java │ │ │ ├── DefaultTokenManager.java │ │ │ ├── DefaultTokenProvider.java │ │ │ ├── DelegateTokenProvider.java │ │ │ ├── IBMOAuthCredentials.java │ │ │ ├── IBMOAuthSigner.java │ │ │ ├── OAuthServiceException.java │ │ │ ├── Token.java │ │ │ ├── TokenManager.java │ │ │ └── TokenProvider.java │ │ │ ├── partitions │ │ │ ├── PartitionMetadataProvider.java │ │ │ ├── PartitionRegionImpl.java │ │ │ ├── PartitionsLoader.java │ │ │ └── model │ │ │ │ ├── CredentialScope.java │ │ │ │ ├── Endpoint.java │ │ │ │ ├── Partition.java │ │ │ │ ├── Partitions.java │ │ │ │ ├── Region.java │ │ │ │ └── Service.java │ │ │ ├── profile │ │ │ └── path │ │ │ │ ├── AwsDirectoryBasePathProvider.java │ │ │ │ ├── AwsProfileFileLocationProvider.java │ │ │ │ ├── AwsProfileFileLocationProviderChain.java │ │ │ │ ├── config │ │ │ │ ├── ConfigEnvVarOverrideLocationProvider.java │ │ │ │ └── SharedConfigDefaultLocationProvider.java │ │ │ │ └── cred │ │ │ │ ├── CredentialsDefaultLocationProvider.java │ │ │ │ ├── CredentialsEnvVarOverrideLocationProvider.java │ │ │ │ ├── CredentialsLegacyConfigLocationProvider.java │ │ │ │ ├── IBMJsonCredentialsDefaultLocationProvider.java │ │ │ │ └── IBMJsonCredentialsEnvVarOverrideLocationProvider.java │ │ │ ├── protocol │ │ │ ├── DefaultMarshallingType.java │ │ │ ├── DefaultValueSupplier.java │ │ │ ├── MarshallLocation.java │ │ │ ├── MarshallingInfo.java │ │ │ ├── MarshallingType.java │ │ │ ├── OperationInfo.java │ │ │ ├── Protocol.java │ │ │ ├── ProtocolMarshaller.java │ │ │ ├── ProtocolRequestMarshaller.java │ │ │ ├── StructuredPojo.java │ │ │ └── json │ │ │ │ ├── IonFactory.java │ │ │ │ ├── IonParser.java │ │ │ │ ├── JsonClientMetadata.java │ │ │ │ ├── JsonContent.java │ │ │ │ ├── JsonContentTypeResolver.java │ │ │ │ ├── JsonContentTypeResolverImpl.java │ │ │ │ ├── JsonErrorResponseMetadata.java │ │ │ │ ├── JsonErrorShapeMetadata.java │ │ │ │ ├── JsonOperationMetadata.java │ │ │ │ ├── JsonProtocolMarshallerBuilder.java │ │ │ │ ├── SdkCborGenerator.java │ │ │ │ ├── SdkIonGenerator.java │ │ │ │ ├── SdkJsonGenerator.java │ │ │ │ ├── SdkJsonMarshallerFactory.java │ │ │ │ ├── SdkJsonProtocolFactory.java │ │ │ │ ├── SdkStructuredCborFactory.java │ │ │ │ ├── SdkStructuredIonFactory.java │ │ │ │ ├── SdkStructuredJsonFactory.java │ │ │ │ ├── SdkStructuredJsonFactoryImpl.java │ │ │ │ ├── SdkStructuredPlainJsonFactory.java │ │ │ │ ├── StructuredJsonGenerator.java │ │ │ │ ├── StructuredJsonMarshaller.java │ │ │ │ └── internal │ │ │ │ ├── EmptyBodyJsonMarshaller.java │ │ │ │ ├── HeaderMarshallers.java │ │ │ │ ├── JsonMarshaller.java │ │ │ │ ├── JsonMarshallerContext.java │ │ │ │ ├── JsonProtocolMarshaller.java │ │ │ │ ├── MarshallerRegistry.java │ │ │ │ ├── QueryParamMarshallers.java │ │ │ │ ├── SimpleTypeJsonMarshallers.java │ │ │ │ ├── SimpleTypePathMarshallers.java │ │ │ │ └── ValueToStringConverters.java │ │ │ ├── regions │ │ │ ├── AbstractRegionMetadataProvider.java │ │ │ ├── AwsEnvVarOverrideRegionProvider.java │ │ │ ├── AwsProfileRegionProvider.java │ │ │ ├── AwsRegionProvider.java │ │ │ ├── AwsRegionProviderChain.java │ │ │ ├── AwsSystemPropertyRegionProvider.java │ │ │ ├── DefaultAwsRegionProviderChain.java │ │ │ ├── EndpointToRegion.java │ │ │ ├── InMemoryRegionImpl.java │ │ │ ├── InMemoryRegionsProvider.java │ │ │ ├── InstanceMetadataRegionProvider.java │ │ │ ├── LegacyRegionXmlLoadUtils.java │ │ │ ├── LegacyRegionXmlMetadataBuilder.java │ │ │ ├── MetadataSupportedRegionFromEndpointProvider.java │ │ │ ├── Region.java │ │ │ ├── RegionImpl.java │ │ │ ├── RegionMetadata.java │ │ │ ├── RegionMetadataFactory.java │ │ │ ├── RegionMetadataParser.java │ │ │ ├── RegionMetadataProvider.java │ │ │ ├── RegionUtils.java │ │ │ ├── Regions.java │ │ │ └── ServiceAbbreviations.java │ │ │ ├── retry │ │ │ ├── ClockSkewAdjuster.java │ │ │ ├── PredefinedBackoffStrategies.java │ │ │ ├── PredefinedRetryPolicies.java │ │ │ ├── RetryMode.java │ │ │ ├── RetryPolicy.java │ │ │ ├── RetryPolicyAdapter.java │ │ │ ├── RetryUtils.java │ │ │ ├── V2CompatibleBackoffStrategy.java │ │ │ ├── V2CompatibleBackoffStrategyAdapter.java │ │ │ ├── internal │ │ │ │ ├── AuthErrorRetryStrategy.java │ │ │ │ ├── AuthRetryParameters.java │ │ │ │ ├── CredentialsEndpointRetryParameters.java │ │ │ │ ├── CredentialsEndpointRetryPolicy.java │ │ │ │ ├── MaxAttemptsResolver.java │ │ │ │ └── RetryModeResolver.java │ │ │ └── v2 │ │ │ │ ├── AndRetryCondition.java │ │ │ │ ├── BackoffStrategy.java │ │ │ │ ├── FixedDelayBackoffStrategy.java │ │ │ │ ├── MaxNumberOfRetriesCondition.java │ │ │ │ ├── OrRetryCondition.java │ │ │ │ ├── RetryCondition.java │ │ │ │ ├── RetryOnExceptionsCondition.java │ │ │ │ ├── RetryOnStatusCodeCondition.java │ │ │ │ ├── RetryPolicy.java │ │ │ │ ├── RetryPolicyContext.java │ │ │ │ └── SimpleRetryPolicy.java │ │ │ ├── transform │ │ │ ├── AbstractErrorUnmarshaller.java │ │ │ ├── EnhancedJsonErrorUnmarshaller.java │ │ │ ├── JsonErrorUnmarshaller.java │ │ │ ├── JsonUnmarshallerContext.java │ │ │ ├── JsonUnmarshallerContextImpl.java │ │ │ ├── LegacyErrorUnmarshaller.java │ │ │ ├── ListUnmarshaller.java │ │ │ ├── MapEntry.java │ │ │ ├── MapUnmarshaller.java │ │ │ ├── Marshaller.java │ │ │ ├── PathMarshallers.java │ │ │ ├── SimpleTypeCborUnmarshallers.java │ │ │ ├── SimpleTypeIonUnmarshallers.java │ │ │ ├── SimpleTypeJsonUnmarshallers.java │ │ │ ├── SimpleTypeStaxUnmarshallers.java │ │ │ ├── SimpleTypeUnmarshallers.java │ │ │ ├── StandardErrorUnmarshaller.java │ │ │ ├── StaxUnmarshallerContext.java │ │ │ ├── UnknownMemberJsonUnmarshaller.java │ │ │ ├── Unmarshaller.java │ │ │ ├── VoidJsonUnmarshaller.java │ │ │ ├── VoidStaxUnmarshaller.java │ │ │ └── VoidUnmarshaller.java │ │ │ ├── util │ │ │ ├── AWSRequestMetrics.java │ │ │ ├── AWSRequestMetricsFullSupport.java │ │ │ ├── AWSServiceMetrics.java │ │ │ ├── AbstractBase32Codec.java │ │ │ ├── AwsClientSideMonitoringMetrics.java │ │ │ ├── AwsHostNameUtils.java │ │ │ ├── Base16.java │ │ │ ├── Base16Codec.java │ │ │ ├── Base16Lower.java │ │ │ ├── Base32.java │ │ │ ├── Base32Codec.java │ │ │ ├── Base64.java │ │ │ ├── Base64Codec.java │ │ │ ├── BasicNameValuePair.java │ │ │ ├── BinaryUtils.java │ │ │ ├── CRC32ChecksumCalculatingInputStream.java │ │ │ ├── CapacityManager.java │ │ │ ├── ClassLoaderHelper.java │ │ │ ├── Classes.java │ │ │ ├── Codec.java │ │ │ ├── CodecUtils.java │ │ │ ├── CollectionUtils.java │ │ │ ├── ComparableUtils.java │ │ │ ├── CountingInputStream.java │ │ │ ├── CredentialUtils.java │ │ │ ├── CredentialsProviderNameMapping.java │ │ │ ├── DateUtils.java │ │ │ ├── EC2MetadataUtils.java │ │ │ ├── EncodingScheme.java │ │ │ ├── EncodingSchemeEnum.java │ │ │ ├── FakeIOException.java │ │ │ ├── HostnameValidator.java │ │ │ ├── HttpClientWrappingInputStream.java │ │ │ ├── IOUtils.java │ │ │ ├── IdempotentUtils.java │ │ │ ├── ImmutableMapParameter.java │ │ │ ├── JavaVersionParser.java │ │ │ ├── JodaTime.java │ │ │ ├── LengthCheckInputStream.java │ │ │ ├── Md5Utils.java │ │ │ ├── MetadataCache.java │ │ │ ├── NameValuePair.java │ │ │ ├── NamedDefaultThreadFactory.java │ │ │ ├── NamespaceRemovingInputStream.java │ │ │ ├── NullResponseMetadataCache.java │ │ │ ├── NumberUtils.java │ │ │ ├── PolicyUtils.java │ │ │ ├── PropertyNamingStrategyUtils.java │ │ │ ├── ReflectionMethodInvoker.java │ │ │ ├── ResponseMetadataCache.java │ │ │ ├── RuntimeHttpUtils.java │ │ │ ├── SdkHttpUtils.java │ │ │ ├── SdkRuntime.java │ │ │ ├── ServiceClientHolderInputStream.java │ │ │ ├── StringInputStream.java │ │ │ ├── StringMapBuilder.java │ │ │ ├── StringUtils.java │ │ │ ├── Throwables.java │ │ │ ├── TimestampFormat.java │ │ │ ├── TimingInfo.java │ │ │ ├── TimingInfoFullSupport.java │ │ │ ├── TimingInfoUnmodifiable.java │ │ │ ├── URLEncodedUtils.java │ │ │ ├── UnreliableFilterInputStream.java │ │ │ ├── UriResourcePathUtils.java │ │ │ ├── ValidationUtils.java │ │ │ ├── VersionInfoUtils.java │ │ │ ├── XMLWriter.java │ │ │ ├── XmlUtils.java │ │ │ ├── XpathUtils.java │ │ │ ├── endpoint │ │ │ │ ├── DefaultRegionFromEndpointResolver.java │ │ │ │ └── RegionFromEndpointResolver.java │ │ │ └── json │ │ │ │ └── Jackson.java │ │ │ └── waiters │ │ │ ├── AcceptorPathMatcher.java │ │ │ ├── CompositeAcceptor.java │ │ │ ├── FixedDelayStrategy.java │ │ │ ├── HttpFailureStatusAcceptor.java │ │ │ ├── HttpSuccessStatusAcceptor.java │ │ │ ├── MaxAttemptsRetryStrategy.java │ │ │ ├── NoOpWaiterHandler.java │ │ │ ├── PollingStrategy.java │ │ │ ├── PollingStrategyContext.java │ │ │ ├── SdkFunction.java │ │ │ ├── Waiter.java │ │ │ ├── WaiterAcceptor.java │ │ │ ├── WaiterBuilder.java │ │ │ ├── WaiterExecution.java │ │ │ ├── WaiterExecutionBuilder.java │ │ │ ├── WaiterExecutorServiceFactory.java │ │ │ ├── WaiterHandler.java │ │ │ ├── WaiterImpl.java │ │ │ ├── WaiterParameters.java │ │ │ ├── WaiterState.java │ │ │ ├── WaiterTimedOutException.java │ │ │ └── WaiterUnrecoverableException.java │ └── resources │ │ └── com │ │ └── ibm │ │ └── cloud │ │ └── objectstorage │ │ ├── internal │ │ └── config │ │ │ └── awssdk_config_default.json │ │ ├── partitions │ │ └── endpoints.json │ │ └── sdk │ │ └── versionInfo.properties │ └── test │ ├── java │ ├── com │ │ └── ibm │ │ │ └── cloud │ │ │ └── objectstorage │ │ │ ├── AmazonWebServiceClientTest.java │ │ │ ├── AmazonWebServiceRequestTest.java │ │ │ ├── ClientConfigurationTest.java │ │ │ ├── DefaultRequestTest.java │ │ │ ├── RequestClientOptionsTest.java │ │ │ ├── SDKGlobalConfigurationTest.java │ │ │ ├── SystemDefaultDnsResolverTest.java │ │ │ ├── TestPreConditions.java │ │ │ ├── adapters │ │ │ └── types │ │ │ │ ├── StringToByteBufferAdapterTest.java │ │ │ │ └── StringToInputStreamAdapterTest.java │ │ │ ├── arn │ │ │ ├── ArnResourceTest.java │ │ │ └── ArnTest.java │ │ │ ├── auth │ │ │ ├── AWS4SignerTest.java │ │ │ ├── AWS4UnsignedPayloadRequest.java │ │ │ ├── AWSCredentialsProviderChainTest.java │ │ │ ├── AWSStaticCredentialsProviderTest.java │ │ │ ├── AbstractAWSSignerTest.java │ │ │ ├── CanonicalResourcePathSignerTest.java │ │ │ ├── ContainerCredentialsFetcherTest.java │ │ │ ├── ContainerCredentialsProviderTest.java │ │ │ ├── ContainerCredentialsRetryPolicyTest.java │ │ │ ├── EC2MetadataServiceMock.java │ │ │ ├── EnvironmentVariableCredentialsProviderTest.java │ │ │ ├── InstanceMetadataServiceCredentialsFetcherTest.java │ │ │ ├── InstanceProfileCredentialsProviderIntegrationTest.java │ │ │ ├── MockRequestBuilder.java │ │ │ ├── PropertiesFileCredentialsProviderIntegrationTest.java │ │ │ ├── QueryStringSignerTest.java │ │ │ ├── SignerAsRequestSignerTest.java │ │ │ ├── json │ │ │ │ ├── JsonConfigFileTest.java │ │ │ │ ├── JsonCredentialsProviderTest.java │ │ │ │ ├── JsonCredentialsTest.java │ │ │ │ └── JsonResourceLoader.java │ │ │ ├── policy │ │ │ │ ├── PolicyReaderTest.java │ │ │ │ └── PolicyTest.java │ │ │ └── profile │ │ │ │ ├── BasicProfileConfigFileLoaderTest.java │ │ │ │ ├── BasicProfileConfigLoaderTest.java │ │ │ │ ├── CredentialProfilesTest.java │ │ │ │ ├── ProfileCredentialsProviderTest.java │ │ │ │ ├── ProfileResourceLoader.java │ │ │ │ ├── ProfilesConfigFileTest.java │ │ │ │ └── ProfilesConfigFileWriterTest.java │ │ │ ├── client │ │ │ └── builder │ │ │ │ └── AwsClientBuilderTest.java │ │ │ ├── event │ │ │ └── ProgressListenerTest.java │ │ │ ├── handlers │ │ │ ├── RequestHandler2AdaptorTest.java │ │ │ └── StackedRequestHandlerTest.java │ │ │ ├── http │ │ │ ├── AmazonHttpClientAdaptiveRetriesTest.java │ │ │ ├── AmazonHttpClientMockTest.java │ │ │ ├── AmazonHttpClientSslHandshakeTimeoutTest.java │ │ │ ├── AmazonHttpClientTest.java │ │ │ ├── ApacheClientTlsHalfCloseTest.java │ │ │ ├── AwsErrorResponseHandlerTest.java │ │ │ ├── ClientTlsAuthTestBase.java │ │ │ ├── ConnectionPoolMaxConnectionsIntegrationTest.java │ │ │ ├── DefaultErrorResponseHandlerIntegrationTest.java │ │ │ ├── DelegatingDnsResolverTest.java │ │ │ ├── ExecutionContextTest.java │ │ │ ├── FileStoreTlsKeyManagersProviderTest.java │ │ │ ├── HttpResponseTest.java │ │ │ ├── IdleConnectionReaperTest.java │ │ │ ├── JsonErrorResponseHandlerTest.java │ │ │ ├── MockServerTestBase.java │ │ │ ├── NoneTlsKeyManagersProviderTest.java │ │ │ ├── OverloadedMockServerTestBase.java │ │ │ ├── ResponseHeadersTest.java │ │ │ ├── RetryCountInUserAgentTest.java │ │ │ ├── SdkTransactionIdInHeaderTest.java │ │ │ ├── StaxResponseHandlerForBlobDataTest.java │ │ │ ├── SystemPropertyTlsKeyManagersProviderTest.java │ │ │ ├── TraceIdTest.java │ │ │ ├── UnresponsiveMockServerTestBase.java │ │ │ ├── apache │ │ │ │ ├── client │ │ │ │ │ └── impl │ │ │ │ │ │ ├── ApacheConnectionManagerFactoryTest.java │ │ │ │ │ │ └── ApacheDefaultHttpRequestFactoryTest.java │ │ │ │ └── utils │ │ │ │ │ └── ApacheUtilsTest.java │ │ │ ├── conn │ │ │ │ ├── AbstractConnectionSocketFactoryProxyIntegrationTestBase.java │ │ │ │ ├── ClientConnectionManagerFactoryTest.java │ │ │ │ ├── ClientConnectionRequestFactoryTest.java │ │ │ │ ├── SdkPlainSocketFactoryProxyIntegrationTest.java │ │ │ │ └── ssl │ │ │ │ │ ├── MasterSecretValidatorsTest.java │ │ │ │ │ ├── SdkTLSSocketFactoryTest.java │ │ │ │ │ ├── ShouldClearSslSessionsPredicateTest.java │ │ │ │ │ └── TestSSLSocket.java │ │ │ ├── request │ │ │ │ ├── EmptyHttpRequest.java │ │ │ │ ├── RequestHandlerTestUtils.java │ │ │ │ └── SlowRequestHandler.java │ │ │ ├── response │ │ │ │ ├── DummyResponseHandler.java │ │ │ │ ├── EmptyAWSResponseHandler.java │ │ │ │ ├── ErrorDuringUnmarshallingResponseHandler.java │ │ │ │ ├── HttpResponseProxy.java │ │ │ │ ├── NullErrorResponseHandler.java │ │ │ │ ├── NullResponseHandler.java │ │ │ │ ├── UnresponsiveErrorResponseHandler.java │ │ │ │ └── UnresponsiveResponseHandler.java │ │ │ ├── server │ │ │ │ └── MockServer.java │ │ │ └── timers │ │ │ │ ├── ClientExecutionAndRequestTimerTestUtils.java │ │ │ │ ├── TimeoutTestConstants.java │ │ │ │ ├── client │ │ │ │ ├── AbortedExceptionClientExecutionTimerIntegrationTest.java │ │ │ │ ├── ClientExecutionAbortTaskImplTest.java │ │ │ │ ├── DummyErrorResponseServerIntegrationTests.java │ │ │ │ ├── DummySuccessfulResponseServerIntegrationTests.java │ │ │ │ ├── MockedClientTests.java │ │ │ │ └── UnresponsiveServerIntegrationTests.java │ │ │ │ └── request │ │ │ │ ├── DummyResponseServerIntegrationTests.java │ │ │ │ ├── MockedClientTests.java │ │ │ │ ├── OverloadedServerIntegrationTests.java │ │ │ │ └── UnresponsiveServerTests.java │ │ │ ├── internal │ │ │ ├── AmazonWebServiceRequestAdapterTest.java │ │ │ ├── BufferedInputStreamResetTest.java │ │ │ ├── ConnectionUtilsTest.java │ │ │ ├── DefaultServiceEndpointBuilderTest.java │ │ │ ├── EC2ResourceFetcherTest.java │ │ │ ├── ExceptionUtilsTest.java │ │ │ ├── FIFOCacheTest.java │ │ │ ├── InputShutdownCheckingSslSocketTest.java │ │ │ ├── InstanceMetadataServiceResourceFetcherTest.java │ │ │ ├── ResettableInputStreamTest.java │ │ │ ├── SdkInternalMapTest.java │ │ │ ├── SdkProxyRoutePlannerIntegrationTest.java │ │ │ ├── SdkRequestHeaderProviderTest.java │ │ │ ├── SdkSSLMetricsSocketTest.java │ │ │ ├── TokenBucketCubicTest.java │ │ │ ├── TokenBucketEndToEndTest.java │ │ │ ├── TokenBucketTest.java │ │ │ ├── auth │ │ │ │ └── DefaultSignerProviderTest.java │ │ │ ├── config │ │ │ │ ├── InternalConfigJsonHelperTest.java │ │ │ │ ├── InternalConfigTest.java │ │ │ │ └── SignerConfigTest.java │ │ │ └── http │ │ │ │ └── JsonErrorCodeParserTest.java │ │ │ ├── metrics │ │ │ └── AwsSdkMetricsTest.java │ │ │ ├── oauth │ │ │ ├── BasicIBMOAuthCredentialsTest.java │ │ │ ├── CredentialProviderUtil.java │ │ │ ├── DefaultTokenManagerTest.java │ │ │ ├── IBMOAuthSignerTest.java │ │ │ ├── ManagerThreadUtil.java │ │ │ ├── MockRequestBuilder.java │ │ │ ├── TokenManagerUtil.java │ │ │ ├── TokenProviderNull.java │ │ │ └── TokenProviderUtil.java │ │ │ ├── protocol │ │ │ └── json │ │ │ │ ├── IonFactoryTest.java │ │ │ │ ├── IonParserTest.java │ │ │ │ ├── IonRoundtripTest.java │ │ │ │ ├── JsonContentTest.java │ │ │ │ ├── SdkJsonProtocolFactoryTest.java │ │ │ │ ├── SdkStructuredIonFactoryTest.java │ │ │ │ └── SimpleTypeIonUnmarshallersTest.java │ │ │ ├── regions │ │ │ ├── AwsProfileRegionProviderTest.java │ │ │ ├── AwsRegionProviderChainTest.java │ │ │ ├── CustomRegionFactory.java │ │ │ ├── EndpointToRegionTest.java │ │ │ ├── InstanceMetadataRegionProviderTest.java │ │ │ ├── PartitionsRegionsTest.java │ │ │ ├── RegionMetadataParserTest.java │ │ │ ├── RegionMetadataTest.java │ │ │ ├── RegionUtilsTest.java │ │ │ └── RegionsTest.java │ │ │ ├── retry │ │ │ ├── AmazonHttpClientRetryPolicyTest.java │ │ │ ├── ClientConfigurationMaxErrorRetryTest.java │ │ │ ├── FixedTimeBackoffStrategy.java │ │ │ ├── NonRepeatableInputStream.java │ │ │ ├── PredefinedBackoffStrategiesTest.java │ │ │ ├── RetryModeTest.java │ │ │ ├── RetryPolicyAdapterTest.java │ │ │ ├── RetryPolicyTest.java │ │ │ ├── RetryPolicyTestBase.java │ │ │ ├── RetryUtilsTest.java │ │ │ ├── SDKDefaultRetryConditionTest.java │ │ │ ├── StandardBackoffStrategyTest.java │ │ │ ├── internal │ │ │ │ ├── CredentialsEndpointRetryParametersTest.java │ │ │ │ ├── MaxAttemptsResolverTest.java │ │ │ │ └── RetryModeResolverTest.java │ │ │ └── v2 │ │ │ │ ├── AndRetryConditionTest.java │ │ │ │ ├── FixedDelayBackoffStrategyTest.java │ │ │ │ ├── MaxNumberOfRetriesConditionTest.java │ │ │ │ ├── OrRetryConditionTest.java │ │ │ │ ├── RetryOnExceptionsConditionTest.java │ │ │ │ ├── RetryOnStatusCodeConditionTest.java │ │ │ │ ├── RetryPolicyContextTest.java │ │ │ │ ├── RetryPolicyContexts.java │ │ │ │ └── SimpleRetryPolicyTest.java │ │ │ ├── transform │ │ │ ├── GreedyPathMarshallersTest.java │ │ │ ├── IdempotencyPathMarshallersTest.java │ │ │ ├── JsonErrorUnmarshallerTest.java │ │ │ ├── NonGreedyPathMarshallersTest.java │ │ │ └── UnknownMemberJsonUnmarshallerTest.java │ │ │ ├── unmarshaller │ │ │ ├── JsonErrorMessageParserTest.java │ │ │ └── JsonUnmarshallerTest.java │ │ │ ├── util │ │ │ ├── AwsHostNameUtilsTest.java │ │ │ ├── Base16CodecTest.java │ │ │ ├── Base16LowerCodecTest.java │ │ │ ├── Base32CodecTest.java │ │ │ ├── Base64CodecTest.java │ │ │ ├── BinaryUtilsTest.java │ │ │ ├── CRC32ChecksumInputStreamTest.java │ │ │ ├── CapacityManagerTest.java │ │ │ ├── ClassesTest.java │ │ │ ├── CollectionUtilsTest.java │ │ │ ├── ComparableUtilsTest.java │ │ │ ├── CredentialUtilsTest.java │ │ │ ├── DateUtilsTest.java │ │ │ ├── EC2MetadataUtilsFaultTest.java │ │ │ ├── EC2MetadataUtilsIntegrationTest.java │ │ │ ├── EC2MetadataUtilsServer.java │ │ │ ├── EC2MetadataUtils_TT0049160280Test.java │ │ │ ├── FileUtils.java │ │ │ ├── IOUtilsTest.java │ │ │ ├── IdempotentUtilsTest.java │ │ │ ├── ImmutableMapParameterTest.java │ │ │ ├── IndexValues.java │ │ │ ├── JavaVersionParserTest.java │ │ │ ├── JodaTimeTest.java │ │ │ ├── LengthCheckInputStreamTest.java │ │ │ ├── LogCaptor.java │ │ │ ├── Md5UtilsTest.java │ │ │ ├── NamedDefaultThreadFactoryTest.java │ │ │ ├── NamespaceRemovingInputStreamTest.java │ │ │ ├── NumberUtilsTest.java │ │ │ ├── PropertyNamingStrategyTest.java │ │ │ ├── ReflectionMethodInvokerTest.java │ │ │ ├── ResponseMetadataCacheTest.java │ │ │ ├── RetryTestUtils.java │ │ │ ├── RuntimeHttpUtilsTest.java │ │ │ ├── SdkHttpUtilsTest.java │ │ │ ├── StreamUtils.java │ │ │ ├── StringUtilsTest.java │ │ │ ├── ThrowablesTest.java │ │ │ ├── TimingInfoTest.java │ │ │ ├── TraceIdEnvironmentVariableTest.java │ │ │ ├── UriResourcePathUtilsTest.java │ │ │ ├── ValidationUtilsTest.java │ │ │ ├── VersionInfoUtilsTest.java │ │ │ ├── XpathUtilsSyncTest.java │ │ │ ├── XpathUtilsTest.java │ │ │ └── json │ │ │ │ ├── JacksonTest.java │ │ │ │ └── SdkJsonGeneratorTest.java │ │ │ └── waiters │ │ │ ├── AcceptorPathMatcherTest.java │ │ │ ├── CompositeAcceptorTest.java │ │ │ ├── WaiterExecutorServiceFactoryTest.java │ │ │ └── WaiterTest.java │ ├── org │ │ └── bitpedia │ │ │ └── util │ │ │ └── Base32.java │ └── utils │ │ ├── EnvironmentVariableHelper.java │ │ ├── HostnameValidatorTest.java │ │ ├── Retryable.java │ │ ├── RetryableTestRule.java │ │ ├── TestHttpServer.java │ │ ├── TestProfileFileLocationProvider.java │ │ ├── builder │ │ └── StaticExecutorFactory.java │ │ ├── http │ │ ├── HttpResponseHandlers.java │ │ ├── SocketUtils.java │ │ └── WireMockTestBase.java │ │ ├── model │ │ └── EmptyAmazonWebServiceRequest.java │ │ ├── retry │ │ ├── AlwaysRetryCondition.java │ │ └── SimpleArrayBackoffStrategy.java │ │ └── xml │ │ ├── PortSwiggerXxeTests.java │ │ └── TestHttpServer.java │ └── resources │ ├── .gitkeep-AWSJavaClientSigners │ ├── awssdk_config_default.json │ ├── com │ └── ibm │ │ └── cloud │ │ └── objectstorage │ │ ├── auth │ │ ├── AwsCredentials.properties │ │ ├── sessionResponse.json │ │ └── sessionResponseExpired.json │ │ └── regions │ │ └── fake-regions.xml │ └── resources │ ├── client-tls-auth │ ├── bad-cert.p12 │ ├── client1.p12 │ └── server-keystore │ ├── jsonconfig │ ├── BasicCredentials.json │ ├── BasicCredentials2.json │ ├── CredentialsContainingHmacAndOAuth.json │ ├── CredentialsWithAccessKeyNotSpecified.json │ ├── CredentialsWithEmptyAccessKey.json │ ├── CredentialsWithEmptySecretAccessKey.json │ ├── CredentialsWithHmacAndOAuthNotSpecified.json │ └── CredentialsWithSecretAccessKeyNotSpecified.json │ ├── profileconfig │ ├── AccessKeyNotSpecified.tst │ ├── BasicConfig.tst │ ├── BasicProfile.tst │ ├── BasicProfile2.tst │ ├── DuplicateProfileWithAndWithoutProfilePrefix.tst │ ├── ProfileNameWithNoBraces.tst │ ├── ProfileNameWithNoClosingBraces.tst │ ├── ProfileNameWithNoOpeningBraces.tst │ ├── ProfileNameWithSpaces.tst │ ├── ProfileWithEmptyAccessKey.tst │ ├── ProfileWithEmptySecretKey.tst │ ├── ProfileWithProfilePrefix.tst │ ├── ProfileWithRole.tst │ ├── ProfileWithRole2.tst │ ├── ProfileWithSourceAfterRole.tst │ ├── ProfilesContainingOtherConfigurations.tst │ ├── ProfilesWithComments.tst │ ├── ProfilesWithNoProfileName.tst │ ├── ProfilesWithSameProfileName.tst │ ├── ProfilesWithSecretAccessKeyNotSpecified.tst │ ├── ProfilesWithTwoAccessKeyUnderSameProfile.tst │ ├── RoleProfileMissingSource.tst │ ├── RoleProfileWithEmptySourceName.tst │ ├── RoleProfileWithNoSourceName.tst │ └── RoleProfileWithRoleSource.tst │ └── wiremock │ ├── successResponse.json │ ├── successResponseWithInvalidBody.json │ └── successResponseWithoutAccountId.json ├── ibm-cos-java-sdk-kms ├── .gitignore ├── build.properties ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── ibm │ │ └── cloud │ │ └── objectstorage │ │ ├── auth │ │ └── policy │ │ │ └── actions │ │ │ └── KMSActions.java │ │ └── services │ │ └── kms │ │ ├── AWSKMS.java │ │ ├── AWSKMSAsync.java │ │ ├── AWSKMSAsyncClient.java │ │ ├── AWSKMSAsyncClientBuilder.java │ │ ├── AWSKMSClient.java │ │ ├── AWSKMSClientBuilder.java │ │ ├── AbstractAWSKMS.java │ │ ├── AbstractAWSKMSAsync.java │ │ ├── model │ │ ├── AWSKMSException.java │ │ ├── AlgorithmSpec.java │ │ ├── AliasListEntry.java │ │ ├── AlreadyExistsException.java │ │ ├── CancelKeyDeletionRequest.java │ │ ├── CancelKeyDeletionResult.java │ │ ├── ConflictException.java │ │ ├── CreateAliasRequest.java │ │ ├── CreateAliasResult.java │ │ ├── CreateGrantRequest.java │ │ ├── CreateGrantResult.java │ │ ├── CreateKeyRequest.java │ │ ├── CreateKeyResult.java │ │ ├── DataKeySpec.java │ │ ├── DecryptRequest.java │ │ ├── DecryptResult.java │ │ ├── DeleteAliasRequest.java │ │ ├── DeleteAliasResult.java │ │ ├── DeleteImportedKeyMaterialRequest.java │ │ ├── DeleteImportedKeyMaterialResult.java │ │ ├── DependencyTimeoutException.java │ │ ├── DescribeKeyRequest.java │ │ ├── DescribeKeyResult.java │ │ ├── DisableKeyRequest.java │ │ ├── DisableKeyResult.java │ │ ├── DisableKeyRotationRequest.java │ │ ├── DisableKeyRotationResult.java │ │ ├── DisabledException.java │ │ ├── DryRunOperationException.java │ │ ├── EnableKeyRequest.java │ │ ├── EnableKeyResult.java │ │ ├── EnableKeyRotationRequest.java │ │ ├── EnableKeyRotationResult.java │ │ ├── EncryptRequest.java │ │ ├── EncryptResult.java │ │ ├── ExpirationModelType.java │ │ ├── ExpiredImportTokenException.java │ │ ├── GenerateDataKeyRequest.java │ │ ├── GenerateDataKeyResult.java │ │ ├── GenerateDataKeyWithoutPlaintextRequest.java │ │ ├── GenerateDataKeyWithoutPlaintextResult.java │ │ ├── GenerateRandomRequest.java │ │ ├── GenerateRandomResult.java │ │ ├── GetKeyPolicyRequest.java │ │ ├── GetKeyPolicyResult.java │ │ ├── GetKeyRotationStatusRequest.java │ │ ├── GetKeyRotationStatusResult.java │ │ ├── GetParametersForImportRequest.java │ │ ├── GetParametersForImportResult.java │ │ ├── GrantConstraints.java │ │ ├── GrantListEntry.java │ │ ├── GrantOperation.java │ │ ├── ImportKeyMaterialRequest.java │ │ ├── ImportKeyMaterialResult.java │ │ ├── IncorrectKeyMaterialException.java │ │ ├── InvalidAliasNameException.java │ │ ├── InvalidArnException.java │ │ ├── InvalidCiphertextException.java │ │ ├── InvalidGrantIdException.java │ │ ├── InvalidGrantTokenException.java │ │ ├── InvalidImportTokenException.java │ │ ├── InvalidKeyUsageException.java │ │ ├── InvalidMarkerException.java │ │ ├── KMSInternalException.java │ │ ├── KMSInvalidSignatureException.java │ │ ├── KMSInvalidStateException.java │ │ ├── KeyEncryptionMechanism.java │ │ ├── KeyListEntry.java │ │ ├── KeyMetadata.java │ │ ├── KeyState.java │ │ ├── KeyUnavailableException.java │ │ ├── KeyUsageType.java │ │ ├── LimitExceededException.java │ │ ├── ListAliasesRequest.java │ │ ├── ListAliasesResult.java │ │ ├── ListGrantsRequest.java │ │ ├── ListGrantsResult.java │ │ ├── ListKeyPoliciesRequest.java │ │ ├── ListKeyPoliciesResult.java │ │ ├── ListKeysRequest.java │ │ ├── ListKeysResult.java │ │ ├── ListResourceTagsRequest.java │ │ ├── ListResourceTagsResult.java │ │ ├── ListRetirableGrantsRequest.java │ │ ├── ListRetirableGrantsResult.java │ │ ├── MalformedPolicyDocumentException.java │ │ ├── NotFoundException.java │ │ ├── OriginType.java │ │ ├── PutKeyPolicyRequest.java │ │ ├── PutKeyPolicyResult.java │ │ ├── ReEncryptRequest.java │ │ ├── ReEncryptResult.java │ │ ├── RetireGrantRequest.java │ │ ├── RetireGrantResult.java │ │ ├── RevokeGrantRequest.java │ │ ├── RevokeGrantResult.java │ │ ├── ScheduleKeyDeletionRequest.java │ │ ├── ScheduleKeyDeletionResult.java │ │ ├── Tag.java │ │ ├── TagException.java │ │ ├── TagResourceRequest.java │ │ ├── TagResourceResult.java │ │ ├── UnsupportedOperationException.java │ │ ├── UntagResourceRequest.java │ │ ├── UntagResourceResult.java │ │ ├── UpdateAliasRequest.java │ │ ├── UpdateAliasResult.java │ │ ├── UpdateKeyDescriptionRequest.java │ │ ├── UpdateKeyDescriptionResult.java │ │ ├── WrappingKeySpec.java │ │ └── transform │ │ │ ├── AliasListEntryJsonUnmarshaller.java │ │ │ ├── AliasListEntryMarshaller.java │ │ │ ├── CancelKeyDeletionRequestMarshaller.java │ │ │ ├── CancelKeyDeletionRequestProtocolMarshaller.java │ │ │ ├── CancelKeyDeletionResultJsonUnmarshaller.java │ │ │ ├── ConflictExceptionUnmarshaller.java │ │ │ ├── CreateAliasRequestMarshaller.java │ │ │ ├── CreateAliasRequestProtocolMarshaller.java │ │ │ ├── CreateAliasResultJsonUnmarshaller.java │ │ │ ├── CreateGrantRequestMarshaller.java │ │ │ ├── CreateGrantRequestProtocolMarshaller.java │ │ │ ├── CreateGrantResultJsonUnmarshaller.java │ │ │ ├── CreateKeyRequestMarshaller.java │ │ │ ├── CreateKeyRequestProtocolMarshaller.java │ │ │ ├── CreateKeyResultJsonUnmarshaller.java │ │ │ ├── DecryptRequestMarshaller.java │ │ │ ├── DecryptRequestProtocolMarshaller.java │ │ │ ├── DecryptResultJsonUnmarshaller.java │ │ │ ├── DeleteAliasRequestMarshaller.java │ │ │ ├── DeleteAliasRequestProtocolMarshaller.java │ │ │ ├── DeleteAliasResultJsonUnmarshaller.java │ │ │ ├── DeleteImportedKeyMaterialRequestMarshaller.java │ │ │ ├── DeleteImportedKeyMaterialRequestProtocolMarshaller.java │ │ │ ├── DeleteImportedKeyMaterialResultJsonUnmarshaller.java │ │ │ ├── DescribeKeyRequestMarshaller.java │ │ │ ├── DescribeKeyRequestProtocolMarshaller.java │ │ │ ├── DescribeKeyResultJsonUnmarshaller.java │ │ │ ├── DisableKeyRequestMarshaller.java │ │ │ ├── DisableKeyRequestProtocolMarshaller.java │ │ │ ├── DisableKeyResultJsonUnmarshaller.java │ │ │ ├── DisableKeyRotationRequestMarshaller.java │ │ │ ├── DisableKeyRotationRequestProtocolMarshaller.java │ │ │ ├── DisableKeyRotationResultJsonUnmarshaller.java │ │ │ ├── DryRunOperationExceptionUnmarshaller.java │ │ │ ├── EnableKeyRequestMarshaller.java │ │ │ ├── EnableKeyRequestProtocolMarshaller.java │ │ │ ├── EnableKeyResultJsonUnmarshaller.java │ │ │ ├── EnableKeyRotationRequestMarshaller.java │ │ │ ├── EnableKeyRotationRequestProtocolMarshaller.java │ │ │ ├── EnableKeyRotationResultJsonUnmarshaller.java │ │ │ ├── EncryptRequestMarshaller.java │ │ │ ├── EncryptRequestProtocolMarshaller.java │ │ │ ├── EncryptResultJsonUnmarshaller.java │ │ │ ├── GenerateDataKeyRequestMarshaller.java │ │ │ ├── GenerateDataKeyRequestProtocolMarshaller.java │ │ │ ├── GenerateDataKeyResultJsonUnmarshaller.java │ │ │ ├── GenerateDataKeyWithoutPlaintextRequestMarshaller.java │ │ │ ├── GenerateDataKeyWithoutPlaintextRequestProtocolMarshaller.java │ │ │ ├── GenerateDataKeyWithoutPlaintextResultJsonUnmarshaller.java │ │ │ ├── GenerateRandomRequestMarshaller.java │ │ │ ├── GenerateRandomRequestProtocolMarshaller.java │ │ │ ├── GenerateRandomResultJsonUnmarshaller.java │ │ │ ├── GetKeyPolicyRequestMarshaller.java │ │ │ ├── GetKeyPolicyRequestProtocolMarshaller.java │ │ │ ├── GetKeyPolicyResultJsonUnmarshaller.java │ │ │ ├── GetKeyRotationStatusRequestMarshaller.java │ │ │ ├── GetKeyRotationStatusRequestProtocolMarshaller.java │ │ │ ├── GetKeyRotationStatusResultJsonUnmarshaller.java │ │ │ ├── GetParametersForImportRequestMarshaller.java │ │ │ ├── GetParametersForImportRequestProtocolMarshaller.java │ │ │ ├── GetParametersForImportResultJsonUnmarshaller.java │ │ │ ├── GrantConstraintsJsonUnmarshaller.java │ │ │ ├── GrantConstraintsMarshaller.java │ │ │ ├── GrantListEntryJsonUnmarshaller.java │ │ │ ├── GrantListEntryMarshaller.java │ │ │ ├── ImportKeyMaterialRequestMarshaller.java │ │ │ ├── ImportKeyMaterialRequestProtocolMarshaller.java │ │ │ ├── ImportKeyMaterialResultJsonUnmarshaller.java │ │ │ ├── KMSInvalidSignatureExceptionUnmarshaller.java │ │ │ ├── KeyListEntryJsonUnmarshaller.java │ │ │ ├── KeyListEntryMarshaller.java │ │ │ ├── KeyMetadataJsonUnmarshaller.java │ │ │ ├── KeyMetadataMarshaller.java │ │ │ ├── ListAliasesRequestMarshaller.java │ │ │ ├── ListAliasesRequestProtocolMarshaller.java │ │ │ ├── ListAliasesResultJsonUnmarshaller.java │ │ │ ├── ListGrantsRequestMarshaller.java │ │ │ ├── ListGrantsRequestProtocolMarshaller.java │ │ │ ├── ListGrantsResultJsonUnmarshaller.java │ │ │ ├── ListKeyPoliciesRequestMarshaller.java │ │ │ ├── ListKeyPoliciesRequestProtocolMarshaller.java │ │ │ ├── ListKeyPoliciesResultJsonUnmarshaller.java │ │ │ ├── ListKeysRequestMarshaller.java │ │ │ ├── ListKeysRequestProtocolMarshaller.java │ │ │ ├── ListKeysResultJsonUnmarshaller.java │ │ │ ├── ListResourceTagsRequestMarshaller.java │ │ │ ├── ListResourceTagsRequestProtocolMarshaller.java │ │ │ ├── ListResourceTagsResultJsonUnmarshaller.java │ │ │ ├── ListRetirableGrantsRequestMarshaller.java │ │ │ ├── ListRetirableGrantsRequestProtocolMarshaller.java │ │ │ ├── ListRetirableGrantsResultJsonUnmarshaller.java │ │ │ ├── PutKeyPolicyRequestMarshaller.java │ │ │ ├── PutKeyPolicyRequestProtocolMarshaller.java │ │ │ ├── PutKeyPolicyResultJsonUnmarshaller.java │ │ │ ├── ReEncryptRequestMarshaller.java │ │ │ ├── ReEncryptRequestProtocolMarshaller.java │ │ │ ├── ReEncryptResultJsonUnmarshaller.java │ │ │ ├── RetireGrantRequestMarshaller.java │ │ │ ├── RetireGrantRequestProtocolMarshaller.java │ │ │ ├── RetireGrantResultJsonUnmarshaller.java │ │ │ ├── RevokeGrantRequestMarshaller.java │ │ │ ├── RevokeGrantRequestProtocolMarshaller.java │ │ │ ├── RevokeGrantResultJsonUnmarshaller.java │ │ │ ├── ScheduleKeyDeletionRequestMarshaller.java │ │ │ ├── ScheduleKeyDeletionRequestProtocolMarshaller.java │ │ │ ├── ScheduleKeyDeletionResultJsonUnmarshaller.java │ │ │ ├── TagJsonUnmarshaller.java │ │ │ ├── TagMarshaller.java │ │ │ ├── TagResourceRequestMarshaller.java │ │ │ ├── TagResourceRequestProtocolMarshaller.java │ │ │ ├── TagResourceResultJsonUnmarshaller.java │ │ │ ├── UntagResourceRequestMarshaller.java │ │ │ ├── UntagResourceRequestProtocolMarshaller.java │ │ │ ├── UntagResourceResultJsonUnmarshaller.java │ │ │ ├── UpdateAliasRequestMarshaller.java │ │ │ ├── UpdateAliasRequestProtocolMarshaller.java │ │ │ ├── UpdateAliasResultJsonUnmarshaller.java │ │ │ ├── UpdateKeyDescriptionRequestMarshaller.java │ │ │ ├── UpdateKeyDescriptionRequestProtocolMarshaller.java │ │ │ └── UpdateKeyDescriptionResultJsonUnmarshaller.java │ │ └── package-info.java │ └── test │ ├── java │ └── com │ │ └── ibm │ │ └── cloud │ │ └── objectstorage │ │ └── services │ │ └── kms │ │ └── smoketests │ │ ├── AWSKMSModuleInjector.java │ │ └── RunCucumberTest.java │ └── resources │ ├── com │ └── ibm │ │ └── cloud │ │ └── objectstorage │ │ └── services │ │ └── kms │ │ └── smoketests │ │ └── kms.feature │ └── cucumber.properties ├── ibm-cos-java-sdk-s3 ├── .gitignore ├── build.properties ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── ibm │ │ │ └── cloud │ │ │ └── objectstorage │ │ │ ├── auth │ │ │ ├── AwsChunkedEncodingInputStream.java │ │ │ ├── ChunkContentIterator.java │ │ │ ├── DecodedStreamBuffer.java │ │ │ └── policy │ │ │ │ ├── actions │ │ │ │ └── S3Actions.java │ │ │ │ ├── conditions │ │ │ │ └── S3ConditionFactory.java │ │ │ │ └── resources │ │ │ │ ├── S3BucketResource.java │ │ │ │ └── S3ObjectResource.java │ │ │ └── services │ │ │ ├── aspera │ │ │ └── transfer │ │ │ │ ├── AsperaConfig.java │ │ │ │ ├── AsperaFaspManagerWrapper.java │ │ │ │ ├── AsperaKeyCache.java │ │ │ │ ├── AsperaLibraryLoader.java │ │ │ │ ├── AsperaResult.java │ │ │ │ ├── AsperaResultImpl.java │ │ │ │ ├── AsperaTransaction.java │ │ │ │ ├── AsperaTransactionImpl.java │ │ │ │ ├── AsperaTransfer.java │ │ │ │ ├── AsperaTransferException.java │ │ │ │ ├── AsperaTransferFuture.java │ │ │ │ ├── AsperaTransferManager.java │ │ │ │ ├── AsperaTransferManagerBuilder.java │ │ │ │ ├── AsperaTransferManagerConfig.java │ │ │ │ ├── AsperaTransferSpecRequest.java │ │ │ │ ├── NodeError.java │ │ │ │ ├── NodePath.java │ │ │ │ ├── TransferListener.java │ │ │ │ ├── TransferSpec.java │ │ │ │ ├── TransferSpecs.java │ │ │ │ └── internal │ │ │ │ ├── AsperaDownloadCallable.java │ │ │ │ ├── AsperaDownloadDirectoryCallable.java │ │ │ │ ├── AsperaTransferManagerUtils.java │ │ │ │ ├── AsperaTransferSpecRequest.java │ │ │ │ ├── AsperaUploadCallable.java │ │ │ │ └── AsperaUploadDirectoryCallable.java │ │ │ └── s3 │ │ │ ├── AbstractAmazonS3.java │ │ │ ├── AmazonS3.java │ │ │ ├── AmazonS3Builder.java │ │ │ ├── AmazonS3Client.java │ │ │ ├── AmazonS3ClientBuilder.java │ │ │ ├── AmazonS3ClientConfigurationFactory.java │ │ │ ├── AmazonS3ClientParams.java │ │ │ ├── AmazonS3ClientParamsWrapper.java │ │ │ ├── AmazonS3Encryption.java │ │ │ ├── AmazonS3EncryptionClient.java │ │ │ ├── AmazonS3EncryptionClientBuilder.java │ │ │ ├── AmazonS3EncryptionClientParams.java │ │ │ ├── AmazonS3EncryptionClientParamsWrapper.java │ │ │ ├── AmazonS3EncryptionV2.java │ │ │ ├── AmazonS3URI.java │ │ │ ├── Headers.java │ │ │ ├── KeyWrapException.java │ │ │ ├── OnFileDelete.java │ │ │ ├── S3ClientOptions.java │ │ │ ├── S3CredentialsProviderChain.java │ │ │ ├── S3ResponseMetadata.java │ │ │ ├── UploadObjectObserver.java │ │ │ ├── event │ │ │ └── S3EventNotification.java │ │ │ ├── internal │ │ │ ├── AWSS3V4Signer.java │ │ │ ├── AbstractRepeatableCipherInputStream.java │ │ │ ├── AbstractS3ResponseHandler.java │ │ │ ├── AmazonS3ExceptionBuilder.java │ │ │ ├── BucketNameUtils.java │ │ │ ├── CompleteMultipartUploadRetryCondition.java │ │ │ ├── CompleteMultipartUploadRetryablePredicate.java │ │ │ ├── Constants.java │ │ │ ├── DeleteObjectTaggingHeaderHandler.java │ │ │ ├── DeleteObjectsResponse.java │ │ │ ├── DigestValidationInputStream.java │ │ │ ├── DualstackEndpointBuilder.java │ │ │ ├── FileDeletionEvent.java │ │ │ ├── FileLocks.java │ │ │ ├── GetObjectTaggingResponseHeaderHandler.java │ │ │ ├── HeaderHandler.java │ │ │ ├── InitiateMultipartUploadHeaderHandler.java │ │ │ ├── InputSubstream.java │ │ │ ├── IsSigV4RetryablePredicate.java │ │ │ ├── ListPartsHeaderHandler.java │ │ │ ├── MD5DigestCalculatingInputStream.java │ │ │ ├── Mimetypes.java │ │ │ ├── MultiFileOutputStream.java │ │ │ ├── ObjectExpirationHeaderHandler.java │ │ │ ├── ObjectExpirationResult.java │ │ │ ├── ObjectRestoreHeaderHandler.java │ │ │ ├── ObjectRestoreResult.java │ │ │ ├── ObjectTransitionHeaderHandler.java │ │ │ ├── ObjectTransitionResult.java │ │ │ ├── PartCreationEvent.java │ │ │ ├── RepeatableFileInputStream.java │ │ │ ├── RepeatableInputStream.java │ │ │ ├── RequestCopyUtils.java │ │ │ ├── ResponseHeaderHandlerChain.java │ │ │ ├── RestUtils.java │ │ │ ├── S3AbortableInputStream.java │ │ │ ├── S3Direct.java │ │ │ ├── S3DirectSpi.java │ │ │ ├── S3ErrorResponseHandler.java │ │ │ ├── S3MetadataResponseHandler.java │ │ │ ├── S3ObjectResponseHandler.java │ │ │ ├── S3QueryStringSigner.java │ │ │ ├── S3RequestEndpointResolver.java │ │ │ ├── S3RequesterChargedHeaderHandler.java │ │ │ ├── S3RequesterChargedResult.java │ │ │ ├── S3Signer.java │ │ │ ├── S3StringResponseHandler.java │ │ │ ├── S3V4AuthErrorRetryStrategy.java │ │ │ ├── S3VersionHeaderHandler.java │ │ │ ├── S3VersionResult.java │ │ │ ├── S3XmlResponseHandler.java │ │ │ ├── SSEResultBase.java │ │ │ ├── ServerSideEncryptionHeaderHandler.java │ │ │ ├── ServerSideEncryptionResult.java │ │ │ ├── ServiceUtils.java │ │ │ ├── SetObjectTaggingResponseHeaderHandler.java │ │ │ ├── SkipMd5CheckStrategy.java │ │ │ ├── UploadObjectStrategy.java │ │ │ ├── XmlWriter.java │ │ │ ├── XmlWriterUtils.java │ │ │ ├── auth │ │ │ │ └── S3SignerProvider.java │ │ │ └── crypto │ │ │ │ ├── AdjustedRangeInputStream.java │ │ │ │ ├── AesCbc.java │ │ │ │ ├── AesCtr.java │ │ │ │ ├── AesGcm.java │ │ │ │ ├── ByteRangeCapturingInputStream.java │ │ │ │ ├── CipherLite.java │ │ │ │ ├── CipherLiteInputStream.java │ │ │ │ ├── ContentCryptoScheme.java │ │ │ │ ├── CryptoRuntime.java │ │ │ │ ├── CryptoUtils.java │ │ │ │ ├── GCMCipherLite.java │ │ │ │ ├── JceEncryptionConstants.java │ │ │ │ ├── RenewableCipherLiteInputStream.java │ │ │ │ └── v1 │ │ │ │ ├── ContentCryptoMaterial.java │ │ │ │ ├── CryptoModuleDispatcher.java │ │ │ │ ├── KMSSecuredCEK.java │ │ │ │ ├── MultipartUploadCbcContext.java │ │ │ │ ├── MultipartUploadContext.java │ │ │ │ ├── MultipartUploadCryptoContext.java │ │ │ │ ├── S3CryptoModule.java │ │ │ │ ├── S3CryptoModuleAE.java │ │ │ │ ├── S3CryptoModuleAEStrict.java │ │ │ │ ├── S3CryptoModuleBase.java │ │ │ │ ├── S3CryptoModuleEO.java │ │ │ │ ├── S3CryptoScheme.java │ │ │ │ ├── S3KeyWrapScheme.java │ │ │ │ ├── S3ObjectWrapper.java │ │ │ │ └── SecuredCEK.java │ │ │ ├── iterable │ │ │ ├── S3Objects.java │ │ │ └── S3Versions.java │ │ │ ├── metrics │ │ │ └── S3ServiceMetric.java │ │ │ ├── model │ │ │ ├── AbortIncompleteMultipartUpload.java │ │ │ ├── AbortMultipartUploadRequest.java │ │ │ ├── AbstractPutObjectRequest.java │ │ │ ├── AccessControlList.java │ │ │ ├── AddLegalHoldRequest.java │ │ │ ├── AmazonS3Exception.java │ │ │ ├── Bucket.java │ │ │ ├── BucketAccelerateConfiguration.java │ │ │ ├── BucketAccelerateStatus.java │ │ │ ├── BucketCrossOriginConfiguration.java │ │ │ ├── BucketLifecycleConfiguration.java │ │ │ ├── BucketLoggingConfiguration.java │ │ │ ├── BucketNotificationConfiguration.java │ │ │ ├── BucketPolicy.java │ │ │ ├── BucketProtectionConfiguration.java │ │ │ ├── BucketProtectionStatus.java │ │ │ ├── BucketReplicationConfiguration.java │ │ │ ├── BucketTaggingConfiguration.java │ │ │ ├── BucketVersioningConfiguration.java │ │ │ ├── BucketWebsiteConfiguration.java │ │ │ ├── CORSRule.java │ │ │ ├── CannedAccessControlList.java │ │ │ ├── CanonicalGrantee.java │ │ │ ├── CloudFunctionConfiguration.java │ │ │ ├── CompleteMultipartUploadRequest.java │ │ │ ├── CompleteMultipartUploadResult.java │ │ │ ├── CopyObjectRequest.java │ │ │ ├── CopyObjectResult.java │ │ │ ├── CopyPartRequest.java │ │ │ ├── CopyPartResult.java │ │ │ ├── CreateBucketRequest.java │ │ │ ├── CryptoConfiguration.java │ │ │ ├── CryptoKeyWrapAlgorithm.java │ │ │ ├── CryptoMode.java │ │ │ ├── CryptoStorageMode.java │ │ │ ├── DefaultRetention.java │ │ │ ├── DeleteBucketAnalyticsConfigurationRequest.java │ │ │ ├── DeleteBucketAnalyticsConfigurationResult.java │ │ │ ├── DeleteBucketCrossOriginConfigurationRequest.java │ │ │ ├── DeleteBucketInventoryConfigurationRequest.java │ │ │ ├── DeleteBucketInventoryConfigurationResult.java │ │ │ ├── DeleteBucketLifecycleConfigurationRequest.java │ │ │ ├── DeleteBucketMetricsConfigurationRequest.java │ │ │ ├── DeleteBucketMetricsConfigurationResult.java │ │ │ ├── DeleteBucketPolicyRequest.java │ │ │ ├── DeleteBucketReplicationConfigurationRequest.java │ │ │ ├── DeleteBucketRequest.java │ │ │ ├── DeleteBucketTaggingConfigurationRequest.java │ │ │ ├── DeleteBucketWebsiteConfigurationRequest.java │ │ │ ├── DeleteLegalHoldRequest.java │ │ │ ├── DeleteMarkerReplication.java │ │ │ ├── DeleteMarkerReplicationStatus.java │ │ │ ├── DeleteObjectRequest.java │ │ │ ├── DeleteObjectTaggingRequest.java │ │ │ ├── DeleteObjectTaggingResult.java │ │ │ ├── DeleteObjectsRequest.java │ │ │ ├── DeleteObjectsResult.java │ │ │ ├── DeletePublicAccessBlockRequest.java │ │ │ ├── DeletePublicAccessBlockResult.java │ │ │ ├── DeleteVersionRequest.java │ │ │ ├── EmailAddressGrantee.java │ │ │ ├── EncryptedGetObjectRequest.java │ │ │ ├── EncryptedInitiateMultipartUploadRequest.java │ │ │ ├── EncryptedPutObjectRequest.java │ │ │ ├── EncryptionMaterials.java │ │ │ ├── EncryptionMaterialsAccessor.java │ │ │ ├── EncryptionMaterialsFactory.java │ │ │ ├── EncryptionMaterialsProvider.java │ │ │ ├── EncryptionType.java │ │ │ ├── ExistingObjectReplication.java │ │ │ ├── ExistingObjectReplicationStatus.java │ │ │ ├── ExpectedBucketOwnerRequest.java │ │ │ ├── ExtendObjectRetentionRequest.java │ │ │ ├── ExtraMaterialsDescription.java │ │ │ ├── FASPConnectionInfo.java │ │ │ ├── Filter.java │ │ │ ├── FilterRule.java │ │ │ ├── GeneratePresignedUrlRequest.java │ │ │ ├── GenericBucketRequest.java │ │ │ ├── GetBucketAccelerateConfigurationRequest.java │ │ │ ├── GetBucketAclRequest.java │ │ │ ├── GetBucketAnalyticsConfigurationRequest.java │ │ │ ├── GetBucketAnalyticsConfigurationResult.java │ │ │ ├── GetBucketCrossOriginConfigurationRequest.java │ │ │ ├── GetBucketFaspConnectionInfoRequest.java │ │ │ ├── GetBucketInventoryConfigurationRequest.java │ │ │ ├── GetBucketInventoryConfigurationResult.java │ │ │ ├── GetBucketLifecycleConfigurationRequest.java │ │ │ ├── GetBucketLocationRequest.java │ │ │ ├── GetBucketLoggingConfigurationRequest.java │ │ │ ├── GetBucketMetricsConfigurationRequest.java │ │ │ ├── GetBucketMetricsConfigurationResult.java │ │ │ ├── GetBucketNotificationConfigurationRequest.java │ │ │ ├── GetBucketPolicyRequest.java │ │ │ ├── GetBucketProtectionConfigurationRequest.java │ │ │ ├── GetBucketReplicationConfigurationRequest.java │ │ │ ├── GetBucketTaggingConfigurationRequest.java │ │ │ ├── GetBucketVersioningConfigurationRequest.java │ │ │ ├── GetBucketWebsiteConfigurationRequest.java │ │ │ ├── GetObjectAclRequest.java │ │ │ ├── GetObjectLegalHoldRequest.java │ │ │ ├── GetObjectLegalHoldResult.java │ │ │ ├── GetObjectLockConfigurationRequest.java │ │ │ ├── GetObjectLockConfigurationResult.java │ │ │ ├── GetObjectMetadataRequest.java │ │ │ ├── GetObjectRequest.java │ │ │ ├── GetObjectRetentionRequest.java │ │ │ ├── GetObjectRetentionResult.java │ │ │ ├── GetObjectTaggingRequest.java │ │ │ ├── GetObjectTaggingResult.java │ │ │ ├── GetPublicAccessBlockRequest.java │ │ │ ├── GetPublicAccessBlockResult.java │ │ │ ├── GetRequestPaymentConfigurationRequest.java │ │ │ ├── GetS3AccountOwnerRequest.java │ │ │ ├── GlacierJobParameters.java │ │ │ ├── Grant.java │ │ │ ├── Grantee.java │ │ │ ├── GroupGrantee.java │ │ │ ├── HeadBucketRequest.java │ │ │ ├── HeadBucketResult.java │ │ │ ├── IllegalBucketNameException.java │ │ │ ├── InitiateMultipartUploadRequest.java │ │ │ ├── InitiateMultipartUploadResult.java │ │ │ ├── InstructionFileId.java │ │ │ ├── KMSEncryptionMaterials.java │ │ │ ├── KMSEncryptionMaterialsProvider.java │ │ │ ├── LambdaConfiguration.java │ │ │ ├── LegacyS3ProgressListener.java │ │ │ ├── LegalHold.java │ │ │ ├── ListBucketAnalyticsConfigurationsRequest.java │ │ │ ├── ListBucketAnalyticsConfigurationsResult.java │ │ │ ├── ListBucketInventoryConfigurationsRequest.java │ │ │ ├── ListBucketInventoryConfigurationsResult.java │ │ │ ├── ListBucketMetricsConfigurationsRequest.java │ │ │ ├── ListBucketMetricsConfigurationsResult.java │ │ │ ├── ListBucketsExtendedRequest.java │ │ │ ├── ListBucketsExtendedResponse.java │ │ │ ├── ListBucketsRequest.java │ │ │ ├── ListLegalHoldsRequest.java │ │ │ ├── ListLegalHoldsResult.java │ │ │ ├── ListMultipartUploadsRequest.java │ │ │ ├── ListNextBatchOfObjectsRequest.java │ │ │ ├── ListNextBatchOfVersionsRequest.java │ │ │ ├── ListObjectsRequest.java │ │ │ ├── ListObjectsV2Request.java │ │ │ ├── ListObjectsV2Result.java │ │ │ ├── ListPartsRequest.java │ │ │ ├── ListVersionsRequest.java │ │ │ ├── MaterialsDescriptionProvider.java │ │ │ ├── MetadataDirective.java │ │ │ ├── MultiFactorAuthentication.java │ │ │ ├── MultiObjectDeleteException.java │ │ │ ├── MultipartUpload.java │ │ │ ├── MultipartUploadListing.java │ │ │ ├── NotificationConfiguration.java │ │ │ ├── ObjectListing.java │ │ │ ├── ObjectLockConfiguration.java │ │ │ ├── ObjectLockEnabled.java │ │ │ ├── ObjectLockLegalHold.java │ │ │ ├── ObjectLockLegalHoldStatus.java │ │ │ ├── ObjectLockMode.java │ │ │ ├── ObjectLockRetention.java │ │ │ ├── ObjectLockRetentionMode.java │ │ │ ├── ObjectLockRule.java │ │ │ ├── ObjectMetadata.java │ │ │ ├── ObjectTagging.java │ │ │ ├── Owner.java │ │ │ ├── PartETag.java │ │ │ ├── PartListing.java │ │ │ ├── PartSummary.java │ │ │ ├── Permission.java │ │ │ ├── PresignedUrlDownloadConfig.java │ │ │ ├── PresignedUrlDownloadRequest.java │ │ │ ├── PresignedUrlDownloadResult.java │ │ │ ├── PresignedUrlUploadRequest.java │ │ │ ├── PresignedUrlUploadResult.java │ │ │ ├── ProgressEvent.java │ │ │ ├── ProgressListener.java │ │ │ ├── PublicAccessBlockConfiguration.java │ │ │ ├── PutInstructionFileRequest.java │ │ │ ├── PutObjectRequest.java │ │ │ ├── PutObjectResult.java │ │ │ ├── QueueConfiguration.java │ │ │ ├── RedirectRule.java │ │ │ ├── Region.java │ │ │ ├── ReplicationDestinationConfig.java │ │ │ ├── ReplicationRule.java │ │ │ ├── ReplicationRuleStatus.java │ │ │ ├── RequestPaymentConfiguration.java │ │ │ ├── ResponseHeaderOverrides.java │ │ │ ├── RestoreObjectRequest.java │ │ │ ├── RetentionDirective.java │ │ │ ├── RoutingRule.java │ │ │ ├── RoutingRuleCondition.java │ │ │ ├── S3AccelerateUnsupported.java │ │ │ ├── S3DataSource.java │ │ │ ├── S3Event.java │ │ │ ├── S3KeyFilter.java │ │ │ ├── S3Object.java │ │ │ ├── S3ObjectId.java │ │ │ ├── S3ObjectIdBuilder.java │ │ │ ├── S3ObjectInputStream.java │ │ │ ├── S3ObjectSummary.java │ │ │ ├── S3VersionSummary.java │ │ │ ├── SSEAlgorithm.java │ │ │ ├── SSEAwsKeyManagementParams.java │ │ │ ├── SSEAwsKeyManagementParamsProvider.java │ │ │ ├── SSECustomerKey.java │ │ │ ├── SSECustomerKeyProvider.java │ │ │ ├── SetBucketAccelerateConfigurationRequest.java │ │ │ ├── SetBucketAclRequest.java │ │ │ ├── SetBucketAnalyticsConfigurationRequest.java │ │ │ ├── SetBucketAnalyticsConfigurationResult.java │ │ │ ├── SetBucketCrossOriginConfigurationRequest.java │ │ │ ├── SetBucketInventoryConfigurationRequest.java │ │ │ ├── SetBucketInventoryConfigurationResult.java │ │ │ ├── SetBucketLifecycleConfigurationRequest.java │ │ │ ├── SetBucketLoggingConfigurationRequest.java │ │ │ ├── SetBucketMetricsConfigurationRequest.java │ │ │ ├── SetBucketMetricsConfigurationResult.java │ │ │ ├── SetBucketNotificationConfigurationRequest.java │ │ │ ├── SetBucketPolicyRequest.java │ │ │ ├── SetBucketProtectionConfigurationRequest.java │ │ │ ├── SetBucketReplicationConfigurationRequest.java │ │ │ ├── SetBucketTaggingConfigurationRequest.java │ │ │ ├── SetBucketVersioningConfigurationRequest.java │ │ │ ├── SetBucketWebsiteConfigurationRequest.java │ │ │ ├── SetObjectAclRequest.java │ │ │ ├── SetObjectLegalHoldRequest.java │ │ │ ├── SetObjectLegalHoldResult.java │ │ │ ├── SetObjectLockConfigurationRequest.java │ │ │ ├── SetObjectLockConfigurationResult.java │ │ │ ├── SetObjectRetentionRequest.java │ │ │ ├── SetObjectRetentionResult.java │ │ │ ├── SetObjectTaggingRequest.java │ │ │ ├── SetObjectTaggingResult.java │ │ │ ├── SetPublicAccessBlockRequest.java │ │ │ ├── SetPublicAccessBlockResult.java │ │ │ ├── SetRequestPaymentConfigurationRequest.java │ │ │ ├── SimpleMaterialProvider.java │ │ │ ├── StaticEncryptionMaterialsProvider.java │ │ │ ├── StorageClass.java │ │ │ ├── Tag.java │ │ │ ├── TagSet.java │ │ │ ├── Tier.java │ │ │ ├── TopicConfiguration.java │ │ │ ├── UploadObjectRequest.java │ │ │ ├── UploadPartRequest.java │ │ │ ├── UploadPartResult.java │ │ │ ├── VersionListing.java │ │ │ ├── WebsiteConfiguration.java │ │ │ ├── WormMirrorDestinationProvider.java │ │ │ ├── WriteGetObjectResponseRequest.java │ │ │ ├── WriteGetObjectResponseResult.java │ │ │ ├── analytics │ │ │ │ ├── AnalyticsAndOperator.java │ │ │ │ ├── AnalyticsConfiguration.java │ │ │ │ ├── AnalyticsExportDestination.java │ │ │ │ ├── AnalyticsFilter.java │ │ │ │ ├── AnalyticsFilterPredicate.java │ │ │ │ ├── AnalyticsNAryOperator.java │ │ │ │ ├── AnalyticsPredicateVisitor.java │ │ │ │ ├── AnalyticsPrefixPredicate.java │ │ │ │ ├── AnalyticsS3BucketDestination.java │ │ │ │ ├── AnalyticsS3ExportFileFormat.java │ │ │ │ ├── AnalyticsTagPredicate.java │ │ │ │ ├── StorageClassAnalysis.java │ │ │ │ ├── StorageClassAnalysisDataExport.java │ │ │ │ └── StorageClassAnalysisSchemaVersion.java │ │ │ ├── inventory │ │ │ │ ├── InventoryConfiguration.java │ │ │ │ ├── InventoryDestination.java │ │ │ │ ├── InventoryFilter.java │ │ │ │ ├── InventoryFilterPredicate.java │ │ │ │ ├── InventoryFormat.java │ │ │ │ ├── InventoryFrequency.java │ │ │ │ ├── InventoryIncludedObjectVersions.java │ │ │ │ ├── InventoryOptionalField.java │ │ │ │ ├── InventoryPredicateVisitor.java │ │ │ │ ├── InventoryPrefixPredicate.java │ │ │ │ ├── InventoryS3BucketDestination.java │ │ │ │ └── InventorySchedule.java │ │ │ ├── lifecycle │ │ │ │ ├── LifecycleAndOperator.java │ │ │ │ ├── LifecycleFilter.java │ │ │ │ ├── LifecycleFilterPredicate.java │ │ │ │ ├── LifecycleNAryOperator.java │ │ │ │ ├── LifecycleObjectSizeGreaterThanPredicate.java │ │ │ │ ├── LifecycleObjectSizeLessThanPredicate.java │ │ │ │ ├── LifecyclePredicateVisitor.java │ │ │ │ ├── LifecyclePrefixPredicate.java │ │ │ │ └── LifecycleTagPredicate.java │ │ │ ├── metrics │ │ │ │ ├── MetricsAndOperator.java │ │ │ │ ├── MetricsConfiguration.java │ │ │ │ ├── MetricsFilter.java │ │ │ │ ├── MetricsFilterPredicate.java │ │ │ │ ├── MetricsNAryOperator.java │ │ │ │ ├── MetricsPredicateVisitor.java │ │ │ │ ├── MetricsPrefixPredicate.java │ │ │ │ └── MetricsTagPredicate.java │ │ │ ├── package-info.java │ │ │ ├── replication │ │ │ │ ├── ReplicationAndOperator.java │ │ │ │ ├── ReplicationFilter.java │ │ │ │ ├── ReplicationFilterPredicate.java │ │ │ │ ├── ReplicationNAryOperator.java │ │ │ │ ├── ReplicationPredicateVisitor.java │ │ │ │ ├── ReplicationPrefixPredicate.java │ │ │ │ └── ReplicationTagPredicate.java │ │ │ └── transform │ │ │ │ ├── AbstractHandler.java │ │ │ │ ├── AbstractSSEHandler.java │ │ │ │ ├── AclXmlFactory.java │ │ │ │ ├── BucketConfigurationXmlFactory.java │ │ │ │ ├── BucketConfigurationXmlFactoryFunctions.java │ │ │ │ ├── BucketNotificationConfigurationStaxUnmarshaller.java │ │ │ │ ├── FilterRuleStaxUnmarshaller.java │ │ │ │ ├── FilterStaxUnmarshaller.java │ │ │ │ ├── GetPublicAccessBlockStaxUnmarshaller.java │ │ │ │ ├── HeadBucketResultHandler.java │ │ │ │ ├── LambdaConfigurationStaxUnmarshaller.java │ │ │ │ ├── LifecyclePredicateVisitorImpl.java │ │ │ │ ├── MultiObjectDeleteXmlFactory.java │ │ │ │ ├── NotificationConfigurationStaxUnmarshaller.java │ │ │ │ ├── ObjectLockConfigurationXmlFactory.java │ │ │ │ ├── ObjectLockLegalHoldXmlFactory.java │ │ │ │ ├── ObjectLockRetentionXmlFactory.java │ │ │ │ ├── ObjectTaggingXmlFactory.java │ │ │ │ ├── QueueConfigurationStaxUnmarshaller.java │ │ │ │ ├── ReplicationPredicateVisitorImpl.java │ │ │ │ ├── RequestPaymentConfigurationXmlFactory.java │ │ │ │ ├── RequestXmlFactory.java │ │ │ │ ├── S3KeyFilterStaxUnmarshaller.java │ │ │ │ ├── TopicConfigurationStaxUnmarshaller.java │ │ │ │ ├── Unmarshallers.java │ │ │ │ └── XmlResponsesSaxParser.java │ │ │ ├── package-info.java │ │ │ ├── request │ │ │ └── S3HandlerContextKeys.java │ │ │ ├── transfer │ │ │ ├── AbortableTransfer.java │ │ │ ├── Copy.java │ │ │ ├── Download.java │ │ │ ├── DownloadCallable.java │ │ │ ├── DownloadTaskImpl.java │ │ │ ├── KeyFilter.java │ │ │ ├── MultipleFileDownload.java │ │ │ ├── MultipleFileTransferProgressUpdatingListener.java │ │ │ ├── MultipleFileTransferStateChangeListener.java │ │ │ ├── MultipleFileUpload.java │ │ │ ├── ObjectCannedAclProvider.java │ │ │ ├── ObjectMetadataProvider.java │ │ │ ├── ObjectTaggingProvider.java │ │ │ ├── PauseResult.java │ │ │ ├── PauseStatus.java │ │ │ ├── PersistableDownload.java │ │ │ ├── PersistableTransfer.java │ │ │ ├── PersistableUpload.java │ │ │ ├── PresignedUrlDownload.java │ │ │ ├── Transfer.java │ │ │ ├── TransferCompletionFilter.java │ │ │ ├── TransferManager.java │ │ │ ├── TransferManagerBuilder.java │ │ │ ├── TransferManagerConfiguration.java │ │ │ ├── TransferManagerParams.java │ │ │ ├── TransferProgress.java │ │ │ ├── Upload.java │ │ │ ├── UploadContext.java │ │ │ ├── exception │ │ │ │ ├── FileLockException.java │ │ │ │ └── PauseException.java │ │ │ ├── internal │ │ │ │ ├── AbstractDownloadCallable.java │ │ │ │ ├── AbstractDownloadCallableConfig.java │ │ │ │ ├── AbstractTransfer.java │ │ │ │ ├── CompleteMultipartCopy.java │ │ │ │ ├── CompleteMultipartDownload.java │ │ │ │ ├── CompleteMultipartUpload.java │ │ │ │ ├── CopyCallable.java │ │ │ │ ├── CopyImpl.java │ │ │ │ ├── CopyMonitor.java │ │ │ │ ├── CopyPartCallable.java │ │ │ │ ├── CopyPartRequestFactory.java │ │ │ │ ├── DownloadImpl.java │ │ │ │ ├── DownloadMonitor.java │ │ │ │ ├── DownloadS3ObjectCallable.java │ │ │ │ ├── MultipleFileDownloadImpl.java │ │ │ │ ├── MultipleFileTransfer.java │ │ │ │ ├── MultipleFileTransferMonitor.java │ │ │ │ ├── MultipleFileUploadImpl.java │ │ │ │ ├── PreparedDownloadContext.java │ │ │ │ ├── PresignUrlDownloadCallable.java │ │ │ │ ├── PresignedUrlDownloadImpl.java │ │ │ │ ├── PresignedUrlRetryableDownloadTaskImpl.java │ │ │ │ ├── S3ProgressListener.java │ │ │ │ ├── S3ProgressListenerChain.java │ │ │ │ ├── S3ProgressPublisher.java │ │ │ │ ├── S3SyncProgressListener.java │ │ │ │ ├── TransferManagerUtils.java │ │ │ │ ├── TransferMonitor.java │ │ │ │ ├── TransferProgressUpdatingListener.java │ │ │ │ ├── TransferStateChangeListener.java │ │ │ │ ├── UploadCallable.java │ │ │ │ ├── UploadImpl.java │ │ │ │ ├── UploadMonitor.java │ │ │ │ ├── UploadPartCallable.java │ │ │ │ ├── UploadPartRequestFactory.java │ │ │ │ └── future │ │ │ │ │ ├── CompletedFuture.java │ │ │ │ │ ├── CompositeFuture.java │ │ │ │ │ ├── DelegatingFuture.java │ │ │ │ │ ├── FailedFuture.java │ │ │ │ │ └── FutureImpl.java │ │ │ ├── model │ │ │ │ ├── CopyResult.java │ │ │ │ └── UploadResult.java │ │ │ └── package-info.java │ │ │ └── waiters │ │ │ ├── AmazonS3Waiters.java │ │ │ ├── HeadBucketFunction.java │ │ │ └── HeadObjectFunction.java │ └── resources │ │ └── mime.types │ └── test │ └── java │ └── com │ └── ibm │ └── cloud │ └── objectstorage │ └── services │ ├── aspera │ └── transfer │ │ ├── AsperaConfigTest.java │ │ ├── AsperaFaspManagerWrapperTest.java │ │ ├── AsperaKeyCacheTest.java │ │ ├── AsperaLibraryLoaderTest.java │ │ ├── AsperaTransactionImplTest.java │ │ ├── AsperaTransactionProgressTest.java │ │ ├── AsperaTransferManagerBuilderTest.java │ │ ├── AsperaTransferManagerDownloadDirectoryTest.java │ │ ├── AsperaTransferManagerDownloadTest.java │ │ ├── AsperaTransferManagerTest.java │ │ ├── AsperaTransferManagerUploadDirectoryTest.java │ │ ├── AsperaTransferManagerUploadTest.java │ │ ├── AsperaTransferManagerUtilsTest.java │ │ └── TransferListenerTest.java │ └── s3 │ ├── AmazonS3ClientTest.java │ ├── internal │ ├── MD5DigestCalculatingInputStreamTest.java │ └── S3XmlResponseHandlerTest.java │ ├── model │ ├── CreateBucketRequestTest.java │ ├── FASPConnectionInfohandlerTest.java │ ├── HeadBucketResultHandlerTest.java │ └── ListExtendedBucketHandlerTest.java │ └── transfer │ └── internal │ └── CompleteMultipartCopyTest.java ├── ibm-cos-java-sdk-test-utils ├── .gitignore ├── build.properties ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── ibm │ └── cloud │ └── objectstorage │ ├── smoketest │ ├── AWSCucumberStepdefs.java │ └── ReflectionUtils.java │ └── test │ ├── AWSIntegrationTestBase.java │ ├── AWSTestBase.java │ ├── retry │ ├── AssertCallable.java │ ├── NonRetryableException.java │ ├── RetryRule.java │ ├── RetryableAction.java │ ├── RetryableAssertion.java │ ├── RetryableError.java │ └── RetryableParams.java │ └── util │ ├── ConstantInputStream.java │ ├── DateUtils.java │ ├── IndexValues.java │ ├── InputStreamUtils.java │ ├── Memory.java │ ├── ProgressListenerWithEventCodeVerification.java │ ├── RandomInputStream.java │ ├── RandomTempFile.java │ ├── SdkAsserts.java │ ├── TestExecutors.java │ ├── UnorderedCollectionComparator.java │ ├── UnreliableRandomInputStream.java │ └── hamcrest │ ├── CollectionContainsOnly.java │ ├── CollectionContainsOnlyInOrder.java │ └── Matchers.java ├── ibm-cos-java-sdk ├── .gitignore ├── build.properties └── pom.xml ├── pom.xml └── release.properties /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | settings.xml 3 | *.iml 4 | .idea/* 5 | 6 | # Eclipse metadata 7 | .classpath 8 | .settings 9 | .project 10 | *.prefs 11 | 12 | # MacOS 13 | .DS_Store 14 | 15 | -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "settingsInheritedFrom": "whitesource-config/whitesource-config@master" 3 | } -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS SDK for Java 2 | Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | 4 | This product includes software developed by 5 | Amazon Technologies, Inc (http://www.amazon.com/). 6 | 7 | ********************** 8 | THIRD PARTY COMPONENTS 9 | ********************** 10 | This software includes third party software subject to the following copyrights: 11 | - XML parsing and utility functions from JetS3t - Copyright 2006-2009 James Murty. 12 | - PKCS#1 PEM encoded private key parsing and utility functions from oauth.googlecode.com - Copyright 1998-2010 AOL Inc. 13 | 14 | The licenses for these third party components are included in LICENSE.txt 15 | -------------------------------------------------------------------------------- /build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/main/java,\ 2 | src/main/resources 3 | output.. = bin/ 4 | 5 | bin.includes = LICENSE.txt,\ 6 | NOTICE.txt,\ 7 | META-INF/,\ 8 | . 9 | 10 | jre.compilation.profile = JavaSE-1.8 11 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-bom/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/main/java,\ 2 | src/main/resources 3 | output.. = bin/ 4 | 5 | bin.includes = LICENSE.txt,\ 6 | NOTICE.txt,\ 7 | META-INF/,\ 8 | . 9 | 10 | jre.compilation.profile = JavaSE-1.8 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-bundle/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-bundle/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/main/java,\ 2 | src/main/resources 3 | output.. = bin/ 4 | 5 | bin.includes = LICENSE.txt,\ 6 | NOTICE.txt,\ 7 | META-INF/,\ 8 | . 9 | 10 | jre.compilation.profile = JavaSE-1.8 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/main/java,\ 2 | src/main/resources 3 | output.. = bin/ 4 | 5 | bin.includes = LICENSE.txt,\ 6 | NOTICE.txt,\ 7 | META-INF/,\ 8 | . 9 | 10 | jre.compilation.profile = JavaSE-1.8 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/DnsResolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage; 16 | 17 | import java.net.InetAddress; 18 | import java.net.UnknownHostException; 19 | 20 | /** 21 | * Given a hostname, will resolve the hostname to an ip, or list of ip addresses. 22 | */ 23 | public interface DnsResolver { 24 | InetAddress[] resolve(String host) throws UnknownHostException; 25 | } 26 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/HttpMethod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage; 16 | 17 | /** 18 | * Enumeration of valid HTTP methods. 19 | */ 20 | public enum HttpMethod { 21 | 22 | GET, POST, PUT, DELETE, HEAD, PATCH; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/ProxyAuthenticationMethod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage; 17 | 18 | import java.util.List; 19 | 20 | /** 21 | * Methods by which the SDK can authenticate against an HTTP proxy. These can be configured on a client using 22 | * {@link ClientConfiguration#setProxyAuthenticationMethods(List)}. 23 | */ 24 | public enum ProxyAuthenticationMethod { 25 | SPNEGO, 26 | KERBEROS, 27 | NTLM, 28 | DIGEST, 29 | BASIC 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/ReadLimitInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage; 16 | 17 | public interface ReadLimitInfo { 18 | /** 19 | * Returns the read limit for mark-and-reset during retries; or -1 if not 20 | * available. 21 | */ 22 | public int getReadLimit(); 23 | } 24 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/SystemDefaultDnsResolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage; 16 | 17 | import java.net.InetAddress; 18 | import java.net.UnknownHostException; 19 | 20 | /** 21 | * Default dns resolver that uses {@link java.net.InetAddress#getAllByName(String)} 22 | * to resolve hosts to ip addresses 23 | */ 24 | public class SystemDefaultDnsResolver implements DnsResolver { 25 | @Override 26 | public InetAddress[] resolve(String host) throws UnknownHostException { 27 | return InetAddress.getAllByName(host); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/adapters/types/StringToByteBufferAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights 3 | * Reserved. 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 | * A copy of the License is located at 8 | * 9 | * http://aws.amazon.com/apache2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | package com.ibm.cloud.objectstorage.adapters.types; 17 | 18 | import java.nio.ByteBuffer; 19 | 20 | import com.ibm.cloud.objectstorage.annotation.SdkProtectedApi; 21 | import com.ibm.cloud.objectstorage.util.StringUtils; 22 | 23 | @SdkProtectedApi 24 | public class StringToByteBufferAdapter implements TypeAdapter { 25 | 26 | @Override 27 | public ByteBuffer adapt(String source) { 28 | if (source == null) { 29 | return null; 30 | } else { 31 | return ByteBuffer.wrap(source.getBytes(StringUtils.UTF8)); 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/adapters/types/TypeAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights 3 | * Reserved. 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 | * A copy of the License is located at 8 | * 9 | * http://aws.amazon.com/apache2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | package com.ibm.cloud.objectstorage.adapters.types; 17 | 18 | import com.ibm.cloud.objectstorage.annotation.SdkInternalApi; 19 | 20 | /** 21 | * Adapter interface to convert one type to another 22 | * 23 | * @param 24 | * Source type 25 | * @param 26 | * Destination type 27 | */ 28 | @SdkInternalApi 29 | public interface TypeAdapter { 30 | 31 | Destination adapt(Source source); 32 | 33 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/annotation/GuardedBy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with 5 | * the License. A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 10 | * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | package com.ibm.cloud.objectstorage.annotation; 14 | 15 | import java.lang.annotation.Documented; 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * Documenting annotation to indicate the field or method on which this is applied can only be accessed 23 | * when holding the given lock (identified by value). 24 | */ 25 | @Documented 26 | @Target({ElementType.FIELD, ElementType.METHOD}) 27 | @Retention(RetentionPolicy.CLASS) 28 | public @interface GuardedBy { 29 | String value(); 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/annotation/Immutable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with 5 | * the License. A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 10 | * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | package com.ibm.cloud.objectstorage.annotation; 14 | 15 | import java.lang.annotation.Documented; 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * Documenting annotation to indicate a class is immutable. 23 | */ 24 | @Documented 25 | @Target(ElementType.TYPE) 26 | @Retention(RetentionPolicy.CLASS) 27 | public @interface Immutable { 28 | } 29 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/annotation/NotThreadSafe.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with 5 | * the License. A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 10 | * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | package com.ibm.cloud.objectstorage.annotation; 14 | 15 | 16 | import java.lang.annotation.Documented; 17 | import java.lang.annotation.ElementType; 18 | import java.lang.annotation.Retention; 19 | import java.lang.annotation.RetentionPolicy; 20 | import java.lang.annotation.Target; 21 | 22 | /** 23 | * Documenting annotation to indicate a class is not thread-safe and should not be used in a multi-threaded context. 24 | * 25 | * @see ThreadSafe 26 | */ 27 | @Documented 28 | @Target(ElementType.TYPE) 29 | @Retention(RetentionPolicy.CLASS) 30 | public @interface NotThreadSafe { 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/annotation/ThreadSafe.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with 5 | * the License. A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 10 | * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | package com.ibm.cloud.objectstorage.annotation; 14 | 15 | import java.lang.annotation.Documented; 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * Documenting annotation to indicate a class is thread-safe and may be shared among multiple threads. 23 | * 24 | * @see NotThreadSafe 25 | */ 26 | @Documented 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.CLASS) 29 | public @interface ThreadSafe { 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/annotation/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon Technologies, 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | /** 17 | * AWS Java SDK annotations. 18 | */ 19 | package com.ibm.cloud.objectstorage.annotation; 20 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/AWSRefreshableSessionCredentials.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.auth; 16 | 17 | /** 18 | * Session credentials that can be refreshed upon request. 19 | */ 20 | public interface AWSRefreshableSessionCredentials extends AWSSessionCredentials { 21 | 22 | /** 23 | * Forces a refresh of these session credentials. 24 | */ 25 | public void refreshCredentials(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/AWSSessionCredentials.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon Technologies, 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.auth; 16 | 17 | /** 18 | * AWS session credentials object. 19 | */ 20 | public interface AWSSessionCredentials extends AWSCredentials { 21 | 22 | /** 23 | * Returns the session token for this session. 24 | */ 25 | public String getSessionToken(); 26 | } 27 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/AWSSessionCredentialsProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon Technologies, 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.auth; 16 | 17 | public interface AWSSessionCredentialsProvider extends AWSCredentialsProvider { 18 | 19 | @Override 20 | public AWSSessionCredentials getCredentials(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/CanHandleNullCredentials.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016. Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.auth; 17 | 18 | import com.ibm.cloud.objectstorage.SignableRequest; 19 | 20 | /** 21 | * Used to explicitly indicate that a {@link com.ibm.cloud.objectstorage.auth.Signer} can gracefully handle 22 | * credentials being null when calling {@link com.ibm.cloud.objectstorage.auth.Signer#sign(SignableRequest, AWSCredentials)} 23 | */ 24 | public interface CanHandleNullCredentials {} 25 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/NoOpSigner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.auth; 16 | 17 | import com.ibm.cloud.objectstorage.SignableRequest; 18 | 19 | /** 20 | * A No-Op Signer Implementation. 21 | */ 22 | public class NoOpSigner implements Signer { 23 | 24 | @Override 25 | public void sign(SignableRequest request, AWSCredentials credentials) { } 26 | } 27 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/RegionAwareSigner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.auth; 16 | 17 | /** 18 | * A signer that needs to know which region it is talking to. 19 | */ 20 | public interface RegionAwareSigner extends Signer { 21 | /** 22 | * Configure this signer with the name of the region it will be used 23 | * to sign requests for. 24 | * 25 | * @param value The name of the region. 26 | */ 27 | void setRegionName(String value); 28 | } 29 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/ServiceAwareSigner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.auth; 16 | 17 | /** 18 | * A signer that needs to know which service it is talking to. 19 | */ 20 | public interface ServiceAwareSigner extends Signer { 21 | /** 22 | * Configure this signer with the name of the service it will be used 23 | * to sign requests for. 24 | * 25 | * @param value The name of the service. 26 | */ 27 | void setServiceName(String value); 28 | } 29 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/SignatureVersion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.auth; 16 | 17 | public enum SignatureVersion { 18 | 19 | V1("1"), V2("2"); 20 | 21 | private String value; 22 | 23 | private SignatureVersion(String value) { 24 | this.value = value; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return this.value; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/SignerParams.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.auth; 16 | 17 | /** 18 | * Shared parameter structure to contain information required for signing by 19 | * various signer implementations. 20 | */ 21 | public class SignerParams { 22 | private String serviceName; 23 | private String regionName; 24 | 25 | public SignerParams(String serviceName, String regionName) { 26 | this.serviceName = serviceName; 27 | this.regionName = regionName; 28 | } 29 | 30 | public String getServiceName() { 31 | return serviceName; 32 | } 33 | 34 | public String getRegionName() { 35 | return regionName; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/SignerTypeAware.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.auth; 16 | 17 | /** 18 | * Used to mark implementations of {@link com.ibm.cloud.objectstorage.AmazonWebServiceRequest} that specify a custom signer type. 19 | */ 20 | public interface SignerTypeAware { 21 | String getSignerType(); 22 | } 23 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/policy/actions/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | /** 17 | * Collection of actions for AWS access control policies. Actions describe how 18 | * AWS resources are being accessed or modified when an AWS access control policy 19 | * is evaluated for an incoming request. 20 | */ 21 | package com.ibm.cloud.objectstorage.auth.policy.actions; 22 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/policy/resources/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | /** 17 | * Collection of resources for AWS access control policies. Resources describe 18 | * what AWS entities are being accessed or modified when an AWS access control policy 19 | * is evaluated for an incoming request. Amazon SQS queues, Amazon SNS topics, and 20 | * Amazon S3 buckets and objects are all examples of AWS resources. 21 | */ 22 | package com.ibm.cloud.objectstorage.auth.policy.resources; 23 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/profile/internal/securitytoken/ProfileCredentialsService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.auth.profile.internal.securitytoken; 16 | 17 | import com.ibm.cloud.objectstorage.annotation.SdkInternalApi; 18 | import com.ibm.cloud.objectstorage.annotation.SdkProtectedApi; 19 | import com.ibm.cloud.objectstorage.auth.AWSCredentialsProvider; 20 | 21 | @SdkProtectedApi 22 | public interface ProfileCredentialsService { 23 | AWSCredentialsProvider getAssumeRoleCredentialsProvider(RoleInfo targetRoleInfo); 24 | } 25 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/client/AwsAsyncClientParams.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.client; 16 | 17 | import com.ibm.cloud.objectstorage.annotation.SdkProtectedApi; 18 | 19 | import java.util.concurrent.ExecutorService; 20 | 21 | /** 22 | * Provides access to all params needed in a asynchronous AWS service client constructor. Abstract 23 | * to allow additions to the params while maintaining backwards compatibility. 24 | */ 25 | @SdkProtectedApi 26 | public abstract class AwsAsyncClientParams extends AwsSyncClientParams { 27 | 28 | public abstract ExecutorService getExecutor(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/client/builder/ExecutorFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.client.builder; 16 | 17 | import java.util.concurrent.ExecutorService; 18 | 19 | /** 20 | * Factory to create instances of {@link ExecutorService}. 21 | */ 22 | public interface ExecutorFactory { 23 | 24 | /** 25 | * @return New {@link ExecutorService} 26 | */ 27 | ExecutorService newExecutor(); 28 | } 29 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/event/ProgressEventFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.event; 16 | 17 | /** 18 | * An interface that filters the incoming events before passing 19 | * them into the registered listeners. 20 | */ 21 | public interface ProgressEventFilter { 22 | 23 | /** 24 | * Returns the filtered event object that will be actually passed into 25 | * the listeners. Returns null if the event should be completely blocked. 26 | */ 27 | public ProgressEvent filter(ProgressEvent progressEvent); 28 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/event/SyncProgressListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.event; 16 | 17 | /** 18 | * Abstract adapter class for a progress listener that is delivered with 19 | * progress event synchronously. 20 | */ 21 | public abstract class SyncProgressListener 22 | implements ProgressListener, DeliveryMode { 23 | /** 24 | * Always returns true. 25 | */ 26 | @Override public boolean isSyncCallSafe() { return true; } 27 | } 28 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/handlers/AbstractRequestHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.handlers; 16 | 17 | import com.ibm.cloud.objectstorage.Request; 18 | import com.ibm.cloud.objectstorage.util.TimingInfo; 19 | 20 | /** 21 | * @deprecated by {@link RequestHandler2}. 22 | *

23 | * Simple implementation of RequestHandler to stub out required methods. 24 | */ 25 | @Deprecated 26 | public abstract class AbstractRequestHandler implements RequestHandler { 27 | public void beforeRequest(Request request) {} 28 | public void afterResponse(Request request, Object response, TimingInfo timingInfo) {} 29 | public void afterError(Request request, Exception e) {} 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/TlsKeyManagersProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.http; 16 | 17 | import javax.net.ssl.KeyManager; 18 | 19 | /** 20 | * Provider for {@link KeyManager}s to be used by the HTTP client for TLS 21 | * client authentication. 22 | */ 23 | public interface TlsKeyManagersProvider { 24 | /** 25 | * @return The key managers, or {@code null}. 26 | */ 27 | KeyManager[] getKeyManagers(); 28 | } 29 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/apache/client/impl/ConnectionManagerAwareHttpClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016. Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.http.apache.client.impl; 16 | 17 | import org.apache.http.client.HttpClient; 18 | import org.apache.http.conn.HttpClientConnectionManager; 19 | 20 | /** 21 | * An extension of Apache's HttpClient that expose the connection manager 22 | * associated with the client. 23 | */ 24 | public interface ConnectionManagerAwareHttpClient extends HttpClient { 25 | 26 | /** 27 | * Returns the {@link HttpClientConnectionManager} associated with the 28 | * http client. 29 | */ 30 | HttpClientConnectionManager getHttpClientConnectionManager(); 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/apache/request/impl/HttpGetWithBody.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.http.apache.request.impl; 17 | 18 | import java.net.URI; 19 | import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; 20 | import org.apache.http.client.methods.HttpGet; 21 | 22 | /** 23 | * Allows sending a GET request with a request body. 24 | */ 25 | public class HttpGetWithBody extends HttpEntityEnclosingRequestBase { 26 | 27 | public HttpGetWithBody(String uri) { 28 | super(); 29 | setURI(URI.create(uri)); 30 | } 31 | 32 | @Override 33 | public String getMethod() { 34 | return HttpGet.METHOD_NAME; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/apache/utils/HttpContextUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.http.apache.utils; 17 | 18 | import com.ibm.cloud.objectstorage.annotation.SdkInternalApi; 19 | import org.apache.http.protocol.HttpContext; 20 | 21 | @SdkInternalApi 22 | public final class HttpContextUtils { 23 | public static final String DISABLE_SOCKET_PROXY_PROPERTY = "com.ibm.cloud.objectstorage.disableSocketProxy"; 24 | private HttpContextUtils() { 25 | } 26 | 27 | public static boolean disableSocketProxy(HttpContext ctx) { 28 | Object v = ctx.getAttribute(DISABLE_SOCKET_PROXY_PROPERTY); 29 | return v != null && (Boolean) v; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/client/ConnectionManagerFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.http.client; 16 | 17 | import com.ibm.cloud.objectstorage.annotation.Beta; 18 | import com.ibm.cloud.objectstorage.http.settings.HttpClientSettings; 19 | 20 | /** 21 | * Factory interface that can be used for create ConnectionManager used by 22 | * the underlying http client. 23 | */ 24 | @Beta 25 | public interface ConnectionManagerFactory { 26 | 27 | T create(final HttpClientSettings settings); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/client/HttpClientFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.http.client; 16 | 17 | import com.ibm.cloud.objectstorage.annotation.Beta; 18 | import com.ibm.cloud.objectstorage.http.settings.HttpClientSettings; 19 | 20 | 21 | /** 22 | * Factory interface that can be used for creating the underlying http client 23 | * for request execution. 24 | */ 25 | @Beta 26 | public interface HttpClientFactory { 27 | 28 | T create(HttpClientSettings settings); 29 | 30 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/conn/Wrapped.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.http.conn; 16 | 17 | /** 18 | * An internal marker interface to defend against accidental recursive wrappings. 19 | */ 20 | interface Wrapped {} 21 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/timers/client/ClientExecutionTimeoutException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.http.timers.client; 16 | 17 | import com.ibm.cloud.objectstorage.SdkClientException; 18 | 19 | public class ClientExecutionTimeoutException extends SdkClientException { 20 | 21 | public ClientExecutionTimeoutException() { 22 | this("Client execution did not complete before the specified timeout configuration."); 23 | } 24 | 25 | public ClientExecutionTimeoutException(String message) { 26 | super(message); 27 | } 28 | 29 | private static final long serialVersionUID = 4861767589924758934L; 30 | 31 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/timers/client/SdkInterruptedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.http.timers.client; 16 | 17 | import com.ibm.cloud.objectstorage.Response; 18 | 19 | public class SdkInterruptedException extends InterruptedException { 20 | 21 | private static final long serialVersionUID = 8194951388566545094L; 22 | 23 | private final transient Response response; 24 | 25 | public SdkInterruptedException(Response response) { 26 | this.response = response; 27 | } 28 | 29 | public Response getResponse() { 30 | return response; 31 | } 32 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/timers/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016. Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | /** 17 | * Classes for the request timeout and client execution timeout features. See 18 | * {@link com.ibm.cloud.objectstorage.ClientConfiguration} and {@link com.ibm.cloud.objectstorage.AmazonWebServiceRequest} for 19 | * more information on enabling these features. All classes within this package are internal and 20 | * should not be used outside the SDK. 21 | */ 22 | @com.ibm.cloud.objectstorage.annotation.SdkInternalApi 23 | package com.ibm.cloud.objectstorage.http.timers; -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/timers/request/HttpRequestAbortTask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.http.timers.request; 16 | 17 | import com.ibm.cloud.objectstorage.annotation.SdkInternalApi; 18 | 19 | /** 20 | * Task to be scheduled by {@link HttpRequestTimer} 21 | */ 22 | @SdkInternalApi 23 | public interface HttpRequestAbortTask extends Runnable { 24 | 25 | public boolean httpRequestAborted(); 26 | 27 | public boolean isEnabled(); 28 | } 29 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/internal/CustomBackoffStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.internal; 16 | 17 | public abstract class CustomBackoffStrategy { 18 | public abstract int getBackoffPeriod(int retryAttempts); 19 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/internal/DynamoDBBackoffStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.internal; 16 | 17 | public class DynamoDBBackoffStrategy extends CustomBackoffStrategy { 18 | public int getBackoffPeriod(int retries) { 19 | 20 | if (retries <= 0) { 21 | return 0; 22 | } else { 23 | 24 | int delay = 50 * (int) Math.pow(2, retries - 1); 25 | 26 | if (delay < 0) { 27 | delay = Integer.MAX_VALUE; 28 | } 29 | 30 | return delay; 31 | } 32 | 33 | } 34 | 35 | public static final CustomBackoffStrategy DEFAULT = new DynamoDBBackoffStrategy(); 36 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/internal/MetricAware.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.internal; 16 | 17 | /** 18 | * Used to check if any metrics gathering activity is already turned on in one 19 | * of the underlying wrapped objects. 20 | */ 21 | public interface MetricAware { 22 | /** 23 | * Returns true if this object or one of it's inner wrapped objects has 24 | * metrics gathering activity turned on; false otherwise. 25 | */ 26 | public boolean isMetricActivated(); 27 | } 28 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/internal/SdkFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.internal; 16 | 17 | /** 18 | * Similar to the Function functional interface in Java 8. 19 | * 20 | * @param Input type 21 | * @param Output type 22 | */ 23 | public interface SdkFunction { 24 | 25 | Output apply(Input input); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/internal/SdkPredicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.internal; 16 | 17 | /** 18 | * Similar to Predicate functional interface in Java 8 19 | */ 20 | public abstract class SdkPredicate { 21 | 22 | /** 23 | * Evaluates this predicate on the given argument 24 | * 25 | * @param t 26 | * The input argument 27 | * @return true if the input argument matches the predicate, otherwise false 28 | */ 29 | public abstract boolean test(T t); 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/internal/auth/NoOpSignerProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights 3 | * Reserved. 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 | * A copy of the License is located at 8 | * 9 | * http://aws.amazon.com/apache2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | package com.ibm.cloud.objectstorage.internal.auth; 17 | 18 | import com.ibm.cloud.objectstorage.annotation.SdkInternalApi; 19 | import com.ibm.cloud.objectstorage.auth.NoOpSigner; 20 | import com.ibm.cloud.objectstorage.auth.Signer; 21 | 22 | @SdkInternalApi 23 | public class NoOpSignerProvider extends SignerProvider { 24 | 25 | private Signer signer; 26 | 27 | public NoOpSignerProvider() { 28 | this.signer = new NoOpSigner(); 29 | } 30 | 31 | @Override 32 | public Signer getSigner(SignerProviderContext context) { 33 | return signer; 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/internal/auth/SignerProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights 3 | * Reserved. 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 | * A copy of the License is located at 8 | * 9 | * http://aws.amazon.com/apache2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | package com.ibm.cloud.objectstorage.internal.auth; 17 | 18 | import com.ibm.cloud.objectstorage.auth.Signer; 19 | 20 | public abstract class SignerProvider { 21 | 22 | public abstract Signer getSigner(SignerProviderContext context); 23 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/internal/config/Builder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.internal.config; 16 | 17 | public interface Builder { 18 | public T build(); 19 | } 20 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/internal/http/ErrorCodeParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not 5 | * use this file except in compliance with the License. A copy of the License is 6 | * located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed on 11 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.internal.http; 16 | 17 | import com.ibm.cloud.objectstorage.annotation.SdkInternalApi; 18 | import com.ibm.cloud.objectstorage.http.HttpResponse; 19 | import com.ibm.cloud.objectstorage.protocol.json.JsonContent; 20 | 21 | @SdkInternalApi 22 | public interface ErrorCodeParser { 23 | String parseErrorCode(HttpResponse response, JsonContent jsonContent); 24 | } 25 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/log/CommonsLogFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.log; 16 | 17 | /** 18 | * Internal logging factory for the signers and core classes based on Jakarta 19 | * Commons Logging. 20 | */ 21 | public final class CommonsLogFactory extends InternalLogFactory { 22 | @Override 23 | protected InternalLogApi doGetLog(Class clazz) { 24 | return new CommonsLog( 25 | org.apache.commons.logging.LogFactory.getLog(clazz)); 26 | } 27 | 28 | @Override 29 | protected InternalLogApi doGetLog(String name) { 30 | return new CommonsLog( 31 | org.apache.commons.logging.LogFactory.getLog(name)); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/log/JulLogFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */package com.ibm.cloud.objectstorage.log; 15 | 16 | import java.util.logging.Logger; 17 | 18 | /** 19 | * Internal logging factory for the signers and core classes based on JUL. 20 | */ 21 | public final class JulLogFactory extends InternalLogFactory { 22 | @Override 23 | protected InternalLogApi doGetLog(Class clazz) { 24 | return new JulLog(Logger.getLogger(clazz.getName())); 25 | } 26 | 27 | @Override 28 | protected InternalLogApi doGetLog(String name) { 29 | return new JulLog(Logger.getLogger(name)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/metrics/MetricType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.metrics; 16 | 17 | /** 18 | * Metric type. 19 | */ 20 | public interface MetricType { 21 | /** 22 | * Non-null name of the metric type. Used to uniquely identify the metric 23 | * type. Therefore, the name returned must be globally unique across all 24 | * metric types that implement this interface. 25 | */ 26 | public String name(); 27 | } 28 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/metrics/RequestMetricType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.metrics; 16 | 17 | /** 18 | * Request metric type. 21 | */ 22 | public interface RequestMetricType extends MetricType { 23 | } 24 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/metrics/SimpleMetricType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.metrics; 16 | 17 | public abstract class SimpleMetricType implements MetricType { 18 | @Override public abstract String name(); 19 | 20 | @Override public final int hashCode() { return name().hashCode(); } 21 | @Override public final boolean equals(Object o) { 22 | if (!(o instanceof MetricType)) 23 | return false; 24 | MetricType that = (MetricType)o; 25 | return this.name().equals(that.name()); 26 | } 27 | @Override public final String toString() { return name(); } 28 | } 29 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/metrics/SimpleServiceMetricType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.metrics; 16 | 17 | public class SimpleServiceMetricType extends SimpleMetricType implements ServiceMetricType { 18 | private final String name; 19 | private final String serviceName; 20 | public SimpleServiceMetricType(String name, String serviceName) { 21 | this.name = name; 22 | this.serviceName = serviceName; 23 | } 24 | @Override public String name() { return name; } 25 | @Override public String getServiceName() { return serviceName; } 26 | } 27 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/metrics/SimpleThroughputMetricType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.metrics; 16 | 17 | public class SimpleThroughputMetricType extends SimpleServiceMetricType implements ThroughputMetricType { 18 | private final ServiceMetricType byteCountMetricType; 19 | public SimpleThroughputMetricType(String name, String serviceName, String byteCountMetricName) { 20 | super(name, serviceName); 21 | this.byteCountMetricType = new SimpleServiceMetricType(byteCountMetricName, serviceName); 22 | } 23 | 24 | @Override public ServiceMetricType getByteCountMetricType() { 25 | return byteCountMetricType; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/metrics/ThroughputMetricType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.metrics; 16 | 17 | public interface ThroughputMetricType extends ServiceMetricType { 18 | public ServiceMetricType getByteCountMetricType(); 19 | } 20 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/monitoring/MonitoringEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.monitoring; 17 | 18 | /** 19 | * A collection of key-value pair data, built by the SDK, that describes an event of interest occurring during SDK code execution. 20 | */ 21 | public interface MonitoringEvent { 22 | } 23 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/monitoring/MonitoringListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.monitoring; 17 | 18 | import com.ibm.cloud.objectstorage.monitoring.MonitoringEvent; 19 | 20 | /** 21 | * The abstract class for a system that consumes Monitoring Events. 22 | */ 23 | public abstract class MonitoringListener { 24 | 25 | /** 26 | * Handle a {@link MonitoringEvent} 27 | * 28 | * @param event a monitoring event 29 | */ 30 | public abstract void handleEvent(MonitoringEvent event); 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/oauth/TokenManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package com.ibm.cloud.objectstorage.oauth; 14 | 15 | /** 16 | * Interface to expose the method required for a class to implement a Token Manager. 17 | * Essentially a String representation of a valid token is required in the method response. 18 | * If a user wants to implement their own refresh token method they will have to use this interface also 19 | */ 20 | public interface TokenManager { 21 | 22 | /** 23 | * returns the access token string from the token 24 | * 25 | * @return String 26 | * An access token String value 27 | */ 28 | public String getToken(); 29 | } 30 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/oauth/TokenProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package com.ibm.cloud.objectstorage.oauth; 14 | 15 | import com.ibm.cloud.objectstorage.oauth.Token; 16 | 17 | /** 18 | * Interface to expose the method required for a class to implement a Token Provider. 19 | * The Token Manager will expect a Token object response. 20 | */ 21 | public interface TokenProvider { 22 | 23 | /** 24 | * Retrieve a Token representation of the json object 25 | * returned from the IAM Service synchronously 26 | * 27 | * 28 | * @return {@link Token} 29 | * The IAM Token 30 | */ 31 | public Token retrieveToken(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/protocol/StructuredPojo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.protocol; 16 | 17 | import com.ibm.cloud.objectstorage.annotation.SdkProtectedApi; 18 | 19 | /** 20 | * Interface implemented by model classes so that they may marshaller themselves. 21 | */ 22 | @SdkProtectedApi 23 | public interface StructuredPojo { 24 | 25 | /** 26 | * Marshalls this structured data using the given {@link ProtocolMarshaller}. 27 | * 28 | * @param protocolMarshaller Implementation of {@link ProtocolMarshaller} used to marshall this object's data. 29 | */ 30 | void marshall(ProtocolMarshaller protocolMarshaller); 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/regions/AwsEnvVarOverrideRegionProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.regions; 16 | 17 | import com.ibm.cloud.objectstorage.SdkClientException; 18 | 19 | import static com.ibm.cloud.objectstorage.SDKGlobalConfiguration.AWS_REGION_ENV_VAR; 20 | 21 | /** 22 | * Loads region information from the '{@value com.ibm.cloud.objectstorage.SDKGlobalConfiguration#AWS_REGION_ENV_VAR}' 23 | * environment variable. 24 | */ 25 | public class AwsEnvVarOverrideRegionProvider extends AwsRegionProvider { 26 | 27 | @Override 28 | public String getRegion() throws SdkClientException { 29 | return System.getenv(AWS_REGION_ENV_VAR); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/regions/AwsRegionProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.regions; 16 | 17 | import com.ibm.cloud.objectstorage.SdkClientException; 18 | 19 | /** 20 | * Interface for providing AWS region information. Implementations are free to use any strategy for 21 | * providing region information. 22 | */ 23 | public abstract class AwsRegionProvider { 24 | 25 | /** 26 | * @return Region name to use or null if region information is not available. 27 | */ 28 | public abstract String getRegion() throws SdkClientException; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/regions/AwsSystemPropertyRegionProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.regions; 16 | 17 | import com.ibm.cloud.objectstorage.SDKGlobalConfiguration; 18 | import com.ibm.cloud.objectstorage.SdkClientException; 19 | 20 | /** 21 | * Loads region information from the '{@value com.ibm.cloud.objectstorage.SDKGlobalConfiguration#AWS_REGION_SYSTEM_PROPERTY}' JVM system 22 | * property. 23 | */ 24 | public class AwsSystemPropertyRegionProvider extends AwsRegionProvider { 25 | 26 | @Override 27 | public String getRegion() throws SdkClientException { 28 | return System.getProperty(SDKGlobalConfiguration.AWS_REGION_SYSTEM_PROPERTY); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/regions/DefaultAwsRegionProviderChain.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.regions; 16 | 17 | /** 18 | * Default region provider chain used when no explicit region is supplied to a client builder. 19 | */ 20 | public class DefaultAwsRegionProviderChain extends AwsRegionProviderChain { 21 | 22 | public DefaultAwsRegionProviderChain() { 23 | super(new AwsEnvVarOverrideRegionProvider(), 24 | new AwsSystemPropertyRegionProvider(), 25 | new AwsProfileRegionProvider(), 26 | new InstanceMetadataRegionProvider()); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/retry/V2CompatibleBackoffStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.retry; 16 | 17 | import com.ibm.cloud.objectstorage.retry.v2.BackoffStrategy; 18 | 19 | /** 20 | * Adapter interface for backoff strategies that can be used in both legacy RetryPolicies and the new V2 retry policy. 21 | */ 22 | public interface V2CompatibleBackoffStrategy extends RetryPolicy.BackoffStrategy, BackoffStrategy { 23 | } 24 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/retry/v2/RetryCondition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.retry.v2; 16 | 17 | /** 18 | * Super interface for {@link RetryPolicy} used to define when a request should be retried. 19 | */ 20 | public interface RetryCondition { 21 | 22 | /** 23 | * Determine whether a request should or should not be retried. 24 | * 25 | * @param context Context about the state of the last request and information about the number of requests made. 26 | * @return True if the request should be retried, false if not. 27 | */ 28 | boolean shouldRetry(RetryPolicyContext context); 29 | } 30 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/retry/v2/RetryPolicy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.retry.v2; 16 | 17 | /** 18 | * Aggregate interface combining a {@link RetryCondition} and {@link BackoffStrategy} into a single policy. 19 | */ 20 | public interface RetryPolicy extends RetryCondition, BackoffStrategy { 21 | } 22 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/transform/Marshaller.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.transform; 16 | 17 | 18 | public interface Marshaller { 19 | 20 | T marshall(R in); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/transform/Unmarshaller.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.transform; 16 | 17 | public interface Unmarshaller { 18 | 19 | public T unmarshall(R in) throws Exception; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/transform/VoidJsonUnmarshaller.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.transform; 16 | 17 | 18 | /** 19 | * Simple unmarshaller that iterates through the JSON events but always 20 | * returns null. 21 | */ 22 | public class VoidJsonUnmarshaller implements Unmarshaller { 23 | public T unmarshall(JsonUnmarshallerContext context) throws Exception { 24 | return null; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/transform/VoidStaxUnmarshaller.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.transform; 16 | 17 | /** 18 | * Simple StAX unmarshaller that iterates through the XML events but always 19 | * returns null. 20 | */ 21 | public class VoidStaxUnmarshaller implements Unmarshaller { 22 | public T unmarshall(StaxUnmarshallerContext context) throws Exception { 23 | while (context.nextEvent().isEndDocument() == false); 24 | return null; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/transform/VoidUnmarshaller.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.transform; 16 | 17 | import org.w3c.dom.Node; 18 | 19 | /** 20 | * Simple Unmarshaller implementation that always returns null. 21 | */ 22 | public class VoidUnmarshaller implements Unmarshaller { 23 | /** 24 | * @see com.ibm.cloud.objectstorage.transform.Unmarshaller#unmarshall(java.lang.Object) 25 | */ 26 | public Void unmarshall(Node in) throws Exception { 27 | return null; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/util/Codec.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.util; 16 | 17 | /** 18 | * Codec SPI 19 | * 20 | * @author Hanson Char 21 | */ 22 | interface Codec { 23 | public byte[] encode(byte[] src); 24 | public byte[] decode(byte[] src, final int length); 25 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/util/EncodingScheme.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.util; 16 | 17 | /** 18 | * Encoding scheme. 19 | * 20 | * @author Hanson Char 21 | */ 22 | public interface EncodingScheme { 23 | public String encodeAsString(byte[] bytes); 24 | public byte[] decode(String encoded); 25 | } 26 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/util/FakeIOException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016. Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.util; 17 | 18 | import java.io.IOException; 19 | 20 | /** 21 | * Used for simulating an IOException for test purposes. 22 | */ 23 | public class FakeIOException extends IOException { 24 | private static final long serialVersionUID = 1L; 25 | 26 | public FakeIOException(String message) { 27 | super(message); 28 | } 29 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/util/NumberUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.util; 16 | 17 | public final class NumberUtils { 18 | 19 | private NumberUtils() { 20 | } 21 | 22 | /** 23 | * @param toParse 24 | * @return {@link Integer} or null if string can't be parsed 25 | */ 26 | public static Integer tryParseInt(String toParse) { 27 | try { 28 | return Integer.parseInt(toParse); 29 | } catch (NumberFormatException e) { 30 | return null; 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/util/SdkRuntime.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.util; 16 | 17 | public enum SdkRuntime { 18 | ; 19 | 20 | /** 21 | * Returns true if the current operation should abort; false otherwise. 22 | * Note the interrupted status of the thread is cleared by this method. 23 | */ 24 | public static boolean shouldAbort() { 25 | return Thread.interrupted(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/util/StringMapBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.util; 16 | 17 | /** 18 | * A convenient map builder for Strings. 19 | */ 20 | public class StringMapBuilder extends 21 | ImmutableMapParameter.Builder { 22 | public StringMapBuilder() {} 23 | public StringMapBuilder(String key, String value) { 24 | super.put(key, value); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/util/endpoint/DefaultRegionFromEndpointResolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.util.endpoint; 16 | 17 | import com.ibm.cloud.objectstorage.util.AwsHostNameUtils; 18 | 19 | /** 20 | * A default implementation of {@link RegionFromEndpointResolver} that only considers what is available in the host 21 | * name itself. 22 | * 23 | * @see AwsHostNameUtils#parseRegion(String, String) 24 | */ 25 | public class DefaultRegionFromEndpointResolver implements RegionFromEndpointResolver { 26 | @Override 27 | public String guessRegionFromEndpoint(String host, String serviceHint) { 28 | return AwsHostNameUtils.parseRegion(host, serviceHint); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/waiters/HttpSuccessStatusAcceptor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.waiters; 17 | 18 | import com.ibm.cloud.objectstorage.annotation.SdkProtectedApi; 19 | 20 | @SdkProtectedApi 21 | public class HttpSuccessStatusAcceptor extends WaiterAcceptor{ 22 | 23 | private final WaiterState waiterState; 24 | 25 | public HttpSuccessStatusAcceptor(WaiterState waiterState) { 26 | this.waiterState = waiterState; 27 | } 28 | 29 | @Override 30 | public boolean matches(Output output) { 31 | return true; 32 | } 33 | 34 | @Override 35 | public WaiterState getState() { 36 | return waiterState; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/waiters/NoOpWaiterHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.waiters; 17 | 18 | import com.ibm.cloud.objectstorage.AmazonWebServiceRequest; 19 | import com.ibm.cloud.objectstorage.annotation.SdkInternalApi; 20 | 21 | @SdkInternalApi 22 | public class NoOpWaiterHandler extends WaiterHandler{ 23 | 24 | @Override 25 | public void onWaitSuccess(AmazonWebServiceRequest request) { 26 | } 27 | 28 | @Override 29 | public void onWaitFailure(Exception e) { 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/waiters/SdkFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.waiters; 17 | 18 | import com.ibm.cloud.objectstorage.annotation.SdkProtectedApi; 19 | 20 | @SdkProtectedApi 21 | public interface SdkFunction { 22 | 23 | /** 24 | * Abstract method that makes a call to the operation 25 | * specified by the waiter by taking the corresponding 26 | * input and returns the corresponding output 27 | * 28 | * @param input Corresponding request for the operation 29 | * @return Corresponding result of the operation 30 | */ 31 | Output apply(Input input); 32 | } 33 | 34 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/waiters/WaiterHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.waiters; 17 | 18 | import com.ibm.cloud.objectstorage.AmazonWebServiceRequest; 19 | 20 | /** 21 | * Callbacks are executed synchronously. That is the same thread the waiter 22 | * completes on and it's not submitted back to the executor. 23 | */ 24 | public abstract class WaiterHandler { 25 | 26 | public abstract void onWaitSuccess(Input request); 27 | 28 | public abstract void onWaitFailure(Exception e); 29 | } 30 | 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/waiters/WaiterState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.waiters; 17 | 18 | import com.ibm.cloud.objectstorage.annotation.SdkProtectedApi; 19 | 20 | @SdkProtectedApi 21 | public enum WaiterState { 22 | /** 23 | * Three different states a resource can be based 24 | * on the waiter definition 25 | */ 26 | SUCCESS, RETRY, FAILURE 27 | } 28 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/waiters/WaiterTimedOutException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.waiters; 17 | 18 | import com.ibm.cloud.objectstorage.SdkClientException; 19 | 20 | public class WaiterTimedOutException extends SdkClientException { 21 | 22 | /** 23 | * Constructs a new WaiterTimedOutException with the specified error 24 | * message. 25 | * 26 | * @param message Describes the error encountered. 27 | */ 28 | public WaiterTimedOutException(String message) { 29 | super(message); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/waiters/WaiterUnrecoverableException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.waiters; 17 | 18 | import com.ibm.cloud.objectstorage.SdkClientException; 19 | 20 | public class WaiterUnrecoverableException extends SdkClientException { 21 | 22 | /** 23 | * Constructs a new WaiterUnrecoverableException with the specified error 24 | * message. 25 | * 26 | * @param message Describes the error encountered. 27 | */ 28 | public WaiterUnrecoverableException(String message) { 29 | super(message); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/main/resources/com/ibm/cloud/objectstorage/sdk/versionInfo.properties: -------------------------------------------------------------------------------- 1 | #Mon Jan 10 19:53:13 UTC 2022 2 | platform=java 3 | version=2.11 4 | internalVersion=6069329519 5 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/SystemDefaultDnsResolverTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage; 16 | 17 | import static org.junit.Assert.*; 18 | 19 | import org.junit.Test; 20 | 21 | public class SystemDefaultDnsResolverTest { 22 | 23 | @Test 24 | public void testResolveLocalhost() throws Exception { 25 | DnsResolver resolver = new SystemDefaultDnsResolver(); 26 | assertNotNull(resolver.resolve("127.0.0.1")); 27 | assertEquals("Should resolve to 1 address", 1, resolver.resolve("127.0.0.1").length); 28 | assertTrue("Should resolve localhost", resolver.resolve("localhost").length > 0); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/auth/AbstractAWSSignerTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016. Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.auth; 17 | 18 | import static org.junit.Assert.assertEquals; 19 | 20 | import org.junit.Test; 21 | 22 | public class AbstractAWSSignerTest { 23 | 24 | @Test 25 | public void test() { 26 | assertEquals( 27 | "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", 28 | AbstractAWSSigner.EMPTY_STRING_SHA256_HEX); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/auth/json/JsonConfigFileTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.auth.json; 16 | 17 | import org.junit.Test; 18 | 19 | import com.ibm.cloud.objectstorage.auth.json.JsonConfigFile; 20 | 21 | import java.io.File; 22 | 23 | /** 24 | * Unit Tests for {@link ProfilesConfigFile} 25 | */ 26 | public class JsonConfigFileTest { 27 | 28 | @Test(expected = IllegalArgumentException.class) 29 | public void file_is_null_throws_exception() { 30 | new JsonConfigFile((File) null); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/auth/profile/ProfilesConfigFileTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.auth.profile; 16 | 17 | import org.junit.Test; 18 | 19 | import java.io.File; 20 | 21 | /** 22 | * Unit Tests for {@link ProfilesConfigFile} 23 | */ 24 | public class ProfilesConfigFileTest { 25 | 26 | // https://github.com/aws/aws-sdk-java/issues/812 27 | @Test(expected = IllegalArgumentException.class) 28 | public void file_is_null_throws_exception() { 29 | new ProfilesConfigFile((File) null); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/http/OverloadedMockServerTestBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights 3 | * Reserved. 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 | * A copy of the License is located at 8 | * 9 | * http://aws.amazon.com/apache2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is 12 | * distributed 13 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | * KIND, either 15 | * express or implied. See the License for the specific language 16 | * governing 17 | * permissions and limitations under the License. 18 | */ 19 | package com.ibm.cloud.objectstorage.http; 20 | 21 | import com.ibm.cloud.objectstorage.http.server.MockServer; 22 | import com.ibm.cloud.objectstorage.http.server.MockServer.ServerBehavior; 23 | 24 | public abstract class OverloadedMockServerTestBase extends MockServerTestBase { 25 | @Override 26 | protected MockServer buildMockServer() { 27 | return MockServer.createMockServer(ServerBehavior.OVERLOADED); 28 | } 29 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/http/UnresponsiveMockServerTestBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights 3 | * Reserved. 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 | * A copy of the License is located at 8 | * 9 | * http://aws.amazon.com/apache2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is 12 | * distributed 13 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | * KIND, either 15 | * express or implied. See the License for the specific language 16 | * governing 17 | * permissions and limitations under the License. 18 | */ 19 | package com.ibm.cloud.objectstorage.http; 20 | 21 | import com.ibm.cloud.objectstorage.http.server.MockServer; 22 | import com.ibm.cloud.objectstorage.http.server.MockServer.ServerBehavior; 23 | 24 | public abstract class UnresponsiveMockServerTestBase extends MockServerTestBase { 25 | @Override 26 | protected MockServer buildMockServer() { 27 | return MockServer.createMockServer(ServerBehavior.UNRESPONSIVE); 28 | } 29 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/http/conn/SdkPlainSocketFactoryProxyIntegrationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.http.conn; 17 | 18 | import org.apache.http.conn.socket.ConnectionSocketFactory; 19 | 20 | /** 21 | * Proxy integration tests for {@link SdkPlainSocketFactory}. 22 | */ 23 | public class SdkPlainSocketFactoryProxyIntegrationTest extends AbstractConnectionSocketFactoryProxyIntegrationTestBase { 24 | @Override 25 | protected ConnectionSocketFactory getFactory() { 26 | return new SdkPlainSocketFactory(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/http/request/RequestHandlerTestUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.http.request; 16 | 17 | import java.util.List; 18 | import java.util.ArrayList; 19 | 20 | import com.ibm.cloud.objectstorage.handlers.RequestHandler2; 21 | 22 | public class RequestHandlerTestUtils { 23 | 24 | public static List buildRequestHandlerList(RequestHandler2... requestHandlers) { 25 | List requestHandlerList = new ArrayList(); 26 | for(RequestHandler2 requestHandler : requestHandlers) { 27 | requestHandlerList.add(requestHandler); 28 | } 29 | return requestHandlerList; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/http/response/ErrorDuringUnmarshallingResponseHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016. Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.http.response; 17 | 18 | import com.ibm.cloud.objectstorage.AmazonWebServiceResponse; 19 | import com.ibm.cloud.objectstorage.http.HttpResponse; 20 | 21 | public class ErrorDuringUnmarshallingResponseHandler extends NullResponseHandler { 22 | @Override 23 | public AmazonWebServiceResponse handle(HttpResponse response) throws Exception { 24 | throw new RuntimeException("Unable to unmarshall response"); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/oauth/CredentialProviderUtil.java: -------------------------------------------------------------------------------- 1 | package com.ibm.cloud.objectstorage.oauth; 2 | 3 | import com.ibm.cloud.objectstorage.auth.AWSCredentials; 4 | import com.ibm.cloud.objectstorage.auth.AWSCredentialsProvider; 5 | import com.ibm.cloud.objectstorage.oauth.BasicIBMOAuthCredentials; 6 | import com.ibm.cloud.objectstorage.oauth.DefaultTokenManager; 7 | import com.ibm.cloud.objectstorage.oauth.TokenManager; 8 | import com.ibm.cloud.objectstorage.oauth.TokenProvider; 9 | 10 | public class CredentialProviderUtil implements AWSCredentialsProvider{ 11 | 12 | TokenManager tokenManager; 13 | 14 | public CredentialProviderUtil(TokenProvider tokenProvider) { 15 | this.tokenManager = new DefaultTokenManager(tokenProvider); 16 | } 17 | 18 | public CredentialProviderUtil(TokenManager tokenManger) { 19 | this.tokenManager = tokenManger; 20 | } 21 | 22 | @Override 23 | public AWSCredentials getCredentials() { 24 | BasicIBMOAuthCredentials oAuthCredentials = new BasicIBMOAuthCredentials(tokenManager); 25 | 26 | return oAuthCredentials; 27 | } 28 | 29 | @Override 30 | public void refresh() { 31 | // TODO Auto-generated method stub 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/oauth/ManagerThreadUtil.java: -------------------------------------------------------------------------------- 1 | package com.ibm.cloud.objectstorage.oauth; 2 | 3 | import com.ibm.cloud.objectstorage.oauth.TokenManager; 4 | 5 | public class ManagerThreadUtil implements Runnable{ 6 | 7 | TokenManager tokenManager; 8 | 9 | public ManagerThreadUtil(TokenManager tokenManager) { 10 | 11 | this.tokenManager = tokenManager; 12 | } 13 | 14 | @Override 15 | public void run() { 16 | tokenManager.getToken(); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/oauth/TokenManagerUtil.java: -------------------------------------------------------------------------------- 1 | package com.ibm.cloud.objectstorage.oauth; 2 | 3 | import com.ibm.cloud.objectstorage.oauth.TokenManager; 4 | 5 | public class TokenManagerUtil implements TokenManager{ 6 | 7 | @Override 8 | public String getToken() { 9 | 10 | return "TokenManagerAccessToken"; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/oauth/TokenProviderNull.java: -------------------------------------------------------------------------------- 1 | package com.ibm.cloud.objectstorage.oauth; 2 | 3 | import com.ibm.cloud.objectstorage.oauth.Token; 4 | import com.ibm.cloud.objectstorage.oauth.TokenProvider; 5 | 6 | public class TokenProviderNull implements TokenProvider{ 7 | 8 | public TokenProviderNull() { 9 | } 10 | 11 | @Override 12 | public Token retrieveToken() { 13 | 14 | return null; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/oauth/TokenProviderUtil.java: -------------------------------------------------------------------------------- 1 | package com.ibm.cloud.objectstorage.oauth; 2 | 3 | import com.ibm.cloud.objectstorage.oauth.Token; 4 | import com.ibm.cloud.objectstorage.oauth.TokenProvider; 5 | 6 | public class TokenProviderUtil implements TokenProvider{ 7 | 8 | public TokenProviderUtil() { 9 | } 10 | 11 | @Override 12 | public Token retrieveToken() { 13 | 14 | Token token = new Token(); 15 | token.setAccess_token("ProviderAccessToken"); 16 | 17 | final long expiration = (System.currentTimeMillis() / 1000L) + 3600; 18 | 19 | token = new Token(); 20 | token.setAccess_token("ProviderAccessToken"); 21 | token.setRefresh_token("ProviderRefreshToken"); 22 | token.setToken_type("Bearer"); 23 | token.setExpires_in("3600"); 24 | token.setExpiration(String.valueOf(expiration)); 25 | 26 | return token; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/regions/CustomRegionFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.regions; 16 | 17 | public class CustomRegionFactory { 18 | 19 | public static Region getCustomRegion(String name, String domain) { 20 | return new Region(new InMemoryRegionImpl(name, domain)); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/util/JodaTimeTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights 3 | * Reserved. 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 | * A copy of the License is located at 8 | * 9 | * http://aws.amazon.com/apache2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is 12 | * distributed 13 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | * KIND, either 15 | * express or implied. See the License for the specific language 16 | * governing 17 | * permissions and limitations under the License. 18 | */ 19 | package com.ibm.cloud.objectstorage.util; 20 | 21 | import static org.junit.Assert.*; 22 | 23 | import org.junit.Test; 24 | 25 | public class JodaTimeTest { 26 | 27 | @Test 28 | public void hasExpectedBehavior() { 29 | assertTrue(JodaTime.hasExpectedBehavior()); 30 | } 31 | 32 | @Test 33 | public void version() { 34 | String version = JodaTime.getVersion(); 35 | assertNotNull(version); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/com/ibm/cloud/objectstorage/util/StreamUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights 3 | * Reserved. 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 | * A copy of the License is located at 8 | * 9 | * http://aws.amazon.com/apache2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is 12 | * distributed 13 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | * KIND, either 15 | * express or implied. See the License for the specific language 16 | * governing 17 | * permissions and limitations under the License. 18 | */ 19 | package com.ibm.cloud.objectstorage.util; 20 | 21 | import java.io.IOException; 22 | import java.io.InputStream; 23 | 24 | public class StreamUtils { 25 | public static void consumeInputStream(InputStream in) throws IOException { 26 | byte[] buffer = new byte[1024 * 10]; 27 | while (in.read(buffer) > -1) { 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/utils/Retryable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with 5 | * the License. A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 10 | * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | package utils; 14 | 15 | import java.lang.annotation.Retention; 16 | import java.lang.annotation.RetentionPolicy; 17 | import java.lang.annotation.Target; 18 | 19 | import static java.lang.annotation.ElementType.METHOD; 20 | 21 | /** 22 | * @see RetryableTestRule 23 | */ 24 | @Retention(RetentionPolicy.RUNTIME) 25 | @Target(METHOD) 26 | public @interface Retryable { 27 | /** 28 | * Max attempts. 29 | */ 30 | int value() default 3; 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/utils/builder/StaticExecutorFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package utils.builder; 16 | 17 | import com.ibm.cloud.objectstorage.client.builder.ExecutorFactory; 18 | 19 | import java.util.concurrent.ExecutorService; 20 | 21 | /** 22 | * Mock {@link ExecutorFactory} that just returns the same executor every time. 23 | */ 24 | public class StaticExecutorFactory implements ExecutorFactory { 25 | 26 | private final ExecutorService executorService; 27 | 28 | public StaticExecutorFactory(ExecutorService executorService) { 29 | this.executorService = executorService; 30 | } 31 | 32 | @Override 33 | public ExecutorService newExecutor() { 34 | return executorService; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/utils/http/SocketUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package utils.http; 16 | 17 | import java.io.IOException; 18 | import java.net.ServerSocket; 19 | 20 | public class SocketUtils { 21 | 22 | /** 23 | * Returns an unused port in the localhost. 24 | */ 25 | public static int getUnusedPort() throws IOException { 26 | ServerSocket socket = new ServerSocket(0); 27 | socket.setReuseAddress(true); 28 | int port = socket.getLocalPort(); 29 | socket.close(); 30 | return port; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/java/utils/model/EmptyAmazonWebServiceRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package utils.model; 16 | 17 | import com.ibm.cloud.objectstorage.AmazonWebServiceRequest; 18 | 19 | public class EmptyAmazonWebServiceRequest extends AmazonWebServiceRequest { 20 | } 21 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/.gitkeep-AWSJavaClientSigners: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/ibm-cos-sdk-java/310004bc80348d113f51eff5a493ae47578073c4/ibm-cos-java-sdk-core/src/test/resources/.gitkeep-AWSJavaClientSigners -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/awssdk_config_default.json: -------------------------------------------------------------------------------- 1 | // a fake config file put at the root of the classpath 2 | { 3 | } 4 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/com/ibm/cloud/objectstorage/auth/AwsCredentials.properties: -------------------------------------------------------------------------------- 1 | accessKey=testKey 2 | secretKey=secretKey 3 | accountId=testId 4 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/com/ibm/cloud/objectstorage/auth/sessionResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "Code" : "Success", 3 | "LastUpdated" : "2012-05-02T22:55:54Z", 4 | "Type" : "AWS-HMAC", 5 | "AccessKeyId" : "ACCESS_KEY_ID", 6 | "SecretAccessKey" : "SECRET_ACCESS_KEY", 7 | "Token" : "TOKEN_TOKEN_TOKEN", 8 | "Expiration" : "3000-05-03T04:55:54Z" 9 | } 10 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/com/ibm/cloud/objectstorage/auth/sessionResponseExpired.json: -------------------------------------------------------------------------------- 1 | { 2 | "Code" : "Success", 3 | "LastUpdated" : "2012-05-02T22:55:54Z", 4 | "Type" : "AWS-HMAC", 5 | "AccessKeyId" : "ACCESS_KEY_ID", 6 | "SecretAccessKey" : "SECRET_ACCESS_KEY", 7 | "Token" : "TOKEN_TOKEN_TOKEN", 8 | "Expiration" : "2012-05-03T04:55:54Z" 9 | } 10 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/com/ibm/cloud/objectstorage/regions/fake-regions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | us-east-1 5 | hostname.com 6 | 7 | cloudformation 8 | false 9 | true 10 | fake.hostname.com 11 | 12 | 13 | 14 | us-west-1 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/client-tls-auth/bad-cert.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/ibm-cos-sdk-java/310004bc80348d113f51eff5a493ae47578073c4/ibm-cos-java-sdk-core/src/test/resources/resources/client-tls-auth/bad-cert.p12 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/client-tls-auth/client1.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/ibm-cos-sdk-java/310004bc80348d113f51eff5a493ae47578073c4/ibm-cos-java-sdk-core/src/test/resources/resources/client-tls-auth/client1.p12 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/client-tls-auth/server-keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/ibm-cos-sdk-java/310004bc80348d113f51eff5a493ae47578073c4/ibm-cos-java-sdk-core/src/test/resources/resources/client-tls-auth/server-keystore -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/jsonconfig/BasicCredentials.json: -------------------------------------------------------------------------------- 1 | { 2 | "apikey": "vibm_api_key_id", 3 | "cos_hmac_keys": 4 | { 5 | "access_key_id": "vaws_access_key_id", 6 | "secret_access_key": "vaws_secret_access_key" 7 | }, 8 | "endpoints": "vendpoints", 9 | "iam_auth_endpoint": "viam_auth_endpoint", 10 | "iam_apikey_description": "", 11 | "iam_apikey_name": "", 12 | "iam_role_crn": "", 13 | "iam_serviceid_crn": "vibm_kp_root_key_crn", 14 | "resource_instance_id": "vibm_service_instance_id" 15 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/jsonconfig/BasicCredentials2.json: -------------------------------------------------------------------------------- 1 | { 2 | "apikey": "vibm_api_key_id_2", 3 | "cos_hmac_keys": 4 | { 5 | "access_key_id": "vaws_access_key_id_2", 6 | "secret_access_key": "vaws_secret_access_key_2" 7 | }, 8 | "endpoints": "vendpoints", 9 | "iam_auth_endpoint": "viam_auth_endpoint", 10 | "iam_apikey_description": "", 11 | "iam_apikey_name": "", 12 | "iam_role_crn": "", 13 | "iam_serviceid_crn": "vibm_kp_root_key_crn", 14 | "resource_instance_id": "vibm_service_instance_id_2" 15 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/jsonconfig/CredentialsContainingHmacAndOAuth.json: -------------------------------------------------------------------------------- 1 | { 2 | "apikey": "vibm_api_key_id", 3 | "cos_hmac_keys": 4 | { 5 | "access_key_id": "vaws_access_key_id", 6 | "secret_access_key": "vaws_secret_access_key" 7 | }, 8 | "endpoints": "vendpoints", 9 | "iam_auth_endpoint": "viam_auth_endpoint", 10 | "iam_apikey_description": "", 11 | "iam_apikey_name": "", 12 | "iam_role_crn": "", 13 | "iam_serviceid_crn": "vibm_kp_root_key_crn", 14 | "resource_instance_id": "vibm_service_instance_id" 15 | } 16 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/jsonconfig/CredentialsWithAccessKeyNotSpecified.json: -------------------------------------------------------------------------------- 1 | { 2 | "apikey": "vibm_api_key_id", 3 | "cos_hmac_keys": 4 | { 5 | "secret_access_key": "vaws_secret_access_key" 6 | }, 7 | "endpoints": "vendpoints", 8 | "iam_auth_endpoint": "viam_auth_endpoint", 9 | "iam_apikey_description": "", 10 | "iam_apikey_name": "", 11 | "iam_role_crn": "", 12 | "iam_serviceid_crn": "vibm_kp_root_key_crn", 13 | "resource_instance_id": "vibm_service_instance_id" 14 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/jsonconfig/CredentialsWithEmptyAccessKey.json: -------------------------------------------------------------------------------- 1 | { 2 | "apikey": "vibm_api_key_id", 3 | "cos_hmac_keys": 4 | { 5 | "access_key_id": "", 6 | "secret_access_key": "vaws_secret_access_key" 7 | }, 8 | "endpoints": "vendpoints", 9 | "iam_auth_endpoint": "viam_auth_endpoint", 10 | "iam_apikey_description": "", 11 | "iam_apikey_name": "", 12 | "iam_role_crn": "", 13 | "iam_serviceid_crn": "vibm_kp_root_key_crn", 14 | "resource_instance_id": "vibm_service_instance_id" 15 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/jsonconfig/CredentialsWithEmptySecretAccessKey.json: -------------------------------------------------------------------------------- 1 | { 2 | "apikey": "vibm_api_key_id", 3 | "cos_hmac_keys": 4 | { 5 | "access_key_id": "vaws_access_key_id", 6 | "secret_access_key": "" 7 | }, 8 | "endpoints": "vendpoints", 9 | "iam_auth_endpoint": "viam_auth_endpoint", 10 | "iam_apikey_description": "", 11 | "iam_apikey_name": "", 12 | "iam_role_crn": "", 13 | "iam_serviceid_crn": "vibm_kp_root_key_crn", 14 | "resource_instance_id": "vibm_service_instance_id" 15 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/jsonconfig/CredentialsWithHmacAndOAuthNotSpecified.json: -------------------------------------------------------------------------------- 1 | { 2 | "endpoints": "vendpoints", 3 | "iam_auth_endpoint": "viam_auth_endpoint", 4 | "iam_apikey_description": "", 5 | "iam_apikey_name": "", 6 | "iam_role_crn": "", 7 | "iam_serviceid_crn": "vibm_kp_root_key_crn" 8 | } 9 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/jsonconfig/CredentialsWithSecretAccessKeyNotSpecified.json: -------------------------------------------------------------------------------- 1 | { 2 | "apikey": "vibm_api_key_id", 3 | "cos_hmac_keys": 4 | { 5 | "access_key_id": "vaws_access_key_id" 6 | }, 7 | "endpoints": "vendpoints", 8 | "iam_auth_endpoint": "viam_auth_endpoint", 9 | "iam_apikey_description": "", 10 | "iam_apikey_name": "", 11 | "iam_role_crn": "", 12 | "iam_serviceid_crn": "vibm_kp_root_key_crn", 13 | "resource_instance_id": "vibm_service_instance_id" 14 | } -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/AccessKeyNotSpecified.tst: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id=testDefault 3 | aws_secret_access_key=testDefault 4 | [test] 5 | aws_access_key_id=testProfile1 6 | aws_secret_access_key=testProfile1 7 | [test2] 8 | aws_secret_access_key=testProfile2 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/BasicConfig.tst: -------------------------------------------------------------------------------- 1 | [default] 2 | foo = bar 3 | hello = world -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/BasicProfile.tst: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id = defaultAccessKey 3 | aws_secret_access_key = defaultSecretAccessKey 4 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/BasicProfile2.tst: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id = accessKey2 3 | aws_secret_access_key = secretAccessKey2 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/DuplicateProfileWithAndWithoutProfilePrefix.tst: -------------------------------------------------------------------------------- 1 | [test] 2 | aws_access_key_id = withoutPrefix 3 | aws_secret_access_key = withoutPrefix 4 | aws_session_token = withoutPrefix 5 | 6 | [profile test] 7 | aws_access_key_id = withPrefix 8 | aws_secret_access_key = withPrefix 9 | aws_session_token = withPrefix -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfileNameWithNoBraces.tst: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id=testDefault 3 | aws_secret_access_key=testDefault 4 | test 5 | aws_access_key_id=testProfile 6 | aws_secret_access_key=testProfile -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfileNameWithNoClosingBraces.tst: -------------------------------------------------------------------------------- 1 | [default 2 | aws_access_key_id=testDefault 3 | aws_secret_access_key=testDefault 4 | [ ] 5 | aws_access_key_id=testProfile 6 | aws_secret_access_key=testProfile -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfileNameWithNoOpeningBraces.tst: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id=testDefault 3 | aws_secret_access_key=testDefault 4 | test] 5 | aws_access_key_id=testProfile 6 | aws_secret_access_key=testProfile -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfileNameWithSpaces.tst: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id=testDefault 3 | aws_secret_access_key=testDefault 4 | [ ] 5 | aws_access_key_id=testProfile 6 | aws_secret_access_key=testProfile -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfileWithEmptyAccessKey.tst: -------------------------------------------------------------------------------- 1 | [test] 2 | aws_access_key_id= 3 | aws_secret_access_key=testProfile1 4 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfileWithEmptySecretKey.tst: -------------------------------------------------------------------------------- 1 | [test] 2 | aws_access_key_id=abcd 3 | aws_secret_access_key= 4 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfileWithProfilePrefix.tst: -------------------------------------------------------------------------------- 1 | [profile test] 2 | aws_access_key_id = withPrefix 3 | aws_secret_access_key = withPrefix 4 | aws_session_token = withPrefix -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfileWithRole.tst: -------------------------------------------------------------------------------- 1 | [source] 2 | aws_access_key_id=defaultAccessKey 3 | aws_secret_access_key=defaultSecretAccessKey 4 | 5 | [test] 6 | source_profile=source 7 | role_arn=arn:aws:iam::123456789012:role/testRole -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfileWithRole2.tst: -------------------------------------------------------------------------------- 1 | [source] 2 | aws_access_key_id=defaultAccessKey 3 | aws_secret_access_key=defaultSecretAccessKey 4 | 5 | [test] 6 | source_profile=source 7 | role_arn=arn:aws:iam::123456789012:role/testRole 8 | role_session_name=testSessionName 9 | external_id=testExternalId -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfileWithSourceAfterRole.tst: -------------------------------------------------------------------------------- 1 | [test] 2 | source_profile=source 3 | role_arn=arn:aws:iam::123456789012:role/testRole 4 | 5 | [source] 6 | aws_access_key_id=defaultAccessKey 7 | aws_secret_access_key=defaultSecretAccessKey -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfilesContainingOtherConfigurations.tst: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_secret_access_key = defaultAccessKey 3 | aws_access_key_id = defaultSecretAccessKey 4 | region = us-west-2 5 | 6 | 7 | [test] 8 | output = sdfsdf 9 | region = saa 10 | aws_access_key_id = test 11 | aws_secret_access_key = test key 12 | 13 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfilesWithComments.tst: -------------------------------------------------------------------------------- 1 | # I love comments... 2 | 3 | # [a] 4 | [a] 5 | #aws_access_key_id=wrong-key 6 | aws_access_key_id=a 7 | # More comments... 8 | aws_secret_access_key=a 9 | unsupported_property=foo 10 | 11 | # More comments... 12 | 13 | [b] 14 | # More comments... 15 | aws_access_key_id=b 16 | aws_secret_access_key=b 17 | 18 | [c] 19 | aws_access_key_id=c 20 | # More comments... 21 | aws_secret_access_key=c 22 | aws_session_token=c 23 | 24 | [d] 25 | aws_access_key_id=d 26 | aws_secret_access_key=d 27 | # More comments... 28 | aws_session_token=d 29 | 30 | # More comments... 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfilesWithNoProfileName.tst: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id=testDefault 3 | aws_secret_access_key=testDefault 4 | [] 5 | aws_access_key_id=testProfile 6 | aws_secret_access_key=testProfile -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfilesWithSameProfileName.tst: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id=testDefault 3 | aws_secret_access_key=testDefault 4 | [test] 5 | aws_access_key_id=testProfile1 6 | aws_secret_access_key=testProfile1 7 | [test] 8 | aws_access_key_id=testProfile2 9 | aws_secret_access_key=testProfile2 10 | aws_session_token = testProfile2 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfilesWithSecretAccessKeyNotSpecified.tst: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id=testDefault 3 | aws_secret_access_key=testDefault 4 | [profile test] 5 | aws_access_key_id=testProfile1 6 | aws_secret_access_key=testProfile1 7 | [profile test2] 8 | aws_access_key_id=testProfile2 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/ProfilesWithTwoAccessKeyUnderSameProfile.tst: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id=testDefault 3 | aws_secret_access_key=testDefault 4 | [profile test] 5 | aws_access_key_id=testProfile1 6 | aws_secret_access_key=testProfile1 7 | [profile test2] 8 | aws_access_key_id=testProfile2 9 | aws_access_key_id=testProfile3 10 | aws_secret_access_key=testProfile2 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/RoleProfileMissingSource.tst: -------------------------------------------------------------------------------- 1 | [test] 2 | source_profile=source 3 | role_arn=arn:aws:iam::123456789012:role/testRole -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/RoleProfileWithEmptySourceName.tst: -------------------------------------------------------------------------------- 1 | [test] 2 | source_profile= 3 | role_arn=arn:aws:iam::123456789012:role/testRole 4 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/RoleProfileWithNoSourceName.tst: -------------------------------------------------------------------------------- 1 | [test] 2 | role_arn=arn:aws:iam::123456789012:role/testRole -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/profileconfig/RoleProfileWithRoleSource.tst: -------------------------------------------------------------------------------- 1 | [source] 2 | aws_access_key_id=defaultAccessKey 3 | aws_secret_access_key=defaultSecretAccessKey 4 | 5 | [test] 6 | source_profile=source 7 | role_arn=arn:aws:iam::123456789012:role/testRole 8 | 9 | [test2] 10 | source_profile=test 11 | role_arn=arn:aws:iam::123456789012:role/testRole2 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/wiremock/successResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "AccessKeyId" : "ACCESS_KEY_ID", 3 | "SecretAccessKey" : "SECRET_ACCESS_KEY", 4 | "AccountId" : "ACCOUNT_ID", 5 | "Token" : "TOKEN_TOKEN_TOKEN", 6 | "Expiration" : "3000-05-03T04:55:54Z" 7 | } 8 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/wiremock/successResponseWithInvalidBody.json: -------------------------------------------------------------------------------- 1 | { 2 | "AccessKeyId" : "ACCESS_KEY_ID", 3 | "Token" : "TOKEN_TOKEN_TOKEN", 4 | "Expiration" : "3000-05-03T04:55:54Z" 5 | } 6 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-core/src/test/resources/resources/wiremock/successResponseWithoutAccountId.json: -------------------------------------------------------------------------------- 1 | { 2 | "AccessKeyId" : "ACCESS_KEY_ID", 3 | "SecretAccessKey" : "SECRET_ACCESS_KEY", 4 | "Token" : "TOKEN_TOKEN_TOKEN", 5 | "Expiration" : "3000-05-03T04:55:54Z" 6 | } 7 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-kms/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-kms/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/main/java,\ 2 | src/main/resources 3 | output.. = bin/ 4 | 5 | bin.includes = LICENSE.txt,\ 6 | NOTICE.txt,\ 7 | META-INF/,\ 8 | . 9 | 10 | jre.compilation.profile = JavaSE-1.8 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-kms/src/test/java/com/ibm/cloud/objectstorage/services/kms/smoketests/RunCucumberTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with 5 | * the License. A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 10 | * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | package com.ibm.cloud.objectstorage.services.kms.smoketests; 14 | 15 | import javax.annotation.Generated; 16 | 17 | import org.junit.runner.RunWith; 18 | 19 | import cucumber.api.CucumberOptions; 20 | import cucumber.api.junit.Cucumber; 21 | 22 | @CucumberOptions(glue = { "com.ibm.cloud.objectstorage.smoketest" }) 23 | @RunWith(Cucumber.class) 24 | @Generated("com.amazonaws:aws-java-sdk-code-generator") 25 | public class RunCucumberTest { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-kms/src/test/resources/com/ibm/cloud/objectstorage/services/kms/smoketests/kms.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @smoke @kms 3 | Feature: Amazon Key Management Service 4 | 5 | Scenario: Making a request 6 | When I call the "ListAliases" API 7 | Then the value at "Aliases" should be a list 8 | 9 | Scenario: Handling errors 10 | When I attempt to call the "GetKeyPolicy" API with: 11 | | KeyId | 12345678-1234-1234-1234-123456789012 | 12 | | PolicyName | fakepolicy | 13 | Then I expect the response error code to be "NotFoundException" 14 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-kms/src/test/resources/cucumber.properties: -------------------------------------------------------------------------------- 1 | guice.injector-source=com.ibm.cloud.objectstorage.services.kms.smoketests.AWSKMSModuleInjector -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/main/java,\ 2 | src/main/resources 3 | output.. = bin/ 4 | 5 | bin.includes = LICENSE.txt,\ 6 | NOTICE.txt,\ 7 | META-INF/,\ 8 | . 9 | 10 | jre.compilation.profile = JavaSE-1.8 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/aspera/transfer/AsperaResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package com.ibm.cloud.objectstorage.services.aspera.transfer; 14 | 15 | public interface AsperaResult { 16 | 17 | /** 18 | * Returns the name of the bucket containing the uploaded object. 19 | * 20 | * @return The name of the bucket containing the uploaded object. 21 | */ 22 | public String getBucketName(); 23 | 24 | /** 25 | * Returns the key by which the newly created object is stored. 26 | */ 27 | public String getKey(); 28 | 29 | /** 30 | * Returns the uploaded or downloaded file/folder name 31 | */ 32 | public String getFileName(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/aspera/transfer/AsperaTransferFuture.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package com.ibm.cloud.objectstorage.services.aspera.transfer; 14 | 15 | public interface AsperaTransferFuture { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/aspera/transfer/TransferSpecs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package com.ibm.cloud.objectstorage.services.aspera.transfer; 14 | 15 | 16 | import java.util.List; 17 | 18 | 19 | public class TransferSpecs { 20 | List transfer_specs; 21 | 22 | public List getTransfer_specs() { 23 | return transfer_specs; 24 | } 25 | 26 | public void setTransfer_specs(List transfer_specs) { 27 | this.transfer_specs = transfer_specs; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/AmazonS3ClientParams.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3; 16 | 17 | import com.ibm.cloud.objectstorage.annotation.SdkInternalApi; 18 | import com.ibm.cloud.objectstorage.client.AwsSyncClientParams; 19 | 20 | /** 21 | * Parameter object for {@link AmazonS3Client}. Simple wrapper to include {@link S3ClientOptions}. 22 | */ 23 | @SdkInternalApi 24 | abstract class AmazonS3ClientParams { 25 | 26 | public abstract AwsSyncClientParams getClientParams(); 27 | 28 | public abstract S3ClientOptions getS3ClientOptions(); 29 | } 30 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/AmazonS3Encryption.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3; 16 | 17 | /** 18 | * A marker interface used to check if an instance of S3 client is 19 | * an S3 encryption client. 20 | * 21 | * @deprecated This feature is in maintenance mode, no new updates will be released. 22 | * Please see https://docs.aws.amazon.com/general/latest/gr/aws_sdk_cryptography.html for more information. 23 | */ 24 | @Deprecated 25 | public interface AmazonS3Encryption extends AmazonS3 { 26 | } 27 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/KeyWrapException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3; 16 | 17 | /** 18 | * Key wrapping related security exception. 19 | */ 20 | public class KeyWrapException extends SecurityException { 21 | private static final long serialVersionUID = 1L; 22 | 23 | public KeyWrapException() { 24 | super(); 25 | } 26 | 27 | public KeyWrapException(String s) { 28 | super(s); 29 | } 30 | 31 | public KeyWrapException(String message, Throwable cause) { 32 | super(message, cause); 33 | } 34 | 35 | public KeyWrapException(Throwable cause) { 36 | super(cause); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/OnFileDelete.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3; 16 | 17 | import com.ibm.cloud.objectstorage.services.s3.internal.FileDeletionEvent; 18 | 19 | /** 20 | * A service provider interface (SPI) used to notify the event of a file 21 | * deletion. 22 | */ 23 | public interface OnFileDelete { 24 | /** 25 | * Called upon a file deletion event. 26 | *

27 | * Implementation of this method should never block. 28 | * 29 | * @param event 30 | * file deletion event 31 | */ 32 | public void onFileDelete(FileDeletionEvent event); 33 | } 34 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/FileDeletionEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.internal; 16 | 17 | /** 18 | * A file deletion event. 19 | */ 20 | public class FileDeletionEvent { 21 | // currently only a placeholder so method signature won't be affected by 22 | // future changes 23 | } 24 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/HeaderHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon Technologies, 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.internal; 16 | 17 | import com.ibm.cloud.objectstorage.http.HttpResponse; 18 | 19 | /** 20 | * Assistant response handler that can pull an HTTP header out of the response 21 | * and apply it to a response object. 22 | */ 23 | public interface HeaderHandler { 24 | 25 | /** 26 | * Applies one or more headers to the response object given. 27 | * 28 | * @param result 29 | * The response object to be returned to the client. 30 | * @param response 31 | * The HTTP response from s3. 32 | */ 33 | public void handle(T result, HttpResponse response); 34 | } 35 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/XmlWriterUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.services.s3.internal; 17 | 18 | /** 19 | * Utilities for working with {@link XmlWriter}. 20 | */ 21 | public final class XmlWriterUtils { 22 | private XmlWriterUtils() { 23 | } 24 | 25 | public static void addIfNotNull(XmlWriter writer, String tagName, String tagValue) { 26 | if (tagValue != null) { 27 | writer.start(tagName).value(tagValue).end(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/crypto/AesCbc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.internal.crypto; 16 | 17 | class AesCbc extends ContentCryptoScheme { 18 | @Override 19 | public String getKeyGeneratorAlgorithm() { return "AES"; } 20 | @Override 21 | public String getCipherAlgorithm() { return "AES/CBC/PKCS5Padding"; } 22 | @Override 23 | public int getKeyLengthInBits() { return 256; } 24 | @Override 25 | public int getBlockSizeInBytes() { return 16; } 26 | @Override 27 | public int getIVLengthInBytes() { return 16; } 28 | @Override long getMaxPlaintextSize() { return MAX_CBC_BYTES; } 29 | } 30 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/crypto/JceEncryptionConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.services.s3.internal.crypto; 17 | 18 | /** 19 | * Contains constants required by the JCE encryption library. 20 | */ 21 | public class JceEncryptionConstants { 22 | 23 | /** Name of the symmetric encryption algorithm */ 24 | public static final String SYMMETRIC_KEY_ALGORITHM = "AES"; 25 | 26 | /** Minimum length of the generated symmetric key */ 27 | public static final int SYMMETRIC_KEY_LENGTH = 256; 28 | 29 | /** AES cipher block size */ 30 | public static final int SYMMETRIC_CIPHER_BLOCK_SIZE = 16; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/crypto/v1/MultipartUploadCbcContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.internal.crypto.v1; 16 | 17 | final class MultipartUploadCbcContext extends MultipartUploadCryptoContext { 18 | private byte[] nextIV; 19 | 20 | MultipartUploadCbcContext(String bucketName, String key, 21 | ContentCryptoMaterial cekMaterial) { 22 | super(bucketName, key, cekMaterial); 23 | } 24 | 25 | public void setNextInitializationVector(byte[] nextIV) { 26 | this.nextIV = nextIV; 27 | } 28 | 29 | public byte[] getNextInitializationVector() { 30 | return nextIV; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/DeleteBucketAnalyticsConfigurationResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | 17 | import java.io.Serializable; 18 | 19 | /** 20 | * Result object to contain the response returned from 21 | * {@link com.ibm.cloud.objectstorage.services.s3.AmazonS3Client#deleteBucketAnalyticsConfiguration(DeleteBucketAnalyticsConfigurationRequest)} 22 | * operation. 23 | */ 24 | public class DeleteBucketAnalyticsConfigurationResult implements Serializable { 25 | } 26 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/DeleteBucketInventoryConfigurationResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | 17 | import java.io.Serializable; 18 | 19 | /** 20 | * Result object to contain the response returned from 21 | * {@link com.ibm.cloud.objectstorage.services.s3.AmazonS3Client#deleteBucketInventoryConfiguration(DeleteBucketInventoryConfigurationRequest)} 22 | * operation. 23 | */ 24 | public class DeleteBucketInventoryConfigurationResult implements Serializable { 25 | } 26 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/DeleteBucketMetricsConfigurationResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | 17 | import java.io.Serializable; 18 | 19 | /** 20 | * Result object to contain the response returned from 21 | * {@link com.ibm.cloud.objectstorage.services.s3.AmazonS3Client#deleteBucketMetricsConfiguration(DeleteBucketMetricsConfigurationRequest)} 22 | * operation. 23 | */ 24 | public class DeleteBucketMetricsConfigurationResult implements Serializable { 25 | } 26 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/GetS3AccountOwnerRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | import java.io.Serializable; 17 | 18 | import com.ibm.cloud.objectstorage.AmazonWebServiceRequest; 19 | 20 | /** 21 | * Request object for retrieving S3 account owner. 22 | */ 23 | public class GetS3AccountOwnerRequest extends AmazonWebServiceRequest 24 | implements Serializable, S3AccelerateUnsupported { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/KMSEncryptionMaterialsProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | import java.io.Serializable; 17 | 18 | public class KMSEncryptionMaterialsProvider extends StaticEncryptionMaterialsProvider implements Serializable { 19 | public KMSEncryptionMaterialsProvider(String defaultCustomerMasterKeyId) { 20 | this(new KMSEncryptionMaterials(defaultCustomerMasterKeyId)); 21 | } 22 | 23 | public KMSEncryptionMaterialsProvider(KMSEncryptionMaterials materials) { 24 | super(materials); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/ListBucketsRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | import java.io.Serializable; 17 | 18 | import com.ibm.cloud.objectstorage.AmazonWebServiceRequest; 19 | 20 | /** 21 | * Request object for listing all the Amazon S3 buckets owned by a user. 22 | */ 23 | public class ListBucketsRequest extends AmazonWebServiceRequest implements 24 | Serializable, S3AccelerateUnsupported { 25 | } 26 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/MaterialsDescriptionProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | 17 | import java.util.Map; 18 | 19 | /** 20 | * Interface for providing MaterialsDescription. 21 | */ 22 | public interface MaterialsDescriptionProvider { 23 | 24 | /** 25 | * Returns an unmodifiable view of the MaterialsDescription which the caller 26 | * can use to load EncryptionMaterials from any {@link EncryptionMaterialsAccessor} 27 | * @return materials description. 28 | */ 29 | public Map getMaterialsDescription(); 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/ReplicationRuleStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.services.s3.model; 17 | 18 | /** 19 | * A enum class for status of a Amazon S3 bucket replication rule. 20 | */ 21 | public enum ReplicationRuleStatus { 22 | Enabled("Enabled"), 23 | 24 | Disabled("Disabled"); 25 | 26 | private final String status; 27 | 28 | private ReplicationRuleStatus(String status) { 29 | this.status = status; 30 | } 31 | 32 | public String getStatus() { 33 | return this.status; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/RetentionDirective.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package com.ibm.cloud.objectstorage.services.s3.model; 14 | 15 | public enum RetentionDirective { 16 | COPY, REPLACE; 17 | } 18 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/S3AccelerateUnsupported.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | 17 | /** 18 | * This interface is simply a marker to be implemented by operations which cannot be 19 | * called by an accelerate enabled S3 client. 20 | */ 21 | public interface S3AccelerateUnsupported { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/SSEAwsKeyManagementParamsProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | 17 | /** 18 | * Implemented by classes that support the option of using SSE with Amazon Web Services Key 19 | * Management System. 20 | */ 21 | public interface SSEAwsKeyManagementParamsProvider { 22 | /** 23 | * Returns the optional SSEAwsKeyManagementParams to use to encrypt the 24 | * uploaded object. 25 | * 26 | * @return The optional SSEAwsKeyManagementParams to use to encrypt the 27 | * uploaded object. 28 | */ 29 | public SSEAwsKeyManagementParams getSSEAwsKeyManagementParams(); 30 | } 31 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/SSECustomerKeyProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | 17 | /** 18 | * Implemented by classes that support the option of using SSE Customer key. 19 | */ 20 | public interface SSECustomerKeyProvider { 21 | /** 22 | * Returns the optional customer-provided server-side encryption key to use 23 | * to encrypt the uploaded object. 24 | * 25 | * @return The optional customer-provided server-side encryption key to use 26 | * to encrypt the uploaded object. 27 | */ 28 | public SSECustomerKey getSSECustomerKey(); 29 | } 30 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/SetBucketAnalyticsConfigurationResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | 17 | import java.io.Serializable; 18 | 19 | /** 20 | * Result object to contain the response returned from 21 | * {@link com.ibm.cloud.objectstorage.services.s3.AmazonS3Client#setBucketAnalyticsConfiguration(SetBucketAnalyticsConfigurationRequest)} 22 | * operation. 23 | */ 24 | public class SetBucketAnalyticsConfigurationResult implements Serializable { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/SetBucketInventoryConfigurationResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | 17 | import java.io.Serializable; 18 | 19 | /** 20 | * Result object to contain the response returned from 21 | * {@link com.ibm.cloud.objectstorage.services.s3.AmazonS3Client#setBucketInventoryConfiguration(SetBucketInventoryConfigurationRequest)} 22 | * operation. 23 | */ 24 | public class SetBucketInventoryConfigurationResult implements Serializable { 25 | } 26 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/SetBucketMetricsConfigurationResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | 17 | import java.io.Serializable; 18 | 19 | /** 20 | * Result object to contain the response returned from 21 | * {@link com.ibm.cloud.objectstorage.services.s3.AmazonS3Client#setBucketMetricsConfiguration(SetBucketMetricsConfigurationRequest)} 22 | * operation. 23 | */ 24 | public class SetBucketMetricsConfigurationResult implements Serializable { 25 | } 26 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/WriteGetObjectResponseResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model; 16 | 17 | import java.io.Serializable; 18 | 19 | public class WriteGetObjectResponseResult implements Serializable { 20 | private static final long serialVersionUID = 1L; 21 | 22 | @Override 23 | public boolean equals(Object o) { 24 | if (this == o) return true; 25 | if (o == null || getClass() != o.getClass()) return false; 26 | return true; 27 | } 28 | 29 | @Override 30 | public int hashCode() { 31 | return super.hashCode(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/analytics/AnalyticsFilterPredicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model.analytics; 16 | 17 | import java.io.Serializable; 18 | 19 | /** 20 | * Base class to represent the root predicate in {@link AnalyticsFilter} class. 21 | * 22 | * @see AnalyticsPrefixPredicate 23 | * @see AnalyticsTagPredicate 24 | * @see AnalyticsAndOperator 25 | */ 26 | public abstract class AnalyticsFilterPredicate implements Serializable { 27 | public abstract void accept(AnalyticsPredicateVisitor analyticsPredicateVisitor); 28 | } 29 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/analytics/AnalyticsNAryOperator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model.analytics; 16 | 17 | import java.util.List; 18 | 19 | /** 20 | * Abstract class representing an operator that acts on N number of predicates. 21 | */ 22 | abstract class AnalyticsNAryOperator extends AnalyticsFilterPredicate { 23 | 24 | private final List operands; 25 | 26 | public AnalyticsNAryOperator(List operands) { 27 | this.operands = operands; 28 | } 29 | 30 | public List getOperands() { 31 | return operands; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/analytics/AnalyticsS3ExportFileFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model.analytics; 16 | 17 | import java.io.Serializable; 18 | 19 | /** 20 | * The file format used when exporting data to Amazon S3. 21 | */ 22 | public enum AnalyticsS3ExportFileFormat implements Serializable { 23 | CSV("CSV"); 24 | 25 | private final String format; 26 | 27 | private AnalyticsS3ExportFileFormat(String format) { 28 | this.format = format; 29 | } 30 | 31 | @Override 32 | public String toString() { 33 | return format; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/analytics/StorageClassAnalysisSchemaVersion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.services.s3.model.analytics; 17 | 18 | import java.io.Serializable; 19 | 20 | /** 21 | * The version of the output schema to use when exporting data. 22 | */ 23 | public enum StorageClassAnalysisSchemaVersion implements Serializable { 24 | V_1("V_1"); 25 | 26 | private final String version; 27 | 28 | private StorageClassAnalysisSchemaVersion(String version) { 29 | this.version = version; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return version; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/inventory/InventoryFilterPredicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model.inventory; 16 | 17 | import java.io.Serializable; 18 | 19 | /** 20 | * Base class to represent the root predicate in {@link InventoryFilter} class. 21 | * 22 | * @see InventoryPrefixPredicate 23 | */ 24 | public abstract class InventoryFilterPredicate implements Serializable { 25 | 26 | /** 27 | * Helper method that accepts an implemenation of {@link InventoryPredicateVisitor} 28 | * and invokes the most applicable visit method in the visitor. 29 | */ 30 | public abstract void accept(InventoryPredicateVisitor inventoryPredicateVisitor); 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/inventory/InventoryFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model.inventory; 16 | 17 | /** 18 | * The output format of the inventory results. 19 | */ 20 | public enum InventoryFormat { 21 | 22 | CSV("CSV"), 23 | ORC("ORC"), 24 | Parquet("Parquet") 25 | ; 26 | 27 | private final String format; 28 | 29 | private InventoryFormat(String format) { 30 | this.format = format; 31 | } 32 | 33 | /* (non-Javadoc) 34 | * @see java.lang.Enum#toString() 35 | */ 36 | @Override 37 | public String toString() { 38 | return format; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/inventory/InventoryFrequency.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model.inventory; 16 | 17 | /** 18 | * The frequency for producing inventory results. 19 | */ 20 | public enum InventoryFrequency { 21 | 22 | Daily("Daily"), 23 | 24 | Weekly("Weekly"), 25 | 26 | ; 27 | 28 | private final String frequency; 29 | 30 | private InventoryFrequency(String frequency) { 31 | this.frequency = frequency; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return frequency; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/inventory/InventoryIncludedObjectVersions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model.inventory; 16 | 17 | /** 18 | * The object version(s) that can be included in the inventory results. 19 | */ 20 | public enum InventoryIncludedObjectVersions { 21 | 22 | All("All"), 23 | 24 | Current("Current"), 25 | 26 | ; 27 | 28 | private final String name; 29 | 30 | private InventoryIncludedObjectVersions(String name) { 31 | this.name = name; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return name; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/lifecycle/LifecycleNAryOperator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model.lifecycle; 16 | 17 | import java.util.List; 18 | 19 | /** 20 | * Abstract class representing an operator that acts on N number of predicates. 21 | */ 22 | abstract class LifecycleNAryOperator extends LifecycleFilterPredicate { 23 | 24 | private final List operands; 25 | 26 | public LifecycleNAryOperator(List operands) { 27 | this.operands = operands; 28 | } 29 | 30 | public List getOperands() { 31 | return operands; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/metrics/MetricsNAryOperator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model.metrics; 16 | 17 | import java.util.List; 18 | 19 | /** 20 | * Abstract class representing an operator that acts on N number of predicates. 21 | */ 22 | abstract class MetricsNAryOperator extends MetricsFilterPredicate { 23 | 24 | private final List operands; 25 | 26 | public MetricsNAryOperator(List operands) { 27 | this.operands = operands; 28 | } 29 | 30 | public List getOperands() { 31 | return operands; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | /** 16 | * Classes modeling the various types represented by Amazon S3. 17 | */ 18 | package com.ibm.cloud.objectstorage.services.s3.model; 19 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/model/replication/ReplicationNAryOperator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.model.replication; 16 | 17 | import java.util.List; 18 | 19 | /** 20 | * Abstract class representing an operator that acts on N number of predicates. 21 | */ 22 | abstract class ReplicationNAryOperator extends ReplicationFilterPredicate { 23 | 24 | private final List operands; 25 | 26 | public ReplicationNAryOperator(List operands) { 27 | this.operands = operands; 28 | } 29 | 30 | public List getOperands() { 31 | return operands; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/transfer/AbortableTransfer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | package com.ibm.cloud.objectstorage.services.s3.transfer; 17 | 18 | import java.io.IOException; 19 | 20 | /** 21 | * Represents an asynchronous transfer from Amazon S3 that can be aborted 22 | */ 23 | public interface AbortableTransfer extends Transfer { 24 | 25 | /** 26 | * Cancels the transfer 27 | * 28 | * @throws IOException 29 | */ 30 | void abort() throws IOException; 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/transfer/exception/FileLockException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.transfer.exception; 16 | 17 | import com.ibm.cloud.objectstorage.SdkClientException; 18 | 19 | /** 20 | * Failed to lock a file. 21 | */ 22 | public class FileLockException extends SdkClientException { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | public FileLockException(Throwable t) { 27 | super(t); 28 | } 29 | 30 | public FileLockException(String msg) { 31 | super(msg); 32 | } 33 | 34 | @Override 35 | public boolean isRetryable() { 36 | return false; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/transfer/internal/TransferStateChangeListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2024 Amazon Technologies, 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://aws.amazon.com/apache2.0 9 | * 10 | * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 11 | * OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | * License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.services.s3.transfer.internal; 16 | 17 | import com.ibm.cloud.objectstorage.annotation.SdkInternalApi; 18 | import com.ibm.cloud.objectstorage.services.s3.transfer.Transfer; 19 | import com.ibm.cloud.objectstorage.services.s3.transfer.Transfer.TransferState; 20 | 21 | /** 22 | * Listener for transfer state changes. Not intended to be consumed externally. 23 | */ 24 | @SdkInternalApi 25 | public interface TransferStateChangeListener { 26 | public void transferStateChanged(Transfer transfer, TransferState state); 27 | } 28 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-test-utils/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-test-utils/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/main/java,\ 2 | src/main/resources 3 | output.. = bin/ 4 | 5 | bin.includes = LICENSE.txt,\ 6 | NOTICE.txt,\ 7 | META-INF/,\ 8 | . 9 | 10 | jre.compilation.profile = JavaSE-1.8 -------------------------------------------------------------------------------- /ibm-cos-java-sdk-test-utils/src/main/java/com/ibm/cloud/objectstorage/test/retry/NonRetryableException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.test.retry; 16 | 17 | /** 18 | * Normally all exceptions are retried by {@link RetryableAction}. This is a special exception to 19 | * communicate the intent that a certain exception should not be retried. 20 | */ 21 | public class NonRetryableException extends Exception { 22 | 23 | public NonRetryableException(Exception e) { 24 | super(e); 25 | } 26 | 27 | @Override 28 | public Exception getCause() { 29 | return (Exception) super.getCause(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-test-utils/src/main/java/com/ibm/cloud/objectstorage/test/retry/RetryableError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.test.retry; 16 | 17 | /** 18 | * Normally {@link Error}'s are not retried by {@link RetryableAction}. This is a special error that 19 | * communicates retry intent to {@link RetryableAction}. 20 | */ 21 | public class RetryableError extends Error { 22 | 23 | public RetryableError(Error cause) { 24 | super(cause); 25 | } 26 | 27 | @Override 28 | public Error getCause() { 29 | return (Error) super.getCause(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk-test-utils/src/main/java/com/ibm/cloud/objectstorage/test/util/DateUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 | * A copy of the License is located at 7 | * 8 | * http://aws.amazon.com/apache2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | package com.ibm.cloud.objectstorage.test.util; 16 | 17 | import org.joda.time.DateTime; 18 | import org.joda.time.format.DateTimeFormat; 19 | 20 | public class DateUtils { 21 | 22 | /** 23 | * Returns the current time in yyMMdd-hhmmss format. 24 | */ 25 | public static String yyMMdd_hhmmss() { 26 | return DateTimeFormat.forPattern("yyMMdd-hhmmss").print(new DateTime()); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /ibm-cos-java-sdk/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/main/java,\ 2 | src/main/resources 3 | output.. = bin/ 4 | 5 | bin.includes = LICENSE.txt,\ 6 | NOTICE.txt,\ 7 | META-INF/,\ 8 | . 9 | 10 | jre.compilation.profile = JavaSE-1.8 -------------------------------------------------------------------------------- /release.properties: -------------------------------------------------------------------------------- 1 | releaseId=b8382d15-ae8a-46fe-808a-c0897b8497d6 --------------------------------------------------------------------------------