/** * Creates a new object initialized with the given values. * * @return new object initialized with the given values */ public static SetKey ofUnset() { return new SetKey(null); } }
public static RemoveLocation of(final Location location) { return new RemoveLocation(location); }
public static AddLocation of(final Location location) { return new AddLocation(location); }
public static SetDescription of(final Optional<String> description) { return new SetDescription(description); } }
public static ChangeName of(final String name) { return new ChangeName(name); }
@Test public void addLocationAndRemoveLocation() throws Exception { ZoneFixtures.withUpdateableZone(client(), zone -> { //adding a location final Location newLocation = Location.of(CountryCode.AQ, "state"); assertThat(zone.getLocations().contains(newLocation)).isFalse(); final ZoneUpdateCommand addCommand = ZoneUpdateCommand.of(zone, AddLocation.of(newLocation)); final Zone zoneWithNewLocation = client().executeBlocking(addCommand); assertThat(zoneWithNewLocation.getLocations()).contains(newLocation); //removing a location final ZoneUpdateCommand removeCommand = ZoneUpdateCommand.of(zoneWithNewLocation, RemoveLocation.of(newLocation)); final Zone zoneWithoutNewLocation = client().executeBlocking(removeCommand); assertThat(zoneWithoutNewLocation.getLocations().contains(newLocation)).isFalse(); return zoneWithoutNewLocation; }, CountryCode.AO); } }
public static SetDescription of(@Nullable final String description) { return new SetDescription(description); } }
public static RemoveLocation of(final Location location) { return new RemoveLocation(location); }
public static AddLocation of(final Location location) { return new AddLocation(location); }
public static ChangeName of(final String name) { return new ChangeName(name); }
/** * Creates a new object initialized with the given values. * * @param key initial value for the {@link Zone#getKey()} property * @return new object initialized with the given values */ public static SetKey of(@Nullable final String key) { return new SetKey(key); }
public static SetDescription of(@Nullable final String description) { return new SetDescription(description); } }
public static RemoveLocation of(final Location location) { return new RemoveLocation(location); }
public static AddLocation of(final Location location) { return new AddLocation(location); }
public static ChangeName of(final String name) { return new ChangeName(name); }
public static SetDescription of(@Nullable final String description) { return new SetDescription(description); } }
public static RemoveLocation of(final Location location) { return new RemoveLocation(location); }
public static AddLocation of(final Location location) { return new AddLocation(location); }
public static ChangeName of(final String name) { return new ChangeName(name); }
public static SetDescription of(final String description) { return new SetDescription(Optional.of(description)); }