public static List<String> toStringList(List<ProjectName> values) { List<String> list = new ArrayList<String>(values.size()); for (ProjectName value : values) { if (value == null) { list.add(""); } else { list.add(value.toString()); } } return list; }
public static String format(String project) { return newBuilder().setProject(project).build().toString(); }
/** * Lists the supported instance configurations for a given project. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * ProjectName parent = ProjectName.of("[PROJECT]"); * for (InstanceConfig element : instanceAdminClient.listInstanceConfigs(parent).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param parent Required. The name of the project for which a list of supported instance * configurations is requested. Values are of the form `projects/<project>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstanceConfigsPagedResponse listInstanceConfigs(ProjectName parent) { ListInstanceConfigsRequest request = ListInstanceConfigsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listInstanceConfigs(request); }
/** * Lists all instances in the given project. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * ProjectName parent = ProjectName.of("[PROJECT]"); * for (Instance element : instanceAdminClient.listInstances(parent).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param parent Required. The name of the project for which a list of instances is requested. * Values are of the form `projects/<project>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstancesPagedResponse listInstances(ProjectName parent) { ListInstancesRequest request = ListInstancesRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listInstances(request); }
.setParent(parent == null ? null : parent.toString()) .setInstanceId(instanceId == null ? null : instanceId.toString()) .setInstance(instance)
public static List<String> toStringList(List<ProjectName> values) { List<String> list = new ArrayList<String>(values.size()); for (ProjectName value : values) { if (value == null) { list.add(""); } else { list.add(value.toString()); } } return list; }
public static String format(String project) { return newBuilder().setProject(project).build().toString(); }
/** * Lists the supported instance configurations for a given project. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * ProjectName parent = ProjectName.of("[PROJECT]"); * for (InstanceConfig element : instanceAdminClient.listInstanceConfigs(parent).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param parent Required. The name of the project for which a list of supported instance * configurations is requested. Values are of the form `projects/<project>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstanceConfigsPagedResponse listInstanceConfigs(ProjectName parent) { ListInstanceConfigsRequest request = ListInstanceConfigsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listInstanceConfigs(request); }
/** * Lists all instances in the given project. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * ProjectName parent = ProjectName.of("[PROJECT]"); * for (Instance element : instanceAdminClient.listInstances(parent).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param parent Required. The name of the project for which a list of instances is requested. * Values are of the form `projects/<project>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstancesPagedResponse listInstances(ProjectName parent) { ListInstancesRequest request = ListInstancesRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listInstances(request); }
.setParent(parent == null ? null : parent.toString()) .setInstanceId(instanceId == null ? null : instanceId.toString()) .setInstance(instance)