org.cloudfoundry.client.lib.adapters.RawCloudServiceBinding 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.CloudServiceBinding;
import org.cloudfoundry.client.lib.domain.ImmutableCloudServiceBinding;
import org.cloudfoundry.client.v2.Resource;
import org.cloudfoundry.client.v2.servicebindings.ServiceBindingEntity;
import org.immutables.value.Value;
@Value.Immutable
public abstract class RawCloudServiceBinding extends RawCloudEntity {
@Value.Parameter
public abstract Resource getResource();
@Override
public CloudServiceBinding derive() {
Resource resource = getResource();
ServiceBindingEntity entity = resource.getEntity();
return ImmutableCloudServiceBinding.builder()
.metadata(parseResourceMetadata(resource))
.applicationGuid(parseNullableGuid(entity.getApplicationId()))
.syslogDrainUrl(entity.getSyslogDrainUrl())
.bindingOptions(entity.getBindingOptions())
.credentials(entity.getCredentials())
.build();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy