use of com.sequenceiq.environment.network.dao.domain.GcpNetwork in project cloudbreak by hortonworks.
the class GcpEnvironmentNetworkConverter method setProviderSpecificFields.
@Override
NetworkDto setProviderSpecificFields(NetworkDto.Builder builder, BaseNetwork network) {
GcpNetwork gcpNetwork = (GcpNetwork) network;
GcpParams.Builder gcpParamsBuilder = GcpParams.builder();
Optional.ofNullable(gcpNetwork.getNetworkId()).ifPresent(gcpParamsBuilder::withNetworkId);
Optional.ofNullable(gcpNetwork.getNoFirewallRules()).ifPresent(gcpParamsBuilder::withNoFirewallRules);
Optional.ofNullable(gcpNetwork.getNoPublicIp()).ifPresent(gcpParamsBuilder::withNoPublicIp);
Optional.ofNullable(gcpNetwork.getSharedProjectId()).ifPresent(gcpParamsBuilder::withSharedProjectId);
return builder.withGcp(gcpParamsBuilder.build()).build();
}
Aggregations