@Test public void testGetAddresses() { Address addr1 = new Address(Ip.parse("1.2.3.4"), "i-1234", Ip.parse("4.3.2.1"), "alloc-1"); Address addr2 = new Address(Ip.parse("11.22.33.44"), null, null, "alloc-2"); Region region = Region.builder("r1") .setAddresses(ImmutableMap.of("1.2.3.4", addr1, "11.22.33.44", addr2)) .build(); assertThat(region.getAddresses(), equalTo(ImmutableSet.of(addr1, addr2))); }
@Nonnull public Set<Address> getAddresses() { return ImmutableSet.copyOf(_addresses.values()); }
Region implements Serializable { @Nonnull public Set<Address> getAddresses() { return ImmutableSet.copyOf(_addresses.values()); } }
Region implements Serializable { @Nonnull public Set<Address> getAddresses() { return ImmutableSet.copyOf(_addresses.values()); } Region(String name); private  Region(
      String name,
      Map<String, Address> addresses,
      Map<String, CustomerGateway> customerGateways,
      Map<String, ElasticsearchDomain> elasticsearchDomains,
      Map<String, Instance> instances,
      Map<String, InternetGateway> internetGateways,
      Map<String, LoadBalancer> loadBalancers,
      Map<String, LoadBalancerAttributes> loadBalancerAttributes,
      Map<String, LoadBalancerListener> loadBalancerListeners,
      Map<String, LoadBalancerTargetHealth> loadBalancerTargetHealths,
      Map<String, NatGateway> natGateways,
      Map<String, NetworkAcl> networkAcls,
      Map<String, NetworkInterface> networkInterfaces,
      Map<String, PrefixList> prefixLists,
      Map<String, RdsInstance> rdsInstances,
      Map<String, RouteTable> routeTables,
      Map<String, SecurityGroup> securityGroups,
      Map<String, Subnet> subnets,
      Map<String, TargetGroup> targetGroups,
      Map<String, TransitGatewayAttachment> transitGatewayAttachments,
      Map<String, TransitGatewayPropagations> transitGatewayPropagations,
      Map<String, TransitGatewayRouteTable> transitGatewayRouteTables,
      Map<String, TransitGatewayStaticRoutes> transitGatewayStaticRoutes,
      Map<String, TransitGatewayVpcAttachment> transitGatewayVpcAttachments,
      Map<String, TransitGateway> transitGateways,
      Map<String, VpcEndpoint> vpcEndpoints,
      Map<String, VpcPeeringConnection> vpcPeerings,
      Map<String, Vpc> vpcs,
      Map<String, VpnConnection> vpnConnections,
      Map<String, VpnGateway> vpnGateways); }
Region implements Serializable { @Nonnull public Set<Address> getAddresses() { return ImmutableSet.copyOf(_addresses.values()); } Region(String name); private  Region(
      String name,
      Map<String, Address> addresses,
      Map<String, CustomerGateway> customerGateways,
      Map<String, ElasticsearchDomain> elasticsearchDomains,
      Map<String, Instance> instances,
      Map<String, InternetGateway> internetGateways,
      Map<String, LoadBalancer> loadBalancers,
      Map<String, LoadBalancerAttributes> loadBalancerAttributes,
      Map<String, LoadBalancerListener> loadBalancerListeners,
      Map<String, LoadBalancerTargetHealth> loadBalancerTargetHealths,
      Map<String, NatGateway> natGateways,
      Map<String, NetworkAcl> networkAcls,
      Map<String, NetworkInterface> networkInterfaces,
      Map<String, PrefixList> prefixLists,
      Map<String, RdsInstance> rdsInstances,
      Map<String, RouteTable> routeTables,
      Map<String, SecurityGroup> securityGroups,
      Map<String, Subnet> subnets,
      Map<String, TargetGroup> targetGroups,
      Map<String, TransitGatewayAttachment> transitGatewayAttachments,
      Map<String, TransitGatewayPropagations> transitGatewayPropagations,
      Map<String, TransitGatewayRouteTable> transitGatewayRouteTables,
      Map<String, TransitGatewayStaticRoutes> transitGatewayStaticRoutes,
      Map<String, TransitGatewayVpcAttachment> transitGatewayVpcAttachments,
      Map<String, TransitGateway> transitGateways,
      Map<String, VpcEndpoint> vpcEndpoints,
      Map<String, VpcPeeringConnection> vpcPeerings,
      Map<String, Vpc> vpcs,
      Map<String, VpnConnection> vpnConnections,
      Map<String, VpnGateway> vpnGateways); static RegionBuilder builder(String name); @Nonnull Set<Address> getAddresses(); @Nonnull Map<String, Instance> getInstances(); @Nonnull Set<LoadBalancer> getLoadBalancers(); @Nullable LoadBalancerListener getLoadBalancerListener(String loadBalancerArn); @Nullable LoadBalancerTargetHealth getLoadBalancerTargetHealth(String targetGroupArn); @Nonnull String getName(); @Nonnull Map<String, NetworkAcl> getNetworkAcls(); @Nonnull Map<String, PrefixList> getPrefixLists(); @Nonnull Map<String, NetworkInterface> getNetworkInterfaces(); @Nonnull Map<String, SecurityGroup> getSecurityGroups(); @Nonnull Map<String, Subnet> getSubnets(); @Nullable TargetGroup getTargetGroup(String targetGroupArn); @Nonnull Map<String, VpcEndpoint> getVpcEndpoints(); void applyAclsToInterfaceBasedOnSecurityGroups(
      Iterable<String> groups, Configuration c, Interface i); }
Region implements Serializable { @Nonnull public Set<Address> getAddresses() { return ImmutableSet.copyOf(_addresses.values()); } Region(String name); private  Region(
      String name,
      Map<String, Address> addresses,
      Map<String, CustomerGateway> customerGateways,
      Map<String, ElasticsearchDomain> elasticsearchDomains,
      Map<String, Instance> instances,
      Map<String, InternetGateway> internetGateways,
      Map<String, LoadBalancer> loadBalancers,
      Map<String, LoadBalancerAttributes> loadBalancerAttributes,
      Map<String, LoadBalancerListener> loadBalancerListeners,
      Map<String, LoadBalancerTargetHealth> loadBalancerTargetHealths,
      Map<String, NatGateway> natGateways,
      Map<String, NetworkAcl> networkAcls,
      Map<String, NetworkInterface> networkInterfaces,
      Map<String, PrefixList> prefixLists,
      Map<String, RdsInstance> rdsInstances,
      Map<String, RouteTable> routeTables,
      Map<String, SecurityGroup> securityGroups,
      Map<String, Subnet> subnets,
      Map<String, TargetGroup> targetGroups,
      Map<String, TransitGatewayAttachment> transitGatewayAttachments,
      Map<String, TransitGatewayPropagations> transitGatewayPropagations,
      Map<String, TransitGatewayRouteTable> transitGatewayRouteTables,
      Map<String, TransitGatewayStaticRoutes> transitGatewayStaticRoutes,
      Map<String, TransitGatewayVpcAttachment> transitGatewayVpcAttachments,
      Map<String, TransitGateway> transitGateways,
      Map<String, VpcEndpoint> vpcEndpoints,
      Map<String, VpcPeeringConnection> vpcPeerings,
      Map<String, Vpc> vpcs,
      Map<String, VpnConnection> vpnConnections,
      Map<String, VpnGateway> vpnGateways); static RegionBuilder builder(String name); @Nonnull Set<Address> getAddresses(); @Nonnull Map<String, Instance> getInstances(); @Nonnull Set<LoadBalancer> getLoadBalancers(); @Nullable LoadBalancerListener getLoadBalancerListener(String loadBalancerArn); @Nullable LoadBalancerTargetHealth getLoadBalancerTargetHealth(String targetGroupArn); @Nonnull String getName(); @Nonnull Map<String, NetworkAcl> getNetworkAcls(); @Nonnull Map<String, PrefixList> getPrefixLists(); @Nonnull Map<String, NetworkInterface> getNetworkInterfaces(); @Nonnull Map<String, SecurityGroup> getSecurityGroups(); @Nonnull Map<String, Subnet> getSubnets(); @Nullable TargetGroup getTargetGroup(String targetGroupArn); @Nonnull Map<String, VpcEndpoint> getVpcEndpoints(); void applyAclsToInterfaceBasedOnSecurityGroups(
      Iterable<String> groups, Configuration c, Interface i);  }