public static void scheduleVaultDeletionTest(KmsVaultClient kmsVaultClient, String vaultId) { System.out.println("ScheduleVaultDeletion Test: "); ScheduleVaultDeletionDetails scheduleVaultDeletionDetails = ScheduleVaultDeletionDetails.builder().timeOfDeletion(null).build(); ScheduleVaultDeletionRequest scheduleVaultDeletionRequest = ScheduleVaultDeletionRequest.builder() .scheduleVaultDeletionDetails(scheduleVaultDeletionDetails) .vaultId(vaultId) .build(); ScheduleVaultDeletionResponse response = kmsVaultClient.scheduleVaultDeletion(scheduleVaultDeletionRequest); System.out.println("Deletion Scheduled Successfully, Updated Vault: "); System.out.println(response.getVault()); System.out.println(); }
/** * Build the instance of ScheduleVaultDeletionRequest 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 ScheduleVaultDeletionRequest */ public ScheduleVaultDeletionRequest build() { ScheduleVaultDeletionRequest request = buildWithoutInvocationCallback(); request.setInvocationCallback(invocationCallback); return request; } }
/** * Copy method to populate the builder with values from the given instance. * @return this builder instance */ public Builder copy(ScheduleVaultDeletionRequest o) { vaultId(o.getVaultId()); scheduleVaultDeletionDetails(o.getScheduleVaultDeletionDetails()); ifMatch(o.getIfMatch()); opcRequestId(o.getOpcRequestId()); opcRetryToken(o.getOpcRetryToken()); invocationCallback(o.getInvocationCallback()); return this; }