/** * Finds or creates an availability zone identifier based on the specified identifier in string format. * @param id the zone identifier in string format * @return an instance of AvailabilityZone */ public static AvailabilityZoneId fromString(String id) { return fromString(id, AvailabilityZoneId.class); }
/** * @return known availability zone identifiers */ public static Collection<AvailabilityZoneId> values() { return values(AvailabilityZoneId.class); } }
/** * Finds or creates an availability zone identifier based on the specified identifier in string format. * @param id the zone identifier in string format * @return an instance of AvailabilityZone */ public static AvailabilityZoneId fromString(String id) { return fromString(id, AvailabilityZoneId.class); }
@Override public DiskImpl withAvailabilityZone(AvailabilityZoneId zoneId) { // Note: Zone is not updatable as of now, so this is available only during definition time. // Service return `ResourceAvailabilityZonesCannotBeModified` upon attempt to append a new // zone or remove one. Trying to remove the last one means attempt to change resource from // zonal to regional, which is not supported. if (this.inner().zones() == null) { this.inner().withZones(new ArrayList<String>()); } this.inner().zones().add(zoneId.toString()); return this; }
/** * @return known availability zone identifiers */ public static Collection<AvailabilityZoneId> values() { return values(AvailabilityZoneId.class); } }
@Override public Set<AvailabilityZoneId> availabilityZones() { Set<AvailabilityZoneId> zones = new HashSet<>(); if (this.inner().zones() != null) { for (String zone : this.inner().zones()) { zones.add(AvailabilityZoneId.fromString(zone)); } } return Collections.unmodifiableSet(zones); }
@Override public VirtualMachineScaleSetImpl withAvailabilityZone(AvailabilityZoneId zoneId) { // Note: Only for virtual machine scale set, new zone can be specified, hence // this option is available for both definition and update cases. // // if (this.inner().zones() == null) { this.inner().withZones(new ArrayList<String>()); } this.inner().zones().add(zoneId.toString()); return this; }
@Override public Set<AvailabilityZoneId> availabilityZones() { Set<AvailabilityZoneId> zones = new HashSet<>(); if (this.inner().zones() != null) { for (String zone : this.inner().zones()) { zones.add(AvailabilityZoneId.fromString(zone)); } } return Collections.unmodifiableSet(zones); }
@Override public DiskImpl withAvailabilityZone(AvailabilityZoneId zoneId) { // Note: Zone is not updatable as of now, so this is available only during definition time. // Service return `ResourceAvailabilityZonesCannotBeModified` upon attempt to append a new // zone or remove one. Trying to remove the last one means attempt to change resource from // zonal to regional, which is not supported. if (this.inner().zones() == null) { this.inner().withZones(new ArrayList<String>()); } this.inner().zones().add(zoneId.toString()); return this; }
@Override public Set<AvailabilityZoneId> availabilityZones() { Set<AvailabilityZoneId> zones = new HashSet<>(); if (this.inner().zones() != null) { for (String zone : this.inner().zones()) { zones.add(AvailabilityZoneId.fromString(zone)); } } return Collections.unmodifiableSet(zones); } }
@Override public VirtualMachineScaleSetImpl withAvailabilityZone(AvailabilityZoneId zoneId) { // Note: Only for virtual machine scale set, new zone can be specified, hence // this option is available for both definition and update cases. // // if (this.inner().zones() == null) { this.inner().withZones(new ArrayList<String>()); } this.inner().zones().add(zoneId.toString()); return this; }
@Override public Set<AvailabilityZoneId> availabilityZones() { Set<AvailabilityZoneId> zones = new HashSet<>(); if (this.inner().zones() != null) { for (String zone : this.inner().zones()) { zones.add(AvailabilityZoneId.fromString(zone)); } } return Collections.unmodifiableSet(zones); }
@Override public PublicIPAddressImpl withAvailabilityZone(AvailabilityZoneId zoneId) { // Note: Zone is not updatable as of now, so this is available only during definition time. // Service return `ResourceAvailabilityZonesCannotBeModified` upon attempt to append a new // zone or remove one. Trying to remove the last one means attempt to change resource from // zonal to regional, which is not supported. // if (this.inner().zones() == null) { this.inner().withZones(new ArrayList<String>()); } this.inner().zones().add(zoneId.toString()); return this; }
@Override public Set<AvailabilityZoneId> availabilityZones() { Set<AvailabilityZoneId> zones = new HashSet<>(); if (this.inner().zones() != null) { for (String zone : this.inner().zones()) { zones.add(AvailabilityZoneId.fromString(zone)); } } return Collections.unmodifiableSet(zones); } }
@Override public PublicIPAddressImpl withAvailabilityZone(AvailabilityZoneId zoneId) { // Note: Zone is not updatable as of now, so this is available only during definition time. // Service return `ResourceAvailabilityZonesCannotBeModified` upon attempt to append a new // zone or remove one. Trying to remove the last one means attempt to change resource from // zonal to regional, which is not supported. // if (this.inner().zones() == null) { this.inner().withZones(new ArrayList<String>()); } this.inner().zones().add(zoneId.toString()); return this; }
@Override public Set<AvailabilityZoneId> availabilityZones() { Set<AvailabilityZoneId> zones = new TreeSet<>(); if (this.inner().zones() != null) { for (String zone : this.inner().zones()) { zones.add(AvailabilityZoneId.fromString(zone)); } } return Collections.unmodifiableSet(zones); }
@Override public LoadBalancerFrontendImpl withAvailabilityZone(AvailabilityZoneId zoneId) { // Note: Zone is not updatable as of now, so this is available only during definition time. // Service return `ResourceAvailabilityZonesCannotBeModified` upon attempt to append a new // zone or remove one. Trying to remove the last one means attempt to change resource from // zonal to regional, which is not supported. // // Zone is supported only for internal load balancer, hence exposed only for PrivateFrontEnd // if (this.inner().zones() == null) { this.inner().withZones(new ArrayList<String>()); } this.inner().zones().add(zoneId.toString()); return this; }
@Override public Set<AvailabilityZoneId> availabilityZones() { Set<AvailabilityZoneId> zones = new HashSet<>(); if (this.inner().zones() != null) { for (String zone : this.inner().zones()) { zones.add(AvailabilityZoneId.fromString(zone)); } } return Collections.unmodifiableSet(zones); }