From cfe15f356baa46dc9449a317eed78350123f8eec Mon Sep 17 00:00:00 2001 From: Andy Miles Date: Tue, 20 Aug 2019 16:09:28 +0000 Subject: [PATCH] Releasing version 1.6.1 --- CHANGELOG.md | 12 + .../bmc-apache-connector-provider/pom.xml | 15 +- .../bmc-resteasy-client-configurator/pom.xml | 4 +- bmc-addons/pom.xml | 2 +- bmc-announcementsservice/pom.xml | 4 +- bmc-audit/pom.xml | 4 +- bmc-autoscaling/pom.xml | 4 +- bmc-bom/pom.xml | 60 +- bmc-budget/pom.xml | 4 +- bmc-common/pom.xml | 2 +- .../signing/internal/RequestSignerImpl.java | 20 +- .../internal/RequestSignerImplTest.java | 215 +- bmc-containerengine/pom.xml | 4 +- bmc-core/pom.xml | 6 +- .../oracle/bmc/core/ComputeManagement.java | 15 +- .../bmc/core/ComputeManagementAsync.java | 15 +- .../com/oracle/bmc/core/VirtualNetwork.java | 62 + .../oracle/bmc/core/VirtualNetworkAsync.java | 104 + .../bmc/core/VirtualNetworkAsyncClient.java | 476 ++++ .../oracle/bmc/core/VirtualNetworkClient.java | 177 ++ ...ChangeDhcpOptionsCompartmentConverter.java | 115 + ...geInternetGatewayCompartmentConverter.java | 116 + ...calPeeringGatewayCompartmentConverter.java | 117 + ...workSecurityGroupCompartmentConverter.java | 117 + .../ChangePublicIpCompartmentConverter.java | 114 + .../core/model/AddSecurityRuleDetails.java | 8 +- .../bmc/core/model/AttachVnicDetails.java | 1 + .../model/CaptureConsoleHistoryDetails.java | 1 + .../ChangeDhcpOptionsCompartmentDetails.java | 72 + ...angeInternetGatewayCompartmentDetails.java | 72 + ...LocalPeeringGatewayCompartmentDetails.java | 72 + ...etworkSecurityGroupCompartmentDetails.java | 72 + .../ChangePublicIpCompartmentDetails.java | 72 + .../model/CreateDrgAttachmentDetails.java | 6 +- .../bmc/core/model/CreateImageDetails.java | 2 +- .../CreateInstanceConfigurationBase.java | 8 +- .../CreateInstanceConfigurationDetails.java | 2 +- ...tanceConfigurationFromInstanceDetails.java | 5 +- .../core/model/CreateInstancePoolDetails.java | 4 +- .../CreateLocalPeeringGatewayDetails.java | 2 +- .../model/CreateServiceGatewayDetails.java | 2 +- .../model/CreateVolumeGroupBackupDetails.java | 4 +- .../core/model/CreateVolumeGroupDetails.java | 2 +- .../bmc/core/model/CrossConnectMapping.java | 4 + .../oracle/bmc/core/model/DrgAttachment.java | 9 +- .../bmc/core/model/EgressSecurityRule.java | 1 + .../java/com/oracle/bmc/core/model/Image.java | 2 + .../bmc/core/model/IngressSecurityRule.java | 3 +- .../bmc/core/model/InstanceConfiguration.java | 17 +- .../java/com/oracle/bmc/core/model/Ipv6.java | 2 + .../oracle/bmc/core/model/LaunchOptions.java | 10 +- .../bmc/core/model/LocalPeeringGateway.java | 7 +- .../com/oracle/bmc/core/model/RouteRule.java | 3 +- .../oracle/bmc/core/model/SecurityRule.java | 6 +- .../oracle/bmc/core/model/ServiceGateway.java | 7 +- .../com/oracle/bmc/core/model/Subnet.java | 3 +- .../model/UpdateConsoleHistoryDetails.java | 1 + .../model/UpdateDrgAttachmentDetails.java | 9 +- .../core/model/UpdateInstancePoolDetails.java | 4 +- .../UpdateLocalPeeringGatewayDetails.java | 7 +- .../UpdateNetworkSecurityGroupDetails.java | 2 + .../core/model/UpdateSecurityRuleDetails.java | 8 +- .../model/UpdateServiceGatewayDetails.java | 7 +- .../bmc/core/model/UpdateVnicDetails.java | 2 + .../core/model/UpdateVolumeBackupDetails.java | 2 +- .../model/UpdateVolumeGroupBackupDetails.java | 3 +- .../core/model/UpdateVolumeGroupDetails.java | 3 +- .../java/com/oracle/bmc/core/model/Vcn.java | 3 +- .../ChangeDhcpOptionsCompartmentRequest.java | 99 + ...angeInternetGatewayCompartmentRequest.java | 99 + ...LocalPeeringGatewayCompartmentRequest.java | 101 + ...etworkSecurityGroupCompartmentRequest.java | 102 + .../ChangePublicIpCompartmentRequest.java | 99 + .../ChangeDhcpOptionsCompartmentResponse.java | 38 + .../ChangeInstanceCompartmentResponse.java | 2 +- ...ngeInternetGatewayCompartmentResponse.java | 38 + ...ocalPeeringGatewayCompartmentResponse.java | 38 + ...tworkSecurityGroupCompartmentResponse.java | 38 + .../ChangePublicIpCompartmentResponse.java | 38 + .../ChangeSubnetCompartmentResponse.java | 2 +- .../ChangeVcnCompartmentResponse.java | 2 +- .../core/responses/CreateImageResponse.java | 2 +- .../core/responses/ExportImageResponse.java | 2 +- .../responses/LaunchInstanceResponse.java | 2 +- bmc-database/pom.xml | 4 +- bmc-dns/pom.xml | 4 +- bmc-dts/pom.xml | 4 +- bmc-email/pom.xml | 4 +- bmc-events/pom.xml | 4 +- bmc-examples/pom.xml | 4 +- bmc-examples/src/main/java/BudgetExample.java | 2 - ...ailsProviderWithResteasyClientExample.java | 8 +- .../src/main/java/MoveCompartmentExample.java | 1 - .../src/main/java/ResteasyClientExample.java | 6 +- ...esteasyClientWithObjectStorageExample.java | 28 +- .../src/main/java/WaasAddressListExample.java | 205 ++ .../java/WaasCustomProtectionRuleExample.java | 224 ++ .../src/main/java/WaasServiceExample.java | 167 +- bmc-filestorage/pom.xml | 4 +- .../model/CreateFileSystemDetails.java | 22 +- .../bmc/filestorage/model/FileSystem.java | 22 +- .../filestorage/model/FileSystemSummary.java | 22 +- .../model/UpdateFileSystemDetails.java | 24 +- bmc-full/pom.xml | 4 +- bmc-functions/pom.xml | 4 +- bmc-healthchecks/pom.xml | 4 +- bmc-identity/pom.xml | 4 +- bmc-keymanagement/pom.xml | 4 +- bmc-limits/pom.xml | 4 +- .../java/com/oracle/bmc/limits/Limits.java | 89 + .../com/oracle/bmc/limits/LimitsAsync.java | 110 + .../oracle/bmc/limits/LimitsAsyncClient.java | 603 +++++ .../com/oracle/bmc/limits/LimitsClient.java | 425 +++ .../oracle/bmc/limits/LimitsPaginators.java | 366 +++ .../java/com/oracle/bmc/limits/Quotas.java | 2 +- .../com/oracle/bmc/limits/QuotasAsync.java | 2 +- .../oracle/bmc/limits/QuotasAsyncClient.java | 2 +- .../com/oracle/bmc/limits/QuotasClient.java | 2 +- .../oracle/bmc/limits/QuotasPaginators.java | 2 +- .../com/oracle/bmc/limits/QuotasWaiters.java | 2 +- .../internal/http/CreateQuotaConverter.java | 4 +- .../internal/http/DeleteQuotaConverter.java | 5 +- .../internal/http/GetQuotaConverter.java | 5 +- .../GetResourceAvailabilityConverter.java | 123 + .../http/ListLimitDefinitionsConverter.java | 164 ++ .../http/ListLimitValuesConverter.java | 176 ++ .../internal/http/ListQuotasConverter.java | 28 +- .../internal/http/ListServicesConverter.java | 144 + .../internal/http/UpdateQuotaConverter.java | 5 +- .../bmc/limits/model/CreateQuotaDetails.java | 4 +- .../limits/model/LimitDefinitionSummary.java | 210 ++ .../bmc/limits/model/LimitValueSummary.java | 168 ++ .../com/oracle/bmc/limits/model/Quota.java | 4 +- .../oracle/bmc/limits/model/QuotaSummary.java | 2 +- .../limits/model/ResourceAvailability.java | 88 + .../bmc/limits/model/ServiceSummary.java | 82 + .../bmc/limits/model/UpdateQuotaDetails.java | 4 +- .../limits/requests/CreateQuotaRequest.java | 2 +- .../limits/requests/DeleteQuotaRequest.java | 2 +- .../bmc/limits/requests/GetQuotaRequest.java | 2 +- .../GetResourceAvailabilityRequest.java | 103 + .../requests/ListLimitDefinitionsRequest.java | 197 ++ .../requests/ListLimitValuesRequest.java | 246 ++ .../limits/requests/ListQuotasRequest.java | 8 +- .../limits/requests/ListServicesRequest.java | 185 ++ .../limits/requests/UpdateQuotaRequest.java | 2 +- .../limits/responses/CreateQuotaResponse.java | 6 +- .../limits/responses/DeleteQuotaResponse.java | 6 +- .../limits/responses/GetQuotaResponse.java | 6 +- .../GetResourceAvailabilityResponse.java | 37 + .../ListLimitDefinitionsResponse.java | 46 + .../responses/ListLimitValuesResponse.java | 46 + .../limits/responses/ListQuotasResponse.java | 18 +- .../responses/ListServicesResponse.java | 46 + .../limits/responses/UpdateQuotaResponse.java | 6 +- bmc-loadbalancer/pom.xml | 4 +- bmc-monitoring/pom.xml | 4 +- .../bmc-objectstorage-combined/pom.xml | 6 +- .../bmc-objectstorage-extensions/pom.xml | 6 +- .../bmc-objectstorage-generated/pom.xml | 4 +- bmc-objectstorage/pom.xml | 2 +- bmc-ons/pom.xml | 4 +- bmc-resourcemanager/pom.xml | 4 +- bmc-resourcesearch/pom.xml | 4 +- bmc-shaded/bmc-shaded-full/pom.xml | 2 +- bmc-shaded/pom.xml | 2 +- bmc-streaming/pom.xml | 4 +- .../com/oracle/bmc/streaming/StreamAdmin.java | 47 + .../bmc/streaming/StreamAdminAsync.java | 81 + .../bmc/streaming/StreamAdminAsyncClient.java | 397 +++ .../bmc/streaming/StreamAdminClient.java | 150 ++ .../bmc/streaming/StreamAdminWaiters.java | 96 + .../http/CreateArchiverConverter.java | 109 + .../internal/http/CreateStreamConverter.java | 9 + .../internal/http/DeleteStreamConverter.java | 4 + .../internal/http/GetArchiverConverter.java | 103 + .../internal/http/GetStreamConverter.java | 9 + .../internal/http/StartArchiverConverter.java | 110 + .../internal/http/StopArchiverConverter.java | 110 + .../http/UpdateArchiverConverter.java | 109 + .../internal/http/UpdateStreamConverter.java | 13 + .../oracle/bmc/streaming/model/Archiver.java | 190 ++ .../bmc/streaming/model/ArchiverError.java | 82 + .../model/ArchiverLifecycleState.java | 56 + .../model/ArchiverStartPosition.java | 52 + .../model/CreateArchiverDetails.java | 141 + .../model/UpdateArchiverDetails.java | 140 + .../requests/CreateArchiverRequest.java | 95 + .../requests/DeleteStreamRequest.java | 6 + .../requests/GetArchiverRequest.java | 83 + .../requests/StartArchiverRequest.java | 89 + .../requests/StopArchiverRequest.java | 89 + .../requests/UpdateArchiverRequest.java | 95 + .../requests/UpdateStreamRequest.java | 6 + .../responses/CreateArchiverResponse.java | 43 + .../responses/CreateStreamResponse.java | 6 + .../responses/GetArchiverResponse.java | 43 + .../responses/GetStreamResponse.java | 6 + .../responses/StartArchiverResponse.java | 43 + .../responses/StopArchiverResponse.java | 43 + .../responses/UpdateArchiverResponse.java | 43 + .../responses/UpdateStreamResponse.java | 6 + bmc-waas/pom.xml | 4 +- .../main/java/com/oracle/bmc/waas/Waas.java | 149 ++ .../java/com/oracle/bmc/waas/WaasAsync.java | 279 ++ .../com/oracle/bmc/waas/WaasAsyncClient.java | 2371 +++++++++++++---- .../java/com/oracle/bmc/waas/WaasClient.java | 536 ++++ .../com/oracle/bmc/waas/WaasPaginators.java | 470 ++++ .../java/com/oracle/bmc/waas/WaasWaiters.java | 207 ++ ...ChangeAddressListCompartmentConverter.java | 110 + ...tomProtectionRuleCompartmentConverter.java | 112 + .../http/CreateAddressListConverter.java | 107 + .../CreateCustomProtectionRuleConverter.java | 112 + .../http/DeleteAddressListConverter.java | 101 + .../DeleteCustomProtectionRuleConverter.java | 106 + .../http/GetAddressListConverter.java | 105 + .../GetCustomProtectionRuleConverter.java | 111 + .../http/ListAddressListsConverter.java | 189 ++ .../http/ListCachingRulesConverter.java | 140 + .../ListCustomProtectionRulesConverter.java | 193 ++ ...sPolicyCustomProtectionRulesConverter.java | 165 ++ .../internal/http/PurgeCacheConverter.java | 107 + .../http/UpdateAddressListConverter.java | 111 + .../http/UpdateCachingRulesConverter.java | 116 + .../UpdateCustomProtectionRuleConverter.java | 123 + ...sPolicyCustomProtectionRulesConverter.java | 123 + .../com/oracle/bmc/waas/model/AccessRule.java | 176 +- .../bmc/waas/model/AccessRuleCriteria.java | 20 +- .../oracle/bmc/waas/model/AddressList.java | 215 ++ .../bmc/waas/model/AddressListSummary.java | 200 ++ .../oracle/bmc/waas/model/CachingRule.java | 225 ++ .../bmc/waas/model/CachingRuleCriteria.java | 158 ++ .../bmc/waas/model/CachingRuleSummary.java | 227 ++ .../ChangeAddressListCompartmentDetails.java | 71 + ...ustomProtectionRuleCompartmentDetails.java | 71 + .../waas/model/CreateAddressListDetails.java | 145 + .../CreateCustomProtectionRuleDetails.java | 194 ++ .../waas/model/CreateWaasPolicyDetails.java | 17 + .../bmc/waas/model/CustomProtectionRule.java | 261 ++ .../model/CustomProtectionRuleSetting.java | 129 + .../model/CustomProtectionRuleSummary.java | 200 ++ .../oracle/bmc/waas/model/OriginGroup.java | 67 + .../bmc/waas/model/OriginGroup_origins.java | 84 + .../oracle/bmc/waas/model/PolicyConfig.java | 295 +- .../com/oracle/bmc/waas/model/PurgeCache.java | 67 + .../waas/model/UpdateAddressListDetails.java | 128 + .../UpdateCustomProtectionRuleDetails.java | 173 ++ .../waas/model/UpdateWaasPolicyDetails.java | 17 + .../com/oracle/bmc/waas/model/WaasPolicy.java | 17 + ...WaasPolicyCustomProtectionRuleSummary.java | 165 ++ .../com/oracle/bmc/waas/model/WafConfig.java | 52 + .../bmc/waas/model/WafConfigDetails.java | 52 + .../waas/model/WorkRequestOperationTypes.java | 4 + .../ChangeAddressListCompartmentRequest.java | 99 + ...ustomProtectionRuleCompartmentRequest.java | 102 + .../requests/CreateAddressListRequest.java | 87 + .../CreateCustomProtectionRuleRequest.java | 87 + .../requests/DeleteAddressListRequest.java | 93 + .../DeleteCustomProtectionRuleRequest.java | 93 + .../waas/requests/GetAddressListRequest.java | 80 + .../GetCustomProtectionRuleRequest.java | 80 + .../requests/ListAddressListsRequest.java | 207 ++ .../requests/ListCachingRulesRequest.java | 92 + .../ListCustomProtectionRulesRequest.java | 209 ++ ...aasPolicyCustomProtectionRulesRequest.java | 140 + .../bmc/waas/requests/PurgeCacheRequest.java | 92 + .../requests/UpdateAddressListRequest.java | 92 + .../requests/UpdateCachingRulesRequest.java | 99 + .../UpdateCustomProtectionRuleRequest.java | 99 + ...aasPolicyCustomProtectionRulesRequest.java | 100 + .../ChangeAddressListCompartmentResponse.java | 29 + ...stomProtectionRuleCompartmentResponse.java | 29 + .../responses/CreateAddressListResponse.java | 41 + .../CreateCustomProtectionRuleResponse.java | 41 + .../responses/DeleteAddressListResponse.java | 29 + .../DeleteCustomProtectionRuleResponse.java | 29 + .../responses/GetAddressListResponse.java | 41 + .../GetCustomProtectionRuleResponse.java | 41 + .../responses/ListAddressListsResponse.java | 41 + .../responses/ListCachingRulesResponse.java | 47 + .../ListCustomProtectionRulesResponse.java | 41 + ...asPolicyCustomProtectionRulesResponse.java | 47 + .../waas/responses/PurgeCacheResponse.java | 35 + .../responses/UpdateAddressListResponse.java | 41 + .../responses/UpdateCachingRulesResponse.java | 35 + .../UpdateCustomProtectionRuleResponse.java | 41 + ...asPolicyCustomProtectionRulesResponse.java | 35 + bmc-workrequests/pom.xml | 4 +- pom.xml | 2 +- 289 files changed, 21575 insertions(+), 838 deletions(-) create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeDhcpOptionsCompartmentConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeInternetGatewayCompartmentConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeLocalPeeringGatewayCompartmentConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeNetworkSecurityGroupCompartmentConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangePublicIpCompartmentConverter.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeDhcpOptionsCompartmentDetails.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeInternetGatewayCompartmentDetails.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeLocalPeeringGatewayCompartmentDetails.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeNetworkSecurityGroupCompartmentDetails.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/model/ChangePublicIpCompartmentDetails.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeDhcpOptionsCompartmentRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeInternetGatewayCompartmentRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeLocalPeeringGatewayCompartmentRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeNetworkSecurityGroupCompartmentRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangePublicIpCompartmentRequest.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeDhcpOptionsCompartmentResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeInternetGatewayCompartmentResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeLocalPeeringGatewayCompartmentResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeNetworkSecurityGroupCompartmentResponse.java create mode 100644 bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangePublicIpCompartmentResponse.java create mode 100644 bmc-examples/src/main/java/WaasAddressListExample.java create mode 100644 bmc-examples/src/main/java/WaasCustomProtectionRuleExample.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/Limits.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsAsync.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsAsyncClient.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsClient.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsPaginators.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/GetResourceAvailabilityConverter.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitDefinitionsConverter.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitValuesConverter.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListServicesConverter.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/model/LimitDefinitionSummary.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/model/LimitValueSummary.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/model/ResourceAvailability.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/model/ServiceSummary.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/requests/GetResourceAvailabilityRequest.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitDefinitionsRequest.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitValuesRequest.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListServicesRequest.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/responses/GetResourceAvailabilityResponse.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListLimitDefinitionsResponse.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListLimitValuesResponse.java create mode 100644 bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListServicesResponse.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateArchiverConverter.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetArchiverConverter.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/StartArchiverConverter.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/StopArchiverConverter.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateArchiverConverter.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/Archiver.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverError.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverLifecycleState.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverStartPosition.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateArchiverDetails.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateArchiverDetails.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateArchiverRequest.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetArchiverRequest.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/StartArchiverRequest.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/StopArchiverRequest.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateArchiverRequest.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateArchiverResponse.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetArchiverResponse.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/StartArchiverResponse.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/StopArchiverResponse.java create mode 100644 bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateArchiverResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ChangeAddressListCompartmentConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ChangeCustomProtectionRuleCompartmentConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/CreateAddressListConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/CreateCustomProtectionRuleConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/DeleteAddressListConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/DeleteCustomProtectionRuleConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/GetAddressListConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/GetCustomProtectionRuleConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListAddressListsConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListCachingRulesConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListCustomProtectionRulesConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListWaasPolicyCustomProtectionRulesConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/PurgeCacheConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateAddressListConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateCachingRulesConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateCustomProtectionRuleConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateWaasPolicyCustomProtectionRulesConverter.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/AddressList.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/AddressListSummary.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/CachingRule.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/CachingRuleCriteria.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/CachingRuleSummary.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/ChangeAddressListCompartmentDetails.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/ChangeCustomProtectionRuleCompartmentDetails.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/CreateAddressListDetails.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/CreateCustomProtectionRuleDetails.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/CustomProtectionRule.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/CustomProtectionRuleSetting.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/CustomProtectionRuleSummary.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/OriginGroup.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/OriginGroup_origins.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/PurgeCache.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/UpdateAddressListDetails.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/UpdateCustomProtectionRuleDetails.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/model/WaasPolicyCustomProtectionRuleSummary.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ChangeAddressListCompartmentRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ChangeCustomProtectionRuleCompartmentRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/CreateAddressListRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/CreateCustomProtectionRuleRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/DeleteAddressListRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/DeleteCustomProtectionRuleRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/GetAddressListRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/GetCustomProtectionRuleRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListAddressListsRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListCachingRulesRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListCustomProtectionRulesRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListWaasPolicyCustomProtectionRulesRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/PurgeCacheRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateAddressListRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateCachingRulesRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateCustomProtectionRuleRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateWaasPolicyCustomProtectionRulesRequest.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ChangeAddressListCompartmentResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ChangeCustomProtectionRuleCompartmentResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/CreateAddressListResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/CreateCustomProtectionRuleResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/DeleteAddressListResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/DeleteCustomProtectionRuleResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/GetAddressListResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/GetCustomProtectionRuleResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListAddressListsResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListCachingRulesResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListCustomProtectionRulesResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListWaasPolicyCustomProtectionRulesResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/PurgeCacheResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateAddressListResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateCachingRulesResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateCustomProtectionRuleResponse.java create mode 100644 bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateWaasPolicyCustomProtectionRulesResponse.java diff --git a/CHANGELOG.md b/CHANGELOG.md index a5726fc3150..1cb8eb28348 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/). +## 1.6.1 - 2019-08-20 +### Added +- Support for the Limits service +- Support for archiving to Object Storage in the Streaming service +- Support for etags on resources in the Streaming service +- Support for Key Management service (KMS) encryption of file systems in the File Storage service +- Support for moving public IP, DHCP, local peering gateway, internet gateway, network security group, and DRG attachment resources across compartments in the Networking service +- Support for multi-origin, basic cache, certificate mapping, and OCI Monitoring service integration in the Web Application Acceleration and Security service + +### Changed +- Updated the Apache Connector Provider Add-On's transitive dependency on org.apache.httpcomponents:httpclient dependency to 4.5.9 to address the httpclient security vulnerability in normalizePath (see https://issues.apache.org/jira/browse/HTTPCLIENT-1803) + ## 1.6.0 - 2019-08-13 ### Added - Support for the Data Transfer service diff --git a/bmc-addons/bmc-apache-connector-provider/pom.xml b/bmc-addons/bmc-apache-connector-provider/pom.xml index 3af4d4d6d45..e04fe7a5f9b 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.6.0 + 1.6.1 ../pom.xml @@ -28,6 +28,9 @@ ${jersey.version} + org.glassfish.jersey.connectors jersey-apache-connector @@ -43,7 +46,15 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 + + + + + org.apache.httpcomponents + httpclient + 4.5.9 diff --git a/bmc-addons/bmc-resteasy-client-configurator/pom.xml b/bmc-addons/bmc-resteasy-client-configurator/pom.xml index 65535cfbe91..54a9bbefc7a 100644 --- a/bmc-addons/bmc-resteasy-client-configurator/pom.xml +++ b/bmc-addons/bmc-resteasy-client-configurator/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 1.6.0 + 1.6.1 ../pom.xml @@ -36,7 +36,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-addons/pom.xml b/bmc-addons/pom.xml index 9c4254b8c8c..21833a140a0 100644 --- a/bmc-addons/pom.xml +++ b/bmc-addons/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml diff --git a/bmc-announcementsservice/pom.xml b/bmc-announcementsservice/pom.xml index 0d8bcafb147..dd7852e329f 100644 --- a/bmc-announcementsservice/pom.xml +++ b/bmc-announcementsservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-announcementsservice @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 \ No newline at end of file diff --git a/bmc-audit/pom.xml b/bmc-audit/pom.xml index c14931086d1..7969515a9aa 100644 --- a/bmc-audit/pom.xml +++ b/bmc-audit/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-autoscaling/pom.xml b/bmc-autoscaling/pom.xml index e5f11bcffe3..3bc7823a955 100644 --- a/bmc-autoscaling/pom.xml +++ b/bmc-autoscaling/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-autoscaling @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 \ No newline at end of file diff --git a/bmc-bom/pom.xml b/bmc-bom/pom.xml index 0c852ae2747..2bdd30246e9 100644 --- a/bmc-bom/pom.xml +++ b/bmc-bom/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-bom @@ -19,175 +19,175 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-audit - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-containerengine - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-core - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-database - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-dns - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-email - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-filestorage - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-identity - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-loadbalancer - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-objectstorage - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-addons-resteasy-client-configurator - 1.6.0 + 1.6.1 com.oracle.oci.sdk oci-java-sdk-resourcesearch false - 1.6.0 + 1.6.1 com.oracle.oci.sdk false oci-java-sdk-addons-apache - 1.6.0 + 1.6.1 com.oracle.oci.sdk oci-java-sdk-keymanagement - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-announcementsservice - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-healthchecks - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-waas - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-streaming - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-resourcemanager - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-monitoring - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-ons - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-autoscaling - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-budget - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-workrequests - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-limits - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-functions - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-events - 1.6.0 + 1.6.1 false com.oracle.oci.sdk oci-java-sdk-dts - 1.6.0 + 1.6.1 false diff --git a/bmc-budget/pom.xml b/bmc-budget/pom.xml index e973ea55ca4..a176a638ea5 100644 --- a/bmc-budget/pom.xml +++ b/bmc-budget/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-budget @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 \ No newline at end of file diff --git a/bmc-common/pom.xml b/bmc-common/pom.xml index d314e6924b2..0b050ffd48e 100644 --- a/bmc-common/pom.xml +++ b/bmc-common/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/RequestSignerImpl.java b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/RequestSignerImpl.java index 2825936e2dc..3f2a82a56c4 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/RequestSignerImpl.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/RequestSignerImpl.java @@ -314,26 +314,22 @@ static Map calculateMissingHeaders( if (!(isPut || isPost || isPatch)) { // Asking to sign a body on GET/DELETE/HEAD is not allowed if (body != null) { - throw new RequestSignerException("MUST NOT send body on non-POST/PUT request"); + throw new RequestSignerException( + "MUST NOT send body on non-POST/PUT/PATCH request"); } else { // nothing left to do return missingHeaders; } } - // the one exception for the below is when doing a PUT if the body is an InputStream - // and the configuration allows it to be skipped - if ((isPut || isPatch) && (body instanceof InputStream)) { - if (signingConfiguration.skipContentHeadersForStreamingPutRequests) { - return missingHeaders; - } else { - // TODO: support DuplicatableInputStream to be able to calculate length/sha-256 - throw new IllegalArgumentException( - "Streaming body not supported for signing strategy"); - } + // Return if the body is an InputStream and the configuration allows for it to be skipped. + // This is typically done for put, patch, and post http method types. + if (body instanceof InputStream + && signingConfiguration.skipContentHeadersForStreamingPutRequests) { + return missingHeaders; } - // supply content-type, content-length and x-content-sha256 if missing (PUT and POST only) + // supply content-type, content-length and x-content-sha256 if missing (PUT, PATCH, and POST only) if (requiredHeaders.contains(Constants.CONTENT_TYPE)) { // While we don't always sign content-type, services always // expect application/json (except if we're sending an input stream) diff --git a/bmc-common/src/test/java/com/oracle/bmc/http/signing/internal/RequestSignerImplTest.java b/bmc-common/src/test/java/com/oracle/bmc/http/signing/internal/RequestSignerImplTest.java index 8911666281d..4a2d376326b 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/http/signing/internal/RequestSignerImplTest.java +++ b/bmc-common/src/test/java/com/oracle/bmc/http/signing/internal/RequestSignerImplTest.java @@ -15,7 +15,9 @@ import com.oracle.bmc.http.signing.SigningStrategy; import com.oracle.bmc.util.StreamUtils; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.mockito.Mock; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -58,6 +60,8 @@ public class RequestSignerImplTest { private static final String SERIALIZED_MAP_JSON_STRING = "{\"header\":[\"value1\",\"value2\"]}"; private static final byte[] BYTE_BUFFER = new byte[8196]; + @Rule public ExpectedException thrown = ExpectedException.none(); + @Mock private Logger mockLogger; @Mock private ObjectMapper mockObjectMapper; @@ -146,17 +150,21 @@ public void calculateStringToSign_whenDuplicateHeaderKeysExists() { @Test public void calculateMissingHeaders_postStringContentAsJson() throws IOException { calculateAndVerifyMissingHeaders( + HttpMethod.POST, MediaType.APPLICATION_JSON, SERIALIZED_MAP_JSON_STRING, - SERIALIZED_MAP_JSON_STRING.length()); + SERIALIZED_MAP_JSON_STRING.length(), + SigningStrategy.STANDARD); } @Test public void calculateMissingHeaders_postStringContentAsPlainText() throws IOException { calculateAndVerifyMissingHeaders( + HttpMethod.POST, MediaType.TEXT_PLAIN, SERIALIZED_MAP_JSON_STRING, - SERIALIZED_MAP_JSON_STRING.length()); + SERIALIZED_MAP_JSON_STRING.length(), + SigningStrategy.STANDARD); } @Test @@ -164,7 +172,11 @@ public void calculateMissingHeaders_postDuplicatableInputStreamAsOctetStream() throws IOException { final InputStream body = StreamUtils.createByteArrayInputStream(BYTE_BUFFER); calculateAndVerifyMissingHeaders( - MediaType.APPLICATION_OCTET_STREAM, body, BYTE_BUFFER.length); + HttpMethod.POST, + MediaType.APPLICATION_OCTET_STREAM, + body, + BYTE_BUFFER.length, + SigningStrategy.STANDARD); // Read the stream one more time to verify it wasn't consumed already and verify content matches source assertTrue(Arrays.equals(BYTE_BUFFER, ByteStreams.toByteArray(body))); @@ -174,59 +186,130 @@ public void calculateMissingHeaders_postDuplicatableInputStreamAsOctetStream() public void calculateMissingHeaders_postDuplicatableInputStreamAsPlainText() throws IOException { final InputStream body = StreamUtils.createByteArrayInputStream(BYTE_BUFFER); - calculateAndVerifyMissingHeaders(MediaType.TEXT_PLAIN, body, BYTE_BUFFER.length); + calculateAndVerifyMissingHeaders( + HttpMethod.POST, + MediaType.TEXT_PLAIN, + body, + BYTE_BUFFER.length, + SigningStrategy.STANDARD); // Read the stream one more time to verify it wasn't consumed already and verify content matches source assertTrue(Arrays.equals(BYTE_BUFFER, ByteStreams.toByteArray(body))); } - @Test(expected = IllegalArgumentException.class) + @Test public void calculateMissingHeaders_postByteArrayBody() throws IOException { - calculateAndVerifyMissingHeaders(MediaType.TEXT_PLAIN, BYTE_BUFFER, BYTE_BUFFER.length); + thrown.expect(IllegalArgumentException.class); + thrown.expectMessage("Unexpected body type"); + + calculateAndVerifyMissingHeaders( + HttpMethod.POST, + MediaType.TEXT_PLAIN, + BYTE_BUFFER, + BYTE_BUFFER.length, + SigningStrategy.STANDARD); } - @Test(expected = IllegalArgumentException.class) + @Test public void calculateMissingHeaders_postInputStreamBody() throws IOException { + thrown.expect(IllegalArgumentException.class); + thrown.expectMessage("Only DuplicatableInputStream supported for body that needs signing"); + calculateAndVerifyMissingHeaders( - MediaType.TEXT_PLAIN, new ByteArrayInputStream(BYTE_BUFFER), BYTE_BUFFER.length); + HttpMethod.POST, + MediaType.TEXT_PLAIN, + new ByteArrayInputStream(BYTE_BUFFER), + BYTE_BUFFER.length, + SigningStrategy.STANDARD); } - private void calculateAndVerifyMissingHeaders( - final String contentType, final Object body, final int contentLength) + @Test + public void calculateMissingHeaders_postInputStreamBodyWithExcludeBodySigningStrategy() throws IOException { - final URI uri = URI.create("https://identity.us-phoenix-1.oraclecloud.com/20160918/users"); - final Map> existingHeaders = - ImmutableMap.>of( - HttpHeaders.CONTENT_TYPE.toLowerCase(), - ImmutableList.of(contentType), - "opc-request-id", - ImmutableList.of("2F9BA4A30BB3452397A5BC1BFE447C5D"), - HttpHeaders.ACCEPT.toLowerCase(), - ImmutableList.of(MediaType.APPLICATION_JSON)); - final RequestSignerImpl.SigningConfiguration signingConfiguration = - new RequestSignerImpl.SigningConfiguration( - SigningStrategy.STANDARD.getHeadersToSign(), - SigningStrategy.STANDARD.getOptionalHeadersToSign(), - SigningStrategy.STANDARD.isSkipContentHeadersForStreamingPutRequests()); - final Map missingHeaders = - RequestSignerImpl.calculateMissingHeaders( - HttpMethod.POST.toLowerCase(), - uri, - existingHeaders, - body, - Constants.ALL_HEADERS, - signingConfiguration); - assertNotNull(missingHeaders); - assertEquals(4, missingHeaders.size()); - assertTrue(missingHeaders.containsKey(HttpHeaders.DATE.toLowerCase())); - assertTrue(missingHeaders.containsKey(HttpHeaders.CONTENT_LENGTH.toLowerCase())); - assertEquals( - Integer.toString(contentLength), - missingHeaders.get(HttpHeaders.CONTENT_LENGTH.toLowerCase())); - assertTrue(missingHeaders.containsKey("x-content-sha256")); - assertEquals( - "identity.us-phoenix-1.oraclecloud.com", - missingHeaders.get(HttpHeaders.HOST.toLowerCase())); + calculateAndVerifyMissingHeaders( + HttpMethod.POST, + MediaType.TEXT_PLAIN, + new ByteArrayInputStream(BYTE_BUFFER), + BYTE_BUFFER.length, + SigningStrategy.EXCLUDE_BODY); + } + + @Test + public void calculateMissingHeaders_putInputStreamBodyWithExcludeBodySigningStrategy() + throws IOException { + calculateAndVerifyMissingHeaders( + HttpMethod.PUT, + MediaType.TEXT_PLAIN, + new ByteArrayInputStream(BYTE_BUFFER), + BYTE_BUFFER.length, + SigningStrategy.EXCLUDE_BODY); + } + + @Test + public void calculateMissingHeaders_patchInputStreamBodyWithExcludeBodySigningStrategy() + throws IOException { + calculateAndVerifyMissingHeaders( + HttpMethod.PATCH, + MediaType.TEXT_PLAIN, + new ByteArrayInputStream(BYTE_BUFFER), + BYTE_BUFFER.length, + SigningStrategy.EXCLUDE_BODY); + } + + @Test + public void calculateMissingHeaders_getInputStreamBodyWithExcludeBodySigningStrategy() + throws IOException { + thrown.expect(RequestSignerException.class); + thrown.expectMessage("MUST NOT send body on non-POST/PUT/PATCH request"); + + calculateAndVerifyMissingHeaders( + HttpMethod.GET, + MediaType.TEXT_PLAIN, + new ByteArrayInputStream(BYTE_BUFFER), + BYTE_BUFFER.length, + SigningStrategy.EXCLUDE_BODY); + } + + @Test + public void calculateMissingHeaders_deleteInputStreamBodyWithExcludeBodySigningStrategy() + throws IOException { + thrown.expect(RequestSignerException.class); + thrown.expectMessage("MUST NOT send body on non-POST/PUT/PATCH request"); + + calculateAndVerifyMissingHeaders( + HttpMethod.DELETE, + MediaType.TEXT_PLAIN, + new ByteArrayInputStream(BYTE_BUFFER), + BYTE_BUFFER.length, + SigningStrategy.EXCLUDE_BODY); + } + + @Test + public void calculateMissingHeaders_optionsInputStreamBodyWithExcludeBodySigningStrategy() + throws IOException { + thrown.expect(RequestSignerException.class); + thrown.expectMessage("MUST NOT send body on non-POST/PUT/PATCH request"); + + calculateAndVerifyMissingHeaders( + HttpMethod.OPTIONS, + MediaType.TEXT_PLAIN, + new ByteArrayInputStream(BYTE_BUFFER), + BYTE_BUFFER.length, + SigningStrategy.EXCLUDE_BODY); + } + + @Test + public void calculateMissingHeaders_headInputStreamBodyWithExcludeBodySigningStrategy() + throws IOException { + thrown.expect(RequestSignerException.class); + thrown.expectMessage("MUST NOT send body on non-POST/PUT/PATCH request"); + + calculateAndVerifyMissingHeaders( + HttpMethod.HEAD, + MediaType.TEXT_PLAIN, + new ByteArrayInputStream(BYTE_BUFFER), + BYTE_BUFFER.length, + SigningStrategy.EXCLUDE_BODY); } // Reload the classes so PowerMockito can inject the static mocks. @@ -324,4 +407,50 @@ public void signRequest_withOptionallySignedHeader() } } } + + private void calculateAndVerifyMissingHeaders( + final String httpMethod, + final String contentType, + final Object body, + final int contentLength, + final SigningStrategy signingStrategy) + throws IOException { + final URI uri = URI.create("https://identity.us-phoenix-1.oraclecloud.com/20160918/users"); + final Map> existingHeaders = + ImmutableMap.>of( + HttpHeaders.CONTENT_TYPE.toLowerCase(), + ImmutableList.of(contentType), + "opc-request-id", + ImmutableList.of("2F9BA4A30BB3452397A5BC1BFE447C5D"), + HttpHeaders.ACCEPT.toLowerCase(), + ImmutableList.of(MediaType.APPLICATION_JSON)); + final RequestSignerImpl.SigningConfiguration signingConfiguration = + new RequestSignerImpl.SigningConfiguration( + signingStrategy.getHeadersToSign(), + signingStrategy.getOptionalHeadersToSign(), + signingStrategy.isSkipContentHeadersForStreamingPutRequests()); + final Map missingHeaders = + RequestSignerImpl.calculateMissingHeaders( + httpMethod.toLowerCase(), + uri, + existingHeaders, + body, + Constants.ALL_HEADERS, + signingConfiguration); + assertNotNull(missingHeaders); + int expectedMissingHeaderSize = + (signingStrategy.isSkipContentHeadersForStreamingPutRequests()) ? 2 : 4; + assertEquals(expectedMissingHeaderSize, missingHeaders.size()); + assertTrue(missingHeaders.containsKey(HttpHeaders.DATE.toLowerCase())); + if (!signingStrategy.isSkipContentHeadersForStreamingPutRequests()) { + assertTrue(missingHeaders.containsKey(HttpHeaders.CONTENT_LENGTH.toLowerCase())); + assertEquals( + Integer.toString(contentLength), + missingHeaders.get(HttpHeaders.CONTENT_LENGTH.toLowerCase())); + assertTrue(missingHeaders.containsKey("x-content-sha256")); + } + assertEquals( + "identity.us-phoenix-1.oraclecloud.com", + missingHeaders.get(HttpHeaders.HOST.toLowerCase())); + } } diff --git a/bmc-containerengine/pom.xml b/bmc-containerengine/pom.xml index bea28bcaaa7..903cc6dd6a8 100644 --- a/bmc-containerengine/pom.xml +++ b/bmc-containerengine/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-core/pom.xml b/bmc-core/pom.xml index 0deeda84cfc..0db92709ee3 100644 --- a/bmc-core/pom.xml +++ b/bmc-core/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 com.oracle.oci.sdk oci-java-sdk-workrequests - 1.6.0 + 1.6.1 diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeManagement.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeManagement.java index 2ca0e8f0703..240584eebdd 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeManagement.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeManagement.java @@ -84,7 +84,8 @@ ChangeInstancePoolCompartmentResponse changeInstancePoolCompartment( ChangeInstancePoolCompartmentRequest request); /** - * Creates an instance configuration + * Creates an instance configuration. An instance configuration is a template that defines the + * settings to use when creating Compute instances. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -147,7 +148,13 @@ GetInstancePoolLoadBalancerAttachmentResponse getInstancePoolLoadBalancerAttachm GetInstancePoolLoadBalancerAttachmentRequest request); /** - * Launch an instance from an instance configuration + * Launches an instance from an instance configuration. + *

+ * If the instance configuration does not include all of the parameters that are + * required to launch an instance, such as the availability domain and subnet ID, you must + * provide these parameters when you launch an instance from the instance configuration. + * For more information, see the {@link InstanceConfiguration} + * resource. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -157,7 +164,7 @@ LaunchInstanceConfigurationResponse launchInstanceConfiguration( LaunchInstanceConfigurationRequest request); /** - * Lists the available instanceConfigurations in the specific compartment. + * Lists the instance configurations in the specified compartment. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -232,7 +239,7 @@ ListInstancePoolInstancesResponse listInstancePoolInstances( TerminateInstancePoolResponse terminateInstancePool(TerminateInstancePoolRequest request); /** - * Updates the freeFormTags, definedTags, and display name of an instance configuration. + * Updates the free-form tags, defined tags, and display name of an instance configuration. * @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. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeManagementAsync.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeManagementAsync.java index 13ed4f6ba20..34ce257b144 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeManagementAsync.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeManagementAsync.java @@ -109,7 +109,8 @@ java.util.concurrent.Future attachLoadBalancer( handler); /** - * Creates an instance configuration + * Creates an instance configuration. An instance configuration is a template that defines the + * settings to use when creating Compute instances. * * * @param request The request object containing the details to send @@ -225,7 +226,13 @@ java.util.concurrent.Future getInstancePool( handler); /** - * Launch an instance from an instance configuration + * Launches an instance from an instance configuration. + *

+ * If the instance configuration does not include all of the parameters that are + * required to launch an instance, such as the availability domain and subnet ID, you must + * provide these parameters when you launch an instance from the instance configuration. + * For more information, see the {@link InstanceConfiguration} + * resource. * * * @param request The request object containing the details to send @@ -242,7 +249,7 @@ java.util.concurrent.Future launchInstanceC handler); /** - * Lists the available instanceConfigurations in the specific compartment. + * Lists the instance configurations in the specified compartment. * * * @param request The request object containing the details to send @@ -378,7 +385,7 @@ java.util.concurrent.Future terminateInstancePool handler); /** - * Updates the freeFormTags, definedTags, and display name of an instance configuration. + * Updates the free-form tags, defined tags, and display name of an instance configuration. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. 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 62ca44e7a92..bb1dc90fba6 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 @@ -126,6 +126,18 @@ ChangeCrossConnectCompartmentResponse changeCrossConnectCompartment( ChangeCrossConnectGroupCompartmentResponse changeCrossConnectGroupCompartment( ChangeCrossConnectGroupCompartmentRequest request); + /** + * Moves a set of DHCP options into a different compartment within the same tenancy. For information + * about moving resources between compartments, see + * [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * @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. + */ + ChangeDhcpOptionsCompartmentResponse changeDhcpOptionsCompartment( + ChangeDhcpOptionsCompartmentRequest request); + /** * Moves an IPSec connection into a different compartment within the same tenancy. For information * about moving resources between compartments, see @@ -138,6 +150,30 @@ ChangeCrossConnectGroupCompartmentResponse changeCrossConnectGroupCompartment( ChangeIPSecConnectionCompartmentResponse changeIPSecConnectionCompartment( ChangeIPSecConnectionCompartmentRequest request); + /** + * Moves an internet gateway into a different compartment within the same tenancy. For information + * about moving resources between compartments, see + * [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * @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. + */ + ChangeInternetGatewayCompartmentResponse changeInternetGatewayCompartment( + ChangeInternetGatewayCompartmentRequest request); + + /** + * Moves a local peering gateway into a different compartment within the same tenancy. For information + * about moving resources between compartments, see + * [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * @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. + */ + ChangeLocalPeeringGatewayCompartmentResponse changeLocalPeeringGatewayCompartment( + ChangeLocalPeeringGatewayCompartmentRequest request); + /** * Moves a NAT gateway into a different compartment within the same tenancy. For information * about moving resources between compartments, see @@ -150,6 +186,32 @@ ChangeIPSecConnectionCompartmentResponse changeIPSecConnectionCompartment( ChangeNatGatewayCompartmentResponse changeNatGatewayCompartment( ChangeNatGatewayCompartmentRequest request); + /** + * Moves a network security group into a different compartment within the same tenancy. For + * information about moving resources between compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * @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. + */ + ChangeNetworkSecurityGroupCompartmentResponse changeNetworkSecurityGroupCompartment( + ChangeNetworkSecurityGroupCompartmentRequest request); + + /** + * Moves a public IP into a different compartment within the same tenancy. For information + * about moving resources between compartments, see + * [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + *

+ * This operation applies only to reserved public IPs. Ephemeral public IPs always belong to the + * same compartment as their VNIC and move accordingly. + * + * @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. + */ + ChangePublicIpCompartmentResponse changePublicIpCompartment( + ChangePublicIpCompartmentRequest request); + /** * Moves a remote peering connection (RPC) into a different compartment within the same tenancy. For information * about moving resources between compartments, see 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 129bcc87777..1cdc5fac071 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 @@ -185,6 +185,26 @@ java.util.concurrent.Future changeCpeCompartment( ChangeCrossConnectGroupCompartmentResponse> handler); + /** + * Moves a set of DHCP options into a different compartment within the same tenancy. For information + * about moving resources between compartments, see + * [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * + * @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 changeDhcpOptionsCompartment( + ChangeDhcpOptionsCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeDhcpOptionsCompartmentRequest, + ChangeDhcpOptionsCompartmentResponse> + handler); + /** * Moves an IPSec connection into a different compartment within the same tenancy. For information * about moving resources between compartments, see @@ -206,6 +226,48 @@ java.util.concurrent.Future changeCpeCompartment( ChangeIPSecConnectionCompartmentResponse> handler); + /** + * Moves an internet gateway into a different compartment within the same tenancy. For information + * about moving resources between compartments, see + * [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * + * @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 + changeInternetGatewayCompartment( + ChangeInternetGatewayCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeInternetGatewayCompartmentRequest, + ChangeInternetGatewayCompartmentResponse> + handler); + + /** + * Moves a local peering gateway into a different compartment within the same tenancy. For information + * about moving resources between compartments, see + * [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * + * @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 + changeLocalPeeringGatewayCompartment( + ChangeLocalPeeringGatewayCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeLocalPeeringGatewayCompartmentRequest, + ChangeLocalPeeringGatewayCompartmentResponse> + handler); + /** * Moves a NAT gateway into a different compartment within the same tenancy. For information * about moving resources between compartments, see @@ -225,6 +287,48 @@ java.util.concurrent.Future changeNatGatewa ChangeNatGatewayCompartmentRequest, ChangeNatGatewayCompartmentResponse> handler); + /** + * Moves a network security group into a different compartment within the same tenancy. For + * information about moving resources between compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + * + * + * @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 + changeNetworkSecurityGroupCompartment( + ChangeNetworkSecurityGroupCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeNetworkSecurityGroupCompartmentRequest, + ChangeNetworkSecurityGroupCompartmentResponse> + handler); + + /** + * Moves a public IP into a different compartment within the same tenancy. For information + * about moving resources between compartments, see + * [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + *

+ * This operation applies only to reserved public IPs. Ephemeral public IPs always belong to the + * same compartment as their VNIC and move accordingly. + * + * + * @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 changePublicIpCompartment( + ChangePublicIpCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangePublicIpCompartmentRequest, ChangePublicIpCompartmentResponse> + handler); + /** * Moves a remote peering connection (RPC) into a different compartment within the same tenancy. For information * about moving resources between compartments, see 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 e09aff2a9b6..f669ed1f5bd 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 @@ -968,6 +968,100 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future + changeDhcpOptionsCompartment( + final ChangeDhcpOptionsCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeDhcpOptionsCompartmentRequest, + ChangeDhcpOptionsCompartmentResponse> + handler) { + LOG.trace("Called async changeDhcpOptionsCompartment"); + final ChangeDhcpOptionsCompartmentRequest interceptedRequest = + ChangeDhcpOptionsCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDhcpOptionsCompartmentConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeDhcpOptionsCompartmentResponse> + transformer = ChangeDhcpOptionsCompartmentConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ChangeDhcpOptionsCompartmentRequest, ChangeDhcpOptionsCompartmentResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ChangeDhcpOptionsCompartmentRequest, + ChangeDhcpOptionsCompartmentResponse>( + (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.getChangeDhcpOptionsCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getChangeDhcpOptionsCompartmentDetails(), + 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, ChangeDhcpOptionsCompartmentResponse>( + 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.getChangeDhcpOptionsCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future changeIPSecConnectionCompartment( @@ -1063,6 +1157,199 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future + changeInternetGatewayCompartment( + final ChangeInternetGatewayCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeInternetGatewayCompartmentRequest, + ChangeInternetGatewayCompartmentResponse> + handler) { + LOG.trace("Called async changeInternetGatewayCompartment"); + final ChangeInternetGatewayCompartmentRequest interceptedRequest = + ChangeInternetGatewayCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeInternetGatewayCompartmentConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeInternetGatewayCompartmentResponse> + transformer = ChangeInternetGatewayCompartmentConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ChangeInternetGatewayCompartmentRequest, + ChangeInternetGatewayCompartmentResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ChangeInternetGatewayCompartmentRequest, + ChangeInternetGatewayCompartmentResponse>( + (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.getChangeInternetGatewayCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getChangeInternetGatewayCompartmentDetails(), + 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, ChangeInternetGatewayCompartmentResponse>( + 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.getChangeInternetGatewayCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future + changeLocalPeeringGatewayCompartment( + final ChangeLocalPeeringGatewayCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeLocalPeeringGatewayCompartmentRequest, + ChangeLocalPeeringGatewayCompartmentResponse> + handler) { + LOG.trace("Called async changeLocalPeeringGatewayCompartment"); + final ChangeLocalPeeringGatewayCompartmentRequest interceptedRequest = + ChangeLocalPeeringGatewayCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeLocalPeeringGatewayCompartmentConverter.fromRequest( + client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeLocalPeeringGatewayCompartmentResponse> + transformer = ChangeLocalPeeringGatewayCompartmentConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ChangeLocalPeeringGatewayCompartmentRequest, + ChangeLocalPeeringGatewayCompartmentResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ChangeLocalPeeringGatewayCompartmentRequest, + ChangeLocalPeeringGatewayCompartmentResponse>( + (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 + .getChangeLocalPeeringGatewayCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getChangeLocalPeeringGatewayCompartmentDetails(), + 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, ChangeLocalPeeringGatewayCompartmentResponse>( + 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 + .getChangeLocalPeeringGatewayCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future changeNatGatewayCompartment( @@ -1157,6 +1444,195 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future + changeNetworkSecurityGroupCompartment( + final ChangeNetworkSecurityGroupCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeNetworkSecurityGroupCompartmentRequest, + ChangeNetworkSecurityGroupCompartmentResponse> + handler) { + LOG.trace("Called async changeNetworkSecurityGroupCompartment"); + final ChangeNetworkSecurityGroupCompartmentRequest interceptedRequest = + ChangeNetworkSecurityGroupCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeNetworkSecurityGroupCompartmentConverter.fromRequest( + client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeNetworkSecurityGroupCompartmentResponse> + transformer = ChangeNetworkSecurityGroupCompartmentConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ChangeNetworkSecurityGroupCompartmentRequest, + ChangeNetworkSecurityGroupCompartmentResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ChangeNetworkSecurityGroupCompartmentRequest, + ChangeNetworkSecurityGroupCompartmentResponse>( + (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 + .getChangeNetworkSecurityGroupCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getChangeNetworkSecurityGroupCompartmentDetails(), + 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, ChangeNetworkSecurityGroupCompartmentResponse>( + 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 + .getChangeNetworkSecurityGroupCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future changePublicIpCompartment( + final ChangePublicIpCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangePublicIpCompartmentRequest, ChangePublicIpCompartmentResponse> + handler) { + LOG.trace("Called async changePublicIpCompartment"); + final ChangePublicIpCompartmentRequest interceptedRequest = + ChangePublicIpCompartmentConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangePublicIpCompartmentConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangePublicIpCompartmentResponse> + transformer = ChangePublicIpCompartmentConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ChangePublicIpCompartmentRequest, ChangePublicIpCompartmentResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ChangePublicIpCompartmentRequest, ChangePublicIpCompartmentResponse>( + (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.getChangePublicIpCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getChangePublicIpCompartmentDetails(), + 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, ChangePublicIpCompartmentResponse>( + 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.getChangePublicIpCompartmentDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future changeRemotePeeringConnectionCompartment( 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 fb75c03d5c2..b22b910e853 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 @@ -621,6 +621,41 @@ public ChangeCrossConnectGroupCompartmentResponse changeCrossConnectGroupCompart }); } + @Override + public ChangeDhcpOptionsCompartmentResponse changeDhcpOptionsCompartment( + ChangeDhcpOptionsCompartmentRequest request) { + LOG.trace("Called changeDhcpOptionsCompartment"); + final ChangeDhcpOptionsCompartmentRequest interceptedRequest = + ChangeDhcpOptionsCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeDhcpOptionsCompartmentConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeDhcpOptionsCompartmentResponse> + transformer = ChangeDhcpOptionsCompartmentConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeDhcpOptionsCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeIPSecConnectionCompartmentResponse changeIPSecConnectionCompartment( ChangeIPSecConnectionCompartmentRequest request) { @@ -656,6 +691,77 @@ public ChangeIPSecConnectionCompartmentResponse changeIPSecConnectionCompartment }); } + @Override + public ChangeInternetGatewayCompartmentResponse changeInternetGatewayCompartment( + ChangeInternetGatewayCompartmentRequest request) { + LOG.trace("Called changeInternetGatewayCompartment"); + final ChangeInternetGatewayCompartmentRequest interceptedRequest = + ChangeInternetGatewayCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeInternetGatewayCompartmentConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeInternetGatewayCompartmentResponse> + transformer = ChangeInternetGatewayCompartmentConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeInternetGatewayCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangeLocalPeeringGatewayCompartmentResponse changeLocalPeeringGatewayCompartment( + ChangeLocalPeeringGatewayCompartmentRequest request) { + LOG.trace("Called changeLocalPeeringGatewayCompartment"); + final ChangeLocalPeeringGatewayCompartmentRequest interceptedRequest = + ChangeLocalPeeringGatewayCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeLocalPeeringGatewayCompartmentConverter.fromRequest( + client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeLocalPeeringGatewayCompartmentResponse> + transformer = ChangeLocalPeeringGatewayCompartmentConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeLocalPeeringGatewayCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeNatGatewayCompartmentResponse changeNatGatewayCompartment( ChangeNatGatewayCompartmentRequest request) { @@ -691,6 +797,77 @@ public ChangeNatGatewayCompartmentResponse changeNatGatewayCompartment( }); } + @Override + public ChangeNetworkSecurityGroupCompartmentResponse changeNetworkSecurityGroupCompartment( + ChangeNetworkSecurityGroupCompartmentRequest request) { + LOG.trace("Called changeNetworkSecurityGroupCompartment"); + final ChangeNetworkSecurityGroupCompartmentRequest interceptedRequest = + ChangeNetworkSecurityGroupCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeNetworkSecurityGroupCompartmentConverter.fromRequest( + client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeNetworkSecurityGroupCompartmentResponse> + transformer = ChangeNetworkSecurityGroupCompartmentConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeNetworkSecurityGroupCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ChangePublicIpCompartmentResponse changePublicIpCompartment( + ChangePublicIpCompartmentRequest request) { + LOG.trace("Called changePublicIpCompartment"); + final ChangePublicIpCompartmentRequest interceptedRequest = + ChangePublicIpCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangePublicIpCompartmentConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, ChangePublicIpCompartmentResponse> + transformer = ChangePublicIpCompartmentConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangePublicIpCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeRemotePeeringConnectionCompartmentResponse changeRemotePeeringConnectionCompartment( diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeDhcpOptionsCompartmentConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeDhcpOptionsCompartmentConverter.java new file mode 100644 index 00000000000..7d872fc99b0 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeDhcpOptionsCompartmentConverter.java @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +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 ChangeDhcpOptionsCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ChangeDhcpOptionsCompartmentRequest interceptRequest( + ChangeDhcpOptionsCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ChangeDhcpOptionsCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getDhcpId(), "dhcpId must not be blank"); + Validate.notNull( + request.getChangeDhcpOptionsCompartmentDetails(), + "changeDhcpOptionsCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("dhcps") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getDhcpId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, ChangeDhcpOptionsCompartmentResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeDhcpOptionsCompartmentResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeDhcpOptionsCompartmentResponse>() { + @Override + public ChangeDhcpOptionsCompartmentResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ChangeDhcpOptionsCompartmentResponse"); + 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(); + + ChangeDhcpOptionsCompartmentResponse.Builder builder = + ChangeDhcpOptionsCompartmentResponse.builder(); + + 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)); + } + + ChangeDhcpOptionsCompartmentResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeInternetGatewayCompartmentConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeInternetGatewayCompartmentConverter.java new file mode 100644 index 00000000000..f502ce6d503 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeInternetGatewayCompartmentConverter.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +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 ChangeInternetGatewayCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ChangeInternetGatewayCompartmentRequest interceptRequest( + ChangeInternetGatewayCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ChangeInternetGatewayCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getIgId(), "igId must not be blank"); + Validate.notNull( + request.getChangeInternetGatewayCompartmentDetails(), + "changeInternetGatewayCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("internetGateways") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getIgId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, ChangeInternetGatewayCompartmentResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeInternetGatewayCompartmentResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + ChangeInternetGatewayCompartmentResponse>() { + @Override + public ChangeInternetGatewayCompartmentResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ChangeInternetGatewayCompartmentResponse"); + 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(); + + ChangeInternetGatewayCompartmentResponse.Builder builder = + ChangeInternetGatewayCompartmentResponse.builder(); + + 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)); + } + + ChangeInternetGatewayCompartmentResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeLocalPeeringGatewayCompartmentConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeLocalPeeringGatewayCompartmentConverter.java new file mode 100644 index 00000000000..09b49c4569c --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeLocalPeeringGatewayCompartmentConverter.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +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 ChangeLocalPeeringGatewayCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ChangeLocalPeeringGatewayCompartmentRequest interceptRequest( + ChangeLocalPeeringGatewayCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ChangeLocalPeeringGatewayCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getLocalPeeringGatewayId(), "localPeeringGatewayId must not be blank"); + Validate.notNull( + request.getChangeLocalPeeringGatewayCompartmentDetails(), + "changeLocalPeeringGatewayCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("localPeeringGateways") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getLocalPeeringGatewayId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, ChangeLocalPeeringGatewayCompartmentResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeLocalPeeringGatewayCompartmentResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + ChangeLocalPeeringGatewayCompartmentResponse>() { + @Override + public ChangeLocalPeeringGatewayCompartmentResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ChangeLocalPeeringGatewayCompartmentResponse"); + 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(); + + ChangeLocalPeeringGatewayCompartmentResponse.Builder builder = + ChangeLocalPeeringGatewayCompartmentResponse.builder(); + + 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)); + } + + ChangeLocalPeeringGatewayCompartmentResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeNetworkSecurityGroupCompartmentConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeNetworkSecurityGroupCompartmentConverter.java new file mode 100644 index 00000000000..c7d4f585c7e --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangeNetworkSecurityGroupCompartmentConverter.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +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 ChangeNetworkSecurityGroupCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ChangeNetworkSecurityGroupCompartmentRequest interceptRequest( + ChangeNetworkSecurityGroupCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ChangeNetworkSecurityGroupCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getNetworkSecurityGroupId(), "networkSecurityGroupId must not be blank"); + Validate.notNull( + request.getChangeNetworkSecurityGroupCompartmentDetails(), + "changeNetworkSecurityGroupCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("networkSecurityGroups") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getNetworkSecurityGroupId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, ChangeNetworkSecurityGroupCompartmentResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeNetworkSecurityGroupCompartmentResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + ChangeNetworkSecurityGroupCompartmentResponse>() { + @Override + public ChangeNetworkSecurityGroupCompartmentResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ChangeNetworkSecurityGroupCompartmentResponse"); + 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(); + + ChangeNetworkSecurityGroupCompartmentResponse.Builder builder = + ChangeNetworkSecurityGroupCompartmentResponse.builder(); + + 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)); + } + + ChangeNetworkSecurityGroupCompartmentResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangePublicIpCompartmentConverter.java b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangePublicIpCompartmentConverter.java new file mode 100644 index 00000000000..bcc0ffe5c51 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/internal/http/ChangePublicIpCompartmentConverter.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +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 ChangePublicIpCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ChangePublicIpCompartmentRequest interceptRequest( + ChangePublicIpCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ChangePublicIpCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getPublicIpId(), "publicIpId must not be blank"); + Validate.notNull( + request.getChangePublicIpCompartmentDetails(), + "changePublicIpCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20160918") + .path("publicIps") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getPublicIpId())) + .path("actions") + .path("changeCompartment"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, ChangePublicIpCompartmentResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangePublicIpCompartmentResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ChangePublicIpCompartmentResponse>() { + @Override + public ChangePublicIpCompartmentResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ChangePublicIpCompartmentResponse"); + 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(); + + ChangePublicIpCompartmentResponse.Builder builder = + ChangePublicIpCompartmentResponse.builder(); + + 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)); + } + + ChangePublicIpCompartmentResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AddSecurityRuleDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AddSecurityRuleDetails.java index b32060af886..a3d3a842fb3 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/AddSecurityRuleDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AddSecurityRuleDetails.java @@ -172,7 +172,7 @@ public static Builder builder() { } /** - * An optional description of your choice for the rule. + * An optional description of your choice for the rule. Avoid entering confidential information. * **/ @com.fasterxml.jackson.annotation.JsonProperty("description") @@ -185,6 +185,7 @@ public static Builder builder() { * Allowed values: *

* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + * Note that IPv6 addressing is currently supported only in the Government Cloud. *

* The `cidrBlock` value for a {@link Service}, if you're * setting up a security rule for traffic destined for a particular `Service` through @@ -347,6 +348,7 @@ public static Direction create(String key) { * Allowed values: *

* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + * Note that IPv6 addressing is currently supported only in the Government Cloud. *

* The `cidrBlock` value for a {@link Service}, if you're * setting up a security rule for traffic coming from a particular `Service` through @@ -368,7 +370,7 @@ public static Direction create(String key) { * {@link Service} (the rule is for traffic coming from a * particular `Service` through a service gateway). *

- * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID of a + * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID of a * {@link NetworkSecurityGroup}. * **/ @@ -414,7 +416,7 @@ public static SourceType create(String key) { * {@link Service} (the rule is for traffic coming from a * particular `Service` through a service gateway). *

- * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID of a + * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID of a * {@link NetworkSecurityGroup}. * **/ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachVnicDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachVnicDetails.java index 353b96658fd..9a7c2f95c34 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachVnicDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AttachVnicDetails.java @@ -99,6 +99,7 @@ public static Builder builder() { /** * A user-friendly name for the attachment. Does not have to be unique, and it cannot be changed. + * Avoid entering confidential information. * **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CaptureConsoleHistoryDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CaptureConsoleHistoryDetails.java index 57433890286..d2a7879f03f 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CaptureConsoleHistoryDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CaptureConsoleHistoryDetails.java @@ -104,6 +104,7 @@ public static Builder builder() { /** * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. * **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeDhcpOptionsCompartmentDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeDhcpOptionsCompartmentDetails.java new file mode 100644 index 00000000000..b4216b994b3 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeDhcpOptionsCompartmentDetails.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * The configuration details for the move operation. + *
+ * 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 = ChangeDhcpOptionsCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ChangeDhcpOptionsCompartmentDetails { + @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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeDhcpOptionsCompartmentDetails build() { + ChangeDhcpOptionsCompartmentDetails __instance__ = + new ChangeDhcpOptionsCompartmentDetails(compartmentId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeDhcpOptionsCompartmentDetails o) { + Builder copiedBuilder = compartmentId(o.getCompartmentId()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to move the + * set of DHCP options to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + @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/ChangeInternetGatewayCompartmentDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeInternetGatewayCompartmentDetails.java new file mode 100644 index 00000000000..e95da306aa8 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeInternetGatewayCompartmentDetails.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * The configuration details for the move operation. + *
+ * 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 = ChangeInternetGatewayCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ChangeInternetGatewayCompartmentDetails { + @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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeInternetGatewayCompartmentDetails build() { + ChangeInternetGatewayCompartmentDetails __instance__ = + new ChangeInternetGatewayCompartmentDetails(compartmentId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeInternetGatewayCompartmentDetails o) { + Builder copiedBuilder = compartmentId(o.getCompartmentId()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to move the + * internet gateway to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + @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/ChangeLocalPeeringGatewayCompartmentDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeLocalPeeringGatewayCompartmentDetails.java new file mode 100644 index 00000000000..ca23793d021 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeLocalPeeringGatewayCompartmentDetails.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * The configuration details for the move operation. + *
+ * 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 = ChangeLocalPeeringGatewayCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ChangeLocalPeeringGatewayCompartmentDetails { + @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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeLocalPeeringGatewayCompartmentDetails build() { + ChangeLocalPeeringGatewayCompartmentDetails __instance__ = + new ChangeLocalPeeringGatewayCompartmentDetails(compartmentId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeLocalPeeringGatewayCompartmentDetails o) { + Builder copiedBuilder = compartmentId(o.getCompartmentId()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to move the + * local peering gateway to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + @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/ChangeNetworkSecurityGroupCompartmentDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeNetworkSecurityGroupCompartmentDetails.java new file mode 100644 index 00000000000..94c01edff74 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangeNetworkSecurityGroupCompartmentDetails.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2016, 2019, 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 = ChangeNetworkSecurityGroupCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ChangeNetworkSecurityGroupCompartmentDetails { + @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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeNetworkSecurityGroupCompartmentDetails build() { + ChangeNetworkSecurityGroupCompartmentDetails __instance__ = + new ChangeNetworkSecurityGroupCompartmentDetails(compartmentId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeNetworkSecurityGroupCompartmentDetails o) { + Builder copiedBuilder = compartmentId(o.getCompartmentId()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to move the network + * security group to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + @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/ChangePublicIpCompartmentDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangePublicIpCompartmentDetails.java new file mode 100644 index 00000000000..247c4f0d225 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ChangePublicIpCompartmentDetails.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.core.model; + +/** + * The configuration details for the move operation. + *
+ * 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 = ChangePublicIpCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ChangePublicIpCompartmentDetails { + @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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangePublicIpCompartmentDetails build() { + ChangePublicIpCompartmentDetails __instance__ = + new ChangePublicIpCompartmentDetails(compartmentId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangePublicIpCompartmentDetails o) { + Builder copiedBuilder = compartmentId(o.getCompartmentId()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to move the + * public IP to. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + @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/CreateDrgAttachmentDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateDrgAttachmentDetails.java index 53cef77acbd..292514948fb 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateDrgAttachmentDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateDrgAttachmentDetails.java @@ -109,8 +109,10 @@ public static Builder builder() { * table. The Networking service does NOT automatically associate the attached VCN's default route table * with the DRG attachment. *

- * For information about why you would associate a route table with a DRG attachment, see - * [Advanced Scenario: Transit Routing](https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm). + * For information about why you would associate a route table with a DRG attachment, see: + *

+ * [Transit Routing: Access to Multiple VCNs in Same Region](https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm) + * * [Transit Routing: Private Access to Oracle Services](https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm) * **/ @com.fasterxml.jackson.annotation.JsonProperty("routeTableId") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateImageDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateImageDetails.java index 35a3b4092ce..1616055683b 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateImageDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateImageDetails.java @@ -129,7 +129,7 @@ public static Builder builder() { } /** - * The OCID of the compartment containing the instance you want to use as the basis for the image. + * The OCID of the compartment you want the image to be created in. **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") String compartmentId; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConfigurationBase.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConfigurationBase.java index d28a46ead14..c080e4ef910 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConfigurationBase.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConfigurationBase.java @@ -4,7 +4,7 @@ package com.oracle.bmc.core.model; /** - * An instance configuration that can be used to launch + * Creation details for an instance configuration. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -41,7 +41,8 @@ public class CreateInstanceConfigurationBase { /** - * The OCID of the compartment containing the instance configuration. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + * containing the instance configuration. * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") @@ -58,7 +59,8 @@ public class CreateInstanceConfigurationBase { java.util.Map> definedTags; /** - * A user-friendly name for the instance configuration + * A user-friendly name for the instance configuration. Does not have to be unique, + * and it's changeable. Avoid entering confidential information. * **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConfigurationDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConfigurationDetails.java index 028d99e7790..c5872b8f364 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConfigurationDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConfigurationDetails.java @@ -4,7 +4,7 @@ package com.oracle.bmc.core.model; /** - * Create an instance configuration from API input. + * Details for creating an instance configuration by providing a list of configuration settings. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConfigurationFromInstanceDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConfigurationFromInstanceDetails.java index 060c8c3d2c7..de077190ffa 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConfigurationFromInstanceDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstanceConfigurationFromInstanceDetails.java @@ -4,7 +4,7 @@ package com.oracle.bmc.core.model; /** - * Create an instance configuration from an existing instance. + * Details for creating an instance configuration using an existing instance as a template. * *
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields @@ -122,7 +122,8 @@ public CreateInstanceConfigurationFromInstanceDetails( } /** - * The ID of the instance that will be used to create instance configuration. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance to use to create the + * instance configuration. * **/ @com.fasterxml.jackson.annotation.JsonProperty("instanceId") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstancePoolDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstancePoolDetails.java index 3cbf6a640e1..b6e249ee7ea 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstancePoolDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateInstancePoolDetails.java @@ -159,7 +159,9 @@ public static Builder builder() { java.util.Map> definedTags; /** - * The user-friendly name. Does not have to be unique. + * A user-friendly name for the instance pool. Does not have to be unique, and it's + * changeable. Avoid entering confidential information. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") String displayName; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateLocalPeeringGatewayDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateLocalPeeringGatewayDetails.java index b5b9c5ee5f9..00e814fa0d8 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateLocalPeeringGatewayDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateLocalPeeringGatewayDetails.java @@ -159,7 +159,7 @@ public static Builder builder() { * with the LPG. *

* For information about why you would associate a route table with an LPG, see - * [Advanced Scenario: Transit Routing](https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm). + * [Transit Routing: Access to Multiple VCNs in Same Region](https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("routeTableId") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateServiceGatewayDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateServiceGatewayDetails.java index 3ead7ef0807..4de7d7a218a 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateServiceGatewayDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateServiceGatewayDetails.java @@ -171,7 +171,7 @@ public static Builder builder() { * with the service gateway. *

* For information about why you would associate a route table with a service gateway, see - * [Transit Routing: Private Access to Oracle Services Network](https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm). + * [Transit Routing: Private Access to Oracle Services](https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("routeTableId") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeGroupBackupDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeGroupBackupDetails.java index 13a2f2c3f21..f8955602506 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeGroupBackupDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeGroupBackupDetails.java @@ -134,7 +134,9 @@ public static Builder builder() { java.util.Map> definedTags; /** - * A user-friendly name for the volume group backup. Does not have to be unique and it's changeable. + * A user-friendly name for the volume group backup. Does not have + * to be unique and it's changeable. Avoid entering confidential information. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") String displayName; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeGroupDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeGroupDetails.java index af5dd096d7c..9d7a11cdf94 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeGroupDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVolumeGroupDetails.java @@ -140,7 +140,7 @@ public static Builder builder() { java.util.Map> definedTags; /** - * A user-friendly name for the volume group. Does not have to be unique, and it's changeable. + * A user-friendly name for the volume group. Does not have to be unique, and it's changeable. Avoid entering confidential information. **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") String displayName; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectMapping.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectMapping.java index 2dceea033a3..568d3f4f06c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectMapping.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CrossConnectMapping.java @@ -214,6 +214,8 @@ public static Builder builder() { *

* There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv6 addresses. *

+ * Note that IPv6 addressing is currently supported only in the Government Cloud. + *

* Example: `2001:db8::1/64` * **/ @@ -228,6 +230,8 @@ public static Builder builder() { *

* There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv6 addresses. *

+ * Note that IPv6 addressing is currently supported only in the Government Cloud. + *

* Example: `2001:db8::2/64` * **/ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/DrgAttachment.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/DrgAttachment.java index f7dcf37ee3a..4a716225539 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/DrgAttachment.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/DrgAttachment.java @@ -221,9 +221,12 @@ public static LifecycleState create(String key) { LifecycleState lifecycleState; /** - * The OCID of the route table the DRG attachment is using. For information about why you - * would associate a route table with a DRG attachment, see - * [Advanced Scenario: Transit Routing](https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm). + * The OCID of the route table the DRG attachment is using. + *

+ * For information about why you would associate a route table with a DRG attachment, see: + *

+ * [Transit Routing: Access to Multiple VCNs in Same Region](https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm) + * * [Transit Routing: Private Access to Oracle Services](https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm) * **/ @com.fasterxml.jackson.annotation.JsonProperty("routeTableId") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/EgressSecurityRule.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/EgressSecurityRule.java index 23c0f936479..6c36f46bd25 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/EgressSecurityRule.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/EgressSecurityRule.java @@ -134,6 +134,7 @@ public static Builder builder() { * Allowed values: *

* IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + * Note that IPv6 addressing is currently supported only in the Government Cloud. *

* The `cidrBlock` value for a {@link Service}, if you're * setting up a security list rule for traffic destined for a particular `Service` through diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Image.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Image.java index e8e03f309e2..ae7f1e005a5 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Image.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Image.java @@ -239,6 +239,7 @@ public static Builder builder() { /** * Whether instances launched with this image can be used to create new images. * For example, you cannot create an image of an Oracle Database instance. + *

* Example: `true` * **/ @@ -258,6 +259,7 @@ public static Builder builder() { /** * A user-friendly name for the image. It does not have to be unique, and it's changeable. * Avoid entering confidential information. + *

* You cannot use an Oracle-provided image name as a custom image name. *

* Example: `My custom Oracle Linux image` diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/IngressSecurityRule.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/IngressSecurityRule.java index b9f0ac99661..c5d889a7952 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/IngressSecurityRule.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/IngressSecurityRule.java @@ -171,7 +171,8 @@ public static Builder builder() { *

* Allowed values: *

- * IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + * IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`. + * Note that IPv6 addressing is currently supported only in the Government Cloud. *

* The `cidrBlock` value for a {@link Service}, if you're * setting up a security list rule for traffic coming from a particular `Service` through diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfiguration.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfiguration.java index 9c5c6e9386e..1e2d4030c8d 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfiguration.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfiguration.java @@ -4,8 +4,8 @@ package com.oracle.bmc.core.model; /** - * An instance configuration is a template that defines the settings to use when creating Compute instances - * as part of an instance pool. For more information about instance pools and instance configurations, see + * An instance configuration is a template that defines the settings to use when creating Compute instances. + * For more information about instance configurations, see * [Managing Compute Instances](https://docs.cloud.oracle.com/Content/Compute/Concepts/instancemanagement.htm). * *
@@ -143,7 +143,8 @@ public static Builder builder() { } /** - * The OCID of the compartment containing the instance configuration. + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + * containing the instance configuration. * **/ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") @@ -160,7 +161,7 @@ public static Builder builder() { java.util.Map> definedTags; /** - * A user-friendly name for the instance configuration + * A user-friendly name for the instance configuration. * **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") @@ -177,7 +178,7 @@ public static Builder builder() { java.util.Map freeformTags; /** - * The OCID of the instance configuration + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration. **/ @com.fasterxml.jackson.annotation.JsonProperty("id") String id; @@ -186,8 +187,9 @@ public static Builder builder() { InstanceConfigurationInstanceDetails instanceDetails; /** - * The required details when using the {@link #launchInstanceConfiguration(LaunchInstanceConfigurationRequest) launchInstanceConfiguration} operation. - * These attributes are optional when using the {@link #createInstanceConfiguration(CreateInstanceConfigurationRequest) createInstanceConfiguration} operation. + * Parameters that were not specified when the instance configuration was created, but that + * are required to launch an instance from the instance configuration. See the + * {@link #launchInstanceConfiguration(LaunchInstanceConfigurationRequest) launchInstanceConfiguration} operation. * **/ @com.fasterxml.jackson.annotation.JsonProperty("deferredFields") @@ -195,6 +197,7 @@ public static Builder builder() { /** * The date and time the instance configuration was created, in the format defined by RFC3339. + *

* Example: `2016-08-25T21:10:29.600Z` * **/ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Ipv6.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Ipv6.java index e1ff4ceb47c..666ba317594 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Ipv6.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Ipv6.java @@ -10,6 +10,8 @@ * You can create and assign an IPv6 to any VNIC that is in an IPv6-enabled subnet in an * IPv6-enabled VCN. *

+ **Note:** IPv6 addressing is currently supported only in the Government Cloud. + *

* For important details about IPv6 addressing in a VCN, see [IPv6 Addresses](https://docs.cloud.oracle.com/Content/Network/Concepts/ipv6.htm). * *
diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchOptions.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchOptions.java index bf0a6e645cd..a3dc7430dde 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchOptions.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchOptions.java @@ -248,9 +248,10 @@ public static Firmware create(String key) { @com.fasterxml.jackson.annotation.JsonProperty("firmware") Firmware firmware; /** - * Emulation type for NIC. + * Emulation type for the physical network interface card (NIC). * * `E1000` - Emulated Gigabit ethernet controller. Compatible with Linux e1000 network driver. - * * `VFIO` - Direct attached Virtual Function network controller. Default for Oracle provided images. + * * `VFIO` - Direct attached Virtual Function network controller. This is the networking type + * when you launch an instance using hardware-assisted (SR-IOV) networking. * * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using virtio drivers. * **/ @@ -299,9 +300,10 @@ public static NetworkType create(String key) { } }; /** - * Emulation type for NIC. + * Emulation type for the physical network interface card (NIC). * * `E1000` - Emulated Gigabit ethernet controller. Compatible with Linux e1000 network driver. - * * `VFIO` - Direct attached Virtual Function network controller. Default for Oracle provided images. + * * `VFIO` - Direct attached Virtual Function network controller. This is the networking type + * when you launch an instance using hardware-assisted (SR-IOV) networking. * * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using virtio drivers. * **/ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/LocalPeeringGateway.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/LocalPeeringGateway.java index 48678d4725d..1c74ba62d5a 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/LocalPeeringGateway.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/LocalPeeringGateway.java @@ -409,9 +409,10 @@ public static PeeringStatus create(String key) { String peeringStatusDetails; /** - * The OCID of the route table the LPG is using. For information about why you - * would associate a route table with an LPG, see - * [Advanced Scenario: Transit Routing](https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm). + * The OCID of the route table the LPG is using. + *

+ * For information about why you would associate a route table with an LPG, see + * [Transit Routing: Access to Multiple VCNs in Same Region](https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("routeTableId") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/RouteRule.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/RouteRule.java index 09ea669c604..4b312e1bf8a 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/RouteRule.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/RouteRule.java @@ -113,7 +113,8 @@ public static Builder builder() { *

* IP address range in CIDR notation. Can be an IPv4 or IPv6 CIDR. For example: `192.168.1.0/24` * or `2001:0db8:0123:45::/56`. If you set this to an IPv6 CIDR, the route rule's target - * can only be a DRG or internet gateway. + * can only be a DRG or internet gateway. Note that IPv6 addressing is currently supported only + * in the Government Cloud. *

* The `cidrBlock` value for a {@link Service}, if you're * setting up a route rule for traffic destined for a particular `Service` through diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityRule.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityRule.java index a44bd3b462b..fbf5d8d01b1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityRule.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/SecurityRule.java @@ -219,6 +219,7 @@ public static Builder builder() { * Allowed values: *

* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + * Note that IPv6 addressing is currently supported only in the Government Cloud. *

* The `cidrBlock` value for a {@link Service}, if you're * setting up a security rule for traffic destined for a particular `Service` through @@ -422,6 +423,7 @@ public static Direction create(String key) { * Allowed values: *

* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + * Note that IPv6 addressing is currently supported only in the Government Cloud. *

* The `cidrBlock` value for a {@link Service}, if you're * setting up a security rule for traffic coming from a particular `Service` through @@ -443,7 +445,7 @@ public static Direction create(String key) { * {@link Service} (the rule is for traffic coming from a * particular `Service` through a service gateway). *

- * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID of a + * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID of a * {@link NetworkSecurityGroup}. * **/ @@ -500,7 +502,7 @@ public static SourceType create(String key) { * {@link Service} (the rule is for traffic coming from a * particular `Service` through a service gateway). *

- * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID of a + * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID of a * {@link NetworkSecurityGroup}. * **/ 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 2f47aa65543..77fafb3d459 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 @@ -291,9 +291,10 @@ public static LifecycleState create(String key) { LifecycleState lifecycleState; /** - * The OCID of the route table the service gateway is using. For information about why you - * would associate a route table with a service gateway, see - * [Transit Routing: Private Access to Oracle Services Network](https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm). + * The OCID of the route table the service gateway is using. + *

+ * For information about why you would associate a route table with a service gateway, see + * [Transit Routing: Private Access to Oracle Services](https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("routeTableId") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Subnet.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Subnet.java index 4038d604aa9..8291507fdbb 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Subnet.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Subnet.java @@ -379,7 +379,8 @@ public static Builder builder() { /** * For an IPv6-enabled subnet, this is the IPv6 CIDR block for the subnet's private IP address - * space. The subnet size is always /64. + * space. The subnet size is always /64. Note that IPv6 addressing is currently supported only + * in the Government Cloud. *

* Example: `2001:0db8:0123:1111::/64` * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateConsoleHistoryDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateConsoleHistoryDetails.java index 6f249930a6b..38f871742ec 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateConsoleHistoryDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateConsoleHistoryDetails.java @@ -93,6 +93,7 @@ public static Builder builder() { /** * A user-friendly name. Does not have to be unique, and it's changeable. + * Avoid entering confidential information. * **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateDrgAttachmentDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateDrgAttachmentDetails.java index 2413a16857d..796a2399483 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateDrgAttachmentDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateDrgAttachmentDetails.java @@ -78,9 +78,12 @@ public static Builder builder() { String displayName; /** - * The OCID of the route table the DRG attachment will use. For information about why you - * would associate a route table with a DRG attachment, see - * [Advanced Scenario: Transit Routing](https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm). + * The OCID of the route table the DRG attachment will use. + *

+ * For information about why you would associate a route table with a DRG attachment, see: + *

+ * [Transit Routing: Access to Multiple VCNs in Same Region](https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm) + * * [Transit Routing: Private Access to Oracle Services](https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm) * **/ @com.fasterxml.jackson.annotation.JsonProperty("routeTableId") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstancePoolDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstancePoolDetails.java index 482c07322ca..e74f242d5da 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstancePoolDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstancePoolDetails.java @@ -131,7 +131,9 @@ public static Builder builder() { java.util.Map> definedTags; /** - * The user-friendly name. Does not have to be unique. + * A user-friendly name for the instance pool. Does not have to be unique, and it's + * changeable. Avoid entering confidential information. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") String displayName; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateLocalPeeringGatewayDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateLocalPeeringGatewayDetails.java index d590b51750e..b0cf295ec0a 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateLocalPeeringGatewayDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateLocalPeeringGatewayDetails.java @@ -121,9 +121,10 @@ public static Builder builder() { java.util.Map freeformTags; /** - * The OCID of the route table the LPG will use. For information about why you - * would associate a route table with an LPG, see - * [Advanced Scenario: Transit Routing](https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm). + * The OCID of the route table the LPG will use. + *

+ * For information about why you would associate a route table with an LPG, see + * [Transit Routing: Access to Multiple VCNs in Same Region](https://docs.cloud.oracle.com/Content/Network/Tasks/transitrouting.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("routeTableId") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateNetworkSecurityGroupDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateNetworkSecurityGroupDetails.java index d8dab6fea5b..fd29cb5b8ae 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateNetworkSecurityGroupDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateNetworkSecurityGroupDetails.java @@ -93,6 +93,8 @@ public static Builder builder() { /** * 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; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateSecurityRuleDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateSecurityRuleDetails.java index a7af52c5621..30eefb60ad6 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateSecurityRuleDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateSecurityRuleDetails.java @@ -184,7 +184,7 @@ public static Builder builder() { } /** - * An optional description of your choice for the rule. + * An optional description of your choice for the rule. Avoid entering confidential information. * **/ @com.fasterxml.jackson.annotation.JsonProperty("description") @@ -197,6 +197,7 @@ public static Builder builder() { * Allowed values: *

* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + * Note that IPv6 addressing is currently supported only in the Government Cloud. *

* The `cidrBlock` value for a {@link Service}, if you're * setting up a security rule for traffic destined for a particular `Service` through @@ -372,6 +373,7 @@ public static Direction create(String key) { * Allowed values: *

* An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + * Note that IPv6 addressing is currently supported only in the Government Cloud. *

* The `cidrBlock` value for a {@link Service}, if you're * setting up a security rule for traffic coming from a particular `Service` through @@ -393,7 +395,7 @@ public static Direction create(String key) { * {@link Service} (the rule is for traffic coming from a * particular `Service` through a service gateway). *

- * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID of a + * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID of a * {@link NetworkSecurityGroup}. * **/ @@ -439,7 +441,7 @@ public static SourceType create(String key) { * {@link Service} (the rule is for traffic coming from a * particular `Service` through a service gateway). *

- * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID of a + * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID of a * {@link NetworkSecurityGroup}. * **/ 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 a11fd899382..c09f6e555b2 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 @@ -156,9 +156,10 @@ public static Builder builder() { java.util.Map freeformTags; /** - * The OCID of the route table the service gateway will use. For information about why you - * would associate a route table with a service gateway, see - * [Transit Routing: Private Access to Oracle Services Network](https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm). + * The OCID of the route table the service gateway will use. + *

+ * For information about why you would associate a route table with a service gateway, see + * [Transit Routing: Private Access to Oracle Services](https://docs.cloud.oracle.com/Content/Network/Tasks/transitroutingoracleservices.htm). * **/ @com.fasterxml.jackson.annotation.JsonProperty("routeTableId") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVnicDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVnicDetails.java index b53ea09b388..20fd0387abe 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVnicDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVnicDetails.java @@ -129,6 +129,8 @@ public static Builder builder() { /** * 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; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeBackupDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeBackupDetails.java index 86899d2a972..1ab04a2266f 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeBackupDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeBackupDetails.java @@ -92,7 +92,7 @@ public static Builder builder() { java.util.Map> definedTags; /** - * A friendly user-specified name for the volume backup. + * A user-friendly name for the volume backup. * Avoid entering confidential information. * **/ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeGroupBackupDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeGroupBackupDetails.java index aa24d137734..9c93ace64ea 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeGroupBackupDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeGroupBackupDetails.java @@ -92,7 +92,8 @@ public static Builder builder() { java.util.Map> definedTags; /** - * A friendly user-specified name for the volume group backup. + * A user-friendly name for the volume group backup. Avoid entering confidential information. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") String displayName; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeGroupDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeGroupDetails.java index e4164a31cf6..314530237b2 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeGroupDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVolumeGroupDetails.java @@ -102,7 +102,8 @@ public static Builder builder() { java.util.Map> definedTags; /** - * A user-friendly name for the volume group. + * A user-friendly name for the volume group. Avoid entering confidential information. + * **/ @com.fasterxml.jackson.annotation.JsonProperty("displayName") String displayName; diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java index 49aab2e2629..c6271f98150 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java @@ -314,7 +314,8 @@ public static Builder builder() { * For an IPv6-enabled VCN, this is the IPv6 CIDR block for the VCN's private IP address space. * The VCN size is always /48. If you don't provide a value when creating the VCN, Oracle * provides one and uses that *same* CIDR for the `ipv6PublicCidrBlock`. If you do provide a - * value, Oracle provides a *different* CIDR for the `ipv6PublicCidrBlock`. + * value, Oracle provides a *different* CIDR for the `ipv6PublicCidrBlock`. Note that IPv6 + * addressing is currently supported only in the Government Cloud. *

* Example: `2001:0db8:0123::/48` * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeDhcpOptionsCompartmentRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeDhcpOptionsCompartmentRequest.java new file mode 100644 index 00000000000..f6119145f2e --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeDhcpOptionsCompartmentRequest.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2016, 2019, 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 ChangeDhcpOptionsCompartmentRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID for the set of DHCP options. + */ + private String dhcpId; + + /** + * Request to change the compartment of a set of DHCP Options. + */ + private ChangeDhcpOptionsCompartmentDetails changeDhcpOptionsCompartmentDetails; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * 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; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeDhcpOptionsCompartmentRequest o) { + dhcpId(o.getDhcpId()); + changeDhcpOptionsCompartmentDetails(o.getChangeDhcpOptionsCompartmentDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeDhcpOptionsCompartmentRequest 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 ChangeDhcpOptionsCompartmentRequest + */ + public ChangeDhcpOptionsCompartmentRequest build() { + ChangeDhcpOptionsCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeInternetGatewayCompartmentRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeInternetGatewayCompartmentRequest.java new file mode 100644 index 00000000000..ce572233b89 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeInternetGatewayCompartmentRequest.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2016, 2019, 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 ChangeInternetGatewayCompartmentRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the internet gateway. + */ + private String igId; + + /** + * Request to change the compartment of an internet gateway. + */ + private ChangeInternetGatewayCompartmentDetails changeInternetGatewayCompartmentDetails; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * 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; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeInternetGatewayCompartmentRequest o) { + igId(o.getIgId()); + changeInternetGatewayCompartmentDetails(o.getChangeInternetGatewayCompartmentDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeInternetGatewayCompartmentRequest 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 ChangeInternetGatewayCompartmentRequest + */ + public ChangeInternetGatewayCompartmentRequest build() { + ChangeInternetGatewayCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeLocalPeeringGatewayCompartmentRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeLocalPeeringGatewayCompartmentRequest.java new file mode 100644 index 00000000000..47e4b4eaf8f --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeLocalPeeringGatewayCompartmentRequest.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2019, 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 ChangeLocalPeeringGatewayCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the local peering gateway. + */ + private String localPeeringGatewayId; + + /** + * Request to change the compartment of a given local peering gateway. + */ + private ChangeLocalPeeringGatewayCompartmentDetails changeLocalPeeringGatewayCompartmentDetails; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * 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; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeLocalPeeringGatewayCompartmentRequest o) { + localPeeringGatewayId(o.getLocalPeeringGatewayId()); + changeLocalPeeringGatewayCompartmentDetails( + o.getChangeLocalPeeringGatewayCompartmentDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeLocalPeeringGatewayCompartmentRequest 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 ChangeLocalPeeringGatewayCompartmentRequest + */ + public ChangeLocalPeeringGatewayCompartmentRequest build() { + ChangeLocalPeeringGatewayCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeNetworkSecurityGroupCompartmentRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeNetworkSecurityGroupCompartmentRequest.java new file mode 100644 index 00000000000..8e6cfc56ae0 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangeNetworkSecurityGroupCompartmentRequest.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2016, 2019, 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 ChangeNetworkSecurityGroupCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security group. + */ + private String networkSecurityGroupId; + + /** + * Request to change the compartment of a network security group. + */ + private ChangeNetworkSecurityGroupCompartmentDetails + changeNetworkSecurityGroupCompartmentDetails; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * 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; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeNetworkSecurityGroupCompartmentRequest o) { + networkSecurityGroupId(o.getNetworkSecurityGroupId()); + changeNetworkSecurityGroupCompartmentDetails( + o.getChangeNetworkSecurityGroupCompartmentDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeNetworkSecurityGroupCompartmentRequest 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 ChangeNetworkSecurityGroupCompartmentRequest + */ + public ChangeNetworkSecurityGroupCompartmentRequest build() { + ChangeNetworkSecurityGroupCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangePublicIpCompartmentRequest.java b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangePublicIpCompartmentRequest.java new file mode 100644 index 00000000000..cba6c20f00b --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/requests/ChangePublicIpCompartmentRequest.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2016, 2019, 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 ChangePublicIpCompartmentRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the public IP. + */ + private String publicIpId; + + /** + * Request to change the compartment of a Public IP. + */ + private ChangePublicIpCompartmentDetails changePublicIpCompartmentDetails; + + /** + * Unique identifier for the request. + * If you need to contact Oracle about a particular request, please provide the request ID. + * + */ + private String opcRequestId; + + /** + * 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; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangePublicIpCompartmentRequest o) { + publicIpId(o.getPublicIpId()); + changePublicIpCompartmentDetails(o.getChangePublicIpCompartmentDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangePublicIpCompartmentRequest 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 ChangePublicIpCompartmentRequest + */ + public ChangePublicIpCompartmentRequest build() { + ChangePublicIpCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeDhcpOptionsCompartmentResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeDhcpOptionsCompartmentResponse.java new file mode 100644 index 00000000000..6f19fc4cf0e --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeDhcpOptionsCompartmentResponse.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2016, 2019, 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 ChangeDhcpOptionsCompartmentResponse { + + /** + * 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; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeDhcpOptionsCompartmentResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeInstanceCompartmentResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeInstanceCompartmentResponse.java index 123a8b29cd3..b8980cc8ace 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeInstanceCompartmentResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeInstanceCompartmentResponse.java @@ -24,7 +24,7 @@ public class ChangeInstanceCompartmentResponse { private String opcRequestId; /** - * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} + * The OCID of the work request. Use [GetWorkRequest](https://docs.cloud.oracle.com/api/#/en/workrequests/20160918/WorkRequest/GetWorkRequest) * with this ID to track the status of the request. * */ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeInternetGatewayCompartmentResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeInternetGatewayCompartmentResponse.java new file mode 100644 index 00000000000..dd9491fbb95 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeInternetGatewayCompartmentResponse.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2016, 2019, 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 ChangeInternetGatewayCompartmentResponse { + + /** + * 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; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeInternetGatewayCompartmentResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeLocalPeeringGatewayCompartmentResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeLocalPeeringGatewayCompartmentResponse.java new file mode 100644 index 00000000000..dc092aa906f --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeLocalPeeringGatewayCompartmentResponse.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2016, 2019, 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 ChangeLocalPeeringGatewayCompartmentResponse { + + /** + * 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; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeLocalPeeringGatewayCompartmentResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeNetworkSecurityGroupCompartmentResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeNetworkSecurityGroupCompartmentResponse.java new file mode 100644 index 00000000000..20158d951fc --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeNetworkSecurityGroupCompartmentResponse.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2016, 2019, 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 ChangeNetworkSecurityGroupCompartmentResponse { + + /** + * 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; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeNetworkSecurityGroupCompartmentResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangePublicIpCompartmentResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangePublicIpCompartmentResponse.java new file mode 100644 index 00000000000..0f58555f209 --- /dev/null +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangePublicIpCompartmentResponse.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2016, 2019, 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 ChangePublicIpCompartmentResponse { + + /** + * 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; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangePublicIpCompartmentResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeSubnetCompartmentResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeSubnetCompartmentResponse.java index 06fc5748bb4..9a4208da654 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeSubnetCompartmentResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeSubnetCompartmentResponse.java @@ -24,7 +24,7 @@ public class ChangeSubnetCompartmentResponse { private String opcRequestId; /** - * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} + * The OCID of the work request. Use [GetWorkRequest](https://docs.cloud.oracle.com/api/#/en/workrequests/20160918/WorkRequest/GetWorkRequest) * with this ID to track the status of the request. * */ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeVcnCompartmentResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeVcnCompartmentResponse.java index 9037b9cbde6..20f940de273 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeVcnCompartmentResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ChangeVcnCompartmentResponse.java @@ -24,7 +24,7 @@ public class ChangeVcnCompartmentResponse { private String opcRequestId; /** - * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} + * The OCID of the work request. Use [GetWorkRequest](https://docs.cloud.oracle.com/api/#/en/workrequests/20160918/WorkRequest/GetWorkRequest) * with this ID to track the status of the request. * */ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateImageResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateImageResponse.java index da6c3dbc5f9..4d5d87835c3 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateImageResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/CreateImageResponse.java @@ -24,7 +24,7 @@ public class CreateImageResponse { private String opcRequestId; /** - * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} + * The OCID of the work request. Use [GetWorkRequest](https://docs.cloud.oracle.com/api/#/en/workrequests/20160918/WorkRequest/GetWorkRequest) * with this ID to track the status of the request. * */ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ExportImageResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ExportImageResponse.java index b71b2a38f48..d17ebc42b5e 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/ExportImageResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/ExportImageResponse.java @@ -24,7 +24,7 @@ public class ExportImageResponse { private String opcRequestId; /** - * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} + * The OCID of the work request. Use [GetWorkRequest](https://docs.cloud.oracle.com/api/#/en/workrequests/20160918/WorkRequest/GetWorkRequest) * with this ID to track the status of the request. * */ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/responses/LaunchInstanceResponse.java b/bmc-core/src/main/java/com/oracle/bmc/core/responses/LaunchInstanceResponse.java index 177b19e5407..0b1918ff074 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/responses/LaunchInstanceResponse.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/responses/LaunchInstanceResponse.java @@ -24,7 +24,7 @@ public class LaunchInstanceResponse { private String opcRequestId; /** - * The OCID of the work request. Use {@link #getWorkRequest(GetWorkRequestRequest) getWorkRequest} + * The OCID of the work request. Use [GetWorkRequest](https://docs.cloud.oracle.com/api/#/en/workrequests/20160918/WorkRequest/GetWorkRequest) * with this ID to track the status of the request. * */ diff --git a/bmc-database/pom.xml b/bmc-database/pom.xml index e3559162724..c9fe3054cb7 100644 --- a/bmc-database/pom.xml +++ b/bmc-database/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-dns/pom.xml b/bmc-dns/pom.xml index 0968ec97ae4..4aa26c52b3f 100644 --- a/bmc-dns/pom.xml +++ b/bmc-dns/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-dts/pom.xml b/bmc-dts/pom.xml index 9bcfe737e90..a088105e2ea 100644 --- a/bmc-dts/pom.xml +++ b/bmc-dts/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-dts @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 \ No newline at end of file diff --git a/bmc-email/pom.xml b/bmc-email/pom.xml index 5f459ea686a..88c67304de0 100644 --- a/bmc-email/pom.xml +++ b/bmc-email/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-events/pom.xml b/bmc-events/pom.xml index 97ec882dc41..215d92aaf30 100644 --- a/bmc-events/pom.xml +++ b/bmc-events/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-events @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 \ No newline at end of file diff --git a/bmc-examples/pom.xml b/bmc-examples/pom.xml index 64ed01c235c..85f389b5765 100644 --- a/bmc-examples/pom.xml +++ b/bmc-examples/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-examples @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 1.6.0 + 1.6.1 pom import diff --git a/bmc-examples/src/main/java/BudgetExample.java b/bmc-examples/src/main/java/BudgetExample.java index 5c3f3609abe..4f19b496f0b 100644 --- a/bmc-examples/src/main/java/BudgetExample.java +++ b/bmc-examples/src/main/java/BudgetExample.java @@ -33,7 +33,6 @@ import com.oracle.bmc.budget.responses.UpdateAlertRuleResponse; import com.oracle.bmc.budget.responses.UpdateBudgetResponse; -import com.oracle.bmc.http.ResteasyClientConfigurator; import org.apache.commons.lang3.StringUtils; import java.math.BigDecimal; @@ -112,7 +111,6 @@ public static void main(String[] args) throws Exception { final BudgetClient budgetClient = BudgetClient.builder() - .additionalClientConfigurator(new ResteasyClientConfigurator()) .build( new ConfigFileAuthenticationDetailsProvider( CONFIG_LOCATION, CONFIG_PROFILE)); diff --git a/bmc-examples/src/main/java/InstancePrincipalsAuthenticationDetailsProviderWithResteasyClientExample.java b/bmc-examples/src/main/java/InstancePrincipalsAuthenticationDetailsProviderWithResteasyClientExample.java index 087e749102e..eedab84c7a7 100644 --- a/bmc-examples/src/main/java/InstancePrincipalsAuthenticationDetailsProviderWithResteasyClientExample.java +++ b/bmc-examples/src/main/java/InstancePrincipalsAuthenticationDetailsProviderWithResteasyClientExample.java @@ -23,10 +23,10 @@ */ public class InstancePrincipalsAuthenticationDetailsProviderWithResteasyClientExample { - public static void main(String[] args) throws Exception { - // The following line is only necessary for this example because we the configuration in - // resources/META-INF/services/javax.ws.rs.client.ClientBuilder. If you are using Resteasy by default, this line - // is not necessary + public static void main(String[] args) { + // The following line is only necessary for this example because of our configuration in + // resources/META-INF/services/javax.ws.rs.client.ClientBuilder + // which enables Jersey by default. If you are using Resteasy by default, this line is not necessary System.setProperty( ClientBuilder.JAXRS_DEFAULT_CLIENT_BUILDER_PROPERTY, "org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder"); diff --git a/bmc-examples/src/main/java/MoveCompartmentExample.java b/bmc-examples/src/main/java/MoveCompartmentExample.java index 9aefa3a2def..24f580688b0 100644 --- a/bmc-examples/src/main/java/MoveCompartmentExample.java +++ b/bmc-examples/src/main/java/MoveCompartmentExample.java @@ -3,7 +3,6 @@ */ import com.oracle.bmc.auth.AuthenticationDetailsProvider; import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; -import com.oracle.bmc.http.ResteasyClientConfigurator; import com.oracle.bmc.identity.Identity; import com.oracle.bmc.identity.IdentityClient; import com.oracle.bmc.identity.model.Compartment; diff --git a/bmc-examples/src/main/java/ResteasyClientExample.java b/bmc-examples/src/main/java/ResteasyClientExample.java index 2a2b276d63a..e18efe7639f 100644 --- a/bmc-examples/src/main/java/ResteasyClientExample.java +++ b/bmc-examples/src/main/java/ResteasyClientExample.java @@ -43,9 +43,9 @@ public static void main(String[] args) throws Exception { final AuthenticationDetailsProvider provider = new ConfigFileAuthenticationDetailsProvider(configFile); - // The following line is only necessary for this example because we the configuration in - // resources/META-INF/services/javax.ws.rs.client.ClientBuilder. If you are using Resteasy by default, this line - // is not necessary + // The following line is only necessary for this example because of our configuration in + // resources/META-INF/services/javax.ws.rs.client.ClientBuilder + // which enables Jersey by default. If you are using Resteasy by default, this line is not necessary System.setProperty( ClientBuilder.JAXRS_DEFAULT_CLIENT_BUILDER_PROPERTY, "org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder"); diff --git a/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java b/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java index 2d2512a2565..8a393d2901b 100644 --- a/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java +++ b/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java @@ -6,39 +6,21 @@ import com.oracle.bmc.auth.AuthenticationDetailsProvider; import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; import com.oracle.bmc.http.ResteasyClientConfigurator; -import com.oracle.bmc.identity.IdentityAsyncClient; -import com.oracle.bmc.identity.IdentityClient; -import com.oracle.bmc.identity.model.AvailabilityDomain; -import com.oracle.bmc.identity.model.CreateUserDetails; -import com.oracle.bmc.identity.model.UpdateUserDetails; -import com.oracle.bmc.identity.requests.CreateUserRequest; -import com.oracle.bmc.identity.requests.DeleteUserRequest; -import com.oracle.bmc.identity.requests.GetUserRequest; -import com.oracle.bmc.identity.requests.ListAvailabilityDomainsRequest; -import com.oracle.bmc.identity.requests.UpdateUserRequest; -import com.oracle.bmc.identity.responses.CreateUserResponse; -import com.oracle.bmc.identity.responses.GetUserResponse; -import com.oracle.bmc.identity.responses.ListAvailabilityDomainsResponse; -import com.oracle.bmc.identity.responses.UpdateUserResponse; import com.oracle.bmc.objectstorage.ObjectStorage; -import com.oracle.bmc.objectstorage.ObjectStorageAsync; import com.oracle.bmc.objectstorage.ObjectStorageAsyncClient; import com.oracle.bmc.objectstorage.ObjectStorageClient; -import com.oracle.bmc.objectstorage.model.BucketSummary; import com.oracle.bmc.objectstorage.model.CreateBucketDetails; import com.oracle.bmc.objectstorage.requests.CreateBucketRequest; import com.oracle.bmc.objectstorage.requests.DeleteBucketRequest; import com.oracle.bmc.objectstorage.requests.DeleteObjectRequest; import com.oracle.bmc.objectstorage.requests.GetNamespaceRequest; import com.oracle.bmc.objectstorage.requests.GetObjectRequest; -import com.oracle.bmc.objectstorage.requests.ListBucketsRequest; import com.oracle.bmc.objectstorage.requests.PutObjectRequest; import com.oracle.bmc.objectstorage.responses.CreateBucketResponse; import com.oracle.bmc.objectstorage.responses.DeleteBucketResponse; import com.oracle.bmc.objectstorage.responses.DeleteObjectResponse; import com.oracle.bmc.objectstorage.responses.GetNamespaceResponse; import com.oracle.bmc.objectstorage.responses.GetObjectResponse; -import com.oracle.bmc.objectstorage.responses.ListBucketsResponse; import com.oracle.bmc.objectstorage.responses.PutObjectResponse; import com.oracle.bmc.responses.AsyncHandler; import lombok.extern.slf4j.Slf4j; @@ -51,6 +33,10 @@ /** * An example to demonstrate how to use resteasy client with JavaSDK. + * + * When running this example, comment out the following line in the bmc-examples/pom.xml file: + * + * provided */ @Slf4j public class ResteasyClientWithObjectStorageExample { @@ -66,9 +52,9 @@ public static void main(String[] args) throws Exception { final AuthenticationDetailsProvider provider = new ConfigFileAuthenticationDetailsProvider(configFile); - // The following line is only necessary for this example because we the configuration in - // resources/META-INF/services/javax.ws.rs.client.ClientBuilder. If you are using Resteasy by default, this line - // is not necessary + // The following line is only necessary for this example because of our configuration in + // resources/META-INF/services/javax.ws.rs.client.ClientBuilder + // which enables Jersey by default. If you are using Resteasy by default, this line is not necessary System.setProperty( ClientBuilder.JAXRS_DEFAULT_CLIENT_BUILDER_PROPERTY, "org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder"); diff --git a/bmc-examples/src/main/java/WaasAddressListExample.java b/bmc-examples/src/main/java/WaasAddressListExample.java new file mode 100644 index 00000000000..d2e116ed64a --- /dev/null +++ b/bmc-examples/src/main/java/WaasAddressListExample.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +import com.oracle.bmc.ConfigFileReader; +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.identity.IdentityClient; +import com.oracle.bmc.waas.WaasClient; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.ChangeAddressListCompartmentResponse; +import com.oracle.bmc.waas.responses.CreateAddressListResponse; +import com.oracle.bmc.waas.responses.GetAddressListResponse; + +import java.util.ArrayList; +import java.util.List; + +public class WaasAddressListExample { + + /** + * Configuration for the example, replace these with your own values. + */ + private static final String CONFIG_LOCATION = "~/.oci/config"; + private static final String CONFIG_PROFILE = "DEFAULT"; + private static final String COMPARTMENT_ID = "ocid1.compartment.oc1...aaaaaa"; + private static final String TARGET_COMPARTMENT_ID = "ocid1.compartment.oc1...xxxxxx"; + + /** + * The entry point for the example. + * + * @param args Arguments to provide to the example. The following arguments are expected: + *

    + *
  • + * The OCID of the compartment where the WAAS policy will be created. + *

    + * Note: Your tenancy OCID will be read + * from your configuration file + *

    + *
  • + *
  • + * The web application domain that will be pointed to the CNAME of the + * Web Application Firewall. + *
  • + *
  • + * The origin domain that the Web Application Firewall will forward traffic to. + *
  • + *
  • + * Optionally: The path to the PEM encoded RSA private key used by the + * Web Application Firewall to accept HTTPS traffic for your domain + *
  • + *
  • + * Optionally: The path to the PEM encoded SSL certificate used by the + * Web Application Firewall to accept HTTPS traffic for your domain + *
  • + *
+ * + * The request flow should look like the following: + * User -> `domain` -> OCI Web Application Firewall -> `origin` + */ + public static void main(String[] args) throws Exception { + final ConfigFileReader.ConfigFile configFile = + ConfigFileReader.parse(CONFIG_LOCATION, CONFIG_PROFILE); + final AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(configFile); + final WaasClient waasClient = new WaasClient(provider); + final IdentityClient identityClient = new IdentityClient(provider); + + AddressList addressList = null; + try { + addressList = createAddressList(waasClient, COMPARTMENT_ID, "BlockedAddresses"); + + listAddressLists(waasClient, COMPARTMENT_ID); + + changeAddressListCompartment(waasClient, addressList.getId(), TARGET_COMPARTMENT_ID); + + getAddressList(waasClient, addressList.getId()); + + deleteAddressList(waasClient, addressList.getId()); + + } finally { + + waasClient.close(); + identityClient.close(); + } + } + + /** + * Creates a new Address List + * + * @param waasClient the client used to communicate with the WAAS service + * @param compartmentId the OCID of the compartment that owns the Address List + * @param name text used as a displayName in the created resource + * + * @return the created Address List + */ + private static AddressList createAddressList( + final WaasClient waasClient, final String compartmentId, final String name) { + + final List addresses = new ArrayList(); + addresses.add("127.0.0.1"); + + System.out.println("Creating Address List"); + System.out.println("======================="); + + CreateAddressListDetails.Builder addressListDetails = + CreateAddressListDetails.builder() + .compartmentId(compartmentId) + .displayName(name) + .addresses(addresses); + + final CreateAddressListResponse addressListResponse = + waasClient.createAddressList( + CreateAddressListRequest.builder() + .createAddressListDetails(addressListDetails.build()) + .build()); + + System.out.println("Address List has been created " + addressListResponse.toString()); + System.out.println(); + + return addressListResponse.getAddressList(); + } + + /** + * Deletes a WAAS policy and waits for it to be deleted + * + * @param waasClient the client used to communicate with the WAAS service + * @param addressListId the custom protection rule OCID to delete + */ + private static void deleteAddressList(final WaasClient waasClient, final String addressListId) + throws Exception { + + waasClient.deleteAddressList( + DeleteAddressListRequest.builder().addressListId(addressListId).build()); + + waasClient + .getWaiters() + .forAddressList( + GetAddressListRequest.builder().addressListId(addressListId).build(), + LifecycleStates.Deleted) + .execute(); + + System.out.println("Address List deleted"); + } + + /** + * Lists Address Lists. + * + * @param waasClient the client used to communicate with the WAAS service + * @param compartmentId the OCID of the compartment to list resources in + */ + private static void listAddressLists(WaasClient waasClient, final String compartmentId) { + + System.out.println("Listing Address Lists"); + System.out.println("====================="); + + ListAddressListsRequest listAddressListsRequest = + ListAddressListsRequest.builder().compartmentId(compartmentId).build(); + + Iterable addressListIterator = + waasClient.getPaginators().listAddressListsRecordIterator(listAddressListsRequest); + + for (AddressListSummary summary : addressListIterator) { + System.out.println("Address List name: " + summary.getDisplayName()); + } + } + + /** + * Changes the compartment for an existing Address List + * + * @param waasClient client used to communicate with the service + * @param addressListId ID of the Address List to be updated + * @param targetCompartmentId target compartment to which the Address List will be moved + */ + private static void changeAddressListCompartment( + WaasClient waasClient, final String addressListId, final String targetCompartmentId) { + ChangeAddressListCompartmentResponse response = + waasClient.changeAddressListCompartment( + ChangeAddressListCompartmentRequest.builder() + .addressListId(addressListId) + .changeAddressListCompartmentDetails( + ChangeAddressListCompartmentDetails.builder() + .compartmentId(targetCompartmentId) + .build()) + .build()); + + System.out.println("Moved Address List " + response.toString()); + } + + /** + * Gets Address List. + * + * @param waasClient the client used to communicate with the WAAS service + * @param addressListId the OCID of the Address List + */ + private static AddressList getAddressList(WaasClient waasClient, final String addressListId) { + + GetAddressListResponse addressListResponse = + waasClient.getAddressList( + GetAddressListRequest.builder().addressListId(addressListId).build()); + + System.out.println( + "Found address list: " + addressListResponse.getAddressList().getDisplayName()); + return addressListResponse.getAddressList(); + } +} diff --git a/bmc-examples/src/main/java/WaasCustomProtectionRuleExample.java b/bmc-examples/src/main/java/WaasCustomProtectionRuleExample.java new file mode 100644 index 00000000000..b3b73591720 --- /dev/null +++ b/bmc-examples/src/main/java/WaasCustomProtectionRuleExample.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +import com.oracle.bmc.ConfigFileReader; +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.identity.IdentityClient; +import com.oracle.bmc.waas.WaasClient; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; + +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class WaasCustomProtectionRuleExample { + + /** + * Configuration for the example, replace these with your own values. + */ + private static final String CONFIG_LOCATION = "~/.oci/config"; + private static final String CONFIG_PROFILE = "DEFAULT"; + private static final String CUSTOM_PROTECTION_RULE_TEMPLATE_LOCATION = "~/.oci/template"; + private static final String COMPARTMENT_ID = "ocid1.compartment.oc1...aaaaaa"; + private static final String TARGET_COMPARTMENT_ID = "ocid1.compartment.oc1...xxxxxx"; + + /** + * The entry point for the example. + * + * @param args Arguments to provide to the example. The following arguments are expected: + *
    + *
  • + * The OCID of the compartment where the WAAS policy will be created. + *

    + * Note: Your tenancy OCID will be read + * from your configuration file + *

    + *
  • + *
  • + * The web application domain that will be pointed to the CNAME of the + * Web Application Firewall. + *
  • + *
  • + * The origin domain that the Web Application Firewall will forward traffic to. + *
  • + *
  • + * Optionally: The path to the PEM encoded RSA private key used by the + * Web Application Firewall to accept HTTPS traffic for your domain + *
  • + *
  • + * Optionally: The path to the PEM encoded SSL certificate used by the + * Web Application Firewall to accept HTTPS traffic for your domain + *
  • + *
+ * + * The request flow should look like the following: + * User -> `domain` -> OCI Web Application Firewall -> `origin` + */ + public static void main(String[] args) throws Exception { + final ConfigFileReader.ConfigFile configFile = + ConfigFileReader.parse(CONFIG_LOCATION, CONFIG_PROFILE); + final AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(configFile); + final WaasClient waasClient = new WaasClient(provider); + final IdentityClient identityClient = new IdentityClient(provider); + + String customProtectionRuleTemplate = + new String( + Files.readAllBytes(Paths.get(CUSTOM_PROTECTION_RULE_TEMPLATE_LOCATION)), + StandardCharsets.UTF_8); + + CustomProtectionRule customProtectionRule = null; + try { + customProtectionRule = + createCustomProtectionRule( + waasClient, COMPARTMENT_ID, "CustomRule", customProtectionRuleTemplate); + + listCustomProtectionRules(waasClient, COMPARTMENT_ID); + + changeCustomProtectionRuleCompartment( + waasClient, customProtectionRule.getId(), TARGET_COMPARTMENT_ID); + + getCustomProtectionRule(waasClient, customProtectionRule.getId()); + + deleteCustomProtectionRule(waasClient, customProtectionRule.getId()); + + } finally { + + waasClient.close(); + identityClient.close(); + } + } + + /** + * Creates a new Custom Protection Rule + * + * @param waasClient the client used to communicate with the WAAS service + * @param compartmentId the OCID of the compartment that owns the Address List + * @param name text used as a displayName in the created resource + * @param template protection rule template + * + * @return the created Custom Protection Rule + */ + private static CustomProtectionRule createCustomProtectionRule( + WaasClient waasClient, + final String compartmentId, + final String name, + final String template) { + + System.out.println("Creating new custom protection rule"); + System.out.println("==================================="); + + CreateCustomProtectionRuleDetails customProtectionRuleDetails = + CreateCustomProtectionRuleDetails.builder() + .compartmentId(compartmentId) + .displayName(name) + .template(template) + .build(); + + final CreateCustomProtectionRuleResponse customProtectionRuleResponse = + waasClient.createCustomProtectionRule( + CreateCustomProtectionRuleRequest.builder() + .createCustomProtectionRuleDetails(customProtectionRuleDetails) + .build()); + + System.out.println("New custom protection rule has been created"); + return customProtectionRuleResponse.getCustomProtectionRule(); + } + + /** + * Deletes a WAAS policy and waits for it to be deleted + * + * @param waasClient the client used to communicate with the WAAS service + * @param customProtectionRuleId the custom protection rule OCID to delete + */ + private static void deleteCustomProtectionRule( + WaasClient waasClient, final String customProtectionRuleId) { + waasClient.deleteCustomProtectionRule( + DeleteCustomProtectionRuleRequest.builder() + .customProtectionRuleId(customProtectionRuleId) + .build()); + + waasClient + .getWaiters() + .forCustomProtectionRule( + GetCustomProtectionRuleRequest.builder() + .customProtectionRuleId(customProtectionRuleId) + .build(), + LifecycleStates.Deleted); + + System.out.println("Custom protection rule deleted"); + } + + /** + * Gets Custom Protection Rule. + * + * @param waasClient the client used to communicate with the WAAS service + * @param customProtectionRuleId the OCID of the Custom Protection Rule + */ + private static CustomProtectionRule getCustomProtectionRule( + WaasClient waasClient, final String customProtectionRuleId) { + + GetCustomProtectionRuleResponse customProtectionRuleResponse = + waasClient.getCustomProtectionRule( + GetCustomProtectionRuleRequest.builder() + .customProtectionRuleId(customProtectionRuleId) + .build()); + + return customProtectionRuleResponse.getCustomProtectionRule(); + } + + /** + * Lists Custom Protection Rules of the compartment. + * + * @param waasClient the client used to communicate with the WAAS service + * @param compartmentId the OCID of the compartments to list resources to + */ + private static void listCustomProtectionRules( + WaasClient waasClient, final String compartmentId) { + + System.out.println("Listing Custom Protection rules"); + System.out.println("==============================="); + + ListCustomProtectionRulesRequest listCustomProtectionRulesRequest = + ListCustomProtectionRulesRequest.builder().compartmentId(compartmentId).build(); + + Iterable customProtectionRuleIterator = + waasClient + .getPaginators() + .listCustomProtectionRulesRecordIterator(listCustomProtectionRulesRequest); + + for (CustomProtectionRuleSummary summary : customProtectionRuleIterator) { + System.out.println("Custom protection rule: " + summary.getDisplayName()); + } + } + + /** + * Changes the compartment for an existing Custom Protection Rule + * + * @param waasClient client used to communicate with the service + * @param customProtectionRuleId ID of the Custom Protection Rule to be updated + * @param targetCompartmentId target compartment to which the Custom Protection Rule will be moved + */ + private static void changeCustomProtectionRuleCompartment( + WaasClient waasClient, + final String customProtectionRuleId, + final String targetCompartmentId) { + ChangeCustomProtectionRuleCompartmentResponse response = + waasClient.changeCustomProtectionRuleCompartment( + ChangeCustomProtectionRuleCompartmentRequest.builder() + .customProtectionRuleId(customProtectionRuleId) + .changeCustomProtectionRuleCompartmentDetails( + ChangeCustomProtectionRuleCompartmentDetails.builder() + .compartmentId(targetCompartmentId) + .build()) + .build()); + + System.out.println("Moved Custom Protection rule " + response.toString()); + } +} diff --git a/bmc-examples/src/main/java/WaasServiceExample.java b/bmc-examples/src/main/java/WaasServiceExample.java index d186069628d..76db5098319 100644 --- a/bmc-examples/src/main/java/WaasServiceExample.java +++ b/bmc-examples/src/main/java/WaasServiceExample.java @@ -1,7 +1,6 @@ /** * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. */ -import com.oracle.bmc.Region; import com.oracle.bmc.ConfigFileReader; import com.oracle.bmc.ConfigFileReader.ConfigFile; import com.oracle.bmc.auth.AuthenticationDetailsProvider; @@ -9,45 +8,21 @@ import com.oracle.bmc.identity.IdentityClient; import com.oracle.bmc.waas.WaasClient; import com.oracle.bmc.waas.WaasPaginators; -import com.oracle.bmc.waas.model.Captcha; -import com.oracle.bmc.waas.model.Certificate; -import com.oracle.bmc.waas.model.CreateCertificateDetails; -import com.oracle.bmc.waas.model.CreateWaasPolicyDetails; -import com.oracle.bmc.waas.model.LifecycleStates; -import com.oracle.bmc.waas.model.Origin; -import com.oracle.bmc.waas.model.PolicyConfig; -import com.oracle.bmc.waas.model.WaasPolicy; -import com.oracle.bmc.waas.model.WaasPolicySummary; -import com.oracle.bmc.waas.requests.CreateCertificateRequest; -import com.oracle.bmc.waas.requests.CreateWaasPolicyRequest; -import com.oracle.bmc.waas.requests.DeleteCertificateRequest; -import com.oracle.bmc.waas.requests.DeleteWaasPolicyRequest; -import com.oracle.bmc.waas.requests.GetCertificateRequest; -import com.oracle.bmc.waas.requests.GetWaasPolicyRequest; -import com.oracle.bmc.waas.requests.GetWorkRequestRequest; -import com.oracle.bmc.waas.requests.ListCaptchasRequest; -import com.oracle.bmc.waas.requests.ListWaasPoliciesRequest; -import com.oracle.bmc.waas.requests.UpdateCaptchasRequest; -import com.oracle.bmc.waas.responses.CreateCertificateResponse; -import com.oracle.bmc.waas.responses.CreateWaasPolicyResponse; -import com.oracle.bmc.waas.responses.GetWaasPolicyResponse; -import com.oracle.bmc.waas.responses.GetWorkRequestResponse; -import com.oracle.bmc.waas.responses.ListCaptchasResponse; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * This class demonstrates how to use the WAAS service in the Java SDK. This will cover: * *
    - *
  • Creating, retrieving, listing, and deleting WAAS policies
  • - *
  • Uploading, retrieving, listing, and deleting SSL certificates
  • + *
  • Creating, retrieving, listing, moving and deleting WAAS policies
  • + *
  • Uploading, retrieving, listing, moving and deleting SSL certificates
  • *
  • Creating and updating WAF protection rules
  • *
  • Updating challenges (CAPTCHAs, device fingerprints, etc.)
  • *
@@ -72,6 +47,7 @@ public class WaasServiceExample { private static final String CONFIG_LOCATION = "~/.oci/config"; private static final String CONFIG_PROFILE = "DEFAULT"; private static final String COMPARTMENT_ID = "ocid1.compartment.oc1...aaaaaa"; + private static final String TARGET_COMPARTMENT_ID = "ocid1.compartment.oc1...xxxxxx"; private static final String DOMAIN = "www.mydomain.test"; private static final String ORIGIN = "192.168.2.1"; private static final String KEY_PATH = "path/to/rsa_key"; @@ -141,6 +117,15 @@ public static void main(String[] args) throws Exception { listPolicies(waasClient, COMPARTMENT_ID, DOMAIN); + changePolicyCompartment(waasClient, policy.getId(), TARGET_COMPARTMENT_ID); + + listCachingRules(waasClient, policy.getId()); + + updateCachingRule( + waasClient, policy.getId(), "CacheRule", CachingRule.Action.BypassCache); + + changeCertificateCompartment(waasClient, certificate.getId(), TARGET_COMPARTMENT_ID); + addCaptcha( waasClient, policy.getId(), @@ -198,6 +183,30 @@ private static Certificate uploadCertificate( return createResponse.getCertificate(); } + /** + * Changes the compartment for an existing SSL Certificate + * + * @param waasClient client used to communicate with the service + * @param certificateId ID of the waasPolicy to be updated + * @param targetCompartment target compartment to which the LoadBalancer will be moved + */ + private static void changeCertificateCompartment( + final WaasClient waasClient, + final String certificateId, + final String targetCompartment) { + ChangeCertificateCompartmentResponse response = + waasClient.changeCertificateCompartment( + ChangeCertificateCompartmentRequest.builder() + .certificateId(certificateId) + .changeCertificateCompartmentDetails( + ChangeCertificateCompartmentDetails.builder() + .compartmentId(targetCompartment) + .build()) + .build()); + System.out.println("Moved SSL Certificate " + response.toString()); + System.out.println(); + } + /** * Creates a WAAS policy and waits for it to be come available. * @@ -221,9 +230,12 @@ private static WaasPolicy createPolicy( Map origins = new HashMap<>(); origins.put(origin, Origin.builder().uri(origin).httpPort(80).httpsPort(443).build()); + WafConfigDetails wafConfigDetails = WafConfigDetails.builder().origin(origin).build(); + CreateWaasPolicyDetails.Builder policyDetails = CreateWaasPolicyDetails.builder() .compartmentId(compartmentId) + .wafConfig(wafConfigDetails) .domain(domain) .origins(origins); @@ -293,6 +305,30 @@ private static void listPolicies( } } + /** + * Changes the compartment for an existing WAAS Policy + * + * @param waasClient client used to communicate with the service + * @param waasPolicyId ID of the waasPolicy to be updated + * @param targetCompartment target compartment to which the WAAS Policy will be moved + */ + private static void changePolicyCompartment( + final WaasClient waasClient, + final String waasPolicyId, + final String targetCompartment) { + ChangeWaasPolicyCompartmentResponse response = + waasClient.changeWaasPolicyCompartment( + ChangeWaasPolicyCompartmentRequest.builder() + .waasPolicyId(waasPolicyId) + .changeWaasPolicyCompartmentDetails( + ChangeWaasPolicyCompartmentDetails.builder() + .compartmentId(targetCompartment) + .build()) + .build()); + System.out.println("Moved WAAS Policy " + response.toString()); + System.out.println(); + } + /** * Deletes a WAAS policy and waits for it to be deleted * @@ -395,4 +431,73 @@ private static void listCaptchas(final WaasClient waasClient, final String polic System.out.println(captcha); } } + /** + * Update Caching Rule of the WAAS policy. + * + * @param waasClient the client used to communicate with the WAAS service + * @param waasPolicyId the OCID of the WAAS Policy to list resources of + * @param name text used as a name of the Caching Rule + * @param action the action to take on matched caching rules + */ + private static void updateCachingRule( + WaasClient waasClient, + final String waasPolicyId, + final String name, + final CachingRule.Action action) { + + ListCachingRulesRequest listCachingRulesRequest = + ListCachingRulesRequest.builder().waasPolicyId(waasPolicyId).build(); + + Iterable cachingRuleIterator = + waasClient.getPaginators().listCachingRulesRecordIterator(listCachingRulesRequest); + + for (CachingRuleSummary summary : cachingRuleIterator) { + if (summary.getName() == name) { + CachingRule cachingRule = + new CachingRule( + summary.getKey(), + summary.getName(), + action, + summary.getCachingDuration(), + summary.getIsClientCachingEnabled(), + summary.getCachingDuration(), + summary.getCriteria()); + UpdateCachingRulesRequest updateCachingRulesRequest = + UpdateCachingRulesRequest.builder() + .waasPolicyId(waasPolicyId) + .cachingRulesDetails(Arrays.asList(cachingRule)) + .build(); + } + } + } + + /** + * Lists Caching Rules of the WAAS policy. + * + * @param waasClient the client used to communicate with the WAAS service + * @param waasPolicyId the OCID of the WAAS Policy to list resources of + */ + private static void listCachingRules(WaasClient waasClient, final String waasPolicyId) { + + ListCachingRulesRequest listCachingRulesRequest = + ListCachingRulesRequest.builder().waasPolicyId(waasPolicyId).build(); + + Iterable cachingRuleIterator = + waasClient.getPaginators().listCachingRulesRecordIterator(listCachingRulesRequest); + + for (CachingRuleSummary summary : cachingRuleIterator) { + System.out.println("Caching rule: " + summary.getName()); + } + } + + /** + * Purge cache of the WAAS policy. + * + * @param waasClient the client used to communicate with the WAAS service + * @param waasPolicyId the OCID of the WAAS Policy to list resources of + */ + private static void purgeWaasPolicyCache(WaasClient waasClient, final String waasPolicyId) { + + waasClient.purgeCache(PurgeCacheRequest.builder().waasPolicyId(waasPolicyId).build()); + } } diff --git a/bmc-filestorage/pom.xml b/bmc-filestorage/pom.xml index 80745ab193d..a266c889325 100644 --- a/bmc-filestorage/pom.xml +++ b/bmc-filestorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFileSystemDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFileSystemDetails.java index 127ac16510c..c280faaf4c7 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFileSystemDetails.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/CreateFileSystemDetails.java @@ -70,6 +70,15 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -80,7 +89,8 @@ public CreateFileSystemDetails build() { compartmentId, displayName, freeformTags, - definedTags); + definedTags, + kmsKeyId); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -92,7 +102,8 @@ public Builder copy(CreateFileSystemDetails o) { .compartmentId(o.getCompartmentId()) .displayName(o.getDisplayName()) .freeformTags(o.getFreeformTags()) - .definedTags(o.getDefinedTags()); + .definedTags(o.getDefinedTags()) + .kmsKeyId(o.getKmsKeyId()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -150,6 +161,13 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("definedTags") java.util.Map> definedTags; + /** + * The OCID of KMS key used to encrypt the encryption keys associated with this file system. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + String kmsKeyId; + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystem.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystem.java index 2cbb469477f..7933c107a2e 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystem.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystem.java @@ -116,6 +116,15 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -130,7 +139,8 @@ public FileSystem build() { lifecycleState, timeCreated, freeformTags, - definedTags); + definedTags, + kmsKeyId); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -146,7 +156,8 @@ public Builder copy(FileSystem o) { .lifecycleState(o.getLifecycleState()) .timeCreated(o.getTimeCreated()) .freeformTags(o.getFreeformTags()) - .definedTags(o.getDefinedTags()); + .definedTags(o.getDefinedTags()) + .kmsKeyId(o.getKmsKeyId()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -284,6 +295,13 @@ public static LifecycleState create(String key) { @com.fasterxml.jackson.annotation.JsonProperty("definedTags") java.util.Map> definedTags; + /** + * The OCID of KMS key used to encrypt the encryption keys associated with this file system. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + String kmsKeyId; + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystemSummary.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystemSummary.java index 848f17862bb..3cffc30006e 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystemSummary.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/FileSystemSummary.java @@ -107,6 +107,15 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -121,7 +130,8 @@ public FileSystemSummary build() { lifecycleState, timeCreated, freeformTags, - definedTags); + definedTags, + kmsKeyId); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -137,7 +147,8 @@ public Builder copy(FileSystemSummary o) { .lifecycleState(o.getLifecycleState()) .timeCreated(o.getTimeCreated()) .freeformTags(o.getFreeformTags()) - .definedTags(o.getDefinedTags()); + .definedTags(o.getDefinedTags()) + .kmsKeyId(o.getKmsKeyId()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -275,6 +286,13 @@ public static LifecycleState create(String key) { @com.fasterxml.jackson.annotation.JsonProperty("definedTags") java.util.Map> definedTags; + /** + * The OCID of KMS key used to encrypt the encryption keys associated with this file system. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + String kmsKeyId; + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); } diff --git a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/UpdateFileSystemDetails.java b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/UpdateFileSystemDetails.java index 91573a7a8b8..23a084bb987 100644 --- a/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/UpdateFileSystemDetails.java +++ b/bmc-filestorage/src/main/java/com/oracle/bmc/filestorage/model/UpdateFileSystemDetails.java @@ -52,12 +52,21 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + private String kmsKeyId; + + public Builder kmsKeyId(String kmsKeyId) { + this.kmsKeyId = kmsKeyId; + this.__explicitlySet__.add("kmsKeyId"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public UpdateFileSystemDetails build() { UpdateFileSystemDetails __instance__ = - new UpdateFileSystemDetails(displayName, freeformTags, definedTags); + new UpdateFileSystemDetails(displayName, freeformTags, definedTags, kmsKeyId); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -67,7 +76,8 @@ public Builder copy(UpdateFileSystemDetails o) { Builder copiedBuilder = displayName(o.getDisplayName()) .freeformTags(o.getFreeformTags()) - .definedTags(o.getDefinedTags()); + .definedTags(o.getDefinedTags()) + .kmsKeyId(o.getKmsKeyId()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -110,6 +120,16 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("definedTags") java.util.Map> definedTags; + /** + * A KMS key OCID that will be associated with the given file system. If it is empty the Update operation will + * actually remove the KMS key, if there is one, from the given file system. Note that the old KMS key should + * still be enabled in KMS otherwise all the files in the file system encrypted with the old KMS key will no + * longer be accessible. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("kmsKeyId") + String kmsKeyId; + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); } diff --git a/bmc-full/pom.xml b/bmc-full/pom.xml index 2ffc191bce1..fbb875ce597 100644 --- a/bmc-full/pom.xml +++ b/bmc-full/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-full @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 1.6.0 + 1.6.1 pom import diff --git a/bmc-functions/pom.xml b/bmc-functions/pom.xml index c0fa8c59c56..508244525e7 100644 --- a/bmc-functions/pom.xml +++ b/bmc-functions/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-functions @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 \ No newline at end of file diff --git a/bmc-healthchecks/pom.xml b/bmc-healthchecks/pom.xml index 580170b5ff2..839dbb8a866 100644 --- a/bmc-healthchecks/pom.xml +++ b/bmc-healthchecks/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-healthchecks @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-identity/pom.xml b/bmc-identity/pom.xml index 8f3ff083a72..22215ef3e59 100644 --- a/bmc-identity/pom.xml +++ b/bmc-identity/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-keymanagement/pom.xml b/bmc-keymanagement/pom.xml index 735fb5e5489..3e2f99db70a 100644 --- a/bmc-keymanagement/pom.xml +++ b/bmc-keymanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-keymanagement @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-limits/pom.xml b/bmc-limits/pom.xml index 07bc3f68f21..89673687ede 100644 --- a/bmc-limits/pom.xml +++ b/bmc-limits/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-limits @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 \ No newline at end of file diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/Limits.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/Limits.java new file mode 100644 index 00000000000..3cc1286c47d --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/Limits.java @@ -0,0 +1,89 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits; + +import com.oracle.bmc.limits.requests.*; +import com.oracle.bmc.limits.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +public interface Limits extends AutoCloseable { + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * For a given compartmentId, resource limit name, and scope, returns the following: + * - the number of available resources associated with the given limit + * - the usage in the selected compartment for the given limit + * Note: not all resource limits support this API. If the value is not available, the API will return 404. + * + * @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. + */ + GetResourceAvailabilityResponse getResourceAvailability(GetResourceAvailabilityRequest request); + + /** + * Includes a list of resource limits that are currently supported. + * If the 'areQuotasSupported' property is true, you can create quota policies on top of this limit at the + * compartment level. + * + * @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. + */ + ListLimitDefinitionsResponse listLimitDefinitions(ListLimitDefinitionsRequest request); + + /** + * Includes a full list of resource limits belonging to a given service. + * + * @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. + */ + ListLimitValuesResponse listLimitValues(ListLimitValuesRequest request); + + /** + * Returns the list of supported services. + * This will include the programmatic service name, along with the friendly service name. + * + * @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. + */ + ListServicesResponse listServices(ListServicesRequest request); + + /** + * 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 + * resources/records, can be iterated through without having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + LimitsPaginators getPaginators(); +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsAsync.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsAsync.java new file mode 100644 index 00000000000..d6047b5e0c7 --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsAsync.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits; + +import com.oracle.bmc.limits.requests.*; +import com.oracle.bmc.limits.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +public interface LimitsAsync extends AutoCloseable { + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + *

+ * Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised. + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + *

+ * Note, this will first try to map the region ID to a known Region and call + * {@link #setRegion(Region) setRegion}. + *

+ * If no known Region could be determined, it will create an endpoint based on the + * default endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * For a given compartmentId, resource limit name, and scope, returns the following: + * - the number of available resources associated with the given limit + * - the usage in the selected compartment for the given limit + * Note: not all resource limits support this API. If the value is not available, the API will return 404. + * + * + * @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 getResourceAvailability( + GetResourceAvailabilityRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetResourceAvailabilityRequest, GetResourceAvailabilityResponse> + handler); + + /** + * Includes a list of resource limits that are currently supported. + * If the 'areQuotasSupported' property is true, you can create quota policies on top of this limit at the + * compartment level. + * + * + * @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 listLimitDefinitions( + ListLimitDefinitionsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListLimitDefinitionsRequest, ListLimitDefinitionsResponse> + handler); + + /** + * Includes a full list of resource limits belonging to a given service. + * + * + * @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 listLimitValues( + ListLimitValuesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Returns the list of supported services. + * This will include the programmatic service name, along with the friendly service name. + * + * + * @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 listServices( + ListServicesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsAsyncClient.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsAsyncClient.java new file mode 100644 index 00000000000..5c0ec27a46d --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsAsyncClient.java @@ -0,0 +1,603 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits; + +import java.util.Locale; +import com.oracle.bmc.limits.internal.http.*; +import com.oracle.bmc.limits.requests.*; +import com.oracle.bmc.limits.responses.*; + +/** + * Async client implementation for Limits service.
+ * There are two ways to use async client: + * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like + * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, + * because the stream will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, + * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler + * is used, it is still safe to use the Future to determine whether or not the request was completed via + * Future.isDone/isCancelled.
+ * Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.extern.slf4j.Slf4j +public class LimitsAsyncClient implements LimitsAsync { + /** + * Service instance for Limits. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("LIMITS") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://limits.{region}.oci.{secondLevelDomain}") + .build(); + + @lombok.Getter(value = lombok.AccessLevel.PACKAGE) + private final com.oracle.bmc.http.internal.RestClient client; + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public LimitsAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public LimitsAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public LimitsAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public LimitsAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public LimitsAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public LimitsAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public LimitsAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + com.oracle.bmc.http.internal.RestClientFactory restClientFactory = + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder() + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(additionalClientConfigurators) + .build(); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + this.client = restClientFactory.create(defaultRequestSigner, requestSigners, configuration); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public LimitsAsyncClient build( + @lombok.NonNull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + return new LimitsAsyncClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + additionalClientConfigurators, + endpoint); + } + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + client.setEndpoint(endpoint); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + com.google.common.base.Optional endpoint = region.getEndpoint(SERVICE); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(Locale.ENGLISH); + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public void close() { + client.close(); + } + + @Override + public java.util.concurrent.Future getResourceAvailability( + final GetResourceAvailabilityRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetResourceAvailabilityRequest, GetResourceAvailabilityResponse> + handler) { + LOG.trace("Called async getResourceAvailability"); + final GetResourceAvailabilityRequest interceptedRequest = + GetResourceAvailabilityConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetResourceAvailabilityConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetResourceAvailabilityResponse> + transformer = GetResourceAvailabilityConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + GetResourceAvailabilityRequest, GetResourceAvailabilityResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetResourceAvailabilityRequest, GetResourceAvailabilityResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, GetResourceAvailabilityResponse>( + 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 listLimitDefinitions( + final ListLimitDefinitionsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListLimitDefinitionsRequest, ListLimitDefinitionsResponse> + handler) { + LOG.trace("Called async listLimitDefinitions"); + final ListLimitDefinitionsRequest interceptedRequest = + ListLimitDefinitionsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListLimitDefinitionsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListLimitDefinitionsResponse> + transformer = ListLimitDefinitionsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + ListLimitDefinitionsRequest, ListLimitDefinitionsResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + ListLimitDefinitionsRequest, ListLimitDefinitionsResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, ListLimitDefinitionsResponse>( + 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 listLimitValues( + final ListLimitValuesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListLimitValuesRequest, ListLimitValuesResponse> + handler) { + LOG.trace("Called async listLimitValues"); + final ListLimitValuesRequest interceptedRequest = + ListLimitValuesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListLimitValuesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListLimitValuesConverter.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< + ListLimitValuesRequest, ListLimitValuesResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, ListLimitValuesResponse>( + 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 listServices( + final ListServicesRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async listServices"); + final ListServicesRequest interceptedRequest = + ListServicesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListServicesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListServicesConverter.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< + ListServicesRequest, ListServicesResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, ListServicesResponse>( + 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); + } + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsClient.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsClient.java new file mode 100644 index 00000000000..f9bf5cc48fa --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsClient.java @@ -0,0 +1,425 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits; + +import java.util.Locale; +import com.oracle.bmc.limits.internal.http.*; +import com.oracle.bmc.limits.requests.*; +import com.oracle.bmc.limits.responses.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.extern.slf4j.Slf4j +public class LimitsClient implements Limits { + /** + * Service instance for Limits. + */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("LIMITS") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://limits.{region}.oci.{secondLevelDomain}") + .build(); + // 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 LimitsPaginators paginators; + + @lombok.Getter(value = lombok.AccessLevel.PACKAGE) + private final com.oracle.bmc.http.internal.RestClient client; + + private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider; + private final com.oracle.bmc.retrier.RetryConfiguration retryConfiguration; + + /** + * Creates a new service instance using the given authentication provider. + * @param authenticationDetailsProvider The authentication details provider, required. + */ + public LimitsClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(authenticationDetailsProvider, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + */ + public LimitsClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(authenticationDetailsProvider, configuration, null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + */ + public LimitsClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + */ + public LimitsClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + new java.util.ArrayList()); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + */ + public LimitsClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + additionalClientConfigurators, + null); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public LimitsClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + authenticationDetailsProvider, + configuration, + clientConfigurator, + defaultRequestSignerFactory, + com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory + .createDefaultRequestSignerFactories(), + additionalClientConfigurators, + endpoint); + } + + /** + * Creates a new service instance using the given authentication provider and client configuration. Additionally, + * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. + *

+ * This is an advanced constructor for clients that want to take control over how requests are signed. + * @param authenticationDetailsProvider The authentication details provider, required. + * @param configuration The client configuration, optional. + * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. + * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. + * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer + * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. + * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) + */ + public LimitsClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this.authenticationDetailsProvider = authenticationDetailsProvider; + com.oracle.bmc.http.internal.RestClientFactory restClientFactory = + com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder() + .clientConfigurator(clientConfigurator) + .additionalClientConfigurators(additionalClientConfigurators) + .build(); + com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = + defaultRequestSignerFactory.createRequestSigner( + SERVICE, this.authenticationDetailsProvider); + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSigner> + requestSigners = new java.util.HashMap<>(); + if (this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { + for (com.oracle.bmc.http.signing.SigningStrategy s : + com.oracle.bmc.http.signing.SigningStrategy.values()) { + requestSigners.put( + s, + signingStrategyRequestSignerFactories + .get(s) + .createRequestSigner(SERVICE, authenticationDetailsProvider)); + } + } + + final com.oracle.bmc.ClientConfiguration clientConfigurationToUse = + (configuration != null) + ? configuration + : com.oracle.bmc.ClientConfiguration.builder().build(); + this.retryConfiguration = clientConfigurationToUse.getRetryConfiguration(); + this.client = + restClientFactory.create( + defaultRequestSigner, requestSigners, clientConfigurationToUse); + + this.paginators = new LimitsPaginators(this); + + if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { + com.oracle.bmc.auth.RegionProvider provider = + (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; + + if (provider.getRegion() != null) { + this.setRegion(provider.getRegion()); + if (endpoint != null) { + LOG.info( + "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", + provider.getRegion(), + endpoint); + } + } + } + if (endpoint != null) { + setEndpoint(endpoint); + } + } + + /** + * Create a builder for this client. + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the + * {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private Builder(com.oracle.bmc.Service service) { + super(service); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public LimitsClient build( + @lombok.NonNull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + return new LimitsClient( + authenticationDetailsProvider, + configuration, + clientConfigurator, + requestSignerFactory, + signingStrategyRequestSignerFactories, + additionalClientConfigurators, + endpoint); + } + } + + @Override + public void setEndpoint(String endpoint) { + LOG.info("Setting endpoint to {}", endpoint); + client.setEndpoint(endpoint); + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + com.google.common.base.Optional endpoint = region.getEndpoint(SERVICE); + if (endpoint.isPresent()) { + setEndpoint(endpoint.get()); + } else { + throw new IllegalArgumentException( + "Endpoint for " + SERVICE + " is not known in region " + region); + } + } + + @Override + public void setRegion(String regionId) { + regionId = regionId.toLowerCase(Locale.ENGLISH); + try { + com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); + setRegion(region); + } catch (IllegalArgumentException e) { + LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); + String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); + setEndpoint(endpoint); + } + } + + @Override + public void close() { + client.close(); + } + + @Override + public GetResourceAvailabilityResponse getResourceAvailability( + GetResourceAvailabilityRequest request) { + LOG.trace("Called getResourceAvailability"); + final GetResourceAvailabilityRequest interceptedRequest = + GetResourceAvailabilityConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetResourceAvailabilityConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = GetResourceAvailabilityConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListLimitDefinitionsResponse listLimitDefinitions(ListLimitDefinitionsRequest request) { + LOG.trace("Called listLimitDefinitions"); + final ListLimitDefinitionsRequest interceptedRequest = + ListLimitDefinitionsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListLimitDefinitionsConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = ListLimitDefinitionsConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListLimitValuesResponse listLimitValues(ListLimitValuesRequest request) { + LOG.trace("Called listLimitValues"); + final ListLimitValuesRequest interceptedRequest = + ListLimitValuesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListLimitValuesConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = ListLimitValuesConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListServicesResponse listServices(ListServicesRequest request) { + LOG.trace("Called listServices"); + final ListServicesRequest interceptedRequest = + ListServicesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListServicesConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = ListServicesConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public LimitsPaginators getPaginators() { + return paginators; + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsPaginators.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsPaginators.java new file mode 100644 index 00000000000..057494963cd --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/LimitsPaginators.java @@ -0,0 +1,366 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits; + +import com.oracle.bmc.limits.requests.*; +import com.oracle.bmc.limits.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of Limits where multiple pages of data may be fetched. + * Two styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: listUsersResponseIterator
  • + *
  • Iterating over the resources/records being listed. These are referred to as RecordIterators, and the methods are suffixed with RecordIterator. For example: listUsersRecordIterator
  • + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping and using the page tokens. + * They will automatically fetch more data from the service when required. + * + * As an example, if we were using the ListUsers operation in IdentityService, then the {@link java.lang.Iterable} returned by calling a + * ResponseIterator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. + * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. + */ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.RequiredArgsConstructor +public class LimitsPaginators { + private final Limits client; + + /** + * Creates a new iterable which will iterate over the responses received from the listLimitDefinitions 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 listLimitDefinitionsResponseIterator( + final ListLimitDefinitionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListLimitDefinitionsRequest.Builder, ListLimitDefinitionsRequest, + ListLimitDefinitionsResponse>( + new com.google.common.base.Supplier() { + @Override + public ListLimitDefinitionsRequest.Builder get() { + return ListLimitDefinitionsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListLimitDefinitionsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListLimitDefinitionsRequest.Builder>, + ListLimitDefinitionsRequest>() { + @Override + public ListLimitDefinitionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListLimitDefinitionsRequest.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< + ListLimitDefinitionsRequest, ListLimitDefinitionsResponse>() { + @Override + public ListLimitDefinitionsResponse apply(ListLimitDefinitionsRequest request) { + return client.listLimitDefinitions(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.limits.model.LimitDefinitionSummary} objects + * contained in responses from the listLimitDefinitions 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.limits.model.LimitDefinitionSummary} objects + * contained in responses received from the service. + */ + public Iterable + listLimitDefinitionsRecordIterator(final ListLimitDefinitionsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListLimitDefinitionsRequest.Builder, ListLimitDefinitionsRequest, + ListLimitDefinitionsResponse, com.oracle.bmc.limits.model.LimitDefinitionSummary>( + new com.google.common.base.Supplier() { + @Override + public ListLimitDefinitionsRequest.Builder get() { + return ListLimitDefinitionsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListLimitDefinitionsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListLimitDefinitionsRequest.Builder>, + ListLimitDefinitionsRequest>() { + @Override + public ListLimitDefinitionsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListLimitDefinitionsRequest.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< + ListLimitDefinitionsRequest, ListLimitDefinitionsResponse>() { + @Override + public ListLimitDefinitionsResponse apply(ListLimitDefinitionsRequest request) { + return client.listLimitDefinitions(request); + } + }, + new com.google.common.base.Function< + ListLimitDefinitionsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListLimitDefinitionsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listLimitValues 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 listLimitValuesResponseIterator( + final ListLimitValuesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListLimitValuesRequest.Builder, ListLimitValuesRequest, ListLimitValuesResponse>( + new com.google.common.base.Supplier() { + @Override + public ListLimitValuesRequest.Builder get() { + return ListLimitValuesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListLimitValuesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListLimitValuesRequest.Builder>, + ListLimitValuesRequest>() { + @Override + public ListLimitValuesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListLimitValuesRequest.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< + ListLimitValuesRequest, ListLimitValuesResponse>() { + @Override + public ListLimitValuesResponse apply(ListLimitValuesRequest request) { + return client.listLimitValues(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.limits.model.LimitValueSummary} objects + * contained in responses from the listLimitValues 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.limits.model.LimitValueSummary} objects + * contained in responses received from the service. + */ + public Iterable listLimitValuesRecordIterator( + final ListLimitValuesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListLimitValuesRequest.Builder, ListLimitValuesRequest, ListLimitValuesResponse, + com.oracle.bmc.limits.model.LimitValueSummary>( + new com.google.common.base.Supplier() { + @Override + public ListLimitValuesRequest.Builder get() { + return ListLimitValuesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListLimitValuesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListLimitValuesRequest.Builder>, + ListLimitValuesRequest>() { + @Override + public ListLimitValuesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListLimitValuesRequest.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< + ListLimitValuesRequest, ListLimitValuesResponse>() { + @Override + public ListLimitValuesResponse apply(ListLimitValuesRequest request) { + return client.listLimitValues(request); + } + }, + new com.google.common.base.Function< + ListLimitValuesResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListLimitValuesResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listServices 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 listServicesResponseIterator( + final ListServicesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListServicesRequest.Builder, ListServicesRequest, ListServicesResponse>( + new com.google.common.base.Supplier() { + @Override + public ListServicesRequest.Builder get() { + return ListServicesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListServicesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServicesRequest.Builder>, + ListServicesRequest>() { + @Override + public ListServicesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServicesRequest.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() { + @Override + public ListServicesResponse apply(ListServicesRequest request) { + return client.listServices(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.limits.model.ServiceSummary} objects + * contained in responses from the listServices 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.limits.model.ServiceSummary} objects + * contained in responses received from the service. + */ + public Iterable listServicesRecordIterator( + final ListServicesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListServicesRequest.Builder, ListServicesRequest, ListServicesResponse, + com.oracle.bmc.limits.model.ServiceSummary>( + new com.google.common.base.Supplier() { + @Override + public ListServicesRequest.Builder get() { + return ListServicesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListServicesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServicesRequest.Builder>, + ListServicesRequest>() { + @Override + public ListServicesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListServicesRequest.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() { + @Override + public ListServicesResponse apply(ListServicesRequest request) { + return client.listServices(request); + } + }, + new com.google.common.base.Function< + ListServicesResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListServicesResponse response) { + return response.getItems(); + } + }); + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/Quotas.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/Quotas.java index 1b4bdb65035..6513120ee3a 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/Quotas.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/Quotas.java @@ -6,7 +6,7 @@ import com.oracle.bmc.limits.requests.*; import com.oracle.bmc.limits.responses.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") public interface Quotas extends AutoCloseable { /** diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasAsync.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasAsync.java index bade3701307..b81ef071c46 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasAsync.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasAsync.java @@ -6,7 +6,7 @@ import com.oracle.bmc.limits.requests.*; import com.oracle.bmc.limits.responses.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") public interface QuotasAsync extends AutoCloseable { /** diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasAsyncClient.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasAsyncClient.java index fadee79eb1c..37a86609d01 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasAsyncClient.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasAsyncClient.java @@ -21,7 +21,7 @@ * Future.isDone/isCancelled.
* Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java */ -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.extern.slf4j.Slf4j public class QuotasAsyncClient implements QuotasAsync { /** diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasClient.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasClient.java index c47b7dad1dd..c6eabeca2c6 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasClient.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasClient.java @@ -8,7 +8,7 @@ import com.oracle.bmc.limits.requests.*; import com.oracle.bmc.limits.responses.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.extern.slf4j.Slf4j public class QuotasClient implements Quotas { /** diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasPaginators.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasPaginators.java index f140841cea6..bdb3a7a0643 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasPaginators.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasPaginators.java @@ -24,7 +24,7 @@ * returned by calling a RecordIterator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. * In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available. */ -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.RequiredArgsConstructor public class QuotasPaginators { private final Quotas client; diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasWaiters.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasWaiters.java index 43e0b10e5cd..dd88926fd50 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasWaiters.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/QuotasWaiters.java @@ -12,7 +12,7 @@ *

* The default configuration used is defined by {@link com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. */ -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.RequiredArgsConstructor public class QuotasWaiters { private final java.util.concurrent.ExecutorService executorService; diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/CreateQuotaConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/CreateQuotaConverter.java index 29772c8a0d3..12247e01c65 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/CreateQuotaConverter.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/CreateQuotaConverter.java @@ -9,7 +9,7 @@ import com.oracle.bmc.limits.responses.*; import org.apache.commons.lang3.Validate; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.extern.slf4j.Slf4j public class CreateQuotaConverter { private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory @@ -27,7 +27,7 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( Validate.notNull(request.getCreateQuotaDetails(), "createQuotaDetails is required"); com.oracle.bmc.http.internal.WrappedWebTarget target = - client.getBaseTarget().path("/20181025").path("quotas"); + client.getBaseTarget().path("/").path("20181025").path("quotas"); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/DeleteQuotaConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/DeleteQuotaConverter.java index f14752deea6..15ee1bc05cc 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/DeleteQuotaConverter.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/DeleteQuotaConverter.java @@ -9,7 +9,7 @@ import com.oracle.bmc.limits.responses.*; import org.apache.commons.lang3.Validate; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.extern.slf4j.Slf4j public class DeleteQuotaConverter { private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory @@ -28,7 +28,8 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() - .path("/20181025") + .path("/") + .path("20181025") .path("quotas") .path( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/GetQuotaConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/GetQuotaConverter.java index 94d395544f0..4212e0a2969 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/GetQuotaConverter.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/GetQuotaConverter.java @@ -9,7 +9,7 @@ import com.oracle.bmc.limits.responses.*; import org.apache.commons.lang3.Validate; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.extern.slf4j.Slf4j public class GetQuotaConverter { private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory @@ -28,7 +28,8 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() - .path("/20181025") + .path("/") + .path("20181025") .path("quotas") .path( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/GetResourceAvailabilityConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/GetResourceAvailabilityConverter.java new file mode 100644 index 00000000000..108fcf0c5f5 --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/GetResourceAvailabilityConverter.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.limits.model.*; +import com.oracle.bmc.limits.requests.*; +import com.oracle.bmc.limits.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.extern.slf4j.Slf4j +public class GetResourceAvailabilityConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetResourceAvailabilityRequest interceptRequest( + GetResourceAvailabilityRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + GetResourceAvailabilityRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getServiceName(), "serviceName must not be blank"); + Validate.notBlank(request.getLimitName(), "limitName must not be blank"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/") + .path("20190729") + .path("services") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getServiceName())) + .path("limits") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getLimitName())) + .path("resourceAvailability"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getAvailabilityDomain() != null) { + target = + target.queryParam( + "availabilityDomain", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAvailabilityDomain())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetResourceAvailabilityResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetResourceAvailabilityResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetResourceAvailabilityResponse>() { + @Override + public GetResourceAvailabilityResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetResourceAvailabilityResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + ResourceAvailability>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + ResourceAvailability.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetResourceAvailabilityResponse.Builder builder = + GetResourceAvailabilityResponse.builder(); + + builder.resourceAvailability(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)); + } + + GetResourceAvailabilityResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitDefinitionsConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitDefinitionsConverter.java new file mode 100644 index 00000000000..4840641f5b2 --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitDefinitionsConverter.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.limits.model.*; +import com.oracle.bmc.limits.requests.*; +import com.oracle.bmc.limits.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.extern.slf4j.Slf4j +public class ListLimitDefinitionsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListLimitDefinitionsRequest interceptRequest( + ListLimitDefinitionsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListLimitDefinitionsRequest 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("20190729").path("limitDefinitions"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getServiceName() != null) { + target = + target.queryParam( + "serviceName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getServiceName())); + } + + if (request.getName() != null) { + target = + target.queryParam( + "name", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getName())); + } + + 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.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())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListLimitDefinitionsResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListLimitDefinitionsResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListLimitDefinitionsResponse>() { + @Override + public ListLimitDefinitionsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListLimitDefinitionsResponse"); + 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< + LimitDefinitionSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListLimitDefinitionsResponse.Builder builder = + ListLimitDefinitionsResponse.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)); + } + + ListLimitDefinitionsResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitValuesConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitValuesConverter.java new file mode 100644 index 00000000000..483313914cc --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListLimitValuesConverter.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.limits.model.*; +import com.oracle.bmc.limits.requests.*; +import com.oracle.bmc.limits.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.extern.slf4j.Slf4j +public class ListLimitValuesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListLimitValuesRequest interceptRequest(ListLimitValuesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListLimitValuesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull(request.getCompartmentId(), "compartmentId is required"); + Validate.notNull(request.getServiceName(), "serviceName is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/").path("20190729").path("limitValues"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + target = + target.queryParam( + "serviceName", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getServiceName())); + + if (request.getScopeType() != null) { + target = + target.queryParam( + "scopeType", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getScopeType().getValue())); + } + + if (request.getAvailabilityDomain() != null) { + target = + target.queryParam( + "availabilityDomain", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getAvailabilityDomain())); + } + + if (request.getName() != null) { + target = + target.queryParam( + "name", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getName())); + } + + 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.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())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListLimitValuesResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListLimitValuesResponse>() { + @Override + public ListLimitValuesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for ListLimitValuesResponse"); + 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< + LimitValueSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListLimitValuesResponse.Builder builder = + ListLimitValuesResponse.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)); + } + + ListLimitValuesResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListQuotasConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListQuotasConverter.java index 76d607d1e5e..0818e21f525 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListQuotasConverter.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListQuotasConverter.java @@ -9,7 +9,7 @@ import com.oracle.bmc.limits.responses.*; import org.apache.commons.lang3.Validate; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.extern.slf4j.Slf4j public class ListQuotasConverter { private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory @@ -27,7 +27,7 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( Validate.notNull(request.getCompartmentId(), "compartmentId is required"); com.oracle.bmc.http.internal.WrappedWebTarget target = - client.getBaseTarget().path("/20181025").path("quotas"); + client.getBaseTarget().path("/").path("20181025").path("quotas"); target = target.queryParam( @@ -122,18 +122,6 @@ public ListQuotasResponse apply(javax.ws.rs.core.Response rawResponse) { 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( @@ -146,6 +134,18 @@ public ListQuotasResponse apply(javax.ws.rs.core.Response rawResponse) { 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)); + } + ListQuotasResponse responseWrapper = builder.build(); ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListServicesConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListServicesConverter.java new file mode 100644 index 00000000000..e46df875e26 --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/ListServicesConverter.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.limits.model.*; +import com.oracle.bmc.limits.requests.*; +import com.oracle.bmc.limits.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.extern.slf4j.Slf4j +public class ListServicesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListServicesRequest interceptRequest(ListServicesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListServicesRequest 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("20190729").path("services"); + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + 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.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())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, ListServicesResponse>() { + @Override + public ListServicesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for ListServicesResponse"); + 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< + ServiceSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListServicesResponse.Builder builder = + ListServicesResponse.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)); + } + + ListServicesResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/UpdateQuotaConverter.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/UpdateQuotaConverter.java index 965cf6039ab..148b635d65e 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/UpdateQuotaConverter.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/internal/http/UpdateQuotaConverter.java @@ -9,7 +9,7 @@ import com.oracle.bmc.limits.responses.*; import org.apache.commons.lang3.Validate; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.extern.slf4j.Slf4j public class UpdateQuotaConverter { private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory @@ -29,7 +29,8 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.http.internal.WrappedWebTarget target = client.getBaseTarget() - .path("/20181025") + .path("/") + .path("20181025") .path("quotas") .path( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/CreateQuotaDetails.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/CreateQuotaDetails.java index 8f1f887e9c0..847cadee5ef 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/CreateQuotaDetails.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/CreateQuotaDetails.java @@ -13,7 +13,7 @@ * {@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: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) @lombok.Value @com.fasterxml.jackson.databind.annotation.JsonDeserialize( @@ -138,7 +138,7 @@ public static Builder builder() { String name; /** - * An array of quota statements written in the declarative language. + * An array of quota statements written in the declarative quota statement language. * **/ @com.fasterxml.jackson.annotation.JsonProperty("statements") diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/LimitDefinitionSummary.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/LimitDefinitionSummary.java new file mode 100644 index 00000000000..06e5e87f31b --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/LimitDefinitionSummary.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.model; + +/** + * The metadata specific to a resource limit definition. + *
+ * 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: ") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = LimitDefinitionSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class LimitDefinitionSummary { + @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("serviceName") + private String serviceName; + + public Builder serviceName(String serviceName) { + this.serviceName = serviceName; + this.__explicitlySet__.add("serviceName"); + 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("scopeType") + private ScopeType scopeType; + + public Builder scopeType(ScopeType scopeType) { + this.scopeType = scopeType; + this.__explicitlySet__.add("scopeType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("areQuotasSupported") + private Boolean areQuotasSupported; + + public Builder areQuotasSupported(Boolean areQuotasSupported) { + this.areQuotasSupported = areQuotasSupported; + this.__explicitlySet__.add("areQuotasSupported"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isResourceAvailabilitySupported") + private Boolean isResourceAvailabilitySupported; + + public Builder isResourceAvailabilitySupported(Boolean isResourceAvailabilitySupported) { + this.isResourceAvailabilitySupported = isResourceAvailabilitySupported; + this.__explicitlySet__.add("isResourceAvailabilitySupported"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public LimitDefinitionSummary build() { + LimitDefinitionSummary __instance__ = + new LimitDefinitionSummary( + name, + serviceName, + description, + scopeType, + areQuotasSupported, + isResourceAvailabilitySupported); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(LimitDefinitionSummary o) { + Builder copiedBuilder = + name(o.getName()) + .serviceName(o.getServiceName()) + .description(o.getDescription()) + .scopeType(o.getScopeType()) + .areQuotasSupported(o.getAreQuotasSupported()) + .isResourceAvailabilitySupported( + o.getIsResourceAvailabilitySupported()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The resource limit name. To be used for writing policies (in case of quotas) or other programmatic calls. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + + /** + * The service name of the limit. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("serviceName") + String serviceName; + + /** + * The limit description. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + String description; + /** + * Reflects the scope of the resource limit: which can be Global (across all regions), regional or ad specific. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum ScopeType { + Global("GLOBAL"), + Region("REGION"), + Ad("AD"), + + /** + * 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 (ScopeType v : ScopeType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ScopeType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ScopeType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ScopeType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * Reflects the scope of the resource limit: which can be Global (across all regions), regional or ad specific. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scopeType") + ScopeType scopeType; + + /** + * If true, quota policies can be created on top of this resource limit. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("areQuotasSupported") + Boolean areQuotasSupported; + + /** + * Reflects if the GetResourceAvailability API is supported for this limit or not. + * If not, the API will return an empty JSON response. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isResourceAvailabilitySupported") + Boolean isResourceAvailabilitySupported; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/LimitValueSummary.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/LimitValueSummary.java new file mode 100644 index 00000000000..1e1328bac38 --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/LimitValueSummary.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.model; + +/** + * The value of a specific resource limit. + *
+ * 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: ") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = LimitValueSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class LimitValueSummary { + @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("scopeType") + private ScopeType scopeType; + + public Builder scopeType(ScopeType scopeType) { + this.scopeType = scopeType; + this.__explicitlySet__.add("scopeType"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + private String availabilityDomain; + + public Builder availabilityDomain(String availabilityDomain) { + this.availabilityDomain = availabilityDomain; + this.__explicitlySet__.add("availabilityDomain"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("value") + private Long value; + + public Builder value(Long value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public LimitValueSummary build() { + LimitValueSummary __instance__ = + new LimitValueSummary(name, scopeType, availabilityDomain, value); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(LimitValueSummary o) { + Builder copiedBuilder = + name(o.getName()) + .scopeType(o.getScopeType()) + .availabilityDomain(o.getAvailabilityDomain()) + .value(o.getValue()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The resource limit name. To be used for writing policies (in case of quotas) or other programmatic calls. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + /** + * The scope type of the limit. + * + **/ + @lombok.extern.slf4j.Slf4j + public enum ScopeType { + Global("GLOBAL"), + Region("REGION"), + Ad("AD"), + + /** + * 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 (ScopeType v : ScopeType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ScopeType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ScopeType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ScopeType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The scope type of the limit. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("scopeType") + ScopeType scopeType; + + /** + * If present, the returned value is only specific to this availability domain. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("availabilityDomain") + String availabilityDomain; + + /** + * The resource limit value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + Long value; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/Quota.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/Quota.java index 71c1235c956..1de04655244 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/Quota.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/Quota.java @@ -19,7 +19,7 @@ * {@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: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) @lombok.Value @com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Quota.Builder.class) @@ -176,7 +176,7 @@ public static Builder builder() { String name; /** - * An array of one or more quota statements written in the declarative language. + * An array of one or more quota statements written in the declarative quota statement language. **/ @com.fasterxml.jackson.annotation.JsonProperty("statements") java.util.List statements; diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/QuotaSummary.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/QuotaSummary.java index af9a22e1eb2..c00ba610363 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/QuotaSummary.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/QuotaSummary.java @@ -15,7 +15,7 @@ * {@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: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) @lombok.Value @com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = QuotaSummary.Builder.class) diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/ResourceAvailability.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/ResourceAvailability.java new file mode 100644 index 00000000000..50575cbd215 --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/ResourceAvailability.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.model; + +/** + * The availability of a given resource limit, based on the usage, tenant service limits and quotas set for the tenancy. + * Note: We cannot guarantee this data for all the limits. In those cases, these fields will be empty. + * + *
+ * 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: ") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ResourceAvailability.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ResourceAvailability { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("used") + private Long used; + + public Builder used(Long used) { + this.used = used; + this.__explicitlySet__.add("used"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("available") + private Long available; + + public Builder available(Long available) { + this.available = available; + this.__explicitlySet__.add("available"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ResourceAvailability build() { + ResourceAvailability __instance__ = new ResourceAvailability(used, available); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ResourceAvailability o) { + Builder copiedBuilder = used(o.getUsed()).available(o.getAvailable()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The current usage in the given compartment. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("used") + Long used; + + /** + * The count of available resources. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("available") + Long available; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/ServiceSummary.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/ServiceSummary.java new file mode 100644 index 00000000000..acef235a29d --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/ServiceSummary.java @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.model; + +/** + * A specific OCI service supported by resource limits. + *
+ * 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: ") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ServiceSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ServiceSummary { + @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("description") + private String description; + + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ServiceSummary build() { + ServiceSummary __instance__ = new ServiceSummary(name, description); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ServiceSummary o) { + Builder copiedBuilder = name(o.getName()).description(o.getDescription()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The service name. Use this when calling the other APIs. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + + /** + * The friendly service name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + String description; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/UpdateQuotaDetails.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/UpdateQuotaDetails.java index 4387482814d..aa7232eb764 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/model/UpdateQuotaDetails.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/model/UpdateQuotaDetails.java @@ -13,7 +13,7 @@ * {@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: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) @lombok.Value @com.fasterxml.jackson.databind.annotation.JsonDeserialize( @@ -98,7 +98,7 @@ public static Builder builder() { String description; /** - * An array of quota statements written in the declarative language. + * An array of quota statements written in the declarative quota statement language. * **/ @com.fasterxml.jackson.annotation.JsonProperty("statements") diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/CreateQuotaRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/CreateQuotaRequest.java index d03436d6748..9ee79279eff 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/CreateQuotaRequest.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/CreateQuotaRequest.java @@ -5,7 +5,7 @@ import com.oracle.bmc.limits.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") @lombok.Getter public class CreateQuotaRequest extends com.oracle.bmc.requests.BmcRequest { diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/DeleteQuotaRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/DeleteQuotaRequest.java index e61cdc2eead..e973e9bef48 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/DeleteQuotaRequest.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/DeleteQuotaRequest.java @@ -5,7 +5,7 @@ import com.oracle.bmc.limits.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") @lombok.Getter public class DeleteQuotaRequest extends com.oracle.bmc.requests.BmcRequest { diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/GetQuotaRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/GetQuotaRequest.java index 3186669a1f2..63120ab5d5b 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/GetQuotaRequest.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/GetQuotaRequest.java @@ -5,7 +5,7 @@ import com.oracle.bmc.limits.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") @lombok.Getter public class GetQuotaRequest extends com.oracle.bmc.requests.BmcRequest { diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/GetResourceAvailabilityRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/GetResourceAvailabilityRequest.java new file mode 100644 index 00000000000..b544f4b8fd2 --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/GetResourceAvailabilityRequest.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.requests; + +import com.oracle.bmc.limits.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetResourceAvailabilityRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The service name of the target quota. + */ + private String serviceName; + + /** + * The limit name for which to fetch the data. + */ + private String limitName; + + /** + * The OCID of the compartment for which data is being fetched. + */ + private String compartmentId; + + /** + * This field is mandatory if the scopeType of the target resource limit is AD. + * Otherwise, this field should be omitted. + * If the above requirements are not met, the API will return a 400 - InvalidParameter response. + * + */ + private String availabilityDomain; + + /** + * 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 { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetResourceAvailabilityRequest o) { + serviceName(o.getServiceName()); + limitName(o.getLimitName()); + compartmentId(o.getCompartmentId()); + availabilityDomain(o.getAvailabilityDomain()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetResourceAvailabilityRequest 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 GetResourceAvailabilityRequest + */ + public GetResourceAvailabilityRequest build() { + GetResourceAvailabilityRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitDefinitionsRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitDefinitionsRequest.java new file mode 100644 index 00000000000..782b0e952d1 --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitDefinitionsRequest.java @@ -0,0 +1,197 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.requests; + +import com.oracle.bmc.limits.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListLimitDefinitionsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the parent compartment (remember that the tenancy is simply the root compartment). + * + */ + private String compartmentId; + + /** + * The target service name. + */ + private String serviceName; + + /** + * Optional field, filter for a specific resource limit. + */ + private String name; + + /** + * The field to sort by. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. + * + **/ + public enum SortBy { + Name("name"), + Description("description"), + ; + + 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 'asc' or 'desc'. By default it will be ascending. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. By default it will be ascending. + * + **/ + 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); + } + }; + + /** + * The maximum number of items to return in a paginated \"List\" call. + * + */ + private Integer limit; + + /** + * The value of the `opc-next-page` response header from the previous \"List\" call. + * + */ + private String page; + + /** + * 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 { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListLimitDefinitionsRequest o) { + compartmentId(o.getCompartmentId()); + serviceName(o.getServiceName()); + name(o.getName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListLimitDefinitionsRequest 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 ListLimitDefinitionsRequest + */ + public ListLimitDefinitionsRequest build() { + ListLimitDefinitionsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitValuesRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitValuesRequest.java new file mode 100644 index 00000000000..38ff51d46ee --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListLimitValuesRequest.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.requests; + +import com.oracle.bmc.limits.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListLimitValuesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the parent compartment (remember that the tenancy is simply the root compartment). + * + */ + private String compartmentId; + + /** + * The target service name + */ + private String serviceName; + + /** + * Filter entries by scope type. + */ + private ScopeType scopeType; + + /** + * Filter entries by scope type. + **/ + public enum ScopeType { + Global("GLOBAL"), + Region("REGION"), + Ad("AD"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ScopeType v : ScopeType.values()) { + map.put(v.getValue(), v); + } + } + + ScopeType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ScopeType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid ScopeType: " + key); + } + }; + + /** + * Filter entries by availability domain. This implies that only AD-specific values will be returned. + * + */ + private String availabilityDomain; + + /** + * Optional field, can be used to see a specific resource limit value. + */ + private String name; + + /** + * The field to sort by. We will be implicitly sorting by availabilityDomain, as a second level field, if available. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. We will be implicitly sorting by availabilityDomain, as a second level field, if available. + * + **/ + public enum SortBy { + Name("name"), + ; + + 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 'asc' or 'desc'. By default it will be ascending. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. By default it will be ascending. + * + **/ + 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); + } + }; + + /** + * The maximum number of items to return in a paginated \"List\" call. + * + */ + private Integer limit; + + /** + * The value of the `opc-next-page` response header from the previous \"List\" call. + * + */ + private String page; + + /** + * 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 { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListLimitValuesRequest o) { + compartmentId(o.getCompartmentId()); + serviceName(o.getServiceName()); + scopeType(o.getScopeType()); + availabilityDomain(o.getAvailabilityDomain()); + name(o.getName()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListLimitValuesRequest 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 ListLimitValuesRequest + */ + public ListLimitValuesRequest build() { + ListLimitValuesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListQuotasRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListQuotasRequest.java index b3e84fdb212..ba4b3bec2fb 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListQuotasRequest.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListQuotasRequest.java @@ -5,7 +5,7 @@ import com.oracle.bmc.limits.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") @lombok.Getter public class ListQuotasRequest extends com.oracle.bmc.requests.BmcRequest { @@ -74,12 +74,14 @@ public static LifecycleState create(String key) { }; /** - * The sort order to use, either 'asc' or 'desc'. + * The sort order to use, either 'asc' or 'desc'. By default it will be ascending. + * */ private SortOrder sortOrder; /** - * The sort order to use, either 'asc' or 'desc'. + * The sort order to use, either 'asc' or 'desc'. By default it will be ascending. + * **/ public enum SortOrder { Asc("ASC"), diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListServicesRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListServicesRequest.java new file mode 100644 index 00000000000..590a3104a9d --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/ListServicesRequest.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.requests; + +import com.oracle.bmc.limits.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListServicesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the parent compartment (remember that the tenancy is simply the root compartment). + * + */ + private String compartmentId; + + /** + * The field to sort by. + * + */ + private SortBy sortBy; + + /** + * The field to sort by. + * + **/ + public enum SortBy { + Name("name"), + Description("description"), + ; + + 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 'asc' or 'desc'. By default it will be ascending. + * + */ + private SortOrder sortOrder; + + /** + * The sort order to use, either 'asc' or 'desc'. By default it will be ascending. + * + **/ + 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); + } + }; + + /** + * The maximum number of items to return in a paginated \"List\" call. + * + */ + private Integer limit; + + /** + * The value of the `opc-next-page` response header from the previous \"List\" call. + * + */ + private String page; + + /** + * 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 { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListServicesRequest o) { + compartmentId(o.getCompartmentId()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + limit(o.getLimit()); + page(o.getPage()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListServicesRequest 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 ListServicesRequest + */ + public ListServicesRequest build() { + ListServicesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/UpdateQuotaRequest.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/UpdateQuotaRequest.java index 034e471f9e5..911b59af8a6 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/UpdateQuotaRequest.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/requests/UpdateQuotaRequest.java @@ -5,7 +5,7 @@ import com.oracle.bmc.limits.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") @lombok.Getter public class UpdateQuotaRequest extends com.oracle.bmc.requests.BmcRequest { diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/CreateQuotaResponse.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/CreateQuotaResponse.java index d52833f747a..d3e0f88df20 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/CreateQuotaResponse.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/CreateQuotaResponse.java @@ -5,14 +5,14 @@ import com.oracle.bmc.limits.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.Builder(builderClassName = "Builder") @lombok.Getter public class CreateQuotaResponse { /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - * particular request, please provide the request ID. + * 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; diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/DeleteQuotaResponse.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/DeleteQuotaResponse.java index b2edfeae634..17545622bd2 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/DeleteQuotaResponse.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/DeleteQuotaResponse.java @@ -5,14 +5,14 @@ import com.oracle.bmc.limits.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.Builder(builderClassName = "Builder") @lombok.Getter public class DeleteQuotaResponse { /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - * particular request, please provide the request ID. + * 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; diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/GetQuotaResponse.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/GetQuotaResponse.java index 2b4bb68bc3b..66e0c528033 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/GetQuotaResponse.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/GetQuotaResponse.java @@ -5,14 +5,14 @@ import com.oracle.bmc.limits.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.Builder(builderClassName = "Builder") @lombok.Getter public class GetQuotaResponse { /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - * particular request, please provide the request ID. + * 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; diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/GetResourceAvailabilityResponse.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/GetResourceAvailabilityResponse.java new file mode 100644 index 00000000000..221dc9f6255 --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/GetResourceAvailabilityResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.responses; + +import com.oracle.bmc.limits.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetResourceAvailabilityResponse { + + /** + * 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 ResourceAvailability instance. + */ + private ResourceAvailability resourceAvailability; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetResourceAvailabilityResponse o) { + opcRequestId(o.getOpcRequestId()); + resourceAvailability(o.getResourceAvailability()); + + return this; + } + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListLimitDefinitionsResponse.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListLimitDefinitionsResponse.java new file mode 100644 index 00000000000..d7d23a7c1d9 --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListLimitDefinitionsResponse.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.responses; + +import com.oracle.bmc.limits.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListLimitDefinitionsResponse { + + /** + * 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.cloud.oracle.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 LimitDefinitionSummary 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(ListLimitDefinitionsResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListLimitValuesResponse.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListLimitValuesResponse.java new file mode 100644 index 00000000000..caac96badb9 --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListLimitValuesResponse.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.responses; + +import com.oracle.bmc.limits.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListLimitValuesResponse { + + /** + * 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.cloud.oracle.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 LimitValueSummary 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(ListLimitValuesResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListQuotasResponse.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListQuotasResponse.java index da7bf6b3099..47805036006 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListQuotasResponse.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListQuotasResponse.java @@ -5,25 +5,25 @@ import com.oracle.bmc.limits.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.Builder(builderClassName = "Builder") @lombok.Getter public class ListQuotasResponse { /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - * particular request, please provide the request ID. + * 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.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). * */ - private String opcRequestId; + private String opcNextPage; /** - * 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. + * Unique Oracle-assigned identifier for the request. If you need to contact + * Oracle about a particular request, please provide the request ID. * */ - private String opcNextPage; + private String opcRequestId; /** * A list of QuotaSummary instances. @@ -36,8 +36,8 @@ public static class Builder { * @return this builder instance */ public Builder copy(ListQuotasResponse o) { - opcRequestId(o.getOpcRequestId()); opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); items(o.getItems()); return this; diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListServicesResponse.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListServicesResponse.java new file mode 100644 index 00000000000..3676f7369e2 --- /dev/null +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/ListServicesResponse.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.limits.responses; + +import com.oracle.bmc.limits.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListServicesResponse { + + /** + * 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.cloud.oracle.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 ServiceSummary 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(ListServicesResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/UpdateQuotaResponse.java b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/UpdateQuotaResponse.java index b2ec3fb9b0d..b21c53ef927 100644 --- a/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/UpdateQuotaResponse.java +++ b/bmc-limits/src/main/java/com/oracle/bmc/limits/responses/UpdateQuotaResponse.java @@ -5,14 +5,14 @@ import com.oracle.bmc.limits.model.*; -@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181025") +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: ") @lombok.Builder(builderClassName = "Builder") @lombok.Getter public class UpdateQuotaResponse { /** - * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - * particular request, please provide the request ID. + * 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; diff --git a/bmc-loadbalancer/pom.xml b/bmc-loadbalancer/pom.xml index 9e319a1c206..450f179924e 100644 --- a/bmc-loadbalancer/pom.xml +++ b/bmc-loadbalancer/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-monitoring/pom.xml b/bmc-monitoring/pom.xml index 1592153f8d8..dd83baff5c8 100644 --- a/bmc-monitoring/pom.xml +++ b/bmc-monitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-monitoring @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 \ No newline at end of file diff --git a/bmc-objectstorage/bmc-objectstorage-combined/pom.xml b/bmc-objectstorage/bmc-objectstorage-combined/pom.xml index 769e12e0648..a50b2817288 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.6.0 + 1.6.1 ../pom.xml @@ -18,12 +18,12 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 1.6.0 + 1.6.1 com.oracle.oci.sdk oci-java-sdk-objectstorage-extensions - 1.6.0 + 1.6.1 diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml b/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml index 034224cd0d5..c78e23d3472 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.6.0 + 1.6.1 ../pom.xml @@ -19,12 +19,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 1.6.0 + 1.6.1 diff --git a/bmc-objectstorage/bmc-objectstorage-generated/pom.xml b/bmc-objectstorage/bmc-objectstorage-generated/pom.xml index 67bc92eb1ee..ac66e43d179 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.6.0 + 1.6.1 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-objectstorage/pom.xml b/bmc-objectstorage/pom.xml index 9cfcfaa339d..75aaa6201f9 100644 --- a/bmc-objectstorage/pom.xml +++ b/bmc-objectstorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml diff --git a/bmc-ons/pom.xml b/bmc-ons/pom.xml index b7828445746..4b6aa6935e0 100644 --- a/bmc-ons/pom.xml +++ b/bmc-ons/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-ons @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 \ No newline at end of file diff --git a/bmc-resourcemanager/pom.xml b/bmc-resourcemanager/pom.xml index fe5d815f7f0..be9b238b27c 100644 --- a/bmc-resourcemanager/pom.xml +++ b/bmc-resourcemanager/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-resourcemanager @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 \ No newline at end of file diff --git a/bmc-resourcesearch/pom.xml b/bmc-resourcesearch/pom.xml index 64b0fd49252..77157a1c916 100644 --- a/bmc-resourcesearch/pom.xml +++ b/bmc-resourcesearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-resourcesearch @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-shaded/bmc-shaded-full/pom.xml b/bmc-shaded/bmc-shaded-full/pom.xml index 27e80e25f0a..857f517e46e 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.6.0 + 1.6.1 ../pom.xml oci-java-sdk-shaded-full diff --git a/bmc-shaded/pom.xml b/bmc-shaded/pom.xml index d0183a2a878..fcf34429e03 100644 --- a/bmc-shaded/pom.xml +++ b/bmc-shaded/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml diff --git a/bmc-streaming/pom.xml b/bmc-streaming/pom.xml index 970f5c4dc69..a4c4b03ec55 100644 --- a/bmc-streaming/pom.xml +++ b/bmc-streaming/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-streaming @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 \ No newline at end of file diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdmin.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdmin.java index 9497e08d539..f3753cf3ccd 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdmin.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdmin.java @@ -44,6 +44,17 @@ public interface StreamAdmin extends AutoCloseable { */ ChangeStreamCompartmentResponse changeStreamCompartment(ChangeStreamCompartmentRequest request); + /** + * Starts the provisioning of a new stream archiver. + * To track the progress of the provisioning, you can periodically call {@link #getArchiver(GetArchiverRequest) getArchiver}. + * In the response, the `lifecycleState` parameter of the {@link Archiver} object tells you its current state. + * + * @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. + */ + CreateArchiverResponse createArchiver(CreateArchiverRequest request); + /** * Starts the provisioning of a new stream. * To track the progress of the provisioning, you can periodically call {@link #getStream(GetStreamRequest) getStream}. @@ -68,6 +79,15 @@ public interface StreamAdmin extends AutoCloseable { */ DeleteStreamResponse deleteStream(DeleteStreamRequest request); + /** + * Returns the current state of the stream archiver. + * + * @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. + */ + GetArchiverResponse getArchiver(GetArchiverRequest request); + /** * Gets detailed information about a stream, including the number of partitions. * @param request The request object containing the details to send @@ -84,6 +104,33 @@ public interface StreamAdmin extends AutoCloseable { */ ListStreamsResponse listStreams(ListStreamsRequest request); + /** + * Start the archiver for the specified stream. + * + * @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. + */ + StartArchiverResponse startArchiver(StartArchiverRequest request); + + /** + * Stop the archiver for the specified stream. + * + * @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. + */ + StopArchiverResponse stopArchiver(StopArchiverRequest request); + + /** + * Update the stream archiver parameters. + * + * @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. + */ + UpdateArchiverResponse updateArchiver(UpdateArchiverRequest request); + /** * Updates the tags applied to the stream. * diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsync.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsync.java index 763c4cc7b17..f646c4c6c77 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsync.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsync.java @@ -52,6 +52,24 @@ java.util.concurrent.Future changeStreamCompart ChangeStreamCompartmentRequest, ChangeStreamCompartmentResponse> handler); + /** + * Starts the provisioning of a new stream archiver. + * To track the progress of the provisioning, you can periodically call {@link #getArchiver(GetArchiverRequest, Consumer, Consumer) getArchiver}. + * In the response, the `lifecycleState` parameter of the {@link Archiver} object tells you its current state. + * + * + * @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 createArchiver( + CreateArchiverRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Starts the provisioning of a new stream. * To track the progress of the provisioning, you can periodically call {@link #getStream(GetStreamRequest, Consumer, Consumer) getStream}. @@ -90,6 +108,21 @@ java.util.concurrent.Future deleteStream( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Returns the current state of the stream archiver. + * + * + * @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 getArchiver( + GetArchiverRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + /** * Gets detailed information about a stream, including the number of partitions. * @@ -118,6 +151,54 @@ java.util.concurrent.Future listStreams( ListStreamsRequest request, com.oracle.bmc.responses.AsyncHandler handler); + /** + * Start the archiver for the specified stream. + * + * + * @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 startArchiver( + StartArchiverRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Stop the archiver for the specified stream. + * + * + * @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 stopArchiver( + StopArchiverRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Update the stream archiver parameters. + * + * + * @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 updateArchiver( + UpdateArchiverRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Updates the tags applied to the stream. * diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsyncClient.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsyncClient.java index b131e2e75c8..aa5a678bc28 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsyncClient.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminAsyncClient.java @@ -393,6 +393,95 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future createArchiver( + final CreateArchiverRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateArchiverRequest, CreateArchiverResponse> + handler) { + LOG.trace("Called async createArchiver"); + final CreateArchiverRequest interceptedRequest = + CreateArchiverConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateArchiverConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = CreateArchiverConverter.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< + CreateArchiverRequest, CreateArchiverResponse>( + (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.getCreateArchiverDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getCreateArchiverDetails(), + 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, CreateArchiverResponse>( + 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.getCreateArchiverDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future createStream( final CreateStreamRequest request, @@ -554,6 +643,79 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future getArchiver( + final GetArchiverRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getArchiver"); + final GetArchiverRequest interceptedRequest = + GetArchiverConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetArchiverConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetArchiverConverter.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< + GetArchiverRequest, GetArchiverResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, GetArchiverResponse>( + 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 getStream( final GetStreamRequest request, @@ -699,6 +861,241 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future startArchiver( + final StartArchiverRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async startArchiver"); + final StartArchiverRequest interceptedRequest = + StartArchiverConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StartArchiverConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = StartArchiverConverter.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< + StartArchiverRequest, StartArchiverResponse>( + (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, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post(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, StartArchiverResponse>( + 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, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future stopArchiver( + final StopArchiverRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async stopArchiver"); + final StopArchiverRequest interceptedRequest = + StopArchiverConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StopArchiverConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = StopArchiverConverter.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< + StopArchiverRequest, StopArchiverResponse>( + (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, onSuccess, onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post(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, StopArchiverResponse>( + 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, onSuccess, onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future updateArchiver( + final UpdateArchiverRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateArchiverRequest, UpdateArchiverResponse> + handler) { + LOG.trace("Called async updateArchiver"); + final UpdateArchiverRequest interceptedRequest = + UpdateArchiverConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateArchiverConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = UpdateArchiverConverter.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< + UpdateArchiverRequest, UpdateArchiverResponse>( + (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.getUpdateArchiverDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.put( + ib, + interceptedRequest.getUpdateArchiverDetails(), + 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, UpdateArchiverResponse>( + 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.getUpdateArchiverDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future updateStream( final UpdateStreamRequest request, diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminClient.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminClient.java index 03f07d4b60c..0b2b806e3cf 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminClient.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminClient.java @@ -409,6 +409,38 @@ public ChangeStreamCompartmentResponse changeStreamCompartment( }); } + @Override + public CreateArchiverResponse createArchiver(CreateArchiverRequest request) { + LOG.trace("Called createArchiver"); + final CreateArchiverRequest interceptedRequest = + CreateArchiverConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateArchiverConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = CreateArchiverConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateArchiverDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateStreamResponse createStream(CreateStreamRequest request) { LOG.trace("Called createStream"); @@ -470,6 +502,34 @@ public DeleteStreamResponse deleteStream(DeleteStreamRequest request) { }); } + @Override + public GetArchiverResponse getArchiver(GetArchiverRequest request) { + LOG.trace("Called getArchiver"); + final GetArchiverRequest interceptedRequest = + GetArchiverConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetArchiverConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = GetArchiverConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetStreamResponse getStream(GetStreamRequest request) { LOG.trace("Called getStream"); @@ -525,6 +585,96 @@ public ListStreamsResponse listStreams(ListStreamsRequest request) { }); } + @Override + public StartArchiverResponse startArchiver(StartArchiverRequest request) { + LOG.trace("Called startArchiver"); + final StartArchiverRequest interceptedRequest = + StartArchiverConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StartArchiverConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = StartArchiverConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public StopArchiverResponse stopArchiver(StopArchiverRequest request) { + LOG.trace("Called stopArchiver"); + final StopArchiverRequest interceptedRequest = + StopArchiverConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + StopArchiverConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = StopArchiverConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateArchiverResponse updateArchiver(UpdateArchiverRequest request) { + LOG.trace("Called updateArchiver"); + final UpdateArchiverRequest interceptedRequest = + UpdateArchiverConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateArchiverConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = UpdateArchiverConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateArchiverDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateStreamResponse updateStream(UpdateStreamRequest request) { LOG.trace("Called updateStream"); diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminWaiters.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminWaiters.java index cc6dad61e48..5cfc9752e0d 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminWaiters.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/StreamAdminWaiters.java @@ -18,6 +18,102 @@ public class StreamAdminWaiters { private final java.util.concurrent.ExecutorService executorService; private final StreamAdmin client; + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetState 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 com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forArchiver( + GetArchiverRequest request, + com.oracle.bmc.streaming.model.ArchiverLifecycleState... 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 forArchiver( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forArchiver( + GetArchiverRequest request, + com.oracle.bmc.streaming.model.ArchiverLifecycleState 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 forArchiver( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.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 forArchiver( + GetArchiverRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.streaming.model.ArchiverLifecycleState... 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 forArchiver( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Archiver. + private com.oracle.bmc.waiter.Waiter forArchiver( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetArchiverRequest request, + final com.oracle.bmc.streaming.model.ArchiverLifecycleState... 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< + GetArchiverRequest, GetArchiverResponse>() { + @Override + public GetArchiverResponse apply(GetArchiverRequest request) { + return client.getArchiver(request); + } + }, + new com.google.common.base.Predicate() { + @Override + public boolean apply(GetArchiverResponse response) { + return targetStatesSet.contains( + response.getArchiver().getLifecycleState()); + } + }, + false), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateArchiverConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateArchiverConverter.java new file mode 100644 index 00000000000..29d525777e4 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateArchiverConverter.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class CreateArchiverConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateArchiverRequest interceptRequest(CreateArchiverRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, CreateArchiverRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getStreamId(), "streamId must not be blank"); + Validate.notNull(request.getCreateArchiverDetails(), "createArchiverDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("streams") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getStreamId())) + .path("archiver"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + 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, CreateArchiverResponse>() { + @Override + public CreateArchiverResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for CreateArchiverResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = + RESPONSE_CONVERSION_FACTORY.create(Archiver.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateArchiverResponse.Builder builder = + CreateArchiverResponse.builder(); + + builder.archiver(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)); + } + + CreateArchiverResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateStreamConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateStreamConverter.java index a3c7890192b..061c6c1b991 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateStreamConverter.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/CreateStreamConverter.java @@ -78,6 +78,15 @@ public CreateStreamResponse apply( 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)); + } + CreateStreamResponse responseWrapper = builder.build(); ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/DeleteStreamConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/DeleteStreamConverter.java index 1664eaa8c2e..31d1fdfdf5c 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/DeleteStreamConverter.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/DeleteStreamConverter.java @@ -42,6 +42,10 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( ib.header("opc-request-id", request.getOpcRequestId()); } + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + return ib; } diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetArchiverConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetArchiverConverter.java new file mode 100644 index 00000000000..85316e55c45 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetArchiverConverter.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class GetArchiverConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetArchiverRequest interceptRequest(GetArchiverRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetArchiverRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getStreamId(), "streamId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("streams") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getStreamId())) + .path("archiver"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, GetArchiverResponse>() { + @Override + public GetArchiverResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for GetArchiverResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = + RESPONSE_CONVERSION_FACTORY.create(Archiver.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetArchiverResponse.Builder builder = GetArchiverResponse.builder(); + + builder.archiver(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)); + } + + GetArchiverResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetStreamConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetStreamConverter.java index bd572bc5d0d..c0a0d47bde1 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetStreamConverter.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/GetStreamConverter.java @@ -81,6 +81,15 @@ public GetStreamResponse apply(javax.ws.rs.core.Response rawResponse) { 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)); + } + GetStreamResponse responseWrapper = builder.build(); ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/StartArchiverConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/StartArchiverConverter.java new file mode 100644 index 00000000000..d220ba5a7d8 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/StartArchiverConverter.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class StartArchiverConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static StartArchiverRequest interceptRequest(StartArchiverRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, StartArchiverRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getStreamId(), "streamId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("streams") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getStreamId())) + .path("archiver") + .path("actions") + .path("start"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + 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, StartArchiverResponse>() { + @Override + public StartArchiverResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for StartArchiverResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = + RESPONSE_CONVERSION_FACTORY.create(Archiver.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + StartArchiverResponse.Builder builder = + StartArchiverResponse.builder(); + + builder.archiver(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)); + } + + StartArchiverResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/StopArchiverConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/StopArchiverConverter.java new file mode 100644 index 00000000000..bdafa921ed6 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/StopArchiverConverter.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class StopArchiverConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static StopArchiverRequest interceptRequest(StopArchiverRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, StopArchiverRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getStreamId(), "streamId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("streams") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getStreamId())) + .path("archiver") + .path("actions") + .path("stop"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + 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, StopArchiverResponse>() { + @Override + public StopArchiverResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for StopArchiverResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = + RESPONSE_CONVERSION_FACTORY.create(Archiver.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + StopArchiverResponse.Builder builder = + StopArchiverResponse.builder(); + + builder.archiver(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)); + } + + StopArchiverResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateArchiverConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateArchiverConverter.java new file mode 100644 index 00000000000..52a8db397e4 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateArchiverConverter.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.streaming.model.*; +import com.oracle.bmc.streaming.requests.*; +import com.oracle.bmc.streaming.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public class UpdateArchiverConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateArchiverRequest interceptRequest(UpdateArchiverRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, UpdateArchiverRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getStreamId(), "streamId must not be blank"); + Validate.notNull(request.getUpdateArchiverDetails(), "updateArchiverDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20180418") + .path("streams") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getStreamId())) + .path("archiver"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + 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, UpdateArchiverResponse>() { + @Override + public UpdateArchiverResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for UpdateArchiverResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders> + responseFn = + RESPONSE_CONVERSION_FACTORY.create(Archiver.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + UpdateArchiverResponse.Builder builder = + UpdateArchiverResponse.builder(); + + builder.archiver(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)); + } + + UpdateArchiverResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateStreamConverter.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateStreamConverter.java index 93f3a999c96..210d4aec36f 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateStreamConverter.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/internal/http/UpdateStreamConverter.java @@ -43,6 +43,10 @@ public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( ib.header("opc-request-id", request.getOpcRequestId()); } + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + return ib; } @@ -84,6 +88,15 @@ public UpdateStreamResponse apply( 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)); + } + UpdateStreamResponse responseWrapper = builder.build(); ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/Archiver.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/Archiver.java new file mode 100644 index 00000000000..d3c5b4036e0 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/Archiver.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * Represents the current state of the stream archiver. + * + *
+ * 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: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Archiver.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class Archiver { + @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("lifecycleState") + private ArchiverLifecycleState lifecycleState; + + public Builder lifecycleState(ArchiverLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("useExistingBucket") + private Boolean useExistingBucket; + + public Builder useExistingBucket(Boolean useExistingBucket) { + this.useExistingBucket = useExistingBucket; + this.__explicitlySet__.add("useExistingBucket"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("startPosition") + private ArchiverStartPosition startPosition; + + public Builder startPosition(ArchiverStartPosition startPosition) { + this.startPosition = startPosition; + this.__explicitlySet__.add("startPosition"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverSizeInMBs") + private Integer batchRolloverSizeInMBs; + + public Builder batchRolloverSizeInMBs(Integer batchRolloverSizeInMBs) { + this.batchRolloverSizeInMBs = batchRolloverSizeInMBs; + this.__explicitlySet__.add("batchRolloverSizeInMBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverTimeInSeconds") + private Integer batchRolloverTimeInSeconds; + + public Builder batchRolloverTimeInSeconds(Integer batchRolloverTimeInSeconds) { + this.batchRolloverTimeInSeconds = batchRolloverTimeInSeconds; + this.__explicitlySet__.add("batchRolloverTimeInSeconds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("error") + private ArchiverError error; + + public Builder error(ArchiverError error) { + this.error = error; + this.__explicitlySet__.add("error"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Archiver build() { + Archiver __instance__ = + new Archiver( + timeCreated, + lifecycleState, + bucketName, + useExistingBucket, + startPosition, + batchRolloverSizeInMBs, + batchRolloverTimeInSeconds, + error); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Archiver o) { + Builder copiedBuilder = + timeCreated(o.getTimeCreated()) + .lifecycleState(o.getLifecycleState()) + .bucketName(o.getBucketName()) + .useExistingBucket(o.getUseExistingBucket()) + .startPosition(o.getStartPosition()) + .batchRolloverSizeInMBs(o.getBatchRolloverSizeInMBs()) + .batchRolloverTimeInSeconds(o.getBatchRolloverTimeInSeconds()) + .error(o.getError()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Time when the resource was created. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + /** + * The state of the stream archiver. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + ArchiverLifecycleState lifecycleState; + + /** + * The name of the bucket. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + String bucketName; + + /** + * The flag to create a new bucket or use existing one. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("useExistingBucket") + Boolean useExistingBucket; + + /** + * The start message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startPosition") + ArchiverStartPosition startPosition; + + /** + * The batch rollover size in megabytes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverSizeInMBs") + Integer batchRolloverSizeInMBs; + + /** + * The rollover time in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverTimeInSeconds") + Integer batchRolloverTimeInSeconds; + + /** + * If an operation failed this property contained the last error occurred. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("error") + ArchiverError error; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverError.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverError.java new file mode 100644 index 00000000000..3221a46335b --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverError.java @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * An error related to a stream archiver. + *
+ * 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: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ArchiverError.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ArchiverError { + @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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ArchiverError build() { + ArchiverError __instance__ = new ArchiverError(code, message); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ArchiverError o) { + Builder copiedBuilder = code(o.getCode()).message(o.getMessage()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A short error code that defines the error, meant for programmatic parsing. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("code") + String code; + + /** + * A human-readable error string. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("message") + String message; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverLifecycleState.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverLifecycleState.java new file mode 100644 index 00000000000..c27989c23b8 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverLifecycleState.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * The state of the stream archiver. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public enum ArchiverLifecycleState { + Creating("CREATING"), + Stopped("STOPPED"), + Starting("STARTING"), + Running("RUNNING"), + Stopping("STOPPING"), + Updating("UPDATING"), + + /** + * 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 (ArchiverLifecycleState v : ArchiverLifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ArchiverLifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ArchiverLifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ArchiverLifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverStartPosition.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverStartPosition.java new file mode 100644 index 00000000000..5bff648d4d0 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/ArchiverStartPosition.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * The start message of the stream archiver. + **/ +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.extern.slf4j.Slf4j +public enum ArchiverStartPosition { + Latest("LATEST"), + TrimHorizon("TRIM_HORIZON"), + + /** + * 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 (ArchiverStartPosition v : ArchiverStartPosition.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ArchiverStartPosition(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ArchiverStartPosition create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ArchiverStartPosition', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateArchiverDetails.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateArchiverDetails.java new file mode 100644 index 00000000000..c5e15242c1f --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/CreateArchiverDetails.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * Represents the parameters of the stream archiver. + * + *
+ * 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: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateArchiverDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateArchiverDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("useExistingBucket") + private Boolean useExistingBucket; + + public Builder useExistingBucket(Boolean useExistingBucket) { + this.useExistingBucket = useExistingBucket; + this.__explicitlySet__.add("useExistingBucket"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("startPosition") + private ArchiverStartPosition startPosition; + + public Builder startPosition(ArchiverStartPosition startPosition) { + this.startPosition = startPosition; + this.__explicitlySet__.add("startPosition"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverSizeInMBs") + private Integer batchRolloverSizeInMBs; + + public Builder batchRolloverSizeInMBs(Integer batchRolloverSizeInMBs) { + this.batchRolloverSizeInMBs = batchRolloverSizeInMBs; + this.__explicitlySet__.add("batchRolloverSizeInMBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverTimeInSeconds") + private Integer batchRolloverTimeInSeconds; + + public Builder batchRolloverTimeInSeconds(Integer batchRolloverTimeInSeconds) { + this.batchRolloverTimeInSeconds = batchRolloverTimeInSeconds; + this.__explicitlySet__.add("batchRolloverTimeInSeconds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateArchiverDetails build() { + CreateArchiverDetails __instance__ = + new CreateArchiverDetails( + bucketName, + useExistingBucket, + startPosition, + batchRolloverSizeInMBs, + batchRolloverTimeInSeconds); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateArchiverDetails o) { + Builder copiedBuilder = + bucketName(o.getBucketName()) + .useExistingBucket(o.getUseExistingBucket()) + .startPosition(o.getStartPosition()) + .batchRolloverSizeInMBs(o.getBatchRolloverSizeInMBs()) + .batchRolloverTimeInSeconds(o.getBatchRolloverTimeInSeconds()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The name of the bucket. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + String bucketName; + + /** + * The flag to create a new bucket or use existing one. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("useExistingBucket") + Boolean useExistingBucket; + + /** + * The start message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startPosition") + ArchiverStartPosition startPosition; + + /** + * The batch rollover size in megabytes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverSizeInMBs") + Integer batchRolloverSizeInMBs; + + /** + * The rollover time in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverTimeInSeconds") + Integer batchRolloverTimeInSeconds; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateArchiverDetails.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateArchiverDetails.java new file mode 100644 index 00000000000..377dd9848f4 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/model/UpdateArchiverDetails.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.model; + +/** + * The update stream archiver parameters. + *
+ * 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: 20180418") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateArchiverDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateArchiverDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + private String bucketName; + + public Builder bucketName(String bucketName) { + this.bucketName = bucketName; + this.__explicitlySet__.add("bucketName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("useExistingBucket") + private Boolean useExistingBucket; + + public Builder useExistingBucket(Boolean useExistingBucket) { + this.useExistingBucket = useExistingBucket; + this.__explicitlySet__.add("useExistingBucket"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("startPosition") + private ArchiverStartPosition startPosition; + + public Builder startPosition(ArchiverStartPosition startPosition) { + this.startPosition = startPosition; + this.__explicitlySet__.add("startPosition"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverSizeInMBs") + private Integer batchRolloverSizeInMBs; + + public Builder batchRolloverSizeInMBs(Integer batchRolloverSizeInMBs) { + this.batchRolloverSizeInMBs = batchRolloverSizeInMBs; + this.__explicitlySet__.add("batchRolloverSizeInMBs"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverTimeInSeconds") + private Integer batchRolloverTimeInSeconds; + + public Builder batchRolloverTimeInSeconds(Integer batchRolloverTimeInSeconds) { + this.batchRolloverTimeInSeconds = batchRolloverTimeInSeconds; + this.__explicitlySet__.add("batchRolloverTimeInSeconds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateArchiverDetails build() { + UpdateArchiverDetails __instance__ = + new UpdateArchiverDetails( + bucketName, + useExistingBucket, + startPosition, + batchRolloverSizeInMBs, + batchRolloverTimeInSeconds); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateArchiverDetails o) { + Builder copiedBuilder = + bucketName(o.getBucketName()) + .useExistingBucket(o.getUseExistingBucket()) + .startPosition(o.getStartPosition()) + .batchRolloverSizeInMBs(o.getBatchRolloverSizeInMBs()) + .batchRolloverTimeInSeconds(o.getBatchRolloverTimeInSeconds()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The name of the bucket. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bucketName") + String bucketName; + + /** + * The flag to create a new bucket or use existing one. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("useExistingBucket") + Boolean useExistingBucket; + + /** + * The start message. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("startPosition") + ArchiverStartPosition startPosition; + + /** + * The batch rollover size in megabytes. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverSizeInMBs") + Integer batchRolloverSizeInMBs; + + /** + * The rollover time in seconds. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("batchRolloverTimeInSeconds") + Integer batchRolloverTimeInSeconds; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateArchiverRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateArchiverRequest.java new file mode 100644 index 00000000000..dcb44862f04 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/CreateArchiverRequest.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CreateArchiverRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the stream. + * + */ + private String streamId; + + /** + * A stream archiver parameters to create. + */ + private CreateArchiverDetails createArchiverDetails; + + /** + * The 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 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; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateArchiverRequest o) { + streamId(o.getStreamId()); + createArchiverDetails(o.getCreateArchiverDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateArchiverRequest 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 CreateArchiverRequest + */ + public CreateArchiverRequest build() { + CreateArchiverRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteStreamRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteStreamRequest.java index 88b576b0663..c4859d78c7e 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteStreamRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/DeleteStreamRequest.java @@ -22,6 +22,11 @@ public class DeleteStreamRequest extends com.oracle.bmc.requests.BmcRequest { */ private String opcRequestId; + /** + * 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; @@ -57,6 +62,7 @@ public Builder retryConfiguration( public Builder copy(DeleteStreamRequest o) { streamId(o.getStreamId()); opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetArchiverRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetArchiverRequest.java new file mode 100644 index 00000000000..82e11b3f727 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/GetArchiverRequest.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetArchiverRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the stream. + * + */ + private String streamId; + + /** + * The 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 { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetArchiverRequest o) { + streamId(o.getStreamId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetArchiverRequest 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 GetArchiverRequest + */ + public GetArchiverRequest build() { + GetArchiverRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/StartArchiverRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/StartArchiverRequest.java new file mode 100644 index 00000000000..14a7dfca37f --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/StartArchiverRequest.java @@ -0,0 +1,89 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class StartArchiverRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the stream. + * + */ + private String streamId; + + /** + * The 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; + + /** + * 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; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StartArchiverRequest o) { + streamId(o.getStreamId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of StartArchiverRequest 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 StartArchiverRequest + */ + public StartArchiverRequest build() { + StartArchiverRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/StopArchiverRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/StopArchiverRequest.java new file mode 100644 index 00000000000..d686c01b619 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/StopArchiverRequest.java @@ -0,0 +1,89 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class StopArchiverRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the stream. + * + */ + private String streamId; + + /** + * The 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; + + /** + * 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; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StopArchiverRequest o) { + streamId(o.getStreamId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of StopArchiverRequest 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 StopArchiverRequest + */ + public StopArchiverRequest build() { + StopArchiverRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateArchiverRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateArchiverRequest.java new file mode 100644 index 00000000000..a74d1650832 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateArchiverRequest.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.requests; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class UpdateArchiverRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The OCID of the stream. + * + */ + private String streamId; + + /** + * The new parameters of the stream archiver. + */ + private UpdateArchiverDetails updateArchiverDetails; + + /** + * The 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; + + /** + * 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; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateArchiverRequest o) { + streamId(o.getStreamId()); + updateArchiverDetails(o.getUpdateArchiverDetails()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateArchiverRequest 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 UpdateArchiverRequest + */ + public UpdateArchiverRequest build() { + UpdateArchiverRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateStreamRequest.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateStreamRequest.java index 98eb135cfce..98fa887d5ed 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateStreamRequest.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/requests/UpdateStreamRequest.java @@ -27,6 +27,11 @@ public class UpdateStreamRequest extends com.oracle.bmc.requests.BmcRequest { */ private String opcRequestId; + /** + * 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; @@ -63,6 +68,7 @@ public Builder copy(UpdateStreamRequest o) { streamId(o.getStreamId()); updateStreamDetails(o.getUpdateStreamDetails()); opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); invocationCallback(o.getInvocationCallback()); retryConfiguration(o.getRetryConfiguration()); return this; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateArchiverResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateArchiverResponse.java new file mode 100644 index 00000000000..f8e3e42c968 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateArchiverResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateArchiverResponse { + + /** + * 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 Archiver instance. + */ + private Archiver archiver; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateArchiverResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + archiver(o.getArchiver()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateStreamResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateStreamResponse.java index a60af94ce22..cdf763652aa 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateStreamResponse.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/CreateStreamResponse.java @@ -17,6 +17,11 @@ public class CreateStreamResponse { */ private String opcRequestId; + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + /** * The returned Stream instance. */ @@ -29,6 +34,7 @@ public static class Builder { */ public Builder copy(CreateStreamResponse o) { opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); stream(o.getStream()); return this; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetArchiverResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetArchiverResponse.java new file mode 100644 index 00000000000..afd6ddad0a4 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetArchiverResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetArchiverResponse { + + /** + * 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 Archiver instance. + */ + private Archiver archiver; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetArchiverResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + archiver(o.getArchiver()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetStreamResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetStreamResponse.java index c74c0cae208..a803b9bb2ae 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetStreamResponse.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/GetStreamResponse.java @@ -17,6 +17,11 @@ public class GetStreamResponse { */ private String opcRequestId; + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + /** * The returned Stream instance. */ @@ -29,6 +34,7 @@ public static class Builder { */ public Builder copy(GetStreamResponse o) { opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); stream(o.getStream()); return this; diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/StartArchiverResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/StartArchiverResponse.java new file mode 100644 index 00000000000..0c9111cffeb --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/StartArchiverResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class StartArchiverResponse { + + /** + * 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 Archiver instance. + */ + private Archiver archiver; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StartArchiverResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + archiver(o.getArchiver()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/StopArchiverResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/StopArchiverResponse.java new file mode 100644 index 00000000000..fa68beb4ed8 --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/StopArchiverResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class StopArchiverResponse { + + /** + * 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 Archiver instance. + */ + private Archiver archiver; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(StopArchiverResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + archiver(o.getArchiver()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateArchiverResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateArchiverResponse.java new file mode 100644 index 00000000000..7d45efca5ed --- /dev/null +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateArchiverResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.streaming.responses; + +import com.oracle.bmc.streaming.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20180418") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateArchiverResponse { + + /** + * 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 Archiver instance. + */ + private Archiver archiver; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateArchiverResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + archiver(o.getArchiver()); + + return this; + } + } +} diff --git a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateStreamResponse.java b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateStreamResponse.java index aba4fc3bb6b..bf79a1250ec 100644 --- a/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateStreamResponse.java +++ b/bmc-streaming/src/main/java/com/oracle/bmc/streaming/responses/UpdateStreamResponse.java @@ -17,6 +17,11 @@ public class UpdateStreamResponse { */ private String opcRequestId; + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + /** * The returned Stream instance. */ @@ -29,6 +34,7 @@ public static class Builder { */ public Builder copy(UpdateStreamResponse o) { opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); stream(o.getStream()); return this; diff --git a/bmc-waas/pom.xml b/bmc-waas/pom.xml index 9b6244a94e0..c2163f7da8e 100644 --- a/bmc-waas/pom.xml +++ b/bmc-waas/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-waas @@ -17,7 +17,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/Waas.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/Waas.java index eac32fca1f6..7feef6374bf 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/Waas.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/Waas.java @@ -54,6 +54,15 @@ public interface Waas extends AutoCloseable { */ CancelWorkRequestResponse cancelWorkRequest(CancelWorkRequestRequest request); + /** + * Moves address list into a different compartment. When provided, If-Match is checked against ETag values of the address list. + * @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. + */ + ChangeAddressListCompartmentResponse changeAddressListCompartment( + ChangeAddressListCompartmentRequest request); + /** * Moves certificate into a different compartment. When provided, If-Match is checked against ETag values of the certificate. * @param request The request object containing the details to send @@ -63,6 +72,15 @@ public interface Waas extends AutoCloseable { ChangeCertificateCompartmentResponse changeCertificateCompartment( ChangeCertificateCompartmentRequest request); + /** + * Moves Custom Protection rule into a different compartment. When provided, If-Match is checked against ETag values of the Custom Protection rule. + * @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. + */ + ChangeCustomProtectionRuleCompartmentResponse changeCustomProtectionRuleCompartment( + ChangeCustomProtectionRuleCompartmentRequest request); + /** * Moves WAAS policy into a different compartment. When provided, If-Match is checked against ETag values of the WAAS policy. * @param request The request object containing the details to send @@ -72,6 +90,15 @@ ChangeCertificateCompartmentResponse changeCertificateCompartment( ChangeWaasPolicyCompartmentResponse changeWaasPolicyCompartment( ChangeWaasPolicyCompartmentRequest request); + /** + * Creates an address list in set compartment and allows it to be used in a WAAS policy. + * For more information, see [WAF Settings](https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafsettings.htm). + * @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. + */ + CreateAddressListResponse createAddressList(CreateAddressListRequest request); + /** * Allows an SSL certificate to be added to a WAAS policy. The Web Application Firewall terminates SSL connections to inspect requests in runtime, and then re-encrypts requests before sending them to the origin for fulfillment. *

@@ -82,6 +109,15 @@ ChangeWaasPolicyCompartmentResponse changeWaasPolicyCompartment( */ CreateCertificateResponse createCertificate(CreateCertificateRequest request); + /** + * Creates a new Custom Protection rule in the specified 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. + */ + CreateCustomProtectionRuleResponse createCustomProtectionRule( + CreateCustomProtectionRuleRequest request); + /** * Creates a new Web Application Acceleration and Security (WAAS) policy in the specified compartment. A WAAS policy must be established before creating Web Application Firewall (WAF) rules. To use WAF rules, your web application's origin servers must defined in the `WaasPolicy` schema. *

@@ -102,6 +138,14 @@ ChangeWaasPolicyCompartmentResponse changeWaasPolicyCompartment( */ CreateWaasPolicyResponse createWaasPolicy(CreateWaasPolicyRequest request); + /** + * Deletes the address list from the compartment if it is not used. + * @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. + */ + DeleteAddressListResponse deleteAddressList(DeleteAddressListRequest request); + /** * Deletes an SSL certificate from the WAAS service. * @param request The request object containing the details to send @@ -110,6 +154,15 @@ ChangeWaasPolicyCompartmentResponse changeWaasPolicyCompartment( */ DeleteCertificateResponse deleteCertificate(DeleteCertificateRequest request); + /** + * Deletes a Custom Protection rule. + * @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. + */ + DeleteCustomProtectionRuleResponse deleteCustomProtectionRule( + DeleteCustomProtectionRuleRequest request); + /** * Deletes a policy. * @param request The request object containing the details to send @@ -118,6 +171,14 @@ ChangeWaasPolicyCompartmentResponse changeWaasPolicyCompartment( */ DeleteWaasPolicyResponse deleteWaasPolicy(DeleteWaasPolicyRequest request); + /** + * Gets the details of an address list. + * @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. + */ + GetAddressListResponse getAddressList(GetAddressListRequest request); + /** * Gets the details of an SSL certificate. * @param request The request object containing the details to send @@ -126,6 +187,14 @@ ChangeWaasPolicyCompartmentResponse changeWaasPolicyCompartment( */ GetCertificateResponse getCertificate(GetCertificateRequest request); + /** + * Gets the details of a Custom Protection rule. + * @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. + */ + GetCustomProtectionRuleResponse getCustomProtectionRule(GetCustomProtectionRuleRequest request); + /** * Gets the device fingerprint challenge settings in the Web Application Firewall configuration for a WAAS policy. * @param request The request object containing the details to send @@ -218,6 +287,23 @@ GetWafAddressRateLimitingResponse getWafAddressRateLimiting( */ ListAccessRulesResponse listAccessRules(ListAccessRulesRequest request); + /** + * Gets a list of address lists that can be used in a WAAS policy. + * @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. + */ + ListAddressListsResponse listAddressLists(ListAddressListsRequest request); + + /** + * Gets the currently configured caching rules for the Web Application Firewall configuration of a specified WAAS policy. + * The order of the caching rules is important. The rules will be checked in the order they are specified and the first matching rule will be used. + * @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. + */ + ListCachingRulesResponse listCachingRules(ListCachingRulesRequest request); + /** * Gets the list of currently configured CAPTCHA challenges in the Web * Application Firewall configuration of a WAAS policy. @@ -239,6 +325,15 @@ GetWafAddressRateLimitingResponse getWafAddressRateLimiting( */ ListCertificatesResponse listCertificates(ListCertificatesRequest request); + /** + * Gets a list of Custom Protection rules. + * @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. + */ + ListCustomProtectionRulesResponse listCustomProtectionRules( + ListCustomProtectionRulesRequest request); + /** * Return the list of the tenant's edge node subnets. Use these CIDR blocks to restrict incoming traffic to your origin. These subnets are owned by OCI and forward traffic to customer origins. They are not associated with specific regions or compartments. * @param request The request object containing the details to send @@ -297,6 +392,15 @@ GetWafAddressRateLimitingResponse getWafAddressRateLimiting( */ ListWaasPoliciesResponse listWaasPolicies(ListWaasPoliciesRequest request); + /** + * Gets the list of currently configured custom protection rules for a WAAS policy. + * @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. + */ + ListWaasPolicyCustomProtectionRulesResponse listWaasPolicyCustomProtectionRules( + ListWaasPolicyCustomProtectionRulesRequest request); + /** * Gets the number of blocked requests by a Web Application Firewall feature in five minute blocks, sorted by `timeObserved` in ascending order (starting from oldest data). * @param request The request object containing the details to send @@ -353,6 +457,14 @@ GetWafAddressRateLimitingResponse getWafAddressRateLimiting( */ ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request); + /** + * Accepts a list of resources that will get it's cache purged. If resources property is not passed, then the entire cache for Web Application will be purged. + * @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. + */ + PurgeCacheResponse purgeCache(PurgeCacheRequest request); + /** * Updates the list of access rules in the Web Application Firewall configuration for a specified WAAS policy. Access rules allow explicit actions to be defined and executed for requests that meet various conditions. A rule action can be set to allow, detect, or block requests. The detect setting allows the request to pass through the Web Application Firewall and is tagged with a `DETECT` flag in the Web Application Firewall's log. *

@@ -369,6 +481,25 @@ GetWafAddressRateLimitingResponse getWafAddressRateLimiting( */ UpdateAccessRulesResponse updateAccessRules(UpdateAccessRulesRequest request); + /** + * Updates the details of an address list. Only the fields specified in the request body will be updated; all other properties will remain unchanged. + * @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. + */ + UpdateAddressListResponse updateAddressList(UpdateAddressListRequest request); + + /** + * Updates the configuration for each specified caching rule. + * This operation can update or delete caching rules depending on the structure of the request body. + * Caching rules can be updated by changing the properties of the caching rule object with the rule's key specified in the key field. + * Any existing caching rules that are not specified with a key in the list of access rules will be deleted upon update. + * @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. + */ + UpdateCachingRulesResponse updateCachingRules(UpdateCachingRulesRequest request); + /** * Updates the list of CAPTCHA challenges in the Web Application Firewall configuration for a WAAS policy. * This operation can create, update, or delete CAPTCHAs depending on the structure of the request body. @@ -391,6 +522,15 @@ GetWafAddressRateLimitingResponse getWafAddressRateLimiting( */ UpdateCertificateResponse updateCertificate(UpdateCertificateRequest request); + /** + * Updates the details of a Custom Protection rule. Only the fields specified in the request body will be updated; all other properties will remain unchanged. + * @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. + */ + UpdateCustomProtectionRuleResponse updateCustomProtectionRule( + UpdateCustomProtectionRuleRequest request); + /** * Updates the Device Fingerprint Challenge (DFC) settings in the Web Application Firewall configuration for a policy. The DFC generates a hashed signature of both virtual and real browsers based on 50+ attributes. These proprietary signatures are then leveraged for real-time correlation to identify and block malicious bots. *

@@ -476,6 +616,15 @@ UpdateProtectionSettingsResponse updateProtectionSettings( */ UpdateWaasPolicyResponse updateWaasPolicy(UpdateWaasPolicyRequest request); + /** + * Updates the action for each specified custom protection rule. Only the `DETECT` and `BLOCK` actions can be set. Disabled rules should not be included in the list. For more information on protection rules, see [WAF Protection Rules](https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm). + * @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. + */ + UpdateWaasPolicyCustomProtectionRulesResponse updateWaasPolicyCustomProtectionRules( + UpdateWaasPolicyCustomProtectionRulesRequest request); + /** * Updates the address rate limiting settings in the Web Application Firewall configuration for a policy. Rate limiting allows you to configure a threshold for the number of requests from a unique IP address for the given period. You can also define the response code for the requests from the same address that exceed the threshold. * @param request The request object containing the details to send diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasAsync.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasAsync.java index 6cc8e3cc7f7..f81bc5fd03f 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasAsync.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasAsync.java @@ -70,6 +70,23 @@ java.util.concurrent.Future cancelWorkRequest( CancelWorkRequestRequest, CancelWorkRequestResponse> handler); + /** + * Moves address list into a different compartment. When provided, If-Match is checked against ETag values of the address list. + * + * @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 changeAddressListCompartment( + ChangeAddressListCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeAddressListCompartmentRequest, + ChangeAddressListCompartmentResponse> + handler); + /** * Moves certificate into a different compartment. When provided, If-Match is checked against ETag values of the certificate. * @@ -87,6 +104,24 @@ java.util.concurrent.Future changeCertific ChangeCertificateCompartmentResponse> handler); + /** + * Moves Custom Protection rule into a different compartment. When provided, If-Match is checked against ETag values of the Custom Protection rule. + * + * @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 + changeCustomProtectionRuleCompartment( + ChangeCustomProtectionRuleCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeCustomProtectionRuleCompartmentRequest, + ChangeCustomProtectionRuleCompartmentResponse> + handler); + /** * Moves WAAS policy into a different compartment. When provided, If-Match is checked against ETag values of the WAAS policy. * @@ -103,6 +138,23 @@ java.util.concurrent.Future changeWaasPolic ChangeWaasPolicyCompartmentRequest, ChangeWaasPolicyCompartmentResponse> handler); + /** + * Creates an address list in set compartment and allows it to be used in a WAAS policy. + * For more information, see [WAF Settings](https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafsettings.htm). + * + * @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 createAddressList( + CreateAddressListRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateAddressListRequest, CreateAddressListResponse> + handler); + /** * Allows an SSL certificate to be added to a WAAS policy. The Web Application Firewall terminates SSL connections to inspect requests in runtime, and then re-encrypts requests before sending them to the origin for fulfillment. *

@@ -121,6 +173,22 @@ java.util.concurrent.Future createCertificate( CreateCertificateRequest, CreateCertificateResponse> handler); + /** + * Creates a new Custom Protection rule in the specified 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 createCustomProtectionRule( + CreateCustomProtectionRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateCustomProtectionRuleRequest, CreateCustomProtectionRuleResponse> + handler); + /** * Creates a new Web Application Acceleration and Security (WAAS) policy in the specified compartment. A WAAS policy must be established before creating Web Application Firewall (WAF) rules. To use WAF rules, your web application's origin servers must defined in the `WaasPolicy` schema. *

@@ -148,6 +216,22 @@ java.util.concurrent.Future createWaasPolicy( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Deletes the address list from the compartment if it is not used. + * + * @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 deleteAddressList( + DeleteAddressListRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteAddressListRequest, DeleteAddressListResponse> + handler); + /** * Deletes an SSL certificate from the WAAS service. * @@ -164,6 +248,22 @@ java.util.concurrent.Future deleteCertificate( DeleteCertificateRequest, DeleteCertificateResponse> handler); + /** + * Deletes a Custom Protection rule. + * + * @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 deleteCustomProtectionRule( + DeleteCustomProtectionRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteCustomProtectionRuleRequest, DeleteCustomProtectionRuleResponse> + handler); + /** * Deletes a policy. * @@ -179,6 +279,21 @@ java.util.concurrent.Future deleteWaasPolicy( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets the details of an address list. + * + * @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 getAddressList( + GetAddressListRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Gets the details of an SSL certificate. * @@ -194,6 +309,22 @@ java.util.concurrent.Future getCertificate( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets the details of a Custom Protection rule. + * + * @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 getCustomProtectionRule( + GetCustomProtectionRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetCustomProtectionRuleRequest, GetCustomProtectionRuleResponse> + handler); + /** * Gets the device fingerprint challenge settings in the Web Application Firewall configuration for a WAAS policy. * @@ -368,6 +499,37 @@ java.util.concurrent.Future listAccessRules( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets a list of address lists that can be used in a WAAS policy. + * + * @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 listAddressLists( + ListAddressListsRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets the currently configured caching rules for the Web Application Firewall configuration of a specified WAAS policy. + * The order of the caching rules is important. The rules will be checked in the order they are specified and the first matching rule will be used. + * + * @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 listCachingRules( + ListCachingRulesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + /** * Gets the list of currently configured CAPTCHA challenges in the Web * Application Firewall configuration of a WAAS policy. @@ -403,6 +565,22 @@ java.util.concurrent.Future listCertificates( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets a list of Custom Protection rules. + * + * @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 listCustomProtectionRules( + ListCustomProtectionRulesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListCustomProtectionRulesRequest, ListCustomProtectionRulesResponse> + handler); + /** * Return the list of the tenant's edge node subnets. Use these CIDR blocks to restrict incoming traffic to your origin. These subnets are owned by OCI and forward traffic to customer origins. They are not associated with specific regions or compartments. * @@ -505,6 +683,24 @@ java.util.concurrent.Future listWaasPolicies( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Gets the list of currently configured custom protection rules for a WAAS policy. + * + * @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 + listWaasPolicyCustomProtectionRules( + ListWaasPolicyCustomProtectionRulesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListWaasPolicyCustomProtectionRulesRequest, + ListWaasPolicyCustomProtectionRulesResponse> + handler); + /** * Gets the number of blocked requests by a Web Application Firewall feature in five minute blocks, sorted by `timeObserved` in ascending order (starting from oldest data). * @@ -603,6 +799,20 @@ java.util.concurrent.Future listWorkRequests( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Accepts a list of resources that will get it's cache purged. If resources property is not passed, then the entire cache for Web Application will be purged. + * + * @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 purgeCache( + PurgeCacheRequest request, + com.oracle.bmc.responses.AsyncHandler handler); + /** * Updates the list of access rules in the Web Application Firewall configuration for a specified WAAS policy. Access rules allow explicit actions to be defined and executed for requests that meet various conditions. A rule action can be set to allow, detect, or block requests. The detect setting allows the request to pass through the Web Application Firewall and is tagged with a `DETECT` flag in the Web Application Firewall's log. *

@@ -627,6 +837,41 @@ java.util.concurrent.Future updateAccessRules( UpdateAccessRulesRequest, UpdateAccessRulesResponse> handler); + /** + * Updates the details of an address list. Only the fields specified in the request body will be updated; all other properties will remain unchanged. + * + * @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 updateAddressList( + UpdateAddressListRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateAddressListRequest, UpdateAddressListResponse> + handler); + + /** + * Updates the configuration for each specified caching rule. + * This operation can update or delete caching rules depending on the structure of the request body. + * Caching rules can be updated by changing the properties of the caching rule object with the rule's key specified in the key field. + * Any existing caching rules that are not specified with a key in the list of access rules will be deleted upon update. + * + * @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 updateCachingRules( + UpdateCachingRulesRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateCachingRulesRequest, UpdateCachingRulesResponse> + handler); + /** * Updates the list of CAPTCHA challenges in the Web Application Firewall configuration for a WAAS policy. * This operation can create, update, or delete CAPTCHAs depending on the structure of the request body. @@ -664,6 +909,22 @@ java.util.concurrent.Future updateCertificate( UpdateCertificateRequest, UpdateCertificateResponse> handler); + /** + * Updates the details of a Custom Protection rule. Only the fields specified in the request body will be updated; all other properties will remain unchanged. + * + * @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 updateCustomProtectionRule( + UpdateCustomProtectionRuleRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateCustomProtectionRuleRequest, UpdateCustomProtectionRuleResponse> + handler); + /** * Updates the Device Fingerprint Challenge (DFC) settings in the Web Application Firewall configuration for a policy. The DFC generates a hashed signature of both virtual and real browsers based on 50+ attributes. These proprietary signatures are then leveraged for real-time correlation to identify and block malicious bots. *

@@ -820,6 +1081,24 @@ java.util.concurrent.Future updateWaasPolicy( com.oracle.bmc.responses.AsyncHandler handler); + /** + * Updates the action for each specified custom protection rule. Only the `DETECT` and `BLOCK` actions can be set. Disabled rules should not be included in the list. For more information on protection rules, see [WAF Protection Rules](https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm). + * + * @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 + updateWaasPolicyCustomProtectionRules( + UpdateWaasPolicyCustomProtectionRulesRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateWaasPolicyCustomProtectionRulesRequest, + UpdateWaasPolicyCustomProtectionRulesResponse> + handler); + /** * Updates the address rate limiting settings in the Web Application Firewall configuration for a policy. Rate limiting allows you to configure a threshold for the number of requests from a unique IP address for the given period. You can also define the response code for the requests from the same address that exceed the threshold. * diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasAsyncClient.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasAsyncClient.java index 379bdeec601..68a2b409cc1 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasAsyncClient.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasAsyncClient.java @@ -468,32 +468,32 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - changeCertificateCompartment( - final ChangeCertificateCompartmentRequest request, + public java.util.concurrent.Future + changeAddressListCompartment( + final ChangeAddressListCompartmentRequest request, final com.oracle.bmc.responses.AsyncHandler< - ChangeCertificateCompartmentRequest, - ChangeCertificateCompartmentResponse> + ChangeAddressListCompartmentRequest, + ChangeAddressListCompartmentResponse> handler) { - LOG.trace("Called async changeCertificateCompartment"); - final ChangeCertificateCompartmentRequest interceptedRequest = - ChangeCertificateCompartmentConverter.interceptRequest(request); + LOG.trace("Called async changeAddressListCompartment"); + final ChangeAddressListCompartmentRequest interceptedRequest = + ChangeAddressListCompartmentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ChangeCertificateCompartmentConverter.fromRequest(client, interceptedRequest); + ChangeAddressListCompartmentConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< - javax.ws.rs.core.Response, ChangeCertificateCompartmentResponse> - transformer = ChangeCertificateCompartmentConverter.fromResponse(); + javax.ws.rs.core.Response, ChangeAddressListCompartmentResponse> + transformer = ChangeAddressListCompartmentConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< - ChangeCertificateCompartmentRequest, ChangeCertificateCompartmentResponse> + ChangeAddressListCompartmentRequest, ChangeAddressListCompartmentResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ChangeCertificateCompartmentRequest, - ChangeCertificateCompartmentResponse>( + ChangeAddressListCompartmentRequest, + ChangeAddressListCompartmentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -508,7 +508,7 @@ public void retryCall() { this, interceptedRequest); client.post( ib, - interceptedRequest.getChangeCertificateCompartmentDetails(), + interceptedRequest.getChangeAddressListCompartmentDetails(), interceptedRequest, onSuccess, onError); @@ -530,7 +530,7 @@ public void retryCall() { java.util.concurrent.Future responseFuture = client.post( ib, - interceptedRequest.getChangeCertificateCompartmentDetails(), + interceptedRequest.getChangeAddressListCompartmentDetails(), interceptedRequest, onSuccess, onError); @@ -538,7 +538,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, ChangeCertificateCompartmentResponse>( + javax.ws.rs.core.Response, ChangeAddressListCompartmentResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -549,7 +549,7 @@ public void retryCall() { public java.util.concurrent.Future get() { return client.post( ib, - interceptedRequest.getChangeCertificateCompartmentDetails(), + interceptedRequest.getChangeAddressListCompartmentDetails(), interceptedRequest, onSuccess, onError); @@ -562,32 +562,32 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - changeWaasPolicyCompartment( - final ChangeWaasPolicyCompartmentRequest request, + public java.util.concurrent.Future + changeCertificateCompartment( + final ChangeCertificateCompartmentRequest request, final com.oracle.bmc.responses.AsyncHandler< - ChangeWaasPolicyCompartmentRequest, - ChangeWaasPolicyCompartmentResponse> + ChangeCertificateCompartmentRequest, + ChangeCertificateCompartmentResponse> handler) { - LOG.trace("Called async changeWaasPolicyCompartment"); - final ChangeWaasPolicyCompartmentRequest interceptedRequest = - ChangeWaasPolicyCompartmentConverter.interceptRequest(request); + LOG.trace("Called async changeCertificateCompartment"); + final ChangeCertificateCompartmentRequest interceptedRequest = + ChangeCertificateCompartmentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ChangeWaasPolicyCompartmentConverter.fromRequest(client, interceptedRequest); + ChangeCertificateCompartmentConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< - javax.ws.rs.core.Response, ChangeWaasPolicyCompartmentResponse> - transformer = ChangeWaasPolicyCompartmentConverter.fromResponse(); + javax.ws.rs.core.Response, ChangeCertificateCompartmentResponse> + transformer = ChangeCertificateCompartmentConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< - ChangeWaasPolicyCompartmentRequest, ChangeWaasPolicyCompartmentResponse> + ChangeCertificateCompartmentRequest, ChangeCertificateCompartmentResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ChangeWaasPolicyCompartmentRequest, - ChangeWaasPolicyCompartmentResponse>( + ChangeCertificateCompartmentRequest, + ChangeCertificateCompartmentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -602,7 +602,7 @@ public void retryCall() { this, interceptedRequest); client.post( ib, - interceptedRequest.getChangeWaasPolicyCompartmentDetails(), + interceptedRequest.getChangeCertificateCompartmentDetails(), interceptedRequest, onSuccess, onError); @@ -624,7 +624,7 @@ public void retryCall() { java.util.concurrent.Future responseFuture = client.post( ib, - interceptedRequest.getChangeWaasPolicyCompartmentDetails(), + interceptedRequest.getChangeCertificateCompartmentDetails(), interceptedRequest, onSuccess, onError); @@ -632,7 +632,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, ChangeWaasPolicyCompartmentResponse>( + javax.ws.rs.core.Response, ChangeCertificateCompartmentResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -643,7 +643,7 @@ public void retryCall() { public java.util.concurrent.Future get() { return client.post( ib, - interceptedRequest.getChangeWaasPolicyCompartmentDetails(), + interceptedRequest.getChangeCertificateCompartmentDetails(), interceptedRequest, onSuccess, onError); @@ -656,27 +656,34 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future createCertificate( - final CreateCertificateRequest request, - final com.oracle.bmc.responses.AsyncHandler< - CreateCertificateRequest, CreateCertificateResponse> - handler) { - LOG.trace("Called async createCertificate"); - final CreateCertificateRequest interceptedRequest = - CreateCertificateConverter.interceptRequest(request); + public java.util.concurrent.Future + changeCustomProtectionRuleCompartment( + final ChangeCustomProtectionRuleCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeCustomProtectionRuleCompartmentRequest, + ChangeCustomProtectionRuleCompartmentResponse> + handler) { + LOG.trace("Called async changeCustomProtectionRuleCompartment"); + final ChangeCustomProtectionRuleCompartmentRequest interceptedRequest = + ChangeCustomProtectionRuleCompartmentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateCertificateConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = CreateCertificateConverter.fromResponse(); + ChangeCustomProtectionRuleCompartmentConverter.fromRequest( + client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeCustomProtectionRuleCompartmentResponse> + transformer = ChangeCustomProtectionRuleCompartmentConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + ChangeCustomProtectionRuleCompartmentRequest, + ChangeCustomProtectionRuleCompartmentResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - CreateCertificateRequest, CreateCertificateResponse>( + ChangeCustomProtectionRuleCompartmentRequest, + ChangeCustomProtectionRuleCompartmentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -691,7 +698,8 @@ public void retryCall() { this, interceptedRequest); client.post( ib, - interceptedRequest.getCreateCertificateDetails(), + interceptedRequest + .getChangeCustomProtectionRuleCompartmentDetails(), interceptedRequest, onSuccess, onError); @@ -713,7 +721,7 @@ public void retryCall() { java.util.concurrent.Future responseFuture = client.post( ib, - interceptedRequest.getCreateCertificateDetails(), + interceptedRequest.getChangeCustomProtectionRuleCompartmentDetails(), interceptedRequest, onSuccess, onError); @@ -721,7 +729,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, CreateCertificateResponse>( + javax.ws.rs.core.Response, ChangeCustomProtectionRuleCompartmentResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -732,7 +740,8 @@ public void retryCall() { public java.util.concurrent.Future get() { return client.post( ib, - interceptedRequest.getCreateCertificateDetails(), + interceptedRequest + .getChangeCustomProtectionRuleCompartmentDetails(), interceptedRequest, onSuccess, onError); @@ -745,27 +754,32 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future createWaasPolicy( - final CreateWaasPolicyRequest request, - final com.oracle.bmc.responses.AsyncHandler< - CreateWaasPolicyRequest, CreateWaasPolicyResponse> - handler) { - LOG.trace("Called async createWaasPolicy"); - final CreateWaasPolicyRequest interceptedRequest = - CreateWaasPolicyConverter.interceptRequest(request); + public java.util.concurrent.Future + changeWaasPolicyCompartment( + final ChangeWaasPolicyCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeWaasPolicyCompartmentRequest, + ChangeWaasPolicyCompartmentResponse> + handler) { + LOG.trace("Called async changeWaasPolicyCompartment"); + final ChangeWaasPolicyCompartmentRequest interceptedRequest = + ChangeWaasPolicyCompartmentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - CreateWaasPolicyConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = CreateWaasPolicyConverter.fromResponse(); + ChangeWaasPolicyCompartmentConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeWaasPolicyCompartmentResponse> + transformer = ChangeWaasPolicyCompartmentConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + ChangeWaasPolicyCompartmentRequest, ChangeWaasPolicyCompartmentResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - CreateWaasPolicyRequest, CreateWaasPolicyResponse>( + ChangeWaasPolicyCompartmentRequest, + ChangeWaasPolicyCompartmentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -780,7 +794,7 @@ public void retryCall() { this, interceptedRequest); client.post( ib, - interceptedRequest.getCreateWaasPolicyDetails(), + interceptedRequest.getChangeWaasPolicyCompartmentDetails(), interceptedRequest, onSuccess, onError); @@ -802,7 +816,7 @@ public void retryCall() { java.util.concurrent.Future responseFuture = client.post( ib, - interceptedRequest.getCreateWaasPolicyDetails(), + interceptedRequest.getChangeWaasPolicyCompartmentDetails(), interceptedRequest, onSuccess, onError); @@ -810,7 +824,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, CreateWaasPolicyResponse>( + javax.ws.rs.core.Response, ChangeWaasPolicyCompartmentResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -821,7 +835,7 @@ public void retryCall() { public java.util.concurrent.Future get() { return client.post( ib, - interceptedRequest.getCreateWaasPolicyDetails(), + interceptedRequest.getChangeWaasPolicyCompartmentDetails(), interceptedRequest, onSuccess, onError); @@ -834,27 +848,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future deleteCertificate( - final DeleteCertificateRequest request, + public java.util.concurrent.Future createAddressList( + final CreateAddressListRequest request, final com.oracle.bmc.responses.AsyncHandler< - DeleteCertificateRequest, DeleteCertificateResponse> + CreateAddressListRequest, CreateAddressListResponse> handler) { - LOG.trace("Called async deleteCertificate"); - final DeleteCertificateRequest interceptedRequest = - DeleteCertificateConverter.interceptRequest(request); + LOG.trace("Called async createAddressList"); + final CreateAddressListRequest interceptedRequest = + CreateAddressListConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteCertificateConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = DeleteCertificateConverter.fromResponse(); + CreateAddressListConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = CreateAddressListConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - DeleteCertificateRequest, DeleteCertificateResponse>( + CreateAddressListRequest, CreateAddressListResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -867,7 +881,12 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.delete(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getCreateAddressListDetails(), + interceptedRequest, + onSuccess, + onError); } }; } @@ -884,12 +903,17 @@ public void retryCall() { handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.delete(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getCreateAddressListDetails(), + 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, DeleteCertificateResponse>( + javax.ws.rs.core.Response, CreateAddressListResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -898,7 +922,12 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.delete(ib, interceptedRequest, onSuccess, onError); + return client.post( + ib, + interceptedRequest.getCreateAddressListDetails(), + interceptedRequest, + onSuccess, + onError); } }); } else { @@ -908,27 +937,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future deleteWaasPolicy( - final DeleteWaasPolicyRequest request, + public java.util.concurrent.Future createCertificate( + final CreateCertificateRequest request, final com.oracle.bmc.responses.AsyncHandler< - DeleteWaasPolicyRequest, DeleteWaasPolicyResponse> + CreateCertificateRequest, CreateCertificateResponse> handler) { - LOG.trace("Called async deleteWaasPolicy"); - final DeleteWaasPolicyRequest interceptedRequest = - DeleteWaasPolicyConverter.interceptRequest(request); + LOG.trace("Called async createCertificate"); + final CreateCertificateRequest interceptedRequest = + CreateCertificateConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - DeleteWaasPolicyConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = DeleteWaasPolicyConverter.fromResponse(); + CreateCertificateConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = CreateCertificateConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - DeleteWaasPolicyRequest, DeleteWaasPolicyResponse>( + CreateCertificateRequest, CreateCertificateResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -941,7 +970,12 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.delete(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getCreateCertificateDetails(), + interceptedRequest, + onSuccess, + onError); } }; } @@ -958,12 +992,17 @@ public void retryCall() { handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.delete(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getCreateCertificateDetails(), + 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, DeleteWaasPolicyResponse>( + javax.ws.rs.core.Response, CreateCertificateResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -972,7 +1011,12 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.delete(ib, interceptedRequest, onSuccess, onError); + return client.post( + ib, + interceptedRequest.getCreateCertificateDetails(), + interceptedRequest, + onSuccess, + onError); } }); } else { @@ -982,27 +1026,31 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getCertificate( - final GetCertificateRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetCertificateRequest, GetCertificateResponse> - handler) { - LOG.trace("Called async getCertificate"); - final GetCertificateRequest interceptedRequest = - GetCertificateConverter.interceptRequest(request); + public java.util.concurrent.Future + createCustomProtectionRule( + final CreateCustomProtectionRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateCustomProtectionRuleRequest, + CreateCustomProtectionRuleResponse> + handler) { + LOG.trace("Called async createCustomProtectionRule"); + final CreateCustomProtectionRuleRequest interceptedRequest = + CreateCustomProtectionRuleConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetCertificateConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetCertificateConverter.fromResponse(); + CreateCustomProtectionRuleConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateCustomProtectionRuleResponse> + transformer = CreateCustomProtectionRuleConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + CreateCustomProtectionRuleRequest, CreateCustomProtectionRuleResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetCertificateRequest, GetCertificateResponse>( + CreateCustomProtectionRuleRequest, CreateCustomProtectionRuleResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1015,7 +1063,12 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getCreateCustomProtectionRuleDetails(), + interceptedRequest, + onSuccess, + onError); } }; } @@ -1032,12 +1085,17 @@ public void retryCall() { handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getCreateCustomProtectionRuleDetails(), + 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, GetCertificateResponse>( + javax.ws.rs.core.Response, CreateCustomProtectionRuleResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1046,7 +1104,12 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.post( + ib, + interceptedRequest.getCreateCustomProtectionRuleDetails(), + interceptedRequest, + onSuccess, + onError); } }); } else { @@ -1056,32 +1119,1171 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - getDeviceFingerprintChallenge( - final GetDeviceFingerprintChallengeRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetDeviceFingerprintChallengeRequest, - GetDeviceFingerprintChallengeResponse> - handler) { - LOG.trace("Called async getDeviceFingerprintChallenge"); - final GetDeviceFingerprintChallengeRequest interceptedRequest = - GetDeviceFingerprintChallengeConverter.interceptRequest(request); + public java.util.concurrent.Future createWaasPolicy( + final CreateWaasPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateWaasPolicyRequest, CreateWaasPolicyResponse> + handler) { + LOG.trace("Called async createWaasPolicy"); + final CreateWaasPolicyRequest interceptedRequest = + CreateWaasPolicyConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetDeviceFingerprintChallengeConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function< - javax.ws.rs.core.Response, GetDeviceFingerprintChallengeResponse> - transformer = GetDeviceFingerprintChallengeConverter.fromResponse(); + CreateWaasPolicyConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = CreateWaasPolicyConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler< - GetDeviceFingerprintChallengeRequest, GetDeviceFingerprintChallengeResponse> + 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< + CreateWaasPolicyRequest, CreateWaasPolicyResponse>( + (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.getCreateWaasPolicyDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.post( + ib, + interceptedRequest.getCreateWaasPolicyDetails(), + 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, CreateWaasPolicyResponse>( + 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.getCreateWaasPolicyDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + + @Override + public java.util.concurrent.Future deleteAddressList( + final DeleteAddressListRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteAddressListRequest, DeleteAddressListResponse> + handler) { + LOG.trace("Called async deleteAddressList"); + final DeleteAddressListRequest interceptedRequest = + DeleteAddressListConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAddressListConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = DeleteAddressListConverter.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< + DeleteAddressListRequest, DeleteAddressListResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, DeleteAddressListResponse>( + 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 deleteCertificate( + final DeleteCertificateRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteCertificateRequest, DeleteCertificateResponse> + handler) { + LOG.trace("Called async deleteCertificate"); + final DeleteCertificateRequest interceptedRequest = + DeleteCertificateConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteCertificateConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = DeleteCertificateConverter.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< + DeleteCertificateRequest, DeleteCertificateResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, DeleteCertificateResponse>( + 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 + deleteCustomProtectionRule( + final DeleteCustomProtectionRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteCustomProtectionRuleRequest, + DeleteCustomProtectionRuleResponse> + handler) { + LOG.trace("Called async deleteCustomProtectionRule"); + final DeleteCustomProtectionRuleRequest interceptedRequest = + DeleteCustomProtectionRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteCustomProtectionRuleConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteCustomProtectionRuleResponse> + transformer = DeleteCustomProtectionRuleConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + DeleteCustomProtectionRuleRequest, DeleteCustomProtectionRuleResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + DeleteCustomProtectionRuleRequest, DeleteCustomProtectionRuleResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, DeleteCustomProtectionRuleResponse>( + 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 deleteWaasPolicy( + final DeleteWaasPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteWaasPolicyRequest, DeleteWaasPolicyResponse> + handler) { + LOG.trace("Called async deleteWaasPolicy"); + final DeleteWaasPolicyRequest interceptedRequest = + DeleteWaasPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteWaasPolicyConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = DeleteWaasPolicyConverter.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< + DeleteWaasPolicyRequest, DeleteWaasPolicyResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, DeleteWaasPolicyResponse>( + 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 getAddressList( + final GetAddressListRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetAddressListRequest, GetAddressListResponse> + handler) { + LOG.trace("Called async getAddressList"); + final GetAddressListRequest interceptedRequest = + GetAddressListConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAddressListConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetAddressListConverter.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< + GetAddressListRequest, GetAddressListResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, GetAddressListResponse>( + 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 getCertificate( + final GetCertificateRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetCertificateRequest, GetCertificateResponse> + handler) { + LOG.trace("Called async getCertificate"); + final GetCertificateRequest interceptedRequest = + GetCertificateConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCertificateConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetCertificateConverter.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< + GetCertificateRequest, GetCertificateResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, GetCertificateResponse>( + 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 getCustomProtectionRule( + final GetCustomProtectionRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetCustomProtectionRuleRequest, GetCustomProtectionRuleResponse> + handler) { + LOG.trace("Called async getCustomProtectionRule"); + final GetCustomProtectionRuleRequest interceptedRequest = + GetCustomProtectionRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCustomProtectionRuleConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetCustomProtectionRuleResponse> + transformer = GetCustomProtectionRuleConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + GetCustomProtectionRuleRequest, GetCustomProtectionRuleResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetCustomProtectionRuleRequest, GetCustomProtectionRuleResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, GetCustomProtectionRuleResponse>( + 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 + getDeviceFingerprintChallenge( + final GetDeviceFingerprintChallengeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetDeviceFingerprintChallengeRequest, + GetDeviceFingerprintChallengeResponse> + handler) { + LOG.trace("Called async getDeviceFingerprintChallenge"); + final GetDeviceFingerprintChallengeRequest interceptedRequest = + GetDeviceFingerprintChallengeConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetDeviceFingerprintChallengeConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetDeviceFingerprintChallengeResponse> + transformer = GetDeviceFingerprintChallengeConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + GetDeviceFingerprintChallengeRequest, GetDeviceFingerprintChallengeResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetDeviceFingerprintChallengeRequest, + GetDeviceFingerprintChallengeResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, GetDeviceFingerprintChallengeResponse>( + 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 + getHumanInteractionChallenge( + final GetHumanInteractionChallengeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetHumanInteractionChallengeRequest, + GetHumanInteractionChallengeResponse> + handler) { + LOG.trace("Called async getHumanInteractionChallenge"); + final GetHumanInteractionChallengeRequest interceptedRequest = + GetHumanInteractionChallengeConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetHumanInteractionChallengeConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetHumanInteractionChallengeResponse> + transformer = GetHumanInteractionChallengeConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + GetHumanInteractionChallengeRequest, GetHumanInteractionChallengeResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetHumanInteractionChallengeRequest, + GetHumanInteractionChallengeResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, GetHumanInteractionChallengeResponse>( + 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 getJsChallenge( + final GetJsChallengeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetJsChallengeRequest, GetJsChallengeResponse> + handler) { + LOG.trace("Called async getJsChallenge"); + final GetJsChallengeRequest interceptedRequest = + GetJsChallengeConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetJsChallengeConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetJsChallengeConverter.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< + GetJsChallengeRequest, GetJsChallengeResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, GetJsChallengeResponse>( + 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 getPolicyConfig( + final GetPolicyConfigRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetPolicyConfigRequest, GetPolicyConfigResponse> + handler) { + LOG.trace("Called async getPolicyConfig"); + final GetPolicyConfigRequest interceptedRequest = + GetPolicyConfigConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetPolicyConfigConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetPolicyConfigConverter.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< + GetPolicyConfigRequest, GetPolicyConfigResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, GetPolicyConfigResponse>( + 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 getProtectionRule( + final GetProtectionRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetProtectionRuleRequest, GetProtectionRuleResponse> + handler) { + LOG.trace("Called async getProtectionRule"); + final GetProtectionRuleRequest interceptedRequest = + GetProtectionRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetProtectionRuleConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetProtectionRuleConverter.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< + GetProtectionRuleRequest, GetProtectionRuleResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, GetProtectionRuleResponse>( + 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 getProtectionSettings( + final GetProtectionSettingsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetProtectionSettingsRequest, GetProtectionSettingsResponse> + handler) { + LOG.trace("Called async getProtectionSettings"); + final GetProtectionSettingsRequest interceptedRequest = + GetProtectionSettingsConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetProtectionSettingsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetProtectionSettingsResponse> + transformer = GetProtectionSettingsConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + GetProtectionSettingsRequest, GetProtectionSettingsResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + GetProtectionSettingsRequest, GetProtectionSettingsResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, GetProtectionSettingsResponse>( + 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 getWaasPolicy( + final GetWaasPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getWaasPolicy"); + final GetWaasPolicyRequest interceptedRequest = + GetWaasPolicyConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWaasPolicyConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetWaasPolicyConverter.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< + GetWaasPolicyRequest, GetWaasPolicyResponse>( + (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 = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : 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, GetWaasPolicyResponse>( + 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 getWafAddressRateLimiting( + final GetWafAddressRateLimitingRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetWafAddressRateLimitingRequest, GetWafAddressRateLimitingResponse> + handler) { + LOG.trace("Called async getWafAddressRateLimiting"); + final GetWafAddressRateLimitingRequest interceptedRequest = + GetWafAddressRateLimitingConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetWafAddressRateLimitingConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetWafAddressRateLimitingResponse> + transformer = GetWafAddressRateLimitingConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + GetWafAddressRateLimitingRequest, GetWafAddressRateLimitingResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetDeviceFingerprintChallengeRequest, - GetDeviceFingerprintChallengeResponse>( + GetWafAddressRateLimitingRequest, GetWafAddressRateLimitingResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1116,7 +2318,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, GetDeviceFingerprintChallengeResponse>( + javax.ws.rs.core.Response, GetWafAddressRateLimitingResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1135,32 +2337,26 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future - getHumanInteractionChallenge( - final GetHumanInteractionChallengeRequest request, - final com.oracle.bmc.responses.AsyncHandler< - GetHumanInteractionChallengeRequest, - GetHumanInteractionChallengeResponse> - handler) { - LOG.trace("Called async getHumanInteractionChallenge"); - final GetHumanInteractionChallengeRequest interceptedRequest = - GetHumanInteractionChallengeConverter.interceptRequest(request); + public java.util.concurrent.Future getWafConfig( + final GetWafConfigRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + LOG.trace("Called async getWafConfig"); + final GetWafConfigRequest interceptedRequest = + GetWafConfigConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetHumanInteractionChallengeConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function< - javax.ws.rs.core.Response, GetHumanInteractionChallengeResponse> - transformer = GetHumanInteractionChallengeConverter.fromResponse(); + GetWafConfigConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetWafConfigConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler< - GetHumanInteractionChallengeRequest, GetHumanInteractionChallengeResponse> + 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< - GetHumanInteractionChallengeRequest, - GetHumanInteractionChallengeResponse>( + GetWafConfigRequest, GetWafConfigResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1195,7 +2391,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, GetHumanInteractionChallengeResponse>( + javax.ws.rs.core.Response, GetWafConfigResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1214,27 +2410,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getJsChallenge( - final GetJsChallengeRequest request, + public java.util.concurrent.Future getWorkRequest( + final GetWorkRequestRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetJsChallengeRequest, GetJsChallengeResponse> + GetWorkRequestRequest, GetWorkRequestResponse> handler) { - LOG.trace("Called async getJsChallenge"); - final GetJsChallengeRequest interceptedRequest = - GetJsChallengeConverter.interceptRequest(request); + LOG.trace("Called async getWorkRequest"); + final GetWorkRequestRequest interceptedRequest = + GetWorkRequestConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetJsChallengeConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetJsChallengeConverter.fromResponse(); + GetWorkRequestConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = GetWorkRequestConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - GetJsChallengeRequest, GetJsChallengeResponse>( + GetWorkRequestRequest, GetWorkRequestResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1269,7 +2465,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, GetJsChallengeResponse>( + javax.ws.rs.core.Response, GetWorkRequestResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1288,27 +2484,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getPolicyConfig( - final GetPolicyConfigRequest request, + public java.util.concurrent.Future listAccessRules( + final ListAccessRulesRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetPolicyConfigRequest, GetPolicyConfigResponse> + ListAccessRulesRequest, ListAccessRulesResponse> handler) { - LOG.trace("Called async getPolicyConfig"); - final GetPolicyConfigRequest interceptedRequest = - GetPolicyConfigConverter.interceptRequest(request); + LOG.trace("Called async listAccessRules"); + final ListAccessRulesRequest interceptedRequest = + ListAccessRulesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetPolicyConfigConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetPolicyConfigConverter.fromResponse(); + ListAccessRulesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListAccessRulesConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - GetPolicyConfigRequest, GetPolicyConfigResponse>( + ListAccessRulesRequest, ListAccessRulesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1343,7 +2539,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, GetPolicyConfigResponse>( + javax.ws.rs.core.Response, ListAccessRulesResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1362,27 +2558,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getProtectionRule( - final GetProtectionRuleRequest request, + public java.util.concurrent.Future listAddressLists( + final ListAddressListsRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetProtectionRuleRequest, GetProtectionRuleResponse> + ListAddressListsRequest, ListAddressListsResponse> handler) { - LOG.trace("Called async getProtectionRule"); - final GetProtectionRuleRequest interceptedRequest = - GetProtectionRuleConverter.interceptRequest(request); + LOG.trace("Called async listAddressLists"); + final ListAddressListsRequest interceptedRequest = + ListAddressListsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetProtectionRuleConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetProtectionRuleConverter.fromResponse(); + ListAddressListsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListAddressListsConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - GetProtectionRuleRequest, GetProtectionRuleResponse>( + ListAddressListsRequest, ListAddressListsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1417,7 +2613,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, GetProtectionRuleResponse>( + javax.ws.rs.core.Response, ListAddressListsResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1436,29 +2632,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getProtectionSettings( - final GetProtectionSettingsRequest request, + public java.util.concurrent.Future listCachingRules( + final ListCachingRulesRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetProtectionSettingsRequest, GetProtectionSettingsResponse> + ListCachingRulesRequest, ListCachingRulesResponse> handler) { - LOG.trace("Called async getProtectionSettings"); - final GetProtectionSettingsRequest interceptedRequest = - GetProtectionSettingsConverter.interceptRequest(request); + LOG.trace("Called async listCachingRules"); + final ListCachingRulesRequest interceptedRequest = + ListCachingRulesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetProtectionSettingsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function< - javax.ws.rs.core.Response, GetProtectionSettingsResponse> - transformer = GetProtectionSettingsConverter.fromResponse(); + ListCachingRulesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListCachingRulesConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler< - GetProtectionSettingsRequest, GetProtectionSettingsResponse> + 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< - GetProtectionSettingsRequest, GetProtectionSettingsResponse>( + ListCachingRulesRequest, ListCachingRulesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1493,7 +2687,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, GetProtectionSettingsResponse>( + javax.ws.rs.core.Response, ListCachingRulesResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1512,26 +2706,26 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getWaasPolicy( - final GetWaasPolicyRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listCaptchas( + final ListCaptchasRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async getWaasPolicy"); - final GetWaasPolicyRequest interceptedRequest = - GetWaasPolicyConverter.interceptRequest(request); + LOG.trace("Called async listCaptchas"); + final ListCaptchasRequest interceptedRequest = + ListCaptchasConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetWaasPolicyConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetWaasPolicyConverter.fromResponse(); + ListCaptchasConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListCaptchasConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - GetWaasPolicyRequest, GetWaasPolicyResponse>( + ListCaptchasRequest, ListCaptchasResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1566,7 +2760,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, GetWaasPolicyResponse>( + javax.ws.rs.core.Response, ListCaptchasResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1585,29 +2779,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getWafAddressRateLimiting( - final GetWafAddressRateLimitingRequest request, + public java.util.concurrent.Future listCertificates( + final ListCertificatesRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetWafAddressRateLimitingRequest, GetWafAddressRateLimitingResponse> + ListCertificatesRequest, ListCertificatesResponse> handler) { - LOG.trace("Called async getWafAddressRateLimiting"); - final GetWafAddressRateLimitingRequest interceptedRequest = - GetWafAddressRateLimitingConverter.interceptRequest(request); + LOG.trace("Called async listCertificates"); + final ListCertificatesRequest interceptedRequest = + ListCertificatesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetWafAddressRateLimitingConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function< - javax.ws.rs.core.Response, GetWafAddressRateLimitingResponse> - transformer = GetWafAddressRateLimitingConverter.fromResponse(); + ListCertificatesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListCertificatesConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler< - GetWafAddressRateLimitingRequest, GetWafAddressRateLimitingResponse> + 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< - GetWafAddressRateLimitingRequest, GetWafAddressRateLimitingResponse>( + ListCertificatesRequest, ListCertificatesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1642,7 +2834,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, GetWafAddressRateLimitingResponse>( + javax.ws.rs.core.Response, ListCertificatesResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1661,26 +2853,29 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getWafConfig( - final GetWafConfigRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listCustomProtectionRules( + final ListCustomProtectionRulesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListCustomProtectionRulesRequest, ListCustomProtectionRulesResponse> handler) { - LOG.trace("Called async getWafConfig"); - final GetWafConfigRequest interceptedRequest = - GetWafConfigConverter.interceptRequest(request); + LOG.trace("Called async listCustomProtectionRules"); + final ListCustomProtectionRulesRequest interceptedRequest = + ListCustomProtectionRulesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetWafConfigConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetWafConfigConverter.fromResponse(); + ListCustomProtectionRulesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListCustomProtectionRulesResponse> + transformer = ListCustomProtectionRulesConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + ListCustomProtectionRulesRequest, ListCustomProtectionRulesResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - GetWafConfigRequest, GetWafConfigResponse>( + ListCustomProtectionRulesRequest, ListCustomProtectionRulesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1715,7 +2910,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, GetWafConfigResponse>( + javax.ws.rs.core.Response, ListCustomProtectionRulesResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1734,27 +2929,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future getWorkRequest( - final GetWorkRequestRequest request, + public java.util.concurrent.Future listEdgeSubnets( + final ListEdgeSubnetsRequest request, final com.oracle.bmc.responses.AsyncHandler< - GetWorkRequestRequest, GetWorkRequestResponse> + ListEdgeSubnetsRequest, ListEdgeSubnetsResponse> handler) { - LOG.trace("Called async getWorkRequest"); - final GetWorkRequestRequest interceptedRequest = - GetWorkRequestConverter.interceptRequest(request); + LOG.trace("Called async listEdgeSubnets"); + final ListEdgeSubnetsRequest interceptedRequest = + ListEdgeSubnetsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - GetWorkRequestConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = GetWorkRequestConverter.fromResponse(); + ListEdgeSubnetsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListEdgeSubnetsConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - GetWorkRequestRequest, GetWorkRequestResponse>( + ListEdgeSubnetsRequest, ListEdgeSubnetsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1789,7 +2984,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, GetWorkRequestResponse>( + javax.ws.rs.core.Response, ListEdgeSubnetsResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1808,27 +3003,26 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listAccessRules( - final ListAccessRulesRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListAccessRulesRequest, ListAccessRulesResponse> + public java.util.concurrent.Future listGoodBots( + final ListGoodBotsRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listAccessRules"); - final ListAccessRulesRequest interceptedRequest = - ListAccessRulesConverter.interceptRequest(request); + LOG.trace("Called async listGoodBots"); + final ListGoodBotsRequest interceptedRequest = + ListGoodBotsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListAccessRulesConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListAccessRulesConverter.fromResponse(); + ListGoodBotsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListGoodBotsConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - ListAccessRulesRequest, ListAccessRulesResponse>( + ListGoodBotsRequest, ListGoodBotsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1863,7 +3057,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, ListAccessRulesResponse>( + javax.ws.rs.core.Response, ListGoodBotsResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1882,26 +3076,29 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listCaptchas( - final ListCaptchasRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listProtectionRules( + final ListProtectionRulesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListProtectionRulesRequest, ListProtectionRulesResponse> handler) { - LOG.trace("Called async listCaptchas"); - final ListCaptchasRequest interceptedRequest = - ListCaptchasConverter.interceptRequest(request); + LOG.trace("Called async listProtectionRules"); + final ListProtectionRulesRequest interceptedRequest = + ListProtectionRulesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListCaptchasConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListCaptchasConverter.fromResponse(); + ListProtectionRulesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListProtectionRulesResponse> + transformer = ListProtectionRulesConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + ListProtectionRulesRequest, ListProtectionRulesResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListCaptchasRequest, ListCaptchasResponse>( + ListProtectionRulesRequest, ListProtectionRulesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -1936,7 +3133,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, ListCaptchasResponse>( + javax.ws.rs.core.Response, ListProtectionRulesResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -1954,28 +3151,30 @@ public java.util.concurrent.Future get() { } } - @Override - public java.util.concurrent.Future listCertificates( - final ListCertificatesRequest request, + @Override + public java.util.concurrent.Future listRecommendations( + final ListRecommendationsRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListCertificatesRequest, ListCertificatesResponse> + ListRecommendationsRequest, ListRecommendationsResponse> handler) { - LOG.trace("Called async listCertificates"); - final ListCertificatesRequest interceptedRequest = - ListCertificatesConverter.interceptRequest(request); + LOG.trace("Called async listRecommendations"); + final ListRecommendationsRequest interceptedRequest = + ListRecommendationsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListCertificatesConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListCertificatesConverter.fromResponse(); + ListRecommendationsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListRecommendationsResponse> + transformer = ListRecommendationsConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + com.oracle.bmc.responses.AsyncHandler< + ListRecommendationsRequest, ListRecommendationsResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListCertificatesRequest, ListCertificatesResponse>( + ListRecommendationsRequest, ListRecommendationsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2010,7 +3209,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, ListCertificatesResponse>( + javax.ws.rs.core.Response, ListRecommendationsResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2029,27 +3228,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listEdgeSubnets( - final ListEdgeSubnetsRequest request, + public java.util.concurrent.Future listThreatFeeds( + final ListThreatFeedsRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListEdgeSubnetsRequest, ListEdgeSubnetsResponse> + ListThreatFeedsRequest, ListThreatFeedsResponse> handler) { - LOG.trace("Called async listEdgeSubnets"); - final ListEdgeSubnetsRequest interceptedRequest = - ListEdgeSubnetsConverter.interceptRequest(request); + LOG.trace("Called async listThreatFeeds"); + final ListThreatFeedsRequest interceptedRequest = + ListThreatFeedsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListEdgeSubnetsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListEdgeSubnetsConverter.fromResponse(); + ListThreatFeedsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListThreatFeedsConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - ListEdgeSubnetsRequest, ListEdgeSubnetsResponse>( + ListThreatFeedsRequest, ListThreatFeedsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2084,7 +3283,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, ListEdgeSubnetsResponse>( + javax.ws.rs.core.Response, ListThreatFeedsResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2103,26 +3302,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listGoodBots( - final ListGoodBotsRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listWaasPolicies( + final ListWaasPoliciesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWaasPoliciesRequest, ListWaasPoliciesResponse> handler) { - LOG.trace("Called async listGoodBots"); - final ListGoodBotsRequest interceptedRequest = - ListGoodBotsConverter.interceptRequest(request); + LOG.trace("Called async listWaasPolicies"); + final ListWaasPoliciesRequest interceptedRequest = + ListWaasPoliciesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListGoodBotsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListGoodBotsConverter.fromResponse(); + ListWaasPoliciesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListWaasPoliciesConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - ListGoodBotsRequest, ListGoodBotsResponse>( + ListWaasPoliciesRequest, ListWaasPoliciesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2157,7 +3357,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, ListGoodBotsResponse>( + javax.ws.rs.core.Response, ListWaasPoliciesResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2176,29 +3376,34 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listProtectionRules( - final ListProtectionRulesRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListProtectionRulesRequest, ListProtectionRulesResponse> - handler) { - LOG.trace("Called async listProtectionRules"); - final ListProtectionRulesRequest interceptedRequest = - ListProtectionRulesConverter.interceptRequest(request); + public java.util.concurrent.Future + listWaasPolicyCustomProtectionRules( + final ListWaasPolicyCustomProtectionRulesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWaasPolicyCustomProtectionRulesRequest, + ListWaasPolicyCustomProtectionRulesResponse> + handler) { + LOG.trace("Called async listWaasPolicyCustomProtectionRules"); + final ListWaasPolicyCustomProtectionRulesRequest interceptedRequest = + ListWaasPolicyCustomProtectionRulesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListProtectionRulesConverter.fromRequest(client, interceptedRequest); + ListWaasPolicyCustomProtectionRulesConverter.fromRequest( + client, interceptedRequest); final com.google.common.base.Function< - javax.ws.rs.core.Response, ListProtectionRulesResponse> - transformer = ListProtectionRulesConverter.fromResponse(); + javax.ws.rs.core.Response, ListWaasPolicyCustomProtectionRulesResponse> + transformer = ListWaasPolicyCustomProtectionRulesConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< - ListProtectionRulesRequest, ListProtectionRulesResponse> + ListWaasPolicyCustomProtectionRulesRequest, + ListWaasPolicyCustomProtectionRulesResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListProtectionRulesRequest, ListProtectionRulesResponse>( + ListWaasPolicyCustomProtectionRulesRequest, + ListWaasPolicyCustomProtectionRulesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2233,7 +3438,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, ListProtectionRulesResponse>( + javax.ws.rs.core.Response, ListWaasPolicyCustomProtectionRulesResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2252,29 +3457,29 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listRecommendations( - final ListRecommendationsRequest request, + public java.util.concurrent.Future listWafBlockedRequests( + final ListWafBlockedRequestsRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListRecommendationsRequest, ListRecommendationsResponse> + ListWafBlockedRequestsRequest, ListWafBlockedRequestsResponse> handler) { - LOG.trace("Called async listRecommendations"); - final ListRecommendationsRequest interceptedRequest = - ListRecommendationsConverter.interceptRequest(request); + LOG.trace("Called async listWafBlockedRequests"); + final ListWafBlockedRequestsRequest interceptedRequest = + ListWafBlockedRequestsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListRecommendationsConverter.fromRequest(client, interceptedRequest); + ListWafBlockedRequestsConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< - javax.ws.rs.core.Response, ListRecommendationsResponse> - transformer = ListRecommendationsConverter.fromResponse(); + javax.ws.rs.core.Response, ListWafBlockedRequestsResponse> + transformer = ListWafBlockedRequestsConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< - ListRecommendationsRequest, ListRecommendationsResponse> + ListWafBlockedRequestsRequest, ListWafBlockedRequestsResponse> handlerToUse = handler; if (handler != null && this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { handlerToUse = new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< - ListRecommendationsRequest, ListRecommendationsResponse>( + ListWafBlockedRequestsRequest, ListWafBlockedRequestsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2309,7 +3514,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, ListRecommendationsResponse>( + javax.ws.rs.core.Response, ListWafBlockedRequestsResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2328,27 +3533,26 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listThreatFeeds( - final ListThreatFeedsRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListThreatFeedsRequest, ListThreatFeedsResponse> + public java.util.concurrent.Future listWafLogs( + final ListWafLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listThreatFeeds"); - final ListThreatFeedsRequest interceptedRequest = - ListThreatFeedsConverter.interceptRequest(request); + LOG.trace("Called async listWafLogs"); + final ListWafLogsRequest interceptedRequest = + ListWafLogsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListThreatFeedsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListThreatFeedsConverter.fromResponse(); + ListWafLogsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListWafLogsConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - ListThreatFeedsRequest, ListThreatFeedsResponse>( + ListWafLogsRequest, ListWafLogsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2383,7 +3587,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, ListThreatFeedsResponse>( + javax.ws.rs.core.Response, ListWafLogsResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2402,27 +3606,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listWaasPolicies( - final ListWaasPoliciesRequest request, + public java.util.concurrent.Future listWafRequests( + final ListWafRequestsRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListWaasPoliciesRequest, ListWaasPoliciesResponse> + ListWafRequestsRequest, ListWafRequestsResponse> handler) { - LOG.trace("Called async listWaasPolicies"); - final ListWaasPoliciesRequest interceptedRequest = - ListWaasPoliciesConverter.interceptRequest(request); + LOG.trace("Called async listWafRequests"); + final ListWafRequestsRequest interceptedRequest = + ListWafRequestsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWaasPoliciesConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListWaasPoliciesConverter.fromResponse(); + ListWafRequestsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListWafRequestsConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - ListWaasPoliciesRequest, ListWaasPoliciesResponse>( + ListWafRequestsRequest, ListWafRequestsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2457,7 +3661,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, ListWaasPoliciesResponse>( + javax.ws.rs.core.Response, ListWafRequestsResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2476,29 +3680,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listWafBlockedRequests( - final ListWafBlockedRequestsRequest request, + public java.util.concurrent.Future listWafTraffic( + final ListWafTrafficRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListWafBlockedRequestsRequest, ListWafBlockedRequestsResponse> + ListWafTrafficRequest, ListWafTrafficResponse> handler) { - LOG.trace("Called async listWafBlockedRequests"); - final ListWafBlockedRequestsRequest interceptedRequest = - ListWafBlockedRequestsConverter.interceptRequest(request); + LOG.trace("Called async listWafTraffic"); + final ListWafTrafficRequest interceptedRequest = + ListWafTrafficConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWafBlockedRequestsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function< - javax.ws.rs.core.Response, ListWafBlockedRequestsResponse> - transformer = ListWafBlockedRequestsConverter.fromResponse(); + ListWafTrafficConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListWafTrafficConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler< - ListWafBlockedRequestsRequest, ListWafBlockedRequestsResponse> + 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< - ListWafBlockedRequestsRequest, ListWafBlockedRequestsResponse>( + ListWafTrafficRequest, ListWafTrafficResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2533,7 +3735,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, ListWafBlockedRequestsResponse>( + javax.ws.rs.core.Response, ListWafTrafficResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2552,26 +3754,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listWafLogs( - final ListWafLogsRequest request, - final com.oracle.bmc.responses.AsyncHandler + public java.util.concurrent.Future listWhitelists( + final ListWhitelistsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListWhitelistsRequest, ListWhitelistsResponse> handler) { - LOG.trace("Called async listWafLogs"); - final ListWafLogsRequest interceptedRequest = - ListWafLogsConverter.interceptRequest(request); + LOG.trace("Called async listWhitelists"); + final ListWhitelistsRequest interceptedRequest = + ListWhitelistsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWafLogsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListWafLogsConverter.fromResponse(); + ListWhitelistsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListWhitelistsConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - ListWafLogsRequest, ListWafLogsResponse>( + ListWhitelistsRequest, ListWhitelistsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2606,7 +3809,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, ListWafLogsResponse>( + javax.ws.rs.core.Response, ListWhitelistsResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2625,27 +3828,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listWafRequests( - final ListWafRequestsRequest request, + public java.util.concurrent.Future listWorkRequests( + final ListWorkRequestsRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListWafRequestsRequest, ListWafRequestsResponse> + ListWorkRequestsRequest, ListWorkRequestsResponse> handler) { - LOG.trace("Called async listWafRequests"); - final ListWafRequestsRequest interceptedRequest = - ListWafRequestsConverter.interceptRequest(request); + LOG.trace("Called async listWorkRequests"); + final ListWorkRequestsRequest interceptedRequest = + ListWorkRequestsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWafRequestsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListWafRequestsConverter.fromResponse(); + ListWorkRequestsConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = ListWorkRequestsConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - ListWafRequestsRequest, ListWafRequestsResponse>( + ListWorkRequestsRequest, ListWorkRequestsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2680,7 +3883,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, ListWafRequestsResponse>( + javax.ws.rs.core.Response, ListWorkRequestsResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2699,27 +3902,25 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listWafTraffic( - final ListWafTrafficRequest request, - final com.oracle.bmc.responses.AsyncHandler< - ListWafTrafficRequest, ListWafTrafficResponse> + public java.util.concurrent.Future purgeCache( + final PurgeCacheRequest request, + final com.oracle.bmc.responses.AsyncHandler handler) { - LOG.trace("Called async listWafTraffic"); - final ListWafTrafficRequest interceptedRequest = - ListWafTrafficConverter.interceptRequest(request); + LOG.trace("Called async purgeCache"); + final PurgeCacheRequest interceptedRequest = PurgeCacheConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWafTrafficConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListWafTrafficConverter.fromResponse(); + PurgeCacheConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = PurgeCacheConverter.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< - ListWafTrafficRequest, ListWafTrafficResponse>( + PurgeCacheRequest, PurgeCacheResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2732,7 +3933,12 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getPurgeCache(), + interceptedRequest, + onSuccess, + onError); } }; } @@ -2749,12 +3955,17 @@ public void retryCall() { handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.post( + ib, + interceptedRequest.getPurgeCache(), + 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, ListWafTrafficResponse>( + javax.ws.rs.core.Response, PurgeCacheResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2763,7 +3974,12 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.post( + ib, + interceptedRequest.getPurgeCache(), + interceptedRequest, + onSuccess, + onError); } }); } else { @@ -2773,27 +3989,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listWhitelists( - final ListWhitelistsRequest request, + public java.util.concurrent.Future updateAccessRules( + final UpdateAccessRulesRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListWhitelistsRequest, ListWhitelistsResponse> + UpdateAccessRulesRequest, UpdateAccessRulesResponse> handler) { - LOG.trace("Called async listWhitelists"); - final ListWhitelistsRequest interceptedRequest = - ListWhitelistsConverter.interceptRequest(request); + LOG.trace("Called async updateAccessRules"); + final UpdateAccessRulesRequest interceptedRequest = + UpdateAccessRulesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWhitelistsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListWhitelistsConverter.fromResponse(); + UpdateAccessRulesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = UpdateAccessRulesConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - ListWhitelistsRequest, ListWhitelistsResponse>( + UpdateAccessRulesRequest, UpdateAccessRulesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2806,7 +4022,12 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.put( + ib, + interceptedRequest.getAccessRules(), + interceptedRequest, + onSuccess, + onError); } }; } @@ -2823,12 +4044,17 @@ public void retryCall() { handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.put( + ib, + interceptedRequest.getAccessRules(), + 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, ListWhitelistsResponse>( + javax.ws.rs.core.Response, UpdateAccessRulesResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2837,7 +4063,12 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.put( + ib, + interceptedRequest.getAccessRules(), + interceptedRequest, + onSuccess, + onError); } }); } else { @@ -2847,27 +4078,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future listWorkRequests( - final ListWorkRequestsRequest request, + public java.util.concurrent.Future updateAddressList( + final UpdateAddressListRequest request, final com.oracle.bmc.responses.AsyncHandler< - ListWorkRequestsRequest, ListWorkRequestsResponse> + UpdateAddressListRequest, UpdateAddressListResponse> handler) { - LOG.trace("Called async listWorkRequests"); - final ListWorkRequestsRequest interceptedRequest = - ListWorkRequestsConverter.interceptRequest(request); + LOG.trace("Called async updateAddressList"); + final UpdateAddressListRequest interceptedRequest = + UpdateAddressListConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - ListWorkRequestsConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = ListWorkRequestsConverter.fromResponse(); + UpdateAddressListConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = UpdateAddressListConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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>( + UpdateAddressListRequest, UpdateAddressListResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2880,7 +4111,12 @@ public void retryCall() { final com.oracle.bmc.util.internal.Consumer onError = new com.oracle.bmc.http.internal.ErrorConsumer<>( this, interceptedRequest); - client.get(ib, interceptedRequest, onSuccess, onError); + client.put( + ib, + interceptedRequest.getUpdateAddressListDetails(), + interceptedRequest, + onSuccess, + onError); } }; } @@ -2897,12 +4133,17 @@ public void retryCall() { handlerToUse, interceptedRequest); java.util.concurrent.Future responseFuture = - client.get(ib, interceptedRequest, onSuccess, onError); + client.put( + ib, + interceptedRequest.getUpdateAddressListDetails(), + 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>( + javax.ws.rs.core.Response, UpdateAddressListResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2911,7 +4152,12 @@ public void retryCall() { java.util.concurrent.Future>() { @Override public java.util.concurrent.Future get() { - return client.get(ib, interceptedRequest, onSuccess, onError); + return client.put( + ib, + interceptedRequest.getUpdateAddressListDetails(), + interceptedRequest, + onSuccess, + onError); } }); } else { @@ -2921,27 +4167,27 @@ public java.util.concurrent.Future get() { } @Override - public java.util.concurrent.Future updateAccessRules( - final UpdateAccessRulesRequest request, + public java.util.concurrent.Future updateCachingRules( + final UpdateCachingRulesRequest request, final com.oracle.bmc.responses.AsyncHandler< - UpdateAccessRulesRequest, UpdateAccessRulesResponse> + UpdateCachingRulesRequest, UpdateCachingRulesResponse> handler) { - LOG.trace("Called async updateAccessRules"); - final UpdateAccessRulesRequest interceptedRequest = - UpdateAccessRulesConverter.interceptRequest(request); + LOG.trace("Called async updateCachingRules"); + final UpdateCachingRulesRequest interceptedRequest = + UpdateCachingRulesConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = - UpdateAccessRulesConverter.fromRequest(client, interceptedRequest); - final com.google.common.base.Function - transformer = UpdateAccessRulesConverter.fromResponse(); + UpdateCachingRulesConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function + transformer = UpdateCachingRulesConverter.fromResponse(); - com.oracle.bmc.responses.AsyncHandler + 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< - UpdateAccessRulesRequest, UpdateAccessRulesResponse>( + UpdateCachingRulesRequest, UpdateCachingRulesResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handler) { @@ -2956,7 +4202,7 @@ public void retryCall() { this, interceptedRequest); client.put( ib, - interceptedRequest.getAccessRules(), + interceptedRequest.getCachingRulesDetails(), interceptedRequest, onSuccess, onError); @@ -2978,7 +4224,7 @@ public void retryCall() { java.util.concurrent.Future responseFuture = client.put( ib, - interceptedRequest.getAccessRules(), + interceptedRequest.getCachingRulesDetails(), interceptedRequest, onSuccess, onError); @@ -2986,7 +4232,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, UpdateAccessRulesResponse>( + javax.ws.rs.core.Response, UpdateCachingRulesResponse>( responseFuture, transformer, (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) @@ -2997,7 +4243,7 @@ public void retryCall() { public java.util.concurrent.Future get() { return client.put( ib, - interceptedRequest.getAccessRules(), + interceptedRequest.getCachingRulesDetails(), interceptedRequest, onSuccess, onError); @@ -3187,6 +4433,99 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future + updateCustomProtectionRule( + final UpdateCustomProtectionRuleRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateCustomProtectionRuleRequest, + UpdateCustomProtectionRuleResponse> + handler) { + LOG.trace("Called async updateCustomProtectionRule"); + final UpdateCustomProtectionRuleRequest interceptedRequest = + UpdateCustomProtectionRuleConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateCustomProtectionRuleConverter.fromRequest(client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateCustomProtectionRuleResponse> + transformer = UpdateCustomProtectionRuleConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + UpdateCustomProtectionRuleRequest, UpdateCustomProtectionRuleResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + UpdateCustomProtectionRuleRequest, UpdateCustomProtectionRuleResponse>( + (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.getUpdateCustomProtectionRuleDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.put( + ib, + interceptedRequest.getUpdateCustomProtectionRuleDetails(), + 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, UpdateCustomProtectionRuleResponse>( + 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.getUpdateCustomProtectionRuleDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future updateDeviceFingerprintChallenge( @@ -4004,6 +5343,102 @@ public java.util.concurrent.Future get() { } } + @Override + public java.util.concurrent.Future + updateWaasPolicyCustomProtectionRules( + final UpdateWaasPolicyCustomProtectionRulesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateWaasPolicyCustomProtectionRulesRequest, + UpdateWaasPolicyCustomProtectionRulesResponse> + handler) { + LOG.trace("Called async updateWaasPolicyCustomProtectionRules"); + final UpdateWaasPolicyCustomProtectionRulesRequest interceptedRequest = + UpdateWaasPolicyCustomProtectionRulesConverter.interceptRequest(request); + final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateWaasPolicyCustomProtectionRulesConverter.fromRequest( + client, interceptedRequest); + final com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateWaasPolicyCustomProtectionRulesResponse> + transformer = UpdateWaasPolicyCustomProtectionRulesConverter.fromResponse(); + + com.oracle.bmc.responses.AsyncHandler< + UpdateWaasPolicyCustomProtectionRulesRequest, + UpdateWaasPolicyCustomProtectionRulesResponse> + handlerToUse = handler; + if (handler != null + && this.authenticationDetailsProvider + instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { + handlerToUse = + new com.oracle.bmc.util.internal.RefreshAuthTokenWrappingAsyncHandler< + UpdateWaasPolicyCustomProtectionRulesRequest, + UpdateWaasPolicyCustomProtectionRulesResponse>( + (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.getUpdateCustomProtectionRulesDetails(), + interceptedRequest, + onSuccess, + onError); + } + }; + } + + final com.oracle.bmc.util.internal.Consumer onSuccess = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.SuccessConsumer<>( + handlerToUse, transformer, interceptedRequest); + final com.oracle.bmc.util.internal.Consumer onError = + (handler == null) + ? null + : new com.oracle.bmc.http.internal.ErrorConsumer<>( + handlerToUse, interceptedRequest); + + java.util.concurrent.Future responseFuture = + client.put( + ib, + interceptedRequest.getUpdateCustomProtectionRulesDetails(), + 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, UpdateWaasPolicyCustomProtectionRulesResponse>( + 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.getUpdateCustomProtectionRulesDetails(), + interceptedRequest, + onSuccess, + onError); + } + }); + } else { + return new com.oracle.bmc.util.internal.TransformingFuture<>( + responseFuture, transformer); + } + } + @Override public java.util.concurrent.Future updateWafAddressRateLimiting( diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasClient.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasClient.java index 697d53059c9..7780f173e1f 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasClient.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasClient.java @@ -438,6 +438,41 @@ public CancelWorkRequestResponse cancelWorkRequest(CancelWorkRequestRequest requ }); } + @Override + public ChangeAddressListCompartmentResponse changeAddressListCompartment( + ChangeAddressListCompartmentRequest request) { + LOG.trace("Called changeAddressListCompartment"); + final ChangeAddressListCompartmentRequest interceptedRequest = + ChangeAddressListCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeAddressListCompartmentConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeAddressListCompartmentResponse> + transformer = ChangeAddressListCompartmentConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeAddressListCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeCertificateCompartmentResponse changeCertificateCompartment( ChangeCertificateCompartmentRequest request) { @@ -473,6 +508,42 @@ public ChangeCertificateCompartmentResponse changeCertificateCompartment( }); } + @Override + public ChangeCustomProtectionRuleCompartmentResponse changeCustomProtectionRuleCompartment( + ChangeCustomProtectionRuleCompartmentRequest request) { + LOG.trace("Called changeCustomProtectionRuleCompartment"); + final ChangeCustomProtectionRuleCompartmentRequest interceptedRequest = + ChangeCustomProtectionRuleCompartmentConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ChangeCustomProtectionRuleCompartmentConverter.fromRequest( + client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeCustomProtectionRuleCompartmentResponse> + transformer = ChangeCustomProtectionRuleCompartmentConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getChangeCustomProtectionRuleCompartmentDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ChangeWaasPolicyCompartmentResponse changeWaasPolicyCompartment( ChangeWaasPolicyCompartmentRequest request) { @@ -508,6 +579,38 @@ public ChangeWaasPolicyCompartmentResponse changeWaasPolicyCompartment( }); } + @Override + public CreateAddressListResponse createAddressList(CreateAddressListRequest request) { + LOG.trace("Called createAddressList"); + final CreateAddressListRequest interceptedRequest = + CreateAddressListConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateAddressListConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = CreateAddressListConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest.getCreateAddressListDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateCertificateResponse createCertificate(CreateCertificateRequest request) { LOG.trace("Called createCertificate"); @@ -540,6 +643,41 @@ public CreateCertificateResponse createCertificate(CreateCertificateRequest requ }); } + @Override + public CreateCustomProtectionRuleResponse createCustomProtectionRule( + CreateCustomProtectionRuleRequest request) { + LOG.trace("Called createCustomProtectionRule"); + final CreateCustomProtectionRuleRequest interceptedRequest = + CreateCustomProtectionRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + CreateCustomProtectionRuleConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, CreateCustomProtectionRuleResponse> + transformer = CreateCustomProtectionRuleConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, + retriedRequest + .getCreateCustomProtectionRuleDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public CreateWaasPolicyResponse createWaasPolicy(CreateWaasPolicyRequest request) { LOG.trace("Called createWaasPolicy"); @@ -572,6 +710,35 @@ public CreateWaasPolicyResponse createWaasPolicy(CreateWaasPolicyRequest request }); } + @Override + public DeleteAddressListResponse deleteAddressList(DeleteAddressListRequest request) { + LOG.trace("Called deleteAddressList"); + final DeleteAddressListRequest interceptedRequest = + DeleteAddressListConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteAddressListConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = DeleteAddressListConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteCertificateResponse deleteCertificate(DeleteCertificateRequest request) { LOG.trace("Called deleteCertificate"); @@ -601,6 +768,37 @@ public DeleteCertificateResponse deleteCertificate(DeleteCertificateRequest requ }); } + @Override + public DeleteCustomProtectionRuleResponse deleteCustomProtectionRule( + DeleteCustomProtectionRuleRequest request) { + LOG.trace("Called deleteCustomProtectionRule"); + final DeleteCustomProtectionRuleRequest interceptedRequest = + DeleteCustomProtectionRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + DeleteCustomProtectionRuleConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteCustomProtectionRuleResponse> + transformer = DeleteCustomProtectionRuleConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.delete(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public DeleteWaasPolicyResponse deleteWaasPolicy(DeleteWaasPolicyRequest request) { LOG.trace("Called deleteWaasPolicy"); @@ -630,6 +828,34 @@ public DeleteWaasPolicyResponse deleteWaasPolicy(DeleteWaasPolicyRequest request }); } + @Override + public GetAddressListResponse getAddressList(GetAddressListRequest request) { + LOG.trace("Called getAddressList"); + final GetAddressListRequest interceptedRequest = + GetAddressListConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetAddressListConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = GetAddressListConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetCertificateResponse getCertificate(GetCertificateRequest request) { LOG.trace("Called getCertificate"); @@ -658,6 +884,35 @@ public GetCertificateResponse getCertificate(GetCertificateRequest request) { }); } + @Override + public GetCustomProtectionRuleResponse getCustomProtectionRule( + GetCustomProtectionRuleRequest request) { + LOG.trace("Called getCustomProtectionRule"); + final GetCustomProtectionRuleRequest interceptedRequest = + GetCustomProtectionRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + GetCustomProtectionRuleConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = GetCustomProtectionRuleConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public GetDeviceFingerprintChallengeResponse getDeviceFingerprintChallenge( GetDeviceFingerprintChallengeRequest request) { @@ -973,6 +1228,62 @@ public ListAccessRulesResponse listAccessRules(ListAccessRulesRequest request) { }); } + @Override + public ListAddressListsResponse listAddressLists(ListAddressListsRequest request) { + LOG.trace("Called listAddressLists"); + final ListAddressListsRequest interceptedRequest = + ListAddressListsConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListAddressListsConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = ListAddressListsConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public ListCachingRulesResponse listCachingRules(ListCachingRulesRequest request) { + LOG.trace("Called listCachingRules"); + final ListCachingRulesRequest interceptedRequest = + ListCachingRulesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListCachingRulesConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = ListCachingRulesConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListCaptchasResponse listCaptchas(ListCaptchasRequest request) { LOG.trace("Called listCaptchas"); @@ -1029,6 +1340,36 @@ public ListCertificatesResponse listCertificates(ListCertificatesRequest request }); } + @Override + public ListCustomProtectionRulesResponse listCustomProtectionRules( + ListCustomProtectionRulesRequest request) { + LOG.trace("Called listCustomProtectionRules"); + final ListCustomProtectionRulesRequest interceptedRequest = + ListCustomProtectionRulesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListCustomProtectionRulesConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, ListCustomProtectionRulesResponse> + transformer = ListCustomProtectionRulesConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListEdgeSubnetsResponse listEdgeSubnets(ListEdgeSubnetsRequest request) { LOG.trace("Called listEdgeSubnets"); @@ -1197,6 +1538,37 @@ public ListWaasPoliciesResponse listWaasPolicies(ListWaasPoliciesRequest request }); } + @Override + public ListWaasPolicyCustomProtectionRulesResponse listWaasPolicyCustomProtectionRules( + ListWaasPolicyCustomProtectionRulesRequest request) { + LOG.trace("Called listWaasPolicyCustomProtectionRules"); + final ListWaasPolicyCustomProtectionRulesRequest interceptedRequest = + ListWaasPolicyCustomProtectionRulesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + ListWaasPolicyCustomProtectionRulesConverter.fromRequest( + client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, ListWaasPolicyCustomProtectionRulesResponse> + transformer = ListWaasPolicyCustomProtectionRulesConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = client.get(ib, retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public ListWafBlockedRequestsResponse listWafBlockedRequests( ListWafBlockedRequestsRequest request) { @@ -1366,6 +1738,35 @@ public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request }); } + @Override + public PurgeCacheResponse purgeCache(PurgeCacheRequest request) { + LOG.trace("Called purgeCache"); + final PurgeCacheRequest interceptedRequest = PurgeCacheConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + PurgeCacheConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function transformer = + PurgeCacheConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.post( + ib, retriedRequest.getPurgeCache(), retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateAccessRulesResponse updateAccessRules(UpdateAccessRulesRequest request) { LOG.trace("Called updateAccessRules"); @@ -1398,6 +1799,70 @@ public UpdateAccessRulesResponse updateAccessRules(UpdateAccessRulesRequest requ }); } + @Override + public UpdateAddressListResponse updateAddressList(UpdateAddressListRequest request) { + LOG.trace("Called updateAddressList"); + final UpdateAddressListRequest interceptedRequest = + UpdateAddressListConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateAddressListConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = UpdateAddressListConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getUpdateAddressListDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + + @Override + public UpdateCachingRulesResponse updateCachingRules(UpdateCachingRulesRequest request) { + LOG.trace("Called updateCachingRules"); + final UpdateCachingRulesRequest interceptedRequest = + UpdateCachingRulesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateCachingRulesConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function + transformer = UpdateCachingRulesConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest.getCachingRulesDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateCaptchasResponse updateCaptchas(UpdateCaptchasRequest request) { LOG.trace("Called updateCaptchas"); @@ -1460,6 +1925,41 @@ public UpdateCertificateResponse updateCertificate(UpdateCertificateRequest requ }); } + @Override + public UpdateCustomProtectionRuleResponse updateCustomProtectionRule( + UpdateCustomProtectionRuleRequest request) { + LOG.trace("Called updateCustomProtectionRule"); + final UpdateCustomProtectionRuleRequest interceptedRequest = + UpdateCustomProtectionRuleConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateCustomProtectionRuleConverter.fromRequest(client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateCustomProtectionRuleResponse> + transformer = UpdateCustomProtectionRuleConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateCustomProtectionRuleDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateDeviceFingerprintChallengeResponse updateDeviceFingerprintChallenge( UpdateDeviceFingerprintChallengeRequest request) { @@ -1754,6 +2254,42 @@ public UpdateWaasPolicyResponse updateWaasPolicy(UpdateWaasPolicyRequest request }); } + @Override + public UpdateWaasPolicyCustomProtectionRulesResponse updateWaasPolicyCustomProtectionRules( + UpdateWaasPolicyCustomProtectionRulesRequest request) { + LOG.trace("Called updateWaasPolicyCustomProtectionRules"); + final UpdateWaasPolicyCustomProtectionRulesRequest interceptedRequest = + UpdateWaasPolicyCustomProtectionRulesConverter.interceptRequest(request); + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = + UpdateWaasPolicyCustomProtectionRulesConverter.fromRequest( + client, interceptedRequest); + com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateWaasPolicyCustomProtectionRulesResponse> + transformer = UpdateWaasPolicyCustomProtectionRulesConverter.fromResponse(); + + final com.oracle.bmc.retrier.BmcGenericRetrier retrier = + com.oracle.bmc.retrier.Retriers.createPreferredRetrier( + interceptedRequest.getRetryConfiguration(), retryConfiguration); + return retrier.execute( + interceptedRequest, + retryRequest -> { + final com.oracle.bmc.retrier.TokenRefreshRetrier tokenRefreshRetrier = + new com.oracle.bmc.retrier.TokenRefreshRetrier( + authenticationDetailsProvider); + return tokenRefreshRetrier.execute( + retryRequest, + retriedRequest -> { + javax.ws.rs.core.Response response = + client.put( + ib, + retriedRequest + .getUpdateCustomProtectionRulesDetails(), + retriedRequest); + return transformer.apply(response); + }); + }); + } + @Override public UpdateWafAddressRateLimitingResponse updateWafAddressRateLimiting( UpdateWafAddressRateLimitingRequest request) { diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasPaginators.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasPaginators.java index 79931373105..687ed78d267 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasPaginators.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasPaginators.java @@ -141,6 +141,230 @@ public java.util.List apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listAddressLists 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 listAddressListsResponseIterator( + final ListAddressListsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListAddressListsRequest.Builder, ListAddressListsRequest, ListAddressListsResponse>( + new com.google.common.base.Supplier() { + @Override + public ListAddressListsRequest.Builder get() { + return ListAddressListsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListAddressListsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAddressListsRequest.Builder>, + ListAddressListsRequest>() { + @Override + public ListAddressListsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAddressListsRequest.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< + ListAddressListsRequest, ListAddressListsResponse>() { + @Override + public ListAddressListsResponse apply(ListAddressListsRequest request) { + return client.listAddressLists(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.waas.model.AddressListSummary} objects + * contained in responses from the listAddressLists 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.waas.model.AddressListSummary} objects + * contained in responses received from the service. + */ + public Iterable listAddressListsRecordIterator( + final ListAddressListsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListAddressListsRequest.Builder, ListAddressListsRequest, ListAddressListsResponse, + com.oracle.bmc.waas.model.AddressListSummary>( + new com.google.common.base.Supplier() { + @Override + public ListAddressListsRequest.Builder get() { + return ListAddressListsRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListAddressListsResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAddressListsRequest.Builder>, + ListAddressListsRequest>() { + @Override + public ListAddressListsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListAddressListsRequest.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< + ListAddressListsRequest, ListAddressListsResponse>() { + @Override + public ListAddressListsResponse apply(ListAddressListsRequest request) { + return client.listAddressLists(request); + } + }, + new com.google.common.base.Function< + ListAddressListsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListAddressListsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the listCachingRules 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 listCachingRulesResponseIterator( + final ListCachingRulesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListCachingRulesRequest.Builder, ListCachingRulesRequest, ListCachingRulesResponse>( + new com.google.common.base.Supplier() { + @Override + public ListCachingRulesRequest.Builder get() { + return ListCachingRulesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListCachingRulesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCachingRulesRequest.Builder>, + ListCachingRulesRequest>() { + @Override + public ListCachingRulesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCachingRulesRequest.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< + ListCachingRulesRequest, ListCachingRulesResponse>() { + @Override + public ListCachingRulesResponse apply(ListCachingRulesRequest request) { + return client.listCachingRules(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.waas.model.CachingRuleSummary} objects + * contained in responses from the listCachingRules 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.waas.model.CachingRuleSummary} objects + * contained in responses received from the service. + */ + public Iterable listCachingRulesRecordIterator( + final ListCachingRulesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListCachingRulesRequest.Builder, ListCachingRulesRequest, ListCachingRulesResponse, + com.oracle.bmc.waas.model.CachingRuleSummary>( + new com.google.common.base.Supplier() { + @Override + public ListCachingRulesRequest.Builder get() { + return ListCachingRulesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListCachingRulesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCachingRulesRequest.Builder>, + ListCachingRulesRequest>() { + @Override + public ListCachingRulesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCachingRulesRequest.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< + ListCachingRulesRequest, ListCachingRulesResponse>() { + @Override + public ListCachingRulesResponse apply(ListCachingRulesRequest request) { + return client.listCachingRules(request); + } + }, + new com.google.common.base.Function< + ListCachingRulesResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListCachingRulesResponse response) { + return response.getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listCaptchas operation. This iterable * will fetch more data from the server as needed. @@ -362,6 +586,123 @@ public java.util.List apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listCustomProtectionRules 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 listCustomProtectionRulesResponseIterator( + final ListCustomProtectionRulesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListCustomProtectionRulesRequest.Builder, ListCustomProtectionRulesRequest, + ListCustomProtectionRulesResponse>( + new com.google.common.base.Supplier() { + @Override + public ListCustomProtectionRulesRequest.Builder get() { + return ListCustomProtectionRulesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListCustomProtectionRulesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCustomProtectionRulesRequest.Builder>, + ListCustomProtectionRulesRequest>() { + @Override + public ListCustomProtectionRulesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCustomProtectionRulesRequest.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< + ListCustomProtectionRulesRequest, ListCustomProtectionRulesResponse>() { + @Override + public ListCustomProtectionRulesResponse apply( + ListCustomProtectionRulesRequest request) { + return client.listCustomProtectionRules(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.waas.model.CustomProtectionRuleSummary} objects + * contained in responses from the listCustomProtectionRules 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.waas.model.CustomProtectionRuleSummary} objects + * contained in responses received from the service. + */ + public Iterable + listCustomProtectionRulesRecordIterator( + final ListCustomProtectionRulesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListCustomProtectionRulesRequest.Builder, ListCustomProtectionRulesRequest, + ListCustomProtectionRulesResponse, + com.oracle.bmc.waas.model.CustomProtectionRuleSummary>( + new com.google.common.base.Supplier() { + @Override + public ListCustomProtectionRulesRequest.Builder get() { + return ListCustomProtectionRulesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function() { + @Override + public String apply(ListCustomProtectionRulesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCustomProtectionRulesRequest.Builder>, + ListCustomProtectionRulesRequest>() { + @Override + public ListCustomProtectionRulesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListCustomProtectionRulesRequest.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< + ListCustomProtectionRulesRequest, ListCustomProtectionRulesResponse>() { + @Override + public ListCustomProtectionRulesResponse apply( + ListCustomProtectionRulesRequest request) { + return client.listCustomProtectionRules(request); + } + }, + new com.google.common.base.Function< + ListCustomProtectionRulesResponse, + java.util.List>() { + @Override + public java.util.List + apply(ListCustomProtectionRulesResponse response) { + return response.getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listEdgeSubnets operation. This iterable * will fetch more data from the server as needed. @@ -1033,6 +1374,135 @@ public java.util.List apply( }); } + /** + * Creates a new iterable which will iterate over the responses received from the listWaasPolicyCustomProtectionRules 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 + listWaasPolicyCustomProtectionRulesResponseIterator( + final ListWaasPolicyCustomProtectionRulesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListWaasPolicyCustomProtectionRulesRequest.Builder, + ListWaasPolicyCustomProtectionRulesRequest, + ListWaasPolicyCustomProtectionRulesResponse>( + new com.google.common.base.Supplier< + ListWaasPolicyCustomProtectionRulesRequest.Builder>() { + @Override + public ListWaasPolicyCustomProtectionRulesRequest.Builder get() { + return ListWaasPolicyCustomProtectionRulesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function< + ListWaasPolicyCustomProtectionRulesResponse, String>() { + @Override + public String apply(ListWaasPolicyCustomProtectionRulesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWaasPolicyCustomProtectionRulesRequest.Builder>, + ListWaasPolicyCustomProtectionRulesRequest>() { + @Override + public ListWaasPolicyCustomProtectionRulesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWaasPolicyCustomProtectionRulesRequest.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< + ListWaasPolicyCustomProtectionRulesRequest, + ListWaasPolicyCustomProtectionRulesResponse>() { + @Override + public ListWaasPolicyCustomProtectionRulesResponse apply( + ListWaasPolicyCustomProtectionRulesRequest request) { + return client.listWaasPolicyCustomProtectionRules(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link com.oracle.bmc.waas.model.WaasPolicyCustomProtectionRuleSummary} objects + * contained in responses from the listWaasPolicyCustomProtectionRules 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.waas.model.WaasPolicyCustomProtectionRuleSummary} objects + * contained in responses received from the service. + */ + public Iterable + listWaasPolicyCustomProtectionRulesRecordIterator( + final ListWaasPolicyCustomProtectionRulesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListWaasPolicyCustomProtectionRulesRequest.Builder, + ListWaasPolicyCustomProtectionRulesRequest, + ListWaasPolicyCustomProtectionRulesResponse, + com.oracle.bmc.waas.model.WaasPolicyCustomProtectionRuleSummary>( + new com.google.common.base.Supplier< + ListWaasPolicyCustomProtectionRulesRequest.Builder>() { + @Override + public ListWaasPolicyCustomProtectionRulesRequest.Builder get() { + return ListWaasPolicyCustomProtectionRulesRequest.builder().copy(request); + } + }, + new com.google.common.base.Function< + ListWaasPolicyCustomProtectionRulesResponse, String>() { + @Override + public String apply(ListWaasPolicyCustomProtectionRulesResponse response) { + return response.getOpcNextPage(); + } + }, + new com.google.common.base.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWaasPolicyCustomProtectionRulesRequest.Builder>, + ListWaasPolicyCustomProtectionRulesRequest>() { + @Override + public ListWaasPolicyCustomProtectionRulesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListWaasPolicyCustomProtectionRulesRequest.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< + ListWaasPolicyCustomProtectionRulesRequest, + ListWaasPolicyCustomProtectionRulesResponse>() { + @Override + public ListWaasPolicyCustomProtectionRulesResponse apply( + ListWaasPolicyCustomProtectionRulesRequest request) { + return client.listWaasPolicyCustomProtectionRules(request); + } + }, + new com.google.common.base.Function< + ListWaasPolicyCustomProtectionRulesResponse, + java.util.List< + com.oracle.bmc.waas.model + .WaasPolicyCustomProtectionRuleSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.waas.model.WaasPolicyCustomProtectionRuleSummary> + apply(ListWaasPolicyCustomProtectionRulesResponse response) { + return response.getItems(); + } + }); + } + /** * Creates a new iterable which will iterate over the responses received from the listWafBlockedRequests operation. This iterable * will fetch more data from the server as needed. diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasWaiters.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasWaiters.java index 44c4e289608..8ac6e25d5d4 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasWaiters.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/WaasWaiters.java @@ -18,6 +18,107 @@ public class WaasWaiters { private final java.util.concurrent.ExecutorService executorService; private final Waas client; + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetState 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 com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAddressList( + GetAddressListRequest request, + com.oracle.bmc.waas.model.LifecycleStates... 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 forAddressList( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forAddressList( + GetAddressListRequest request, + com.oracle.bmc.waas.model.LifecycleStates 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 forAddressList( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.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 + forAddressList( + GetAddressListRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.waas.model.LifecycleStates... 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 forAddressList( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for AddressList. + private com.oracle.bmc.waiter.Waiter + forAddressList( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetAddressListRequest request, + final com.oracle.bmc.waas.model.LifecycleStates... 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< + GetAddressListRequest, GetAddressListResponse>() { + @Override + public GetAddressListResponse apply(GetAddressListRequest request) { + return client.getAddressList(request); + } + }, + new com.google.common.base.Predicate() { + @Override + public boolean apply(GetAddressListResponse response) { + return targetStatesSet.contains( + response.getAddressList().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.waas.model.LifecycleStates.Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * @@ -119,6 +220,112 @@ public boolean apply(GetCertificateResponse response) { request); } + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetState 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 com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetCustomProtectionRuleRequest, GetCustomProtectionRuleResponse> + forCustomProtectionRule( + GetCustomProtectionRuleRequest request, + com.oracle.bmc.waas.model.LifecycleStates... 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 forCustomProtectionRule( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetCustomProtectionRuleRequest, GetCustomProtectionRuleResponse> + forCustomProtectionRule( + GetCustomProtectionRuleRequest request, + com.oracle.bmc.waas.model.LifecycleStates 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 forCustomProtectionRule( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.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< + GetCustomProtectionRuleRequest, GetCustomProtectionRuleResponse> + forCustomProtectionRule( + GetCustomProtectionRuleRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.waas.model.LifecycleStates... 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 forCustomProtectionRule( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for CustomProtectionRule. + private com.oracle.bmc.waiter.Waiter< + GetCustomProtectionRuleRequest, GetCustomProtectionRuleResponse> + forCustomProtectionRule( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetCustomProtectionRuleRequest request, + final com.oracle.bmc.waas.model.LifecycleStates... 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< + GetCustomProtectionRuleRequest, GetCustomProtectionRuleResponse>() { + @Override + public GetCustomProtectionRuleResponse apply( + GetCustomProtectionRuleRequest request) { + return client.getCustomProtectionRule(request); + } + }, + new com.google.common.base.Predicate() { + @Override + public boolean apply(GetCustomProtectionRuleResponse response) { + return targetStatesSet.contains( + response.getCustomProtectionRule().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.waas.model.LifecycleStates.Deleted)), + request); + } + /** * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. * diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ChangeAddressListCompartmentConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ChangeAddressListCompartmentConverter.java new file mode 100644 index 00000000000..262a40fbc65 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ChangeAddressListCompartmentConverter.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class ChangeAddressListCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ChangeAddressListCompartmentRequest interceptRequest( + ChangeAddressListCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ChangeAddressListCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAddressListId(), "addressListId must not be blank"); + Validate.notNull( + request.getChangeAddressListCompartmentDetails(), + "changeAddressListCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("addressLists") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAddressListId())) + .path("actions") + .path("changeCompartment"); + + 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()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, ChangeAddressListCompartmentResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeAddressListCompartmentResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeAddressListCompartmentResponse>() { + @Override + public ChangeAddressListCompartmentResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ChangeAddressListCompartmentResponse"); + 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(); + + ChangeAddressListCompartmentResponse.Builder builder = + ChangeAddressListCompartmentResponse.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)); + } + + ChangeAddressListCompartmentResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ChangeCustomProtectionRuleCompartmentConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ChangeCustomProtectionRuleCompartmentConverter.java new file mode 100644 index 00000000000..fc6526f232f --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ChangeCustomProtectionRuleCompartmentConverter.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class ChangeCustomProtectionRuleCompartmentConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ChangeCustomProtectionRuleCompartmentRequest interceptRequest( + ChangeCustomProtectionRuleCompartmentRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ChangeCustomProtectionRuleCompartmentRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getCustomProtectionRuleId(), "customProtectionRuleId must not be blank"); + Validate.notNull( + request.getChangeCustomProtectionRuleCompartmentDetails(), + "changeCustomProtectionRuleCompartmentDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("customProtectionRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCustomProtectionRuleId())) + .path("actions") + .path("changeCompartment"); + + 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()); + } + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, ChangeCustomProtectionRuleCompartmentResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ChangeCustomProtectionRuleCompartmentResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + ChangeCustomProtectionRuleCompartmentResponse>() { + @Override + public ChangeCustomProtectionRuleCompartmentResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ChangeCustomProtectionRuleCompartmentResponse"); + 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(); + + ChangeCustomProtectionRuleCompartmentResponse.Builder builder = + ChangeCustomProtectionRuleCompartmentResponse.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)); + } + + ChangeCustomProtectionRuleCompartmentResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/CreateAddressListConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/CreateAddressListConverter.java new file mode 100644 index 00000000000..c71ba94cf79 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/CreateAddressListConverter.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class CreateAddressListConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateAddressListRequest interceptRequest(CreateAddressListRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, CreateAddressListRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateAddressListDetails(), "createAddressListDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20181116").path("addressLists"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, CreateAddressListResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, CreateAddressListResponse>() { + @Override + public CreateAddressListResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CreateAddressListResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AddressList>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AddressList.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateAddressListResponse.Builder builder = + CreateAddressListResponse.builder(); + + builder.addressList(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> 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)); + } + + CreateAddressListResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/CreateCustomProtectionRuleConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/CreateCustomProtectionRuleConverter.java new file mode 100644 index 00000000000..ad7dd4eb466 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/CreateCustomProtectionRuleConverter.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class CreateCustomProtectionRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static CreateCustomProtectionRuleRequest interceptRequest( + CreateCustomProtectionRuleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + CreateCustomProtectionRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notNull( + request.getCreateCustomProtectionRuleDetails(), + "createCustomProtectionRuleDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget().path("/20181116").path("customProtectionRules"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, CreateCustomProtectionRuleResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, CreateCustomProtectionRuleResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, CreateCustomProtectionRuleResponse>() { + @Override + public CreateCustomProtectionRuleResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for CreateCustomProtectionRuleResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + CustomProtectionRule>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + CustomProtectionRule.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + CreateCustomProtectionRuleResponse.Builder builder = + CreateCustomProtectionRuleResponse.builder(); + + builder.customProtectionRule(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> 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)); + } + + CreateCustomProtectionRuleResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/DeleteAddressListConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/DeleteAddressListConverter.java new file mode 100644 index 00000000000..38fcdb90f36 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/DeleteAddressListConverter.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class DeleteAddressListConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static DeleteAddressListRequest interceptRequest(DeleteAddressListRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, DeleteAddressListRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAddressListId(), "addressListId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("addressLists") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAddressListId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAddressListResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteAddressListResponse>() { + @Override + public DeleteAddressListResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for DeleteAddressListResponse"); + 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(); + + DeleteAddressListResponse.Builder builder = + DeleteAddressListResponse.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)); + } + + DeleteAddressListResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/DeleteCustomProtectionRuleConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/DeleteCustomProtectionRuleConverter.java new file mode 100644 index 00000000000..8d26ad7838d --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/DeleteCustomProtectionRuleConverter.java @@ -0,0 +1,106 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class DeleteCustomProtectionRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static DeleteCustomProtectionRuleRequest interceptRequest( + DeleteCustomProtectionRuleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + DeleteCustomProtectionRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getCustomProtectionRuleId(), "customProtectionRuleId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("customProtectionRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCustomProtectionRuleId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteCustomProtectionRuleResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteCustomProtectionRuleResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, DeleteCustomProtectionRuleResponse>() { + @Override + public DeleteCustomProtectionRuleResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for DeleteCustomProtectionRuleResponse"); + 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(); + + DeleteCustomProtectionRuleResponse.Builder builder = + DeleteCustomProtectionRuleResponse.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)); + } + + DeleteCustomProtectionRuleResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/GetAddressListConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/GetAddressListConverter.java new file mode 100644 index 00000000000..81a59460859 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/GetAddressListConverter.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class GetAddressListConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetAddressListRequest interceptRequest(GetAddressListRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, GetAddressListRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAddressListId(), "addressListId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("addressLists") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAddressListId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + 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, GetAddressListResponse>() { + @Override + public GetAddressListResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for GetAddressListResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AddressList>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AddressList.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetAddressListResponse.Builder builder = + GetAddressListResponse.builder(); + + builder.addressList(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)); + } + + GetAddressListResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/GetCustomProtectionRuleConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/GetCustomProtectionRuleConverter.java new file mode 100644 index 00000000000..1ffd42269f1 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/GetCustomProtectionRuleConverter.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class GetCustomProtectionRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static GetCustomProtectionRuleRequest interceptRequest( + GetCustomProtectionRuleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + GetCustomProtectionRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getCustomProtectionRuleId(), "customProtectionRuleId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("customProtectionRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCustomProtectionRuleId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, GetCustomProtectionRuleResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, GetCustomProtectionRuleResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, GetCustomProtectionRuleResponse>() { + @Override + public GetCustomProtectionRuleResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for GetCustomProtectionRuleResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + CustomProtectionRule>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + CustomProtectionRule.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + GetCustomProtectionRuleResponse.Builder builder = + GetCustomProtectionRuleResponse.builder(); + + builder.customProtectionRule(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)); + } + + GetCustomProtectionRuleResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListAddressListsConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListAddressListsConverter.java new file mode 100644 index 00000000000..16d36cc50ae --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListAddressListsConverter.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class ListAddressListsConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListAddressListsRequest interceptRequest(ListAddressListsRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListAddressListsRequest 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("/20181116").path("addressLists"); + + 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())); + } + + target = + target.queryParam( + "compartmentId", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getCompartmentId())); + + if (request.getId() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "id", + request.getId(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getName() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "name", + request.getName(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getLifecycleState() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "lifecycleState", + request.getLifecycleState(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getTimeCreatedGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "timeCreatedGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeCreatedGreaterThanOrEqualTo())); + } + + if (request.getTimeCreatedLessThan() != null) { + target = + target.queryParam( + "timeCreatedLessThan", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeCreatedLessThan())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListAddressListsResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListAddressListsResponse>() { + @Override + public ListAddressListsResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListAddressListsResponse"); + 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< + AddressListSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListAddressListsResponse.Builder builder = + ListAddressListsResponse.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)); + } + + ListAddressListsResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListCachingRulesConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListCachingRulesConverter.java new file mode 100644 index 00000000000..f8beccd0f37 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListCachingRulesConverter.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class ListCachingRulesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListCachingRulesRequest interceptRequest(ListCachingRulesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, ListCachingRulesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWaasPolicyId(), "waasPolicyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("waasPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWaasPolicyId())) + .path("wafConfig") + .path("cachingRules"); + + 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())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListCachingRulesResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListCachingRulesResponse>() { + @Override + public ListCachingRulesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListCachingRulesResponse"); + 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< + CachingRuleSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListCachingRulesResponse.Builder builder = + ListCachingRulesResponse.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)); + } + + ListCachingRulesResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListCustomProtectionRulesConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListCustomProtectionRulesConverter.java new file mode 100644 index 00000000000..95db0c792e1 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListCustomProtectionRulesConverter.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class ListCustomProtectionRulesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListCustomProtectionRulesRequest interceptRequest( + ListCustomProtectionRulesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ListCustomProtectionRulesRequest 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("/20181116").path("customProtectionRules"); + + 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.getId() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "id", + request.getId(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getDisplayName() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "displayName", + request.getDisplayName(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getLifecycleState() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "lifecycleState", + request.getLifecycleState(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getTimeCreatedGreaterThanOrEqualTo() != null) { + target = + target.queryParam( + "timeCreatedGreaterThanOrEqualTo", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeCreatedGreaterThanOrEqualTo())); + } + + if (request.getTimeCreatedLessThan() != null) { + target = + target.queryParam( + "timeCreatedLessThan", + com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( + request.getTimeCreatedLessThan())); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListCustomProtectionRulesResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListCustomProtectionRulesResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, ListCustomProtectionRulesResponse>() { + @Override + public ListCustomProtectionRulesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListCustomProtectionRulesResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + CustomProtectionRuleSummary>>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + CustomProtectionRuleSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListCustomProtectionRulesResponse.Builder builder = + ListCustomProtectionRulesResponse.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)); + } + + ListCustomProtectionRulesResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListWaasPolicyCustomProtectionRulesConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListWaasPolicyCustomProtectionRulesConverter.java new file mode 100644 index 00000000000..4e3c4295cfa --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/ListWaasPolicyCustomProtectionRulesConverter.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class ListWaasPolicyCustomProtectionRulesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static ListWaasPolicyCustomProtectionRulesRequest interceptRequest( + ListWaasPolicyCustomProtectionRulesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + ListWaasPolicyCustomProtectionRulesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWaasPolicyId(), "waasPolicyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("waasPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWaasPolicyId())) + .path("wafConfig") + .path("customProtectionRules"); + + 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.getModSecurityRuleId() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "modSecurityRuleId", + request.getModSecurityRuleId(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + if (request.getAction() != null) { + target = + com.oracle.bmc.util.internal.HttpUtils.encodeCollectionFormatQueryParam( + target, + "action", + request.getAction(), + com.oracle.bmc.util.internal.CollectionFormatType.Multi); + } + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, ListWaasPolicyCustomProtectionRulesResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, ListWaasPolicyCustomProtectionRulesResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + ListWaasPolicyCustomProtectionRulesResponse>() { + @Override + public ListWaasPolicyCustomProtectionRulesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for ListWaasPolicyCustomProtectionRulesResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + WaasPolicyCustomProtectionRuleSummary>>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + new javax.ws.rs.core.GenericType< + java.util.List< + WaasPolicyCustomProtectionRuleSummary>>() {}); + + com.oracle.bmc.http.internal.WithHeaders< + java.util.List< + WaasPolicyCustomProtectionRuleSummary>> + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + ListWaasPolicyCustomProtectionRulesResponse.Builder builder = + ListWaasPolicyCustomProtectionRulesResponse.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)); + } + + ListWaasPolicyCustomProtectionRulesResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/PurgeCacheConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/PurgeCacheConverter.java new file mode 100644 index 00000000000..d00ac24bd93 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/PurgeCacheConverter.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class PurgeCacheConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static PurgeCacheRequest interceptRequest(PurgeCacheRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, PurgeCacheRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWaasPolicyId(), "waasPolicyId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("waasPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWaasPolicyId())) + .path("actions") + .path("purgeCache"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + 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, PurgeCacheResponse>() { + @Override + public PurgeCacheResponse apply(javax.ws.rs.core.Response rawResponse) { + LOG.trace("Transform function invoked for PurgeCacheResponse"); + 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(); + + PurgeCacheResponse.Builder builder = PurgeCacheResponse.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> + 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)); + } + + PurgeCacheResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateAddressListConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateAddressListConverter.java new file mode 100644 index 00000000000..4537092e080 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateAddressListConverter.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class UpdateAddressListConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateAddressListRequest interceptRequest(UpdateAddressListRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, UpdateAddressListRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getAddressListId(), "addressListId must not be blank"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("addressLists") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getAddressListId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateAddressListResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateAddressListResponse>() { + @Override + public UpdateAddressListResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for UpdateAddressListResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + AddressList>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + AddressList.class); + + com.oracle.bmc.http.internal.WithHeaders response = + responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + UpdateAddressListResponse.Builder builder = + UpdateAddressListResponse.builder(); + + builder.addressList(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> 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)); + } + + UpdateAddressListResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateCachingRulesConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateCachingRulesConverter.java new file mode 100644 index 00000000000..97cdf75d044 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateCachingRulesConverter.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class UpdateCachingRulesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateCachingRulesRequest interceptRequest(UpdateCachingRulesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, UpdateCachingRulesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWaasPolicyId(), "waasPolicyId must not be blank"); + Validate.notNull(request.getCachingRulesDetails(), "cachingRulesDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("waasPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWaasPolicyId())) + .path("wafConfig") + .path("cachingRules"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateCachingRulesResponse> + fromResponse() { + final com.google.common.base.Function + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateCachingRulesResponse>() { + @Override + public UpdateCachingRulesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for UpdateCachingRulesResponse"); + 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(); + + UpdateCachingRulesResponse.Builder builder = + UpdateCachingRulesResponse.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> + 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)); + } + + UpdateCachingRulesResponse responseWrapper = builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateCustomProtectionRuleConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateCustomProtectionRuleConverter.java new file mode 100644 index 00000000000..fbd911449ab --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateCustomProtectionRuleConverter.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class UpdateCustomProtectionRuleConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateCustomProtectionRuleRequest interceptRequest( + UpdateCustomProtectionRuleRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + UpdateCustomProtectionRuleRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank( + request.getCustomProtectionRuleId(), "customProtectionRuleId must not be blank"); + Validate.notNull( + request.getUpdateCustomProtectionRuleDetails(), + "updateCustomProtectionRuleDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("customProtectionRules") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getCustomProtectionRuleId())); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateCustomProtectionRuleResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateCustomProtectionRuleResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateCustomProtectionRuleResponse>() { + @Override + public UpdateCustomProtectionRuleResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for UpdateCustomProtectionRuleResponse"); + com.google.common.base.Function< + javax.ws.rs.core.Response, + com.oracle.bmc.http.internal.WithHeaders< + CustomProtectionRule>> + responseFn = + RESPONSE_CONVERSION_FACTORY.create( + CustomProtectionRule.class); + + com.oracle.bmc.http.internal.WithHeaders + response = responseFn.apply(rawResponse); + javax.ws.rs.core.MultivaluedMap headers = + response.getHeaders(); + + UpdateCustomProtectionRuleResponse.Builder builder = + UpdateCustomProtectionRuleResponse.builder(); + + builder.customProtectionRule(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> 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)); + } + + UpdateCustomProtectionRuleResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateWaasPolicyCustomProtectionRulesConverter.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateWaasPolicyCustomProtectionRulesConverter.java new file mode 100644 index 00000000000..92c03e02838 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/internal/http/UpdateWaasPolicyCustomProtectionRulesConverter.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.internal.http; + +import com.oracle.bmc.http.internal.ResponseHelper; +import com.oracle.bmc.waas.model.*; +import com.oracle.bmc.waas.requests.*; +import com.oracle.bmc.waas.responses.*; +import org.apache.commons.lang3.Validate; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.extern.slf4j.Slf4j +public class UpdateWaasPolicyCustomProtectionRulesConverter { + private static final com.oracle.bmc.http.internal.ResponseConversionFunctionFactory + RESPONSE_CONVERSION_FACTORY = + new com.oracle.bmc.http.internal.ResponseConversionFunctionFactory(); + + public static UpdateWaasPolicyCustomProtectionRulesRequest interceptRequest( + UpdateWaasPolicyCustomProtectionRulesRequest request) { + + return request; + } + + public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( + com.oracle.bmc.http.internal.RestClient client, + UpdateWaasPolicyCustomProtectionRulesRequest request) { + Validate.notNull(request, "request instance is required"); + Validate.notBlank(request.getWaasPolicyId(), "waasPolicyId must not be blank"); + Validate.notNull( + request.getUpdateCustomProtectionRulesDetails(), + "updateCustomProtectionRulesDetails is required"); + + com.oracle.bmc.http.internal.WrappedWebTarget target = + client.getBaseTarget() + .path("/20181116") + .path("waasPolicies") + .path( + com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( + request.getWaasPolicyId())) + .path("wafConfig") + .path("customProtectionRules"); + + com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); + + ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); + + if (request.getOpcRequestId() != null) { + ib.header("opc-request-id", request.getOpcRequestId()); + } + + if (request.getOpcRetryToken() != null) { + ib.header("opc-retry-token", request.getOpcRetryToken()); + } + + if (request.getIfMatch() != null) { + ib.header("if-match", request.getIfMatch()); + } + + return ib; + } + + public static com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateWaasPolicyCustomProtectionRulesResponse> + fromResponse() { + final com.google.common.base.Function< + javax.ws.rs.core.Response, UpdateWaasPolicyCustomProtectionRulesResponse> + transformer = + new com.google.common.base.Function< + javax.ws.rs.core.Response, + UpdateWaasPolicyCustomProtectionRulesResponse>() { + @Override + public UpdateWaasPolicyCustomProtectionRulesResponse apply( + javax.ws.rs.core.Response rawResponse) { + LOG.trace( + "Transform function invoked for UpdateWaasPolicyCustomProtectionRulesResponse"); + 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(); + + UpdateWaasPolicyCustomProtectionRulesResponse.Builder builder = + UpdateWaasPolicyCustomProtectionRulesResponse.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> + 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)); + } + + UpdateWaasPolicyCustomProtectionRulesResponse responseWrapper = + builder.build(); + + ResponseHelper.closeResponseSilentlyIfNotBuffered(rawResponse); + return responseWrapper; + } + }; + return transformer; + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AccessRule.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AccessRule.java index d3d45e9ef57..c35c7e0f68a 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AccessRule.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AccessRule.java @@ -94,6 +94,33 @@ public Builder blockErrorPageDescription(String blockErrorPageDescription) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("bypassChallenges") + private java.util.List bypassChallenges; + + public Builder bypassChallenges(java.util.List bypassChallenges) { + this.bypassChallenges = bypassChallenges; + this.__explicitlySet__.add("bypassChallenges"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("redirectUrl") + private String redirectUrl; + + public Builder redirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + this.__explicitlySet__.add("redirectUrl"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("redirectResponseCode") + private RedirectResponseCode redirectResponseCode; + + public Builder redirectResponseCode(RedirectResponseCode redirectResponseCode) { + this.redirectResponseCode = redirectResponseCode; + this.__explicitlySet__.add("redirectResponseCode"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -107,7 +134,10 @@ public AccessRule build() { blockResponseCode, blockErrorPageMessage, blockErrorPageCode, - blockErrorPageDescription); + blockErrorPageDescription, + bypassChallenges, + redirectUrl, + redirectResponseCode); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -122,7 +152,10 @@ public Builder copy(AccessRule o) { .blockResponseCode(o.getBlockResponseCode()) .blockErrorPageMessage(o.getBlockErrorPageMessage()) .blockErrorPageCode(o.getBlockErrorPageCode()) - .blockErrorPageDescription(o.getBlockErrorPageDescription()); + .blockErrorPageDescription(o.getBlockErrorPageDescription()) + .bypassChallenges(o.getBypassChallenges()) + .redirectUrl(o.getRedirectUrl()) + .redirectResponseCode(o.getRedirectResponseCode()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -155,12 +188,20 @@ public static Builder builder() { * - **DETECT:** Takes no action, but creates an alert for the request. *

* - **BLOCK:** Blocks the request by returning specified response code or showing error page. + *

+ * - **BYPASS:** Bypasses some or all challenges. + *

+ * - **REDIRECT:** Redirects the request to the specified URL. + *

+ * Regardless of action, no further rules are processed once the rule is matched. **/ @lombok.extern.slf4j.Slf4j public enum Action { Allow("ALLOW"), Detect("DETECT"), Block("BLOCK"), + Bypass("BYPASS"), + Redirect("REDIRECT"), /** * This value is used if a service returns a value for this enum that is not recognized by this @@ -208,6 +249,12 @@ public static Action create(String key) { * - **DETECT:** Takes no action, but creates an alert for the request. *

* - **BLOCK:** Blocks the request by returning specified response code or showing error page. + *

+ * - **BYPASS:** Bypasses some or all challenges. + *

+ * - **REDIRECT:** Redirects the request to the specified URL. + *

+ * Regardless of action, no further rules are processed once the rule is matched. **/ @com.fasterxml.jackson.annotation.JsonProperty("action") Action action; @@ -286,6 +333,131 @@ public static BlockAction create(String key) { **/ @com.fasterxml.jackson.annotation.JsonProperty("blockErrorPageDescription") String blockErrorPageDescription; + /** + **/ + @lombok.extern.slf4j.Slf4j + public enum BypassChallenges { + JsChallenge("JS_CHALLENGE"), + DeviceFingerprintChallenge("DEVICE_FINGERPRINT_CHALLENGE"), + HumanInteractionChallenge("HUMAN_INTERACTION_CHALLENGE"), + Captcha("CAPTCHA"), + + /** + * 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 (BypassChallenges v : BypassChallenges.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + BypassChallenges(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static BypassChallenges create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'BypassChallenges', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The list of challenges to bypass when `action` is set to `BYPASS`. If unspecified or empty, all challenges are bypassed. + *

+ * - **JS_CHALLENGE:** Bypasses JavaScript Challenge. + *

+ * - **DEVICE_FINGERPRINT_CHALLENGE:** Bypasses Device Fingerprint Challenge. + *

+ * - **HUMAN_INTERACTION_CHALLENGE:** Bypasses Human Interaction Challenge. + *

+ * - **CAPTCHA:** Bypasses CAPTCHA Challenge. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("bypassChallenges") + java.util.List bypassChallenges; + + /** + * The target to which the request should be redirected, represented as a URI reference. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("redirectUrl") + String redirectUrl; + /** + * The response status code to return when `action` is set to `REDIRECT`. + *

+ * - **MOVED_PERMANENTLY:** Used for designating the permanent movement of a page (numerical code - 301). + *

+ * - **FOUND:** Used for designating the temporary movement of a page (numerical code - 302). + **/ + @lombok.extern.slf4j.Slf4j + public enum RedirectResponseCode { + MovedPermanently("MOVED_PERMANENTLY"), + Found("FOUND"), + + /** + * 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 (RedirectResponseCode v : RedirectResponseCode.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + RedirectResponseCode(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static RedirectResponseCode create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'RedirectResponseCode', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The response status code to return when `action` is set to `REDIRECT`. + *

+ * - **MOVED_PERMANENTLY:** Used for designating the permanent movement of a page (numerical code - 301). + *

+ * - **FOUND:** Used for designating the temporary movement of a page (numerical code - 302). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("redirectResponseCode") + RedirectResponseCode redirectResponseCode; @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AccessRuleCriteria.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AccessRuleCriteria.java index 131265478ee..84d7eddd864 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AccessRuleCriteria.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AccessRuleCriteria.java @@ -88,7 +88,13 @@ public static Builder builder() { * - **HTTP_HEADER_CONTAINS:** The HTTP_HEADER_CONTAINS criteria is defined using a compound value separated by a colon: a header field name and a header field value. `host:test.example.com` is an example of a criteria value where `host` is the header field name and `test.example.com` is the header field value. A request matches when the header field name is a case insensitive match and the header field value is a case insensitive, substring match. * *Example:* With a criteria value of `host:test.example.com`, where `host` is the name of the field and `test.example.com` is the value of the host field, a request with the header values, `Host: www.test.example.com` will match, where as a request with header values of `host: www.example.com` or `host: test.sub.example.com` will not match. *

- * + * - **IP_IN_LIST:** Matches if the request originates from one of IP addresses contained in the referenced address list. The `value` in this case is OCID of the address list. + *

+ * - **IP_NOT_IN_LIST:** Matches if the request does not originate from any IP address contained in the referenced address list. The `value` field in this case is OCID of the address list. + *

+ * - **HTTP_METHOD_IS:** Matches if the request method corresponds to the `value` field. The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH` + *

+ * - **HTTP_METHOD_IS_NOT:** Matches if the request method does not correspond to the `value` field. The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH` *

* - **COUNTRY_IS:** Matches if the request originates from a country in the `value` field. Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see [ISO's website](https://www.iso.org/obp/ui/#search/code/). *

@@ -109,6 +115,10 @@ public enum Condition { IpIs("IP_IS"), IpIsNot("IP_IS_NOT"), HttpHeaderContains("HTTP_HEADER_CONTAINS"), + IpInList("IP_IN_LIST"), + IpNotInList("IP_NOT_IN_LIST"), + HttpMethodIs("HTTP_METHOD_IS"), + HttpMethodIsNot("HTTP_METHOD_IS_NOT"), CountryIs("COUNTRY_IS"), CountryIsNot("COUNTRY_IS_NOT"), UserAgentIs("USER_AGENT_IS"), @@ -173,7 +183,13 @@ public static Condition create(String key) { * - **HTTP_HEADER_CONTAINS:** The HTTP_HEADER_CONTAINS criteria is defined using a compound value separated by a colon: a header field name and a header field value. `host:test.example.com` is an example of a criteria value where `host` is the header field name and `test.example.com` is the header field value. A request matches when the header field name is a case insensitive match and the header field value is a case insensitive, substring match. * *Example:* With a criteria value of `host:test.example.com`, where `host` is the name of the field and `test.example.com` is the value of the host field, a request with the header values, `Host: www.test.example.com` will match, where as a request with header values of `host: www.example.com` or `host: test.sub.example.com` will not match. *

- * + * - **IP_IN_LIST:** Matches if the request originates from one of IP addresses contained in the referenced address list. The `value` in this case is OCID of the address list. + *

+ * - **IP_NOT_IN_LIST:** Matches if the request does not originate from any IP address contained in the referenced address list. The `value` field in this case is OCID of the address list. + *

+ * - **HTTP_METHOD_IS:** Matches if the request method corresponds to the `value` field. The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH` + *

+ * - **HTTP_METHOD_IS_NOT:** Matches if the request method does not correspond to the `value` field. The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH` *

* - **COUNTRY_IS:** Matches if the request originates from a country in the `value` field. Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see [ISO's website](https://www.iso.org/obp/ui/#search/code/). *

diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AddressList.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AddressList.java new file mode 100644 index 00000000000..cb758160ced --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AddressList.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * The details of the address list. + *
+ * 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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AddressList.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AddressList { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("addressCount") + private java.math.BigDecimal addressCount; + + public Builder addressCount(java.math.BigDecimal addressCount) { + this.addressCount = addressCount; + this.__explicitlySet__.add("addressCount"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("addresses") + private java.util.List addresses; + + public Builder addresses(java.util.List addresses) { + this.addresses = addresses; + this.__explicitlySet__.add("addresses"); + 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("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("lifecycleState") + private LifecycleStates lifecycleState; + + public Builder lifecycleState(LifecycleStates lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + 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 AddressList build() { + AddressList __instance__ = + new AddressList( + id, + compartmentId, + displayName, + addressCount, + addresses, + freeformTags, + definedTags, + lifecycleState, + timeCreated); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AddressList o) { + Builder copiedBuilder = + id(o.getId()) + .compartmentId(o.getCompartmentId()) + .displayName(o.getDisplayName()) + .addressCount(o.getAddressCount()) + .addresses(o.getAddresses()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()) + .lifecycleState(o.getLifecycleState()) + .timeCreated(o.getTimeCreated()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the address list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the address list's compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The user-friendly name of the address list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The total number of unique IP addresses in the address list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("addressCount") + java.math.BigDecimal addressCount; + + /** + * The list of IP addresses or CIDR notations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("addresses") + java.util.List addresses; + + /** + * 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.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * The current lifecycle state of the address list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleStates lifecycleState; + + /** + * The date and time the address list was created, expressed in RFC 3339 timestamp format. + **/ + @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-waas/src/main/java/com/oracle/bmc/waas/model/AddressListSummary.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AddressListSummary.java new file mode 100644 index 00000000000..2d462927af3 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/AddressListSummary.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * A summary of the address list's information. + *
+ * 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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = AddressListSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class AddressListSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("addressCount") + private java.math.BigDecimal addressCount; + + public Builder addressCount(java.math.BigDecimal addressCount) { + this.addressCount = addressCount; + this.__explicitlySet__.add("addressCount"); + 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("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("lifecycleState") + private LifecycleStates lifecycleState; + + public Builder lifecycleState(LifecycleStates lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + 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 AddressListSummary build() { + AddressListSummary __instance__ = + new AddressListSummary( + id, + compartmentId, + displayName, + addressCount, + freeformTags, + definedTags, + lifecycleState, + timeCreated); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(AddressListSummary o) { + Builder copiedBuilder = + id(o.getId()) + .compartmentId(o.getCompartmentId()) + .displayName(o.getDisplayName()) + .addressCount(o.getAddressCount()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()) + .lifecycleState(o.getLifecycleState()) + .timeCreated(o.getTimeCreated()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the address list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the address list's compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The user-friendly name of the address list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The total number of unique IP addresses in the address list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("addressCount") + java.math.BigDecimal addressCount; + + /** + * 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.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + /** + * The current lifecycle state of the address list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleStates lifecycleState; + + /** + * The date and time the address list was created, in the format defined by RFC3339. + **/ + @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-waas/src/main/java/com/oracle/bmc/waas/model/CachingRule.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CachingRule.java new file mode 100644 index 00000000000..f6a3b3714dc --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CachingRule.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = CachingRule.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CachingRule { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("key") + private String key; + + public Builder key(String key) { + this.key = key; + this.__explicitlySet__.add("key"); + return this; + } + + @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 Action action; + + public Builder action(Action action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cachingDuration") + private String cachingDuration; + + public Builder cachingDuration(String cachingDuration) { + this.cachingDuration = cachingDuration; + this.__explicitlySet__.add("cachingDuration"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isClientCachingEnabled") + private Boolean isClientCachingEnabled; + + public Builder isClientCachingEnabled(Boolean isClientCachingEnabled) { + this.isClientCachingEnabled = isClientCachingEnabled; + this.__explicitlySet__.add("isClientCachingEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("clientCachingDuration") + private String clientCachingDuration; + + public Builder clientCachingDuration(String clientCachingDuration) { + this.clientCachingDuration = clientCachingDuration; + this.__explicitlySet__.add("clientCachingDuration"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("criteria") + private java.util.List criteria; + + public Builder criteria(java.util.List criteria) { + this.criteria = criteria; + this.__explicitlySet__.add("criteria"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CachingRule build() { + CachingRule __instance__ = + new CachingRule( + key, + name, + action, + cachingDuration, + isClientCachingEnabled, + clientCachingDuration, + criteria); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CachingRule o) { + Builder copiedBuilder = + key(o.getKey()) + .name(o.getName()) + .action(o.getAction()) + .cachingDuration(o.getCachingDuration()) + .isClientCachingEnabled(o.getIsClientCachingEnabled()) + .clientCachingDuration(o.getClientCachingDuration()) + .criteria(o.getCriteria()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The unique key for the caching rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("key") + String key; + + /** + * The name of the caching rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + /** + * The action to take on matched caching rules. + * - **CACHE:** Allow to set caching rule, which would be cached. + *

+ * - **BYPASS_CACHE:** Allow to set caching rule, which would never be cached. e.g. all requests would be passed directly to origin for those file types. + **/ + @lombok.extern.slf4j.Slf4j + public enum Action { + Cache("CACHE"), + BypassCache("BYPASS_CACHE"), + + /** + * 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 (Action v : Action.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Action(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Action create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Action', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The action to take on matched caching rules. + * - **CACHE:** Allow to set caching rule, which would be cached. + *

+ * - **BYPASS_CACHE:** Allow to set caching rule, which would never be cached. e.g. all requests would be passed directly to origin for those file types. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + Action action; + + /** + * The caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cachingDuration") + String cachingDuration; + + /** + * Enables or disables the client caching. + * Browsers use the Cache-Control header value for caching content locally, in the browser. + * This setting will control the addition of a Cache-Control header to responses. It overrides existing Cache-Control headers. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isClientCachingEnabled") + Boolean isClientCachingEnabled; + + /** + * The client caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format, in case client caching enabled. It sets Cache-Control header max-age time, i.e. the local browser cache expire time. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientCachingDuration") + String clientCachingDuration; + + /** + * The array of the rule criteria with condition and value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("criteria") + java.util.List criteria; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CachingRuleCriteria.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CachingRuleCriteria.java new file mode 100644 index 00000000000..c5bfff52ca2 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CachingRuleCriteria.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * A caching rule criteria condition and value. + *
+ * 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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CachingRuleCriteria.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CachingRuleCriteria { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("condition") + private Condition condition; + + public Builder condition(Condition condition) { + this.condition = condition; + this.__explicitlySet__.add("condition"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("value") + private String value; + + public Builder value(String value) { + this.value = value; + this.__explicitlySet__.add("value"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CachingRuleCriteria build() { + CachingRuleCriteria __instance__ = new CachingRuleCriteria(condition, value); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CachingRuleCriteria o) { + Builder copiedBuilder = condition(o.getCondition()).value(o.getValue()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The condition of the caching rule criteria. + * - **URL_IS:** Matches if the concatenation of request URL path and query is identical to the contents of the `value` field. + *

+ * - **URL_STARTS_WITH:** Matches if the concatenation of request URL path and query starts with the contents of the `value` field. + *

+ * - **URL_PART_ENDS_WITH:** Matches if the concatenation of request URL path and query ends with the contents of the `value` field. + *

+ * - **URL_PART_CONTAINS:** Matches if the concatenation of request URL path and query contains the contents of the `value` field. + *

+ * URL must start with / + *

+ * URL can't contain restricted double slashes // + *

+ * URL can't contain restricted ' & ? symbols + **/ + @lombok.extern.slf4j.Slf4j + public enum Condition { + UrlIs("URL_IS"), + UrlStartsWith("URL_STARTS_WITH"), + UrlPartEndsWith("URL_PART_ENDS_WITH"), + UrlPartContains("URL_PART_CONTAINS"), + + /** + * 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 (Condition v : Condition.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Condition(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Condition create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Condition', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The condition of the caching rule criteria. + * - **URL_IS:** Matches if the concatenation of request URL path and query is identical to the contents of the `value` field. + *

+ * - **URL_STARTS_WITH:** Matches if the concatenation of request URL path and query starts with the contents of the `value` field. + *

+ * - **URL_PART_ENDS_WITH:** Matches if the concatenation of request URL path and query ends with the contents of the `value` field. + *

+ * - **URL_PART_CONTAINS:** Matches if the concatenation of request URL path and query contains the contents of the `value` field. + *

+ * URL must start with / + *

+ * URL can't contain restricted double slashes // + *

+ * URL can't contain restricted ' & ? symbols + **/ + @com.fasterxml.jackson.annotation.JsonProperty("condition") + Condition condition; + + /** + * The value of the caching rule criteria. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("value") + String value; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CachingRuleSummary.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CachingRuleSummary.java new file mode 100644 index 00000000000..ce49c948014 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CachingRuleSummary.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * The caching rule settings. + *
+ * 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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CachingRuleSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CachingRuleSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("key") + private String key; + + public Builder key(String key) { + this.key = key; + this.__explicitlySet__.add("key"); + return this; + } + + @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 Action action; + + public Builder action(Action action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cachingDuration") + private String cachingDuration; + + public Builder cachingDuration(String cachingDuration) { + this.cachingDuration = cachingDuration; + this.__explicitlySet__.add("cachingDuration"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isClientCachingEnabled") + private Boolean isClientCachingEnabled; + + public Builder isClientCachingEnabled(Boolean isClientCachingEnabled) { + this.isClientCachingEnabled = isClientCachingEnabled; + this.__explicitlySet__.add("isClientCachingEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("clientCachingDuration") + private String clientCachingDuration; + + public Builder clientCachingDuration(String clientCachingDuration) { + this.clientCachingDuration = clientCachingDuration; + this.__explicitlySet__.add("clientCachingDuration"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("criteria") + private java.util.List criteria; + + public Builder criteria(java.util.List criteria) { + this.criteria = criteria; + this.__explicitlySet__.add("criteria"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CachingRuleSummary build() { + CachingRuleSummary __instance__ = + new CachingRuleSummary( + key, + name, + action, + cachingDuration, + isClientCachingEnabled, + clientCachingDuration, + criteria); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CachingRuleSummary o) { + Builder copiedBuilder = + key(o.getKey()) + .name(o.getName()) + .action(o.getAction()) + .cachingDuration(o.getCachingDuration()) + .isClientCachingEnabled(o.getIsClientCachingEnabled()) + .clientCachingDuration(o.getClientCachingDuration()) + .criteria(o.getCriteria()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The unique key for the caching rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("key") + String key; + + /** + * The name of the caching rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("name") + String name; + /** + * The action to take on matched caching rules. + * - **CACHE:** Allow to set caching rule, which would be cached. + *

+ * - **BYPASS_CACHE:** Allow to set caching rule, which would never be cached. e.g. all requests would be passed directly to origin for those file types. + **/ + @lombok.extern.slf4j.Slf4j + public enum Action { + Cache("CACHE"), + BypassCache("BYPASS_CACHE"), + + /** + * 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 (Action v : Action.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Action(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Action create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Action', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The action to take on matched caching rules. + * - **CACHE:** Allow to set caching rule, which would be cached. + *

+ * - **BYPASS_CACHE:** Allow to set caching rule, which would never be cached. e.g. all requests would be passed directly to origin for those file types. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + Action action; + + /** + * The caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cachingDuration") + String cachingDuration; + + /** + * Enables or disables the client caching. + * Browsers use the Cache-Control header value for caching content locally, in the browser. + * This setting will control the addition of a Cache-Control header to responses. It overrides existing Cache-Control headers. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isClientCachingEnabled") + Boolean isClientCachingEnabled; + + /** + * The client caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format, in case client caching enabled. It sets Cache-Control header max-age time, i.e. the local browser cache expire time. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientCachingDuration") + String clientCachingDuration; + + /** + * The array of the rule criteria with condition and value. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("criteria") + java.util.List criteria; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/ChangeAddressListCompartmentDetails.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/ChangeAddressListCompartmentDetails.java new file mode 100644 index 00000000000..ca0e3b5a0a4 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/ChangeAddressListCompartmentDetails.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeAddressListCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ChangeAddressListCompartmentDetails { + @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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeAddressListCompartmentDetails build() { + ChangeAddressListCompartmentDetails __instance__ = + new ChangeAddressListCompartmentDetails(compartmentId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeAddressListCompartmentDetails o) { + Builder copiedBuilder = compartmentId(o.getCompartmentId()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment into which the resource should be moved. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/ChangeCustomProtectionRuleCompartmentDetails.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/ChangeCustomProtectionRuleCompartmentDetails.java new file mode 100644 index 00000000000..75d43415d4f --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/ChangeCustomProtectionRuleCompartmentDetails.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeCustomProtectionRuleCompartmentDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class ChangeCustomProtectionRuleCompartmentDetails { + @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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeCustomProtectionRuleCompartmentDetails build() { + ChangeCustomProtectionRuleCompartmentDetails __instance__ = + new ChangeCustomProtectionRuleCompartmentDetails(compartmentId); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeCustomProtectionRuleCompartmentDetails o) { + Builder copiedBuilder = compartmentId(o.getCompartmentId()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment into which the resource should be moved. + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CreateAddressListDetails.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CreateAddressListDetails.java new file mode 100644 index 00000000000..c330924b019 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CreateAddressListDetails.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * The data used to create a new address list. + *
+ * 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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateAddressListDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateAddressListDetails { + @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("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("addresses") + private java.util.List addresses; + + public Builder addresses(java.util.List addresses) { + this.addresses = addresses; + this.__explicitlySet__.add("addresses"); + 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("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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateAddressListDetails build() { + CreateAddressListDetails __instance__ = + new CreateAddressListDetails( + compartmentId, displayName, addresses, freeformTags, definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateAddressListDetails o) { + Builder copiedBuilder = + compartmentId(o.getCompartmentId()) + .displayName(o.getDisplayName()) + .addresses(o.getAddresses()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to create the address list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * A unique user-friendly name for the address list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * A list of IP addresses or CIDR notations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("addresses") + java.util.List addresses; + + /** + * 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.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CreateCustomProtectionRuleDetails.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CreateCustomProtectionRuleDetails.java new file mode 100644 index 00000000000..83178a99d76 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CreateCustomProtectionRuleDetails.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * The required data to create a Custom Protection rule. + * **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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateCustomProtectionRuleDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CreateCustomProtectionRuleDetails { + @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("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + 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("template") + private String template; + + public Builder template(String template) { + this.template = template; + this.__explicitlySet__.add("template"); + 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("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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateCustomProtectionRuleDetails build() { + CreateCustomProtectionRuleDetails __instance__ = + new CreateCustomProtectionRuleDetails( + compartmentId, + displayName, + description, + template, + freeformTags, + definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateCustomProtectionRuleDetails o) { + Builder copiedBuilder = + compartmentId(o.getCompartmentId()) + .displayName(o.getDisplayName()) + .description(o.getDescription()) + .template(o.getTemplate()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to create the Custom Protection rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * A user-friendly name for the Custom Protection rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * A description for the Custom Protection rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + String description; + + /** + * The template text of the Custom Protection rule. The syntax is based on ModSecurity Rule Language. Additionaly it needs to include two variables / placeholders which will be replaced during publishing. + *

+ * - **{{mode}}** - rule action, defined by user in UI, like `OFF`, `DETECT` or `BLOCK`. + *

+ * - **{{id_1}}** - unique rule ID which identifies a `SecRule`, generated by the system. Multiple IDs can be used by increasing the number of the variable for every `SecRule` defined in the template. + *

+ *Example usage:* + * ``` + * SecRule REQUEST_COOKIES \"regex matching SQL injection - part 1/2\" \\ + * \"phase:2, \\ + * msg:'Detects chained SQL injection attempts 1/2.', \\ + * id: {{id_1}}, \\ + * ctl:ruleEngine={{mode}}, \\ + * deny\" + * SecRule REQUEST_COOKIES \"regex matching SQL injection - part 2/2\" \\ + * \"phase:2, \\ + * msg:'Detects chained SQL injection attempts 2/2.', \\ + * id: {{id_2}}, \\ + * ctl:ruleEngine={{mode}}, \\ + * deny\" + * ``` + * The example contains two `SecRules` each having distinct regex expression to match + * `Cookie` header value during second input analysis phase. + * The disruptive `deny` action takes effect only when `{{mode}}` is set to `BLOCK`. + * The message is logged either when `{{mode}}` is set to `DETECT` or `BLOCK`. + *

+ * + * For more information about ModSecurity's open source WAF rules, see [Mod Security's documentation](https://www.modsecurity.org/CRS/Documentation/making.html). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("template") + String template; + + /** + * 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.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CreateWaasPolicyDetails.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CreateWaasPolicyDetails.java index 684a2d1d717..c69f4807325 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CreateWaasPolicyDetails.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CreateWaasPolicyDetails.java @@ -71,6 +71,15 @@ public Builder origins(java.util.Map origins) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("originGroups") + private java.util.Map originGroups; + + public Builder originGroups(java.util.Map originGroups) { + this.originGroups = originGroups; + this.__explicitlySet__.add("originGroups"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("policyConfig") private PolicyConfig policyConfig; @@ -119,6 +128,7 @@ public CreateWaasPolicyDetails build() { domain, additionalDomains, origins, + originGroups, policyConfig, wafConfig, freeformTags, @@ -135,6 +145,7 @@ public Builder copy(CreateWaasPolicyDetails o) { .domain(o.getDomain()) .additionalDomains(o.getAdditionalDomains()) .origins(o.getOrigins()) + .originGroups(o.getOriginGroups()) .policyConfig(o.getPolicyConfig()) .wafConfig(o.getWafConfig()) .freeformTags(o.getFreeformTags()) @@ -182,6 +193,12 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("origins") java.util.Map origins; + /** + * The map of origin groups and their keys used to associate origins to the wafConfig. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("originGroups") + java.util.Map originGroups; + @com.fasterxml.jackson.annotation.JsonProperty("policyConfig") PolicyConfig policyConfig; diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CustomProtectionRule.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CustomProtectionRule.java new file mode 100644 index 00000000000..64f1cc8f318 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CustomProtectionRule.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * The details of a Custom Protection rule. + *
+ * 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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CustomProtectionRule.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CustomProtectionRule { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + 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("modSecurityRuleIds") + private java.util.List modSecurityRuleIds; + + public Builder modSecurityRuleIds(java.util.List modSecurityRuleIds) { + this.modSecurityRuleIds = modSecurityRuleIds; + this.__explicitlySet__.add("modSecurityRuleIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("template") + private String template; + + public Builder template(String template) { + this.template = template; + this.__explicitlySet__.add("template"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleStates lifecycleState; + + public Builder lifecycleState(LifecycleStates lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + 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("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("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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CustomProtectionRule build() { + CustomProtectionRule __instance__ = + new CustomProtectionRule( + id, + compartmentId, + displayName, + description, + modSecurityRuleIds, + template, + lifecycleState, + timeCreated, + freeformTags, + definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CustomProtectionRule o) { + Builder copiedBuilder = + id(o.getId()) + .compartmentId(o.getCompartmentId()) + .displayName(o.getDisplayName()) + .description(o.getDescription()) + .modSecurityRuleIds(o.getModSecurityRuleIds()) + .template(o.getTemplate()) + .lifecycleState(o.getLifecycleState()) + .timeCreated(o.getTimeCreated()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Custom Protecion rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Custom Protecion rule's compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The user-friendly name of the Custom Protecion rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The description of the Custom Protection rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + String description; + + /** + * The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see [Mod Security's documentation](https://www.modsecurity.org/CRS/Documentation/index.html). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("modSecurityRuleIds") + java.util.List modSecurityRuleIds; + + /** + * The template text of the Custom Protection rule. The syntax is based on ModSecurity Rule Language. Additionaly it needs to include two variables / placeholders which will be replaced during publishing. + *

+ * - **{{mode}}** - rule action, defined by user in UI, like `OFF`, `DETECT` or `BLOCK`. + *

+ * - **{{id_1}}** - unique rule ID which identifies a `SecRule`, generated by the system. Multiple IDs can be used by increasing the number of the variable for every `SecRule` defined in the template. + *

+ *Example usage:* + * ``` + * SecRule REQUEST_COOKIES \"regex matching SQL injection - part 1/2\" \\ + * \"phase:2, \\ + * msg:'Detects chained SQL injection attempts 1/2.', \\ + * id: {{id_1}}, \\ + * ctl:ruleEngine={{mode}}, \\ + * deny\" + * SecRule REQUEST_COOKIES \"regex matching SQL injection - part 2/2\" \\ + * \"phase:2, \\ + * msg:'Detects chained SQL injection attempts 2/2.', \\ + * id: {{id_2}}, \\ + * ctl:ruleEngine={{mode}}, \\ + * deny\" + * ``` + * The example contains two `SecRules` each having distinct regex expression to match + * `Cookie` header value during second input analysis phase. + * The disruptive `deny` action takes effect only when `{{mode}}` is set to `BLOCK`. + * The message is logged either when `{{mode}}` is set to `DETECT` or `BLOCK`. + *

+ * + * For more information about ModSecurity's open source WAF rules, see [Mod Security's documentation](https://www.modsecurity.org/CRS/Documentation/making.html). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("template") + String template; + + /** + * The current lifecycle state of the Custom Protection rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleStates lifecycleState; + + /** + * The date and time the protection rule was created, expressed in RFC 3339 timestamp format. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + /** + * 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.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CustomProtectionRuleSetting.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CustomProtectionRuleSetting.java new file mode 100644 index 00000000000..832ad9a927f --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CustomProtectionRuleSetting.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * The OCID and action of a Custom Protection rule. + *
+ * 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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CustomProtectionRuleSetting.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CustomProtectionRuleSetting { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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("action") + private Action action; + + public Builder action(Action action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CustomProtectionRuleSetting build() { + CustomProtectionRuleSetting __instance__ = new CustomProtectionRuleSetting(id, action); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CustomProtectionRuleSetting o) { + Builder copiedBuilder = id(o.getId()).action(o.getAction()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Custom Protecion rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + /** + * The action to take when the Custom Protection rule is triggered. + **/ + @lombok.extern.slf4j.Slf4j + public enum Action { + Detect("DETECT"), + Block("BLOCK"), + + /** + * 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 (Action v : Action.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Action(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Action create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Action', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The action to take when the Custom Protection rule is triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + Action action; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CustomProtectionRuleSummary.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CustomProtectionRuleSummary.java new file mode 100644 index 00000000000..887282cdf1c --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/CustomProtectionRuleSummary.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * Summary information about a Custom Protection rule. + *
+ * 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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CustomProtectionRuleSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class CustomProtectionRuleSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("modSecurityRuleIds") + private java.util.List modSecurityRuleIds; + + public Builder modSecurityRuleIds(java.util.List modSecurityRuleIds) { + this.modSecurityRuleIds = modSecurityRuleIds; + this.__explicitlySet__.add("modSecurityRuleIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleStates lifecycleState; + + public Builder lifecycleState(LifecycleStates lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + 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("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("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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CustomProtectionRuleSummary build() { + CustomProtectionRuleSummary __instance__ = + new CustomProtectionRuleSummary( + id, + compartmentId, + displayName, + modSecurityRuleIds, + lifecycleState, + timeCreated, + freeformTags, + definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CustomProtectionRuleSummary o) { + Builder copiedBuilder = + id(o.getId()) + .compartmentId(o.getCompartmentId()) + .displayName(o.getDisplayName()) + .modSecurityRuleIds(o.getModSecurityRuleIds()) + .lifecycleState(o.getLifecycleState()) + .timeCreated(o.getTimeCreated()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Custom Protection rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Custom Protection rule's compartment. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + String compartmentId; + + /** + * The user-friendly name of the Custom Protection rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see [Mod Security's documentation](https://www.modsecurity.org/CRS/Documentation/index.html). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("modSecurityRuleIds") + java.util.List modSecurityRuleIds; + + /** + * The current lifecycle state of the Custom Protection rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + LifecycleStates lifecycleState; + + /** + * The date and time the protection rule was created, expressed in RFC 3339 timestamp format. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + java.util.Date timeCreated; + + /** + * 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.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/OriginGroup.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/OriginGroup.java new file mode 100644 index 00000000000..9c89565a430 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/OriginGroup.java @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = OriginGroup.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class OriginGroup { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("origins") + private java.util.List origins; + + public Builder origins(java.util.List origins) { + this.origins = origins; + this.__explicitlySet__.add("origins"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OriginGroup build() { + OriginGroup __instance__ = new OriginGroup(origins); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OriginGroup o) { + Builder copiedBuilder = origins(o.getOrigins()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The list of objects containing origin references and additional properties. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("origins") + java.util.List origins; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/OriginGroup_origins.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/OriginGroup_origins.java new file mode 100644 index 00000000000..a567faefa59 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/OriginGroup_origins.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = OriginGroup_origins.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class OriginGroup_origins { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @com.fasterxml.jackson.annotation.JsonProperty("origin") + private String origin; + + public Builder origin(String origin) { + this.origin = origin; + this.__explicitlySet__.add("origin"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("weight") + private Integer weight; + + public Builder weight(Integer weight) { + this.weight = weight; + this.__explicitlySet__.add("weight"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public OriginGroup_origins build() { + OriginGroup_origins __instance__ = new OriginGroup_origins(origin, weight); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(OriginGroup_origins o) { + Builder copiedBuilder = origin(o.getOrigin()).weight(o.getWeight()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The reference string to the origin server. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("origin") + String origin; + + /** + * The weight of the origin used in load balancing. The higher the weight, the larger the proportion of client requests the server receives. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("weight") + Integer weight; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/PolicyConfig.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/PolicyConfig.java index 75e419c9739..f930e8f6ee3 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/PolicyConfig.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/PolicyConfig.java @@ -49,12 +49,85 @@ public Builder isHttpsForced(Boolean isHttpsForced) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("tlsProtocols") + private java.util.List tlsProtocols; + + public Builder tlsProtocols(java.util.List tlsProtocols) { + this.tlsProtocols = tlsProtocols; + this.__explicitlySet__.add("tlsProtocols"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isOriginCompressionEnabled") + private Boolean isOriginCompressionEnabled; + + public Builder isOriginCompressionEnabled(Boolean isOriginCompressionEnabled) { + this.isOriginCompressionEnabled = isOriginCompressionEnabled; + this.__explicitlySet__.add("isOriginCompressionEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isBehindCdn") + private Boolean isBehindCdn; + + public Builder isBehindCdn(Boolean isBehindCdn) { + this.isBehindCdn = isBehindCdn; + this.__explicitlySet__.add("isBehindCdn"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("clientAddressHeader") + private ClientAddressHeader clientAddressHeader; + + public Builder clientAddressHeader(ClientAddressHeader clientAddressHeader) { + this.clientAddressHeader = clientAddressHeader; + this.__explicitlySet__.add("clientAddressHeader"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isCacheControlRespected") + private Boolean isCacheControlRespected; + + public Builder isCacheControlRespected(Boolean isCacheControlRespected) { + this.isCacheControlRespected = isCacheControlRespected; + this.__explicitlySet__.add("isCacheControlRespected"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("isResponseBufferingEnabled") + private Boolean isResponseBufferingEnabled; + + public Builder isResponseBufferingEnabled(Boolean isResponseBufferingEnabled) { + this.isResponseBufferingEnabled = isResponseBufferingEnabled; + this.__explicitlySet__.add("isResponseBufferingEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("cipherGroup") + private CipherGroup cipherGroup; + + public Builder cipherGroup(CipherGroup cipherGroup) { + this.cipherGroup = cipherGroup; + this.__explicitlySet__.add("cipherGroup"); + return this; + } + @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public PolicyConfig build() { PolicyConfig __instance__ = - new PolicyConfig(certificateId, isHttpsEnabled, isHttpsForced); + new PolicyConfig( + certificateId, + isHttpsEnabled, + isHttpsForced, + tlsProtocols, + isOriginCompressionEnabled, + isBehindCdn, + clientAddressHeader, + isCacheControlRespected, + isResponseBufferingEnabled, + cipherGroup); __instance__.__explicitlySet__.addAll(__explicitlySet__); return __instance__; } @@ -64,7 +137,14 @@ public Builder copy(PolicyConfig o) { Builder copiedBuilder = certificateId(o.getCertificateId()) .isHttpsEnabled(o.getIsHttpsEnabled()) - .isHttpsForced(o.getIsHttpsForced()); + .isHttpsForced(o.getIsHttpsForced()) + .tlsProtocols(o.getTlsProtocols()) + .isOriginCompressionEnabled(o.getIsOriginCompressionEnabled()) + .isBehindCdn(o.getIsBehindCdn()) + .clientAddressHeader(o.getClientAddressHeader()) + .isCacheControlRespected(o.getIsCacheControlRespected()) + .isResponseBufferingEnabled(o.getIsResponseBufferingEnabled()) + .cipherGroup(o.getCipherGroup()); copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); return copiedBuilder; @@ -95,6 +175,217 @@ public static Builder builder() { **/ @com.fasterxml.jackson.annotation.JsonProperty("isHttpsForced") Boolean isHttpsForced; + /** + **/ + @lombok.extern.slf4j.Slf4j + public enum TlsProtocols { + TlsV1("TLS_V1"), + TlsV11("TLS_V1_1"), + TlsV12("TLS_V1_2"), + TlsV13("TLS_V1_3"), + + /** + * 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 (TlsProtocols v : TlsProtocols.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + TlsProtocols(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static TlsProtocols create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'TlsProtocols', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * A list of allowed TLS protocols. Only applicable when HTTPS support is enabled. It affects client's connection to the edge nodes. The most secure TLS version will be chosen. + * - **TLS_V1:** corresponds to TLS 1.0 specification. + *

+ * - **TLS_V1_1:** corresponds to TLS 1.1 specification. + *

+ * - **TLS_V1_2:** corresponds to TLS 1.2 specification. + *

+ * - **TLS_V1_3:** corresponds to TLS 1.3 specification. + *

+ * Enabled TLS protocols must go in a row. For example if TLS_v1_1 and TLS_V1_3 are enabled, TLS_V1_2 must be enabled too. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("tlsProtocols") + java.util.List tlsProtocols; + + /** + * Enable or disable GZIP compression of origin responses. If enabled, the header `Accept-Encoding: gzip` is sent to origin, otherwise - empty `Accept-Encoding:` header is used. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isOriginCompressionEnabled") + Boolean isOriginCompressionEnabled; + + /** + * Enable or disable the use of CDN. It allows to specify true client IP address if clients do not connect directly to us. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isBehindCdn") + Boolean isBehindCdn; + /** + * The HTTP header used to pass the client IP address from the CDN if `isBehindCdn` is enabled. This feature consumes the header and its value as the true client IP address. It does not create the header. Using trusted chains (for example `X-Client-Ip: 11.1.1.1, 13.3.3.3`), the last IP address in the list will be used as true client IP address. In case of multiple headers with the same name, the first one will be used. If the header is not present it will use the connecting IP address as the true client IP address. It's assumed that CDN sets the correct client IP address and prevents spoofing. + *

+ * - **X_FORWARDED_FOR:** Corresponds to `X-Forwarded-For` header name. + *

+ * - **X_CLIENT_IP:** Corresponds to `X-Client-Ip` header name. + *

+ * - **X_REAL_IP:** Corresponds to `X-Real-Ip` header name. + *

+ * - **CLIENT_IP:** Corresponds to `Client-Ip` header name. + *

+ * - **TRUE_CLIENT_IP:** Corresponds to `True-Client-Ip` header name. + **/ + @lombok.extern.slf4j.Slf4j + public enum ClientAddressHeader { + XForwardedFor("X_FORWARDED_FOR"), + XClientIp("X_CLIENT_IP"), + XRealIp("X_REAL_IP"), + ClientIp("CLIENT_IP"), + TrueClientIp("TRUE_CLIENT_IP"), + + /** + * 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 (ClientAddressHeader v : ClientAddressHeader.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ClientAddressHeader(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ClientAddressHeader create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ClientAddressHeader', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The HTTP header used to pass the client IP address from the CDN if `isBehindCdn` is enabled. This feature consumes the header and its value as the true client IP address. It does not create the header. Using trusted chains (for example `X-Client-Ip: 11.1.1.1, 13.3.3.3`), the last IP address in the list will be used as true client IP address. In case of multiple headers with the same name, the first one will be used. If the header is not present it will use the connecting IP address as the true client IP address. It's assumed that CDN sets the correct client IP address and prevents spoofing. + *

+ * - **X_FORWARDED_FOR:** Corresponds to `X-Forwarded-For` header name. + *

+ * - **X_CLIENT_IP:** Corresponds to `X-Client-Ip` header name. + *

+ * - **X_REAL_IP:** Corresponds to `X-Real-Ip` header name. + *

+ * - **CLIENT_IP:** Corresponds to `Client-Ip` header name. + *

+ * - **TRUE_CLIENT_IP:** Corresponds to `True-Client-Ip` header name. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("clientAddressHeader") + ClientAddressHeader clientAddressHeader; + + /** + * Enable or disable automatic content caching based on the response `cache-control` header. This feature enables the origin to act as a proxy cache. Caching policies are usually defined using `cache-control` header. For example `cache-control: max-age=120` means that the returned resource is valid for 120 seconds. Caching rules will overwrite this setting. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isCacheControlRespected") + Boolean isCacheControlRespected; + + /** + * Enable or disable buffering of responses from the origin. Buffering improves overall stability in case of network issues, but slightly increases Time To First Byte. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("isResponseBufferingEnabled") + Boolean isResponseBufferingEnabled; + /** + * The cipher group + * - **DEFAULT:** Cipher group supports TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3 protocols. It has the following ciphers enabled: `ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:!DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA` + **/ + @lombok.extern.slf4j.Slf4j + public enum CipherGroup { + Default("DEFAULT"), + + /** + * 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 (CipherGroup v : CipherGroup.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + CipherGroup(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static CipherGroup create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'CipherGroup', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The cipher group + * - **DEFAULT:** Cipher group supports TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3 protocols. It has the following ciphers enabled: `ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:!DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA` + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cipherGroup") + CipherGroup cipherGroup; @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/PurgeCache.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/PurgeCache.java new file mode 100644 index 00000000000..e258f2552d2 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/PurgeCache.java @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * The list of resources for cache purge. If a resources property is not provided, the purge targets all resources in a policy. + *
+ * 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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PurgeCache.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class PurgeCache { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public PurgeCache build() { + PurgeCache __instance__ = new PurgeCache(resources); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(PurgeCache o) { + Builder copiedBuilder = resources(o.getResources()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A resource to purge, identified by either a hostless absolute path starting with a single slash (e.g., \"/path/to/resource\") or by a relative path in which the first component will be interpreted as a domain protected by this policy (e.g., \"example.com/path/to/resource\"). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + java.util.List resources; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/UpdateAddressListDetails.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/UpdateAddressListDetails.java new file mode 100644 index 00000000000..2b0157ad724 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/UpdateAddressListDetails.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * The data used to update the address list. + *
+ * 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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateAddressListDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateAddressListDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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("addresses") + private java.util.List addresses; + + public Builder addresses(java.util.List addresses) { + this.addresses = addresses; + this.__explicitlySet__.add("addresses"); + 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("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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateAddressListDetails build() { + UpdateAddressListDetails __instance__ = + new UpdateAddressListDetails(displayName, addresses, freeformTags, definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateAddressListDetails o) { + Builder copiedBuilder = + displayName(o.getDisplayName()) + .addresses(o.getAddresses()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A unique user-friendly name for the address list. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * A list of IP addresses or CIDR notations. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("addresses") + java.util.List addresses; + + /** + * 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.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/UpdateCustomProtectionRuleDetails.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/UpdateCustomProtectionRuleDetails.java new file mode 100644 index 00000000000..0794a82fd47 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/UpdateCustomProtectionRuleDetails.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * Updates the configuration details of a Custom Protection rule. The update is possible only if the rule hasn't been selected as active in any WAAS policy (remains in `Off` state). + * **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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateCustomProtectionRuleDetails.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class UpdateCustomProtectionRuleDetails { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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("description") + private String description; + + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("template") + private String template; + + public Builder template(String template) { + this.template = template; + this.__explicitlySet__.add("template"); + 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("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.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateCustomProtectionRuleDetails build() { + UpdateCustomProtectionRuleDetails __instance__ = + new UpdateCustomProtectionRuleDetails( + displayName, description, template, freeformTags, definedTags); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateCustomProtectionRuleDetails o) { + Builder copiedBuilder = + displayName(o.getDisplayName()) + .description(o.getDescription()) + .template(o.getTemplate()) + .freeformTags(o.getFreeformTags()) + .definedTags(o.getDefinedTags()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * A user-friendly name for the Custom Protection rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + + /** + * A description for the Custom Protection rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("description") + String description; + + /** + * The template text of the Custom Protection rule. The syntax is based on ModSecurity Rule Language. Additionaly it needs to include two variables / placeholders which will be replaced during publishing. + *

+ * - **{{mode}}** - rule action, defined by user in UI, like `OFF`, `DETECT` or `BLOCK`. + *

+ * - **{{id_1}}** - unique rule ID which identifies a `SecRule`, generated by the system. Multiple IDs can be used by increasing the number of the variable for every `SecRule` defined in the template. + *

+ *Example usage:* + * ``` + * SecRule REQUEST_COOKIES \"regex matching SQL injection - part 1/2\" \\ + * \"phase:2, \\ + * msg:'Detects chained SQL injection attempts 1/2.', \\ + * id: {{id_1}}, \\ + * ctl:ruleEngine={{mode}}, \\ + * deny\" + * SecRule REQUEST_COOKIES \"regex matching SQL injection - part 2/2\" \\ + * \"phase:2, \\ + * msg:'Detects chained SQL injection attempts 2/2.', \\ + * id: {{id_2}}, \\ + * ctl:ruleEngine={{mode}}, \\ + * deny\" + * ``` + * The example contains two `SecRules` each having distinct regex expression to match + * `Cookie` header value during second input analysis phase. + * The disruptive `deny` action takes effect only when `{{mode}}` is set to `BLOCK`. + * The message is logged either when `{{mode}}` is set to `DETECT` or `BLOCK`. + *

+ * + * For more information about ModSecurity's open source WAF rules, see [Mod Security's documentation](https://www.modsecurity.org/CRS/Documentation/making.html). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("template") + String template; + + /** + * 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.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Department\": \"Finance\"}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + java.util.Map freeformTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + *

+ * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + * + **/ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + java.util.Map> definedTags; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/UpdateWaasPolicyDetails.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/UpdateWaasPolicyDetails.java index 2b7a225ec6b..67d9cab69b7 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/UpdateWaasPolicyDetails.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/UpdateWaasPolicyDetails.java @@ -53,6 +53,15 @@ public Builder origins(java.util.Map origins) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("originGroups") + private java.util.Map originGroups; + + public Builder originGroups(java.util.Map originGroups) { + this.originGroups = originGroups; + this.__explicitlySet__.add("originGroups"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("policyConfig") private PolicyConfig policyConfig; @@ -99,6 +108,7 @@ public UpdateWaasPolicyDetails build() { displayName, additionalDomains, origins, + originGroups, policyConfig, wafConfig, freeformTags, @@ -113,6 +123,7 @@ public Builder copy(UpdateWaasPolicyDetails o) { displayName(o.getDisplayName()) .additionalDomains(o.getAdditionalDomains()) .origins(o.getOrigins()) + .originGroups(o.getOriginGroups()) .policyConfig(o.getPolicyConfig()) .wafConfig(o.getWafConfig()) .freeformTags(o.getFreeformTags()) @@ -148,6 +159,12 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("origins") java.util.Map origins; + /** + * The map of origin groups and their keys used to associate origins to the wafConfig. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("originGroups") + java.util.Map originGroups; + @com.fasterxml.jackson.annotation.JsonProperty("policyConfig") PolicyConfig policyConfig; diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WaasPolicy.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WaasPolicy.java index 570d478766f..7dbef1bbb3e 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WaasPolicy.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WaasPolicy.java @@ -105,6 +105,15 @@ public Builder origins(java.util.Map origins) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("originGroups") + private java.util.Map originGroups; + + public Builder originGroups(java.util.Map originGroups) { + this.originGroups = originGroups; + this.__explicitlySet__.add("originGroups"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("policyConfig") private PolicyConfig policyConfig; @@ -157,6 +166,7 @@ public WaasPolicy build() { lifecycleState, timeCreated, origins, + originGroups, policyConfig, wafConfig, freeformTags, @@ -177,6 +187,7 @@ public Builder copy(WaasPolicy o) { .lifecycleState(o.getLifecycleState()) .timeCreated(o.getTimeCreated()) .origins(o.getOrigins()) + .originGroups(o.getOriginGroups()) .policyConfig(o.getPolicyConfig()) .wafConfig(o.getWafConfig()) .freeformTags(o.getFreeformTags()) @@ -248,6 +259,12 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("origins") java.util.Map origins; + /** + * The map of origin groups and their keys used to associate origins to the wafConfig. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("originGroups") + java.util.Map originGroups; + @com.fasterxml.jackson.annotation.JsonProperty("policyConfig") PolicyConfig policyConfig; diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WaasPolicyCustomProtectionRuleSummary.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WaasPolicyCustomProtectionRuleSummary.java new file mode 100644 index 00000000000..c7dbabb6d40 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WaasPolicyCustomProtectionRuleSummary.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.model; + +/** + * Summary information about a Custom Protection rule. + *
+ * 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: 20181116") +@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated})) +@lombok.Value +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WaasPolicyCustomProtectionRuleSummary.Builder.class +) +@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME) +public class WaasPolicyCustomProtectionRuleSummary { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + @lombok.experimental.Accessors(fluent = true) + public static class Builder { + @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("displayName") + private String displayName; + + public Builder displayName(String displayName) { + this.displayName = displayName; + this.__explicitlySet__.add("displayName"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("action") + private Action action; + + public Builder action(Action action) { + this.action = action; + this.__explicitlySet__.add("action"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("modSecurityRuleIds") + private java.util.List modSecurityRuleIds; + + public Builder modSecurityRuleIds(java.util.List modSecurityRuleIds) { + this.modSecurityRuleIds = modSecurityRuleIds; + this.__explicitlySet__.add("modSecurityRuleIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WaasPolicyCustomProtectionRuleSummary build() { + WaasPolicyCustomProtectionRuleSummary __instance__ = + new WaasPolicyCustomProtectionRuleSummary( + id, displayName, action, modSecurityRuleIds); + __instance__.__explicitlySet__.addAll(__explicitlySet__); + return __instance__; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WaasPolicyCustomProtectionRuleSummary o) { + Builder copiedBuilder = + id(o.getId()) + .displayName(o.getDisplayName()) + .action(o.getAction()) + .modSecurityRuleIds(o.getModSecurityRuleIds()); + + copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__); + return copiedBuilder; + } + } + + /** + * Create a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Custom Protection rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("id") + String id; + + /** + * The user-friendly name of the Custom Protection rule. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("displayName") + String displayName; + /** + * The action to take when the Custom Protection rule is triggered. + **/ + @lombok.extern.slf4j.Slf4j + public enum Action { + Detect("DETECT"), + Block("BLOCK"), + + /** + * 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 (Action v : Action.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Action(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Action create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Action', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The action to take when the Custom Protection rule is triggered. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("action") + Action action; + + /** + * The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see [Mod Security's documentation](https://www.modsecurity.org/CRS/Documentation/index.html). + **/ + @com.fasterxml.jackson.annotation.JsonProperty("modSecurityRuleIds") + java.util.List modSecurityRuleIds; + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WafConfig.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WafConfig.java index 59a729cd1d7..f03e32cc8fb 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WafConfig.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WafConfig.java @@ -96,6 +96,34 @@ public Builder origin(String origin) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("cachingRules") + private java.util.List cachingRules; + + public Builder cachingRules(java.util.List cachingRules) { + this.cachingRules = cachingRules; + this.__explicitlySet__.add("cachingRules"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("customProtectionRules") + private java.util.List customProtectionRules; + + public Builder customProtectionRules( + java.util.List customProtectionRules) { + this.customProtectionRules = customProtectionRules; + this.__explicitlySet__.add("customProtectionRules"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originGroups") + private java.util.List originGroups; + + public Builder originGroups(java.util.List originGroups) { + this.originGroups = originGroups; + this.__explicitlySet__.add("originGroups"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("protectionRules") private java.util.List protectionRules; @@ -146,6 +174,9 @@ public WafConfig build() { humanInteractionChallenge, jsChallenge, origin, + cachingRules, + customProtectionRules, + originGroups, protectionRules, protectionSettings, threatFeeds, @@ -165,6 +196,9 @@ public Builder copy(WafConfig o) { .humanInteractionChallenge(o.getHumanInteractionChallenge()) .jsChallenge(o.getJsChallenge()) .origin(o.getOrigin()) + .cachingRules(o.getCachingRules()) + .customProtectionRules(o.getCustomProtectionRules()) + .originGroups(o.getOriginGroups()) .protectionRules(o.getProtectionRules()) .protectionSettings(o.getProtectionSettings()) .threatFeeds(o.getThreatFeeds()) @@ -230,6 +264,24 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("origin") String origin; + /** + * A list of caching rules applied to the web application. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cachingRules") + java.util.List cachingRules; + + /** + * A list of the custom protection rule OCIDs and their actions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customProtectionRules") + java.util.List customProtectionRules; + + /** + * The list of origin group references that provide support for additional origin servers. A list of combined unique origin servers from `origin` and `originGroups` will be used. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("originGroups") + java.util.List originGroups; + /** * A list of the protection rules and their details. **/ diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WafConfigDetails.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WafConfigDetails.java index 416b4336a57..1db3466987d 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WafConfigDetails.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WafConfigDetails.java @@ -87,6 +87,34 @@ public Builder origin(String origin) { return this; } + @com.fasterxml.jackson.annotation.JsonProperty("cachingRules") + private java.util.List cachingRules; + + public Builder cachingRules(java.util.List cachingRules) { + this.cachingRules = cachingRules; + this.__explicitlySet__.add("cachingRules"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("customProtectionRules") + private java.util.List customProtectionRules; + + public Builder customProtectionRules( + java.util.List customProtectionRules) { + this.customProtectionRules = customProtectionRules; + this.__explicitlySet__.add("customProtectionRules"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("originGroups") + private java.util.List originGroups; + + public Builder originGroups(java.util.List originGroups) { + this.originGroups = originGroups; + this.__explicitlySet__.add("originGroups"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("protectionSettings") private ProtectionSettings protectionSettings; @@ -118,6 +146,9 @@ public WafConfigDetails build() { humanInteractionChallenge, jsChallenge, origin, + cachingRules, + customProtectionRules, + originGroups, protectionSettings, whitelists); __instance__.__explicitlySet__.addAll(__explicitlySet__); @@ -134,6 +165,9 @@ public Builder copy(WafConfigDetails o) { .humanInteractionChallenge(o.getHumanInteractionChallenge()) .jsChallenge(o.getJsChallenge()) .origin(o.getOrigin()) + .cachingRules(o.getCachingRules()) + .customProtectionRules(o.getCustomProtectionRules()) + .originGroups(o.getOriginGroups()) .protectionSettings(o.getProtectionSettings()) .whitelists(o.getWhitelists()); @@ -191,6 +225,24 @@ public static Builder builder() { @com.fasterxml.jackson.annotation.JsonProperty("origin") String origin; + /** + * A list of caching rules applied to the web application. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("cachingRules") + java.util.List cachingRules; + + /** + * A list of the custom protection rule OCIDs and their actions. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("customProtectionRules") + java.util.List customProtectionRules; + + /** + * The list of origin group references that provide support for additional origin servers. A list of combined unique origin servers from `origin` and `originGroups` will be used. + **/ + @com.fasterxml.jackson.annotation.JsonProperty("originGroups") + java.util.List originGroups; + /** * The settings applied to protection rules. **/ diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WorkRequestOperationTypes.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WorkRequestOperationTypes.java index 35ee4049d6d..7bd8de6682a 100644 --- a/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WorkRequestOperationTypes.java +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/model/WorkRequestOperationTypes.java @@ -12,6 +12,10 @@ public enum WorkRequestOperationTypes { CreateWaasPolicy("CREATE_WAAS_POLICY"), UpdateWaasPolicy("UPDATE_WAAS_POLICY"), DeleteWaasPolicy("DELETE_WAAS_POLICY"), + PurgeWaasPolicyCache("PURGE_WAAS_POLICY_CACHE"), + CreateCustomProtectionRule("CREATE_CUSTOM_PROTECTION_RULE"), + UpdateCustomProtectionRule("UPDATE_CUSTOM_PROTECTION_RULE"), + DeleteCustomProtectionRule("DELETE_CUSTOM_PROTECTION_RULE"), /** * This value is used if a service returns a value for this enum that is not recognized by this diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ChangeAddressListCompartmentRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ChangeAddressListCompartmentRequest.java new file mode 100644 index 00000000000..11c798d2f53 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ChangeAddressListCompartmentRequest.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ChangeAddressListCompartmentRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the address list. This number is generated when the address list is added to the compartment. + */ + private String addressListId; + + /** + * + */ + private ChangeAddressListCompartmentDetails changeAddressListCompartmentDetails; + + /** + * 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 provided matches the resource's current etag value. + */ + private String ifMatch; + + /** + * The 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 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 + * *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected. + */ + private String opcRetryToken; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeAddressListCompartmentRequest o) { + addressListId(o.getAddressListId()); + changeAddressListCompartmentDetails(o.getChangeAddressListCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeAddressListCompartmentRequest 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 ChangeAddressListCompartmentRequest + */ + public ChangeAddressListCompartmentRequest build() { + ChangeAddressListCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ChangeCustomProtectionRuleCompartmentRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ChangeCustomProtectionRuleCompartmentRequest.java new file mode 100644 index 00000000000..1e4482e0948 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ChangeCustomProtectionRuleCompartmentRequest.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ChangeCustomProtectionRuleCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Custom Protection rule. This number is generated when the Custom Protection rule is added to the compartment. + */ + private String customProtectionRuleId; + + /** + * + */ + private ChangeCustomProtectionRuleCompartmentDetails + changeCustomProtectionRuleCompartmentDetails; + + /** + * 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 provided matches the resource's current etag value. + */ + private String ifMatch; + + /** + * The 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 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 + * *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected. + */ + private String opcRetryToken; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ChangeCustomProtectionRuleCompartmentRequest o) { + customProtectionRuleId(o.getCustomProtectionRuleId()); + changeCustomProtectionRuleCompartmentDetails( + o.getChangeCustomProtectionRuleCompartmentDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeCustomProtectionRuleCompartmentRequest 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 ChangeCustomProtectionRuleCompartmentRequest + */ + public ChangeCustomProtectionRuleCompartmentRequest build() { + ChangeCustomProtectionRuleCompartmentRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/CreateAddressListRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/CreateAddressListRequest.java new file mode 100644 index 00000000000..6c323f8c38f --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/CreateAddressListRequest.java @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CreateAddressListRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The details of the address list resource to create. + */ + private CreateAddressListDetails createAddressListDetails; + + /** + * The 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 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 + * *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected. + */ + private String opcRetryToken; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAddressListRequest o) { + createAddressListDetails(o.getCreateAddressListDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateAddressListRequest 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 CreateAddressListRequest + */ + public CreateAddressListRequest build() { + CreateAddressListRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/CreateCustomProtectionRuleRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/CreateCustomProtectionRuleRequest.java new file mode 100644 index 00000000000..46f61c4e3cf --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/CreateCustomProtectionRuleRequest.java @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class CreateCustomProtectionRuleRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The details of the Custom Protection rule. + */ + private CreateCustomProtectionRuleDetails createCustomProtectionRuleDetails; + + /** + * The 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 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 + * *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected. + */ + private String opcRetryToken; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateCustomProtectionRuleRequest o) { + createCustomProtectionRuleDetails(o.getCreateCustomProtectionRuleDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateCustomProtectionRuleRequest 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 CreateCustomProtectionRuleRequest + */ + public CreateCustomProtectionRuleRequest build() { + CreateCustomProtectionRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/DeleteAddressListRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/DeleteAddressListRequest.java new file mode 100644 index 00000000000..cb399fb6f65 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/DeleteAddressListRequest.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class DeleteAddressListRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the address list. This number is generated when the address list is added to the compartment. + */ + private String addressListId; + + /** + * The 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 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 + * *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected. + */ + private String opcRetryToken; + + /** + * 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 provided matches the resource's current etag value. + */ + private String ifMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteAddressListRequest o) { + addressListId(o.getAddressListId()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteAddressListRequest 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 DeleteAddressListRequest + */ + public DeleteAddressListRequest build() { + DeleteAddressListRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/DeleteCustomProtectionRuleRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/DeleteCustomProtectionRuleRequest.java new file mode 100644 index 00000000000..c9a94947071 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/DeleteCustomProtectionRuleRequest.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class DeleteCustomProtectionRuleRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Custom Protection rule. This number is generated when the Custom Protection rule is added to the compartment. + */ + private String customProtectionRuleId; + + /** + * The 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 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 + * *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected. + */ + private String opcRetryToken; + + /** + * 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 provided matches the resource's current etag value. + */ + private String ifMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(DeleteCustomProtectionRuleRequest o) { + customProtectionRuleId(o.getCustomProtectionRuleId()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteCustomProtectionRuleRequest 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 DeleteCustomProtectionRuleRequest + */ + public DeleteCustomProtectionRuleRequest build() { + DeleteCustomProtectionRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/GetAddressListRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/GetAddressListRequest.java new file mode 100644 index 00000000000..543bfc0b2f5 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/GetAddressListRequest.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetAddressListRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the address list. This number is generated when the address list is added to the compartment. + */ + private String addressListId; + + /** + * The 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 { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAddressListRequest o) { + addressListId(o.getAddressListId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetAddressListRequest 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 GetAddressListRequest + */ + public GetAddressListRequest build() { + GetAddressListRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/GetCustomProtectionRuleRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/GetCustomProtectionRuleRequest.java new file mode 100644 index 00000000000..b67725f9b15 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/GetCustomProtectionRuleRequest.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class GetCustomProtectionRuleRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Custom Protection rule. This number is generated when the Custom Protection rule is added to the compartment. + */ + private String customProtectionRuleId; + + /** + * The 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 { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetCustomProtectionRuleRequest o) { + customProtectionRuleId(o.getCustomProtectionRuleId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetCustomProtectionRuleRequest 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 GetCustomProtectionRuleRequest + */ + public GetCustomProtectionRuleRequest build() { + GetCustomProtectionRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListAddressListsRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListAddressListsRequest.java new file mode 100644 index 00000000000..dae1eb71e52 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListAddressListsRequest.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListAddressListsRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. This number is generated when the compartment is created. + */ + private String compartmentId; + + /** + * The 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 maximum number of items to return in a paginated call. In unspecified, defaults to `10`. + */ + private Integer limit; + + /** + * The value of the `opc-next-page` response header from the previous paginated call. + */ + private String page; + + /** + * The value by which address lists are sorted in a paginated 'List' call. If unspecified, defaults to `timeCreated`. + */ + private SortBy sortBy; + + /** + * The value by which address lists are sorted in a paginated 'List' call. If unspecified, defaults to `timeCreated`. + **/ + public enum SortBy { + Id("id"), + Name("name"), + TimeCreated("timeCreated"), + ; + + 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 value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`. + */ + private SortOrder sortOrder; + + /** + * The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`. + **/ + 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); + } + }; + + /** + * Filter address lists using a list of address lists OCIDs. + */ + private java.util.List id; + + /** + * Filter address lists using a list of names. + */ + private java.util.List name; + + /** + * Filter address lists using a list of lifecycle states. + */ + private java.util.List lifecycleState; + + /** + * A filter that matches address lists created on or after the specified date-time. + */ + private java.util.Date timeCreatedGreaterThanOrEqualTo; + + /** + * A filter that matches address lists created before the specified date-time. + */ + private java.util.Date timeCreatedLessThan; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListAddressListsRequest o) { + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + id(o.getId()); + name(o.getName()); + lifecycleState(o.getLifecycleState()); + timeCreatedGreaterThanOrEqualTo(o.getTimeCreatedGreaterThanOrEqualTo()); + timeCreatedLessThan(o.getTimeCreatedLessThan()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListAddressListsRequest 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 ListAddressListsRequest + */ + public ListAddressListsRequest build() { + ListAddressListsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListCachingRulesRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListCachingRulesRequest.java new file mode 100644 index 00000000000..c3f65200e66 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListCachingRulesRequest.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListCachingRulesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the WAAS policy. + */ + private String waasPolicyId; + + /** + * The 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 maximum number of items to return in a paginated call. In unspecified, defaults to `10`. + */ + private Integer limit; + + /** + * The value of the `opc-next-page` response header from the previous paginated call. + */ + private String page; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListCachingRulesRequest o) { + waasPolicyId(o.getWaasPolicyId()); + opcRequestId(o.getOpcRequestId()); + limit(o.getLimit()); + page(o.getPage()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListCachingRulesRequest 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 ListCachingRulesRequest + */ + public ListCachingRulesRequest build() { + ListCachingRulesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListCustomProtectionRulesRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListCustomProtectionRulesRequest.java new file mode 100644 index 00000000000..ddaf272f7b5 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListCustomProtectionRulesRequest.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListCustomProtectionRulesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. This number is generated when the compartment is created. + */ + private String compartmentId; + + /** + * The 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 maximum number of items to return in a paginated call. In unspecified, defaults to `10`. + */ + private Integer limit; + + /** + * The value of the `opc-next-page` response header from the previous paginated call. + */ + private String page; + + /** + * The value by which Custom Protection rules are sorted in a paginated 'List' call. If unspecified, defaults to `timeCreated`. + */ + private SortBy sortBy; + + /** + * The value by which Custom Protection rules are sorted in a paginated 'List' call. If unspecified, defaults to `timeCreated`. + **/ + public enum SortBy { + Id("id"), + CompartmentId("compartmentId"), + DisplayName("displayName"), + ModSecurityRuleId("modSecurityRuleId"), + TimeCreated("timeCreated"), + ; + + 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 value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`. + */ + private SortOrder sortOrder; + + /** + * The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`. + **/ + 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); + } + }; + + /** + * Filter Custom Protection rules using a list of Custom Protection rules OCIDs. + */ + private java.util.List id; + + /** + * Filter Custom Protection rules using a list of display names. + */ + private java.util.List displayName; + + /** + * Filter Custom Protection rules using a list of lifecycle states. + */ + private java.util.List lifecycleState; + + /** + * A filter that matches Custom Protection rules created on or after the specified date-time. + */ + private java.util.Date timeCreatedGreaterThanOrEqualTo; + + /** + * A filter that matches Custom Protection rules created before the specified date-time. + */ + private java.util.Date timeCreatedLessThan; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListCustomProtectionRulesRequest o) { + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + limit(o.getLimit()); + page(o.getPage()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + id(o.getId()); + displayName(o.getDisplayName()); + lifecycleState(o.getLifecycleState()); + timeCreatedGreaterThanOrEqualTo(o.getTimeCreatedGreaterThanOrEqualTo()); + timeCreatedLessThan(o.getTimeCreatedLessThan()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListCustomProtectionRulesRequest 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 ListCustomProtectionRulesRequest + */ + public ListCustomProtectionRulesRequest build() { + ListCustomProtectionRulesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListWaasPolicyCustomProtectionRulesRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListWaasPolicyCustomProtectionRulesRequest.java new file mode 100644 index 00000000000..5cb5eb2a87d --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/ListWaasPolicyCustomProtectionRulesRequest.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class ListWaasPolicyCustomProtectionRulesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the WAAS policy. + */ + private String waasPolicyId; + + /** + * The 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 maximum number of items to return in a paginated call. In unspecified, defaults to `10`. + */ + private Integer limit; + + /** + * The value of the `opc-next-page` response header from the previous paginated call. + */ + private String page; + + /** + * Filter rules using a list of ModSecurity rule IDs. + */ + private java.util.List modSecurityRuleId; + + /** + * Filter rules using a list of actions. + */ + private java.util.List action; + + /** + * Filter rules using a list of actions. + **/ + public enum Action { + Detect("DETECT"), + Block("BLOCK"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Action v : Action.values()) { + map.put(v.getValue(), v); + } + } + + Action(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Action create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new RuntimeException("Invalid Action: " + key); + } + }; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(ListWaasPolicyCustomProtectionRulesRequest o) { + waasPolicyId(o.getWaasPolicyId()); + opcRequestId(o.getOpcRequestId()); + limit(o.getLimit()); + page(o.getPage()); + modSecurityRuleId(o.getModSecurityRuleId()); + action(o.getAction()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListWaasPolicyCustomProtectionRulesRequest 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 ListWaasPolicyCustomProtectionRulesRequest + */ + public ListWaasPolicyCustomProtectionRulesRequest build() { + ListWaasPolicyCustomProtectionRulesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/PurgeCacheRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/PurgeCacheRequest.java new file mode 100644 index 00000000000..4a87fcb5861 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/PurgeCacheRequest.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class PurgeCacheRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the WAAS policy. + */ + private String waasPolicyId; + + /** + * The 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; + + /** + * 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 provided matches the resource's current etag value. + */ + private String ifMatch; + + /** + * + */ + private PurgeCache purgeCache; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PurgeCacheRequest o) { + waasPolicyId(o.getWaasPolicyId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + purgeCache(o.getPurgeCache()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of PurgeCacheRequest 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 PurgeCacheRequest + */ + public PurgeCacheRequest build() { + PurgeCacheRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateAddressListRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateAddressListRequest.java new file mode 100644 index 00000000000..687dc7a9d30 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateAddressListRequest.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class UpdateAddressListRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the address list. This number is generated when the address list is added to the compartment. + */ + private String addressListId; + + /** + * The 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; + + /** + * 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 provided matches the resource's current etag value. + */ + private String ifMatch; + + /** + * The details of the address list to update. + */ + private UpdateAddressListDetails updateAddressListDetails; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAddressListRequest o) { + addressListId(o.getAddressListId()); + opcRequestId(o.getOpcRequestId()); + ifMatch(o.getIfMatch()); + updateAddressListDetails(o.getUpdateAddressListDetails()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateAddressListRequest 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 UpdateAddressListRequest + */ + public UpdateAddressListRequest build() { + UpdateAddressListRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateCachingRulesRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateCachingRulesRequest.java new file mode 100644 index 00000000000..fe3e673100a --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateCachingRulesRequest.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class UpdateCachingRulesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the WAAS policy. + */ + private String waasPolicyId; + + /** + * + */ + private java.util.List cachingRulesDetails; + + /** + * The 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 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 + * *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected. + */ + private String opcRetryToken; + + /** + * 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 provided matches the resource's current etag value. + */ + private String ifMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateCachingRulesRequest o) { + waasPolicyId(o.getWaasPolicyId()); + cachingRulesDetails(o.getCachingRulesDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateCachingRulesRequest 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 UpdateCachingRulesRequest + */ + public UpdateCachingRulesRequest build() { + UpdateCachingRulesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateCustomProtectionRuleRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateCustomProtectionRuleRequest.java new file mode 100644 index 00000000000..b329c583aa2 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateCustomProtectionRuleRequest.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class UpdateCustomProtectionRuleRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Custom Protection rule. This number is generated when the Custom Protection rule is added to the compartment. + */ + private String customProtectionRuleId; + + /** + * The details of the Custom Protection rule to update. + */ + private UpdateCustomProtectionRuleDetails updateCustomProtectionRuleDetails; + + /** + * The 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 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 + * *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected. + */ + private String opcRetryToken; + + /** + * 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 provided matches the resource's current etag value. + */ + private String ifMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateCustomProtectionRuleRequest o) { + customProtectionRuleId(o.getCustomProtectionRuleId()); + updateCustomProtectionRuleDetails(o.getUpdateCustomProtectionRuleDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateCustomProtectionRuleRequest 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 UpdateCustomProtectionRuleRequest + */ + public UpdateCustomProtectionRuleRequest build() { + UpdateCustomProtectionRuleRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateWaasPolicyCustomProtectionRulesRequest.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateWaasPolicyCustomProtectionRulesRequest.java new file mode 100644 index 00000000000..623cfe4cbcc --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/requests/UpdateWaasPolicyCustomProtectionRulesRequest.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.requests; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder", buildMethodName = "buildWithoutInvocationCallback") +@lombok.Getter +public class UpdateWaasPolicyCustomProtectionRulesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the WAAS policy. + */ + private String waasPolicyId; + + /** + * + */ + private java.util.List updateCustomProtectionRulesDetails; + + /** + * The 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 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 + * *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected. + */ + private String opcRetryToken; + + /** + * 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 provided matches the resource's current etag value. + */ + private String ifMatch; + + public static class Builder { + private com.oracle.bmc.util.internal.Consumer + invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = 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; + } + + /** + * Set the retry configuration for the request to be built. + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateWaasPolicyCustomProtectionRulesRequest o) { + waasPolicyId(o.getWaasPolicyId()); + updateCustomProtectionRulesDetails(o.getUpdateCustomProtectionRulesDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateWaasPolicyCustomProtectionRulesRequest 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 UpdateWaasPolicyCustomProtectionRulesRequest + */ + public UpdateWaasPolicyCustomProtectionRulesRequest build() { + UpdateWaasPolicyCustomProtectionRulesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ChangeAddressListCompartmentResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ChangeAddressListCompartmentResponse.java new file mode 100644 index 00000000000..236ebf09f8e --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ChangeAddressListCompartmentResponse.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ChangeAddressListCompartmentResponse { + + /** + * A 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(ChangeAddressListCompartmentResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ChangeCustomProtectionRuleCompartmentResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ChangeCustomProtectionRuleCompartmentResponse.java new file mode 100644 index 00000000000..dbb61e0a294 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ChangeCustomProtectionRuleCompartmentResponse.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ChangeCustomProtectionRuleCompartmentResponse { + + /** + * A 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(ChangeCustomProtectionRuleCompartmentResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/CreateAddressListResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/CreateAddressListResponse.java new file mode 100644 index 00000000000..6e04957ac20 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/CreateAddressListResponse.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateAddressListResponse { + + /** + * A 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; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned AddressList instance. + */ + private AddressList addressList; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateAddressListResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + addressList(o.getAddressList()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/CreateCustomProtectionRuleResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/CreateCustomProtectionRuleResponse.java new file mode 100644 index 00000000000..4f3edc47a66 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/CreateCustomProtectionRuleResponse.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class CreateCustomProtectionRuleResponse { + + /** + * A 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; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned CustomProtectionRule instance. + */ + private CustomProtectionRule customProtectionRule; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(CreateCustomProtectionRuleResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + customProtectionRule(o.getCustomProtectionRule()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/DeleteAddressListResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/DeleteAddressListResponse.java new file mode 100644 index 00000000000..705aa8940fd --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/DeleteAddressListResponse.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteAddressListResponse { + + /** + * A 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(DeleteAddressListResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/DeleteCustomProtectionRuleResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/DeleteCustomProtectionRuleResponse.java new file mode 100644 index 00000000000..565fbeecfed --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/DeleteCustomProtectionRuleResponse.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class DeleteCustomProtectionRuleResponse { + + /** + * A 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(DeleteCustomProtectionRuleResponse o) { + opcRequestId(o.getOpcRequestId()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/GetAddressListResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/GetAddressListResponse.java new file mode 100644 index 00000000000..8e082275125 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/GetAddressListResponse.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetAddressListResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * A 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 AddressList instance. + */ + private AddressList addressList; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetAddressListResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + addressList(o.getAddressList()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/GetCustomProtectionRuleResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/GetCustomProtectionRuleResponse.java new file mode 100644 index 00000000000..64c6613b7ed --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/GetCustomProtectionRuleResponse.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class GetCustomProtectionRuleResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * A 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 CustomProtectionRule instance. + */ + private CustomProtectionRule customProtectionRule; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(GetCustomProtectionRuleResponse o) { + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + customProtectionRule(o.getCustomProtectionRule()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListAddressListsResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListAddressListsResponse.java new file mode 100644 index 00000000000..98a923f82b7 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListAddressListsResponse.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListAddressListsResponse { + + /** + * For list pagination. When this header appears in the response, additional pages of results may remain. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * A 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 AddressListSummary 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(ListAddressListsResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListCachingRulesResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListCachingRulesResponse.java new file mode 100644 index 00000000000..71e5428e0ca --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListCachingRulesResponse.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListCachingRulesResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * For list pagination. When this header appears in the response, additional pages of results may remain. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * A 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 CachingRuleSummary 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(ListCachingRulesResponse o) { + etag(o.getEtag()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListCustomProtectionRulesResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListCustomProtectionRulesResponse.java new file mode 100644 index 00000000000..3db68c8d893 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListCustomProtectionRulesResponse.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListCustomProtectionRulesResponse { + + /** + * For list pagination. When this header appears in the response, additional pages of results may remain. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * A 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 CustomProtectionRuleSummary 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(ListCustomProtectionRulesResponse o) { + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListWaasPolicyCustomProtectionRulesResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListWaasPolicyCustomProtectionRulesResponse.java new file mode 100644 index 00000000000..4d13a1914ec --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/ListWaasPolicyCustomProtectionRulesResponse.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class ListWaasPolicyCustomProtectionRulesResponse { + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * For list pagination. When this header appears in the response, additional pages of results may remain. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * A 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 WaasPolicyCustomProtectionRuleSummary 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(ListWaasPolicyCustomProtectionRulesResponse o) { + etag(o.getEtag()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + items(o.getItems()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/PurgeCacheResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/PurgeCacheResponse.java new file mode 100644 index 00000000000..40a0a6e2c70 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/PurgeCacheResponse.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class PurgeCacheResponse { + + /** + * A 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 [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + */ + private String opcWorkRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(PurgeCacheResponse o) { + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateAddressListResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateAddressListResponse.java new file mode 100644 index 00000000000..25bcdf2f398 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateAddressListResponse.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateAddressListResponse { + + /** + * A 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; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned AddressList instance. + */ + private AddressList addressList; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateAddressListResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + addressList(o.getAddressList()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateCachingRulesResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateCachingRulesResponse.java new file mode 100644 index 00000000000..9dd308541cb --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateCachingRulesResponse.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateCachingRulesResponse { + + /** + * A 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 [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + */ + private String opcWorkRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateCachingRulesResponse o) { + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateCustomProtectionRuleResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateCustomProtectionRuleResponse.java new file mode 100644 index 00000000000..562749e84be --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateCustomProtectionRuleResponse.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateCustomProtectionRuleResponse { + + /** + * A 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; + + /** + * For optimistic concurrency control. See `if-match`. + */ + private String etag; + + /** + * The returned CustomProtectionRule instance. + */ + private CustomProtectionRule customProtectionRule; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateCustomProtectionRuleResponse o) { + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + customProtectionRule(o.getCustomProtectionRule()); + + return this; + } + } +} diff --git a/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateWaasPolicyCustomProtectionRulesResponse.java b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateWaasPolicyCustomProtectionRulesResponse.java new file mode 100644 index 00000000000..d87435a5736 --- /dev/null +++ b/bmc-waas/src/main/java/com/oracle/bmc/waas/responses/UpdateWaasPolicyCustomProtectionRulesResponse.java @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + */ +package com.oracle.bmc.waas.responses; + +import com.oracle.bmc.waas.model.*; + +@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20181116") +@lombok.Builder(builderClassName = "Builder") +@lombok.Getter +public class UpdateWaasPolicyCustomProtectionRulesResponse { + + /** + * A 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 [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. + */ + private String opcWorkRequestId; + + public static class Builder { + /** + * Copy method to populate the builder with values from the given instance. + * @return this builder instance + */ + public Builder copy(UpdateWaasPolicyCustomProtectionRulesResponse o) { + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + } +} diff --git a/bmc-workrequests/pom.xml b/bmc-workrequests/pom.xml index ebdfb3b4b73..00e610e44c1 100644 --- a/bmc-workrequests/pom.xml +++ b/bmc-workrequests/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 ../pom.xml oci-java-sdk-workrequests @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 1.6.0 + 1.6.1 diff --git a/pom.xml b/pom.xml index fb4d2244bfe..0de1aa2fdd0 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.oracle.oci.sdk oci-java-sdk - 1.6.0 + 1.6.1 pom Oracle Cloud Infrastructure SDK This project contains the SDK used for Oracle Cloud Infrastructure