@Override public Region region() { return Region.fromName(this.regionName()); }
@Override public Region region() { return Region.fromName(this.regionName()); }
/** * Removes a tag from the resource. * @param key the key of the tag to remove * @return the next stage of the definition/update */ @SuppressWarnings("unchecked") public final FluentModelImplT withoutTag(String key) { if (this.inner().getTags() != null) { this.inner().getTags().remove(key); } return (FluentModelImplT) this; }
@Override public String type() { return this.inner().type(); }
/******************************************* * Getters. *******************************************/ @Override public String regionName() { return this.inner().location(); }
/** * @return <tt>true</tt> if currently in define..create mode */ @Override public boolean isInCreateMode() { return this.inner().id() == null; }
@Override public Map<String, String> tags() { Map<String, String> tags = this.inner().getTags(); if (tags == null) { tags = new TreeMap<>(); } return Collections.unmodifiableMap(tags); }
/** * Specifies tags for the resource as a {@link Map}. * @param tags a {@link Map} of tags * @return the next stage of the definition/update */ @SuppressWarnings("unchecked") public final FluentModelImplT withTags(Map<String, String> tags) { this.inner().withTags(new HashMap<>(tags)); return (FluentModelImplT) this; }
/** * @return <tt>true</tt> if currently in define..create mode */ @Override public boolean isInCreateMode() { return this.inner().id() == null; }
@Override public Map<String, String> tags() { Map<String, String> tags = this.inner().getTags(); if (tags == null) { tags = new TreeMap<>(); } return Collections.unmodifiableMap(tags); }
/** * Specifies tags for the resource as a {@link Map}. * @param tags a {@link Map} of tags * @return the next stage of the definition/update */ @SuppressWarnings("unchecked") public final FluentModelImplT withTags(Map<String, String> tags) { this.inner().withTags(new HashMap<>(tags)); return (FluentModelImplT) this; }
/** * Adds a tag to the resource. * @param key the key for the tag * @param value the value for the tag * @return the next stage of the definition/update */ @SuppressWarnings("unchecked") public final FluentModelImplT withTag(String key, String value) { if (this.inner().getTags() == null) { this.inner().withTags(new HashMap<String, String>()); } this.inner().getTags().put(key, value); return (FluentModelImplT) this; }
/** * Removes a tag from the resource. * @param key the key of the tag to remove * @return the next stage of the definition/update */ @SuppressWarnings("unchecked") public final FluentModelImplT withoutTag(String key) { if (this.inner().getTags() != null) { this.inner().getTags().remove(key); } return (FluentModelImplT) this; }
/******************************************* * Getters. *******************************************/ @Override public String regionName() { return this.inner().location(); }
@Override public String type() { return this.inner().type(); }
/** * Adds a tag to the resource. * @param key the key for the tag * @param value the value for the tag * @return the next stage of the definition/update */ @SuppressWarnings("unchecked") public final FluentModelImplT withTag(String key, String value) { if (this.inner().getTags() == null) { this.inner().withTags(new HashMap<String, String>()); } this.inner().getTags().put(key, value); return (FluentModelImplT) this; }