/** * Specifies the region for the resource by name. * @param regionName The name of the region for the resource * @return the next stage of the definition/update */ @SuppressWarnings("unchecked") public final FluentModelImplT withRegion(String regionName) { this.inner().withLocation(regionName); return (FluentModelImplT) this; }
/** * @return <tt>true</tt> if currently in define..create mode */ @Override public boolean isInCreateMode() { return this.inner().id() == null; }
Resource resource = new Resource(); resource.withLocation(self.regionName()); resource.withTags(self.tags()); return self.manager().inner().containerGroups() .updateAsync(self.resourceGroupName(), self.name(), resource)
/** * 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; }
/** * 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(); }
Resource resource = new Resource(); resource.withLocation(self.regionName()); resource.withTags(self.tags()); return self.manager().inner().containerGroups() .updateAsync(self.resourceGroupName(), self.name(), resource)
/** * 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; }
@Override public Map<String, String> tags() { Map<String, String> tags = this.inner().getTags(); if (tags == null) { tags = new TreeMap<>(); } return Collections.unmodifiableMap(tags); }
/******************************************* * Getters. *******************************************/ @Override public String regionName() { return this.inner().location(); }
@Override public String type() { return this.inner().type(); }
/** * Specifies the region for the resource by name. * @param regionName The name of the region for the resource * @return the next stage of the definition/update */ @SuppressWarnings("unchecked") public final FluentModelImplT withRegion(String regionName) { this.inner().withLocation(regionName); return (FluentModelImplT) this; }
/** * 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; }
/** * 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; }