From 28e277186f9ca1c7db6669d04a92ab2398159ceb Mon Sep 17 00:00:00 2001 From: Derek Shelby Date: Thu, 4 Oct 2018 21:17:31 +0000 Subject: [PATCH] Releasing version 1.2.48 --- CHANGELOG.md | 7 + .../bmc-apache-connector-provider/pom.xml | 4 +- bmc-addons/pom.xml | 2 +- bmc-audit/pom.xml | 4 +- bmc-bom/pom.xml | 30 +- bmc-common/pom.xml | 2 +- .../java/com/oracle/bmc/ConfigFileReader.java | 7 +- .../signing/internal/BouncyCastleHelper.java | 4 +- .../com/oracle/bmc/ConfigFileReaderTest.java | 8 +- bmc-containerengine/pom.xml | 4 +- bmc-core/pom.xml | 4 +- .../java/com/oracle/bmc/core/Compute.java | 71 ++ .../com/oracle/bmc/core/ComputeAsync.java | 137 ++++ .../oracle/bmc/core/ComputeAsyncClient.java | 606 ++++++++++++++ .../com/oracle/bmc/core/ComputeClient.java | 214 +++++ .../oracle/bmc/core/ComputePaginators.java | 363 +++++++++ .../com/oracle/bmc/core/VirtualNetwork.java | 96 ++- .../oracle/bmc/core/VirtualNetworkAsync.java | 131 ++- .../bmc/core/VirtualNetworkAsyncClient.java | 374 +++++++++ .../oracle/bmc/core/VirtualNetworkClient.java | 127 +++ .../bmc/core/VirtualNetworkPaginators.java | 112 +++ .../bmc/core/VirtualNetworkWaiters.java | 97 +++ ...CreateAppCatalogSubscriptionConverter.java | 106 +++ .../http/CreateNatGatewayConverter.java | 101 +++ ...DeleteAppCatalogSubscriptionConverter.java | 106 +++ .../http/DeleteNatGatewayConverter.java | 91 +++ ...tAppCatalogListingAgreementsConverter.java | 115 +++ .../http/GetAppCatalogListingConverter.java | 103 +++ ...atalogListingResourceVersionConverter.java | 112 +++ .../internal/http/GetNatGatewayConverter.java | 99 +++ ...talogListingResourceVersionsConverter.java | 148 ++++ .../http/ListAppCatalogListingsConverter.java | 151 ++++ .../ListAppCatalogSubscriptionsConverter.java | 153 ++++ .../http/ListNatGatewaysConverter.java | 161 ++++ .../internal/http/ListPublicIpsConverter.java | 8 + .../http/UpdateNatGatewayConverter.java | 107 +++ .../bmc/core/model/AppCatalogListing.java | 193 +++++ .../AppCatalogListingResourceVersion.java | 253 ++++++ ...talogListingResourceVersionAgreements.java | 160 ++++ ...pCatalogListingResourceVersionSummary.java | 122 +++ .../core/model/AppCatalogListingSummary.java | 119 +++ .../core/model/AppCatalogSubscription.java | 193 +++++ .../model/AppCatalogSubscriptionSummary.java | 193 +++++ .../CreateAppCatalogSubscriptionDetails.java | 176 ++++ .../core/model/CreateNatGatewayDetails.java | 175 ++++ .../bmc/core/model/LaunchInstanceDetails.java | 4 + .../com/oracle/bmc/core/model/NatGateway.java | 306 +++++++ .../com/oracle/bmc/core/model/PublicIp.java | 141 +++- .../oracle/bmc/core/model/ServiceGateway.java | 13 +- .../core/model/UpdateNatGatewayDetails.java | 135 ++++ .../model/UpdateServiceGatewayDetails.java | 13 +- .../CreateAppCatalogSubscriptionRequest.java | 71 ++ .../requests/CreateNatGatewayRequest.java | 71 ++ .../DeleteAppCatalogSubscriptionRequest.java | 72 ++ .../requests/DeleteNatGatewayRequest.java | 69 ++ ...GetAppCatalogListingAgreementsRequest.java | 66 ++ .../requests/GetAppCatalogListingRequest.java | 60 ++ ...pCatalogListingResourceVersionRequest.java | 66 ++ .../core/requests/GetNatGatewayRequest.java | 60 ++ ...umeBackupPolicyAssetAssignmentRequest.java | 10 +- ...CatalogListingResourceVersionsRequest.java | 123 +++ .../ListAppCatalogListingsRequest.java | 137 ++++ .../ListAppCatalogSubscriptionsRequest.java | 187 +++++ .../ListBootVolumeAttachmentsRequest.java | 10 +- .../ListBootVolumeBackupsRequest.java | 10 +- .../core/requests/ListBootVolumesRequest.java | 10 +- .../requests/ListConsoleHistoriesRequest.java | 10 +- .../bmc/core/requests/ListCpesRequest.java | 10 +- .../ListCrossConnectGroupsRequest.java | 10 +- .../ListCrossConnectLocationsRequest.java | 10 +- .../requests/ListCrossConnectsRequest.java | 10 +- ...istCrossconnectPortSpeedShapesRequest.java | 10 +- .../core/requests/ListDhcpOptionsRequest.java | 10 +- .../requests/ListDrgAttachmentsRequest.java | 10 +- .../bmc/core/requests/ListDrgsRequest.java | 10 +- ...istFastConnectProviderServicesRequest.java | 10 +- ...rVirtualCircuitBandwidthShapesRequest.java | 10 +- .../requests/ListIPSecConnectionsRequest.java | 10 +- .../bmc/core/requests/ListImagesRequest.java | 10 +- ...ListInstanceConsoleConnectionsRequest.java | 10 +- .../core/requests/ListInstancesRequest.java | 10 +- .../requests/ListInternetGatewaysRequest.java | 10 +- .../ListLocalPeeringGatewaysRequest.java | 10 +- .../core/requests/ListNatGatewaysRequest.java | 204 +++++ .../core/requests/ListPrivateIpsRequest.java | 10 +- .../core/requests/ListPublicIpsRequest.java | 74 +- .../ListRemotePeeringConnectionsRequest.java | 10 +- .../core/requests/ListRouteTablesRequest.java | 10 +- .../requests/ListSecurityListsRequest.java | 10 +- .../requests/ListServiceGatewaysRequest.java | 10 +- .../core/requests/ListServicesRequest.java | 10 +- .../bmc/core/requests/ListShapesRequest.java | 10 +- .../bmc/core/requests/ListSubnetsRequest.java | 10 +- .../bmc/core/requests/ListVcnsRequest.java | 10 +- ...tVirtualCircuitBandwidthShapesRequest.java | 10 +- .../requests/ListVirtualCircuitsRequest.java | 10 +- .../requests/ListVnicAttachmentsRequest.java | 10 +- .../ListVolumeAttachmentsRequest.java | 10 +- .../ListVolumeBackupPoliciesRequest.java | 10 +- .../requests/ListVolumeBackupsRequest.java | 10 +- .../ListVolumeGroupBackupsRequest.java | 10 +- .../requests/ListVolumeGroupsRequest.java | 10 +- .../bmc/core/requests/ListVolumesRequest.java | 10 +- .../requests/UpdateNatGatewayRequest.java | 75 ++ .../CreateAppCatalogSubscriptionResponse.java | 43 + .../responses/CreateNatGatewayResponse.java | 43 + .../DeleteAppCatalogSubscriptionResponse.java | 31 + .../responses/DeleteNatGatewayResponse.java | 31 + ...etAppCatalogListingAgreementsResponse.java | 44 + ...CatalogListingResourceVersionResponse.java | 43 + .../GetAppCatalogListingResponse.java | 43 + .../core/responses/GetNatGatewayResponse.java | 43 + ...meBackupPolicyAssetAssignmentResponse.java | 6 +- ...atalogListingResourceVersionsResponse.java | 52 ++ .../ListAppCatalogListingsResponse.java | 46 ++ .../ListAppCatalogSubscriptionsResponse.java | 46 ++ .../ListBootVolumeAttachmentsResponse.java | 6 +- .../ListBootVolumeBackupsResponse.java | 6 +- .../responses/ListBootVolumesResponse.java | 6 +- .../ListConsoleHistoriesResponse.java | 6 +- .../bmc/core/responses/ListCpesResponse.java | 6 +- .../ListCrossConnectGroupsResponse.java | 6 +- .../ListCrossConnectLocationsResponse.java | 6 +- .../responses/ListCrossConnectsResponse.java | 6 +- ...stCrossconnectPortSpeedShapesResponse.java | 6 +- .../responses/ListDhcpOptionsResponse.java | 6 +- .../responses/ListDrgAttachmentsResponse.java | 6 +- .../bmc/core/responses/ListDrgsResponse.java | 6 +- ...stFastConnectProviderServicesResponse.java | 6 +- ...VirtualCircuitBandwidthShapesResponse.java | 6 +- .../ListIPSecConnectionsResponse.java | 6 +- .../core/responses/ListImagesResponse.java | 6 +- ...istInstanceConsoleConnectionsResponse.java | 6 +- .../core/responses/ListInstancesResponse.java | 6 +- .../ListInternetGatewaysResponse.java | 6 +- .../ListLocalPeeringGatewaysResponse.java | 6 +- .../responses/ListNatGatewaysResponse.java | 46 ++ .../responses/ListPrivateIpsResponse.java | 6 +- .../core/responses/ListPublicIpsResponse.java | 6 +- .../ListRemotePeeringConnectionsResponse.java | 5 +- .../responses/ListRouteTablesResponse.java | 6 +- .../responses/ListSecurityListsResponse.java | 6 +- .../ListServiceGatewaysResponse.java | 6 +- .../core/responses/ListServicesResponse.java | 6 +- .../core/responses/ListShapesResponse.java | 6 +- .../core/responses/ListSubnetsResponse.java | 6 +- .../bmc/core/responses/ListVcnsResponse.java | 6 +- ...VirtualCircuitBandwidthShapesResponse.java | 6 +- .../ListVirtualCircuitsResponse.java | 6 +- .../ListVnicAttachmentsResponse.java | 6 +- .../ListVolumeAttachmentsResponse.java | 6 +- .../ListVolumeBackupPoliciesResponse.java | 6 +- .../responses/ListVolumeBackupsResponse.java | 6 +- .../ListVolumeGroupBackupsResponse.java | 6 +- .../responses/ListVolumeGroupsResponse.java | 6 +- .../core/responses/ListVolumesResponse.java | 6 +- .../responses/UpdateNatGatewayResponse.java | 43 + bmc-database/pom.xml | 4 +- bmc-dns/pom.xml | 4 +- bmc-email/pom.xml | 4 +- bmc-examples/pom.xml | 4 +- ...ogImageListingResourceVersionsExample.java | 97 +++ .../src/main/java/CopyObjectExample.java | 144 ++++ .../java/ObjectLifecyclePolicyExample.java | 163 ++++ ...bjectStorageUpdateBucketKmsKeyExample.java | 6 +- bmc-filestorage/pom.xml | 4 +- bmc-full/pom.xml | 4 +- bmc-identity/pom.xml | 4 +- bmc-keymanagement/pom.xml | 4 +- bmc-loadbalancer/pom.xml | 4 +- .../bmc-objectstorage-combined/pom.xml | 6 +- .../bmc-objectstorage-extensions/pom.xml | 6 +- .../bmc-objectstorage-generated/pom.xml | 4 +- .../bmc/objectstorage/ObjectStorage.java | 101 ++- .../bmc/objectstorage/ObjectStorageAsync.java | 159 +++- .../ObjectStorageAsyncClient.java | 752 ++++++++++++++++-- .../objectstorage/ObjectStorageClient.java | 253 ++++++ .../ObjectStoragePaginators.java | 341 ++++++++ .../objectstorage/ObjectStorageWaiters.java | 76 ++ .../http/CancelWorkRequestConverter.java | 103 +++ .../internal/http/CopyObjectConverter.java | 119 +++ .../DeleteObjectLifecyclePolicyConverter.java | 117 +++ .../GetObjectLifecyclePolicyConverter.java | 126 +++ .../http/GetWorkRequestConverter.java | 118 +++ .../http/ListWorkRequestErrorsConverter.java | 142 ++++ .../http/ListWorkRequestLogsConverter.java | 141 ++++ .../http/ListWorkRequestsConverter.java | 140 ++++ .../http/ObjectMetadataInterceptor.java | 13 + .../PutObjectLifecyclePolicyConverter.java | 137 ++++ .../bmc/objectstorage/model/Bucket.java | 21 +- .../model/CopyObjectDetails.java | 217 +++++ .../objectstorage/model/MultipartUpload.java | 2 +- .../model/NamespaceMetadata.java | 2 +- .../model/ObjectLifecyclePolicy.java | 91 +++ .../model/ObjectLifecycleRule.java | 210 +++++ .../objectstorage/model/ObjectNameFilter.java | 70 ++ .../model/PreauthenticatedRequest.java | 2 +- .../PutObjectLifecyclePolicyDetails.java | 71 ++ .../model/RestoreObjectsDetails.java | 4 +- .../bmc/objectstorage/model/WorkRequest.java | 306 +++++++ .../objectstorage/model/WorkRequestError.java | 100 +++ .../model/WorkRequestLogEntry.java | 84 ++ .../model/WorkRequestResource.java | 187 +++++ .../model/WorkRequestResourceMetadataKey.java | 43 + .../model/WorkRequestSummary.java | 308 +++++++ .../requests/CancelWorkRequestRequest.java | 66 ++ .../CommitMultipartUploadRequest.java | 2 +- .../requests/CopyObjectRequest.java | 80 ++ .../CreateMultipartUploadRequest.java | 2 +- .../DeleteObjectLifecyclePolicyRequest.java | 82 ++ .../requests/GetBucketRequest.java | 2 +- .../GetObjectLifecyclePolicyRequest.java | 74 ++ .../requests/GetObjectRequest.java | 2 +- .../requests/GetWorkRequestRequest.java | 66 ++ .../requests/HeadBucketRequest.java | 2 +- .../requests/HeadObjectRequest.java | 2 +- .../ListWorkRequestErrorsRequest.java | 78 ++ .../requests/ListWorkRequestLogsRequest.java | 78 ++ .../requests/ListWorkRequestsRequest.java | 78 ++ .../PutObjectLifecyclePolicyRequest.java | 96 +++ .../requests/PutObjectRequest.java | 2 +- .../requests/UploadPartRequest.java | 2 +- .../responses/CancelWorkRequestResponse.java | 37 + .../CommitMultipartUploadResponse.java | 3 +- .../responses/CopyObjectResponse.java | 44 + .../DeleteObjectLifecyclePolicyResponse.java | 37 + .../GetObjectLifecyclePolicyResponse.java | 49 ++ .../responses/GetWorkRequestResponse.java | 47 ++ .../responses/ListBucketsResponse.java | 10 +- .../ListMultipartUploadPartsResponse.java | 9 +- .../ListMultipartUploadsResponse.java | 9 +- .../ListPreauthenticatedRequestsResponse.java | 10 +- .../ListWorkRequestErrorsResponse.java | 50 ++ .../ListWorkRequestLogsResponse.java | 50 ++ .../responses/ListWorkRequestsResponse.java | 51 ++ .../PutObjectLifecyclePolicyResponse.java | 49 ++ bmc-objectstorage/pom.xml | 2 +- bmc-resourcesearch/pom.xml | 4 +- bmc-shaded/bmc-shaded-full/pom.xml | 2 +- bmc-shaded/pom.xml | 2 +- pom.xml | 2 +- 241 files changed, 14406 insertions(+), 472 deletions(-) create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateAppCatalogSubscriptionConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateNatGatewayConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteAppCatalogSubscriptionConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteNatGatewayConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetAppCatalogListingAgreementsConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetAppCatalogListingConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetAppCatalogListingResourceVersionConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetNatGatewayConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListAppCatalogListingResourceVersionsConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListAppCatalogListingsConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListAppCatalogSubscriptionsConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListNatGatewaysConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateNatGatewayConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListing.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingResourceVersion.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingResourceVersionAgreements.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingResourceVersionSummary.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingSummary.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogSubscription.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogSubscriptionSummary.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/CreateAppCatalogSubscriptionDetails.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/CreateNatGatewayDetails.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/NatGateway.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateNatGatewayDetails.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateAppCatalogSubscriptionRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateNatGatewayRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteAppCatalogSubscriptionRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteNatGatewayRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/GetAppCatalogListingAgreementsRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/GetAppCatalogListingRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/GetAppCatalogListingResourceVersionRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/GetNatGatewayRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/ListAppCatalogListingResourceVersionsRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/ListAppCatalogListingsRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/ListAppCatalogSubscriptionsRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/ListNatGatewaysRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateNatGatewayRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateAppCatalogSubscriptionResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateNatGatewayResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteAppCatalogSubscriptionResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteNatGatewayResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/GetAppCatalogListingAgreementsResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/GetAppCatalogListingResourceVersionResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/GetAppCatalogListingResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/GetNatGatewayResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/ListAppCatalogListingResourceVersionsResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/ListAppCatalogListingsResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/ListAppCatalogSubscriptionsResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/ListNatGatewaysResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateNatGatewayResponse.java create mode 100644 bmc-examples/src/main/java/CatalogImageListingResourceVersionsExample.java create mode 100644 bmc-examples/src/main/java/CopyObjectExample.java create mode 100644 bmc-examples/src/main/java/ObjectLifecyclePolicyExample.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageWaiters.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CancelWorkRequestConverter.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CopyObjectConverter.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/DeleteObjectLifecyclePolicyConverter.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectLifecyclePolicyConverter.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetWorkRequestConverter.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestErrorsConverter.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestLogsConverter.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestsConverter.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/PutObjectLifecyclePolicyConverter.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CopyObjectDetails.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectLifecyclePolicy.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectLifecycleRule.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectNameFilter.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PutObjectLifecyclePolicyDetails.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequest.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestError.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestLogEntry.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestResource.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestResourceMetadataKey.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestSummary.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CancelWorkRequestRequest.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CopyObjectRequest.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/DeleteObjectLifecyclePolicyRequest.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetObjectLifecyclePolicyRequest.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetWorkRequestRequest.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestErrorsRequest.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestLogsRequest.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestsRequest.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectLifecyclePolicyRequest.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CancelWorkRequestResponse.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CopyObjectResponse.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/DeleteObjectLifecyclePolicyResponse.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectLifecyclePolicyResponse.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetWorkRequestResponse.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListWorkRequestErrorsResponse.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListWorkRequestLogsResponse.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListWorkRequestsResponse.java create mode 100644 bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/PutObjectLifecyclePolicyResponse.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fa733c8821..58e7aa387cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). ### Added - N/A +## 1.2.48 - 2018-10-04 +### Added +- Support for trusted partner images through application listings and subscriptions in the Compute service +- Support for object lifecycle policies in the Object Storage service +- Support for copying objects across regions in the Object Storage service +- Support for network address translation (NAT) gateways in the Networking service + ## 1.2.47 - 2018-09-27 ### Added - Support for `paravirtualized` launch mode when importing images in the Compute service diff --git a/bmc-addons/bmc-apache-connector-provider/pom.xml b/bmc-addons/bmc-apache-connector-provider/pom.xml index 01248c0b05b..3f8ed25eb8f 100644 --- a/bmc-addons/bmc-apache-connector-provider/pom.xml +++ b/bmc-addons/bmc-apache-connector-provider/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 1.2.47 + 1.2.48 ../pom.xml @@ -37,7 +37,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 diff --git a/bmc-addons/pom.xml b/bmc-addons/pom.xml index 8765422dde2..5452f020df3 100644 --- a/bmc-addons/pom.xml +++ b/bmc-addons/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml diff --git a/bmc-audit/pom.xml b/bmc-audit/pom.xml index adec112bb28..f4e828a2b4d 100644 --- a/bmc-audit/pom.xml +++ b/bmc-audit/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 diff --git a/bmc-bom/pom.xml b/bmc-bom/pom.xml index 7630c0e2640..041ad8c62fc 100644 --- a/bmc-bom/pom.xml +++ b/bmc-bom/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml oci-java-sdk-bom @@ -19,86 +19,86 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 false com.oracle.oci.sdk oci-java-sdk-audit - 1.2.47 + 1.2.48 false com.oracle.oci.sdk oci-java-sdk-containerengine - 1.2.47 + 1.2.48 false com.oracle.oci.sdk oci-java-sdk-core - 1.2.47 + 1.2.48 false com.oracle.oci.sdk oci-java-sdk-database - 1.2.47 + 1.2.48 false com.oracle.oci.sdk oci-java-sdk-dns - 1.2.47 + 1.2.48 false com.oracle.oci.sdk oci-java-sdk-email - 1.2.47 + 1.2.48 false com.oracle.oci.sdk oci-java-sdk-filestorage - 1.2.47 + 1.2.48 false com.oracle.oci.sdk oci-java-sdk-identity - 1.2.47 + 1.2.48 false com.oracle.oci.sdk oci-java-sdk-loadbalancer - 1.2.47 + 1.2.48 false com.oracle.oci.sdk oci-java-sdk-objectstorage - 1.2.47 + 1.2.48 false com.oracle.oci.sdk oci-java-sdk-resourcesearch false - 1.2.47 + 1.2.48 com.oracle.oci.sdk false oci-java-sdk-addons-apache - 1.2.47 + 1.2.48 com.oracle.oci.sdk oci-java-sdk-keymanagement - 1.2.47 + 1.2.48 false diff --git a/bmc-common/pom.xml b/bmc-common/pom.xml index e5f7c7a1d3c..7d2a15cb7aa 100644 --- a/bmc-common/pom.xml +++ b/bmc-common/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml diff --git a/bmc-common/src/main/java/com/oracle/bmc/ConfigFileReader.java b/bmc-common/src/main/java/com/oracle/bmc/ConfigFileReader.java index 211f32a64d4..48fde03a505 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/ConfigFileReader.java +++ b/bmc-common/src/main/java/com/oracle/bmc/ConfigFileReader.java @@ -163,8 +163,7 @@ public static ConfigFile parse( } } if (!accumulator.foundDefaultProfile) { - throw new IllegalStateException( - "No DEFAULT profile was specified in the configuration"); + LOG.info("No DEFAULT profile was specified in the configuration"); } if (profile != null && !accumulator.configurationsByProfile.containsKey(profile)) { throw new IllegalArgumentException( @@ -198,7 +197,9 @@ public String get(String key) { && (accumulator.configurationsByProfile.get(profile).containsKey(key))) { return accumulator.configurationsByProfile.get(profile).get(key); } - return accumulator.configurationsByProfile.get(DEFAULT_PROFILE_NAME).get(key); + return accumulator.foundDefaultProfile + ? accumulator.configurationsByProfile.get(DEFAULT_PROFILE_NAME).get(key) + : null; } } diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/BouncyCastleHelper.java b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/BouncyCastleHelper.java index cb3686a5a44..23a61be52f9 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/BouncyCastleHelper.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/BouncyCastleHelper.java @@ -18,7 +18,9 @@ private BouncyCastleHelper() { isProviderInstalled = Security.getProvider("BC") != null || Security.getProvider("BCFIPS") != null; try { - bouncyCastleProvider = (Provider) getBouncyCastleProviderClass().newInstance(); + final Class bouncyCastleProviderClass = getBouncyCastleProviderClass(); + bouncyCastleProvider = (Provider) bouncyCastleProviderClass.newInstance(); + LOG.info("Instantiated provider: " + bouncyCastleProviderClass.getName()); } catch (InstantiationException | IllegalAccessException ex) { LOG.error("Failed to instantiate provider", ex); throw Throwables.propagate(ex); diff --git a/bmc-common/src/test/java/com/oracle/bmc/ConfigFileReaderTest.java b/bmc-common/src/test/java/com/oracle/bmc/ConfigFileReaderTest.java index 31210ad1ebe..7a09351b6fc 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/ConfigFileReaderTest.java +++ b/bmc-common/src/test/java/com/oracle/bmc/ConfigFileReaderTest.java @@ -26,9 +26,13 @@ public void noConfigFile() throws IOException { ConfigFileReader.parse("src/test/resources/does_not_exist"); } - @Test(expected = IllegalStateException.class) + @Test public void noDefaultProfile() throws IOException { - ConfigFileReader.parse("src/test/resources/unit_test_no_default_config"); + final ConfigFile configFile = + ConfigFileReader.parse("src/test/resources/unit_test_no_default_config", "USER"); + assertEquals("default_user", configFile.get("user")); + assertEquals("default_tenancy", configFile.get("tenancy")); + assertNull(configFile.get("region")); } @Test(expected = IllegalStateException.class) diff --git a/bmc-containerengine/pom.xml b/bmc-containerengine/pom.xml index 97ae78d6fe4..d5370e5334a 100644 --- a/bmc-containerengine/pom.xml +++ b/bmc-containerengine/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 diff --git a/bmc-core/pom.xml b/bmc-core/pom.xml index 6ae99ad6abb..2aa853a2606 100644 --- a/bmc-core/pom.xml +++ b/bmc-core/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java b/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java index e8a863f9bda..2c847ac0343 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java @@ -90,6 +90,16 @@ public interface Compute extends AutoCloseable { */ CaptureConsoleHistoryResponse captureConsoleHistory(CaptureConsoleHistoryRequest request); + /** + * Create a subscription for listing resource version for a compartment. It will take some time to propagate to all regions. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + CreateAppCatalogSubscriptionResponse createAppCatalogSubscription( + CreateAppCatalogSubscriptionRequest request); + /** * Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object Storage service. *

@@ -135,6 +145,15 @@ public interface Compute extends AutoCloseable { CreateInstanceConsoleConnectionResponse createInstanceConsoleConnection( CreateInstanceConsoleConnectionRequest request); + /** + * Delete a subscription for a listing resource version for a compartment. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + DeleteAppCatalogSubscriptionResponse deleteAppCatalogSubscription( + DeleteAppCatalogSubscriptionRequest request); + /** * Deletes the specified console history metadata and the console history data. * @param request The request object containing the details to send @@ -220,6 +239,32 @@ DeleteInstanceConsoleConnectionResponse deleteInstanceConsoleConnection( */ ExportImageResponse exportImage(ExportImageRequest request); + /** + * Gets the specified listing. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetAppCatalogListingResponse getAppCatalogListing(GetAppCatalogListingRequest request); + + /** + * Retrieves the agreements for a particular resource version of a listing. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetAppCatalogListingAgreementsResponse getAppCatalogListingAgreements( + GetAppCatalogListingAgreementsRequest request); + + /** + * Gets the specified listing resource version. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetAppCatalogListingResourceVersionResponse getAppCatalogListingResourceVersion( + GetAppCatalogListingResourceVersionRequest request); + /** * Gets information about the specified boot volume attachment. * @param request The request object containing the details to send @@ -364,6 +409,32 @@ GetWindowsInstanceInitialCredentialsResponse getWindowsInstanceInitialCredential */ LaunchInstanceResponse launchInstance(LaunchInstanceRequest request); + /** + * Gets all resource versions for a particular listing. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListAppCatalogListingResourceVersionsResponse listAppCatalogListingResourceVersions( + ListAppCatalogListingResourceVersionsRequest request); + + /** + * Lists the published listings. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListAppCatalogListingsResponse listAppCatalogListings(ListAppCatalogListingsRequest request); + + /** + * Lists subscriptions for a compartment. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListAppCatalogSubscriptionsResponse listAppCatalogSubscriptions( + ListAppCatalogSubscriptionsRequest request); + /** * Lists the boot volume attachments in the specified compartment. You can filter the * list by specifying an instance OCID, boot volume OCID, or both. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java index 936ac64b66b..7f9a791fcc6 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java @@ -118,6 +118,24 @@ java.util.concurrent.Future captureConsoleHistory CaptureConsoleHistoryRequest, CaptureConsoleHistoryResponse> handler); + /** + * Create a subscription for listing resource version for a compartment. It will take some time to propagate to all regions. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createAppCatalogSubscription( + CreateAppCatalogSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateAppCatalogSubscriptionRequest, + CreateAppCatalogSubscriptionResponse> + handler); + /** * Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object Storage service. *

@@ -178,6 +196,23 @@ java.util.concurrent.Future createImage( CreateInstanceConsoleConnectionResponse> handler); + /** + * Delete a subscription for a listing resource version for a compartment. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteAppCatalogSubscription( + DeleteAppCatalogSubscriptionRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteAppCatalogSubscriptionRequest, + DeleteAppCatalogSubscriptionResponse> + handler); + /** * Deletes the specified console history metadata and the console history data. * @@ -312,6 +347,58 @@ java.util.concurrent.Future exportImage( ExportImageRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets the specified listing. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getAppCatalogListing( + GetAppCatalogListingRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetAppCatalogListingRequest, GetAppCatalogListingResponse> + handler); + + /** + * Retrieves the agreements for a particular resource version of a listing. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getAppCatalogListingAgreements( + GetAppCatalogListingAgreementsRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetAppCatalogListingAgreementsRequest, + GetAppCatalogListingAgreementsResponse> + handler); + + /** + * Gets the specified listing resource version. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + getAppCatalogListingResourceVersion( + GetAppCatalogListingResourceVersionRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetAppCatalogListingResourceVersionRequest, + GetAppCatalogListingResourceVersionResponse> + handler); + /** * Gets information about the specified boot volume attachment. * @@ -538,6 +625,56 @@ java.util.concurrent.Future launchInstance( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets all resource versions for a particular listing. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future + listAppCatalogListingResourceVersions( + ListAppCatalogListingResourceVersionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListAppCatalogListingResourceVersionsRequest, + ListAppCatalogListingResourceVersionsResponse> + handler); + + /** + * Lists the published listings. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listAppCatalogListings( + ListAppCatalogListingsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListAppCatalogListingsRequest, ListAppCatalogListingsResponse> + handler); + + /** + * Lists subscriptions for a compartment. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listAppCatalogSubscriptions( + ListAppCatalogSubscriptionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListAppCatalogSubscriptionsRequest, ListAppCatalogSubscriptionsResponse> + handler); + /** * Lists the boot volume attachments in the specified compartment. You can filter the * list by specifying an instance OCID, boot volume OCID, or both. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java index 89d6174da05..d96818f7d1c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsyncClient.java @@ -623,6 +623,95 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future + createAppCatalogSubscription( + final CreateAppCatalogSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateAppCatalogSubscriptionRequest, + CreateAppCatalogSubscriptionResponse> + handler) { + LOG.trace("Called async createAppCatalogSubscription"); + final CreateAppCatalogSubscriptionRequest interceptedRequest = + CreateAppCatalogSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAppCatalogSubscriptionConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAppCatalogSubscriptionResponse> + transformer = CreateAppCatalogSubscriptionConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + CreateAppCatalogSubscriptionRequest, CreateAppCatalogSubscriptionResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + CreateAppCatalogSubscriptionRequest, + CreateAppCatalogSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post( + ib, + interceptedRequest.getCreateAppCatalogSubscriptionDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getCreateAppCatalogSubscriptionDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, CreateAppCatalogSubscriptionResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getCreateAppCatalogSubscriptionDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future createImage( final CreateImageRequest request, @@ -796,6 +885,80 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future + deleteAppCatalogSubscription( + final DeleteAppCatalogSubscriptionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteAppCatalogSubscriptionRequest, + DeleteAppCatalogSubscriptionResponse> + handler) { + LOG.trace("Called async deleteAppCatalogSubscription"); + final DeleteAppCatalogSubscriptionRequest interceptedRequest = + DeleteAppCatalogSubscriptionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAppCatalogSubscriptionConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAppCatalogSubscriptionResponse> + transformer = DeleteAppCatalogSubscriptionConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + DeleteAppCatalogSubscriptionRequest, DeleteAppCatalogSubscriptionResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + DeleteAppCatalogSubscriptionRequest, + DeleteAppCatalogSubscriptionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.delete(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.delete(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, DeleteAppCatalogSubscriptionResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.delete(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future deleteConsoleHistory( final DeleteConsoleHistoryRequest request, @@ -1297,6 +1460,228 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future getAppCatalogListing( + final GetAppCatalogListingRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetAppCatalogListingRequest, GetAppCatalogListingResponse> + handler) { + LOG.trace("Called async getAppCatalogListing"); + final GetAppCatalogListingRequest interceptedRequest = + GetAppCatalogListingConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAppCatalogListingConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAppCatalogListingResponse> + transformer = GetAppCatalogListingConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + GetAppCatalogListingRequest, GetAppCatalogListingResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetAppCatalogListingRequest, GetAppCatalogListingResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, GetAppCatalogListingResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future + getAppCatalogListingAgreements( + final GetAppCatalogListingAgreementsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetAppCatalogListingAgreementsRequest, + GetAppCatalogListingAgreementsResponse> + handler) { + LOG.trace("Called async getAppCatalogListingAgreements"); + final GetAppCatalogListingAgreementsRequest interceptedRequest = + GetAppCatalogListingAgreementsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAppCatalogListingAgreementsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAppCatalogListingAgreementsResponse> + transformer = GetAppCatalogListingAgreementsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + GetAppCatalogListingAgreementsRequest, + GetAppCatalogListingAgreementsResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetAppCatalogListingAgreementsRequest, + GetAppCatalogListingAgreementsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, GetAppCatalogListingAgreementsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future + getAppCatalogListingResourceVersion( + final GetAppCatalogListingResourceVersionRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetAppCatalogListingResourceVersionRequest, + GetAppCatalogListingResourceVersionResponse> + handler) { + LOG.trace("Called async getAppCatalogListingResourceVersion"); + final GetAppCatalogListingResourceVersionRequest interceptedRequest = + GetAppCatalogListingResourceVersionConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAppCatalogListingResourceVersionConverter.fromRequest( + client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAppCatalogListingResourceVersionResponse> + transformer = GetAppCatalogListingResourceVersionConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + GetAppCatalogListingResourceVersionRequest, + GetAppCatalogListingResourceVersionResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetAppCatalogListingResourceVersionRequest, + GetAppCatalogListingResourceVersionResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, GetAppCatalogListingResourceVersionResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future getBootVolumeAttachment( final GetBootVolumeAttachmentRequest request, @@ -2086,6 +2471,227 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future + listAppCatalogListingResourceVersions( + final ListAppCatalogListingResourceVersionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListAppCatalogListingResourceVersionsRequest, + ListAppCatalogListingResourceVersionsResponse> + handler) { + LOG.trace("Called async listAppCatalogListingResourceVersions"); + final ListAppCatalogListingResourceVersionsRequest interceptedRequest = + ListAppCatalogListingResourceVersionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAppCatalogListingResourceVersionsConverter.fromRequest( + client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogListingResourceVersionsResponse> + transformer = ListAppCatalogListingResourceVersionsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListAppCatalogListingResourceVersionsRequest, + ListAppCatalogListingResourceVersionsResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListAppCatalogListingResourceVersionsRequest, + ListAppCatalogListingResourceVersionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListAppCatalogListingResourceVersionsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listAppCatalogListings( + final ListAppCatalogListingsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListAppCatalogListingsRequest, ListAppCatalogListingsResponse> + handler) { + LOG.trace("Called async listAppCatalogListings"); + final ListAppCatalogListingsRequest interceptedRequest = + ListAppCatalogListingsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAppCatalogListingsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogListingsResponse> + transformer = ListAppCatalogListingsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListAppCatalogListingsRequest, ListAppCatalogListingsResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListAppCatalogListingsRequest, ListAppCatalogListingsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListAppCatalogListingsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future + listAppCatalogSubscriptions( + final ListAppCatalogSubscriptionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListAppCatalogSubscriptionsRequest, + ListAppCatalogSubscriptionsResponse> + handler) { + LOG.trace("Called async listAppCatalogSubscriptions"); + final ListAppCatalogSubscriptionsRequest interceptedRequest = + ListAppCatalogSubscriptionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAppCatalogSubscriptionsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogSubscriptionsResponse> + transformer = ListAppCatalogSubscriptionsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListAppCatalogSubscriptionsRequest, ListAppCatalogSubscriptionsResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListAppCatalogSubscriptionsRequest, + ListAppCatalogSubscriptionsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListAppCatalogSubscriptionsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future listBootVolumeAttachments( final ListBootVolumeAttachmentsRequest request, diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java index 2909063debd..3340bdf2c65 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeClient.java @@ -416,6 +416,34 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public CreateAppCatalogSubscriptionResponse createAppCatalogSubscription( + CreateAppCatalogSubscriptionRequest request) { + LOG.trace("Called createAppCatalogSubscription"); + request = CreateAppCatalogSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAppCatalogSubscriptionConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAppCatalogSubscriptionResponse> + transformer = CreateAppCatalogSubscriptionConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.post(ib, request.getCreateAppCatalogSubscriptionDetails(), request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public CreateImageResponse createImage(CreateImageRequest request) { LOG.trace("Called createImage"); @@ -471,6 +499,33 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public DeleteAppCatalogSubscriptionResponse deleteAppCatalogSubscription( + DeleteAppCatalogSubscriptionRequest request) { + LOG.trace("Called deleteAppCatalogSubscription"); + request = DeleteAppCatalogSubscriptionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAppCatalogSubscriptionConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAppCatalogSubscriptionResponse> + transformer = DeleteAppCatalogSubscriptionConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.delete(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public DeleteConsoleHistoryResponse deleteConsoleHistory(DeleteConsoleHistoryRequest request) { LOG.trace("Called deleteConsoleHistory"); @@ -649,6 +704,85 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public GetAppCatalogListingResponse getAppCatalogListing(GetAppCatalogListingRequest request) { + LOG.trace("Called getAppCatalogListing"); + request = GetAppCatalogListingConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAppCatalogListingConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetAppCatalogListingConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public GetAppCatalogListingAgreementsResponse getAppCatalogListingAgreements( + GetAppCatalogListingAgreementsRequest request) { + LOG.trace("Called getAppCatalogListingAgreements"); + request = GetAppCatalogListingAgreementsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAppCatalogListingAgreementsConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, GetAppCatalogListingAgreementsResponse> + transformer = GetAppCatalogListingAgreementsConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public GetAppCatalogListingResourceVersionResponse getAppCatalogListingResourceVersion( + GetAppCatalogListingResourceVersionRequest request) { + LOG.trace("Called getAppCatalogListingResourceVersion"); + request = GetAppCatalogListingResourceVersionConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAppCatalogListingResourceVersionConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, GetAppCatalogListingResourceVersionResponse> + transformer = GetAppCatalogListingResourceVersionConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public GetBootVolumeAttachmentResponse getBootVolumeAttachment( GetBootVolumeAttachmentRequest request) { @@ -931,6 +1065,86 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public ListAppCatalogListingResourceVersionsResponse listAppCatalogListingResourceVersions( + ListAppCatalogListingResourceVersionsRequest request) { + LOG.trace("Called listAppCatalogListingResourceVersions"); + request = ListAppCatalogListingResourceVersionsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAppCatalogListingResourceVersionsConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogListingResourceVersionsResponse> + transformer = ListAppCatalogListingResourceVersionsConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public ListAppCatalogListingsResponse listAppCatalogListings( + ListAppCatalogListingsRequest request) { + LOG.trace("Called listAppCatalogListings"); + request = ListAppCatalogListingsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAppCatalogListingsConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListAppCatalogListingsConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public ListAppCatalogSubscriptionsResponse listAppCatalogSubscriptions( + ListAppCatalogSubscriptionsRequest request) { + LOG.trace("Called listAppCatalogSubscriptions"); + request = ListAppCatalogSubscriptionsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAppCatalogSubscriptionsConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogSubscriptionsResponse> + transformer = ListAppCatalogSubscriptionsConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public ListBootVolumeAttachmentsResponse listBootVolumeAttachments( ListBootVolumeAttachmentsRequest request) { diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputePaginators.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputePaginators.java index ee43d5afc44..c79e2604a7e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputePaginators.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputePaginators.java @@ -29,6 +29,369 @@ public class ComputePaginators { private final Compute client; + /** + * Creates a new iterable which will iterate over the responses received from the listAppCatalogListingResourceVersions operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listAppCatalogListingResourceVersionsResponseIterator( + final ListAppCatalogListingResourceVersionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAppCatalogListingResourceVersionsRequest.Builder, + ListAppCatalogListingResourceVersionsRequest, + ListAppCatalogListingResourceVersionsResponse>( + new com.google.common.base.Supplier< + ListAppCatalogListingResourceVersionsRequest.Builder>() { + @Override + public ListAppCatalogListingResourceVersionsRequest.Builder get() { + return ListAppCatalogListingResourceVersionsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function< + ListAppCatalogListingResourceVersionsResponse, String>() { + @Override + public String apply(ListAppCatalogListingResourceVersionsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAppCatalogListingResourceVersionsRequest.Builder>, + ListAppCatalogListingResourceVersionsRequest>() { + @Override + public ListAppCatalogListingResourceVersionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAppCatalogListingResourceVersionsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAppCatalogListingResourceVersionsRequest, + ListAppCatalogListingResourceVersionsResponse>() { + @Override + public ListAppCatalogListingResourceVersionsResponse apply( + ListAppCatalogListingResourceVersionsRequest request) { + return client.listAppCatalogListingResourceVersions(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.core.model.AppCatalogListingResourceVersionSummary} objects + * contained in responses from the listAppCatalogListingResourceVersions operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.core.model.AppCatalogListingResourceVersionSummary} objects + * contained in responses received from the service. + */ + public Iterable + listAppCatalogListingResourceVersionsRecordIterator( + final ListAppCatalogListingResourceVersionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAppCatalogListingResourceVersionsRequest.Builder, + ListAppCatalogListingResourceVersionsRequest, + ListAppCatalogListingResourceVersionsResponse, + com.oracle.bmc.core.model.AppCatalogListingResourceVersionSummary>( + new com.google.common.base.Supplier< + ListAppCatalogListingResourceVersionsRequest.Builder>() { + @Override + public ListAppCatalogListingResourceVersionsRequest.Builder get() { + return ListAppCatalogListingResourceVersionsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function< + ListAppCatalogListingResourceVersionsResponse, String>() { + @Override + public String apply(ListAppCatalogListingResourceVersionsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAppCatalogListingResourceVersionsRequest.Builder>, + ListAppCatalogListingResourceVersionsRequest>() { + @Override + public ListAppCatalogListingResourceVersionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAppCatalogListingResourceVersionsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAppCatalogListingResourceVersionsRequest, + ListAppCatalogListingResourceVersionsResponse>() { + @Override + public ListAppCatalogListingResourceVersionsResponse apply( + ListAppCatalogListingResourceVersionsRequest request) { + return client.listAppCatalogListingResourceVersions(request); + } + }, + new com.google.common.base.Function< + ListAppCatalogListingResourceVersionsResponse, + java.util.List< + com.oracle.bmc.core.model + .AppCatalogListingResourceVersionSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.core.model + .AppCatalogListingResourceVersionSummary> + apply(ListAppCatalogListingResourceVersionsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listAppCatalogListings operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listAppCatalogListingsResponseIterator( + final ListAppCatalogListingsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAppCatalogListingsRequest.Builder, ListAppCatalogListingsRequest, + ListAppCatalogListingsResponse>( + new com.google.common.base.Supplier() { + @Override + public ListAppCatalogListingsRequest.Builder get() { + return ListAppCatalogListingsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListAppCatalogListingsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAppCatalogListingsRequest.Builder>, + ListAppCatalogListingsRequest>() { + @Override + public ListAppCatalogListingsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAppCatalogListingsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAppCatalogListingsRequest, ListAppCatalogListingsResponse>() { + @Override + public ListAppCatalogListingsResponse apply( + ListAppCatalogListingsRequest request) { + return client.listAppCatalogListings(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.core.model.AppCatalogListingSummary} objects + * contained in responses from the listAppCatalogListings operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.core.model.AppCatalogListingSummary} objects + * contained in responses received from the service. + */ + public Iterable + listAppCatalogListingsRecordIterator(final ListAppCatalogListingsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAppCatalogListingsRequest.Builder, ListAppCatalogListingsRequest, + ListAppCatalogListingsResponse, com.oracle.bmc.core.model.AppCatalogListingSummary>( + new com.google.common.base.Supplier() { + @Override + public ListAppCatalogListingsRequest.Builder get() { + return ListAppCatalogListingsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListAppCatalogListingsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAppCatalogListingsRequest.Builder>, + ListAppCatalogListingsRequest>() { + @Override + public ListAppCatalogListingsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAppCatalogListingsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAppCatalogListingsRequest, ListAppCatalogListingsResponse>() { + @Override + public ListAppCatalogListingsResponse apply( + ListAppCatalogListingsRequest request) { + return client.listAppCatalogListings(request); + } + }, + new com.google.common.base.Function< + ListAppCatalogListingsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListAppCatalogListingsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listAppCatalogSubscriptions operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable + listAppCatalogSubscriptionsResponseIterator( + final ListAppCatalogSubscriptionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAppCatalogSubscriptionsRequest.Builder, ListAppCatalogSubscriptionsRequest, + ListAppCatalogSubscriptionsResponse>( + new com.google.common.base.Supplier() { + @Override + public ListAppCatalogSubscriptionsRequest.Builder get() { + return ListAppCatalogSubscriptionsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListAppCatalogSubscriptionsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAppCatalogSubscriptionsRequest.Builder>, + ListAppCatalogSubscriptionsRequest>() { + @Override + public ListAppCatalogSubscriptionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAppCatalogSubscriptionsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAppCatalogSubscriptionsRequest, ListAppCatalogSubscriptionsResponse>() { + @Override + public ListAppCatalogSubscriptionsResponse apply( + ListAppCatalogSubscriptionsRequest request) { + return client.listAppCatalogSubscriptions(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.core.model.AppCatalogSubscriptionSummary} objects + * contained in responses from the listAppCatalogSubscriptions operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.core.model.AppCatalogSubscriptionSummary} objects + * contained in responses received from the service. + */ + public Iterable + listAppCatalogSubscriptionsRecordIterator( + final ListAppCatalogSubscriptionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAppCatalogSubscriptionsRequest.Builder, ListAppCatalogSubscriptionsRequest, + ListAppCatalogSubscriptionsResponse, + com.oracle.bmc.core.model.AppCatalogSubscriptionSummary>( + new com.google.common.base.Supplier() { + @Override + public ListAppCatalogSubscriptionsRequest.Builder get() { + return ListAppCatalogSubscriptionsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListAppCatalogSubscriptionsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAppCatalogSubscriptionsRequest.Builder>, + ListAppCatalogSubscriptionsRequest>() { + @Override + public ListAppCatalogSubscriptionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAppCatalogSubscriptionsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListAppCatalogSubscriptionsRequest, ListAppCatalogSubscriptionsResponse>() { + @Override + public ListAppCatalogSubscriptionsResponse apply( + ListAppCatalogSubscriptionsRequest request) { + return client.listAppCatalogSubscriptions(request); + } + }, + new com.google.common.base.Function< + ListAppCatalogSubscriptionsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListAppCatalogSubscriptionsResponse response) { + return response.getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listBootVolumeAttachments operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java index 5ff2dcf9966..41a5c8ac3d9 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java @@ -319,6 +319,16 @@ ConnectRemotePeeringConnectionsResponse connectRemotePeeringConnections( CreateLocalPeeringGatewayResponse createLocalPeeringGateway( CreateLocalPeeringGatewayRequest request); + /** + * Creates a new NAT gateway for the specified VCN. You must also set up a route rule with the + * NAT gateway as the rule's target. See {@link RouteTable}. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + CreateNatGatewayResponse createNatGateway(CreateNatGatewayRequest request); + /** * Creates a secondary private IP for the specified VNIC. * For more information about secondary private IPs, see @@ -335,11 +345,12 @@ CreateLocalPeeringGatewayResponse createLocalPeeringGateway( * reserved public IP. For information about limits on how many you can create, see * [Public IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm). *

- * **For an ephemeral public IP:** You must also specify a `privateIpId` with the OCID of - * the primary private IP you want to assign the public IP to. The public IP is created in - * the same availability domain as the private IP. An ephemeral public IP must always be + * **For an ephemeral public IP assigned to a private IP:** You must also specify a `privateIpId` + * with the OCID of the primary private IP you want to assign the public IP to. The public IP is + * created in the same availability domain as the private IP. An ephemeral public IP must always be * assigned to a private IP, and only to the *primary* private IP on a VNIC, not a secondary - * private IP. + * private IP. Exception: If you create a {@link NatGateway}, Oracle + * automatically assigns the NAT gateway a regional ephemeral public IP that you cannot remove. *

* **For a reserved public IP:** You may also optionally assign the public IP to a private * IP by specifying `privateIpId`. Or you can later assign the public IP with @@ -645,6 +656,19 @@ CreateRemotePeeringConnectionResponse createRemotePeeringConnection( DeleteLocalPeeringGatewayResponse deleteLocalPeeringGateway( DeleteLocalPeeringGatewayRequest request); + /** + * Deletes the specified NAT gateway. The NAT gateway does not have to be disabled, but there + * must not be a route rule that lists the NAT gateway as a target. + *

+ * This is an asynchronous operation. The NAT gateway's `lifecycleState` will change to + * TERMINATING temporarily until the NAT gateway is completely removed. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + DeleteNatGatewayResponse deleteNatGateway(DeleteNatGatewayRequest request); + /** * Unassigns and deletes the specified private IP. You must * specify the object's OCID. The private IP address is returned to @@ -669,6 +693,10 @@ DeleteLocalPeeringGatewayResponse deleteLocalPeeringGateway( * You must specify the object's OCID. The public IP address is returned to the * Oracle Cloud Infrastructure public IP pool. *

+ **Note:** You cannot update, unassign, or delete the public IP that Oracle automatically + * assigned to an entity for you (such as a load balancer or NAT gateway). The public IP is + * automatically deleted if the assigned entity is terminated. + *

* For an assigned reserved public IP, the initial unassignment portion of this operation * is asynchronous. Poll the public IP's `lifecycleState` to determine * if the operation succeeded. @@ -913,6 +941,14 @@ GetIPSecConnectionDeviceStatusResponse getIPSecConnectionDeviceStatus( */ GetLocalPeeringGatewayResponse getLocalPeeringGateway(GetLocalPeeringGatewayRequest request); + /** + * Gets the specified NAT gateway's information. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetNatGatewayResponse getNatGateway(GetNatGatewayRequest request); + /** * Gets the specified private IP. You must specify the object's OCID. * Alternatively, you can get the object by using @@ -936,7 +972,7 @@ GetIPSecConnectionDeviceStatusResponse getIPSecConnectionDeviceStatus( *

**Note:** If you're fetching a reserved public IP that is in the process of being * moved to a different private IP, the service returns the public IP object with - * `lifecycleState` = ASSIGNING and `privateIpId` = OCID of the target private IP. + * `lifecycleState` = ASSIGNING and `assignedEntityId` = OCID of the target private IP. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -949,7 +985,7 @@ GetIPSecConnectionDeviceStatusResponse getIPSecConnectionDeviceStatus( *

**Note:** If you're fetching a reserved public IP that is in the process of being * moved to a different private IP, the service returns the public IP object with - * `lifecycleState` = ASSIGNING and `privateIpId` = OCID of the target private IP. + * `lifecycleState` = ASSIGNING and `assignedEntityId` = OCID of the target private IP. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -967,8 +1003,8 @@ GetIPSecConnectionDeviceStatusResponse getIPSecConnectionDeviceStatus( * private IP, or if you instead call * {@link #getPublicIp(GetPublicIpRequest) getPublicIp} or * {@link #getPublicIpByIpAddress(GetPublicIpByIpAddressRequest) getPublicIpByIpAddress}, the - * service returns the public IP object with `lifecycleState` = ASSIGNING and `privateIpId` = OCID - * of the target private IP. + * service returns the public IP object with `lifecycleState` = ASSIGNING and + * `assignedEntityId` = OCID of the target private IP. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -1208,6 +1244,16 @@ ListFastConnectProviderServicesResponse listFastConnectProviderServices( ListLocalPeeringGatewaysResponse listLocalPeeringGateways( ListLocalPeeringGatewaysRequest request); + /** + * Lists the NAT gateways in the specified compartment. You may optionally specify a VCN OCID + * to filter the results by VCN. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListNatGatewaysResponse listNatGateways(ListNatGatewaysRequest request); + /** * Lists the {@link PrivateIp} objects based * on one of these filters: @@ -1230,15 +1276,26 @@ ListLocalPeeringGatewaysResponse listLocalPeeringGateways( ListPrivateIpsResponse listPrivateIps(ListPrivateIpsRequest request); /** - * Lists either the ephemeral or reserved {@link PublicIp} objects - * in the specified compartment. + * Lists the {@link PublicIp} objects + * in the specified compartment. You can filter the list by using query parameters. *

- * To list your reserved public IPs, set `scope` = `REGION`, and leave the - * `availabilityDomain` parameter empty. + * To list your reserved public IPs: + * * Set `scope` = `REGION` (required) + * * Leave the `availabilityDomain` parameter empty + * * Set `lifetime` = `RESERVED` *

- * To list your ephemeral public IPs, set `scope` = `AVAILABILITY_DOMAIN`, and set the - * `availabilityDomain` parameter to the desired availability domain. An ephemeral public IP - * is always in the same availability domain and compartment as the private IP it's assigned to. + * To list the ephemeral public IPs assigned to a regional entity such as a NAT gateway: + * * Set `scope` = `REGION` (required) + * * Leave the `availabilityDomain` parameter empty + * * Set `lifetime` = `EPHEMERAL` + *

+ * To list the ephemeral public IPs assigned to private IPs: + * * Set `scope` = `AVAILABILITY_DOMAIN` (required) + * * Set the `availabilityDomain` parameter to the desired availability domain (required) + * * Set `lifetime` = `EPHEMERAL` + *

+ **Note:** An ephemeral public IP assigned to a private IP + * is always in the same availability domain and compartment as the private IP. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -1436,6 +1493,15 @@ ListVirtualCircuitPublicPrefixesResponse listVirtualCircuitPublicPrefixes( UpdateLocalPeeringGatewayResponse updateLocalPeeringGateway( UpdateLocalPeeringGatewayRequest request); + /** + * Updates the specified NAT gateway. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + UpdateNatGatewayResponse updateNatGateway(UpdateNatGatewayRequest request); + /** * Updates the specified private IP. You must specify the object's OCID. * Use this operation if you want to: diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java index 06da68f96c7..41962014659 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java @@ -427,6 +427,23 @@ java.util.concurrent.Future createLocalPeerin CreateLocalPeeringGatewayRequest, CreateLocalPeeringGatewayResponse> handler); + /** + * Creates a new NAT gateway for the specified VCN. You must also set up a route rule with the + * NAT gateway as the rule's target. See {@link RouteTable}. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future createNatGateway( + CreateNatGatewayRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Creates a secondary private IP for the specified VNIC. * For more information about secondary private IPs, see @@ -450,11 +467,12 @@ java.util.concurrent.Future createPrivateIp( * reserved public IP. For information about limits on how many you can create, see * [Public IP Addresses](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingpublicIPs.htm). *

- * **For an ephemeral public IP:** You must also specify a `privateIpId` with the OCID of - * the primary private IP you want to assign the public IP to. The public IP is created in - * the same availability domain as the private IP. An ephemeral public IP must always be + * **For an ephemeral public IP assigned to a private IP:** You must also specify a `privateIpId` + * with the OCID of the primary private IP you want to assign the public IP to. The public IP is + * created in the same availability domain as the private IP. An ephemeral public IP must always be * assigned to a private IP, and only to the *primary* private IP on a VNIC, not a secondary - * private IP. + * private IP. Exception: If you create a {@link NatGateway}, Oracle + * automatically assigns the NAT gateway a regional ephemeral public IP that you cannot remove. *

* **For a reserved public IP:** You may also optionally assign the public IP to a private * IP by specifying `privateIpId`. Or you can later assign the public IP with @@ -887,6 +905,26 @@ java.util.concurrent.Future deleteLocalPeerin DeleteLocalPeeringGatewayRequest, DeleteLocalPeeringGatewayResponse> handler); + /** + * Deletes the specified NAT gateway. The NAT gateway does not have to be disabled, but there + * must not be a route rule that lists the NAT gateway as a target. + *

+ * This is an asynchronous operation. The NAT gateway's `lifecycleState` will change to + * TERMINATING temporarily until the NAT gateway is completely removed. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteNatGateway( + DeleteNatGatewayRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Unassigns and deletes the specified private IP. You must * specify the object's OCID. The private IP address is returned to @@ -918,6 +956,10 @@ java.util.concurrent.Future deletePrivateIp( * You must specify the object's OCID. The public IP address is returned to the * Oracle Cloud Infrastructure public IP pool. *

+ **Note:** You cannot update, unassign, or delete the public IP that Oracle automatically + * assigned to an entity for you (such as a load balancer or NAT gateway). The public IP is + * automatically deleted if the assigned entity is terminated. + *

* For an assigned reserved public IP, the initial unassignment portion of this operation * is asynchronous. Poll the public IP's `lifecycleState` to determine * if the operation succeeded. @@ -1338,6 +1380,21 @@ java.util.concurrent.Future getLocalPeeringGatew GetLocalPeeringGatewayRequest, GetLocalPeeringGatewayResponse> handler); + /** + * Gets the specified NAT gateway's information. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getNatGateway( + GetNatGatewayRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Gets the specified private IP. You must specify the object's OCID. * Alternatively, you can get the object by using @@ -1368,7 +1425,7 @@ java.util.concurrent.Future getPrivateIp( *

**Note:** If you're fetching a reserved public IP that is in the process of being * moved to a different private IP, the service returns the public IP object with - * `lifecycleState` = ASSIGNING and `privateIpId` = OCID of the target private IP. + * `lifecycleState` = ASSIGNING and `assignedEntityId` = OCID of the target private IP. * * * @param request The request object containing the details to send @@ -1387,7 +1444,7 @@ java.util.concurrent.Future getPublicIp( *

**Note:** If you're fetching a reserved public IP that is in the process of being * moved to a different private IP, the service returns the public IP object with - * `lifecycleState` = ASSIGNING and `privateIpId` = OCID of the target private IP. + * `lifecycleState` = ASSIGNING and `assignedEntityId` = OCID of the target private IP. * * * @param request The request object containing the details to send @@ -1413,8 +1470,8 @@ java.util.concurrent.Future getPublicIpByIpAddre * private IP, or if you instead call * {@link #getPublicIp(GetPublicIpRequest, Consumer, Consumer) getPublicIp} or * {@link #getPublicIpByIpAddress(GetPublicIpByIpAddressRequest, Consumer, Consumer) getPublicIpByIpAddress}, the - * service returns the public IP object with `lifecycleState` = ASSIGNING and `privateIpId` = OCID - * of the target private IP. + * service returns the public IP object with `lifecycleState` = ASSIGNING and + * `assignedEntityId` = OCID of the target private IP. * * * @param request The request object containing the details to send @@ -1830,6 +1887,23 @@ java.util.concurrent.Future listLocalPeeringGa ListLocalPeeringGatewaysRequest, ListLocalPeeringGatewaysResponse> handler); + /** + * Lists the NAT gateways in the specified compartment. You may optionally specify a VCN OCID + * to filter the results by VCN. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listNatGateways( + ListNatGatewaysRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Lists the {@link PrivateIp} objects based * on one of these filters: @@ -1859,15 +1933,26 @@ java.util.concurrent.Future listPrivateIps( handler); /** - * Lists either the ephemeral or reserved {@link PublicIp} objects - * in the specified compartment. + * Lists the {@link PublicIp} objects + * in the specified compartment. You can filter the list by using query parameters. + *

+ * To list your reserved public IPs: + * * Set `scope` = `REGION` (required) + * * Leave the `availabilityDomain` parameter empty + * * Set `lifetime` = `RESERVED` + *

+ * To list the ephemeral public IPs assigned to a regional entity such as a NAT gateway: + * * Set `scope` = `REGION` (required) + * * Leave the `availabilityDomain` parameter empty + * * Set `lifetime` = `EPHEMERAL` *

- * To list your reserved public IPs, set `scope` = `REGION`, and leave the - * `availabilityDomain` parameter empty. + * To list the ephemeral public IPs assigned to private IPs: + * * Set `scope` = `AVAILABILITY_DOMAIN` (required) + * * Set the `availabilityDomain` parameter to the desired availability domain (required) + * * Set `lifetime` = `EPHEMERAL` *

- * To list your ephemeral public IPs, set `scope` = `AVAILABILITY_DOMAIN`, and set the - * `availabilityDomain` parameter to the desired availability domain. An ephemeral public IP - * is always in the same availability domain and compartment as the private IP it's assigned to. + **Note:** An ephemeral public IP assigned to a private IP + * is always in the same availability domain and compartment as the private IP. * * * @param request The request object containing the details to send @@ -2215,6 +2300,22 @@ java.util.concurrent.Future updateLocalPeerin UpdateLocalPeeringGatewayRequest, UpdateLocalPeeringGatewayResponse> handler); + /** + * Updates the specified NAT gateway. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future updateNatGateway( + UpdateNatGatewayRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Updates the specified private IP. You must specify the object's OCID. * Use this operation if you want to: diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java index 79acb8dfca6..19ed2eff989 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java @@ -1500,6 +1500,90 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future createNatGateway( + final CreateNatGatewayRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateNatGatewayRequest, CreateNatGatewayResponse> + handler) { + LOG.trace("Called async createNatGateway"); + final CreateNatGatewayRequest interceptedRequest = + CreateNatGatewayConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateNatGatewayConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = CreateNatGatewayConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + CreateNatGatewayRequest, CreateNatGatewayResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post( + ib, + interceptedRequest.getCreateNatGatewayDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getCreateNatGatewayDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, CreateNatGatewayResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getCreateNatGatewayDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future createPrivateIp( final CreatePrivateIpRequest request, @@ -2889,6 +2973,75 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future deleteNatGateway( + final DeleteNatGatewayRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteNatGatewayRequest, DeleteNatGatewayResponse> + handler) { + LOG.trace("Called async deleteNatGateway"); + final DeleteNatGatewayRequest interceptedRequest = + DeleteNatGatewayConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteNatGatewayConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = DeleteNatGatewayConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + DeleteNatGatewayRequest, DeleteNatGatewayResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.delete(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.delete(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, DeleteNatGatewayResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.delete(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future deletePrivateIp( final DeletePrivateIpRequest request, @@ -4587,6 +4740,74 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future getNatGateway( + final GetNatGatewayRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getNatGateway"); + final GetNatGatewayRequest interceptedRequest = + GetNatGatewayConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetNatGatewayConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetNatGatewayConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetNatGatewayRequest, GetNatGatewayResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, GetNatGatewayResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future getPrivateIp( final GetPrivateIpRequest request, @@ -6511,6 +6732,75 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future listNatGateways( + final ListNatGatewaysRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListNatGatewaysRequest, ListNatGatewaysResponse> + handler) { + LOG.trace("Called async listNatGateways"); + final ListNatGatewaysRequest interceptedRequest = + ListNatGatewaysConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListNatGatewaysConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListNatGatewaysConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListNatGatewaysRequest, ListNatGatewaysResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListNatGatewaysResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future listPrivateIps( final ListPrivateIpsRequest request, @@ -8117,6 +8407,90 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future updateNatGateway( + final UpdateNatGatewayRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateNatGatewayRequest, UpdateNatGatewayResponse> + handler) { + LOG.trace("Called async updateNatGateway"); + final UpdateNatGatewayRequest interceptedRequest = + UpdateNatGatewayConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateNatGatewayConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = UpdateNatGatewayConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + UpdateNatGatewayRequest, UpdateNatGatewayResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.put( + ib, + interceptedRequest.getUpdateNatGatewayDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.put( + ib, + interceptedRequest.getUpdateNatGatewayDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, UpdateNatGatewayResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.put( + ib, + interceptedRequest.getUpdateNatGatewayDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future updatePrivateIp( final UpdatePrivateIpRequest request, diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java index 6d1f4941417..b06e956b5ad 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java @@ -695,6 +695,32 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public CreateNatGatewayResponse createNatGateway(CreateNatGatewayRequest request) { + LOG.trace("Called createNatGateway"); + request = CreateNatGatewayConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateNatGatewayConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = CreateNatGatewayConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.post(ib, request.getCreateNatGatewayDetails(), request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public CreatePrivateIpResponse createPrivateIp(CreatePrivateIpRequest request) { LOG.trace("Called createPrivateIp"); @@ -1161,6 +1187,31 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public DeleteNatGatewayResponse deleteNatGateway(DeleteNatGatewayRequest request) { + LOG.trace("Called deleteNatGateway"); + request = DeleteNatGatewayConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteNatGatewayConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = DeleteNatGatewayConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.delete(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public DeletePrivateIpResponse deletePrivateIp(DeletePrivateIpRequest request) { LOG.trace("Called deletePrivateIp"); @@ -1774,6 +1825,31 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public GetNatGatewayResponse getNatGateway(GetNatGatewayRequest request) { + LOG.trace("Called getNatGateway"); + request = GetNatGatewayConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetNatGatewayConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetNatGatewayConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public GetPrivateIpResponse getPrivateIp(GetPrivateIpRequest request) { LOG.trace("Called getPrivateIp"); @@ -2474,6 +2550,31 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public ListNatGatewaysResponse listNatGateways(ListNatGatewaysRequest request) { + LOG.trace("Called listNatGateways"); + request = ListNatGatewaysConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListNatGatewaysConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListNatGatewaysConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public ListPrivateIpsResponse listPrivateIps(ListPrivateIpsRequest request) { LOG.trace("Called listPrivateIps"); @@ -3019,6 +3120,32 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public UpdateNatGatewayResponse updateNatGateway(UpdateNatGatewayRequest request) { + LOG.trace("Called updateNatGateway"); + request = UpdateNatGatewayConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateNatGatewayConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = UpdateNatGatewayConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.put(ib, request.getUpdateNatGatewayDetails(), request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public UpdatePrivateIpResponse updatePrivateIp(UpdatePrivateIpRequest request) { LOG.trace("Called updatePrivateIp"); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkPaginators.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkPaginators.java index d6c08993d25..f8ed62dae65 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkPaginators.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkPaginators.java @@ -1541,6 +1541,118 @@ public java.util.List apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listNatGateways operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listNatGatewaysResponseIterator( + final ListNatGatewaysRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListNatGatewaysRequest.Builder, ListNatGatewaysRequest, ListNatGatewaysResponse>( + new com.google.common.base.Supplier() { + @Override + public ListNatGatewaysRequest.Builder get() { + return ListNatGatewaysRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListNatGatewaysResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListNatGatewaysRequest.Builder>, + ListNatGatewaysRequest>() { + @Override + public ListNatGatewaysRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListNatGatewaysRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListNatGatewaysRequest, ListNatGatewaysResponse>() { + @Override + public ListNatGatewaysResponse apply(ListNatGatewaysRequest request) { + return client.listNatGateways(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.core.model.NatGateway} objects + * contained in responses from the listNatGateways operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.core.model.NatGateway} objects + * contained in responses received from the service. + */ + public Iterable listNatGatewaysRecordIterator( + final ListNatGatewaysRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListNatGatewaysRequest.Builder, ListNatGatewaysRequest, ListNatGatewaysResponse, + com.oracle.bmc.core.model.NatGateway>( + new com.google.common.base.Supplier() { + @Override + public ListNatGatewaysRequest.Builder get() { + return ListNatGatewaysRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListNatGatewaysResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListNatGatewaysRequest.Builder>, + ListNatGatewaysRequest>() { + @Override + public ListNatGatewaysRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListNatGatewaysRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListNatGatewaysRequest, ListNatGatewaysResponse>() { + @Override + public ListNatGatewaysResponse apply(ListNatGatewaysRequest request) { + return client.listNatGateways(request); + } + }, + new com.google.common.base.Function< + ListNatGatewaysResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListNatGatewaysResponse response) { + return response.getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listPrivateIps operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkWaiters.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkWaiters.java index baa3eb1bf9b..4db7e9f4f49 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkWaiters.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkWaiters.java @@ -943,6 +943,103 @@ public boolean apply(GetLocalPeeringGatewayResponse response) { request); } + /** + * Creates a new {@link Waiter} using default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forNatGateway( + GetNatGatewayRequest request, + com.oracle.bmc.core.model.NatGateway.LifecycleState... targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forNatGateway( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link TerminationStrategy} to use + * @param delayStrategy the {@link DelayStrategy} to use + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forNatGateway( + GetNatGatewayRequest request, + com.oracle.bmc.core.model.NatGateway.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + org.apache.commons.lang3.Validate.notNull(targetState, "The targetState cannot be null"); + + return forNatGateway( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link TerminationStrategy} to use + * @param delayStrategy the {@link DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forNatGateway( + GetNatGatewayRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.core.model.NatGateway.LifecycleState... targetStates) { + org.apache.commons.lang3.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + org.apache.commons.lang3.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forNatGateway( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for NatGateway. + private com.oracle.bmc.waiter.Waiter forNatGateway( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetNatGatewayRequest request, + final com.oracle.bmc.core.model.NatGateway.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = + new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + com.google.common.base.Suppliers.ofInstance(request), + new com.google.common.base.Function< + GetNatGatewayRequest, GetNatGatewayResponse>() { + @Override + public GetNatGatewayResponse apply(GetNatGatewayRequest request) { + return client.getNatGateway(request); + } + }, + new com.google.common.base.Predicate() { + @Override + public boolean apply(GetNatGatewayResponse response) { + return targetStatesSet.contains( + response.getNatGateway().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.core.model.NatGateway.LifecycleState.Terminated)), + request); + } + /** * Creates a new {@link Waiter} using default configuration. * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateAppCatalogSubscriptionConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateAppCatalogSubscriptionConverter.java new file mode 100644 index 00000000000..e2b0fe9065a --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateAppCatalogSubscriptionConverter.java @@ -0,0 +1,106 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class CreateAppCatalogSubscriptionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateAppCatalogSubscriptionRequest interceptRequest( + CreateAppCatalogSubscriptionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + CreateAppCatalogSubscriptionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateAppCatalogSubscriptionDetails(), + "createAppCatalogSubscriptionDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("appCatalogSubscriptions"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAppCatalogSubscriptionResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAppCatalogSubscriptionResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAppCatalogSubscriptionResponse>() { + @Override + public CreateAppCatalogSubscriptionResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CreateAppCatalogSubscriptionResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AppCatalogSubscription>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AppCatalogSubscription.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateAppCatalogSubscriptionResponse.Builder builder = + CreateAppCatalogSubscriptionResponse.builder(); + + builder.appCatalogSubscription(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + CreateAppCatalogSubscriptionResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateNatGatewayConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateNatGatewayConverter.java new file mode 100644 index 00000000000..009e9122b2c --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/CreateNatGatewayConverter.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class CreateNatGatewayConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateNatGatewayRequest interceptRequest(CreateNatGatewayRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, CreateNatGatewayRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateNatGatewayDetails(), "createNatGatewayDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("natGateways"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, CreateNatGatewayResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, CreateNatGatewayResponse>() { + @Override + public CreateNatGatewayResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CreateNatGatewayResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + NatGateway>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + NatGateway.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateNatGatewayResponse.Builder builder = + CreateNatGatewayResponse.builder(); + + builder.natGateway(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + CreateNatGatewayResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteAppCatalogSubscriptionConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteAppCatalogSubscriptionConverter.java new file mode 100644 index 00000000000..b76e9f785b2 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteAppCatalogSubscriptionConverter.java @@ -0,0 +1,106 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class DeleteAppCatalogSubscriptionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static DeleteAppCatalogSubscriptionRequest interceptRequest( + DeleteAppCatalogSubscriptionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + DeleteAppCatalogSubscriptionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getListingId(), "listingId is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + Validate.notNull(request.getResourceVersion(), "resourceVersion is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("appCatalogSubscriptions"); + + target = + target.queryParam( + "listingId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getListingId())); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + target = + target.queryParam( + "resourceVersion", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getResourceVersion())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAppCatalogSubscriptionResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAppCatalogSubscriptionResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAppCatalogSubscriptionResponse>() { + @Override + public DeleteAppCatalogSubscriptionResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for DeleteAppCatalogSubscriptionResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + DeleteAppCatalogSubscriptionResponse.Builder builder = + DeleteAppCatalogSubscriptionResponse.builder(); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + DeleteAppCatalogSubscriptionResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteNatGatewayConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteNatGatewayConverter.java new file mode 100644 index 00000000000..6294b0bcdb5 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/DeleteNatGatewayConverter.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class DeleteNatGatewayConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static DeleteNatGatewayRequest interceptRequest(DeleteNatGatewayRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, DeleteNatGatewayRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getNatGatewayId(), "natGatewayId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("natGateways") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNatGatewayId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteNatGatewayResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteNatGatewayResponse>() { + @Override + public DeleteNatGatewayResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for DeleteNatGatewayResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + DeleteNatGatewayResponse.Builder builder = + DeleteNatGatewayResponse.builder(); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + DeleteNatGatewayResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetAppCatalogListingAgreementsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetAppCatalogListingAgreementsConverter.java new file mode 100644 index 00000000000..8ff77db9651 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetAppCatalogListingAgreementsConverter.java @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetAppCatalogListingAgreementsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetAppCatalogListingAgreementsRequest interceptRequest( + GetAppCatalogListingAgreementsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + GetAppCatalogListingAgreementsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getListingId(), "listingId must not be blank"); + Validate.notBlank(request.getResourceVersion(), "resourceVersion must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("appCatalogListings") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getListingId())) + .path("resourceVersions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getResourceVersion())) + .path("agreements"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetAppCatalogListingAgreementsResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAppCatalogListingAgreementsResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + GetAppCatalogListingAgreementsResponse>() { + @Override + public GetAppCatalogListingAgreementsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetAppCatalogListingAgreementsResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AppCatalogListingResourceVersionAgreements>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AppCatalogListingResourceVersionAgreements + .class); + + com.oracle.bmc.http.internal.WithHeaders< + AppCatalogListingResourceVersionAgreements> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetAppCatalogListingAgreementsResponse.Builder builder = + GetAppCatalogListingAgreementsResponse.builder(); + + builder.appCatalogListingResourceVersionAgreements( + response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + GetAppCatalogListingAgreementsResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetAppCatalogListingConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetAppCatalogListingConverter.java new file mode 100644 index 00000000000..7fd97b21ffa --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetAppCatalogListingConverter.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetAppCatalogListingConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetAppCatalogListingRequest interceptRequest( + GetAppCatalogListingRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetAppCatalogListingRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getListingId(), "listingId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("appCatalogListings") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getListingId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetAppCatalogListingResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAppCatalogListingResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetAppCatalogListingResponse>() { + @Override + public GetAppCatalogListingResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetAppCatalogListingResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AppCatalogListing>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AppCatalogListing.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetAppCatalogListingResponse.Builder builder = + GetAppCatalogListingResponse.builder(); + + builder.appCatalogListing(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + GetAppCatalogListingResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetAppCatalogListingResourceVersionConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetAppCatalogListingResourceVersionConverter.java new file mode 100644 index 00000000000..2e20a8e7f55 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetAppCatalogListingResourceVersionConverter.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetAppCatalogListingResourceVersionConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetAppCatalogListingResourceVersionRequest interceptRequest( + GetAppCatalogListingResourceVersionRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + GetAppCatalogListingResourceVersionRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getListingId(), "listingId must not be blank"); + Validate.notBlank(request.getResourceVersion(), "resourceVersion must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("appCatalogListings") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getListingId())) + .path("resourceVersions") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getResourceVersion())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetAppCatalogListingResourceVersionResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetAppCatalogListingResourceVersionResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + GetAppCatalogListingResourceVersionResponse>() { + @Override + public GetAppCatalogListingResourceVersionResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetAppCatalogListingResourceVersionResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AppCatalogListingResourceVersion>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AppCatalogListingResourceVersion.class); + + com.oracle.bmc.http.internal.WithHeaders< + AppCatalogListingResourceVersion> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetAppCatalogListingResourceVersionResponse.Builder builder = + GetAppCatalogListingResourceVersionResponse.builder(); + + builder.appCatalogListingResourceVersion(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + GetAppCatalogListingResourceVersionResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetNatGatewayConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetNatGatewayConverter.java new file mode 100644 index 00000000000..7e0042ea378 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/GetNatGatewayConverter.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetNatGatewayConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetNatGatewayRequest interceptRequest(GetNatGatewayRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetNatGatewayRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getNatGatewayId(), "natGatewayId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("natGateways") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNatGatewayId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetNatGatewayResponse>() { + @Override + public GetNatGatewayResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for GetNatGatewayResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + NatGateway>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + NatGateway.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetNatGatewayResponse.Builder builder = + GetNatGatewayResponse.builder(); + + builder.natGateway(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + GetNatGatewayResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListAppCatalogListingResourceVersionsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListAppCatalogListingResourceVersionsConverter.java new file mode 100644 index 00000000000..21480f72a39 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListAppCatalogListingResourceVersionsConverter.java @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListAppCatalogListingResourceVersionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListAppCatalogListingResourceVersionsRequest interceptRequest( + ListAppCatalogListingResourceVersionsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ListAppCatalogListingResourceVersionsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getListingId(), "listingId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("appCatalogListings") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getListingId())) + .path("resourceVersions"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogListingResourceVersionsResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogListingResourceVersionsResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + ListAppCatalogListingResourceVersionsResponse>() { + @Override + public ListAppCatalogListingResourceVersionsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListAppCatalogListingResourceVersionsResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + AppCatalogListingResourceVersionSummary>>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + AppCatalogListingResourceVersionSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + AppCatalogListingResourceVersionSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListAppCatalogListingResourceVersionsResponse.Builder builder = + ListAppCatalogListingResourceVersionsResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + ListAppCatalogListingResourceVersionsResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListAppCatalogListingsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListAppCatalogListingsConverter.java new file mode 100644 index 00000000000..651e91b9e43 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListAppCatalogListingsConverter.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListAppCatalogListingsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListAppCatalogListingsRequest interceptRequest( + ListAppCatalogListingsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListAppCatalogListingsRequest request) { + Validate.notNull(request, "request instance is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("appCatalogListings"); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getPublisherName() != null) { + target = + target.queryParam( + "publisherName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPublisherName())); + } + + if (request.getPublisherType() != null) { + target = + target.queryParam( + "publisherType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPublisherType())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogListingsResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogListingsResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogListingsResponse>() { + @Override + public ListAppCatalogListingsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListAppCatalogListingsResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + AppCatalogListingSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListAppCatalogListingsResponse.Builder builder = + ListAppCatalogListingsResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + ListAppCatalogListingsResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListAppCatalogSubscriptionsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListAppCatalogSubscriptionsConverter.java new file mode 100644 index 00000000000..f1f4bc975b2 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListAppCatalogSubscriptionsConverter.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListAppCatalogSubscriptionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListAppCatalogSubscriptionsRequest interceptRequest( + ListAppCatalogSubscriptionsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ListAppCatalogSubscriptionsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("appCatalogSubscriptions"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getListingId() != null) { + target = + target.queryParam( + "listingId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getListingId())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogSubscriptionsResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogSubscriptionsResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListAppCatalogSubscriptionsResponse>() { + @Override + public ListAppCatalogSubscriptionsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListAppCatalogSubscriptionsResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + AppCatalogSubscriptionSummary>>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + AppCatalogSubscriptionSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListAppCatalogSubscriptionsResponse.Builder builder = + ListAppCatalogSubscriptionsResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + ListAppCatalogSubscriptionsResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListNatGatewaysConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListNatGatewaysConverter.java new file mode 100644 index 00000000000..c64b3806788 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListNatGatewaysConverter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListNatGatewaysConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListNatGatewaysRequest interceptRequest(ListNatGatewaysRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListNatGatewaysRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20160918").path("natGateways"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getVcnId() != null) { + target = + target.queryParam( + "vcnId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getVcnId())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getDisplayName() != null) { + target = + target.queryParam( + "displayName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getDisplayName())); + } + + if (request.getSortBy() != null) { + target = + target.queryParam( + "sortBy", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortBy().getValue())); + } + + if (request.getSortOrder() != null) { + target = + target.queryParam( + "sortOrder", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getSortOrder().getValue())); + } + + if (request.getLifecycleState() != null) { + target = + target.queryParam( + "lifecycleState", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifecycleState().getValue())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListNatGatewaysResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListNatGatewaysResponse>() { + @Override + public ListNatGatewaysResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for ListNatGatewaysResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List>() {}); + + com.oracle.bmc.http.internal.WithHeaders> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListNatGatewaysResponse.Builder builder = + ListNatGatewaysResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + ListNatGatewaysResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListPublicIpsConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListPublicIpsConverter.java index 27f9e454872..4ff71de0150 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListPublicIpsConverter.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ListPublicIpsConverter.java @@ -59,6 +59,14 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( request.getAvailabilityDomain())); } + if (request.getLifetime() != null) { + target = + target.queryParam( + "lifetime", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLifetime().getValue())); + } + target = target.queryParam( "compartmentId", diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateNatGatewayConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateNatGatewayConverter.java new file mode 100644 index 00000000000..108d3ba9ea4 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/UpdateNatGatewayConverter.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.core.model.*; +import com.oracle.bmc.core.requests.*; +import com.oracle.bmc.core.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class UpdateNatGatewayConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateNatGatewayRequest interceptRequest(UpdateNatGatewayRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, UpdateNatGatewayRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getNatGatewayId(), "natGatewayId must not be blank"); + Validate.notNull( + request.getUpdateNatGatewayDetails(), "updateNatGatewayDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("natGateways") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNatGatewayId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateNatGatewayResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateNatGatewayResponse>() { + @Override + public UpdateNatGatewayResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for UpdateNatGatewayResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + NatGateway>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + NatGateway.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + UpdateNatGatewayResponse.Builder builder = + UpdateNatGatewayResponse.builder(); + + builder.natGateway(response.getItem()); + + com.google.common.base.Optional> etagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "etag"); + if (etagHeader.isPresent()) { + builder.etag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "etag", etagHeader.get().get(0), String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + UpdateNatGatewayResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListing.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListing.java new file mode 100644 index 00000000000..b107314a204 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListing.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * Listing details. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AppCatalogListing.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AppCatalogListing { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("contactUrl") + private String contactUrl; + + public Builder contactUrl(String contactUrl) { + this.contactUrl = contactUrl; + this.__explicitlySet__.add("contactUrl"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + private String listingId; + + public Builder listingId(String listingId) { + this.listingId = listingId; + this.__explicitlySet__.add("listingId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timePublished") + private java.util.Date timePublished; + + public Builder timePublished(java.util.Date timePublished) { + this.timePublished = timePublished; + this.__explicitlySet__.add("timePublished"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("publisherLogoUrl") + private String publisherLogoUrl; + + public Builder publisherLogoUrl(String publisherLogoUrl) { + this.publisherLogoUrl = publisherLogoUrl; + this.__explicitlySet__.add("publisherLogoUrl"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("publisherName") + private String publisherName; + + public Builder publisherName(String publisherName) { + this.publisherName = publisherName; + this.__explicitlySet__.add("publisherName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("summary") + private String summary; + + public Builder summary(String summary) { + this.summary = summary; + this.__explicitlySet__.add("summary"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AppCatalogListing build() { + AppCatalogListing __instance__ = + new AppCatalogListing( + contactUrl, + description, + listingId, + displayName, + timePublished, + publisherLogoUrl, + publisherName, + summary); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AppCatalogListing o) { + Builder copiedBuilder = + contactUrl(o.getContactUrl()) + .description(o.getDescription()) + .listingId(o.getListingId()) + .displayName(o.getDisplayName()) + .timePublished(o.getTimePublished()) + .publisherLogoUrl(o.getPublisherLogoUrl()) + .publisherName(o.getPublisherName()) + .summary(o.getSummary()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Listing's contact URL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("contactUrl") + String contactUrl; + + /** + * Description of the listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + String description; + + /** + * The OCID of the listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + String listingId; + + /** + * Name of the listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * Date and time the listing was published, in RFC3339 format. + * Example: `2018-03-20T12:32:53.532Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timePublished") + java.util.Date timePublished; + + /** + * Publisher's logo URL. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publisherLogoUrl") + String publisherLogoUrl; + + /** + * Name of the publisher who published this listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publisherName") + String publisherName; + + /** + * Summary of the listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("summary") + String summary; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingResourceVersion.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingResourceVersion.java new file mode 100644 index 00000000000..ad2455a50de --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingResourceVersion.java @@ -0,0 +1,253 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * Listing Resource Version + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AppCatalogListingResourceVersion.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AppCatalogListingResourceVersion { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + private String listingId; + + public Builder listingId(String listingId) { + this.listingId = listingId; + this.__explicitlySet__.add("listingId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timePublished") + private java.util.Date timePublished; + + public Builder timePublished(java.util.Date timePublished) { + this.timePublished = timePublished; + this.__explicitlySet__.add("timePublished"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceId") + private String listingResourceId; + + public Builder listingResourceId(String listingResourceId) { + this.listingResourceId = listingResourceId; + this.__explicitlySet__.add("listingResourceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceVersion") + private String listingResourceVersion; + + public Builder listingResourceVersion(String listingResourceVersion) { + this.listingResourceVersion = listingResourceVersion; + this.__explicitlySet__.add("listingResourceVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("availableRegions") + private java.util.List availableRegions; + + public Builder availableRegions(java.util.List availableRegions) { + this.availableRegions = availableRegions; + this.__explicitlySet__.add("availableRegions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compatibleShapes") + private java.util.List compatibleShapes; + + public Builder compatibleShapes(java.util.List compatibleShapes) { + this.compatibleShapes = compatibleShapes; + this.__explicitlySet__.add("compatibleShapes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("accessiblePorts") + private java.util.List accessiblePorts; + + public Builder accessiblePorts(java.util.List accessiblePorts) { + this.accessiblePorts = accessiblePorts; + this.__explicitlySet__.add("accessiblePorts"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("allowedActions") + private java.util.List allowedActions; + + public Builder allowedActions(java.util.List allowedActions) { + this.allowedActions = allowedActions; + this.__explicitlySet__.add("allowedActions"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AppCatalogListingResourceVersion build() { + AppCatalogListingResourceVersion __instance__ = + new AppCatalogListingResourceVersion( + listingId, + timePublished, + listingResourceId, + listingResourceVersion, + availableRegions, + compatibleShapes, + accessiblePorts, + allowedActions); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AppCatalogListingResourceVersion o) { + Builder copiedBuilder = + listingId(o.getListingId()) + .timePublished(o.getTimePublished()) + .listingResourceId(o.getListingResourceId()) + .listingResourceVersion(o.getListingResourceVersion()) + .availableRegions(o.getAvailableRegions()) + .compatibleShapes(o.getCompatibleShapes()) + .accessiblePorts(o.getAccessiblePorts()) + .allowedActions(o.getAllowedActions()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the listing this resource version belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + String listingId; + + /** + * Date and time the listing resource version was published, in RFC3339 format. + * Example: `2018-03-20T12:32:53.532Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timePublished") + java.util.Date timePublished; + + /** + * OCID of the listing resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceId") + String listingResourceId; + + /** + * Resource Version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceVersion") + String listingResourceVersion; + + /** + * List of regions that this listing resource version is available. + *

+ * For information about Regions, see + * [Regions](https://docs.us-phoenix-1.oraclecloud.com/#General/Concepts/regions.htm). + *

+ * Example: `[\"us-ashburn-1\", \"us-phoenix-1\"]` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availableRegions") + java.util.List availableRegions; + + /** + * Array of shapes compatible with this resource. + *

+ * You may enumerate all available shapes by calling {@link #listShapes(ListShapesRequest) listShapes}. + *

+ * Example: `[\"VM.Standard1.1\", \"VM.Standard1.2\"]` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compatibleShapes") + java.util.List compatibleShapes; + + /** + * List of accessible ports for instances launched with this listing resource version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("accessiblePorts") + java.util.List accessiblePorts; + /** + **/ + @lombok.extern.slf4j.Slf4j + public enum AllowedActions { + Snapshot("SNAPSHOT"), + BootVolumeDetach("BOOT_VOLUME_DETACH"), + PreserveBootVolume("PRESERVE_BOOT_VOLUME"), + SerialConsoleAccess("SERIAL_CONSOLE_ACCESS"), + BootRecovery("BOOT_RECOVERY"), + BackupBootVolume("BACKUP_BOOT_VOLUME"), + CaptureConsoleHistory("CAPTURE_CONSOLE_HISTORY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AllowedActions v : AllowedActions.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AllowedActions(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AllowedActions create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AllowedActions', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Allowed actions for the listing resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("allowedActions") + java.util.List allowedActions; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingResourceVersionAgreements.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingResourceVersionAgreements.java new file mode 100644 index 00000000000..30231142b75 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingResourceVersionAgreements.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * Agreements for a listing resource version. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AppCatalogListingResourceVersionAgreements.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AppCatalogListingResourceVersionAgreements { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + private String listingId; + + public Builder listingId(String listingId) { + this.listingId = listingId; + this.__explicitlySet__.add("listingId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceVersion") + private String listingResourceVersion; + + public Builder listingResourceVersion(String listingResourceVersion) { + this.listingResourceVersion = listingResourceVersion; + this.__explicitlySet__.add("listingResourceVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("oracleTermsOfUseLink") + private String oracleTermsOfUseLink; + + public Builder oracleTermsOfUseLink(String oracleTermsOfUseLink) { + this.oracleTermsOfUseLink = oracleTermsOfUseLink; + this.__explicitlySet__.add("oracleTermsOfUseLink"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("eulaLink") + private String eulaLink; + + public Builder eulaLink(String eulaLink) { + this.eulaLink = eulaLink; + this.__explicitlySet__.add("eulaLink"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeRetrieved") + private java.util.Date timeRetrieved; + + public Builder timeRetrieved(java.util.Date timeRetrieved) { + this.timeRetrieved = timeRetrieved; + this.__explicitlySet__.add("timeRetrieved"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("signature") + private String signature; + + public Builder signature(String signature) { + this.signature = signature; + this.__explicitlySet__.add("signature"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AppCatalogListingResourceVersionAgreements build() { + AppCatalogListingResourceVersionAgreements __instance__ = + new AppCatalogListingResourceVersionAgreements( + listingId, + listingResourceVersion, + oracleTermsOfUseLink, + eulaLink, + timeRetrieved, + signature); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AppCatalogListingResourceVersionAgreements o) { + Builder copiedBuilder = + listingId(o.getListingId()) + .listingResourceVersion(o.getListingResourceVersion()) + .oracleTermsOfUseLink(o.getOracleTermsOfUseLink()) + .eulaLink(o.getEulaLink()) + .timeRetrieved(o.getTimeRetrieved()) + .signature(o.getSignature()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the listing associated with these agreements. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + String listingId; + + /** + * Listing resource version associated with these agreements. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceVersion") + String listingResourceVersion; + + /** + * Oracle TOU link + **/ + @com.fasterxml.jackson.annotation.JsonProperty("oracleTermsOfUseLink") + String oracleTermsOfUseLink; + + /** + * EULA link + **/ + @com.fasterxml.jackson.annotation.JsonProperty("eulaLink") + String eulaLink; + + /** + * Date and time the agreements were retrieved, in RFC3339 format. + * Example: `2018-03-20T12:32:53.532Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeRetrieved") + java.util.Date timeRetrieved; + + /** + * A generated signature for this agreement retrieval operation which should be used in the create subscription call. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("signature") + String signature; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingResourceVersionSummary.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingResourceVersionSummary.java new file mode 100644 index 00000000000..6bb5a901f61 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingResourceVersionSummary.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * Listing Resource Version summary + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AppCatalogListingResourceVersionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AppCatalogListingResourceVersionSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + private String listingId; + + public Builder listingId(String listingId) { + this.listingId = listingId; + this.__explicitlySet__.add("listingId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timePublished") + private java.util.Date timePublished; + + public Builder timePublished(java.util.Date timePublished) { + this.timePublished = timePublished; + this.__explicitlySet__.add("timePublished"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceId") + private String listingResourceId; + + public Builder listingResourceId(String listingResourceId) { + this.listingResourceId = listingResourceId; + this.__explicitlySet__.add("listingResourceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceVersion") + private String listingResourceVersion; + + public Builder listingResourceVersion(String listingResourceVersion) { + this.listingResourceVersion = listingResourceVersion; + this.__explicitlySet__.add("listingResourceVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AppCatalogListingResourceVersionSummary build() { + AppCatalogListingResourceVersionSummary __instance__ = + new AppCatalogListingResourceVersionSummary( + listingId, timePublished, listingResourceId, listingResourceVersion); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AppCatalogListingResourceVersionSummary o) { + Builder copiedBuilder = + listingId(o.getListingId()) + .timePublished(o.getTimePublished()) + .listingResourceId(o.getListingResourceId()) + .listingResourceVersion(o.getListingResourceVersion()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The OCID of the listing this resource version belongs to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + String listingId; + + /** + * Date and time the listing resource version was published, in RFC3339 format. + * Example: `2018-03-20T12:32:53.532Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timePublished") + java.util.Date timePublished; + + /** + * OCID of the listing resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceId") + String listingResourceId; + + /** + * Resource Version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceVersion") + String listingResourceVersion; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingSummary.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingSummary.java new file mode 100644 index 00000000000..4b4d973fd00 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogListingSummary.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * A summary of a listing. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AppCatalogListingSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AppCatalogListingSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + private String listingId; + + public Builder listingId(String listingId) { + this.listingId = listingId; + this.__explicitlySet__.add("listingId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("summary") + private String summary; + + public Builder summary(String summary) { + this.summary = summary; + this.__explicitlySet__.add("summary"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("publisherName") + private String publisherName; + + public Builder publisherName(String publisherName) { + this.publisherName = publisherName; + this.__explicitlySet__.add("publisherName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AppCatalogListingSummary build() { + AppCatalogListingSummary __instance__ = + new AppCatalogListingSummary(listingId, displayName, summary, publisherName); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AppCatalogListingSummary o) { + Builder copiedBuilder = + listingId(o.getListingId()) + .displayName(o.getDisplayName()) + .summary(o.getSummary()) + .publisherName(o.getPublisherName()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * the region free ocid of the listing resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + String listingId; + + /** + * The display name of the listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The short summary for the listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("summary") + String summary; + + /** + * The name of the publisher who published this listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publisherName") + String publisherName; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogSubscription.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogSubscription.java new file mode 100644 index 00000000000..d6356c48bd8 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogSubscription.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * a subscription for a listing resource version. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AppCatalogSubscription.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AppCatalogSubscription { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("publisherName") + private String publisherName; + + public Builder publisherName(String publisherName) { + this.publisherName = publisherName; + this.__explicitlySet__.add("publisherName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + private String listingId; + + public Builder listingId(String listingId) { + this.listingId = listingId; + this.__explicitlySet__.add("listingId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceVersion") + private String listingResourceVersion; + + public Builder listingResourceVersion(String listingResourceVersion) { + this.listingResourceVersion = listingResourceVersion; + this.__explicitlySet__.add("listingResourceVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceId") + private String listingResourceId; + + public Builder listingResourceId(String listingResourceId) { + this.listingResourceId = listingResourceId; + this.__explicitlySet__.add("listingResourceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("summary") + private String summary; + + public Builder summary(String summary) { + this.summary = summary; + this.__explicitlySet__.add("summary"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AppCatalogSubscription build() { + AppCatalogSubscription __instance__ = + new AppCatalogSubscription( + publisherName, + listingId, + listingResourceVersion, + listingResourceId, + displayName, + summary, + compartmentId, + timeCreated); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AppCatalogSubscription o) { + Builder copiedBuilder = + publisherName(o.getPublisherName()) + .listingId(o.getListingId()) + .listingResourceVersion(o.getListingResourceVersion()) + .listingResourceId(o.getListingResourceId()) + .displayName(o.getDisplayName()) + .summary(o.getSummary()) + .compartmentId(o.getCompartmentId()) + .timeCreated(o.getTimeCreated()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Name of the publisher who published this listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publisherName") + String publisherName; + + /** + * The ocid of the listing resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + String listingId; + + /** + * Listing resource version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceVersion") + String listingResourceVersion; + + /** + * Listing resource id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceId") + String listingResourceId; + + /** + * The display name of the listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The short summary to the listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("summary") + String summary; + + /** + * The compartmentID of the subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * Date and time at which the subscription was created, in RFC3339 format. + * Example: `2018-03-20T12:32:53.532Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogSubscriptionSummary.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogSubscriptionSummary.java new file mode 100644 index 00000000000..7d84ef69387 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AppCatalogSubscriptionSummary.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * a subscription summary for a listing resource version. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AppCatalogSubscriptionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AppCatalogSubscriptionSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("publisherName") + private String publisherName; + + public Builder publisherName(String publisherName) { + this.publisherName = publisherName; + this.__explicitlySet__.add("publisherName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + private String listingId; + + public Builder listingId(String listingId) { + this.listingId = listingId; + this.__explicitlySet__.add("listingId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceVersion") + private String listingResourceVersion; + + public Builder listingResourceVersion(String listingResourceVersion) { + this.listingResourceVersion = listingResourceVersion; + this.__explicitlySet__.add("listingResourceVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceId") + private String listingResourceId; + + public Builder listingResourceId(String listingResourceId) { + this.listingResourceId = listingResourceId; + this.__explicitlySet__.add("listingResourceId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("summary") + private String summary; + + public Builder summary(String summary) { + this.summary = summary; + this.__explicitlySet__.add("summary"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public AppCatalogSubscriptionSummary build() { + AppCatalogSubscriptionSummary __instance__ = + new AppCatalogSubscriptionSummary( + publisherName, + listingId, + listingResourceVersion, + listingResourceId, + displayName, + summary, + compartmentId, + timeCreated); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AppCatalogSubscriptionSummary o) { + Builder copiedBuilder = + publisherName(o.getPublisherName()) + .listingId(o.getListingId()) + .listingResourceVersion(o.getListingResourceVersion()) + .listingResourceId(o.getListingResourceId()) + .displayName(o.getDisplayName()) + .summary(o.getSummary()) + .compartmentId(o.getCompartmentId()) + .timeCreated(o.getTimeCreated()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Name of the publisher who published this listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("publisherName") + String publisherName; + + /** + * The ocid of the listing resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + String listingId; + + /** + * Listing resource version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceVersion") + String listingResourceVersion; + + /** + * Listing resource id. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceId") + String listingResourceId; + + /** + * The display name of the listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The short summary to the listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("summary") + String summary; + + /** + * The compartmentID of the subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * Date and time at which the subscription was created, in RFC3339 format. + * Example: `2018-03-20T12:32:53.532Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateAppCatalogSubscriptionDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateAppCatalogSubscriptionDetails.java new file mode 100644 index 00000000000..85a42ebe39c --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateAppCatalogSubscriptionDetails.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * details for creating a subscription for a listing resource version. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAppCatalogSubscriptionDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateAppCatalogSubscriptionDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + private String listingId; + + public Builder listingId(String listingId) { + this.listingId = listingId; + this.__explicitlySet__.add("listingId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceVersion") + private String listingResourceVersion; + + public Builder listingResourceVersion(String listingResourceVersion) { + this.listingResourceVersion = listingResourceVersion; + this.__explicitlySet__.add("listingResourceVersion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("oracleTermsOfUseLink") + private String oracleTermsOfUseLink; + + public Builder oracleTermsOfUseLink(String oracleTermsOfUseLink) { + this.oracleTermsOfUseLink = oracleTermsOfUseLink; + this.__explicitlySet__.add("oracleTermsOfUseLink"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("eulaLink") + private String eulaLink; + + public Builder eulaLink(String eulaLink) { + this.eulaLink = eulaLink; + this.__explicitlySet__.add("eulaLink"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeRetrieved") + private java.util.Date timeRetrieved; + + public Builder timeRetrieved(java.util.Date timeRetrieved) { + this.timeRetrieved = timeRetrieved; + this.__explicitlySet__.add("timeRetrieved"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("signature") + private String signature; + + public Builder signature(String signature) { + this.signature = signature; + this.__explicitlySet__.add("signature"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAppCatalogSubscriptionDetails build() { + CreateAppCatalogSubscriptionDetails __instance__ = + new CreateAppCatalogSubscriptionDetails( + compartmentId, + listingId, + listingResourceVersion, + oracleTermsOfUseLink, + eulaLink, + timeRetrieved, + signature); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAppCatalogSubscriptionDetails o) { + Builder copiedBuilder = + compartmentId(o.getCompartmentId()) + .listingId(o.getListingId()) + .listingResourceVersion(o.getListingResourceVersion()) + .oracleTermsOfUseLink(o.getOracleTermsOfUseLink()) + .eulaLink(o.getEulaLink()) + .timeRetrieved(o.getTimeRetrieved()) + .signature(o.getSignature()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The compartmentID for the subscription. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The OCID of the listing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingId") + String listingId; + + /** + * Listing resource version. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("listingResourceVersion") + String listingResourceVersion; + + /** + * Oracle TOU link + **/ + @com.fasterxml.jackson.annotation.JsonProperty("oracleTermsOfUseLink") + String oracleTermsOfUseLink; + + /** + * EULA link + **/ + @com.fasterxml.jackson.annotation.JsonProperty("eulaLink") + String eulaLink; + + /** + * Date and time the agreements were retrieved, in RFC3339 format. + * Example: `2018-03-20T12:32:53.532Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeRetrieved") + java.util.Date timeRetrieved; + + /** + * A generated signature for this listing resource version retrieved the agreements API. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("signature") + String signature; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateNatGatewayDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateNatGatewayDetails.java new file mode 100644 index 00000000000..e15ded4651b --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateNatGatewayDetails.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateNatGatewayDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateNatGatewayDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("blockTraffic") + private Boolean blockTraffic; + + public Builder blockTraffic(Boolean blockTraffic) { + this.blockTraffic = blockTraffic; + this.__explicitlySet__.add("blockTraffic"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private String vcnId; + + public Builder vcnId(String vcnId) { + this.vcnId = vcnId; + this.__explicitlySet__.add("vcnId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateNatGatewayDetails build() { + CreateNatGatewayDetails __instance__ = + new CreateNatGatewayDetails( + compartmentId, + definedTags, + displayName, + freeformTags, + blockTraffic, + vcnId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateNatGatewayDetails o) { + Builder copiedBuilder = + compartmentId(o.getCompartmentId()) + .definedTags(o.getDefinedTags()) + .displayName(o.getDisplayName()) + .freeformTags(o.getFreeformTags()) + .blockTraffic(o.getBlockTraffic()) + .vcnId(o.getVcnId()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment to contain the + * NAT gateway. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see + * [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Whether the NAT gateway blocks traffic through it. The default is `false`. + *

+ * Example: `true` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("blockTraffic") + Boolean blockTraffic; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the VCN the gateway belongs to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + String vcnId; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java index 9c82ab9fcab..256209f4307 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java @@ -280,6 +280,10 @@ public static Builder builder() { * If you do not specify the fault domain, the system selects one for you. To change the fault * domain for an instance, terminate it and launch a new instance in the preferred fault domain. *

+ * To get a list of fault domains, use the + * {@link #listFaultDomains(ListFaultDomainsRequest) listFaultDomains} operation in the + * Identity and Access Management Service API. + *

* Example: `FAULT-DOMAIN-1` * **/ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/NatGateway.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/NatGateway.java new file mode 100644 index 00000000000..17364072463 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/NatGateway.java @@ -0,0 +1,306 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * A NAT (Network Address Translation) gateway, which represents a router that lets instances + * without public IPs contact the public internet without exposing the instance to inbound + * internet traffic. For more information, see + * [NAT Gateway](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/NATgateway.htm). + *

+ * To use any of the API operations, you must be authorized in an + * IAM policy. If you are not authorized, talk to an + * administrator. If you are an administrator who needs to write + * policies to give users access, see [Getting Started with + * Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). + *

+ **Warning:** Oracle recommends that you avoid using any confidential information when you + * supply string values using the API. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = NatGateway.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class NatGateway { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("blockTraffic") + private Boolean blockTraffic; + + public Builder blockTraffic(Boolean blockTraffic) { + this.blockTraffic = blockTraffic; + this.__explicitlySet__.add("blockTraffic"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("natIp") + private String natIp; + + public Builder natIp(String natIp) { + this.natIp = natIp; + this.__explicitlySet__.add("natIp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + private String vcnId; + + public Builder vcnId(String vcnId) { + this.vcnId = vcnId; + this.__explicitlySet__.add("vcnId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public NatGateway build() { + NatGateway __instance__ = + new NatGateway( + compartmentId, + definedTags, + displayName, + freeformTags, + id, + blockTraffic, + lifecycleState, + natIp, + timeCreated, + vcnId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(NatGateway o) { + Builder copiedBuilder = + compartmentId(o.getCompartmentId()) + .definedTags(o.getDefinedTags()) + .displayName(o.getDisplayName()) + .freeformTags(o.getFreeformTags()) + .id(o.getId()) + .blockTraffic(o.getBlockTraffic()) + .lifecycleState(o.getLifecycleState()) + .natIp(o.getNatIp()) + .timeCreated(o.getTimeCreated()) + .vcnId(o.getVcnId()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment that contains + * the NAT gateway. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see + * [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the NAT gateway. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * Whether the NAT gateway blocks traffic through it. The default is `false`. + *

+ * Example: `true` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("blockTraffic") + Boolean blockTraffic; + /** + * The NAT gateway's current state. + **/ + @lombok.extern.slf4j.Slf4j + public enum LifecycleState { + Provisioning("PROVISIONING"), + Available("AVAILABLE"), + Terminating("TERMINATING"), + Terminated("TERMINATED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The NAT gateway's current state. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleState lifecycleState; + + /** + * The IP address associated with the NAT gateway. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("natIp") + String natIp; + + /** + * The date and time the NAT gateway was created, in the format defined by RFC3339. + *

+ * Example: `2016-08-25T21:10:29.600Z` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + /** + * The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the VCN the NAT gateway + * belongs to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("vcnId") + String vcnId; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/PublicIp.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/PublicIp.java index 6385b12341c..4b40a4fd8fb 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/PublicIp.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/PublicIp.java @@ -34,6 +34,24 @@ public class PublicIp { @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @lombok.experimental.Accessors(fluent = true) public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("assignedEntityId") + private String assignedEntityId; + + public Builder assignedEntityId(String assignedEntityId) { + this.assignedEntityId = assignedEntityId; + this.__explicitlySet__.add("assignedEntityId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("assignedEntityType") + private AssignedEntityType assignedEntityType; + + public Builder assignedEntityType(AssignedEntityType assignedEntityType) { + this.assignedEntityType = assignedEntityType; + this.__explicitlySet__.add("assignedEntityType"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") private String availabilityDomain; @@ -149,6 +167,8 @@ public Builder timeCreated(java.util.Date timeCreated) { public PublicIp build() { PublicIp __instance__ = new PublicIp( + assignedEntityId, + assignedEntityType, availabilityDomain, compartmentId, definedTags, @@ -168,7 +188,9 @@ public PublicIp build() { @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(PublicIp o) { Builder copiedBuilder = - availabilityDomain(o.getAvailabilityDomain()) + assignedEntityId(o.getAssignedEntityId()) + .assignedEntityType(o.getAssignedEntityType()) + .availabilityDomain(o.getAvailabilityDomain()) .compartmentId(o.getCompartmentId()) .definedTags(o.getDefinedTags()) .displayName(o.getDisplayName()) @@ -193,10 +215,73 @@ public static Builder builder() { return new Builder(); } + /** + * The OCID of the entity the public IP is assigned to, or in the process of + * being assigned to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("assignedEntityId") + String assignedEntityId; + /** + * The type of entity the public IP is assigned to, or in the process of being + * assigned to. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum AssignedEntityType { + PrivateIp("PRIVATE_IP"), + NatGateway("NAT_GATEWAY"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (AssignedEntityType v : AssignedEntityType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + AssignedEntityType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static AssignedEntityType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'AssignedEntityType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The type of entity the public IP is assigned to, or in the process of being + * assigned to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("assignedEntityType") + AssignedEntityType assignedEntityType; + /** * The public IP's availability domain. This property is set only for ephemeral public IPs - * (that is, when the `scope` of the public IP is set to AVAILABILITY_DOMAIN). The value - * is the availability domain of the assigned private IP. + * that are assigned to a private IP (that is, when the `scope` of the public IP is set to + * AVAILABILITY_DOMAIN). The value is the availability domain of the assigned private IP. *

* Example: `Uocm:PHX-AD-1` * @@ -206,8 +291,9 @@ public static Builder builder() { /** * The OCID of the compartment containing the public IP. For an ephemeral public IP, this is - * the same compartment as the private IP's. For a reserved public IP that is currently assigned, - * this can be a different compartment than the assigned private IP's. + * the compartment of its assigned entity (which can be a private IP or a regional entity such + * as a NAT gateway). For a reserved public IP that is currently assigned, + * its compartment can be different from the assigned private IP's. * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") @@ -316,10 +402,12 @@ public static LifecycleState create(String key) { /** * Defines when the public IP is deleted and released back to Oracle's public IP pool. *

- * `EPHEMERAL`: The lifetime is tied to the lifetime of its assigned private IP. The - * ephemeral public IP is automatically deleted when its private IP is deleted, when - * the VNIC is terminated, or when the instance is terminated. An ephemeral - * public IP must always be assigned to a private IP. + * `EPHEMERAL`: The lifetime is tied to the lifetime of its assigned entity. An ephemeral + * public IP must always be assigned to an entity. If the assigned entity is a private IP, + * the ephemeral public IP is automatically deleted when the private IP is deleted, when + * the VNIC is terminated, or when the instance is terminated. If the assigned entity is a + * {@link NatGateway}, the ephemeral public IP is automatically + * deleted when the NAT gateway is terminated. *

* `RESERVED`: You control the public IP's lifetime. You can delete a reserved public IP * whenever you like. It does not need to be assigned to a private IP at all times. @@ -374,10 +462,12 @@ public static Lifetime create(String key) { /** * Defines when the public IP is deleted and released back to Oracle's public IP pool. *

- * `EPHEMERAL`: The lifetime is tied to the lifetime of its assigned private IP. The - * ephemeral public IP is automatically deleted when its private IP is deleted, when - * the VNIC is terminated, or when the instance is terminated. An ephemeral - * public IP must always be assigned to a private IP. + * `EPHEMERAL`: The lifetime is tied to the lifetime of its assigned entity. An ephemeral + * public IP must always be assigned to an entity. If the assigned entity is a private IP, + * the ephemeral public IP is automatically deleted when the private IP is deleted, when + * the VNIC is terminated, or when the instance is terminated. If the assigned entity is a + * {@link NatGateway}, the ephemeral public IP is automatically + * deleted when the NAT gateway is terminated. *

* `RESERVED`: You control the public IP's lifetime. You can delete a reserved public IP * whenever you like. It does not need to be assigned to a private IP at all times. @@ -390,8 +480,13 @@ public static Lifetime create(String key) { Lifetime lifetime; /** + * Deprecated. Use `assignedEntityId` instead. + *

* The OCID of the private IP that the public IP is currently assigned to, or in the * process of being assigned to. + *

+ **Note:** This is `null` if the public IP is not assigned to a private IP, or is + * in the process of being assigned to one. * **/ @com.fasterxml.jackson.annotation.JsonProperty("privateIpId") @@ -399,12 +494,14 @@ public static Lifetime create(String key) { /** * Whether the public IP is regional or specific to a particular availability domain. *

- * `REGION`: The public IP exists within a region and can be assigned to a private IP - * in any availability domain in the region. Reserved public IPs have `scope` = `REGION`. + * `REGION`: The public IP exists within a region and is assigned to a regional entity + * (such as a {@link NatGateway}), or can be assigned to a private + * IP in any availability domain in the region. Reserved public IPs and ephemeral public IPs + * assigned to a regional entity have `scope` = `REGION`. *

- * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the private IP + * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the entity * it's assigned to, which is specified by the `availabilityDomain` property of the public IP object. - * Ephemeral public IPs have `scope` = `AVAILABILITY_DOMAIN`. + * Ephemeral public IPs that are assigned to private IPs have `scope` = `AVAILABILITY_DOMAIN`. * **/ @lombok.extern.slf4j.Slf4j @@ -453,12 +550,14 @@ public static Scope create(String key) { /** * Whether the public IP is regional or specific to a particular availability domain. *

- * `REGION`: The public IP exists within a region and can be assigned to a private IP - * in any availability domain in the region. Reserved public IPs have `scope` = `REGION`. + * `REGION`: The public IP exists within a region and is assigned to a regional entity + * (such as a {@link NatGateway}), or can be assigned to a private + * IP in any availability domain in the region. Reserved public IPs and ephemeral public IPs + * assigned to a regional entity have `scope` = `REGION`. *

- * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the private IP + * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the entity * it's assigned to, which is specified by the `availabilityDomain` property of the public IP object. - * Ephemeral public IPs have `scope` = `AVAILABILITY_DOMAIN`. + * Ephemeral public IPs that are assigned to private IPs have `scope` = `AVAILABILITY_DOMAIN`. * **/ @com.fasterxml.jackson.annotation.JsonProperty("scope") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ServiceGateway.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ServiceGateway.java index 62d9f4a8ed9..c2eaa85bd20 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/ServiceGateway.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ServiceGateway.java @@ -192,8 +192,10 @@ public static Builder builder() { String compartmentId; /** - * Usage of predefined tag keys. These predefined keys are scoped to namespaces. - * Example: `{\"foo-namespace\": {\"bar-key\": \"foo-value\"}}` + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` * **/ @com.fasterxml.jackson.annotation.JsonProperty("definedTags") @@ -208,8 +210,11 @@ public static Builder builder() { String displayName; /** - * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. - * Example: `{\"bar-key\": \"value\"}` + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see + * [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` * **/ @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateNatGatewayDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateNatGatewayDetails.java new file mode 100644 index 00000000000..04d63ed874d --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateNatGatewayDetails.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateNatGatewayDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateNatGatewayDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("blockTraffic") + private Boolean blockTraffic; + + public Builder blockTraffic(Boolean blockTraffic) { + this.blockTraffic = blockTraffic; + this.__explicitlySet__.add("blockTraffic"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateNatGatewayDetails build() { + UpdateNatGatewayDetails __instance__ = + new UpdateNatGatewayDetails( + definedTags, displayName, freeformTags, blockTraffic); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateNatGatewayDetails o) { + Builder copiedBuilder = + definedTags(o.getDefinedTags()) + .displayName(o.getDisplayName()) + .freeformTags(o.getFreeformTags()) + .blockTraffic(o.getBlockTraffic()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see + * [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Whether the NAT gateway blocks traffic through it. The default is `false`. + *

+ * Example: `true` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("blockTraffic") + Boolean blockTraffic; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateServiceGatewayDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateServiceGatewayDetails.java index fe144f55fe8..fb7ff6b8c07 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateServiceGatewayDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateServiceGatewayDetails.java @@ -113,8 +113,10 @@ public static Builder builder() { Boolean blockTraffic; /** - * Usage of predefined tag keys. These predefined keys are scoped to namespaces. - * Example: `{\"foo-namespace\": {\"bar-key\": \"foo-value\"}}` + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` * **/ @com.fasterxml.jackson.annotation.JsonProperty("definedTags") @@ -129,8 +131,11 @@ public static Builder builder() { String displayName; /** - * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. - * Example: `{\"bar-key\": \"value\"}` + * Free-form tags for this resource. Each tag is a simple key-value pair with no + * predefined name, type, or namespace. For more information, see + * [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` * **/ @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateAppCatalogSubscriptionRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateAppCatalogSubscriptionRequest.java new file mode 100644 index 00000000000..46591486935 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateAppCatalogSubscriptionRequest.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CreateAppCatalogSubscriptionRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Request for the creation of a subscription for listing resource version for a compartment. + */ + private CreateAppCatalogSubscriptionDetails createAppCatalogSubscriptionDetails; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAppCatalogSubscriptionRequest o) { + createAppCatalogSubscriptionDetails(o.getCreateAppCatalogSubscriptionDetails()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of CreateAppCatalogSubscriptionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateAppCatalogSubscriptionRequest + */ + public CreateAppCatalogSubscriptionRequest build() { + CreateAppCatalogSubscriptionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateNatGatewayRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateNatGatewayRequest.java new file mode 100644 index 00000000000..9447c67061a --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/CreateNatGatewayRequest.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CreateNatGatewayRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * Details for creating a NAT gateway. + */ + private CreateNatGatewayDetails createNatGatewayDetails; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of executing that same action again. Retry tokens expire after 24 + * hours, but can be invalidated before then due to conflicting operations (for example, if a resource + * has been deleted and purged from the system, then a retry of the original creation request + * may be rejected). + * + */ + private String opcRetryToken; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateNatGatewayRequest o) { + createNatGatewayDetails(o.getCreateNatGatewayDetails()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of CreateNatGatewayRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CreateNatGatewayRequest + */ + public CreateNatGatewayRequest build() { + CreateNatGatewayRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteAppCatalogSubscriptionRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteAppCatalogSubscriptionRequest.java new file mode 100644 index 00000000000..5bda407fcc0 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteAppCatalogSubscriptionRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class DeleteAppCatalogSubscriptionRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the listing. + */ + private String listingId; + + /** + * The OCID of the compartment. + */ + private String compartmentId; + + /** + * Listing Resource Version. + */ + private String resourceVersion; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAppCatalogSubscriptionRequest o) { + listingId(o.getListingId()); + compartmentId(o.getCompartmentId()); + resourceVersion(o.getResourceVersion()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of DeleteAppCatalogSubscriptionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteAppCatalogSubscriptionRequest + */ + public DeleteAppCatalogSubscriptionRequest build() { + DeleteAppCatalogSubscriptionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteNatGatewayRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteNatGatewayRequest.java new file mode 100644 index 00000000000..636fedae2f8 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/DeleteNatGatewayRequest.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class DeleteNatGatewayRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The NAT gateway's [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String natGatewayId; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteNatGatewayRequest o) { + natGatewayId(o.getNatGatewayId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of DeleteNatGatewayRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteNatGatewayRequest + */ + public DeleteNatGatewayRequest build() { + DeleteNatGatewayRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetAppCatalogListingAgreementsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetAppCatalogListingAgreementsRequest.java new file mode 100644 index 00000000000..e0a5cd57fba --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetAppCatalogListingAgreementsRequest.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetAppCatalogListingAgreementsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the listing. + */ + private String listingId; + + /** + * Listing Resource Version. + */ + private String resourceVersion; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAppCatalogListingAgreementsRequest o) { + listingId(o.getListingId()); + resourceVersion(o.getResourceVersion()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of GetAppCatalogListingAgreementsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetAppCatalogListingAgreementsRequest + */ + public GetAppCatalogListingAgreementsRequest build() { + GetAppCatalogListingAgreementsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetAppCatalogListingRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetAppCatalogListingRequest.java new file mode 100644 index 00000000000..c61c32ebdf1 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetAppCatalogListingRequest.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetAppCatalogListingRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the listing. + */ + private String listingId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAppCatalogListingRequest o) { + listingId(o.getListingId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of GetAppCatalogListingRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetAppCatalogListingRequest + */ + public GetAppCatalogListingRequest build() { + GetAppCatalogListingRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetAppCatalogListingResourceVersionRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetAppCatalogListingResourceVersionRequest.java new file mode 100644 index 00000000000..5a916117a64 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetAppCatalogListingResourceVersionRequest.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetAppCatalogListingResourceVersionRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the listing. + */ + private String listingId; + + /** + * Listing Resource Version. + */ + private String resourceVersion; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAppCatalogListingResourceVersionRequest o) { + listingId(o.getListingId()); + resourceVersion(o.getResourceVersion()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of GetAppCatalogListingResourceVersionRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetAppCatalogListingResourceVersionRequest + */ + public GetAppCatalogListingResourceVersionRequest build() { + GetAppCatalogListingResourceVersionRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetNatGatewayRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetNatGatewayRequest.java new file mode 100644 index 00000000000..a50f8ef9998 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetNatGatewayRequest.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetNatGatewayRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The NAT gateway's [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String natGatewayId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetNatGatewayRequest o) { + natGatewayId(o.getNatGatewayId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of GetNatGatewayRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetNatGatewayRequest + */ + public GetNatGatewayRequest build() { + GetNatGatewayRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetVolumeBackupPolicyAssetAssignmentRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetVolumeBackupPolicyAssetAssignmentRequest.java index 60239c9de4f..a102c560a04 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetVolumeBackupPolicyAssetAssignmentRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/GetVolumeBackupPolicyAssetAssignmentRequest.java @@ -17,15 +17,19 @@ public class GetVolumeBackupPolicyAssetAssignmentRequest private String assetId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListAppCatalogListingResourceVersionsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListAppCatalogListingResourceVersionsRequest.java new file mode 100644 index 00000000000..286acc3405e --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListAppCatalogListingResourceVersionsRequest.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListAppCatalogListingResourceVersionsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the listing. + */ + private String listingId; + + /** + * The maximum number of items to return in a paginated \"List\" call. + *

+ * Example: `500` + * + */ + private Integer limit; + + /** + * The value of the `opc-next-page` response header from the previous \"List\" call. + * + */ + private String page; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAppCatalogListingResourceVersionsRequest o) { + listingId(o.getListingId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of ListAppCatalogListingResourceVersionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListAppCatalogListingResourceVersionsRequest + */ + public ListAppCatalogListingResourceVersionsRequest build() { + ListAppCatalogListingResourceVersionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListAppCatalogListingsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListAppCatalogListingsRequest.java new file mode 100644 index 00000000000..01eea9780b7 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListAppCatalogListingsRequest.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListAppCatalogListingsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The maximum number of items to return in a paginated \"List\" call. + *

+ * Example: `500` + * + */ + private Integer limit; + + /** + * The value of the `opc-next-page` response header from the previous \"List\" call. + * + */ + private String page; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to return only the publisher that matches the given publisher name exactly. + * + */ + private String publisherName; + + /** + * A filter to return only publishers that match the given publisher type exactly. Valid types are OCI, ORACLE, TRUSTED, STANDARD. + * + */ + private String publisherType; + + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAppCatalogListingsRequest o) { + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + publisherName(o.getPublisherName()); + publisherType(o.getPublisherType()); + displayName(o.getDisplayName()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of ListAppCatalogListingsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListAppCatalogListingsRequest + */ + public ListAppCatalogListingsRequest build() { + ListAppCatalogListingsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListAppCatalogSubscriptionsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListAppCatalogSubscriptionsRequest.java new file mode 100644 index 00000000000..27f923b56ef --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListAppCatalogSubscriptionsRequest.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListAppCatalogSubscriptionsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compartment. + */ + private String compartmentId; + + /** + * The maximum number of items to return in a paginated \"List\" call. + *

+ * Example: `500` + * + */ + private Integer limit; + + /** + * The value of the `opc-next-page` response header from the previous \"List\" call. + * + */ + private String page; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these \"List\" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these \"List\" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to return only the listings that matches the given listing id. + * + */ + private String listingId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAppCatalogSubscriptionsRequest o) { + compartmentId(o.getCompartmentId()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + listingId(o.getListingId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of ListAppCatalogSubscriptionsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListAppCatalogSubscriptionsRequest + */ + public ListAppCatalogSubscriptionsRequest build() { + ListAppCatalogSubscriptionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListBootVolumeAttachmentsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListBootVolumeAttachmentsRequest.java index 0d5e0789d97..065eb59a4b8 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListBootVolumeAttachmentsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListBootVolumeAttachmentsRequest.java @@ -24,15 +24,19 @@ public class ListBootVolumeAttachmentsRequest extends com.oracle.bmc.requests.Bm private String compartmentId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListBootVolumeBackupsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListBootVolumeBackupsRequest.java index a8999109ff2..1485e01a9ed 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListBootVolumeBackupsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListBootVolumeBackupsRequest.java @@ -21,15 +21,19 @@ public class ListBootVolumeBackupsRequest extends com.oracle.bmc.requests.BmcReq private String bootVolumeId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListBootVolumesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListBootVolumesRequest.java index 6559f73ac93..2ad9eba663b 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListBootVolumesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListBootVolumesRequest.java @@ -24,15 +24,19 @@ public class ListBootVolumesRequest extends com.oracle.bmc.requests.BmcRequest { private String compartmentId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListConsoleHistoriesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListConsoleHistoriesRequest.java index 72c0692212c..44d951aebcc 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListConsoleHistoriesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListConsoleHistoriesRequest.java @@ -24,15 +24,19 @@ public class ListConsoleHistoriesRequest extends com.oracle.bmc.requests.BmcRequ private String availabilityDomain; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCpesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCpesRequest.java index bcc2403966d..dde1a4936f3 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCpesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCpesRequest.java @@ -16,15 +16,19 @@ public class ListCpesRequest extends com.oracle.bmc.requests.BmcRequest { private String compartmentId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectGroupsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectGroupsRequest.java index c776fca19f5..651e590fc90 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectGroupsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectGroupsRequest.java @@ -16,15 +16,19 @@ public class ListCrossConnectGroupsRequest extends com.oracle.bmc.requests.BmcRe private String compartmentId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectLocationsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectLocationsRequest.java index 005a5376c4d..0758accab85 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectLocationsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectLocationsRequest.java @@ -16,15 +16,19 @@ public class ListCrossConnectLocationsRequest extends com.oracle.bmc.requests.Bm private String compartmentId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectsRequest.java index 831580c597a..1320d1e1aa6 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossConnectsRequest.java @@ -21,15 +21,19 @@ public class ListCrossConnectsRequest extends com.oracle.bmc.requests.BmcRequest private String crossConnectGroupId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossconnectPortSpeedShapesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossconnectPortSpeedShapesRequest.java index dc621ed3cbd..1ced106ac08 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossconnectPortSpeedShapesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListCrossconnectPortSpeedShapesRequest.java @@ -16,15 +16,19 @@ public class ListCrossconnectPortSpeedShapesRequest extends com.oracle.bmc.reque private String compartmentId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDhcpOptionsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDhcpOptionsRequest.java index ca5fc0e2475..68738dbdaef 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDhcpOptionsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDhcpOptionsRequest.java @@ -21,15 +21,19 @@ public class ListDhcpOptionsRequest extends com.oracle.bmc.requests.BmcRequest { private String vcnId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDrgAttachmentsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDrgAttachmentsRequest.java index 6b806038869..9b0c47ad532 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDrgAttachmentsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDrgAttachmentsRequest.java @@ -26,15 +26,19 @@ public class ListDrgAttachmentsRequest extends com.oracle.bmc.requests.BmcReques private String drgId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDrgsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDrgsRequest.java index e4d7a139c38..9bdaa1c087c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDrgsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListDrgsRequest.java @@ -16,15 +16,19 @@ public class ListDrgsRequest extends com.oracle.bmc.requests.BmcRequest { private String compartmentId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListFastConnectProviderServicesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListFastConnectProviderServicesRequest.java index b49f9982d5a..a76aa38ebf3 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListFastConnectProviderServicesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListFastConnectProviderServicesRequest.java @@ -16,15 +16,19 @@ public class ListFastConnectProviderServicesRequest extends com.oracle.bmc.reque private String compartmentId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListFastConnectProviderVirtualCircuitBandwidthShapesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListFastConnectProviderVirtualCircuitBandwidthShapesRequest.java index a130a42e28d..6f4e59358df 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListFastConnectProviderVirtualCircuitBandwidthShapesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListFastConnectProviderVirtualCircuitBandwidthShapesRequest.java @@ -17,15 +17,19 @@ public class ListFastConnectProviderVirtualCircuitBandwidthShapesRequest private String providerServiceId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListIPSecConnectionsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListIPSecConnectionsRequest.java index e077954a133..ab810bec74a 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListIPSecConnectionsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListIPSecConnectionsRequest.java @@ -26,15 +26,19 @@ public class ListIPSecConnectionsRequest extends com.oracle.bmc.requests.BmcRequ private String cpeId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListImagesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListImagesRequest.java index e361ba3c693..591bfb750d1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListImagesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListImagesRequest.java @@ -43,15 +43,19 @@ public class ListImagesRequest extends com.oracle.bmc.requests.BmcRequest { private String shape; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstanceConsoleConnectionsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstanceConsoleConnectionsRequest.java index c732d31dcde..9ce7302a2c1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstanceConsoleConnectionsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstanceConsoleConnectionsRequest.java @@ -21,15 +21,19 @@ public class ListInstanceConsoleConnectionsRequest extends com.oracle.bmc.reques private String instanceId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstancesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstancesRequest.java index 2037194f01e..1aba79ffce4 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstancesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInstancesRequest.java @@ -30,15 +30,19 @@ public class ListInstancesRequest extends com.oracle.bmc.requests.BmcRequest { private String displayName; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInternetGatewaysRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInternetGatewaysRequest.java index 7e5005a0c2a..eab2fe8d30f 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInternetGatewaysRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListInternetGatewaysRequest.java @@ -21,15 +21,19 @@ public class ListInternetGatewaysRequest extends com.oracle.bmc.requests.BmcRequ private String vcnId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListLocalPeeringGatewaysRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListLocalPeeringGatewaysRequest.java index 5a0604c6daa..94c3584f270 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListLocalPeeringGatewaysRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListLocalPeeringGatewaysRequest.java @@ -21,15 +21,19 @@ public class ListLocalPeeringGatewaysRequest extends com.oracle.bmc.requests.Bmc private String vcnId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListNatGatewaysRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListNatGatewaysRequest.java new file mode 100644 index 00000000000..5a0da5cdfe3 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListNatGatewaysRequest.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListNatGatewaysRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the compartment. + */ + private String compartmentId; + + /** + * The OCID of the VCN. + */ + private String vcnId; + + /** + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). + *

+ * Example: `50` + * + */ + private Integer limit; + + /** + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String page; + + /** + * A filter to return only resources that match the given display name exactly. + * + */ + private String displayName; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these \"List\" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order (`sortOrder`). Default order for + * TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + * sort order is case sensitive. + *

+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + * optionally filter by availability domain if the scope of the resource type is within a + * single availability domain. If you call one of these \"List\" operations without specifying + * an availability domain, the resources are grouped by availability domain, then sorted. + * + **/ + public enum SortBy { + Timecreated("TIMECREATED"), + Displayname("DISPLAYNAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortBy: " + key); + } + }; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + * is case sensitive. + * + **/ + public enum SortOrder { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid SortOrder: " + key); + } + }; + + /** + * A filter to return only resources that match the specified lifecycle state. The value is case insensitive. + * + */ + private NatGateway.LifecycleState lifecycleState; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListNatGatewaysRequest o) { + compartmentId(o.getCompartmentId()); + vcnId(o.getVcnId()); + limit(o.getLimit()); + page(o.getPage()); + displayName(o.getDisplayName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + lifecycleState(o.getLifecycleState()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of ListNatGatewaysRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListNatGatewaysRequest + */ + public ListNatGatewaysRequest build() { + ListNatGatewaysRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListPrivateIpsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListPrivateIpsRequest.java index 83a6360d5a8..07a60d14bc2 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListPrivateIpsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListPrivateIpsRequest.java @@ -11,15 +11,19 @@ public class ListPrivateIpsRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListPublicIpsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListPublicIpsRequest.java index 129cfca1419..3cc8e64f296 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListPublicIpsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListPublicIpsRequest.java @@ -13,12 +13,14 @@ public class ListPublicIpsRequest extends com.oracle.bmc.requests.BmcRequest { /** * Whether the public IP is regional or specific to a particular availability domain. *

- * `REGION`: The public IP exists within a region and can be assigned to a private IP - * in any availability domain in the region. Reserved public IPs have `scope` = `REGION`. + * `REGION`: The public IP exists within a region and is assigned to a regional entity + * (such as a {@link NatGateway}), or can be assigned to a private IP + * in any availability domain in the region. Reserved public IPs have `scope` = `REGION`, as do + * ephemeral public IPs assigned to a regional entity. *

- * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the private IP + * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the entity * it's assigned to, which is specified by the `availabilityDomain` property of the public IP object. - * Ephemeral public IPs have `scope` = `AVAILABILITY_DOMAIN`. + * Ephemeral public IPs that are assigned to private IPs have `scope` = `AVAILABILITY_DOMAIN`. * */ private Scope scope; @@ -26,12 +28,14 @@ public class ListPublicIpsRequest extends com.oracle.bmc.requests.BmcRequest { /** * Whether the public IP is regional or specific to a particular availability domain. *

- * `REGION`: The public IP exists within a region and can be assigned to a private IP - * in any availability domain in the region. Reserved public IPs have `scope` = `REGION`. + * `REGION`: The public IP exists within a region and is assigned to a regional entity + * (such as a {@link NatGateway}), or can be assigned to a private IP + * in any availability domain in the region. Reserved public IPs have `scope` = `REGION`, as do + * ephemeral public IPs assigned to a regional entity. *

- * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the private IP + * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the entity * it's assigned to, which is specified by the `availabilityDomain` property of the public IP object. - * Ephemeral public IPs have `scope` = `AVAILABILITY_DOMAIN`. + * Ephemeral public IPs that are assigned to private IPs have `scope` = `AVAILABILITY_DOMAIN`. * **/ public enum Scope { @@ -73,15 +77,19 @@ public static Scope create(String key) { private String compartmentId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; @@ -94,6 +102,49 @@ public static Scope create(String key) { */ private String availabilityDomain; + /** + * A filter to return only public IPs that match given lifetime. + * + */ + private Lifetime lifetime; + + /** + * A filter to return only public IPs that match given lifetime. + * + **/ + public enum Lifetime { + Ephemeral("EPHEMERAL"), + Reserved("RESERVED"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Lifetime v : Lifetime.values()) { + map.put(v.getValue(), v); + } + } + + Lifetime(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Lifetime create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid Lifetime: " + key); + } + }; + public static class Builder { private com.oracle.bmc.util.internal.Consumer invocationCallback = null; @@ -120,6 +171,7 @@ public Builder copy(ListPublicIpsRequest o) { limit(o.getLimit()); page(o.getPage()); availabilityDomain(o.getAvailabilityDomain()); + lifetime(o.getLifetime()); invocationCallback(o.getInvocationCallback()); return this; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListRemotePeeringConnectionsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListRemotePeeringConnectionsRequest.java index c6890925e6e..67439162b49 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListRemotePeeringConnectionsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListRemotePeeringConnectionsRequest.java @@ -21,15 +21,19 @@ public class ListRemotePeeringConnectionsRequest extends com.oracle.bmc.requests private String drgId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListRouteTablesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListRouteTablesRequest.java index de9ec55879a..346f131e159 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListRouteTablesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListRouteTablesRequest.java @@ -21,15 +21,19 @@ public class ListRouteTablesRequest extends com.oracle.bmc.requests.BmcRequest { private String vcnId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSecurityListsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSecurityListsRequest.java index c9fa4020b7a..4dc2742d558 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSecurityListsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSecurityListsRequest.java @@ -21,15 +21,19 @@ public class ListSecurityListsRequest extends com.oracle.bmc.requests.BmcRequest private String vcnId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListServiceGatewaysRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListServiceGatewaysRequest.java index 506c00deb46..c58077a0d35 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListServiceGatewaysRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListServiceGatewaysRequest.java @@ -21,15 +21,19 @@ public class ListServiceGatewaysRequest extends com.oracle.bmc.requests.BmcReque private String vcnId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListServicesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListServicesRequest.java index 4aca03418ea..18bb3584887 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListServicesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListServicesRequest.java @@ -11,15 +11,19 @@ public class ListServicesRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListShapesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListShapesRequest.java index 5e793244d51..6e91ec60f37 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListShapesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListShapesRequest.java @@ -24,15 +24,19 @@ public class ListShapesRequest extends com.oracle.bmc.requests.BmcRequest { private String availabilityDomain; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSubnetsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSubnetsRequest.java index 46fb98fb12b..d6b514ae6ea 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSubnetsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListSubnetsRequest.java @@ -21,15 +21,19 @@ public class ListSubnetsRequest extends com.oracle.bmc.requests.BmcRequest { private String vcnId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVcnsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVcnsRequest.java index ece96574a5e..e9026cf3742 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVcnsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVcnsRequest.java @@ -16,15 +16,19 @@ public class ListVcnsRequest extends com.oracle.bmc.requests.BmcRequest { private String compartmentId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVirtualCircuitBandwidthShapesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVirtualCircuitBandwidthShapesRequest.java index 101f3afb17b..fefde3836d1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVirtualCircuitBandwidthShapesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVirtualCircuitBandwidthShapesRequest.java @@ -16,15 +16,19 @@ public class ListVirtualCircuitBandwidthShapesRequest extends com.oracle.bmc.req private String compartmentId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVirtualCircuitsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVirtualCircuitsRequest.java index 21456f88ce6..103495c6025 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVirtualCircuitsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVirtualCircuitsRequest.java @@ -16,15 +16,19 @@ public class ListVirtualCircuitsRequest extends com.oracle.bmc.requests.BmcReque private String compartmentId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVnicAttachmentsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVnicAttachmentsRequest.java index c324a241d16..417ec21900d 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVnicAttachmentsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVnicAttachmentsRequest.java @@ -29,15 +29,19 @@ public class ListVnicAttachmentsRequest extends com.oracle.bmc.requests.BmcReque private String instanceId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeAttachmentsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeAttachmentsRequest.java index 0cfc181a5b1..adc7eb0cb3d 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeAttachmentsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeAttachmentsRequest.java @@ -24,15 +24,19 @@ public class ListVolumeAttachmentsRequest extends com.oracle.bmc.requests.BmcReq private String availabilityDomain; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeBackupPoliciesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeBackupPoliciesRequest.java index d8c9b807751..bbb8e446fbb 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeBackupPoliciesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeBackupPoliciesRequest.java @@ -11,15 +11,19 @@ public class ListVolumeBackupPoliciesRequest extends com.oracle.bmc.requests.BmcRequest { /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeBackupsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeBackupsRequest.java index 21d49021288..730a27683d2 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeBackupsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeBackupsRequest.java @@ -21,15 +21,19 @@ public class ListVolumeBackupsRequest extends com.oracle.bmc.requests.BmcRequest private String volumeId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeGroupBackupsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeGroupBackupsRequest.java index 06ac8e66631..493ee5279da 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeGroupBackupsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeGroupBackupsRequest.java @@ -21,15 +21,19 @@ public class ListVolumeGroupBackupsRequest extends com.oracle.bmc.requests.BmcRe private String volumeGroupId; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeGroupsRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeGroupsRequest.java index 32320705a28..17aadb456ad 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeGroupsRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumeGroupsRequest.java @@ -24,15 +24,19 @@ public class ListVolumeGroupsRequest extends com.oracle.bmc.requests.BmcRequest private String availabilityDomain; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumesRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumesRequest.java index 0a29a33d6dc..5d8452fa8f5 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumesRequest.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ListVolumesRequest.java @@ -24,15 +24,19 @@ public class ListVolumesRequest extends com.oracle.bmc.requests.BmcRequest { private String availabilityDomain; /** - * The maximum number of items to return in a paginated \"List\" call. + * For list pagination. The maximum number of results per page, or items to return in a paginated + * \"List\" call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). *

- * Example: `500` + * Example: `50` * */ private Integer limit; /** - * The value of the `opc-next-page` response header from the previous \"List\" call. + * For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + * call. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String page; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateNatGatewayRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateNatGatewayRequest.java new file mode 100644 index 00000000000..5ad951b48fc --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/UpdateNatGatewayRequest.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.requests; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class UpdateNatGatewayRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The NAT gateway's [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + */ + private String natGatewayId; + + /** + * Details object for updating a NAT gateway. + */ + private UpdateNatGatewayDetails updateNatGatewayDetails; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + * parameter to the value of the etag from a previous GET or POST response for that resource. The resource + * will be updated or deleted only if the etag you provide matches the resource's current etag value. + * + */ + private String ifMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateNatGatewayRequest o) { + natGatewayId(o.getNatGatewayId()); + updateNatGatewayDetails(o.getUpdateNatGatewayDetails()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of UpdateNatGatewayRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of UpdateNatGatewayRequest + */ + public UpdateNatGatewayRequest build() { + UpdateNatGatewayRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateAppCatalogSubscriptionResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateAppCatalogSubscriptionResponse.java new file mode 100644 index 00000000000..ee4b6aee7f3 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateAppCatalogSubscriptionResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateAppCatalogSubscriptionResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned AppCatalogSubscription instance. + */ + private AppCatalogSubscription appCatalogSubscription; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAppCatalogSubscriptionResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + appCatalogSubscription(o.getAppCatalogSubscription()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateNatGatewayResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateNatGatewayResponse.java new file mode 100644 index 00000000000..e8b2dd8dcfd --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateNatGatewayResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateNatGatewayResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned NatGateway instance. + */ + private NatGateway natGateway; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateNatGatewayResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + natGateway(o.getNatGateway()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteAppCatalogSubscriptionResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteAppCatalogSubscriptionResponse.java new file mode 100644 index 00000000000..80f98432136 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteAppCatalogSubscriptionResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteAppCatalogSubscriptionResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAppCatalogSubscriptionResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteNatGatewayResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteNatGatewayResponse.java new file mode 100644 index 00000000000..fc73666e000 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/DeleteNatGatewayResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteNatGatewayResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteNatGatewayResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetAppCatalogListingAgreementsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetAppCatalogListingAgreementsResponse.java new file mode 100644 index 00000000000..97e66ce54f4 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetAppCatalogListingAgreementsResponse.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetAppCatalogListingAgreementsResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned AppCatalogListingResourceVersionAgreements instance. + */ + private AppCatalogListingResourceVersionAgreements appCatalogListingResourceVersionAgreements; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAppCatalogListingAgreementsResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + appCatalogListingResourceVersionAgreements( + o.getAppCatalogListingResourceVersionAgreements()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetAppCatalogListingResourceVersionResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetAppCatalogListingResourceVersionResponse.java new file mode 100644 index 00000000000..0009880c4d2 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetAppCatalogListingResourceVersionResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetAppCatalogListingResourceVersionResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned AppCatalogListingResourceVersion instance. + */ + private AppCatalogListingResourceVersion appCatalogListingResourceVersion; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAppCatalogListingResourceVersionResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + appCatalogListingResourceVersion(o.getAppCatalogListingResourceVersion()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetAppCatalogListingResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetAppCatalogListingResponse.java new file mode 100644 index 00000000000..83cde88bc3a --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetAppCatalogListingResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetAppCatalogListingResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned AppCatalogListing instance. + */ + private AppCatalogListing appCatalogListing; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAppCatalogListingResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + appCatalogListing(o.getAppCatalogListing()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetNatGatewayResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetNatGatewayResponse.java new file mode 100644 index 00000000000..3c5dc715fca --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetNatGatewayResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetNatGatewayResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned NatGateway instance. + */ + private NatGateway natGateway; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetNatGatewayResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + natGateway(o.getNatGateway()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetVolumeBackupPolicyAssetAssignmentResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetVolumeBackupPolicyAssetAssignmentResponse.java index 58f27b91d8e..e51458c0965 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetVolumeBackupPolicyAssetAssignmentResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/GetVolumeBackupPolicyAssetAssignmentResponse.java @@ -11,9 +11,9 @@ public class GetVolumeBackupPolicyAssetAssignmentResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListAppCatalogListingResourceVersionsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListAppCatalogListingResourceVersionsResponse.java new file mode 100644 index 00000000000..2ae92e7f38c --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListAppCatalogListingResourceVersionsResponse.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListAppCatalogListingResourceVersionsResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the `page` parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A list of AppCatalogListingResourceVersionSummary instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAppCatalogListingResourceVersionsResponse o) { + etag(o.getEtag()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListAppCatalogListingsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListAppCatalogListingsResponse.java new file mode 100644 index 00000000000..56e62c1cef6 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListAppCatalogListingsResponse.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListAppCatalogListingsResponse { + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the `page` parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A list of AppCatalogListingSummary instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAppCatalogListingsResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListAppCatalogSubscriptionsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListAppCatalogSubscriptionsResponse.java new file mode 100644 index 00000000000..f7c5728fab1 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListAppCatalogSubscriptionsResponse.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListAppCatalogSubscriptionsResponse { + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the `page` parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A list of AppCatalogSubscriptionSummary instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAppCatalogSubscriptionsResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListBootVolumeAttachmentsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListBootVolumeAttachmentsResponse.java index 13fbd895acf..c3782fc523f 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListBootVolumeAttachmentsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListBootVolumeAttachmentsResponse.java @@ -11,9 +11,9 @@ public class ListBootVolumeAttachmentsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListBootVolumeBackupsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListBootVolumeBackupsResponse.java index b6a960469f1..855254a6edd 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListBootVolumeBackupsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListBootVolumeBackupsResponse.java @@ -11,9 +11,9 @@ public class ListBootVolumeBackupsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListBootVolumesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListBootVolumesResponse.java index b75feee5040..18234a95e40 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListBootVolumesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListBootVolumesResponse.java @@ -11,9 +11,9 @@ public class ListBootVolumesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListConsoleHistoriesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListConsoleHistoriesResponse.java index c1335858ba4..7acf6e0fd67 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListConsoleHistoriesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListConsoleHistoriesResponse.java @@ -11,9 +11,9 @@ public class ListConsoleHistoriesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCpesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCpesResponse.java index 117ab304875..9b79257dd3d 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCpesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCpesResponse.java @@ -11,9 +11,9 @@ public class ListCpesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossConnectGroupsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossConnectGroupsResponse.java index 17bab178ab8..8a616522049 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossConnectGroupsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossConnectGroupsResponse.java @@ -11,9 +11,9 @@ public class ListCrossConnectGroupsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossConnectLocationsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossConnectLocationsResponse.java index 9466c166d2f..462b3de32fe 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossConnectLocationsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossConnectLocationsResponse.java @@ -11,9 +11,9 @@ public class ListCrossConnectLocationsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossConnectsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossConnectsResponse.java index 0e8492ed105..609134ba76e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossConnectsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossConnectsResponse.java @@ -11,9 +11,9 @@ public class ListCrossConnectsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossconnectPortSpeedShapesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossconnectPortSpeedShapesResponse.java index 2258365ab9c..84511284e03 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossconnectPortSpeedShapesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListCrossconnectPortSpeedShapesResponse.java @@ -11,9 +11,9 @@ public class ListCrossconnectPortSpeedShapesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListDhcpOptionsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListDhcpOptionsResponse.java index 02cf8ce6cb9..f066798f3ee 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListDhcpOptionsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListDhcpOptionsResponse.java @@ -11,9 +11,9 @@ public class ListDhcpOptionsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListDrgAttachmentsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListDrgAttachmentsResponse.java index 6277249fff9..00ea5ccea13 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListDrgAttachmentsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListDrgAttachmentsResponse.java @@ -11,9 +11,9 @@ public class ListDrgAttachmentsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListDrgsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListDrgsResponse.java index 0fddcee351a..b219af07704 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListDrgsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListDrgsResponse.java @@ -11,9 +11,9 @@ public class ListDrgsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListFastConnectProviderServicesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListFastConnectProviderServicesResponse.java index 1c5b7c2320e..239c100adef 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListFastConnectProviderServicesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListFastConnectProviderServicesResponse.java @@ -11,9 +11,9 @@ public class ListFastConnectProviderServicesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListFastConnectProviderVirtualCircuitBandwidthShapesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListFastConnectProviderVirtualCircuitBandwidthShapesResponse.java index 7f9dbe68123..c1ccf975989 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListFastConnectProviderVirtualCircuitBandwidthShapesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListFastConnectProviderVirtualCircuitBandwidthShapesResponse.java @@ -11,9 +11,9 @@ public class ListFastConnectProviderVirtualCircuitBandwidthShapesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListIPSecConnectionsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListIPSecConnectionsResponse.java index a58a71f341f..cf3fd852b3d 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListIPSecConnectionsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListIPSecConnectionsResponse.java @@ -11,9 +11,9 @@ public class ListIPSecConnectionsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListImagesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListImagesResponse.java index 2003427fbb5..afe7f1fdabd 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListImagesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListImagesResponse.java @@ -11,9 +11,9 @@ public class ListImagesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstanceConsoleConnectionsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstanceConsoleConnectionsResponse.java index e53bf448642..a2ac572497d 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstanceConsoleConnectionsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstanceConsoleConnectionsResponse.java @@ -11,9 +11,9 @@ public class ListInstanceConsoleConnectionsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstancesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstancesResponse.java index c0c80882226..55762c28c2e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstancesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInstancesResponse.java @@ -11,9 +11,9 @@ public class ListInstancesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInternetGatewaysResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInternetGatewaysResponse.java index 709e3e4bb57..b57cf278457 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInternetGatewaysResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListInternetGatewaysResponse.java @@ -11,9 +11,9 @@ public class ListInternetGatewaysResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListLocalPeeringGatewaysResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListLocalPeeringGatewaysResponse.java index a0294a1c9cd..8626e753ced 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListLocalPeeringGatewaysResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListLocalPeeringGatewaysResponse.java @@ -11,9 +11,9 @@ public class ListLocalPeeringGatewaysResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListNatGatewaysResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListNatGatewaysResponse.java new file mode 100644 index 00000000000..a57fadba250 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListNatGatewaysResponse.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListNatGatewaysResponse { + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + */ + private String opcNextPage; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * A list of NatGateway instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListNatGatewaysResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListPrivateIpsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListPrivateIpsResponse.java index 98f9dd5dc53..52a48df574a 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListPrivateIpsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListPrivateIpsResponse.java @@ -11,9 +11,9 @@ public class ListPrivateIpsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListPublicIpsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListPublicIpsResponse.java index 6d829ba571f..5ffe8eda30b 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListPublicIpsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListPublicIpsResponse.java @@ -11,9 +11,9 @@ public class ListPublicIpsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListRemotePeeringConnectionsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListRemotePeeringConnectionsResponse.java index 5897138921f..2cfa55801d5 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListRemotePeeringConnectionsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListRemotePeeringConnectionsResponse.java @@ -11,7 +11,10 @@ public class ListRemotePeeringConnectionsResponse { /** - * A pagination token to the start of the next page, if one exist. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListRouteTablesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListRouteTablesResponse.java index 1805f0bf979..c4191c31db3 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListRouteTablesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListRouteTablesResponse.java @@ -11,9 +11,9 @@ public class ListRouteTablesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListSecurityListsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListSecurityListsResponse.java index 1f6a3ece6be..779b8478606 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListSecurityListsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListSecurityListsResponse.java @@ -11,9 +11,9 @@ public class ListSecurityListsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListServiceGatewaysResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListServiceGatewaysResponse.java index 42b1a08979a..f752f193306 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListServiceGatewaysResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListServiceGatewaysResponse.java @@ -11,9 +11,9 @@ public class ListServiceGatewaysResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListServicesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListServicesResponse.java index 0bfe4dafe23..0ddc974064e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListServicesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListServicesResponse.java @@ -11,9 +11,9 @@ public class ListServicesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListShapesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListShapesResponse.java index 45590b3012b..e2573037ebc 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListShapesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListShapesResponse.java @@ -11,9 +11,9 @@ public class ListShapesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListSubnetsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListSubnetsResponse.java index b2a41f90622..9f1c62ffa30 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListSubnetsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListSubnetsResponse.java @@ -11,9 +11,9 @@ public class ListSubnetsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVcnsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVcnsResponse.java index c1fd25f0cfd..6472b20d8dd 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVcnsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVcnsResponse.java @@ -11,9 +11,9 @@ public class ListVcnsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVirtualCircuitBandwidthShapesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVirtualCircuitBandwidthShapesResponse.java index 7b4b0ac0f04..2329965965b 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVirtualCircuitBandwidthShapesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVirtualCircuitBandwidthShapesResponse.java @@ -11,9 +11,9 @@ public class ListVirtualCircuitBandwidthShapesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVirtualCircuitsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVirtualCircuitsResponse.java index 2eedd62fb6a..12075549941 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVirtualCircuitsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVirtualCircuitsResponse.java @@ -11,9 +11,9 @@ public class ListVirtualCircuitsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVnicAttachmentsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVnicAttachmentsResponse.java index decebdd02f0..14e13c22cb3 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVnicAttachmentsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVnicAttachmentsResponse.java @@ -11,9 +11,9 @@ public class ListVnicAttachmentsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeAttachmentsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeAttachmentsResponse.java index e2119daa831..04a567ad9d1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeAttachmentsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeAttachmentsResponse.java @@ -11,9 +11,9 @@ public class ListVolumeAttachmentsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeBackupPoliciesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeBackupPoliciesResponse.java index 1a2cb715ae1..8b7db0c9516 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeBackupPoliciesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeBackupPoliciesResponse.java @@ -11,9 +11,9 @@ public class ListVolumeBackupPoliciesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeBackupsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeBackupsResponse.java index 5369193b7f3..4a40f70b116 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeBackupsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeBackupsResponse.java @@ -11,9 +11,9 @@ public class ListVolumeBackupsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeGroupBackupsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeGroupBackupsResponse.java index 3fe92ba5f6f..bbf27f9188e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeGroupBackupsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeGroupBackupsResponse.java @@ -11,9 +11,9 @@ public class ListVolumeGroupBackupsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeGroupsResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeGroupsResponse.java index 93ea54a5493..830fae3a355 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeGroupsResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumeGroupsResponse.java @@ -11,9 +11,9 @@ public class ListVolumeGroupsResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumesResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumesResponse.java index e5e43650605..775c4e2bcbb 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumesResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ListVolumesResponse.java @@ -11,9 +11,9 @@ public class ListVolumesResponse { /** - * For pagination of a list of items. When paging through a list, if this header appears in the response, - * then a partial list might have been returned. Include this value as the `page` parameter for the - * subsequent GET request to get the next batch of items. + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateNatGatewayResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateNatGatewayResponse.java new file mode 100644 index 00000000000..f54e048ebee --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/UpdateNatGatewayResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.responses; + +import com.oracle.bmc.core.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateNatGatewayResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + * a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * The returned NatGateway instance. + */ + private NatGateway natGateway; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateNatGatewayResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + natGateway(o.getNatGateway()); + + return this; + } + } +} diff --git a/bmc-database/pom.xml b/bmc-database/pom.xml index 22f09eb0010..ed545576d8c 100644 --- a/bmc-database/pom.xml +++ b/bmc-database/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 diff --git a/bmc-dns/pom.xml b/bmc-dns/pom.xml index edeaba5829e..c039ec17e16 100644 --- a/bmc-dns/pom.xml +++ b/bmc-dns/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 diff --git a/bmc-email/pom.xml b/bmc-email/pom.xml index cc09a48313d..728597c4ed3 100644 --- a/bmc-email/pom.xml +++ b/bmc-email/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 diff --git a/bmc-examples/pom.xml b/bmc-examples/pom.xml index 555be6f62c8..3cc4c2d9f3f 100644 --- a/bmc-examples/pom.xml +++ b/bmc-examples/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 1.2.47 + 1.2.48 pom import diff --git a/bmc-examples/src/main/java/CatalogImageListingResourceVersionsExample.java b/bmc-examples/src/main/java/CatalogImageListingResourceVersionsExample.java new file mode 100644 index 00000000000..0ac41404213 --- /dev/null +++ b/bmc-examples/src/main/java/CatalogImageListingResourceVersionsExample.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ + +import com.oracle.bmc.Region; +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.core.ComputeClient; +import com.oracle.bmc.core.model.AppCatalogListingResourceVersionSummary; +import com.oracle.bmc.core.model.AppCatalogListingSummary; +import com.oracle.bmc.core.requests.ListAppCatalogListingResourceVersionsRequest; +import com.oracle.bmc.core.requests.ListAppCatalogListingsRequest; +import com.oracle.bmc.core.responses.ListAppCatalogListingResourceVersionsResponse; +import com.oracle.bmc.core.responses.ListAppCatalogListingsResponse; + +import java.util.ArrayList; +import java.util.List; + +/** + * This class demonstrates how to consume the Image Catalog Listings service using the given Java SDK. This will cover: + *

+ * This class makes the following assumptions: + * + */ +public class CatalogImageListingResourceVersionsExample { + public static void main(String[] args) throws Exception { + // TODO: Fill in these values + Region region = Region.US_PHOENIX_1; + + String configurationFilePath = "~/.oci/config"; + String profile = "DEFAULT"; + + AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(configurationFilePath, profile); + + ComputeClient computeClient = new ComputeClient(provider); + computeClient.setRegion(region); + + //Get the first alphabetically sorted listing + ListAppCatalogListingsResponse listImagesResponse = + computeClient.listAppCatalogListings( + ListAppCatalogListingsRequest.builder() + .limit(1) + .sortOrder(ListAppCatalogListingsRequest.SortOrder.Asc) //sort by displayname + .build()); + + if (!listImagesResponse.getItems().isEmpty()) { + AppCatalogListingSummary catalogListingSummary = listImagesResponse.getItems().get(0); + + String listingId = catalogListingSummary.getListingId(); + List resourceVersions = getResourceVersions(computeClient, listingId); + + System.out.printf("Listing Id :%s%n", listingId); + System.out.printf("Display Name :%s%n", catalogListingSummary.getDisplayName()); + System.out.printf("Publisher Name :%s%n", catalogListingSummary.getPublisherName()); + System.out.printf("Summary :%s%n", catalogListingSummary.getSummary()); + System.out.printf("Versions :%s%n", resourceVersions); + } else { + System.out.println("No images found in the catalog"); + } + } + + /** + * Returns an exhaustive list of all versions associated with a listing. + * @param computeClient the client used to communicate with Compute service + * @param listingId the OCID of the listing + * @return all the versions of listing + */ + private static List getResourceVersions(ComputeClient computeClient, String listingId) { + List resourceVersions = new ArrayList<>(); + + for (ListAppCatalogListingResourceVersionsResponse responseListingResourceVersion : + computeClient.getPaginators().listAppCatalogListingResourceVersionsResponseIterator( + ListAppCatalogListingResourceVersionsRequest.builder() + .listingId(listingId) + .limit(10) + .sortOrder(ListAppCatalogListingResourceVersionsRequest.SortOrder.Asc) + .build())) { + for (AppCatalogListingResourceVersionSummary item : responseListingResourceVersion.getItems()) { + resourceVersions.add(item.getListingResourceVersion()); + } + } + + return resourceVersions; + } +} diff --git a/bmc-examples/src/main/java/CopyObjectExample.java b/bmc-examples/src/main/java/CopyObjectExample.java new file mode 100644 index 00000000000..20e65688b75 --- /dev/null +++ b/bmc-examples/src/main/java/CopyObjectExample.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +import com.oracle.bmc.Region; +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.objectstorage.ObjectStorage; +import com.oracle.bmc.objectstorage.ObjectStorageClient; +import com.oracle.bmc.objectstorage.model.CopyObjectDetails; +import com.oracle.bmc.objectstorage.model.CreateBucketDetails; +import com.oracle.bmc.objectstorage.model.WorkRequest; +import com.oracle.bmc.objectstorage.requests.CopyObjectRequest; +import com.oracle.bmc.objectstorage.requests.CreateBucketRequest; +import com.oracle.bmc.objectstorage.requests.GetNamespaceRequest; +import com.oracle.bmc.objectstorage.requests.GetWorkRequestRequest; +import com.oracle.bmc.objectstorage.requests.HeadObjectRequest; +import com.oracle.bmc.objectstorage.requests.PutObjectRequest; +import com.oracle.bmc.objectstorage.responses.CopyObjectResponse; +import com.oracle.bmc.objectstorage.responses.GetNamespaceResponse; +import com.oracle.bmc.objectstorage.responses.GetWorkRequestResponse; + +import java.io.ByteArrayInputStream; +import java.nio.charset.StandardCharsets; + +public class CopyObjectExample { + + /** + * The entry point for the example. + * + * @param args Arguments to provide to the example. The following arguments are expected: + *
    + *
  • The first argument is the OCID of the compartment.
  • + *
  • The second is the name of source bucket to create
  • + *
  • The third is the name of source object to copy from
  • + *
  • The fourth is the name of destination bucket to create
  • + *
  • The fifth is the name of destination object to copy to
  • + *
+ */ + public static void main(String[] args) throws Exception { + + String configurationFilePath = "~/.oci/config"; + String profile = "DEFAULT"; + + if (args.length != 5) { + throw new IllegalArgumentException( + "Unexpected number of arguments received. Consult the script header comments for expected arguments"); + } + + final String compartmentId = args[0]; + final String sourceBucket = args[1]; + final String sourceObject = args[2]; + final String destBucket = args[3]; + final String destObject = args[4]; + + AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(configurationFilePath, profile); + + ObjectStorage client = new ObjectStorageClient(provider); + client.setRegion(Region.US_PHOENIX_1); + + System.out.println("Getting the namespace."); + GetNamespaceResponse namespaceResponse = + client.getNamespace(GetNamespaceRequest.builder().build()); + String namespaceName = namespaceResponse.getValue(); + + System.out.println("Creating the source bucket."); + CreateBucketDetails createSourceBucketDetails = + CreateBucketDetails.builder() + .compartmentId(compartmentId) + .name(sourceBucket) + .build(); + CreateBucketRequest createSourceBucketRequest = + CreateBucketRequest.builder() + .namespaceName(namespaceName) + .createBucketDetails(createSourceBucketDetails) + .build(); + client.createBucket(createSourceBucketRequest); + + System.out.println("Creating the source object"); + PutObjectRequest putObjectRequest = + PutObjectRequest.builder() + .namespaceName(namespaceName) + .bucketName(sourceBucket) + .objectName(sourceObject) + .contentLength(4L) + .putObjectBody( + new ByteArrayInputStream("data".getBytes(StandardCharsets.UTF_8))) + .build(); + client.putObject(putObjectRequest); + + System.out.println("Creating the destination bucket."); + client.setRegion(Region.US_ASHBURN_1); + CreateBucketDetails createDestBucketDetails = + CreateBucketDetails.builder().compartmentId(compartmentId).name(destBucket).build(); + CreateBucketRequest createDestBucketRequest = + CreateBucketRequest.builder() + .namespaceName(namespaceName) + .createBucketDetails(createDestBucketDetails) + .build(); + client.createBucket(createDestBucketRequest); + + System.out.println("Copy the object."); + client.setRegion(Region.US_PHOENIX_1); + CopyObjectDetails copyObjectDetails = + CopyObjectDetails.builder() + .sourceObjectName(sourceObject) + .destinationRegion(Region.US_ASHBURN_1.getRegionId()) + .destinationNamespace(namespaceName) + .destinationBucket(destBucket) + .destinationObjectName(destObject) + .build(); + CopyObjectRequest copyObjectRequest = + CopyObjectRequest.builder() + .namespaceName(namespaceName) + .bucketName(sourceBucket) + .copyObjectDetails(copyObjectDetails) + .build(); + CopyObjectResponse copyObjectResponse = client.copyObject(copyObjectRequest); + + System.out.println("Wait for copy to finish."); + GetWorkRequestRequest getWorkRequestRequest = + GetWorkRequestRequest.builder() + .workRequestId(copyObjectResponse.getOpcWorkRequestId()) + .build(); + GetWorkRequestResponse getWorkRequestResponse = + client.getWaiters().forWorkRequest(getWorkRequestRequest).execute(); + WorkRequest.Status status = getWorkRequestResponse.getWorkRequest().getStatus(); + System.out.println("Work request is now in " + status + " state."); + + if (status == WorkRequest.Status.Completed) { + System.out.println("Verify that the object has been copied."); + client.setRegion(Region.US_ASHBURN_1); + HeadObjectRequest headObjectRequest = + HeadObjectRequest.builder() + .namespaceName(namespaceName) + .bucketName(destBucket) + .objectName(destObject) + .build(); + client.headObject(headObjectRequest); + } + + client.close(); + } +} diff --git a/bmc-examples/src/main/java/ObjectLifecyclePolicyExample.java b/bmc-examples/src/main/java/ObjectLifecyclePolicyExample.java new file mode 100644 index 00000000000..adbdbe157a8 --- /dev/null +++ b/bmc-examples/src/main/java/ObjectLifecyclePolicyExample.java @@ -0,0 +1,163 @@ +import com.oracle.bmc.Region; +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.model.BmcException; +import com.oracle.bmc.objectstorage.ObjectStorage; +import com.oracle.bmc.objectstorage.ObjectStorageClient; +import com.oracle.bmc.objectstorage.model.CreateBucketDetails; +import com.oracle.bmc.objectstorage.model.ObjectLifecycleRule; +import com.oracle.bmc.objectstorage.model.PutObjectLifecyclePolicyDetails; +import com.oracle.bmc.objectstorage.requests.CreateBucketRequest; +import com.oracle.bmc.objectstorage.requests.DeleteBucketRequest; +import com.oracle.bmc.objectstorage.requests.DeleteObjectLifecyclePolicyRequest; +import com.oracle.bmc.objectstorage.requests.GetNamespaceRequest; +import com.oracle.bmc.objectstorage.requests.GetObjectLifecyclePolicyRequest; +import com.oracle.bmc.objectstorage.requests.PutObjectLifecyclePolicyRequest; +import com.oracle.bmc.objectstorage.responses.GetNamespaceResponse; + +import java.util.Arrays; + +/** + * This class provides an example of using object lifecycle policies in the Java SDK. + * Lifecycle policies are an object storage featuring enabling automatic archival and deletion of objects after they + * reach a desired age. + * + * This example will start by retrieving your object storage namespace, then it will create a new bucket (continuing if + * the bucket exists), write a lifecycle policy to the bucket, retrieve the policy, delete the policy, and delete the + * bucket. If you pass this example the name of a bucket that already exists, a policy will be active on the bucket + * briefly and your old objects may be archived. Deleting a policy immediately cancels its execution. + */ +public class ObjectLifecyclePolicyExample { + + + private static final String CONFIG_LOCATION = "~/.oci/config"; + private static final String CONFIG_PROFILE = "DEFAULT"; + + /** + * The entry point for the example. + * + * @param args Arguments to provide to the example. The following arguments are expected: + *
    + *
  • The first argument is the OCID of the compartment where we'll create a bucket
  • + *
  • The second is the name of the bucket to create
  • + *
  • The third parameter controls how many years to wait before objects will be archived. The API also accepts + * time periods specified in days
  • + *
+ */ + public static void main(String[] args) throws Exception { + if (args.length != 3) { + throw new IllegalArgumentException( + "Unexpected number of arguments received. Consult the script header comments for expected arguments"); + } + final String compartmentId = args[0]; + final String bucketName = args[1]; + final Long yearsToWaitBeforeArchival = Long.parseLong(args[2]); + + final AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(CONFIG_LOCATION, CONFIG_PROFILE); + final ObjectStorage client = new ObjectStorageClient(provider); + client.setRegion(Region.US_PHOENIX_1); + + System.out.println("Fetching namespace"); + final GetNamespaceResponse namespaceResponse = + client.getNamespace(GetNamespaceRequest.builder().build()); + final String namespaceName = namespaceResponse.getValue(); + System.out.println("Using namespace: " + namespaceName); + + // Create a bucket to enable the lifecycle policy on + final CreateBucketDetails createBucketDetails = CreateBucketDetails.builder() + .compartmentId(compartmentId) + .name(bucketName) + .storageTier(CreateBucketDetails.StorageTier.Standard) + .build(); + final CreateBucketRequest createBucketRequest = CreateBucketRequest.builder() + .namespaceName(namespaceName) + .createBucketDetails(createBucketDetails) + .build(); + System.out.println("Creating bucket: " + bucketName); + try { + client.createBucket(createBucketRequest); + System.out.println("Created bucket"); + } catch (BmcException bmce) { + if (bmce.getStatusCode() == 409) { + System.out.println("-----"); + System.out.println("Got 409 " + bmce.getServiceCode() + " attempting to create the bucket."); + System.out.println("Either the bucket already exists, or we don't have permissions to create bucket."); + System.out.println("Attempting to proceed with object lifecycle policy creation."); + System.out.println("If object lifecycle policy creation fails with 404 NotFound/NotAuthorized, then "); + System.out.println("that means you have a permissions error and aren't authorized to use the bucket."); + System.out.println("-----"); + } else { + throw bmce; + } + } + + final ObjectLifecycleRule objectLifecycleRule = ObjectLifecycleRule.builder() + .name("archive-objects-after-" + yearsToWaitBeforeArchival + "-years-rule") + // Use the action "DELETE" to delete objects instead of archiving them. + .action("ARCHIVE") + .timeAmount(yearsToWaitBeforeArchival) + // Allowed time units are days and years. + .timeUnit(ObjectLifecycleRule.TimeUnit.Years) + .isEnabled(true) + // Use an ObjectNameFilter to filter objects by name before applying the rule. For example, + // this ObjectNameFilter would only archive objects whose names start with "/tmp/": + // .objectNameFilter(ObjectNameFilter.builder().inclusionPrefixes(Arrays.asList("/tmp/")).build()) + .build(); + final PutObjectLifecyclePolicyDetails objectLifecyclePolicyDetails = PutObjectLifecyclePolicyDetails.builder() + // Multiple rules are allowed. You may, for example, archive objects after 30 days and delete them + // after 120 days. If an object matches both rules, it will be deleted. + .items(Arrays.asList(objectLifecycleRule)) + .build(); + final PutObjectLifecyclePolicyRequest putObjectLifecyclePolicyRequest = PutObjectLifecyclePolicyRequest + .builder() + .namespaceName(namespaceName) + .bucketName(bucketName) + .putObjectLifecyclePolicyDetails(objectLifecyclePolicyDetails) + .build(); + System.out.println("Writing object lifecycle policy"); + try { + client.putObjectLifecyclePolicy(putObjectLifecyclePolicyRequest); + System.out.println("Wrote object lifecycle policy"); + } catch (BmcException bmce) { + if (bmce.getStatusCode() == 404) { + System.out.println("-----"); + System.out.println("Your user does not have permissions to create new object lifecycle policies."); + System.out.println("Please see the object lifecycle policy authorization documentation:"); + System.out.println("https://docs.cloud.oracle.com/iaas/Content/Object/Tasks/usinglifecyclepolicies.htm"); + System.out.println("-----"); + System.exit(-1); + } else { + throw bmce; + } + } + + System.out.println("Retrieving object lifecycle policy"); + final GetObjectLifecyclePolicyRequest getObjectLifecyclePolicyRequest = GetObjectLifecyclePolicyRequest + .builder() + .namespaceName(namespaceName) + .bucketName(bucketName) + .build(); + // Read a policy from the response object returned by this call + client.getObjectLifecyclePolicy(getObjectLifecyclePolicyRequest); + System.out.println("Retrieved object lifecycle policy"); + + // Overwriting or deleting a lifecycle policy immediately cancels any in-progress execution of the old policy. + final DeleteObjectLifecyclePolicyRequest deleteObjectLifecyclePolicyRequest = DeleteObjectLifecyclePolicyRequest + .builder() + .namespaceName(namespaceName) + .bucketName(bucketName) + .build(); + System.out.println("Deleting object lifecycle policy"); + client.deleteObjectLifecyclePolicy(deleteObjectLifecyclePolicyRequest); + System.out.println("Deleted object lifecycle policy"); + + final DeleteBucketRequest deleteBucketRequest = DeleteBucketRequest.builder() + .namespaceName(namespaceName) + .bucketName(bucketName) + .build(); + System.out.println("Deleting bucket"); + client.deleteBucket(deleteBucketRequest); + System.out.println("Deleted bucket"); + } +} diff --git a/bmc-examples/src/main/java/ObjectStorageUpdateBucketKmsKeyExample.java b/bmc-examples/src/main/java/ObjectStorageUpdateBucketKmsKeyExample.java index 364c02f6dbb..6f34d8f428d 100644 --- a/bmc-examples/src/main/java/ObjectStorageUpdateBucketKmsKeyExample.java +++ b/bmc-examples/src/main/java/ObjectStorageUpdateBucketKmsKeyExample.java @@ -26,9 +26,9 @@ public class ObjectStorageUpdateBucketKmsKeyExample { * @param args Arguments to provide to the example. The following arguments are expected: *
    *
  • The first argument is the OCID of the compartment where we'll create a bucket
  • - *
  • The second is the name of bucket to create
  • - *
  • The third is the kmsKey OCID used to create bucket
  • - *
  • The forth is the kmsKey OCID used to update bucket kmsKeyId
  • + *
  • The second is the name of the bucket to create
  • + *
  • The third is the kmsKey OCID used to create the bucket
  • + *
  • The forth is the kmsKey OCID used to update the bucket kmsKeyId
  • *
*/ public static void main(String[] args) throws Exception { diff --git a/bmc-filestorage/pom.xml b/bmc-filestorage/pom.xml index 5094a6474ac..12e2b907734 100644 --- a/bmc-filestorage/pom.xml +++ b/bmc-filestorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 diff --git a/bmc-full/pom.xml b/bmc-full/pom.xml index 50b31d8a65e..b2ffd6c1bd8 100644 --- a/bmc-full/pom.xml +++ b/bmc-full/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml oci-java-sdk-full @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 1.2.47 + 1.2.48 pom import diff --git a/bmc-identity/pom.xml b/bmc-identity/pom.xml index 7b09dcbedfb..737df76d5fb 100644 --- a/bmc-identity/pom.xml +++ b/bmc-identity/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 diff --git a/bmc-keymanagement/pom.xml b/bmc-keymanagement/pom.xml index f1552977178..a734359a703 100644 --- a/bmc-keymanagement/pom.xml +++ b/bmc-keymanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml oci-java-sdk-keymanagement @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 \ No newline at end of file diff --git a/bmc-loadbalancer/pom.xml b/bmc-loadbalancer/pom.xml index ac899f6ad27..3e27a2d9002 100644 --- a/bmc-loadbalancer/pom.xml +++ b/bmc-loadbalancer/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 diff --git a/bmc-objectstorage/bmc-objectstorage-combined/pom.xml b/bmc-objectstorage/bmc-objectstorage-combined/pom.xml index bba5a1cbd1f..e942a8d58c4 100644 --- a/bmc-objectstorage/bmc-objectstorage-combined/pom.xml +++ b/bmc-objectstorage/bmc-objectstorage-combined/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-parent - 1.2.47 + 1.2.48 ../pom.xml @@ -18,12 +18,12 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 1.2.47 + 1.2.48 com.oracle.oci.sdk oci-java-sdk-objectstorage-extensions - 1.2.47 + 1.2.48 diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml b/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml index 7e470755557..36e8574799b 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml +++ b/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-parent - 1.2.47 + 1.2.48 ../pom.xml @@ -18,12 +18,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 1.2.47 + 1.2.48 diff --git a/bmc-objectstorage/bmc-objectstorage-generated/pom.xml b/bmc-objectstorage/bmc-objectstorage-generated/pom.xml index 699b51be957..d4dd4a43e05 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/pom.xml +++ b/bmc-objectstorage/bmc-objectstorage-generated/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-parent - 1.2.47 + 1.2.48 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java index 13be4b6b069..385c2925e43 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorage.java @@ -45,6 +45,15 @@ public interface ObjectStorage extends AutoCloseable { */ AbortMultipartUploadResponse abortMultipartUpload(AbortMultipartUploadRequest request); + /** + * Cancel a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + CancelWorkRequestResponse cancelWorkRequest(CancelWorkRequestRequest request); + /** * Commits a multipart upload, which involves checking part numbers and ETags of the parts, to create an aggregate object. * @@ -55,8 +64,15 @@ public interface ObjectStorage extends AutoCloseable { CommitMultipartUploadResponse commitMultipartUpload(CommitMultipartUploadRequest request); /** - * Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. Avoid entering confidential - * information in bucket names. + * Create a request for copy object within or cross region + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + CopyObjectResponse copyObject(CopyObjectRequest request); + + /** + * Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -101,6 +117,16 @@ CreatePreauthenticatedRequestResponse createPreauthenticatedRequest( */ DeleteObjectResponse deleteObject(DeleteObjectRequest request); + /** + * Deletes the object lifecycle policy for the bucket. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + DeleteObjectLifecyclePolicyResponse deleteObjectLifecyclePolicy( + DeleteObjectLifecyclePolicyRequest request); + /** * Deletes the pre-authenticated request for the bucket. * @param request The request object containing the details to send @@ -120,8 +146,7 @@ DeletePreauthenticatedRequestResponse deletePreauthenticatedRequest( GetBucketResponse getBucket(GetBucketRequest request); /** - * Namespaces are unique. Namespaces are either the tenancy name or a random string automatically generated during - * account creation. You cannot edit a namespace. + * Gets the name of the namespace for the user making the request. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -150,6 +175,16 @@ DeletePreauthenticatedRequestResponse deletePreauthenticatedRequest( */ GetObjectResponse getObject(GetObjectRequest request); + /** + * Gets the object lifecycle policy for the bucket. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetObjectLifecyclePolicyResponse getObjectLifecyclePolicy( + GetObjectLifecyclePolicyRequest request); + /** * Gets the pre-authenticated request for the bucket. * @param request The request object containing the details to send @@ -159,6 +194,14 @@ DeletePreauthenticatedRequestResponse deletePreauthenticatedRequest( GetPreauthenticatedRequestResponse getPreauthenticatedRequest( GetPreauthenticatedRequestRequest request); + /** + * Gets the status of the work request with the given ID. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request); + /** * Efficiently checks to see if a bucket exists and gets the current ETag for the bucket. * @@ -234,7 +277,32 @@ ListPreauthenticatedRequestsResponse listPreauthenticatedRequests( ListPreauthenticatedRequestsRequest request); /** - * Creates a new object or overwrites an existing one. See [Special Instructions for Object Storage PUT](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/signingrequests.htm#ObjectStoragePut) for request signature requirements. + * Lists the errors of the work request with the given ID. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListWorkRequestErrorsResponse listWorkRequestErrors(ListWorkRequestErrorsRequest request); + + /** + * Lists the logs of the work request with the given ID. + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request); + + /** + * Lists the work requests in a compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + + /** + * Creates a new object or overwrites an existing one. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -242,6 +310,16 @@ ListPreauthenticatedRequestsResponse listPreauthenticatedRequests( */ PutObjectResponse putObject(PutObjectRequest request); + /** + * Creates or replaces the object lifecycle policy for the bucket. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. + */ + PutObjectLifecyclePolicyResponse putObjectLifecyclePolicy( + PutObjectLifecyclePolicyRequest request); + /** * Rename an object from source key to target key in the given namespace. * @@ -252,8 +330,8 @@ ListPreauthenticatedRequestsResponse listPreauthenticatedRequests( RenameObjectResponse renameObject(RenameObjectRequest request); /** - * Restore one or more objects specified by objectName parameter. - * By default object will be restored for 24 hours.Duration can be configured using hours parameter. + * Restore one or more objects specified by the objectName parameter. + * By default objects will be restored for 24 hours. Duration can be configured using the hours parameter. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -283,7 +361,7 @@ ListPreauthenticatedRequestsResponse listPreauthenticatedRequests( UpdateNamespaceMetadataResponse updateNamespaceMetadata(UpdateNamespaceMetadataRequest request); /** - * Uploads a single part of a multipart upload. See [Special Instructions for Object Storage PUT](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/signingrequests.htm#ObjectStoragePut) for request signature requirements. + * Uploads a single part of a multipart upload. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -291,6 +369,13 @@ ListPreauthenticatedRequestsResponse listPreauthenticatedRequests( */ UploadPartResponse uploadPart(UploadPartRequest request); + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + ObjectStorageWaiters getWaiters(); + /** * Gets the pre-configured paginators available for list operations in this service which may return multiple * pages of data. These paginators provide an {@link java.lang.Iterable} interface so that service responses, or diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java index 9f1883d1180..0935c470710 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsync.java @@ -53,6 +53,23 @@ java.util.concurrent.Future abortMultipartUpload( AbortMultipartUploadRequest, AbortMultipartUploadResponse> handler); + /** + * Cancel a work request. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future cancelWorkRequest( + CancelWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + CancelWorkRequestRequest, CancelWorkRequestResponse> + handler); + /** * Commits a multipart upload, which involves checking part numbers and ETags of the parts, to create an aggregate object. * @@ -71,8 +88,21 @@ java.util.concurrent.Future commitMultipartUpload handler); /** - * Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. Avoid entering confidential - * information in bucket names. + * Create a request for copy object within or cross region + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future copyObject( + CopyObjectRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + + /** + * Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. * * * @param request The request object containing the details to send @@ -155,6 +185,23 @@ java.util.concurrent.Future deleteObject( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Deletes the object lifecycle policy for the bucket. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future deleteObjectLifecyclePolicy( + DeleteObjectLifecyclePolicyRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteObjectLifecyclePolicyRequest, DeleteObjectLifecyclePolicyResponse> + handler); + /** * Deletes the pre-authenticated request for the bucket. * @@ -189,8 +236,7 @@ java.util.concurrent.Future getBucket( com.oracle.bmc.responses.AsyncHandler handler); /** - * Namespaces are unique. Namespaces are either the tenancy name or a random string automatically generated during - * account creation. You cannot edit a namespace. + * Gets the name of the namespace for the user making the request. * * * @param request The request object containing the details to send @@ -240,6 +286,23 @@ java.util.concurrent.Future getObject( GetObjectRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets the object lifecycle policy for the bucket. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getObjectLifecyclePolicy( + GetObjectLifecyclePolicyRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetObjectLifecyclePolicyRequest, GetObjectLifecyclePolicyResponse> + handler); + /** * Gets the pre-authenticated request for the bucket. * @@ -256,6 +319,21 @@ java.util.concurrent.Future getPreauthentica GetPreauthenticatedRequestRequest, GetPreauthenticatedRequestResponse> handler); + /** + * Gets the status of the work request with the given ID. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future getWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Efficiently checks to see if a bucket exists and gets the current ETag for the bucket. * @@ -378,7 +456,55 @@ java.util.concurrent.Future listPreauthent handler); /** - * Creates a new object or overwrites an existing one. See [Special Instructions for Object Storage PUT](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/signingrequests.htm#ObjectStoragePut) for request signature requirements. + * Lists the errors of the work request with the given ID. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listWorkRequestErrors( + ListWorkRequestErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handler); + + /** + * Lists the logs of the work request with the given ID. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listWorkRequestLogs( + ListWorkRequestLogsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handler); + + /** + * Lists the work requests in a compartment. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future listWorkRequests( + ListWorkRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Creates a new object or overwrites an existing one. * * * @param request The request object containing the details to send @@ -392,6 +518,23 @@ java.util.concurrent.Future putObject( PutObjectRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Creates or replaces the object lifecycle policy for the bucket. + * + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was + * provided. Note, if you provide an AsyncHandler and use the Future, some + * types of responses (like java.io.InputStream) may not be able to be read in + * both places as the underlying stream may only be consumed once. + */ + java.util.concurrent.Future putObjectLifecyclePolicy( + PutObjectLifecyclePolicyRequest request, + com.oracle.bmc.responses.AsyncHandler< + PutObjectLifecyclePolicyRequest, PutObjectLifecyclePolicyResponse> + handler); + /** * Rename an object from source key to target key in the given namespace. * @@ -409,8 +552,8 @@ java.util.concurrent.Future renameObject( handler); /** - * Restore one or more objects specified by objectName parameter. - * By default object will be restored for 24 hours.Duration can be configured using hours parameter. + * Restore one or more objects specified by the objectName parameter. + * By default objects will be restored for 24 hours. Duration can be configured using the hours parameter. * * * @param request The request object containing the details to send @@ -462,7 +605,7 @@ java.util.concurrent.Future updateNamespaceMeta handler); /** - * Uploads a single part of a multipart upload. See [Special Instructions for Object Storage PUT](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/signingrequests.htm#ObjectStoragePut) for request signature requirements. + * Uploads a single part of a multipart upload. * * * @param request The request object containing the details to send diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java index 65c4bbfee09..98ecd889418 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageAsyncClient.java @@ -361,6 +361,75 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future cancelWorkRequest( + final CancelWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CancelWorkRequestRequest, CancelWorkRequestResponse> + handler) { + LOG.trace("Called async cancelWorkRequest"); + final CancelWorkRequestRequest interceptedRequest = + CancelWorkRequestConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelWorkRequestConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = CancelWorkRequestConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + CancelWorkRequestRequest, CancelWorkRequestResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.delete(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.delete(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, CancelWorkRequestResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.delete(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future commitMultipartUpload( final CommitMultipartUploadRequest request, @@ -447,6 +516,88 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future copyObject( + final CopyObjectRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async copyObject"); + final CopyObjectRequest interceptedRequest = CopyObjectConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CopyObjectConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = CopyObjectConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + CopyObjectRequest, CopyObjectResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.post( + ib, + interceptedRequest.getCopyObjectDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getCopyObjectDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, CopyObjectResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.post( + ib, + interceptedRequest.getCopyObjectDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future createBucket( final CreateBucketRequest request, @@ -841,6 +992,80 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future + deleteObjectLifecyclePolicy( + final DeleteObjectLifecyclePolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteObjectLifecyclePolicyRequest, + DeleteObjectLifecyclePolicyResponse> + handler) { + LOG.trace("Called async deleteObjectLifecyclePolicy"); + final DeleteObjectLifecyclePolicyRequest interceptedRequest = + DeleteObjectLifecyclePolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteObjectLifecyclePolicyConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteObjectLifecyclePolicyResponse> + transformer = DeleteObjectLifecyclePolicyConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + DeleteObjectLifecyclePolicyRequest, DeleteObjectLifecyclePolicyResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + DeleteObjectLifecyclePolicyRequest, + DeleteObjectLifecyclePolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.delete(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.delete(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, DeleteObjectLifecyclePolicyResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.delete(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future deletePreauthenticatedRequest( @@ -1189,31 +1414,29 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - getPreauthenticatedRequest( - final GetPreauthenticatedRequestRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetPreauthenticatedRequestRequest, - GetPreauthenticatedRequestResponse> - handler) { - LOG.trace("Called async getPreauthenticatedRequest"); - final GetPreauthenticatedRequestRequest interceptedRequest = - GetPreauthenticatedRequestConverter.interceptRequest(request); + public java.util.concurrent.Future getObjectLifecyclePolicy( + final GetObjectLifecyclePolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetObjectLifecyclePolicyRequest, GetObjectLifecyclePolicyResponse> + handler) { + LOG.trace("Called async getObjectLifecyclePolicy"); + final GetObjectLifecyclePolicyRequest interceptedRequest = + GetObjectLifecyclePolicyConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetPreauthenticatedRequestConverter.fromRequest(client, interceptedRequest); + GetObjectLifecyclePolicyConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< - javax.ws.rs.core.Response, GetPreauthenticatedRequestResponse> - transformer = GetPreauthenticatedRequestConverter.fromResponse(); + javax.ws.rs.core.Response, GetObjectLifecyclePolicyResponse> + transformer = GetObjectLifecyclePolicyConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< - GetPreauthenticatedRequestRequest, GetPreauthenticatedRequestResponse> + GetObjectLifecyclePolicyRequest, GetObjectLifecyclePolicyResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetPreauthenticatedRequestRequest, GetPreauthenticatedRequestResponse>( + GetObjectLifecyclePolicyRequest, GetObjectLifecyclePolicyResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1243,7 +1466,7 @@ public void retryCall() { if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, GetPreauthenticatedRequestResponse>( + javax.ws.rs.core.Response, GetObjectLifecyclePolicyResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1262,25 +1485,31 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future headBucket( - final HeadBucketRequest request, - final com.oracle.bmc.responses.AsyncHandler - handler) { - LOG.trace("Called async headBucket"); - final HeadBucketRequest interceptedRequest = HeadBucketConverter.interceptRequest(request); + public java.util.concurrent.Future + getPreauthenticatedRequest( + final GetPreauthenticatedRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetPreauthenticatedRequestRequest, + GetPreauthenticatedRequestResponse> + handler) { + LOG.trace("Called async getPreauthenticatedRequest"); + final GetPreauthenticatedRequestRequest interceptedRequest = + GetPreauthenticatedRequestConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - HeadBucketConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = HeadBucketConverter.fromResponse(); + GetPreauthenticatedRequestConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetPreauthenticatedRequestResponse> + transformer = GetPreauthenticatedRequestConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler handlerToUse = - handler; + com.oracle.bmc.responses.AsyncHandler< + GetPreauthenticatedRequestRequest, GetPreauthenticatedRequestResponse> + handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - HeadBucketRequest, HeadBucketResponse>( + GetPreauthenticatedRequestRequest, GetPreauthenticatedRequestResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1293,7 +1522,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.head(ib, interceptedRequest, onSuccess, onError); + client.get(ib, interceptedRequest, onSuccess, onError); } }; } @@ -1305,12 +1534,12 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.head(ib, interceptedRequest, onSuccess, onError); + client.get(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< - javax.ws.rs.core.Response, HeadBucketResponse>( + javax.ws.rs.core.Response, GetPreauthenticatedRequestResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1319,7 +1548,7 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.head(ib, interceptedRequest, onSuccess, onError); + return client.get(ib, interceptedRequest, onSuccess, onError); } }); } else { @@ -1329,25 +1558,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future headObject( - final HeadObjectRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future getWorkRequest( + final GetWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetWorkRequestRequest, GetWorkRequestResponse> handler) { - LOG.trace("Called async headObject"); - final HeadObjectRequest interceptedRequest = HeadObjectConverter.interceptRequest(request); + LOG.trace("Called async getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - HeadObjectConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = HeadObjectConverter.fromResponse(); + GetWorkRequestConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetWorkRequestConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler handlerToUse = - handler; + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - HeadObjectRequest, HeadObjectResponse>( + GetWorkRequestRequest, GetWorkRequestResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1360,7 +1591,7 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.head(ib, interceptedRequest, onSuccess, onError); + client.get(ib, interceptedRequest, onSuccess, onError); } }; } @@ -1372,7 +1603,141 @@ public void retryCall() { new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.head(ib, interceptedRequest, onSuccess, onError); + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, GetWorkRequestResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future headBucket( + final HeadBucketRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async headBucket"); + final HeadBucketRequest interceptedRequest = HeadBucketConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + HeadBucketConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = HeadBucketConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + HeadBucketRequest, HeadBucketResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.head(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.head(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, HeadBucketResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.head(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future headObject( + final HeadObjectRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async headObject"); + final HeadObjectRequest interceptedRequest = HeadObjectConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + HeadObjectConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = HeadObjectConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler handlerToUse = + handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + HeadObjectRequest, HeadObjectResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.head(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.head(ib, interceptedRequest, onSuccess, onError); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { @@ -1747,6 +2112,217 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future listWorkRequestErrors( + final ListWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handler) { + LOG.trace("Called async listWorkRequestErrors"); + final ListWorkRequestErrorsRequest interceptedRequest = + ListWorkRequestErrorsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListWorkRequestErrorsResponse> + transformer = ListWorkRequestErrorsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListWorkRequestErrorsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listWorkRequestLogs( + final ListWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handler) { + LOG.trace("Called async listWorkRequestLogs"); + final ListWorkRequestLogsRequest interceptedRequest = + ListWorkRequestLogsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListWorkRequestLogsResponse> + transformer = ListWorkRequestLogsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListWorkRequestLogsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future listWorkRequests( + final ListWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse> + handler) { + LOG.trace("Called async listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListWorkRequestsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListWorkRequestsRequest, ListWorkRequestsResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.get(ib, interceptedRequest, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.get(ib, interceptedRequest, onSuccess, onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, ListWorkRequestsResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.get(ib, interceptedRequest, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future putObject( final PutObjectRequest request, @@ -1833,6 +2409,92 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future putObjectLifecyclePolicy( + final PutObjectLifecyclePolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + PutObjectLifecyclePolicyRequest, PutObjectLifecyclePolicyResponse> + handler) { + LOG.trace("Called async putObjectLifecyclePolicy"); + final PutObjectLifecyclePolicyRequest interceptedRequest = + PutObjectLifecyclePolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PutObjectLifecyclePolicyConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, PutObjectLifecyclePolicyResponse> + transformer = PutObjectLifecyclePolicyConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + PutObjectLifecyclePolicyRequest, PutObjectLifecyclePolicyResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + PutObjectLifecyclePolicyRequest, PutObjectLifecyclePolicyResponse>( + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + handler) { + @Override + public void retryCall() { + final com.oracle.bmc.util.internal.Consumer + onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + this, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>( + this, interceptedRequest); + client.put( + ib, + interceptedRequest.getPutObjectLifecyclePolicyDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + new com.oracle.bmc.http.internal.ErrorConsumer<>(handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.put( + ib, + interceptedRequest.getPutObjectLifecyclePolicyDetails(), + interceptedRequest, + onSuccess, + onError); + + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + return new com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture< + javax.ws.rs.core.Response, PutObjectLifecyclePolicyResponse>( + responseFuture, + transformer, + (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) + this.authenticationDetailsProvider, + new com.google.common.base.Supplier< + java.util.concurrent.Future>() { + @Override + public java.util.concurrent.Future get() { + return client.put( + ib, + interceptedRequest.getPutObjectLifecyclePolicyDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future renameObject( final RenameObjectRequest request, diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java index 97c70fb077d..24c76cf0b60 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageClient.java @@ -22,6 +22,7 @@ public class ObjectStorageClient implements ObjectStorage { // attempt twice if it's instance principals, immediately failures will try to refresh the token private static final int MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS = 2; + private final ObjectStorageWaiters waiters; private final ObjectStoragePaginators paginators; @lombok.Getter(value = lombok.AccessLevel.PACKAGE) @@ -199,6 +200,21 @@ public ObjectStorageClient( } } this.client = restClientFactory.create(defaultRequestSigner, requestSigners, configuration); + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor executorService = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + new com.google.common.util.concurrent.ThreadFactoryBuilder() + .setDaemon(false) + .setNameFormat("ObjectStorage-waiters-%d") + .build()); + executorService.allowCoreThreadTimeOut(true); + + this.waiters = new ObjectStorageWaiters(executorService, this); this.paginators = new ObjectStoragePaginators(this); @@ -322,6 +338,31 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public CancelWorkRequestResponse cancelWorkRequest(CancelWorkRequestRequest request) { + LOG.trace("Called cancelWorkRequest"); + request = CancelWorkRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CancelWorkRequestConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = CancelWorkRequestConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.delete(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public CommitMultipartUploadResponse commitMultipartUpload( CommitMultipartUploadRequest request) { @@ -349,6 +390,32 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public CopyObjectResponse copyObject(CopyObjectRequest request) { + LOG.trace("Called copyObject"); + request = CopyObjectConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CopyObjectConverter.fromRequest(client, request); + com.google.common.base.Function transformer = + CopyObjectConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.post(ib, request.getCopyObjectDetails(), request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public CreateBucketResponse createBucket(CreateBucketRequest request) { LOG.trace("Called createBucket"); @@ -480,6 +547,33 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public DeleteObjectLifecyclePolicyResponse deleteObjectLifecyclePolicy( + DeleteObjectLifecyclePolicyRequest request) { + LOG.trace("Called deleteObjectLifecyclePolicy"); + request = DeleteObjectLifecyclePolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteObjectLifecyclePolicyConverter.fromRequest(client, request); + com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteObjectLifecyclePolicyResponse> + transformer = DeleteObjectLifecyclePolicyConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.delete(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public DeletePreauthenticatedRequestResponse deletePreauthenticatedRequest( DeletePreauthenticatedRequestRequest request) { @@ -607,6 +701,32 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public GetObjectLifecyclePolicyResponse getObjectLifecyclePolicy( + GetObjectLifecyclePolicyRequest request) { + LOG.trace("Called getObjectLifecyclePolicy"); + request = GetObjectLifecyclePolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetObjectLifecyclePolicyConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetObjectLifecyclePolicyConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public GetPreauthenticatedRequestResponse getPreauthenticatedRequest( GetPreauthenticatedRequestRequest request) { @@ -634,6 +754,31 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request) { + LOG.trace("Called getWorkRequest"); + request = GetWorkRequestConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWorkRequestConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = GetWorkRequestConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public HeadBucketResponse headBucket(HeadBucketRequest request) { LOG.trace("Called headBucket"); @@ -812,6 +957,82 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public ListWorkRequestErrorsResponse listWorkRequestErrors( + ListWorkRequestErrorsRequest request) { + LOG.trace("Called listWorkRequestErrors"); + request = ListWorkRequestErrorsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestErrorsConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListWorkRequestErrorsConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request) { + LOG.trace("Called listWorkRequestLogs"); + request = ListWorkRequestLogsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestLogsConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListWorkRequestLogsConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + + @Override + public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request) { + LOG.trace("Called listWorkRequests"); + request = ListWorkRequestsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWorkRequestsConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = ListWorkRequestsConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = client.get(ib, request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public PutObjectResponse putObject(PutObjectRequest request) { LOG.trace("Called putObject"); @@ -842,6 +1063,33 @@ && canRetryRequestIfRefreshableAuthTokenUsed(e)) { } } + @Override + public PutObjectLifecyclePolicyResponse putObjectLifecyclePolicy( + PutObjectLifecyclePolicyRequest request) { + LOG.trace("Called putObjectLifecyclePolicy"); + request = PutObjectLifecyclePolicyConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PutObjectLifecyclePolicyConverter.fromRequest(client, request); + com.google.common.base.Function + transformer = PutObjectLifecyclePolicyConverter.fromResponse(); + + int attempts = 0; + while (true) { + try { + javax.ws.rs.core.Response response = + client.put(ib, request.getPutObjectLifecyclePolicyDetails(), request); + return transformer.apply(response); + } catch (com.oracle.bmc.model.BmcException e) { + if (++attempts < MAX_IMMEDIATE_RETRIES_IF_USING_INSTANCE_PRINCIPALS + && canRetryRequestIfRefreshableAuthTokenUsed(e)) { + continue; + } else { + throw e; + } + } + } + } + @Override public RenameObjectResponse renameObject(RenameObjectRequest request) { LOG.trace("Called renameObject"); @@ -989,6 +1237,11 @@ private boolean canRetryRequestIfRefreshableAuthTokenUsed(com.oracle.bmc.model.B return false; } + @Override + public ObjectStorageWaiters getWaiters() { + return waiters; + } + @Override public ObjectStoragePaginators getPaginators() { return paginators; diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStoragePaginators.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStoragePaginators.java index 9a0909e95fa..e69cce4c054 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStoragePaginators.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStoragePaginators.java @@ -605,4 +605,345 @@ public ListPreauthenticatedRequestsResponse apply( } }); } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequestErrors operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listWorkRequestErrorsResponseIterator( + final ListWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestErrorsRequest.Builder, ListWorkRequestErrorsRequest, + ListWorkRequestErrorsResponse>( + new com.google.common.base.Supplier() { + @Override + public ListWorkRequestErrorsRequest.Builder get() { + return ListWorkRequestErrorsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder>, + ListWorkRequestErrorsRequest>() { + @Override + public ListWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + ListWorkRequestErrorsRequest request) { + return client.listWorkRequestErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.objectstorage.model.WorkRequestError} objects + * contained in responses from the listWorkRequestErrors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.objectstorage.model.WorkRequestError} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestErrorsRecordIterator(final ListWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestErrorsRequest.Builder, ListWorkRequestErrorsRequest, + ListWorkRequestErrorsResponse, com.oracle.bmc.objectstorage.model.WorkRequestError>( + new com.google.common.base.Supplier() { + @Override + public ListWorkRequestErrorsRequest.Builder get() { + return ListWorkRequestErrorsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder>, + ListWorkRequestErrorsRequest>() { + @Override + public ListWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestErrorsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + ListWorkRequestErrorsRequest request) { + return client.listWorkRequestErrors(request); + } + }, + new com.google.common.base.Function< + ListWorkRequestErrorsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListWorkRequestErrorsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequestLogs operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listWorkRequestLogsResponseIterator( + final ListWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestLogsRequest.Builder, ListWorkRequestLogsRequest, + ListWorkRequestLogsResponse>( + new com.google.common.base.Supplier() { + @Override + public ListWorkRequestLogsRequest.Builder get() { + return ListWorkRequestLogsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder>, + ListWorkRequestLogsRequest>() { + @Override + public ListWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply(ListWorkRequestLogsRequest request) { + return client.listWorkRequestLogs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.objectstorage.model.WorkRequestLogEntry} objects + * contained in responses from the listWorkRequestLogs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.objectstorage.model.WorkRequestLogEntry} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestLogsRecordIterator(final ListWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestLogsRequest.Builder, ListWorkRequestLogsRequest, + ListWorkRequestLogsResponse, + com.oracle.bmc.objectstorage.model.WorkRequestLogEntry>( + new com.google.common.base.Supplier() { + @Override + public ListWorkRequestLogsRequest.Builder get() { + return ListWorkRequestLogsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder>, + ListWorkRequestLogsRequest>() { + @Override + public ListWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestLogsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply(ListWorkRequestLogsRequest request) { + return client.listWorkRequestLogs(request); + } + }, + new com.google.common.base.Function< + ListWorkRequestLogsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListWorkRequestLogsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listWorkRequests operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses received from the service. + */ + public Iterable listWorkRequestsResponseIterator( + final ListWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWorkRequestsRequest.Builder, ListWorkRequestsRequest, ListWorkRequestsResponse>( + new com.google.common.base.Supplier() { + @Override + public ListWorkRequestsRequest.Builder get() { + return ListWorkRequestsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder>, + ListWorkRequestsRequest>() { + @Override + public ListWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListWorkRequestsRequest, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply(ListWorkRequestsRequest request) { + return client.listWorkRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.objectstorage.model.WorkRequestSummary} objects + * contained in responses from the listWorkRequests operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link com.oracle.bmc.objectstorage.model.WorkRequestSummary} objects + * contained in responses received from the service. + */ + public Iterable + listWorkRequestsRecordIterator(final ListWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWorkRequestsRequest.Builder, ListWorkRequestsRequest, ListWorkRequestsResponse, + com.oracle.bmc.objectstorage.model.WorkRequestSummary>( + new com.google.common.base.Supplier() { + @Override + public ListWorkRequestsRequest.Builder get() { + return ListWorkRequestsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder>, + ListWorkRequestsRequest>() { + @Override + public ListWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWorkRequestsRequest.Builder> + input) { + if (input.getToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getToken().orNull()) + .build(); + } + } + }, + new com.google.common.base.Function< + ListWorkRequestsRequest, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply(ListWorkRequestsRequest request) { + return client.listWorkRequests(request); + } + }, + new com.google.common.base.Function< + ListWorkRequestsResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListWorkRequestsResponse response) { + return response.getItems(); + } + }); + } } diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageWaiters.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageWaiters.java new file mode 100644 index 00000000000..04e9835afa4 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/ObjectStorageWaiters.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage; + +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; + +/** + * Collection of helper methods to produce {@link Waiter}s for different + * resources of ObjectStorage. + *

+ * The default configuration used is defined by {@link Waiters#DEFAULT_POLLING_WAITER}. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.RequiredArgsConstructor +public class ObjectStorageWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final ObjectStorage client; + + /** + * Creates a new {@link Waiter} using default configuration. + * + * @param request the request to send + * @return a new Waiter instance + */ + public com.oracle.bmc.waiter.Waiter + forWorkRequest(GetWorkRequestRequest request) { + return forWorkRequest(com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request); + } + + /** + * Creates a new {@link Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link TerminationStrategy} to use + * @param delayStrategy the {@link DelayStrategy} to use + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forWorkRequest( + GetWorkRequestRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + return forWorkRequest( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request); + } + + // Helper method to create a new Waiter for WorkRequest. + private com.oracle.bmc.waiter.Waiter + forWorkRequest( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetWorkRequestRequest request) { + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + com.google.common.base.Suppliers.ofInstance(request), + new com.google.common.base.Function< + GetWorkRequestRequest, GetWorkRequestResponse>() { + @Override + public GetWorkRequestResponse apply(GetWorkRequestRequest request) { + return client.getWorkRequest(request); + } + }, + new com.google.common.base.Predicate() { + @Override + public boolean apply(GetWorkRequestResponse response) { + // work requests are complete once the time finished is available + return response.getWorkRequest().getTimeFinished() != null; + } + }, + false), + request); + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CancelWorkRequestConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CancelWorkRequestConverter.java new file mode 100644 index 00000000000..defe3f9d17d --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CancelWorkRequestConverter.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class CancelWorkRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CancelWorkRequestRequest interceptRequest(CancelWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, CancelWorkRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, CancelWorkRequestResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, CancelWorkRequestResponse>() { + @Override + public CancelWorkRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CancelWorkRequestResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CancelWorkRequestResponse.Builder builder = + CancelWorkRequestResponse.builder(); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + CancelWorkRequestResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CopyObjectConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CopyObjectConverter.java new file mode 100644 index 00000000000..195e8bf3ead --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/CopyObjectConverter.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class CopyObjectConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CopyObjectRequest interceptRequest(CopyObjectRequest request) { + request = ObjectMetadataInterceptor.intercept(request); + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, CopyObjectRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getNamespaceName(), "namespaceName must not be blank"); + Validate.notBlank(request.getBucketName(), "bucketName must not be blank"); + Validate.notNull(request.getCopyObjectDetails(), "copyObjectDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())) + .path("b") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBucketName())) + .path("actions") + .path("copyObject"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, CopyObjectResponse>() { + @Override + public CopyObjectResponse apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for CopyObjectResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CopyObjectResponse.Builder builder = CopyObjectResponse.builder(); + + com.google.common.base.Optional> + opcWorkRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-work-request-id"); + if (opcWorkRequestIdHeader.isPresent()) { + builder.opcWorkRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-work-request-id", + opcWorkRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + CopyObjectResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/DeleteObjectLifecyclePolicyConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/DeleteObjectLifecyclePolicyConverter.java new file mode 100644 index 00000000000..4b7e33b998f --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/DeleteObjectLifecyclePolicyConverter.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class DeleteObjectLifecyclePolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static DeleteObjectLifecyclePolicyRequest interceptRequest( + DeleteObjectLifecyclePolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + DeleteObjectLifecyclePolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getNamespaceName(), "namespaceName must not be blank"); + Validate.notBlank(request.getBucketName(), "bucketName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())) + .path("b") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBucketName())) + .path("l"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteObjectLifecyclePolicyResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteObjectLifecyclePolicyResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteObjectLifecyclePolicyResponse>() { + @Override + public DeleteObjectLifecyclePolicyResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for DeleteObjectLifecyclePolicyResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = RESPONSE_CONVERSION_FACTORY.create(); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + DeleteObjectLifecyclePolicyResponse.Builder builder = + DeleteObjectLifecyclePolicyResponse.builder(); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + DeleteObjectLifecyclePolicyResponse responseWrapper = + builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectLifecyclePolicyConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectLifecyclePolicyConverter.java new file mode 100644 index 00000000000..5546e856cf4 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetObjectLifecyclePolicyConverter.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetObjectLifecyclePolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetObjectLifecyclePolicyRequest interceptRequest( + GetObjectLifecyclePolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + GetObjectLifecyclePolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getNamespaceName(), "namespaceName must not be blank"); + Validate.notBlank(request.getBucketName(), "bucketName must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())) + .path("b") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBucketName())) + .path("l"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetObjectLifecyclePolicyResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetObjectLifecyclePolicyResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetObjectLifecyclePolicyResponse>() { + @Override + public GetObjectLifecyclePolicyResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetObjectLifecyclePolicyResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + ObjectLifecyclePolicy>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + ObjectLifecyclePolicy.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetObjectLifecyclePolicyResponse.Builder builder = + GetObjectLifecyclePolicyResponse.builder(); + + builder.objectLifecyclePolicy(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> eTagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "eTag"); + if (eTagHeader.isPresent()) { + builder.eTag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "eTag", eTagHeader.get().get(0), String.class)); + } + + GetObjectLifecyclePolicyResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetWorkRequestConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetWorkRequestConverter.java new file mode 100644 index 00000000000..8eee046e99d --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/GetWorkRequestConverter.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class GetWorkRequestConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetWorkRequestRequest interceptRequest(GetWorkRequestRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetWorkRequestRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetWorkRequestResponse>() { + @Override + public GetWorkRequestResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for GetWorkRequestResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + WorkRequest>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + WorkRequest.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetWorkRequestResponse.Builder builder = + GetWorkRequestResponse.builder(); + + builder.workRequest(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + retryAfterHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "retry-after"); + if (retryAfterHeader.isPresent()) { + builder.retryAfter( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "retry-after", + retryAfterHeader.get().get(0), + Float.class)); + } + + GetWorkRequestResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestErrorsConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestErrorsConverter.java new file mode 100644 index 00000000000..f20a0d35ad1 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestErrorsConverter.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListWorkRequestErrorsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListWorkRequestErrorsRequest interceptRequest( + ListWorkRequestErrorsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListWorkRequestErrorsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("errors"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListWorkRequestErrorsResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListWorkRequestErrorsResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListWorkRequestErrorsResponse>() { + @Override + public ListWorkRequestErrorsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListWorkRequestErrorsResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + WorkRequestError>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListWorkRequestErrorsResponse.Builder builder = + ListWorkRequestErrorsResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + ListWorkRequestErrorsResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestLogsConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestLogsConverter.java new file mode 100644 index 00000000000..fabf1626738 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestLogsConverter.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListWorkRequestLogsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListWorkRequestLogsRequest interceptRequest(ListWorkRequestLogsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListWorkRequestLogsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("workRequests") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWorkRequestId())) + .path("logs"); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListWorkRequestLogsResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListWorkRequestLogsResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListWorkRequestLogsResponse>() { + @Override + public ListWorkRequestLogsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListWorkRequestLogsResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + WorkRequestLogEntry>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListWorkRequestLogsResponse.Builder builder = + ListWorkRequestLogsResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + ListWorkRequestLogsResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestsConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestsConverter.java new file mode 100644 index 00000000000..9868b554010 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ListWorkRequestsConverter.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class ListWorkRequestsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListWorkRequestsRequest interceptRequest(ListWorkRequestsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListWorkRequestsRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/").path("workRequests"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getPage() != null) { + target = + target.queryParam( + "page", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getPage())); + } + + if (request.getLimit() != null) { + target = + target.queryParam( + "limit", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getLimit())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListWorkRequestsResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListWorkRequestsResponse>() { + @Override + public ListWorkRequestsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListWorkRequestsResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + WorkRequestSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListWorkRequestsResponse.Builder builder = + ListWorkRequestsResponse.builder(); + + builder.items(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcNextPageHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-next-page"); + if (opcNextPageHeader.isPresent()) { + builder.opcNextPage( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-next-page", + opcNextPageHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + ListWorkRequestsResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ObjectMetadataInterceptor.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ObjectMetadataInterceptor.java index 94e327bc361..9c9a76a01a0 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ObjectMetadataInterceptor.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/ObjectMetadataInterceptor.java @@ -6,7 +6,9 @@ import java.util.HashMap; import java.util.Map; +import com.oracle.bmc.objectstorage.model.CopyObjectDetails; import com.oracle.bmc.objectstorage.model.CreateMultipartUploadDetails; +import com.oracle.bmc.objectstorage.requests.CopyObjectRequest; import com.oracle.bmc.objectstorage.requests.CreateMultipartUploadRequest; import com.oracle.bmc.objectstorage.requests.PutObjectRequest; import com.oracle.bmc.objectstorage.responses.GetObjectResponse; @@ -33,6 +35,17 @@ public static CreateMultipartUploadRequest intercept(CreateMultipartUploadReques .build(); } + public static CopyObjectRequest intercept(CopyObjectRequest request) { + Map newMetadata = + toServiceMeta(request.getCopyObjectDetails().getDestinationObjectMetadata()); + CopyObjectDetails newDetails = + CopyObjectDetails.builder() + .copy(request.getCopyObjectDetails()) + .destinationObjectMetadata(newMetadata) + .build(); + return CopyObjectRequest.builder().copy(request).copyObjectDetails(newDetails).build(); + } + public static PutObjectRequest intercept(PutObjectRequest request) { Map newMetadata = toServiceMeta(request.getOpcMeta()); return PutObjectRequest.builder().copy(request).opcMeta(newMetadata).build(); diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/PutObjectLifecyclePolicyConverter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/PutObjectLifecyclePolicyConverter.java new file mode 100644 index 00000000000..6b0e82977fe --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/internal/http/PutObjectLifecyclePolicyConverter.java @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.internal.http; + +import com.oracle.bmc.objectstorage.model.*; +import com.oracle.bmc.objectstorage.requests.*; +import com.oracle.bmc.objectstorage.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.extern.slf4j.Slf4j +public class PutObjectLifecyclePolicyConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static PutObjectLifecyclePolicyRequest interceptRequest( + PutObjectLifecyclePolicyRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + PutObjectLifecyclePolicyRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getNamespaceName(), "namespaceName must not be blank"); + Validate.notBlank(request.getBucketName(), "bucketName must not be blank"); + Validate.notNull( + request.getPutObjectLifecyclePolicyDetails(), + "putObjectLifecyclePolicyDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("n") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNamespaceName())) + .path("b") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getBucketName())) + .path("l"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcClientRequestId() != null) { + ib.header("opc-client-request-id", request.getOpcClientRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + if (request.getIfNoneMatch() != null) { + ib.header("if-none-match", request.getIfNoneMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, PutObjectLifecyclePolicyResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, PutObjectLifecyclePolicyResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, PutObjectLifecyclePolicyResponse>() { + @Override + public PutObjectLifecyclePolicyResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for PutObjectLifecyclePolicyResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + ObjectLifecyclePolicy>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + ObjectLifecyclePolicy.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + PutObjectLifecyclePolicyResponse.Builder builder = + PutObjectLifecyclePolicyResponse.builder(); + + builder.objectLifecyclePolicy(response.getItem()); + + com.google.common.base.Optional> + opcRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-request-id"); + if (opcRequestIdHeader.isPresent()) { + builder.opcRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-request-id", + opcRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> + opcClientRequestIdHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "opc-client-request-id"); + if (opcClientRequestIdHeader.isPresent()) { + builder.opcClientRequestId( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "opc-client-request-id", + opcClientRequestIdHeader.get().get(0), + String.class)); + } + + com.google.common.base.Optional> eTagHeader = + com.oracle.bmc.http.internal.HeaderUtils.get( + headers, "eTag"); + if (eTagHeader.isPresent()) { + builder.eTag( + com.oracle.bmc.http.internal.HeaderUtils.toValue( + "eTag", eTagHeader.get().get(0), String.class)); + } + + PutObjectLifecyclePolicyResponse responseWrapper = builder.build(); + + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java index 7304c9ba7b0..2145f14b9cd 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/Bucket.java @@ -138,6 +138,15 @@ public Builder kmsKeyId(String kmsKeyId) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("objectLifecyclePolicyEtag") + private String objectLifecyclePolicyEtag; + + public Builder objectLifecyclePolicyEtag(String objectLifecyclePolicyEtag) { + this.objectLifecyclePolicyEtag = objectLifecyclePolicyEtag; + this.__explicitlySet__.add("objectLifecyclePolicyEtag"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -155,7 +164,8 @@ public Bucket build() { storageTier, freeformTags, definedTags, - kmsKeyId); + kmsKeyId, + objectLifecyclePolicyEtag); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -174,7 +184,8 @@ public Builder copy(Bucket o) { .storageTier(o.getStorageTier()) .freeformTags(o.getFreeformTags()) .definedTags(o.getDefinedTags()) - .kmsKeyId(o.getKmsKeyId()); + .kmsKeyId(o.getKmsKeyId()) + .objectLifecyclePolicyEtag(o.getObjectLifecyclePolicyEtag()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -377,6 +388,12 @@ public static StorageTier create(String key) { @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") String kmsKeyId; + /** + * The entity tag for the live object lifecycle policy on the bucket. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectLifecyclePolicyEtag") + String objectLifecyclePolicyEtag; + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); } diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CopyObjectDetails.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CopyObjectDetails.java new file mode 100644 index 00000000000..aa84559841c --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/CopyObjectDetails.java @@ -0,0 +1,217 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, + * talk to an administrator. If you're an administrator who needs to write policies to give users access, see + * [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CopyObjectDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CopyObjectDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("sourceObjectName") + private String sourceObjectName; + + public Builder sourceObjectName(String sourceObjectName) { + this.sourceObjectName = sourceObjectName; + this.__explicitlySet__.add("sourceObjectName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("sourceObjectIfMatchETag") + private String sourceObjectIfMatchETag; + + public Builder sourceObjectIfMatchETag(String sourceObjectIfMatchETag) { + this.sourceObjectIfMatchETag = sourceObjectIfMatchETag; + this.__explicitlySet__.add("sourceObjectIfMatchETag"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("destinationRegion") + private String destinationRegion; + + public Builder destinationRegion(String destinationRegion) { + this.destinationRegion = destinationRegion; + this.__explicitlySet__.add("destinationRegion"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("destinationNamespace") + private String destinationNamespace; + + public Builder destinationNamespace(String destinationNamespace) { + this.destinationNamespace = destinationNamespace; + this.__explicitlySet__.add("destinationNamespace"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("destinationBucket") + private String destinationBucket; + + public Builder destinationBucket(String destinationBucket) { + this.destinationBucket = destinationBucket; + this.__explicitlySet__.add("destinationBucket"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("destinationObjectName") + private String destinationObjectName; + + public Builder destinationObjectName(String destinationObjectName) { + this.destinationObjectName = destinationObjectName; + this.__explicitlySet__.add("destinationObjectName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("destinationObjectIfMatchETag") + private String destinationObjectIfMatchETag; + + public Builder destinationObjectIfMatchETag(String destinationObjectIfMatchETag) { + this.destinationObjectIfMatchETag = destinationObjectIfMatchETag; + this.__explicitlySet__.add("destinationObjectIfMatchETag"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("destinationObjectIfNoneMatchETag") + private String destinationObjectIfNoneMatchETag; + + public Builder destinationObjectIfNoneMatchETag(String destinationObjectIfNoneMatchETag) { + this.destinationObjectIfNoneMatchETag = destinationObjectIfNoneMatchETag; + this.__explicitlySet__.add("destinationObjectIfNoneMatchETag"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("destinationObjectMetadata") + private java.util.Map destinationObjectMetadata; + + public Builder destinationObjectMetadata( + java.util.Map destinationObjectMetadata) { + this.destinationObjectMetadata = destinationObjectMetadata; + this.__explicitlySet__.add("destinationObjectMetadata"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CopyObjectDetails build() { + CopyObjectDetails __instance__ = + new CopyObjectDetails( + sourceObjectName, + sourceObjectIfMatchETag, + destinationRegion, + destinationNamespace, + destinationBucket, + destinationObjectName, + destinationObjectIfMatchETag, + destinationObjectIfNoneMatchETag, + destinationObjectMetadata); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CopyObjectDetails o) { + Builder copiedBuilder = + sourceObjectName(o.getSourceObjectName()) + .sourceObjectIfMatchETag(o.getSourceObjectIfMatchETag()) + .destinationRegion(o.getDestinationRegion()) + .destinationNamespace(o.getDestinationNamespace()) + .destinationBucket(o.getDestinationBucket()) + .destinationObjectName(o.getDestinationObjectName()) + .destinationObjectIfMatchETag(o.getDestinationObjectIfMatchETag()) + .destinationObjectIfNoneMatchETag( + o.getDestinationObjectIfNoneMatchETag()) + .destinationObjectMetadata(o.getDestinationObjectMetadata()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The name of the object to be copied + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceObjectName") + String sourceObjectName; + + /** + * The entity tag to match the target object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("sourceObjectIfMatchETag") + String sourceObjectIfMatchETag; + + /** + * The destination region object will be copied to. Please specify name of the region, for example \"us-ashburn-1\". + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationRegion") + String destinationRegion; + + /** + * The destination namespace object will be copied to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationNamespace") + String destinationNamespace; + + /** + * The destination bucket object will be copied to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationBucket") + String destinationBucket; + + /** + * The destination name for the copy object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationObjectName") + String destinationObjectName; + + /** + * The entity tag to match the target object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationObjectIfMatchETag") + String destinationObjectIfMatchETag; + + /** + * The entity tag to not match the target object. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationObjectIfNoneMatchETag") + String destinationObjectIfNoneMatchETag; + + /** + * Arbitrary string keys and values for the user-defined metadata for the object. Keys must be in + * \"opc-meta-*\" format. Avoid entering confidential information. If user enter value in this field, the value + * will become the object metadata for destination Object. If no value pass in, the destination object will have + * the exact object metadata as source object. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("destinationObjectMetadata") + java.util.Map destinationObjectMetadata; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/MultipartUpload.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/MultipartUpload.java index 2eff2495922..886174243b6 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/MultipartUpload.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/MultipartUpload.java @@ -8,7 +8,7 @@ * objects that are too large for a single upload operation. With multipart uploads, individual parts of an object can be * uploaded in parallel to reduce the amount of time you spend uploading. Multipart uploads can also minimize the impact * of network failures by letting you retry a failed part upload instead of requiring you to retry an entire object upload. - * See [Using Multipart Uploads](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/usingmultipartuploads.htm). + * See [Managing Multipart Uploads](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingmultipartuploads.htm). *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, * talk to an administrator. If you're an administrator who needs to write policies to give users access, see diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/NamespaceMetadata.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/NamespaceMetadata.java index 84d98fca119..1cf721995ac 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/NamespaceMetadata.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/NamespaceMetadata.java @@ -4,7 +4,7 @@ package com.oracle.bmc.objectstorage.model; /** - * A NamespaceMetadta is a map for storing namespace and defaultS3CompartmentId, defaultSwiftCompartmentId. + * A NamespaceMetadata is a map for storing namespace and defaultS3CompartmentId, defaultSwiftCompartmentId. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectLifecyclePolicy.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectLifecyclePolicy.java new file mode 100644 index 00000000000..b9b9b61edef --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectLifecyclePolicy.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * The collection of lifecycle policy rules that together form the object lifecycle policy of a given bucket. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ObjectLifecyclePolicy.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ObjectLifecyclePolicy { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ObjectLifecyclePolicy build() { + ObjectLifecyclePolicy __instance__ = new ObjectLifecyclePolicy(timeCreated, items); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ObjectLifecyclePolicy o) { + Builder copiedBuilder = timeCreated(o.getTimeCreated()).items(o.getItems()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The date and time the object lifecycle policy was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + /** + * The live lifecycle policy on the bucket. + *

+ * For an example of this value, see the + * [PutObjectLifecyclePolicy API documentation](https://docs.us-phoenix-1.oraclecloud.com/iaas/api/#/en/objectstorage/20160918/ObjectLifecyclePolicy/PutObjectLifecyclePolicy). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + java.util.List items; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectLifecycleRule.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectLifecycleRule.java new file mode 100644 index 00000000000..27002e74381 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectLifecycleRule.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, + * talk to an administrator. If you're an administrator who needs to write policies to give users access, see + * [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ObjectLifecycleRule.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ObjectLifecycleRule { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("action") + private String action; + + public Builder action(String action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeAmount") + private Long timeAmount; + + public Builder timeAmount(Long timeAmount) { + this.timeAmount = timeAmount; + this.__explicitlySet__.add("timeAmount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeUnit") + private TimeUnit timeUnit; + + public Builder timeUnit(TimeUnit timeUnit) { + this.timeUnit = timeUnit; + this.__explicitlySet__.add("timeUnit"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + private Boolean isEnabled; + + public Builder isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + this.__explicitlySet__.add("isEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("objectNameFilter") + private ObjectNameFilter objectNameFilter; + + public Builder objectNameFilter(ObjectNameFilter objectNameFilter) { + this.objectNameFilter = objectNameFilter; + this.__explicitlySet__.add("objectNameFilter"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ObjectLifecycleRule build() { + ObjectLifecycleRule __instance__ = + new ObjectLifecycleRule( + name, action, timeAmount, timeUnit, isEnabled, objectNameFilter); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ObjectLifecycleRule o) { + Builder copiedBuilder = + name(o.getName()) + .action(o.getAction()) + .timeAmount(o.getTimeAmount()) + .timeUnit(o.getTimeUnit()) + .isEnabled(o.getIsEnabled()) + .objectNameFilter(o.getObjectNameFilter()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The name of the lifecycle rule to be applied. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + + /** + * The action of the object lifecycle policy rule. Rules using the action 'ARCHIVE' move objects into the + * [Archival Storage tier](https://docs.us-phoenix-1.oraclecloud.com/Content/Archive/Concepts/archivestorageoverview.htm). Rules using the action + * 'DELETE' permanently delete objects from buckets. 'ARCHIVE' and 'DELETE' are the only two supported + * actions at this time. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + String action; + + /** + * Specifies the age of objects to apply the rule to. The timeAmount is interpreted in units defined by the + * timeUnit parameter, and is calculated in relation to each object's Last-Modified time. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAmount") + Long timeAmount; + /** + * The unit that should be used to interpret timeAmount. Days are defined as starting and ending at midnight UTC. + * Years are defined as 365.2425 days long and likewise round up to the next midnight UTC. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum TimeUnit { + Days("DAYS"), + Years("YEARS"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (TimeUnit v : TimeUnit.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + TimeUnit(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static TimeUnit create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'TimeUnit', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The unit that should be used to interpret timeAmount. Days are defined as starting and ending at midnight UTC. + * Years are defined as 365.2425 days long and likewise round up to the next midnight UTC. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeUnit") + TimeUnit timeUnit; + + /** + * A boolean that determines whether this rule is currently enabled. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") + Boolean isEnabled; + + /** + * A filter limiting object names that the rule will apply to. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("objectNameFilter") + ObjectNameFilter objectNameFilter; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectNameFilter.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectNameFilter.java new file mode 100644 index 00000000000..1e47157a2ed --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/ObjectNameFilter.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * A filter that compares object names to a set of object name prefixes to determine if a rule applies to a + * given object. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ObjectNameFilter.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ObjectNameFilter { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("inclusionPrefixes") + private java.util.List inclusionPrefixes; + + public Builder inclusionPrefixes(java.util.List inclusionPrefixes) { + this.inclusionPrefixes = inclusionPrefixes; + this.__explicitlySet__.add("inclusionPrefixes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ObjectNameFilter build() { + ObjectNameFilter __instance__ = new ObjectNameFilter(inclusionPrefixes); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ObjectNameFilter o) { + Builder copiedBuilder = inclusionPrefixes(o.getInclusionPrefixes()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * An array of object name prefixes that the rule will apply to. An empty array means to include all objects. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("inclusionPrefixes") + java.util.List inclusionPrefixes; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PreauthenticatedRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PreauthenticatedRequest.java index 37da385088f..8716b81b122 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PreauthenticatedRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PreauthenticatedRequest.java @@ -6,7 +6,7 @@ /** * Pre-authenticated requests provide a way to let users access a bucket or an object without having their own credentials. * When you create a pre-authenticated request, a unique URL is generated. Users in your organization, partners, or third - * parties can use this URL to access the targets identified in the pre-authenticated request. See [Using Pre-Authenticated Requests](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/usingpreauthenticatedrequests.htm). + * parties can use this URL to access the targets identified in the pre-authenticated request. See [Managing Access to Buckets and Objects](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm). *

* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. * If you're an administrator who needs to write policies to give users access, see [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PutObjectLifecyclePolicyDetails.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PutObjectLifecyclePolicyDetails.java new file mode 100644 index 00000000000..43a462e7a36 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/PutObjectLifecyclePolicyDetails.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * Creates a new object lifecycle policy for a bucket. + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = PutObjectLifecyclePolicyDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class PutObjectLifecyclePolicyDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PutObjectLifecyclePolicyDetails build() { + PutObjectLifecyclePolicyDetails __instance__ = + new PutObjectLifecyclePolicyDetails(items); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PutObjectLifecyclePolicyDetails o) { + Builder copiedBuilder = items(o.getItems()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The bucket's set of lifecycle policy rules. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("items") + java.util.List items; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/RestoreObjectsDetails.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/RestoreObjectsDetails.java index 78df8df5026..2a2b7f69c0b 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/RestoreObjectsDetails.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/RestoreObjectsDetails.java @@ -68,14 +68,14 @@ public static Builder builder() { } /** - * A object which was in an archived state and need to be restored. + * An object which is in archive-tier storage and needs to be restored. **/ @com.fasterxml.jackson.annotation.JsonProperty("objectName") String objectName; /** * The number of hours for which this object will be restored. - * By default object will be restored for 24 hours.It can be configured using hours parameter. + * By default objects will be restored for 24 hours. Duration can be configured using the hours parameter. * **/ @com.fasterxml.jackson.annotation.JsonProperty("hours") diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequest.java new file mode 100644 index 00000000000..1367ff852e8 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequest.java @@ -0,0 +1,306 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * A description of workRequest status + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequest.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class WorkRequest { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequest build() { + WorkRequest __instance__ = + new WorkRequest( + operationType, + status, + id, + compartmentId, + resources, + percentComplete, + timeAccepted, + timeStarted, + timeFinished); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequest o) { + Builder copiedBuilder = + operationType(o.getOperationType()) + .status(o.getStatus()) + .id(o.getId()) + .compartmentId(o.getCompartmentId()) + .resources(o.getResources()) + .percentComplete(o.getPercentComplete()) + .timeAccepted(o.getTimeAccepted()) + .timeStarted(o.getTimeStarted()) + .timeFinished(o.getTimeFinished()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * type of the work request + **/ + @lombok.extern.slf4j.Slf4j + public enum OperationType { + CopyObject("COPY_OBJECT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationType v : OperationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OperationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OperationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + OperationType operationType; + /** + * status of current work request. + **/ + @lombok.extern.slf4j.Slf4j + public enum Status { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + Completed("COMPLETED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + Status status; + + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + @com.fasterxml.jackson.annotation.JsonProperty("resources") + java.util.List resources; + + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + Float percentComplete; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + java.util.Date timeAccepted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + java.util.Date timeStarted; + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + java.util.Date timeFinished; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestError.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestError.java new file mode 100644 index 00000000000..405794cd9a5 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestError.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequestError.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class WorkRequestError { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("code") + private String code; + + public Builder code(String code) { + this.code = code; + this.__explicitlySet__.add("code"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestError build() { + WorkRequestError __instance__ = new WorkRequestError(code, message, timestamp); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestError o) { + Builder copiedBuilder = + code(o.getCode()).message(o.getMessage()).timestamp(o.getTimestamp()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A machine-usable code for the error that occured. Error codes are listed on + * (https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm) + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + String code; + + /** + * A human readable description of the issue encountered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + String message; + + /** + * The time the error happened + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + java.util.Date timestamp; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestLogEntry.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestLogEntry.java new file mode 100644 index 00000000000..d0408db99c6 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestLogEntry.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntry.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class WorkRequestLogEntry { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestLogEntry build() { + WorkRequestLogEntry __instance__ = new WorkRequestLogEntry(message, timestamp); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestLogEntry o) { + Builder copiedBuilder = message(o.getMessage()).timestamp(o.getTimestamp()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Human-readable log message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + String message; + + /** + * The time the log message was written. An RFC3339 formatted datetime string + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + java.util.Date timestamp; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestResource.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestResource.java new file mode 100644 index 00000000000..a28b8f7194d --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestResource.java @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestResource.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class WorkRequestResource { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + public Builder entityType(String entityType) { + this.entityType = entityType; + this.__explicitlySet__.add("entityType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private String identifier; + + public Builder identifier(String identifier) { + this.identifier = identifier; + this.__explicitlySet__.add("identifier"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private String entityUri; + + public Builder entityUri(String entityUri) { + this.entityUri = entityUri; + this.__explicitlySet__.add("entityUri"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + public Builder metadata(java.util.Map metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestResource build() { + WorkRequestResource __instance__ = + new WorkRequestResource( + actionType, entityType, identifier, entityUri, metadata); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestResource o) { + Builder copiedBuilder = + actionType(o.getActionType()) + .entityType(o.getEntityType()) + .identifier(o.getIdentifier()) + .entityUri(o.getEntityUri()) + .metadata(o.getMetadata()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The status that a work request can present + **/ + @lombok.extern.slf4j.Slf4j + public enum ActionType { + Created("CREATED"), + Updated("UPDATED"), + Deleted("DELETED"), + Related("RELATED"), + InProgress("IN_PROGRESS"), + Read("READ"), + Written("WRITTEN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The status that a work request can present + **/ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + ActionType actionType; + + /** + * The resource type the work request is affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + String entityType; + + /** + * The identifier of the resource the work request affects. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + String identifier; + + /** + * The URI path that the user can do a GET on to access the resource metadata + **/ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + String entityUri; + + /** + * The metadata of the resource. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + java.util.Map metadata; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestResourceMetadataKey.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestResourceMetadataKey.java new file mode 100644 index 00000000000..b5c5ed4ba31 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestResourceMetadataKey.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * The keys of WorkRequestResource metadata. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +public enum WorkRequestResourceMetadataKey { + Region("REGION"), + Namespace("NAMESPACE"), + Bucket("BUCKET"), + Object("OBJECT"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WorkRequestResourceMetadataKey v : WorkRequestResourceMetadataKey.values()) { + map.put(v.getValue(), v); + } + } + + WorkRequestResourceMetadataKey(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public static WorkRequestResourceMetadataKey create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid WorkRequestResourceMetadataKey: " + key); + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestSummary.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestSummary.java new file mode 100644 index 00000000000..cbe9e764201 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/model/WorkRequestSummary.java @@ -0,0 +1,308 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.model; + +/** + * A summary of workRequest status + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields + * that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in + * the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called + * {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take + * {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__} + * (since the constructor cannot distinguish explicit {@code null} from unset {@code null}). + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class WorkRequestSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("status") + private Status status; + + public Builder status(Status status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestSummary build() { + WorkRequestSummary __instance__ = + new WorkRequestSummary( + operationType, + status, + id, + compartmentId, + resources, + percentComplete, + timeAccepted, + timeStarted, + timeFinished); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestSummary o) { + Builder copiedBuilder = + operationType(o.getOperationType()) + .status(o.getStatus()) + .id(o.getId()) + .compartmentId(o.getCompartmentId()) + .resources(o.getResources()) + .percentComplete(o.getPercentComplete()) + .timeAccepted(o.getTimeAccepted()) + .timeStarted(o.getTimeStarted()) + .timeFinished(o.getTimeFinished()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * type of the work request + **/ + @lombok.extern.slf4j.Slf4j + public enum OperationType { + CopyObject("COPY_OBJECT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationType v : OperationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OperationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OperationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * type of the work request + **/ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + OperationType operationType; + /** + * status of current work request. + **/ + @lombok.extern.slf4j.Slf4j + public enum Status { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + Completed("COMPLETED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Status v : Status.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Status(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Status create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Status', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * status of current work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("status") + Status status; + + /** + * The id of the work request. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The ocid of the compartment that contains the work request. Work requests should be scoped to + * the same compartment as the resource the work request affects. If the work request affects multiple resources, + * and those resources are not in the same compartment, it is up to the service team to pick the primary + * resource whose compartment should be used + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + @com.fasterxml.jackson.annotation.JsonProperty("resources") + java.util.List resources; + + /** + * Percentage of the request completed. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + Float percentComplete; + + /** + * The date and time the request was created, as described in + * [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + java.util.Date timeAccepted; + + /** + * The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339), + * section 14.29. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + java.util.Date timeStarted; + + /** + * The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + java.util.Date timeFinished; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CancelWorkRequestRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CancelWorkRequestRequest.java new file mode 100644 index 00000000000..fa4905f9b81 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CancelWorkRequestRequest.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CancelWorkRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CancelWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcClientRequestId(o.getOpcClientRequestId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of CancelWorkRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CancelWorkRequestRequest + */ + public CancelWorkRequestRequest build() { + CancelWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CommitMultipartUploadRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CommitMultipartUploadRequest.java index 2db34fc7652..efe05214308 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CommitMultipartUploadRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CommitMultipartUploadRequest.java @@ -47,7 +47,7 @@ public class CommitMultipartUploadRequest extends com.oracle.bmc.requests.BmcReq private String ifMatch; /** - * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. + * The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists. * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CopyObjectRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CopyObjectRequest.java new file mode 100644 index 00000000000..ae78ab7f307 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CopyObjectRequest.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CopyObjectRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The top-level namespace used for the request. + */ + private String namespaceName; + + /** + * The name of the bucket. Avoid entering confidential information. + * Example: `my-new-bucket1` + * + */ + private String bucketName; + + /** + * The source and destination for object to be copied. + */ + private CopyObjectDetails copyObjectDetails; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CopyObjectRequest o) { + namespaceName(o.getNamespaceName()); + bucketName(o.getBucketName()); + copyObjectDetails(o.getCopyObjectDetails()); + opcClientRequestId(o.getOpcClientRequestId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of CopyObjectRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of CopyObjectRequest + */ + public CopyObjectRequest build() { + CopyObjectRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CreateMultipartUploadRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CreateMultipartUploadRequest.java index b42ee94193b..d4413cc6ae0 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CreateMultipartUploadRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/CreateMultipartUploadRequest.java @@ -35,7 +35,7 @@ public class CreateMultipartUploadRequest extends com.oracle.bmc.requests.BmcReq private String ifMatch; /** - * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. + * The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists. * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/DeleteObjectLifecyclePolicyRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/DeleteObjectLifecyclePolicyRequest.java new file mode 100644 index 00000000000..518536344b4 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/DeleteObjectLifecyclePolicyRequest.java @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class DeleteObjectLifecyclePolicyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The top-level namespace used for the request. + */ + private String namespaceName; + + /** + * The name of the bucket. Avoid entering confidential information. + * Example: `my-new-bucket1` + * + */ + private String bucketName; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + /** + * The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + * For uploading a part, this is the entity tag of the target part. + * + */ + private String ifMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteObjectLifecyclePolicyRequest o) { + namespaceName(o.getNamespaceName()); + bucketName(o.getBucketName()); + opcClientRequestId(o.getOpcClientRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of DeleteObjectLifecyclePolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of DeleteObjectLifecyclePolicyRequest + */ + public DeleteObjectLifecyclePolicyRequest build() { + DeleteObjectLifecyclePolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetBucketRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetBucketRequest.java index 10a94b75b23..0dad33d6b51 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetBucketRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetBucketRequest.java @@ -30,7 +30,7 @@ public class GetBucketRequest extends com.oracle.bmc.requests.BmcRequest { private String ifMatch; /** - * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. + * The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists. * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetObjectLifecyclePolicyRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetObjectLifecyclePolicyRequest.java new file mode 100644 index 00000000000..1f7945bf43b --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetObjectLifecyclePolicyRequest.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetObjectLifecyclePolicyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The top-level namespace used for the request. + */ + private String namespaceName; + + /** + * The name of the bucket. Avoid entering confidential information. + * Example: `my-new-bucket1` + * + */ + private String bucketName; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetObjectLifecyclePolicyRequest o) { + namespaceName(o.getNamespaceName()); + bucketName(o.getBucketName()); + opcClientRequestId(o.getOpcClientRequestId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of GetObjectLifecyclePolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetObjectLifecyclePolicyRequest + */ + public GetObjectLifecyclePolicyRequest build() { + GetObjectLifecyclePolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetObjectRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetObjectRequest.java index 2edf0e697ce..b4bfd752597 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetObjectRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetObjectRequest.java @@ -37,7 +37,7 @@ public class GetObjectRequest extends com.oracle.bmc.requests.BmcRequest { private String ifMatch; /** - * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. + * The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists. * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetWorkRequestRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetWorkRequestRequest.java new file mode 100644 index 00000000000..85b04f42879 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/GetWorkRequestRequest.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetWorkRequestRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcClientRequestId(o.getOpcClientRequestId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of GetWorkRequestRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of GetWorkRequestRequest + */ + public GetWorkRequestRequest build() { + GetWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/HeadBucketRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/HeadBucketRequest.java index 2ecc2304191..71894b10c6a 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/HeadBucketRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/HeadBucketRequest.java @@ -30,7 +30,7 @@ public class HeadBucketRequest extends com.oracle.bmc.requests.BmcRequest { private String ifMatch; /** - * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. + * The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists. * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/HeadObjectRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/HeadObjectRequest.java index 9f4f62ec904..adb87f84c14 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/HeadObjectRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/HeadObjectRequest.java @@ -37,7 +37,7 @@ public class HeadObjectRequest extends com.oracle.bmc.requests.BmcRequest { private String ifMatch; /** - * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. + * The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists. * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestErrorsRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestErrorsRequest.java new file mode 100644 index 00000000000..88245ed2b26 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestErrorsRequest.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListWorkRequestErrorsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The page at which to start retrieving results. + */ + private String page; + + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestErrorsRequest o) { + workRequestId(o.getWorkRequestId()); + page(o.getPage()); + limit(o.getLimit()); + opcClientRequestId(o.getOpcClientRequestId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of ListWorkRequestErrorsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestErrorsRequest + */ + public ListWorkRequestErrorsRequest build() { + ListWorkRequestErrorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestLogsRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestLogsRequest.java new file mode 100644 index 00000000000..63bd30de4fd --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestLogsRequest.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListWorkRequestLogsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the asynchronous request. + */ + private String workRequestId; + + /** + * The page at which to start retrieving results. + */ + private String page; + + /** + * The maximum number of items to return. + */ + private Integer limit; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestLogsRequest o) { + workRequestId(o.getWorkRequestId()); + page(o.getPage()); + limit(o.getLimit()); + opcClientRequestId(o.getOpcClientRequestId()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of ListWorkRequestLogsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestLogsRequest + */ + public ListWorkRequestLogsRequest build() { + ListWorkRequestLogsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestsRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestsRequest.java new file mode 100644 index 00000000000..fa42220cf61 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/ListWorkRequestsRequest.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListWorkRequestsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The ID of the compartment in which to list buckets. + */ + private String compartmentId; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + /** + * The page at which to start retrieving results. + */ + private String page; + + /** + * The maximum number of items to return. + */ + private Integer limit; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestsRequest o) { + compartmentId(o.getCompartmentId()); + opcClientRequestId(o.getOpcClientRequestId()); + page(o.getPage()); + limit(o.getLimit()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of ListWorkRequestsRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of ListWorkRequestsRequest + */ + public ListWorkRequestsRequest build() { + ListWorkRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectLifecyclePolicyRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectLifecyclePolicyRequest.java new file mode 100644 index 00000000000..b63fcee9864 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectLifecyclePolicyRequest.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.requests; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class PutObjectLifecyclePolicyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The top-level namespace used for the request. + */ + private String namespaceName; + + /** + * The name of the bucket. Avoid entering confidential information. + * Example: `my-new-bucket1` + * + */ + private String bucketName; + + /** + * The lifecycle policy to apply to the bucket. + */ + private PutObjectLifecyclePolicyDetails putObjectLifecyclePolicyDetails; + + /** + * The client request ID for tracing. + */ + private String opcClientRequestId; + + /** + * The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + * For uploading a part, this is the entity tag of the target part. + * + */ + private String ifMatch; + + /** + * The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists. + * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. + * + */ + private String ifNoneMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + + /** + * Set the invocation callback for the request to be built. + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.util.internal.Consumer + invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PutObjectLifecyclePolicyRequest o) { + namespaceName(o.getNamespaceName()); + bucketName(o.getBucketName()); + putObjectLifecyclePolicyDetails(o.getPutObjectLifecyclePolicyDetails()); + opcClientRequestId(o.getOpcClientRequestId()); + ifMatch(o.getIfMatch()); + ifNoneMatch(o.getIfNoneMatch()); + invocationCallback(o.getInvocationCallback()); + return this; + } + + /** + * Build the instance of PutObjectLifecyclePolicyRequest as configured by this builder + * + * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + * This is the preferred method to build an instance. + * + * @return instance of PutObjectLifecyclePolicyRequest + */ + public PutObjectLifecyclePolicyRequest build() { + PutObjectLifecyclePolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + return request; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java index d25aaf5e355..35c0d8d53a2 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/PutObjectRequest.java @@ -47,7 +47,7 @@ public class PutObjectRequest extends com.oracle.bmc.requests.BmcRequest { private String ifMatch; /** - * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. + * The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists. * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/UploadPartRequest.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/UploadPartRequest.java index dbcc5d31465..5eb21b2ff26 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/UploadPartRequest.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/requests/UploadPartRequest.java @@ -62,7 +62,7 @@ public class UploadPartRequest extends com.oracle.bmc.requests.BmcRequest { private String ifMatch; /** - * The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists. + * The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists. * For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part. * */ diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CancelWorkRequestResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CancelWorkRequestResponse.java new file mode 100644 index 00000000000..4947d466d92 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CancelWorkRequestResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CancelWorkRequestResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, + * provide this request ID. + * + */ + private String opcRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CancelWorkRequestResponse o) { + opcRequestId(o.getOpcRequestId()); + opcClientRequestId(o.getOpcClientRequestId()); + + return this; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CommitMultipartUploadResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CommitMultipartUploadResponse.java index d642ebaf917..7f95929f116 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CommitMultipartUploadResponse.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CommitMultipartUploadResponse.java @@ -26,8 +26,7 @@ public class CommitMultipartUploadResponse { * Base-64 representation of the multipart object hash. * The multipart object hash is calculated by taking the MD5 hashes of the parts passed to this call, * concatenating the binary representation of those hashes in order of their part numbers, - * and then calculating the MD5 hash of the concatenated values. The multipart object hash is followed - * by a hyphen and the total number of parts (for example, '-6'). + * and then calculating the MD5 hash of the concatenated values. * */ private String opcMultipartMd5; diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CopyObjectResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CopyObjectResponse.java new file mode 100644 index 00000000000..1d4588bf09a --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/CopyObjectResponse.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CopyObjectResponse { + + /** + * Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + * particular request, provide this request ID. + * + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + * + */ + private String opcRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CopyObjectResponse o) { + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + opcClientRequestId(o.getOpcClientRequestId()); + + return this; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/DeleteObjectLifecyclePolicyResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/DeleteObjectLifecyclePolicyResponse.java new file mode 100644 index 00000000000..31464840339 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/DeleteObjectLifecyclePolicyResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteObjectLifecyclePolicyResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, + * provide this request ID. + * + */ + private String opcRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteObjectLifecyclePolicyResponse o) { + opcRequestId(o.getOpcRequestId()); + opcClientRequestId(o.getOpcClientRequestId()); + + return this; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectLifecyclePolicyResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectLifecyclePolicyResponse.java new file mode 100644 index 00000000000..91cf9488b36 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetObjectLifecyclePolicyResponse.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetObjectLifecyclePolicyResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, + * provide this request ID. + * + */ + private String opcRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * The entity tag for the object lifecycle policy. + */ + private String eTag; + + /** + * The returned ObjectLifecyclePolicy instance. + */ + private ObjectLifecyclePolicy objectLifecyclePolicy; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetObjectLifecyclePolicyResponse o) { + opcRequestId(o.getOpcRequestId()); + opcClientRequestId(o.getOpcClientRequestId()); + eTag(o.getETag()); + objectLifecyclePolicy(o.getObjectLifecyclePolicy()); + + return this; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetWorkRequestResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetWorkRequestResponse.java new file mode 100644 index 00000000000..ae51bfc6d48 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/GetWorkRequestResponse.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetWorkRequestResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + */ + private String opcRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * some decimal number representing the number of seconds the client should wait before polling this endpoint again + */ + private Float retryAfter; + + /** + * The returned WorkRequest instance. + */ + private WorkRequest workRequest; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetWorkRequestResponse o) { + opcRequestId(o.getOpcRequestId()); + opcClientRequestId(o.getOpcClientRequestId()); + retryAfter(o.getRetryAfter()); + workRequest(o.getWorkRequest()); + + return this; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListBucketsResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListBucketsResponse.java index e3069336d7f..dd68a0d5bf7 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListBucketsResponse.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListBucketsResponse.java @@ -23,12 +23,10 @@ public class ListBucketsResponse { private String opcRequestId; /** - * Paginating a list of items. - * In the GET request, set the limit to the number of buckets items that you want returned in the response. - * If the opc-next-page header appears in the response, then this is a partial list and there are additional - * buckets to get. Include the header's value as the `page` parameter in the subsequent GET request to get the - * next batch of buckets. Repeat this process to retrieve the entire list of buckets. - * By default, the page limit is set to 25 buckets per page, but you can specify a value from 1 to 1000. + * For pagination of a list of `Bucket`s. If this header appears in the response, then this + * is a partial list of buckets. Include this value as the `page` parameter in a subsequent + * GET request to get the next batch of buckets. For information about pagination, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadPartsResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadPartsResponse.java index cd733238f05..ff74bbdf496 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadPartsResponse.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadPartsResponse.java @@ -23,11 +23,10 @@ public class ListMultipartUploadPartsResponse { private String opcRequestId; /** - * Paginating a list of items. - * In the GET request, set the limit to the number of object parts that you want returned in the response. If - * the opc-next-page header appears in the response, then this is a partial list and there are additional object - * parts to get. Include the header's value as the `page` parameter in the subsequent GET request to get the next - * batch of object parts. Repeat this process to retrieve the entire list of object parts. + * For pagination of a list of `MultipartUploadPartSummary`s. If this header appears in the response, + * then this is a partial list of object parts. Include this value as the `page` parameter in a subsequent + * GET request to get the next batch of object parts. For information about pagination, see + * [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). * */ private String opcNextPage; diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadsResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadsResponse.java index 1debf29336c..cabfff2b92d 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadsResponse.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListMultipartUploadsResponse.java @@ -23,12 +23,9 @@ public class ListMultipartUploadsResponse { private String opcRequestId; /** - * Paginating a list of items. - * In the GET request, set the limit to the number of objects that you want returned in the response. - * If the opc-next-page header appears in the response, then this is a partial list and there - * are additional objects to get. Include the header's value as the `page` parameter in the subsequent - * GET request to get the next batch of objects. Repeat this process to retrieve the entire list of - * objects. + * For pagination of a list of `MultipartUpload`s. If this header appears in the response, then + * this is a partial list of multipart uploads. Include this value as the `page` parameter in a subsequent + * GET request. For information about pagination, see [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). * */ private String opcNextPage; diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListPreauthenticatedRequestsResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListPreauthenticatedRequestsResponse.java index d28f99a01d1..16398d632de 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListPreauthenticatedRequestsResponse.java +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListPreauthenticatedRequestsResponse.java @@ -23,12 +23,10 @@ public class ListPreauthenticatedRequestsResponse { private String opcRequestId; /** - * Paginating a list of items. - * In the GET request, set the limit to the number of pre-authenticated requests that you want returned in - * the response. If the opc-next-page header appears in the response, then this is a partial list and there - * are additional pre-authenticated requests to get. Include the header's value as the `page` parameter in - * the subsequent GET request to get the next batch of pre-authenticated requests. Repeat this process to - * retrieve the entire list of pre-authenticated requests. + * For pagination of a list of pre-authenticated requests, if this header appears in the response, + * then this is a partial list. Include this value as the `page` parameter in a subsequent + * GET request to get the next batch of pre-authenticated requests. + * For information about pagination, see [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#nine). * */ private String opcNextPage; diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListWorkRequestErrorsResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListWorkRequestErrorsResponse.java new file mode 100644 index 00000000000..aa293e5f7f8 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListWorkRequestErrorsResponse.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListWorkRequestErrorsResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + */ + private String opcRequestId; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the `page` parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging.n + */ + private String opcClientRequestId; + + /** + * A list of WorkRequestError instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestErrorsResponse o) { + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcClientRequestId(o.getOpcClientRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListWorkRequestLogsResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListWorkRequestLogsResponse.java new file mode 100644 index 00000000000..1a971f9efa6 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListWorkRequestLogsResponse.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListWorkRequestLogsResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + */ + private String opcRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging.n + */ + private String opcClientRequestId; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the `page` parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * A list of WorkRequestLogEntry instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestLogsResponse o) { + opcRequestId(o.getOpcRequestId()); + opcClientRequestId(o.getOpcClientRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListWorkRequestsResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListWorkRequestsResponse.java new file mode 100644 index 00000000000..9455e2cd434 --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/ListWorkRequestsResponse.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListWorkRequestsResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular. + * + */ + private String opcRequestId; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the response, + * then a partial list might have been returned. Include this value as the `page` parameter for the + * subsequent GET request to get the next batch of items. + * + */ + private String opcNextPage; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * A list of WorkRequestSummary instances. + */ + private java.util.List items; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWorkRequestsResponse o) { + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + opcClientRequestId(o.getOpcClientRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/PutObjectLifecyclePolicyResponse.java b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/PutObjectLifecyclePolicyResponse.java new file mode 100644 index 00000000000..b17c2ac57bf --- /dev/null +++ b/bmc-objectstorage/bmc-objectstorage-generated/src/main/java/com/oracle/bmc/objectstorage/responses/PutObjectLifecyclePolicyResponse.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.objectstorage.responses; + +import com.oracle.bmc.objectstorage.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class PutObjectLifecyclePolicyResponse { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, + * provide this request ID. + * + */ + private String opcRequestId; + + /** + * Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + */ + private String opcClientRequestId; + + /** + * The entity tag for the object lifecycle policy. + */ + private String eTag; + + /** + * The returned ObjectLifecyclePolicy instance. + */ + private ObjectLifecyclePolicy objectLifecyclePolicy; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PutObjectLifecyclePolicyResponse o) { + opcRequestId(o.getOpcRequestId()); + opcClientRequestId(o.getOpcClientRequestId()); + eTag(o.getETag()); + objectLifecyclePolicy(o.getObjectLifecyclePolicy()); + + return this; + } + } +} diff --git a/bmc-objectstorage/pom.xml b/bmc-objectstorage/pom.xml index cdd458853b2..91bed6017a7 100644 --- a/bmc-objectstorage/pom.xml +++ b/bmc-objectstorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml diff --git a/bmc-resourcesearch/pom.xml b/bmc-resourcesearch/pom.xml index 0988709fd49..acc147c5052 100644 --- a/bmc-resourcesearch/pom.xml +++ b/bmc-resourcesearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml oci-java-sdk-resourcesearch @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.2.47 + 1.2.48 \ No newline at end of file diff --git a/bmc-shaded/bmc-shaded-full/pom.xml b/bmc-shaded/bmc-shaded-full/pom.xml index 386b6db7491..d25c9328fea 100644 --- a/bmc-shaded/bmc-shaded-full/pom.xml +++ b/bmc-shaded/bmc-shaded-full/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk-shaded - 1.2.47 + 1.2.48 ../pom.xml oci-java-sdk-shaded-full diff --git a/bmc-shaded/pom.xml b/bmc-shaded/pom.xml index 60b654a35e1..afa518f4660 100644 --- a/bmc-shaded/pom.xml +++ b/bmc-shaded/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 ../pom.xml diff --git a/pom.xml b/pom.xml index e9c67cd967f..16752398af9 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.oracle.oci.sdk oci-java-sdk - 1.2.47 + 1.2.48 pom Oracle Cloud Infrastructure SDK This project contains the SDK used for Oracle Cloud Infrastructure