/** * Create a service instance from an update request. If fields * are not present in the request they will remain null in the * ServiceInstance. * @param request containing details of ServiceInstance */ public ServiceInstance(UpdateServiceInstanceRequest request) { this.serviceInstanceId = request.getServiceInstanceId(); this.planId = request.getPlanId(); this.lastOperation = new GetLastServiceOperationResponse() .withOperationState(OperationState.IN_PROGRESS) .withDescription("Updating"); }
/** * Create a ServiceInstance from a delete request. If fields * are not present in the request they will remain null in the * ServiceInstance. * @param request containing details of ServiceInstance */ public ServiceInstance(DeleteServiceInstanceRequest request) { this.serviceInstanceId = request.getServiceInstanceId(); this.planId = request.getPlanId(); this.serviceDefinitionId = request.getServiceDefinitionId(); this.lastOperation = new GetLastServiceOperationResponse() .withOperationState(OperationState.IN_PROGRESS) .withDescription("Deprovisioning"); }
/** * Create a ServiceInstance from a create request. If fields * are not present in the request they will remain null in the * ServiceInstance. * @param request containing details of ServiceInstance */ public ServiceInstance(CreateServiceInstanceRequest request) { this.serviceDefinitionId = request.getServiceDefinitionId(); this.planId = request.getPlanId(); this.organizationGuid = request.getOrganizationGuid(); this.spaceGuid = request.getSpaceGuid(); this.serviceInstanceId = request.getServiceInstanceId(); this.lastOperation = new GetLastServiceOperationResponse() .withOperationState(OperationState.IN_PROGRESS) .withDescription("Provisioning"); }