All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.iot.v1.stub.GrpcDeviceManagerStub Maven / Gradle / Ivy

There is a newer version: 2.55.0
Show newest version
/*
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.iot.v1.stub;

import static com.google.cloud.iot.v1.DeviceManagerClient.ListDeviceRegistriesPagedResponse;
import static com.google.cloud.iot.v1.DeviceManagerClient.ListDevicesPagedResponse;

import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.iot.v1.BindDeviceToGatewayRequest;
import com.google.cloud.iot.v1.BindDeviceToGatewayResponse;
import com.google.cloud.iot.v1.CreateDeviceRegistryRequest;
import com.google.cloud.iot.v1.CreateDeviceRequest;
import com.google.cloud.iot.v1.DeleteDeviceRegistryRequest;
import com.google.cloud.iot.v1.DeleteDeviceRequest;
import com.google.cloud.iot.v1.Device;
import com.google.cloud.iot.v1.DeviceConfig;
import com.google.cloud.iot.v1.DeviceRegistry;
import com.google.cloud.iot.v1.GetDeviceRegistryRequest;
import com.google.cloud.iot.v1.GetDeviceRequest;
import com.google.cloud.iot.v1.ListDeviceConfigVersionsRequest;
import com.google.cloud.iot.v1.ListDeviceConfigVersionsResponse;
import com.google.cloud.iot.v1.ListDeviceRegistriesRequest;
import com.google.cloud.iot.v1.ListDeviceRegistriesResponse;
import com.google.cloud.iot.v1.ListDeviceStatesRequest;
import com.google.cloud.iot.v1.ListDeviceStatesResponse;
import com.google.cloud.iot.v1.ListDevicesRequest;
import com.google.cloud.iot.v1.ListDevicesResponse;
import com.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest;
import com.google.cloud.iot.v1.SendCommandToDeviceRequest;
import com.google.cloud.iot.v1.SendCommandToDeviceResponse;
import com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest;
import com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse;
import com.google.cloud.iot.v1.UpdateDeviceRegistryRequest;
import com.google.cloud.iot.v1.UpdateDeviceRequest;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * gRPC stub implementation for the DeviceManager service API.
 *
 * 

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") public class GrpcDeviceManagerStub extends DeviceManagerStub { private static final MethodDescriptor createDeviceRegistryMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/CreateDeviceRegistry") .setRequestMarshaller( ProtoUtils.marshaller(CreateDeviceRegistryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(DeviceRegistry.getDefaultInstance())) .build(); private static final MethodDescriptor getDeviceRegistryMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/GetDeviceRegistry") .setRequestMarshaller( ProtoUtils.marshaller(GetDeviceRegistryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(DeviceRegistry.getDefaultInstance())) .build(); private static final MethodDescriptor updateDeviceRegistryMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/UpdateDeviceRegistry") .setRequestMarshaller( ProtoUtils.marshaller(UpdateDeviceRegistryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(DeviceRegistry.getDefaultInstance())) .build(); private static final MethodDescriptor deleteDeviceRegistryMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/DeleteDeviceRegistry") .setRequestMarshaller( ProtoUtils.marshaller(DeleteDeviceRegistryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); private static final MethodDescriptor listDeviceRegistriesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/ListDeviceRegistries") .setRequestMarshaller( ProtoUtils.marshaller(ListDeviceRegistriesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListDeviceRegistriesResponse.getDefaultInstance())) .build(); private static final MethodDescriptor createDeviceMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/CreateDevice") .setRequestMarshaller(ProtoUtils.marshaller(CreateDeviceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Device.getDefaultInstance())) .build(); private static final MethodDescriptor getDeviceMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/GetDevice") .setRequestMarshaller(ProtoUtils.marshaller(GetDeviceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Device.getDefaultInstance())) .build(); private static final MethodDescriptor updateDeviceMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/UpdateDevice") .setRequestMarshaller(ProtoUtils.marshaller(UpdateDeviceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Device.getDefaultInstance())) .build(); private static final MethodDescriptor deleteDeviceMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/DeleteDevice") .setRequestMarshaller(ProtoUtils.marshaller(DeleteDeviceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); private static final MethodDescriptor listDevicesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/ListDevices") .setRequestMarshaller(ProtoUtils.marshaller(ListDevicesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListDevicesResponse.getDefaultInstance())) .build(); private static final MethodDescriptor modifyCloudToDeviceConfigMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/ModifyCloudToDeviceConfig") .setRequestMarshaller( ProtoUtils.marshaller(ModifyCloudToDeviceConfigRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(DeviceConfig.getDefaultInstance())) .build(); private static final MethodDescriptor< ListDeviceConfigVersionsRequest, ListDeviceConfigVersionsResponse> listDeviceConfigVersionsMethodDescriptor = MethodDescriptor .newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/ListDeviceConfigVersions") .setRequestMarshaller( ProtoUtils.marshaller(ListDeviceConfigVersionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListDeviceConfigVersionsResponse.getDefaultInstance())) .build(); private static final MethodDescriptor listDeviceStatesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/ListDeviceStates") .setRequestMarshaller( ProtoUtils.marshaller(ListDeviceStatesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListDeviceStatesResponse.getDefaultInstance())) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) .build(); private static final MethodDescriptor testIamPermissionsMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/TestIamPermissions") .setRequestMarshaller( ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) .build(); private static final MethodDescriptor sendCommandToDeviceMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/SendCommandToDevice") .setRequestMarshaller( ProtoUtils.marshaller(SendCommandToDeviceRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(SendCommandToDeviceResponse.getDefaultInstance())) .build(); private static final MethodDescriptor bindDeviceToGatewayMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/BindDeviceToGateway") .setRequestMarshaller( ProtoUtils.marshaller(BindDeviceToGatewayRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(BindDeviceToGatewayResponse.getDefaultInstance())) .build(); private static final MethodDescriptor< UnbindDeviceFromGatewayRequest, UnbindDeviceFromGatewayResponse> unbindDeviceFromGatewayMethodDescriptor = MethodDescriptor .newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.iot.v1.DeviceManager/UnbindDeviceFromGateway") .setRequestMarshaller( ProtoUtils.marshaller(UnbindDeviceFromGatewayRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(UnbindDeviceFromGatewayResponse.getDefaultInstance())) .build(); private final UnaryCallable createDeviceRegistryCallable; private final UnaryCallable getDeviceRegistryCallable; private final UnaryCallable updateDeviceRegistryCallable; private final UnaryCallable deleteDeviceRegistryCallable; private final UnaryCallable listDeviceRegistriesCallable; private final UnaryCallable listDeviceRegistriesPagedCallable; private final UnaryCallable createDeviceCallable; private final UnaryCallable getDeviceCallable; private final UnaryCallable updateDeviceCallable; private final UnaryCallable deleteDeviceCallable; private final UnaryCallable listDevicesCallable; private final UnaryCallable listDevicesPagedCallable; private final UnaryCallable modifyCloudToDeviceConfigCallable; private final UnaryCallable listDeviceConfigVersionsCallable; private final UnaryCallable listDeviceStatesCallable; private final UnaryCallable setIamPolicyCallable; private final UnaryCallable getIamPolicyCallable; private final UnaryCallable testIamPermissionsCallable; private final UnaryCallable sendCommandToDeviceCallable; private final UnaryCallable bindDeviceToGatewayCallable; private final UnaryCallable unbindDeviceFromGatewayCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcDeviceManagerStub create(DeviceManagerStubSettings settings) throws IOException { return new GrpcDeviceManagerStub(settings, ClientContext.create(settings)); } public static final GrpcDeviceManagerStub create(ClientContext clientContext) throws IOException { return new GrpcDeviceManagerStub(DeviceManagerStubSettings.newBuilder().build(), clientContext); } public static final GrpcDeviceManagerStub create( ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { return new GrpcDeviceManagerStub( DeviceManagerStubSettings.newBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of GrpcDeviceManagerStub, using the given settings. This is protected so * that it is easy to make a subclass, but otherwise, the static factory methods should be * preferred. */ protected GrpcDeviceManagerStub(DeviceManagerStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new GrpcDeviceManagerCallableFactory()); } /** * Constructs an instance of GrpcDeviceManagerStub, using the given settings. This is protected so * that it is easy to make a subclass, but otherwise, the static factory methods should be * preferred. */ protected GrpcDeviceManagerStub( DeviceManagerStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); GrpcCallSettings createDeviceRegistryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createDeviceRegistryMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getDeviceRegistryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getDeviceRegistryMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings updateDeviceRegistryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateDeviceRegistryMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "device_registry.name", String.valueOf(request.getDeviceRegistry().getName())); return builder.build(); }) .build(); GrpcCallSettings deleteDeviceRegistryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteDeviceRegistryMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listDeviceRegistriesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listDeviceRegistriesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings createDeviceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createDeviceMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getDeviceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getDeviceMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings updateDeviceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateDeviceMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("device.name", String.valueOf(request.getDevice().getName())); return builder.build(); }) .build(); GrpcCallSettings deleteDeviceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteDeviceMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listDevicesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listDevicesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings modifyCloudToDeviceConfigTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(modifyCloudToDeviceConfigMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listDeviceConfigVersionsTransportSettings = GrpcCallSettings .newBuilder() .setMethodDescriptor(listDeviceConfigVersionsMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listDeviceStatesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listDeviceStatesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setIamPolicyMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIamPolicyMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) .build(); GrpcCallSettings testIamPermissionsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(testIamPermissionsMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) .build(); GrpcCallSettings sendCommandToDeviceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(sendCommandToDeviceMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings bindDeviceToGatewayTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(bindDeviceToGatewayMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings unbindDeviceFromGatewayTransportSettings = GrpcCallSettings .newBuilder() .setMethodDescriptor(unbindDeviceFromGatewayMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); this.createDeviceRegistryCallable = callableFactory.createUnaryCallable( createDeviceRegistryTransportSettings, settings.createDeviceRegistrySettings(), clientContext); this.getDeviceRegistryCallable = callableFactory.createUnaryCallable( getDeviceRegistryTransportSettings, settings.getDeviceRegistrySettings(), clientContext); this.updateDeviceRegistryCallable = callableFactory.createUnaryCallable( updateDeviceRegistryTransportSettings, settings.updateDeviceRegistrySettings(), clientContext); this.deleteDeviceRegistryCallable = callableFactory.createUnaryCallable( deleteDeviceRegistryTransportSettings, settings.deleteDeviceRegistrySettings(), clientContext); this.listDeviceRegistriesCallable = callableFactory.createUnaryCallable( listDeviceRegistriesTransportSettings, settings.listDeviceRegistriesSettings(), clientContext); this.listDeviceRegistriesPagedCallable = callableFactory.createPagedCallable( listDeviceRegistriesTransportSettings, settings.listDeviceRegistriesSettings(), clientContext); this.createDeviceCallable = callableFactory.createUnaryCallable( createDeviceTransportSettings, settings.createDeviceSettings(), clientContext); this.getDeviceCallable = callableFactory.createUnaryCallable( getDeviceTransportSettings, settings.getDeviceSettings(), clientContext); this.updateDeviceCallable = callableFactory.createUnaryCallable( updateDeviceTransportSettings, settings.updateDeviceSettings(), clientContext); this.deleteDeviceCallable = callableFactory.createUnaryCallable( deleteDeviceTransportSettings, settings.deleteDeviceSettings(), clientContext); this.listDevicesCallable = callableFactory.createUnaryCallable( listDevicesTransportSettings, settings.listDevicesSettings(), clientContext); this.listDevicesPagedCallable = callableFactory.createPagedCallable( listDevicesTransportSettings, settings.listDevicesSettings(), clientContext); this.modifyCloudToDeviceConfigCallable = callableFactory.createUnaryCallable( modifyCloudToDeviceConfigTransportSettings, settings.modifyCloudToDeviceConfigSettings(), clientContext); this.listDeviceConfigVersionsCallable = callableFactory.createUnaryCallable( listDeviceConfigVersionsTransportSettings, settings.listDeviceConfigVersionsSettings(), clientContext); this.listDeviceStatesCallable = callableFactory.createUnaryCallable( listDeviceStatesTransportSettings, settings.listDeviceStatesSettings(), clientContext); this.setIamPolicyCallable = callableFactory.createUnaryCallable( setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); this.getIamPolicyCallable = callableFactory.createUnaryCallable( getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); this.testIamPermissionsCallable = callableFactory.createUnaryCallable( testIamPermissionsTransportSettings, settings.testIamPermissionsSettings(), clientContext); this.sendCommandToDeviceCallable = callableFactory.createUnaryCallable( sendCommandToDeviceTransportSettings, settings.sendCommandToDeviceSettings(), clientContext); this.bindDeviceToGatewayCallable = callableFactory.createUnaryCallable( bindDeviceToGatewayTransportSettings, settings.bindDeviceToGatewaySettings(), clientContext); this.unbindDeviceFromGatewayCallable = callableFactory.createUnaryCallable( unbindDeviceFromGatewayTransportSettings, settings.unbindDeviceFromGatewaySettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } public GrpcOperationsStub getOperationsStub() { return operationsStub; } @Override public UnaryCallable createDeviceRegistryCallable() { return createDeviceRegistryCallable; } @Override public UnaryCallable getDeviceRegistryCallable() { return getDeviceRegistryCallable; } @Override public UnaryCallable updateDeviceRegistryCallable() { return updateDeviceRegistryCallable; } @Override public UnaryCallable deleteDeviceRegistryCallable() { return deleteDeviceRegistryCallable; } @Override public UnaryCallable listDeviceRegistriesCallable() { return listDeviceRegistriesCallable; } @Override public UnaryCallable listDeviceRegistriesPagedCallable() { return listDeviceRegistriesPagedCallable; } @Override public UnaryCallable createDeviceCallable() { return createDeviceCallable; } @Override public UnaryCallable getDeviceCallable() { return getDeviceCallable; } @Override public UnaryCallable updateDeviceCallable() { return updateDeviceCallable; } @Override public UnaryCallable deleteDeviceCallable() { return deleteDeviceCallable; } @Override public UnaryCallable listDevicesCallable() { return listDevicesCallable; } @Override public UnaryCallable listDevicesPagedCallable() { return listDevicesPagedCallable; } @Override public UnaryCallable modifyCloudToDeviceConfigCallable() { return modifyCloudToDeviceConfigCallable; } @Override public UnaryCallable listDeviceConfigVersionsCallable() { return listDeviceConfigVersionsCallable; } @Override public UnaryCallable listDeviceStatesCallable() { return listDeviceStatesCallable; } @Override public UnaryCallable setIamPolicyCallable() { return setIamPolicyCallable; } @Override public UnaryCallable getIamPolicyCallable() { return getIamPolicyCallable; } @Override public UnaryCallable testIamPermissionsCallable() { return testIamPermissionsCallable; } @Override public UnaryCallable sendCommandToDeviceCallable() { return sendCommandToDeviceCallable; } @Override public UnaryCallable bindDeviceToGatewayCallable() { return bindDeviceToGatewayCallable; } @Override public UnaryCallable unbindDeviceFromGatewayCallable() { return unbindDeviceFromGatewayCallable; } @Override public final void close() { try { backgroundResources.close(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new IllegalStateException("Failed to close resource", e); } } @Override public void shutdown() { backgroundResources.shutdown(); } @Override public boolean isShutdown() { return backgroundResources.isShutdown(); } @Override public boolean isTerminated() { return backgroundResources.isTerminated(); } @Override public void shutdownNow() { backgroundResources.shutdownNow(); } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return backgroundResources.awaitTermination(duration, unit); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy