@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@Override public ListDevicesRequest injectPageSize(ListDevicesRequest payload, int pageSize) { return ListDevicesRequest.newBuilder(payload).setPageSize(pageSize).build(); }
@Override public ListDevicesRequest injectToken(ListDevicesRequest payload, String token) { return ListDevicesRequest.newBuilder(payload).setPageToken(token).build(); }
/** * List devices in a device registry. * * <p>Sample code: * * <pre><code> * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) { * RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]"); * for (Device element : deviceManagerClient.listDevices(parent.toString()).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param parent The device registry path. Required. For example, * `projects/my-project/locations/us-central1/registries/my-registry`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDevicesPagedResponse listDevices(String parent) { ListDevicesRequest request = ListDevicesRequest.newBuilder().setParent(parent).build(); return listDevices(request); }
/** * List devices in a device registry. * * <p>Sample code: * * <pre><code> * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) { * RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]"); * for (Device element : deviceManagerClient.listDevices(parent).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param parent The device registry path. Required. For example, * `projects/my-project/locations/us-central1/registries/my-registry`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDevicesPagedResponse listDevices(RegistryName parent) { ListDevicesRequest request = ListDevicesRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listDevices(request); }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }