All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cloudfoundry.client.lib.adapters.RawCloudOrganization Maven / Gradle / Ivy

The newest version!
package org.cloudfoundry.client.lib.adapters;

import org.cloudfoundry.client.lib.domain.CloudOrganization;
import org.cloudfoundry.client.lib.domain.ImmutableCloudOrganization;
import org.cloudfoundry.client.v2.Resource;
import org.cloudfoundry.client.v2.organizations.OrganizationEntity;
import org.immutables.value.Value;

@Value.Immutable
public abstract class RawCloudOrganization extends RawCloudEntity {

    @Value.Parameter
    public abstract Resource getResource();

    @Override
    public CloudOrganization derive() {
        Resource resource = getResource();
        OrganizationEntity entity = resource.getEntity();
        return ImmutableCloudOrganization.builder()
                                         .metadata(parseResourceMetadata(resource))
                                         .name(entity.getName())
                                         .build();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy