public interface ZoneCreateCommand extends DraftBasedCreateCommandDsl<Zone,ZoneDraft,ZoneCreateCommand>, MetaModelReferenceExpansionDsl<Zone,ZoneCreateCommand,ZoneExpansionModel<Zone>>
Zone.
final Set<CountryCode> euAndSwissCountries = asSet(AT, BE, CH);//not complete, but you get the idea final String key = randomKey(); final Set<Location> locations = euAndSwissCountries.stream().map(country -> Location.of(country)).collect(toSet()); final ZoneDraft draft = ZoneDraftBuilder.of("zone1",locations ).description("EU and Swiss").key(key).build(); final ZoneCreateCommand createCommand = ZoneCreateCommand.of(draft); final Zone zone = client().executeBlocking(createCommand); assertThat(zone.getKey()).isEqualTo(key); //end example parsing here client().executeBlocking(ZoneDeleteCommand.ofKey(zone.getKey(),zone.getVersion()));See the test code.
| Modifier and Type | Method and Description |
|---|---|
static ZoneCreateCommand |
of(ZoneDraft draft)
Creates a command object to create a
Zone. |
getDraft, withDraftcanDeserialize, deserialize, httpRequestIntentplusExpansionPaths, withExpansionPathsplusExpansionPaths, plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPathsexpansionPathsstatic ZoneCreateCommand of(ZoneDraft draft)
Zone.draft - template to create the new object