@Override public ServerWithSecurityGroups deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { Server server = context.deserialize(jsonElement, Server.class); ServerWithSecurityGroups.Builder<?> result = ServerWithSecurityGroups.builder().fromServer(server); Set<String> names = Sets.newLinkedHashSet(); if (jsonElement.getAsJsonObject().get("security_groups") != null) { JsonArray x = jsonElement.getAsJsonObject().get("security_groups").getAsJsonArray(); for (JsonElement y : x) { names.add(y.getAsJsonObject().get("name").getAsString()); } result.securityGroupNames(names); } return result.build(); } }
/** * @see ServerWithSecurityGroups#getSecurityGroupNames() */ public T securityGroupNames(Set<String> securityGroupNames) { this.securityGroupNames = ImmutableSet.copyOf(checkNotNull(securityGroupNames, "securityGroupNames")); return self(); }
@Override public ServerWithSecurityGroups deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { Server server = context.deserialize(jsonElement, Server.class); ServerWithSecurityGroups.Builder<?> result = ServerWithSecurityGroups.builder().fromServer(server); Set<String> names = Sets.newLinkedHashSet(); if (jsonElement.getAsJsonObject().get("security_groups") != null) { JsonArray x = jsonElement.getAsJsonObject().get("security_groups").getAsJsonArray(); for (JsonElement y : x) { names.add(y.getAsJsonObject().get("name").getAsString()); } result.securityGroupNames(names); } return result.build(); } }
@Override public ServerWithSecurityGroups deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { Server server = context.deserialize(jsonElement, Server.class); ServerWithSecurityGroups.Builder<?> result = ServerWithSecurityGroups.builder().fromServer(server); Set<String> names = Sets.newLinkedHashSet(); if (jsonElement.getAsJsonObject().get("security_groups") != null) { JsonArray x = jsonElement.getAsJsonObject().get("security_groups").getAsJsonArray(); for (JsonElement y : x) { names.add(y.getAsJsonObject().get("name").getAsString()); } result.securityGroupNames(names); } return result.build(); } }
@Override public ServerWithSecurityGroups deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { Server server = context.deserialize(jsonElement, Server.class); ServerWithSecurityGroups.Builder<?> result = ServerWithSecurityGroups.builder().fromServer(server); Set<String> names = Sets.newLinkedHashSet(); if (jsonElement.getAsJsonObject().get("security_groups") != null) { JsonArray x = jsonElement.getAsJsonObject().get("security_groups").getAsJsonArray(); for (JsonElement y : x) { names.add(y.getAsJsonObject().get("name").getAsString()); } result.securityGroupNames(names); } return result.build(); } }
public T securityGroupNames(String... in) { return securityGroupNames(ImmutableSet.copyOf(in)); }
@Override public ServerWithSecurityGroups deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { Server server = context.deserialize(jsonElement, Server.class); ServerWithSecurityGroups.Builder<?> result = ServerWithSecurityGroups.builder().fromServer(server); Set<String> names = Sets.newLinkedHashSet(); if (jsonElement.getAsJsonObject().get("security_groups") != null) { JsonArray x = jsonElement.getAsJsonObject().get("security_groups").getAsJsonArray(); for (JsonElement y : x) { names.add(y.getAsJsonObject().get("name").getAsString()); } result.securityGroupNames(names); } return result.build(); } }
public T securityGroupNames(String... in) { return securityGroupNames(ImmutableSet.copyOf(in)); }
public T securityGroupNames(String... in) { return securityGroupNames(ImmutableSet.copyOf(in)); }
public T securityGroupNames(String... in) { return securityGroupNames(ImmutableSet.copyOf(in)); }
@Override public ServerWithSecurityGroups deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { Server server = context.deserialize(jsonElement, Server.class); ServerWithSecurityGroups.Builder<?> result = ServerWithSecurityGroups.builder().fromServer(server); Set<String> names = Sets.newLinkedHashSet(); if (jsonElement.getAsJsonObject().get("security_groups") != null) { JsonArray x = jsonElement.getAsJsonObject().get("security_groups").getAsJsonArray(); for (JsonElement y : x) { names.add(y.getAsJsonObject().get("name").getAsString()); } result.securityGroupNames(names); } return result.build(); } }
public T securityGroupNames(String... in) { return securityGroupNames(ImmutableSet.copyOf(in)); }
public T securityGroupNames(String... in) { return securityGroupNames(ImmutableSet.copyOf(in)); }
public T fromServerWithSecurityGroups(ServerWithSecurityGroups in) { return super.fromServer(in) .securityGroupNames(in.getSecurityGroupNames()); } }
public T fromServerWithSecurityGroups(ServerWithSecurityGroups in) { return super.fromServer(in) .securityGroupNames(in.getSecurityGroupNames()); } }
/** * @see ServerWithSecurityGroups#getSecurityGroupNames() */ public T securityGroupNames(Set<String> securityGroupNames) { this.securityGroupNames = ImmutableSet.copyOf(checkNotNull(securityGroupNames, "securityGroupNames")); return self(); }
/** * @see ServerWithSecurityGroups#getSecurityGroupNames() */ public T securityGroupNames(Set<String> securityGroupNames) { this.securityGroupNames = ImmutableSet.copyOf(checkNotNull(securityGroupNames, "securityGroupNames")); return self(); }
public T fromServerWithSecurityGroups(ServerWithSecurityGroups in) { return super.fromServer(in) .securityGroupNames(in.getSecurityGroupNames()); } }
/** * @see ServerWithSecurityGroups#getSecurityGroupNames() */ public T securityGroupNames(Set<String> securityGroupNames) { this.securityGroupNames = ImmutableSet.copyOf(checkNotNull(securityGroupNames, "securityGroupNames")); return self(); }
public T fromServerWithSecurityGroups(ServerWithSecurityGroups in) { return super.fromServer(in) .securityGroupNames(in.getSecurityGroupNames()); } }