org.cloudfoundry.client.lib.adapters.RawCloudServicePlan Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudfoundry-client-lib Show documentation
Show all versions of cloudfoundry-client-lib Show documentation
A Cloud Foundry client library for Java
The newest version!
package org.cloudfoundry.client.lib.adapters;
import org.cloudfoundry.client.lib.domain.CloudServicePlan;
import org.cloudfoundry.client.lib.domain.ImmutableCloudServicePlan;
import org.cloudfoundry.client.v2.Resource;
import org.cloudfoundry.client.v2.serviceplans.ServicePlanEntity;
import org.immutables.value.Value;
@Value.Immutable
public abstract class RawCloudServicePlan extends RawCloudEntity {
@Value.Parameter
public abstract Resource getResource();
@Override
public CloudServicePlan derive() {
Resource resource = getResource();
ServicePlanEntity entity = resource.getEntity();
return ImmutableCloudServicePlan.builder()
.metadata(parseResourceMetadata(resource))
.name(entity.getName())
.description(entity.getDescription())
.extra(entity.getExtra())
.uniqueId(entity.getUniqueId())
.isPublic(entity.getPubliclyVisible())
.isFree(entity.getFree())
.build();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy