@Override public Location apply(Zone input) { return new LocationBuilder() .description(input.getDescription().orNull()) .metadata(ImmutableMap.of("selfLink", (Object) checkNotNull(input.getSelfLink(), "zone URI"))) .id(input.getName()) .scope(LocationScope.ZONE) .parent(GOOGLE_PROVIDER_LOCATION) .build(); } }
@Override public Location apply(Region input) { return new LocationBuilder() .description(input.getDescription().orNull()) .metadata(ImmutableMap.of("selfLink", (Object) checkNotNull(input.getSelfLink(), "region URI"))) .id(input.getName()) .scope(LocationScope.REGION) .parent(GOOGLE_PROVIDER_LOCATION) .build(); } }
@Override public Location apply(Region input) { return new LocationBuilder() .description(input.getDescription().orNull()) .metadata(ImmutableMap.of("selfLink", (Object) checkNotNull(input.getSelfLink(), "region URI"))) .id(input.getName()) .scope(LocationScope.REGION) .parent(GOOGLE_PROVIDER_LOCATION) .build(); } }
@Override public Location apply(Zone input) { return new LocationBuilder() .description(input.getDescription().orNull()) .metadata(ImmutableMap.of("selfLink", (Object) checkNotNull(input.getSelfLink(), "zone URI"))) .id(input.getName()) .scope(LocationScope.ZONE) .parent(GOOGLE_PROVIDER_LOCATION) .build(); } }
@Override public Location apply(Zone zone) { return new LocationBuilder().scope(LocationScope.ZONE).metadata(ImmutableMap.<String, Object> of()) .description(zone.getName()).id(zone.getId()) .parent(Iterables.getOnlyElement(provider.get())).build(); }
@Override public Location apply(Zone zone) { return new LocationBuilder().scope(LocationScope.ZONE).metadata(ImmutableMap.<String, Object> of()) .description(zone.getName()).id(zone.getId()) .parent(Iterables.getOnlyElement(provider.get())).build(); }
@Override public Location apply(Zone zone) { return new LocationBuilder().scope(LocationScope.ZONE).metadata(ImmutableMap.<String, Object> of()) .description(zone.getName()).id(zone.getId()) .parent(Iterables.getOnlyElement(provider.get())).build(); }
@Override public Location apply(Datacenter datacenter) { return new LocationBuilder().scope(LocationScope.ZONE) .metadata(ImmutableMap.<String, Object>of()) .description(datacenter.getLongName()) .id(Long.toString(datacenter.getId())) .iso3166Codes(createIso3166Codes(datacenter.getLocationAddress())) .parent(Iterables.getOnlyElement(provider.get())) .build(); }
@Override public Location apply(Datacenter datacenter) { return new LocationBuilder().scope(LocationScope.ZONE) .metadata(ImmutableMap.<String, Object>of()) .description(datacenter.getLongName()) .id(Long.toString(datacenter.getId())) .iso3166Codes(createIso3166Codes(datacenter.getLocationAddress())) .parent(Iterables.getOnlyElement(provider.get())) .build(); }
@Override public Location apply(Region input) { LocationBuilder builder = new LocationBuilder(); builder.id(input.slug()); builder.description(input.name()); builder.scope(LocationScope.REGION); builder.parent(getOnlyElement(justProvider.get())); builder.iso3166Codes(ImmutableSet.<String> of()); builder.metadata(ImmutableMap.<String, Object> of("available", input.available(), "features", input.features())); return builder.build(); } }
@Override public Location apply(Region input) { LocationBuilder builder = new LocationBuilder(); builder.id(input.slug()); builder.description(input.name()); builder.scope(LocationScope.REGION); builder.parent(getOnlyElement(justProvider.get())); builder.iso3166Codes(ImmutableSet.<String> of()); builder.metadata(ImmutableMap.<String, Object> of("available", input.available(), "features", input.features())); return builder.build(); } }
@Override public Location apply(Region input) { LocationBuilder builder = new LocationBuilder(); builder.id(input.slug()); builder.description(input.name()); builder.scope(LocationScope.REGION); builder.parent(getOnlyElement(justProvider.get())); builder.iso3166Codes(ImmutableSet.<String> of()); builder.metadata(ImmutableMap.<String, Object> of("available", input.available(), "features", input.features())); return builder.build(); } }
@Override public Location apply(Datacenter datacenter) { return new LocationBuilder().id(datacenter.getName()) .description(datacenter.getLongName()) .scope(LocationScope.ZONE) .iso3166Codes(createIso3166Codes(datacenter.getLocationAddress())) .parent(Iterables.getOnlyElement(provider.get())) .metadata(ImmutableMap.<String, Object>of("name", datacenter.getName())) .build(); }
@Override public Location apply(Datacenter datacenter) { return new LocationBuilder().id(datacenter.getName()) .description(datacenter.getLongName()) .scope(LocationScope.ZONE) .iso3166Codes(createIso3166Codes(datacenter.getLocationAddress())) .parent(Iterables.getOnlyElement(provider.get())) .metadata(ImmutableMap.<String, Object>of("name", datacenter.getName())) .build(); }
@Override public Location apply(Datacenter datacenter) { return new LocationBuilder().id(datacenter.getName()) .description(datacenter.getLongName()) .scope(LocationScope.ZONE) .iso3166Codes(createIso3166Codes(datacenter.getLocationAddress())) .parent(Iterables.getOnlyElement(provider.get())) .metadata(ImmutableMap.<String, Object>of("name", datacenter.getName())) .build(); }
@Override public Location apply(Datacenter datacenter) { return new LocationBuilder().id(datacenter.getName()) .description(datacenter.getLongName()) .scope(LocationScope.ZONE) .iso3166Codes(createIso3166Codes(datacenter.getLocationAddress())) .parent(Iterables.getOnlyElement(provider.get())) .metadata(ImmutableMap.<String, Object>of("name", datacenter.getName())) .build(); }
.metadata(ImmutableMap.<String, Object>of("version", "MCP 2.0", "state", "AVAILABLE")) .description("locationDescription") .parent(new LocationBuilder().id("us").description("USA").scope(LocationScope.PROVIDER).build()).build();