diff --git a/google-api-grpc/grpc-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceManagerGrpc.java b/google-api-grpc/grpc-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceManagerGrpc.java index 1a5f4b448423..49eafd03e626 100644 --- a/google-api-grpc/grpc-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceManagerGrpc.java +++ b/google-api-grpc/grpc-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceManagerGrpc.java @@ -17,8 +17,7 @@ /** *
- * Internet of things (IoT) service. Allows to manipulate device registry - * instances and the registration of devices (Things) to the cloud. + * Internet of Things (IoT) service. Securely connect and manage IoT devices. **/ @javax.annotation.Generated( @@ -623,6 +622,117 @@ com.google.iam.v1.TestIamPermissionsResponse> getTestIamPermissionsMethodHelper( } return getTestIamPermissionsMethod; } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getSendCommandToDeviceMethod()} instead. + public static final io.grpc.MethodDescriptor
- * Internet of things (IoT) service. Allows to manipulate device registry
- * instances and the registration of devices (Things) to the cloud.
+ * Internet of Things (IoT) service. Securely connect and manage IoT devices.
*
*/
public static abstract class DeviceManagerImplBase implements io.grpc.BindableService {
@@ -824,6 +933,48 @@ public void testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest reque
asyncUnimplementedUnaryCall(getTestIamPermissionsMethodHelper(), responseObserver);
}
+ /**
+ *
+ * Sends a command to the specified device. In order for a device to be able
+ * to receive commands, it must:
+ * 1) be connected to Cloud IoT Core using the MQTT protocol, and
+ * 2) be subscribed to the group of MQTT topics specified by
+ * /devices/{device-id}/commands/#. This subscription will receive commands
+ * at the top-level topic /devices/{device-id}/commands as well as commands
+ * for subfolders, like /devices/{device-id}/commands/subfolder.
+ * Note that subscribing to specific subfolders is not supported.
+ * If the command could not be delivered to the device, this method will
+ * return an error; in particular, if the device is not subscribed, this
+ * method will return FAILED_PRECONDITION. Otherwise, this method will
+ * return OK. If the subscription is QoS 1, at least once delivery will be
+ * guaranteed; for QoS 0, no acknowledgment will be expected from the device.
+ *
+ */
+ public void sendCommandToDevice(com.google.cloud.iot.v1.SendCommandToDeviceRequest request,
+ io.grpc.stub.StreamObserver+ * Associates the device with the gateway. + *+ */ + public void bindDeviceToGateway(com.google.cloud.iot.v1.BindDeviceToGatewayRequest request, + io.grpc.stub.StreamObserver
+ * Deletes the association between the device and the gateway. + *+ */ + public void unbindDeviceFromGateway(com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest request, + io.grpc.stub.StreamObserver
- * Internet of things (IoT) service. Allows to manipulate device registry
- * instances and the registration of devices (Things) to the cloud.
+ * Internet of Things (IoT) service. Securely connect and manage IoT devices.
*
*/
public static final class DeviceManagerStub extends io.grpc.stub.AbstractStub
+ * Sends a command to the specified device. In order for a device to be able
+ * to receive commands, it must:
+ * 1) be connected to Cloud IoT Core using the MQTT protocol, and
+ * 2) be subscribed to the group of MQTT topics specified by
+ * /devices/{device-id}/commands/#. This subscription will receive commands
+ * at the top-level topic /devices/{device-id}/commands as well as commands
+ * for subfolders, like /devices/{device-id}/commands/subfolder.
+ * Note that subscribing to specific subfolders is not supported.
+ * If the command could not be delivered to the device, this method will
+ * return an error; in particular, if the device is not subscribed, this
+ * method will return FAILED_PRECONDITION. Otherwise, this method will
+ * return OK. If the subscription is QoS 1, at least once delivery will be
+ * guaranteed; for QoS 0, no acknowledgment will be expected from the device.
+ *
+ */
+ public void sendCommandToDevice(com.google.cloud.iot.v1.SendCommandToDeviceRequest request,
+ io.grpc.stub.StreamObserver+ * Associates the device with the gateway. + *+ */ + public void bindDeviceToGateway(com.google.cloud.iot.v1.BindDeviceToGatewayRequest request, + io.grpc.stub.StreamObserver
+ * Deletes the association between the device and the gateway. + *+ */ + public void unbindDeviceFromGateway(com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest request, + io.grpc.stub.StreamObserver
- * Internet of things (IoT) service. Allows to manipulate device registry
- * instances and the registration of devices (Things) to the cloud.
+ * Internet of Things (IoT) service. Securely connect and manage IoT devices.
*
*/
public static final class DeviceManagerBlockingStub extends io.grpc.stub.AbstractStub
+ * Sends a command to the specified device. In order for a device to be able
+ * to receive commands, it must:
+ * 1) be connected to Cloud IoT Core using the MQTT protocol, and
+ * 2) be subscribed to the group of MQTT topics specified by
+ * /devices/{device-id}/commands/#. This subscription will receive commands
+ * at the top-level topic /devices/{device-id}/commands as well as commands
+ * for subfolders, like /devices/{device-id}/commands/subfolder.
+ * Note that subscribing to specific subfolders is not supported.
+ * If the command could not be delivered to the device, this method will
+ * return an error; in particular, if the device is not subscribed, this
+ * method will return FAILED_PRECONDITION. Otherwise, this method will
+ * return OK. If the subscription is QoS 1, at least once delivery will be
+ * guaranteed; for QoS 0, no acknowledgment will be expected from the device.
+ *
+ */
+ public com.google.cloud.iot.v1.SendCommandToDeviceResponse sendCommandToDevice(com.google.cloud.iot.v1.SendCommandToDeviceRequest request) {
+ return blockingUnaryCall(
+ getChannel(), getSendCommandToDeviceMethodHelper(), getCallOptions(), request);
+ }
+
+ /**
+ * + * Associates the device with the gateway. + *+ */ + public com.google.cloud.iot.v1.BindDeviceToGatewayResponse bindDeviceToGateway(com.google.cloud.iot.v1.BindDeviceToGatewayRequest request) { + return blockingUnaryCall( + getChannel(), getBindDeviceToGatewayMethodHelper(), getCallOptions(), request); + } + + /** + *
+ * Deletes the association between the device and the gateway. + *+ */ + public com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse unbindDeviceFromGateway(com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest request) { + return blockingUnaryCall( + getChannel(), getUnbindDeviceFromGatewayMethodHelper(), getCallOptions(), request); + } } /** *
- * Internet of things (IoT) service. Allows to manipulate device registry
- * instances and the registration of devices (Things) to the cloud.
+ * Internet of Things (IoT) service. Securely connect and manage IoT devices.
*
*/
public static final class DeviceManagerFutureStub extends io.grpc.stub.AbstractStub+ * Associates the device with the gateway. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Deletes the association between the device and the gateway. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Request for `BindDeviceToGateway`. + *+ * + * Protobuf type {@code google.cloud.iot.v1.BindDeviceToGatewayRequest} + */ +public final class BindDeviceToGatewayRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.BindDeviceToGatewayRequest) + BindDeviceToGatewayRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BindDeviceToGatewayRequest.newBuilder() to construct. + private BindDeviceToGatewayRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private BindDeviceToGatewayRequest() { + parent_ = ""; + gatewayId_ = ""; + deviceId_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BindDeviceToGatewayRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + gatewayId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + deviceId_ = s; + break; + } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_BindDeviceToGatewayRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_BindDeviceToGatewayRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.iot.v1.BindDeviceToGatewayRequest.class, com.google.cloud.iot.v1.BindDeviceToGatewayRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+ * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + *+ * + *
string parent = 1;
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ * + * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + *+ * + *
string parent = 1;
+ */
+ public com.google.protobuf.ByteString
+ getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int GATEWAY_ID_FIELD_NUMBER = 2;
+ private volatile java.lang.Object gatewayId_;
+ /**
+ * + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + *+ * + *
string gateway_id = 2;
+ */
+ public java.lang.String getGatewayId() {
+ java.lang.Object ref = gatewayId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ gatewayId_ = s;
+ return s;
+ }
+ }
+ /**
+ * + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + *+ * + *
string gateway_id = 2;
+ */
+ public com.google.protobuf.ByteString
+ getGatewayIdBytes() {
+ java.lang.Object ref = gatewayId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ gatewayId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DEVICE_ID_FIELD_NUMBER = 3;
+ private volatile java.lang.Object deviceId_;
+ /**
+ * + * The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + *+ * + *
string device_id = 3;
+ */
+ public java.lang.String getDeviceId() {
+ java.lang.Object ref = deviceId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ deviceId_ = s;
+ return s;
+ }
+ }
+ /**
+ * + * The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + *+ * + *
string device_id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getDeviceIdBytes() {
+ java.lang.Object ref = deviceId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ deviceId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (!getGatewayIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gatewayId_);
+ }
+ if (!getDeviceIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceId_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (!getGatewayIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gatewayId_);
+ }
+ if (!getDeviceIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceId_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.iot.v1.BindDeviceToGatewayRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.iot.v1.BindDeviceToGatewayRequest other = (com.google.cloud.iot.v1.BindDeviceToGatewayRequest) obj;
+
+ boolean result = true;
+ result = result && getParent()
+ .equals(other.getParent());
+ result = result && getGatewayId()
+ .equals(other.getGatewayId());
+ result = result && getDeviceId()
+ .equals(other.getDeviceId());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ hash = (37 * hash) + GATEWAY_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getGatewayId().hashCode();
+ hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getDeviceId().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.iot.v1.BindDeviceToGatewayRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * + * Request for `BindDeviceToGateway`. + *+ * + * Protobuf type {@code google.cloud.iot.v1.BindDeviceToGatewayRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + *+ * + *
string parent = 1;
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * + * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + *+ * + *
string parent = 1;
+ */
+ public com.google.protobuf.ByteString
+ getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * + * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + *+ * + *
string parent = 1;
+ */
+ public Builder setParent(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + *+ * + *
string parent = 1;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + *+ * + *
string parent = 1;
+ */
+ public Builder setParentBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object gatewayId_ = "";
+ /**
+ * + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + *+ * + *
string gateway_id = 2;
+ */
+ public java.lang.String getGatewayId() {
+ java.lang.Object ref = gatewayId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ gatewayId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + *+ * + *
string gateway_id = 2;
+ */
+ public com.google.protobuf.ByteString
+ getGatewayIdBytes() {
+ java.lang.Object ref = gatewayId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ gatewayId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + *+ * + *
string gateway_id = 2;
+ */
+ public Builder setGatewayId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ gatewayId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + *+ * + *
string gateway_id = 2;
+ */
+ public Builder clearGatewayId() {
+
+ gatewayId_ = getDefaultInstance().getGatewayId();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + *+ * + *
string gateway_id = 2;
+ */
+ public Builder setGatewayIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ gatewayId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object deviceId_ = "";
+ /**
+ * + * The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + *+ * + *
string device_id = 3;
+ */
+ public java.lang.String getDeviceId() {
+ java.lang.Object ref = deviceId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ deviceId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * + * The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + *+ * + *
string device_id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getDeviceIdBytes() {
+ java.lang.Object ref = deviceId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ deviceId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * + * The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + *+ * + *
string device_id = 3;
+ */
+ public Builder setDeviceId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ deviceId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + *+ * + *
string device_id = 3;
+ */
+ public Builder clearDeviceId() {
+
+ deviceId_ = getDefaultInstance().getDeviceId();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + *+ * + *
string device_id = 3;
+ */
+ public Builder setDeviceIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ deviceId_ = value;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.iot.v1.BindDeviceToGatewayRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.iot.v1.BindDeviceToGatewayRequest)
+ private static final com.google.cloud.iot.v1.BindDeviceToGatewayRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.iot.v1.BindDeviceToGatewayRequest();
+ }
+
+ public static com.google.cloud.iot.v1.BindDeviceToGatewayRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + *+ * + *
string parent = 1;
+ */
+ java.lang.String getParent();
+ /**
+ * + * The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + *+ * + *
string parent = 1;
+ */
+ com.google.protobuf.ByteString
+ getParentBytes();
+
+ /**
+ * + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + *+ * + *
string gateway_id = 2;
+ */
+ java.lang.String getGatewayId();
+ /**
+ * + * The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + *+ * + *
string gateway_id = 2;
+ */
+ com.google.protobuf.ByteString
+ getGatewayIdBytes();
+
+ /**
+ * + * The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + *+ * + *
string device_id = 3;
+ */
+ java.lang.String getDeviceId();
+ /**
+ * + * The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + *+ * + *
string device_id = 3;
+ */
+ com.google.protobuf.ByteString
+ getDeviceIdBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/BindDeviceToGatewayResponse.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/BindDeviceToGatewayResponse.java
new file mode 100644
index 000000000000..6ffd878d6fa4
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/BindDeviceToGatewayResponse.java
@@ -0,0 +1,421 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/device_manager.proto
+
+package com.google.cloud.iot.v1;
+
+/**
+ * + * Response for `BindDeviceToGateway`. + *+ * + * Protobuf type {@code google.cloud.iot.v1.BindDeviceToGatewayResponse} + */ +public final class BindDeviceToGatewayResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.BindDeviceToGatewayResponse) + BindDeviceToGatewayResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BindDeviceToGatewayResponse.newBuilder() to construct. + private BindDeviceToGatewayResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private BindDeviceToGatewayResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BindDeviceToGatewayResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_BindDeviceToGatewayResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_BindDeviceToGatewayResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.iot.v1.BindDeviceToGatewayResponse.class, com.google.cloud.iot.v1.BindDeviceToGatewayResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.iot.v1.BindDeviceToGatewayResponse)) { + return super.equals(obj); + } + com.google.cloud.iot.v1.BindDeviceToGatewayResponse other = (com.google.cloud.iot.v1.BindDeviceToGatewayResponse) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.iot.v1.BindDeviceToGatewayResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.iot.v1.BindDeviceToGatewayResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.iot.v1.BindDeviceToGatewayResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.iot.v1.BindDeviceToGatewayResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.iot.v1.BindDeviceToGatewayResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.iot.v1.BindDeviceToGatewayResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.iot.v1.BindDeviceToGatewayResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.iot.v1.BindDeviceToGatewayResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.iot.v1.BindDeviceToGatewayResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.iot.v1.BindDeviceToGatewayResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.iot.v1.BindDeviceToGatewayResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.iot.v1.BindDeviceToGatewayResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.iot.v1.BindDeviceToGatewayResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+ * Response for `BindDeviceToGateway`. + *+ * + * Protobuf type {@code google.cloud.iot.v1.BindDeviceToGatewayResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -161,7 +161,7 @@ public boolean hasDevice() {
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -173,7 +173,7 @@ public com.google.cloud.iot.v1.Device getDevice() {
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -625,7 +625,7 @@ public Builder setParentBytes(
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -637,7 +637,7 @@ public boolean hasDevice() {
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -653,7 +653,7 @@ public com.google.cloud.iot.v1.Device getDevice() {
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -675,7 +675,7 @@ public Builder setDevice(com.google.cloud.iot.v1.Device value) {
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -695,7 +695,7 @@ public Builder setDevice(
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -719,7 +719,7 @@ public Builder mergeDevice(com.google.cloud.iot.v1.Device value) {
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -739,7 +739,7 @@ public Builder clearDevice() {
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -753,7 +753,7 @@ public com.google.cloud.iot.v1.Device.Builder getDeviceBuilder() {
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -770,7 +770,7 @@ public com.google.cloud.iot.v1.DeviceOrBuilder getDeviceOrBuilder() {
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/CreateDeviceRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/CreateDeviceRequestOrBuilder.java
index 13aba855dced..105e12b5dcf0 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/CreateDeviceRequestOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/CreateDeviceRequestOrBuilder.java
@@ -32,7 +32,7 @@ public interface CreateDeviceRequestOrBuilder extends
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -42,7 +42,7 @@ public interface CreateDeviceRequestOrBuilder extends
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
@@ -52,7 +52,7 @@ public interface CreateDeviceRequestOrBuilder extends
/**
*
* The device registration details. The field `name` must be empty. The server
- * will generate that field from the device registry `id` provided and the
+ * generates `name` from the device registry `id` and the
* `parent` field.
*
*
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/Device.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/Device.java
index f27ba26726bd..db228d2e753c 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/Device.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/Device.java
@@ -25,6 +25,7 @@ private Device() {
numId_ = 0L;
credentials_ = java.util.Collections.emptyList();
blocked_ = false;
+ logLevel_ = 0;
}
@java.lang.Override
@@ -169,10 +170,10 @@ private Device(
break;
}
case 138: {
- if (!((mutable_bitField0_ & 0x00004000) == 0x00004000)) {
+ if (!((mutable_bitField0_ & 0x00008000) == 0x00008000)) {
metadata_ = com.google.protobuf.MapField.newMapField(
MetadataDefaultEntryHolder.defaultEntry);
- mutable_bitField0_ |= 0x00004000;
+ mutable_bitField0_ |= 0x00008000;
}
com.google.protobuf.MapEntry+ * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + *+ * + *
.google.cloud.iot.v1.LogLevel log_level = 21;
+ */
+ public int getLogLevelValue() {
+ return logLevel_;
+ }
+ /**
+ * + * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + *+ * + *
.google.cloud.iot.v1.LogLevel log_level = 21;
+ */
+ public com.google.cloud.iot.v1.LogLevel getLogLevel() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.iot.v1.LogLevel result = com.google.cloud.iot.v1.LogLevel.valueOf(logLevel_);
+ return result == null ? com.google.cloud.iot.v1.LogLevel.UNRECOGNIZED : result;
+ }
+
public static final int METADATA_FIELD_NUMBER = 17;
private static final class MetadataDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
@@ -950,6 +999,39 @@ public java.lang.String getMetadataOrThrow(
return map.get(key);
}
+ public static final int GATEWAY_CONFIG_FIELD_NUMBER = 24;
+ private com.google.cloud.iot.v1.GatewayConfig gatewayConfig_;
+ /**
+ * + * Gateway-related configuration and state. + *+ * + *
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ public boolean hasGatewayConfig() {
+ return gatewayConfig_ != null;
+ }
+ /**
+ * + * Gateway-related configuration and state. + *+ * + *
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ public com.google.cloud.iot.v1.GatewayConfig getGatewayConfig() {
+ return gatewayConfig_ == null ? com.google.cloud.iot.v1.GatewayConfig.getDefaultInstance() : gatewayConfig_;
+ }
+ /**
+ * + * Gateway-related configuration and state. + *+ * + *
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ public com.google.cloud.iot.v1.GatewayConfigOrBuilder getGatewayConfigOrBuilder() {
+ return getGatewayConfig();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
@@ -1012,6 +1094,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (lastStateTime_ != null) {
output.writeMessage(20, getLastStateTime());
}
+ if (logLevel_ != com.google.cloud.iot.v1.LogLevel.LOG_LEVEL_UNSPECIFIED.getNumber()) {
+ output.writeEnum(21, logLevel_);
+ }
+ if (gatewayConfig_ != null) {
+ output.writeMessage(24, getGatewayConfig());
+ }
unknownFields.writeTo(output);
}
@@ -1085,6 +1173,14 @@ public int getSerializedSize() {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(20, getLastStateTime());
}
+ if (logLevel_ != com.google.cloud.iot.v1.LogLevel.LOG_LEVEL_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(21, logLevel_);
+ }
+ if (gatewayConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(24, getGatewayConfig());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -1156,8 +1252,14 @@ public boolean equals(final java.lang.Object obj) {
result = result && getState()
.equals(other.getState());
}
+ result = result && logLevel_ == other.logLevel_;
result = result && internalGetMetadata().equals(
other.internalGetMetadata());
+ result = result && (hasGatewayConfig() == other.hasGatewayConfig());
+ if (hasGatewayConfig()) {
+ result = result && getGatewayConfig()
+ .equals(other.getGatewayConfig());
+ }
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@@ -1219,10 +1321,16 @@ public int hashCode() {
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + getState().hashCode();
}
+ hash = (37 * hash) + LOG_LEVEL_FIELD_NUMBER;
+ hash = (53 * hash) + logLevel_;
if (!internalGetMetadata().getMap().isEmpty()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + internalGetMetadata().hashCode();
}
+ if (hasGatewayConfig()) {
+ hash = (37 * hash) + GATEWAY_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getGatewayConfig().hashCode();
+ }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -1451,7 +1559,15 @@ public Builder clear() {
state_ = null;
stateBuilder_ = null;
}
+ logLevel_ = 0;
+
internalGetMutableMetadata().clear();
+ if (gatewayConfigBuilder_ == null) {
+ gatewayConfig_ = null;
+ } else {
+ gatewayConfig_ = null;
+ gatewayConfigBuilder_ = null;
+ }
return this;
}
@@ -1538,8 +1654,14 @@ public com.google.cloud.iot.v1.Device buildPartial() {
} else {
result.state_ = stateBuilder_.build();
}
+ result.logLevel_ = logLevel_;
result.metadata_ = internalGetMetadata();
result.metadata_.makeImmutable();
+ if (gatewayConfigBuilder_ == null) {
+ result.gatewayConfig_ = gatewayConfig_;
+ } else {
+ result.gatewayConfig_ = gatewayConfigBuilder_.build();
+ }
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
@@ -1656,8 +1778,14 @@ public Builder mergeFrom(com.google.cloud.iot.v1.Device other) {
if (other.hasState()) {
mergeState(other.getState());
}
+ if (other.logLevel_ != 0) {
+ setLogLevelValue(other.getLogLevelValue());
+ }
internalGetMutableMetadata().mergeFrom(
other.internalGetMetadata());
+ if (other.hasGatewayConfig()) {
+ mergeGatewayConfig(other.getGatewayConfig());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -3953,6 +4081,81 @@ public com.google.cloud.iot.v1.DeviceStateOrBuilder getStateOrBuilder() {
return stateBuilder_;
}
+ private int logLevel_ = 0;
+ /**
+ * + * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + *+ * + *
.google.cloud.iot.v1.LogLevel log_level = 21;
+ */
+ public int getLogLevelValue() {
+ return logLevel_;
+ }
+ /**
+ * + * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + *+ * + *
.google.cloud.iot.v1.LogLevel log_level = 21;
+ */
+ public Builder setLogLevelValue(int value) {
+ logLevel_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + *+ * + *
.google.cloud.iot.v1.LogLevel log_level = 21;
+ */
+ public com.google.cloud.iot.v1.LogLevel getLogLevel() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.iot.v1.LogLevel result = com.google.cloud.iot.v1.LogLevel.valueOf(logLevel_);
+ return result == null ? com.google.cloud.iot.v1.LogLevel.UNRECOGNIZED : result;
+ }
+ /**
+ * + * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + *+ * + *
.google.cloud.iot.v1.LogLevel log_level = 21;
+ */
+ public Builder setLogLevel(com.google.cloud.iot.v1.LogLevel value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ logLevel_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + *+ * + *
.google.cloud.iot.v1.LogLevel log_level = 21;
+ */
+ public Builder clearLogLevel() {
+
+ logLevel_ = 0;
+ onChanged();
+ return this;
+ }
+
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> metadata_;
private com.google.protobuf.MapField+ * Gateway-related configuration and state. + *+ * + *
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ public boolean hasGatewayConfig() {
+ return gatewayConfigBuilder_ != null || gatewayConfig_ != null;
+ }
+ /**
+ * + * Gateway-related configuration and state. + *+ * + *
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ public com.google.cloud.iot.v1.GatewayConfig getGatewayConfig() {
+ if (gatewayConfigBuilder_ == null) {
+ return gatewayConfig_ == null ? com.google.cloud.iot.v1.GatewayConfig.getDefaultInstance() : gatewayConfig_;
+ } else {
+ return gatewayConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Gateway-related configuration and state. + *+ * + *
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ public Builder setGatewayConfig(com.google.cloud.iot.v1.GatewayConfig value) {
+ if (gatewayConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ gatewayConfig_ = value;
+ onChanged();
+ } else {
+ gatewayConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Gateway-related configuration and state. + *+ * + *
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ public Builder setGatewayConfig(
+ com.google.cloud.iot.v1.GatewayConfig.Builder builderForValue) {
+ if (gatewayConfigBuilder_ == null) {
+ gatewayConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ gatewayConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Gateway-related configuration and state. + *+ * + *
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ public Builder mergeGatewayConfig(com.google.cloud.iot.v1.GatewayConfig value) {
+ if (gatewayConfigBuilder_ == null) {
+ if (gatewayConfig_ != null) {
+ gatewayConfig_ =
+ com.google.cloud.iot.v1.GatewayConfig.newBuilder(gatewayConfig_).mergeFrom(value).buildPartial();
+ } else {
+ gatewayConfig_ = value;
+ }
+ onChanged();
+ } else {
+ gatewayConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Gateway-related configuration and state. + *+ * + *
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ public Builder clearGatewayConfig() {
+ if (gatewayConfigBuilder_ == null) {
+ gatewayConfig_ = null;
+ onChanged();
+ } else {
+ gatewayConfig_ = null;
+ gatewayConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Gateway-related configuration and state. + *+ * + *
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ public com.google.cloud.iot.v1.GatewayConfig.Builder getGatewayConfigBuilder() {
+
+ onChanged();
+ return getGatewayConfigFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Gateway-related configuration and state. + *+ * + *
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ public com.google.cloud.iot.v1.GatewayConfigOrBuilder getGatewayConfigOrBuilder() {
+ if (gatewayConfigBuilder_ != null) {
+ return gatewayConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return gatewayConfig_ == null ?
+ com.google.cloud.iot.v1.GatewayConfig.getDefaultInstance() : gatewayConfig_;
+ }
+ }
+ /**
+ * + * Gateway-related configuration and state. + *+ * + *
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.iot.v1.GatewayConfig, com.google.cloud.iot.v1.GatewayConfig.Builder, com.google.cloud.iot.v1.GatewayConfigOrBuilder>
+ getGatewayConfigFieldBuilder() {
+ if (gatewayConfigBuilder_ == null) {
+ gatewayConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.iot.v1.GatewayConfig, com.google.cloud.iot.v1.GatewayConfig.Builder, com.google.cloud.iot.v1.GatewayConfigOrBuilder>(
+ getGatewayConfig(),
+ getParentForChildren(),
+ isClean());
+ gatewayConfig_ = null;
+ }
+ return gatewayConfigBuilder_;
+ }
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceManagerProto.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceManagerProto.java
index 8091d15e9121..90684dd45f7b 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceManagerProto.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceManagerProto.java
@@ -69,6 +69,11 @@ public static void registerAllExtensions(
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_iot_v1_ListDevicesRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_iot_v1_GatewayListOptions_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_iot_v1_GatewayListOptions_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_cloud_iot_v1_ListDevicesResponse_descriptor;
static final
@@ -99,6 +104,36 @@ public static void registerAllExtensions(
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_iot_v1_ListDeviceStatesResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_iot_v1_SendCommandToDeviceRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_iot_v1_SendCommandToDeviceRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_iot_v1_SendCommandToDeviceResponse_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_iot_v1_SendCommandToDeviceResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_iot_v1_BindDeviceToGatewayRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_iot_v1_BindDeviceToGatewayRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_iot_v1_BindDeviceToGatewayResponse_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_iot_v1_BindDeviceToGatewayResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayResponse_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayResponse_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
@@ -115,139 +150,176 @@ public static void registerAllExtensions(
"to\032\032google/iam/v1/policy.proto\032\036google/p" +
"rotobuf/duration.proto\032\033google/protobuf/" +
"empty.proto\032 google/protobuf/field_mask." +
- "proto\032\037google/protobuf/timestamp.proto\"k" +
- "\n\033CreateDeviceRegistryRequest\022\016\n\006parent\030" +
- "\001 \001(\t\022<\n\017device_registry\030\002 \001(\0132#.google." +
- "cloud.iot.v1.DeviceRegistry\"(\n\030GetDevice" +
- "RegistryRequest\022\014\n\004name\030\001 \001(\t\"+\n\033DeleteD" +
- "eviceRegistryRequest\022\014\n\004name\030\001 \001(\t\"\214\001\n\033U" +
- "pdateDeviceRegistryRequest\022<\n\017device_reg" +
- "istry\030\001 \001(\0132#.google.cloud.iot.v1.Device" +
- "Registry\022/\n\013update_mask\030\002 \001(\0132\032.google.p" +
- "rotobuf.FieldMask\"T\n\033ListDeviceRegistrie" +
- "sRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\tpage_size\030\002 " +
- "\001(\005\022\022\n\npage_token\030\003 \001(\t\"w\n\034ListDeviceReg" +
- "istriesResponse\022>\n\021device_registries\030\001 \003" +
- "(\0132#.google.cloud.iot.v1.DeviceRegistry\022" +
- "\027\n\017next_page_token\030\002 \001(\t\"R\n\023CreateDevice" +
- "Request\022\016\n\006parent\030\001 \001(\t\022+\n\006device\030\002 \001(\0132" +
- "\033.google.cloud.iot.v1.Device\"P\n\020GetDevic" +
- "eRequest\022\014\n\004name\030\001 \001(\t\022.\n\nfield_mask\030\002 \001" +
- "(\0132\032.google.protobuf.FieldMask\"s\n\023Update" +
- "DeviceRequest\022+\n\006device\030\002 \001(\0132\033.google.c" +
- "loud.iot.v1.Device\022/\n\013update_mask\030\003 \001(\0132" +
- "\032.google.protobuf.FieldMask\"#\n\023DeleteDev" +
- "iceRequest\022\014\n\004name\030\001 \001(\t\"\247\001\n\022ListDevices" +
- "Request\022\016\n\006parent\030\001 \001(\t\022\026\n\016device_num_id" +
- "s\030\002 \003(\004\022\022\n\ndevice_ids\030\003 \003(\t\022.\n\nfield_mas" +
- "k\030\004 \001(\0132\032.google.protobuf.FieldMask\022\021\n\tp" +
- "age_size\030d \001(\005\022\022\n\npage_token\030e \001(\t\"\\\n\023Li" +
- "stDevicesResponse\022,\n\007devices\030\001 \003(\0132\033.goo" +
- "gle.cloud.iot.v1.Device\022\027\n\017next_page_tok" +
- "en\030\002 \001(\t\"`\n ModifyCloudToDeviceConfigReq" +
- "uest\022\014\n\004name\030\001 \001(\t\022\031\n\021version_to_update\030" +
- "\002 \001(\003\022\023\n\013binary_data\030\003 \001(\014\"E\n\037ListDevice" +
- "ConfigVersionsRequest\022\014\n\004name\030\001 \001(\t\022\024\n\014n" +
- "um_versions\030\002 \001(\005\"]\n ListDeviceConfigVer" +
- "sionsResponse\0229\n\016device_configs\030\001 \003(\0132!." +
- "google.cloud.iot.v1.DeviceConfig\";\n\027List" +
- "DeviceStatesRequest\022\014\n\004name\030\001 \001(\t\022\022\n\nnum" +
- "_states\030\002 \001(\005\"S\n\030ListDeviceStatesRespons" +
- "e\0227\n\rdevice_states\030\001 \003(\0132 .google.cloud." +
- "iot.v1.DeviceState2\223\034\n\rDeviceManager\022\266\001\n" +
- "\024CreateDeviceRegistry\0220.google.cloud.iot" +
- ".v1.CreateDeviceRegistryRequest\032#.google" +
- ".cloud.iot.v1.DeviceRegistry\"G\202\323\344\223\002A\"./v" +
- "1/{parent=projects/*/locations/*}/regist" +
- "ries:\017device_registry\022\237\001\n\021GetDeviceRegis" +
- "try\022-.google.cloud.iot.v1.GetDeviceRegis" +
- "tryRequest\032#.google.cloud.iot.v1.DeviceR" +
- "egistry\"6\202\323\344\223\0020\022./v1/{name=projects/*/lo" +
- "cations/*/registries/*}\022\306\001\n\024UpdateDevice" +
- "Registry\0220.google.cloud.iot.v1.UpdateDev" +
- "iceRegistryRequest\032#.google.cloud.iot.v1" +
- ".DeviceRegistry\"W\202\323\344\223\002Q2>/v1/{device_reg" +
- "istry.name=projects/*/locations/*/regist" +
- "ries/*}:\017device_registry\022\230\001\n\024DeleteDevic" +
- "eRegistry\0220.google.cloud.iot.v1.DeleteDe" +
- "viceRegistryRequest\032\026.google.protobuf.Em" +
- "pty\"6\202\323\344\223\0020*./v1/{name=projects/*/locati" +
- "ons/*/registries/*}\022\263\001\n\024ListDeviceRegist" +
- "ries\0220.google.cloud.iot.v1.ListDeviceReg" +
- "istriesRequest\0321.google.cloud.iot.v1.Lis" +
- "tDeviceRegistriesResponse\"6\202\323\344\223\0020\022./v1/{" +
- "parent=projects/*/locations/*}/registrie" +
- "s\022\237\001\n\014CreateDevice\022(.google.cloud.iot.v1" +
- ".CreateDeviceRequest\032\033.google.cloud.iot." +
- "v1.Device\"H\202\323\344\223\002B\"8/v1/{parent=projects/" +
- "*/locations/*/registries/*}/devices:\006dev" +
- "ice\022\327\001\n\tGetDevice\022%.google.cloud.iot.v1." +
- "GetDeviceRequest\032\033.google.cloud.iot.v1.D" +
- "evice\"\205\001\202\323\344\223\002\177\0228/v1/{name=projects/*/loc" +
- "ations/*/registries/*/devices/*}ZC\022A/v1/" +
- "{name=projects/*/locations/*/registries/" +
- "*/groups/*/devices/*}\022\374\001\n\014UpdateDevice\022(" +
- ".google.cloud.iot.v1.UpdateDeviceRequest" +
- "\032\033.google.cloud.iot.v1.Device\"\244\001\202\323\344\223\002\235\0012" +
- "?/v1/{device.name=projects/*/locations/*" +
- "/registries/*/devices/*}:\006deviceZR2H/v1/" +
- "{device.name=projects/*/locations/*/regi" +
- "stries/*/groups/*/devices/*}:\006device\022\330\001\n" +
- "\014DeleteDevice\022(.google.cloud.iot.v1.Dele" +
- "teDeviceRequest\032\026.google.protobuf.Empty\"" +
- "\205\001\202\323\344\223\002\177*8/v1/{name=projects/*/locations" +
- "/*/registries/*/devices/*}ZC*A/v1/{name=" +
- "projects/*/locations/*/registries/*/grou" +
- "ps/*/devices/*}\022\332\001\n\013ListDevices\022\'.google" +
- ".cloud.iot.v1.ListDevicesRequest\032(.googl" +
- "e.cloud.iot.v1.ListDevicesResponse\"x\202\323\344\223" +
- "\002r\0228/v1/{parent=projects/*/locations/*/r" +
- "egistries/*}/devicesZ6\0224/v1/{parent=proj" +
- "ects/*/locations/*/groups/*}/devices\022\270\002\n" +
- "\031ModifyCloudToDeviceConfig\0225.google.clou" +
- "d.iot.v1.ModifyCloudToDeviceConfigReques" +
- "t\032!.google.cloud.iot.v1.DeviceConfig\"\300\001\202" +
- "\323\344\223\002\271\001\"R/v1/{name=projects/*/locations/*" +
- "/registries/*/devices/*}:modifyCloudToDe" +
- "viceConfig:\001*Z`\"[/v1/{name=projects/*/lo" +
- "cations/*/registries/*/groups/*/devices/" +
- "*}:modifyCloudToDeviceConfig:\001*\022\256\002\n\030List" +
- "DeviceConfigVersions\0224.google.cloud.iot." +
- "v1.ListDeviceConfigVersionsRequest\0325.goo" +
- "gle.cloud.iot.v1.ListDeviceConfigVersion" +
- "sResponse\"\244\001\202\323\344\223\002\235\001\022G/v1/{name=projects/" +
- "*/locations/*/registries/*/devices/*}/co" +
- "nfigVersionsZR\022P/v1/{name=projects/*/loc" +
- "ations/*/registries/*/groups/*/devices/*" +
- "}/configVersions\022\206\002\n\020ListDeviceStates\022,." +
- "google.cloud.iot.v1.ListDeviceStatesRequ" +
- "est\032-.google.cloud.iot.v1.ListDeviceStat" +
- "esResponse\"\224\001\202\323\344\223\002\215\001\022?/v1/{name=projects" +
- "/*/locations/*/registries/*/devices/*}/s" +
- "tatesZJ\022H/v1/{name=projects/*/locations/" +
- "*/registries/*/groups/*/devices/*}/state" +
- "s\022\346\001\n\014SetIamPolicy\022\".google.iam.v1.SetIa" +
- "mPolicyRequest\032\025.google.iam.v1.Policy\"\232\001" +
- "\202\323\344\223\002\223\001\"?/v1/{resource=projects/*/locati" +
- "ons/*/registries/*}:setIamPolicy:\001*ZM\"H/" +
- "v1/{resource=projects/*/locations/*/regi" +
- "stries/*/groups/*}:setIamPolicy:\001*\022\346\001\n\014G" +
- "etIamPolicy\022\".google.iam.v1.GetIamPolicy" +
- "Request\032\025.google.iam.v1.Policy\"\232\001\202\323\344\223\002\223\001" +
- "\"?/v1/{resource=projects/*/locations/*/r" +
- "egistries/*}:getIamPolicy:\001*ZM\"H/v1/{res" +
- "ource=projects/*/locations/*/registries/" +
- "*/groups/*}:getIamPolicy:\001*\022\222\002\n\022TestIamP" +
- "ermissions\022(.google.iam.v1.TestIamPermis" +
- "sionsRequest\032).google.iam.v1.TestIamPerm" +
- "issionsResponse\"\246\001\202\323\344\223\002\237\001\"E/v1/{resource" +
- "=projects/*/locations/*/registries/*}:te" +
- "stIamPermissions:\001*ZS\"N/v1/{resource=pro" +
- "jects/*/locations/*/registries/*/groups/" +
- "*}:testIamPermissions:\001*Bj\n\027com.google.c" +
- "loud.iot.v1B\022DeviceManagerProtoP\001Z6googl" +
- "e.golang.org/genproto/googleapis/cloud/i" +
- "ot/v1;iot\370\001\001b\006proto3"
+ "proto\032\037google/protobuf/timestamp.proto\032\027" +
+ "google/rpc/status.proto\"k\n\033CreateDeviceR" +
+ "egistryRequest\022\016\n\006parent\030\001 \001(\t\022<\n\017device" +
+ "_registry\030\002 \001(\0132#.google.cloud.iot.v1.De" +
+ "viceRegistry\"(\n\030GetDeviceRegistryRequest" +
+ "\022\014\n\004name\030\001 \001(\t\"+\n\033DeleteDeviceRegistryRe" +
+ "quest\022\014\n\004name\030\001 \001(\t\"\214\001\n\033UpdateDeviceRegi" +
+ "stryRequest\022<\n\017device_registry\030\001 \001(\0132#.g" +
+ "oogle.cloud.iot.v1.DeviceRegistry\022/\n\013upd" +
+ "ate_mask\030\002 \001(\0132\032.google.protobuf.FieldMa" +
+ "sk\"T\n\033ListDeviceRegistriesRequest\022\016\n\006par" +
+ "ent\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_tok" +
+ "en\030\003 \001(\t\"w\n\034ListDeviceRegistriesResponse" +
+ "\022>\n\021device_registries\030\001 \003(\0132#.google.clo" +
+ "ud.iot.v1.DeviceRegistry\022\027\n\017next_page_to" +
+ "ken\030\002 \001(\t\"R\n\023CreateDeviceRequest\022\016\n\006pare" +
+ "nt\030\001 \001(\t\022+\n\006device\030\002 \001(\0132\033.google.cloud." +
+ "iot.v1.Device\"P\n\020GetDeviceRequest\022\014\n\004nam" +
+ "e\030\001 \001(\t\022.\n\nfield_mask\030\002 \001(\0132\032.google.pro" +
+ "tobuf.FieldMask\"s\n\023UpdateDeviceRequest\022+" +
+ "\n\006device\030\002 \001(\0132\033.google.cloud.iot.v1.Dev" +
+ "ice\022/\n\013update_mask\030\003 \001(\0132\032.google.protob" +
+ "uf.FieldMask\"#\n\023DeleteDeviceRequest\022\014\n\004n" +
+ "ame\030\001 \001(\t\"\356\001\n\022ListDevicesRequest\022\016\n\006pare" +
+ "nt\030\001 \001(\t\022\026\n\016device_num_ids\030\002 \003(\004\022\022\n\ndevi" +
+ "ce_ids\030\003 \003(\t\022.\n\nfield_mask\030\004 \001(\0132\032.googl" +
+ "e.protobuf.FieldMask\022E\n\024gateway_list_opt" +
+ "ions\030\006 \001(\0132\'.google.cloud.iot.v1.Gateway" +
+ "ListOptions\022\021\n\tpage_size\030d \001(\005\022\022\n\npage_t" +
+ "oken\030e \001(\t\"\235\001\n\022GatewayListOptions\0228\n\014gat" +
+ "eway_type\030\001 \001(\0162 .google.cloud.iot.v1.Ga" +
+ "tewayTypeH\000\022!\n\027associations_gateway_id\030\002" +
+ " \001(\tH\000\022 \n\026associations_device_id\030\003 \001(\tH\000" +
+ "B\010\n\006filter\"\\\n\023ListDevicesResponse\022,\n\007dev" +
+ "ices\030\001 \003(\0132\033.google.cloud.iot.v1.Device\022" +
+ "\027\n\017next_page_token\030\002 \001(\t\"`\n ModifyCloudT" +
+ "oDeviceConfigRequest\022\014\n\004name\030\001 \001(\t\022\031\n\021ve" +
+ "rsion_to_update\030\002 \001(\003\022\023\n\013binary_data\030\003 \001" +
+ "(\014\"E\n\037ListDeviceConfigVersionsRequest\022\014\n" +
+ "\004name\030\001 \001(\t\022\024\n\014num_versions\030\002 \001(\005\"]\n Lis" +
+ "tDeviceConfigVersionsResponse\0229\n\016device_" +
+ "configs\030\001 \003(\0132!.google.cloud.iot.v1.Devi" +
+ "ceConfig\";\n\027ListDeviceStatesRequest\022\014\n\004n" +
+ "ame\030\001 \001(\t\022\022\n\nnum_states\030\002 \001(\005\"S\n\030ListDev" +
+ "iceStatesResponse\0227\n\rdevice_states\030\001 \003(\013" +
+ "2 .google.cloud.iot.v1.DeviceState\"R\n\032Se" +
+ "ndCommandToDeviceRequest\022\014\n\004name\030\001 \001(\t\022\023" +
+ "\n\013binary_data\030\002 \001(\014\022\021\n\tsubfolder\030\003 \001(\t\"\035" +
+ "\n\033SendCommandToDeviceResponse\"S\n\032BindDev" +
+ "iceToGatewayRequest\022\016\n\006parent\030\001 \001(\t\022\022\n\ng" +
+ "ateway_id\030\002 \001(\t\022\021\n\tdevice_id\030\003 \001(\t\"\035\n\033Bi" +
+ "ndDeviceToGatewayResponse\"W\n\036UnbindDevic" +
+ "eFromGatewayRequest\022\016\n\006parent\030\001 \001(\t\022\022\n\ng" +
+ "ateway_id\030\002 \001(\t\022\021\n\tdevice_id\030\003 \001(\t\"!\n\037Un" +
+ "bindDeviceFromGatewayResponse2\345\"\n\rDevice" +
+ "Manager\022\266\001\n\024CreateDeviceRegistry\0220.googl" +
+ "e.cloud.iot.v1.CreateDeviceRegistryReque" +
+ "st\032#.google.cloud.iot.v1.DeviceRegistry\"" +
+ "G\202\323\344\223\002A\"./v1/{parent=projects/*/location" +
+ "s/*}/registries:\017device_registry\022\237\001\n\021Get" +
+ "DeviceRegistry\022-.google.cloud.iot.v1.Get" +
+ "DeviceRegistryRequest\032#.google.cloud.iot" +
+ ".v1.DeviceRegistry\"6\202\323\344\223\0020\022./v1/{name=pr" +
+ "ojects/*/locations/*/registries/*}\022\306\001\n\024U" +
+ "pdateDeviceRegistry\0220.google.cloud.iot.v" +
+ "1.UpdateDeviceRegistryRequest\032#.google.c" +
+ "loud.iot.v1.DeviceRegistry\"W\202\323\344\223\002Q2>/v1/" +
+ "{device_registry.name=projects/*/locatio" +
+ "ns/*/registries/*}:\017device_registry\022\230\001\n\024" +
+ "DeleteDeviceRegistry\0220.google.cloud.iot." +
+ "v1.DeleteDeviceRegistryRequest\032\026.google." +
+ "protobuf.Empty\"6\202\323\344\223\0020*./v1/{name=projec" +
+ "ts/*/locations/*/registries/*}\022\263\001\n\024ListD" +
+ "eviceRegistries\0220.google.cloud.iot.v1.Li" +
+ "stDeviceRegistriesRequest\0321.google.cloud" +
+ ".iot.v1.ListDeviceRegistriesResponse\"6\202\323" +
+ "\344\223\0020\022./v1/{parent=projects/*/locations/*" +
+ "}/registries\022\237\001\n\014CreateDevice\022(.google.c" +
+ "loud.iot.v1.CreateDeviceRequest\032\033.google" +
+ ".cloud.iot.v1.Device\"H\202\323\344\223\002B\"8/v1/{paren" +
+ "t=projects/*/locations/*/registries/*}/d" +
+ "evices:\006device\022\327\001\n\tGetDevice\022%.google.cl" +
+ "oud.iot.v1.GetDeviceRequest\032\033.google.clo" +
+ "ud.iot.v1.Device\"\205\001\202\323\344\223\002\177\0228/v1/{name=pro" +
+ "jects/*/locations/*/registries/*/devices" +
+ "/*}ZC\022A/v1/{name=projects/*/locations/*/" +
+ "registries/*/groups/*/devices/*}\022\374\001\n\014Upd" +
+ "ateDevice\022(.google.cloud.iot.v1.UpdateDe" +
+ "viceRequest\032\033.google.cloud.iot.v1.Device" +
+ "\"\244\001\202\323\344\223\002\235\0012?/v1/{device.name=projects/*/" +
+ "locations/*/registries/*/devices/*}:\006dev" +
+ "iceZR2H/v1/{device.name=projects/*/locat" +
+ "ions/*/registries/*/groups/*/devices/*}:" +
+ "\006device\022\222\001\n\014DeleteDevice\022(.google.cloud." +
+ "iot.v1.DeleteDeviceRequest\032\026.google.prot" +
+ "obuf.Empty\"@\202\323\344\223\002:*8/v1/{name=projects/*" +
+ "/locations/*/registries/*/devices/*}\022\350\001\n" +
+ "\013ListDevices\022\'.google.cloud.iot.v1.ListD" +
+ "evicesRequest\032(.google.cloud.iot.v1.List" +
+ "DevicesResponse\"\205\001\202\323\344\223\002\177\0228/v1/{parent=pr" +
+ "ojects/*/locations/*/registries/*}/devic" +
+ "esZC\022A/v1/{parent=projects/*/locations/*" +
+ "/registries/*/groups/*}/devices\022\270\002\n\031Modi" +
+ "fyCloudToDeviceConfig\0225.google.cloud.iot" +
+ ".v1.ModifyCloudToDeviceConfigRequest\032!.g" +
+ "oogle.cloud.iot.v1.DeviceConfig\"\300\001\202\323\344\223\002\271" +
+ "\001\"R/v1/{name=projects/*/locations/*/regi" +
+ "stries/*/devices/*}:modifyCloudToDeviceC" +
+ "onfig:\001*Z`\"[/v1/{name=projects/*/locatio" +
+ "ns/*/registries/*/groups/*/devices/*}:mo" +
+ "difyCloudToDeviceConfig:\001*\022\256\002\n\030ListDevic" +
+ "eConfigVersions\0224.google.cloud.iot.v1.Li" +
+ "stDeviceConfigVersionsRequest\0325.google.c" +
+ "loud.iot.v1.ListDeviceConfigVersionsResp" +
+ "onse\"\244\001\202\323\344\223\002\235\001\022G/v1/{name=projects/*/loc" +
+ "ations/*/registries/*/devices/*}/configV" +
+ "ersionsZR\022P/v1/{name=projects/*/location" +
+ "s/*/registries/*/groups/*/devices/*}/con" +
+ "figVersions\022\206\002\n\020ListDeviceStates\022,.googl" +
+ "e.cloud.iot.v1.ListDeviceStatesRequest\032-" +
+ ".google.cloud.iot.v1.ListDeviceStatesRes" +
+ "ponse\"\224\001\202\323\344\223\002\215\001\022?/v1/{name=projects/*/lo" +
+ "cations/*/registries/*/devices/*}/states" +
+ "ZJ\022H/v1/{name=projects/*/locations/*/reg" +
+ "istries/*/groups/*/devices/*}/states\022\346\001\n" +
+ "\014SetIamPolicy\022\".google.iam.v1.SetIamPoli" +
+ "cyRequest\032\025.google.iam.v1.Policy\"\232\001\202\323\344\223\002" +
+ "\223\001\"?/v1/{resource=projects/*/locations/*" +
+ "/registries/*}:setIamPolicy:\001*ZM\"H/v1/{r" +
+ "esource=projects/*/locations/*/registrie" +
+ "s/*/groups/*}:setIamPolicy:\001*\022\346\001\n\014GetIam" +
+ "Policy\022\".google.iam.v1.GetIamPolicyReque" +
+ "st\032\025.google.iam.v1.Policy\"\232\001\202\323\344\223\002\223\001\"?/v1" +
+ "/{resource=projects/*/locations/*/regist" +
+ "ries/*}:getIamPolicy:\001*ZM\"H/v1/{resource" +
+ "=projects/*/locations/*/registries/*/gro" +
+ "ups/*}:getIamPolicy:\001*\022\222\002\n\022TestIamPermis" +
+ "sions\022(.google.iam.v1.TestIamPermissions" +
+ "Request\032).google.iam.v1.TestIamPermissio" +
+ "nsResponse\"\246\001\202\323\344\223\002\237\001\"E/v1/{resource=proj" +
+ "ects/*/locations/*/registries/*}:testIam" +
+ "Permissions:\001*ZS\"N/v1/{resource=projects" +
+ "/*/locations/*/registries/*/groups/*}:te" +
+ "stIamPermissions:\001*\022\257\002\n\023SendCommandToDev" +
+ "ice\022/.google.cloud.iot.v1.SendCommandToD" +
+ "eviceRequest\0320.google.cloud.iot.v1.SendC" +
+ "ommandToDeviceResponse\"\264\001\202\323\344\223\002\255\001\"L/v1/{n" +
+ "ame=projects/*/locations/*/registries/*/" +
+ "devices/*}:sendCommandToDevice:\001*ZZ\"U/v1" +
+ "/{name=projects/*/locations/*/registries" +
+ "/*/groups/*/devices/*}:sendCommandToDevi" +
+ "ce:\001*\022\237\002\n\023BindDeviceToGateway\022/.google.c" +
+ "loud.iot.v1.BindDeviceToGatewayRequest\0320" +
+ ".google.cloud.iot.v1.BindDeviceToGateway" +
+ "Response\"\244\001\202\323\344\223\002\235\001\"D/v1/{parent=projects" +
+ "/*/locations/*/registries/*}:bindDeviceT" +
+ "oGateway:\001*ZR\"M/v1/{parent=projects/*/lo" +
+ "cations/*/registries/*/groups/*}:bindDev" +
+ "iceToGateway:\001*\022\263\002\n\027UnbindDeviceFromGate" +
+ "way\0223.google.cloud.iot.v1.UnbindDeviceFr" +
+ "omGatewayRequest\0324.google.cloud.iot.v1.U" +
+ "nbindDeviceFromGatewayResponse\"\254\001\202\323\344\223\002\245\001" +
+ "\"H/v1/{parent=projects/*/locations/*/reg" +
+ "istries/*}:unbindDeviceFromGateway:\001*ZV\"" +
+ "Q/v1/{parent=projects/*/locations/*/regi" +
+ "stries/*/groups/*}:unbindDeviceFromGatew" +
+ "ay:\001*Bj\n\027com.google.cloud.iot.v1B\022Device" +
+ "ManagerProtoP\001Z6google.golang.org/genpro" +
+ "to/googleapis/cloud/iot/v1;iot\370\001\001b\006proto" +
+ "3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -268,6 +340,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.EmptyProto.getDescriptor(),
com.google.protobuf.FieldMaskProto.getDescriptor(),
com.google.protobuf.TimestampProto.getDescriptor(),
+ com.google.rpc.StatusProto.getDescriptor(),
}, assigner);
internal_static_google_cloud_iot_v1_CreateDeviceRegistryRequest_descriptor =
getDescriptor().getMessageTypes().get(0);
@@ -334,43 +407,85 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
internal_static_google_cloud_iot_v1_ListDevicesRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_ListDevicesRequest_descriptor,
- new java.lang.String[] { "Parent", "DeviceNumIds", "DeviceIds", "FieldMask", "PageSize", "PageToken", });
- internal_static_google_cloud_iot_v1_ListDevicesResponse_descriptor =
+ new java.lang.String[] { "Parent", "DeviceNumIds", "DeviceIds", "FieldMask", "GatewayListOptions", "PageSize", "PageToken", });
+ internal_static_google_cloud_iot_v1_GatewayListOptions_descriptor =
getDescriptor().getMessageTypes().get(11);
+ internal_static_google_cloud_iot_v1_GatewayListOptions_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_iot_v1_GatewayListOptions_descriptor,
+ new java.lang.String[] { "GatewayType", "AssociationsGatewayId", "AssociationsDeviceId", "Filter", });
+ internal_static_google_cloud_iot_v1_ListDevicesResponse_descriptor =
+ getDescriptor().getMessageTypes().get(12);
internal_static_google_cloud_iot_v1_ListDevicesResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_ListDevicesResponse_descriptor,
new java.lang.String[] { "Devices", "NextPageToken", });
internal_static_google_cloud_iot_v1_ModifyCloudToDeviceConfigRequest_descriptor =
- getDescriptor().getMessageTypes().get(12);
+ getDescriptor().getMessageTypes().get(13);
internal_static_google_cloud_iot_v1_ModifyCloudToDeviceConfigRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_ModifyCloudToDeviceConfigRequest_descriptor,
new java.lang.String[] { "Name", "VersionToUpdate", "BinaryData", });
internal_static_google_cloud_iot_v1_ListDeviceConfigVersionsRequest_descriptor =
- getDescriptor().getMessageTypes().get(13);
+ getDescriptor().getMessageTypes().get(14);
internal_static_google_cloud_iot_v1_ListDeviceConfigVersionsRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_ListDeviceConfigVersionsRequest_descriptor,
new java.lang.String[] { "Name", "NumVersions", });
internal_static_google_cloud_iot_v1_ListDeviceConfigVersionsResponse_descriptor =
- getDescriptor().getMessageTypes().get(14);
+ getDescriptor().getMessageTypes().get(15);
internal_static_google_cloud_iot_v1_ListDeviceConfigVersionsResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_ListDeviceConfigVersionsResponse_descriptor,
new java.lang.String[] { "DeviceConfigs", });
internal_static_google_cloud_iot_v1_ListDeviceStatesRequest_descriptor =
- getDescriptor().getMessageTypes().get(15);
+ getDescriptor().getMessageTypes().get(16);
internal_static_google_cloud_iot_v1_ListDeviceStatesRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_ListDeviceStatesRequest_descriptor,
new java.lang.String[] { "Name", "NumStates", });
internal_static_google_cloud_iot_v1_ListDeviceStatesResponse_descriptor =
- getDescriptor().getMessageTypes().get(16);
+ getDescriptor().getMessageTypes().get(17);
internal_static_google_cloud_iot_v1_ListDeviceStatesResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_ListDeviceStatesResponse_descriptor,
new java.lang.String[] { "DeviceStates", });
+ internal_static_google_cloud_iot_v1_SendCommandToDeviceRequest_descriptor =
+ getDescriptor().getMessageTypes().get(18);
+ internal_static_google_cloud_iot_v1_SendCommandToDeviceRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_iot_v1_SendCommandToDeviceRequest_descriptor,
+ new java.lang.String[] { "Name", "BinaryData", "Subfolder", });
+ internal_static_google_cloud_iot_v1_SendCommandToDeviceResponse_descriptor =
+ getDescriptor().getMessageTypes().get(19);
+ internal_static_google_cloud_iot_v1_SendCommandToDeviceResponse_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_iot_v1_SendCommandToDeviceResponse_descriptor,
+ new java.lang.String[] { });
+ internal_static_google_cloud_iot_v1_BindDeviceToGatewayRequest_descriptor =
+ getDescriptor().getMessageTypes().get(20);
+ internal_static_google_cloud_iot_v1_BindDeviceToGatewayRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_iot_v1_BindDeviceToGatewayRequest_descriptor,
+ new java.lang.String[] { "Parent", "GatewayId", "DeviceId", });
+ internal_static_google_cloud_iot_v1_BindDeviceToGatewayResponse_descriptor =
+ getDescriptor().getMessageTypes().get(21);
+ internal_static_google_cloud_iot_v1_BindDeviceToGatewayResponse_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_iot_v1_BindDeviceToGatewayResponse_descriptor,
+ new java.lang.String[] { });
+ internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayRequest_descriptor =
+ getDescriptor().getMessageTypes().get(22);
+ internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayRequest_descriptor,
+ new java.lang.String[] { "Parent", "GatewayId", "DeviceId", });
+ internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayResponse_descriptor =
+ getDescriptor().getMessageTypes().get(23);
+ internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayResponse_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayResponse_descriptor,
+ new java.lang.String[] { });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.AnnotationsProto.http);
@@ -384,6 +499,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.EmptyProto.getDescriptor();
com.google.protobuf.FieldMaskProto.getDescriptor();
com.google.protobuf.TimestampProto.getDescriptor();
+ com.google.rpc.StatusProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceOrBuilder.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceOrBuilder.java
index 32e9d7867e34..eca9d2f2b6ac 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceOrBuilder.java
@@ -434,6 +434,27 @@ com.google.cloud.iot.v1.DeviceCredentialOrBuilder getCredentialsOrBuilder(
*/
com.google.cloud.iot.v1.DeviceStateOrBuilder getStateOrBuilder();
+ /**
+ * + * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + *+ * + *
.google.cloud.iot.v1.LogLevel log_level = 21;
+ */
+ int getLogLevelValue();
+ /**
+ * + * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + *+ * + *
.google.cloud.iot.v1.LogLevel log_level = 21;
+ */
+ com.google.cloud.iot.v1.LogLevel getLogLevel();
+
/**
*
* The metadata key-value pairs assigned to the device. This metadata is not
@@ -527,4 +548,29 @@ java.lang.String getMetadataOrDefault(
java.lang.String getMetadataOrThrow(
java.lang.String key);
+
+ /**
+ *
+ * Gateway-related configuration and state.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ boolean hasGatewayConfig();
+ /**
+ *
+ * Gateway-related configuration and state.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ com.google.cloud.iot.v1.GatewayConfig getGatewayConfig();
+ /**
+ *
+ * Gateway-related configuration and state.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayConfig gateway_config = 24;
+ */
+ com.google.cloud.iot.v1.GatewayConfigOrBuilder getGatewayConfigOrBuilder();
}
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceRegistry.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceRegistry.java
index baf9d226b8c4..e4e81a14b8e2 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceRegistry.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceRegistry.java
@@ -23,6 +23,7 @@ private DeviceRegistry() {
id_ = "";
name_ = "";
eventNotificationConfigs_ = java.util.Collections.emptyList();
+ logLevel_ = 0;
credentials_ = java.util.Collections.emptyList();
}
@@ -89,9 +90,9 @@ private DeviceRegistry(
break;
}
case 66: {
- if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
+ if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
credentials_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000040;
+ mutable_bitField0_ |= 0x00000080;
}
credentials_.add(
input.readMessage(com.google.cloud.iot.v1.RegistryCredential.parser(), extensionRegistry));
@@ -119,6 +120,12 @@ private DeviceRegistry(
input.readMessage(com.google.cloud.iot.v1.EventNotificationConfig.parser(), extensionRegistry));
break;
}
+ case 88: {
+ int rawValue = input.readEnum();
+
+ logLevel_ = rawValue;
+ break;
+ }
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
@@ -134,7 +141,7 @@ private DeviceRegistry(
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
- if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
+ if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
credentials_ = java.util.Collections.unmodifiableList(credentials_);
}
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
@@ -453,6 +460,35 @@ public com.google.cloud.iot.v1.HttpConfigOrBuilder getHttpConfigOrBuilder() {
return getHttpConfig();
}
+ public static final int LOG_LEVEL_FIELD_NUMBER = 11;
+ private int logLevel_;
+ /**
+ *
+ * **Beta Feature**
+ * The default logging verbosity for activity from devices in this registry.
+ * The verbosity level can be overridden by Device.log_level.
+ *
+ *
+ * .google.cloud.iot.v1.LogLevel log_level = 11;
+ */
+ public int getLogLevelValue() {
+ return logLevel_;
+ }
+ /**
+ *
+ * **Beta Feature**
+ * The default logging verbosity for activity from devices in this registry.
+ * The verbosity level can be overridden by Device.log_level.
+ *
+ *
+ * .google.cloud.iot.v1.LogLevel log_level = 11;
+ */
+ public com.google.cloud.iot.v1.LogLevel getLogLevel() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.iot.v1.LogLevel result = com.google.cloud.iot.v1.LogLevel.valueOf(logLevel_);
+ return result == null ? com.google.cloud.iot.v1.LogLevel.UNRECOGNIZED : result;
+ }
+
public static final int CREDENTIALS_FIELD_NUMBER = 8;
private java.util.List credentials_;
/**
@@ -588,6 +624,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
for (int i = 0; i < eventNotificationConfigs_.size(); i++) {
output.writeMessage(10, eventNotificationConfigs_.get(i));
}
+ if (logLevel_ != com.google.cloud.iot.v1.LogLevel.LOG_LEVEL_UNSPECIFIED.getNumber()) {
+ output.writeEnum(11, logLevel_);
+ }
unknownFields.writeTo(output);
}
@@ -623,6 +662,10 @@ public int getSerializedSize() {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, eventNotificationConfigs_.get(i));
}
+ if (logLevel_ != com.google.cloud.iot.v1.LogLevel.LOG_LEVEL_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(11, logLevel_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -660,6 +703,7 @@ public boolean equals(final java.lang.Object obj) {
result = result && getHttpConfig()
.equals(other.getHttpConfig());
}
+ result = result && logLevel_ == other.logLevel_;
result = result && getCredentialsList()
.equals(other.getCredentialsList());
result = result && unknownFields.equals(other.unknownFields);
@@ -693,6 +737,8 @@ public int hashCode() {
hash = (37 * hash) + HTTP_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getHttpConfig().hashCode();
}
+ hash = (37 * hash) + LOG_LEVEL_FIELD_NUMBER;
+ hash = (53 * hash) + logLevel_;
if (getCredentialsCount() > 0) {
hash = (37 * hash) + CREDENTIALS_FIELD_NUMBER;
hash = (53 * hash) + getCredentialsList().hashCode();
@@ -864,9 +910,11 @@ public Builder clear() {
httpConfig_ = null;
httpConfigBuilder_ = null;
}
+ logLevel_ = 0;
+
if (credentialsBuilder_ == null) {
credentials_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000040);
+ bitField0_ = (bitField0_ & ~0x00000080);
} else {
credentialsBuilder_.clear();
}
@@ -924,10 +972,11 @@ public com.google.cloud.iot.v1.DeviceRegistry buildPartial() {
} else {
result.httpConfig_ = httpConfigBuilder_.build();
}
+ result.logLevel_ = logLevel_;
if (credentialsBuilder_ == null) {
- if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ if (((bitField0_ & 0x00000080) == 0x00000080)) {
credentials_ = java.util.Collections.unmodifiableList(credentials_);
- bitField0_ = (bitField0_ & ~0x00000040);
+ bitField0_ = (bitField0_ & ~0x00000080);
}
result.credentials_ = credentials_;
} else {
@@ -1025,11 +1074,14 @@ public Builder mergeFrom(com.google.cloud.iot.v1.DeviceRegistry other) {
if (other.hasHttpConfig()) {
mergeHttpConfig(other.getHttpConfig());
}
+ if (other.logLevel_ != 0) {
+ setLogLevelValue(other.getLogLevelValue());
+ }
if (credentialsBuilder_ == null) {
if (!other.credentials_.isEmpty()) {
if (credentials_.isEmpty()) {
credentials_ = other.credentials_;
- bitField0_ = (bitField0_ & ~0x00000040);
+ bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureCredentialsIsMutable();
credentials_.addAll(other.credentials_);
@@ -1042,7 +1094,7 @@ public Builder mergeFrom(com.google.cloud.iot.v1.DeviceRegistry other) {
credentialsBuilder_.dispose();
credentialsBuilder_ = null;
credentials_ = other.credentials_;
- bitField0_ = (bitField0_ & ~0x00000040);
+ bitField0_ = (bitField0_ & ~0x00000080);
credentialsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getCredentialsFieldBuilder() : null;
@@ -2224,12 +2276,87 @@ public com.google.cloud.iot.v1.HttpConfigOrBuilder getHttpConfigOrBuilder() {
return httpConfigBuilder_;
}
+ private int logLevel_ = 0;
+ /**
+ *
+ * **Beta Feature**
+ * The default logging verbosity for activity from devices in this registry.
+ * The verbosity level can be overridden by Device.log_level.
+ *
+ *
+ * .google.cloud.iot.v1.LogLevel log_level = 11;
+ */
+ public int getLogLevelValue() {
+ return logLevel_;
+ }
+ /**
+ *
+ * **Beta Feature**
+ * The default logging verbosity for activity from devices in this registry.
+ * The verbosity level can be overridden by Device.log_level.
+ *
+ *
+ * .google.cloud.iot.v1.LogLevel log_level = 11;
+ */
+ public Builder setLogLevelValue(int value) {
+ logLevel_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * **Beta Feature**
+ * The default logging verbosity for activity from devices in this registry.
+ * The verbosity level can be overridden by Device.log_level.
+ *
+ *
+ * .google.cloud.iot.v1.LogLevel log_level = 11;
+ */
+ public com.google.cloud.iot.v1.LogLevel getLogLevel() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.iot.v1.LogLevel result = com.google.cloud.iot.v1.LogLevel.valueOf(logLevel_);
+ return result == null ? com.google.cloud.iot.v1.LogLevel.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ * **Beta Feature**
+ * The default logging verbosity for activity from devices in this registry.
+ * The verbosity level can be overridden by Device.log_level.
+ *
+ *
+ * .google.cloud.iot.v1.LogLevel log_level = 11;
+ */
+ public Builder setLogLevel(com.google.cloud.iot.v1.LogLevel value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ logLevel_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * **Beta Feature**
+ * The default logging verbosity for activity from devices in this registry.
+ * The verbosity level can be overridden by Device.log_level.
+ *
+ *
+ * .google.cloud.iot.v1.LogLevel log_level = 11;
+ */
+ public Builder clearLogLevel() {
+
+ logLevel_ = 0;
+ onChanged();
+ return this;
+ }
+
private java.util.List credentials_ =
java.util.Collections.emptyList();
private void ensureCredentialsIsMutable() {
- if (!((bitField0_ & 0x00000040) == 0x00000040)) {
+ if (!((bitField0_ & 0x00000080) == 0x00000080)) {
credentials_ = new java.util.ArrayList(credentials_);
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
}
}
@@ -2522,7 +2649,7 @@ public Builder addAllCredentials(
public Builder clearCredentials() {
if (credentialsBuilder_ == null) {
credentials_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000040);
+ bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
} else {
credentialsBuilder_.clear();
@@ -2690,7 +2817,7 @@ public com.google.cloud.iot.v1.RegistryCredential.Builder addCredentialsBuilder(
credentialsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.iot.v1.RegistryCredential, com.google.cloud.iot.v1.RegistryCredential.Builder, com.google.cloud.iot.v1.RegistryCredentialOrBuilder>(
credentials_,
- ((bitField0_ & 0x00000040) == 0x00000040),
+ ((bitField0_ & 0x00000080) == 0x00000080),
getParentForChildren(),
isClean());
credentials_ = null;
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceRegistryOrBuilder.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceRegistryOrBuilder.java
index fb1eff3332d9..92a8b8112f83 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceRegistryOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceRegistryOrBuilder.java
@@ -219,6 +219,27 @@ com.google.cloud.iot.v1.EventNotificationConfigOrBuilder getEventNotificationCon
*/
com.google.cloud.iot.v1.HttpConfigOrBuilder getHttpConfigOrBuilder();
+ /**
+ *
+ * **Beta Feature**
+ * The default logging verbosity for activity from devices in this registry.
+ * The verbosity level can be overridden by Device.log_level.
+ *
+ *
+ * .google.cloud.iot.v1.LogLevel log_level = 11;
+ */
+ int getLogLevelValue();
+ /**
+ *
+ * **Beta Feature**
+ * The default logging verbosity for activity from devices in this registry.
+ * The verbosity level can be overridden by Device.log_level.
+ *
+ *
+ * .google.cloud.iot.v1.LogLevel log_level = 11;
+ */
+ com.google.cloud.iot.v1.LogLevel getLogLevel();
+
/**
*
* The credentials used to verify the device credentials. No more than 10
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayAuthMethod.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayAuthMethod.java
new file mode 100644
index 000000000000..21f5995cfdae
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayAuthMethod.java
@@ -0,0 +1,168 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/resources.proto
+
+package com.google.cloud.iot.v1;
+
+/**
+ *
+ * The gateway authorization/authentication method. This setting determines how
+ * Cloud IoT Core authorizes/authenticate devices to access the gateway.
+ *
+ *
+ * Protobuf enum {@code google.cloud.iot.v1.GatewayAuthMethod}
+ */
+public enum GatewayAuthMethod
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ * No authentication/authorization method specified. No devices are allowed to
+ * access the gateway.
+ *
+ *
+ * GATEWAY_AUTH_METHOD_UNSPECIFIED = 0;
+ */
+ GATEWAY_AUTH_METHOD_UNSPECIFIED(0),
+ /**
+ *
+ * The device is authenticated through the gateway association only. Device
+ * credentials are ignored even if provided.
+ *
+ *
+ * ASSOCIATION_ONLY = 1;
+ */
+ ASSOCIATION_ONLY(1),
+ /**
+ *
+ * The device is authenticated through its own credentials. Gateway
+ * association is not checked.
+ *
+ *
+ * DEVICE_AUTH_TOKEN_ONLY = 2;
+ */
+ DEVICE_AUTH_TOKEN_ONLY(2),
+ /**
+ *
+ * The device is authenticated through both device credentials and gateway
+ * association. The device must be bound to the gateway and must provide its
+ * own credentials.
+ *
+ *
+ * ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3;
+ */
+ ASSOCIATION_AND_DEVICE_AUTH_TOKEN(3),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ * No authentication/authorization method specified. No devices are allowed to
+ * access the gateway.
+ *
+ *
+ * GATEWAY_AUTH_METHOD_UNSPECIFIED = 0;
+ */
+ public static final int GATEWAY_AUTH_METHOD_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ * The device is authenticated through the gateway association only. Device
+ * credentials are ignored even if provided.
+ *
+ *
+ * ASSOCIATION_ONLY = 1;
+ */
+ public static final int ASSOCIATION_ONLY_VALUE = 1;
+ /**
+ *
+ * The device is authenticated through its own credentials. Gateway
+ * association is not checked.
+ *
+ *
+ * DEVICE_AUTH_TOKEN_ONLY = 2;
+ */
+ public static final int DEVICE_AUTH_TOKEN_ONLY_VALUE = 2;
+ /**
+ *
+ * The device is authenticated through both device credentials and gateway
+ * association. The device must be bound to the gateway and must provide its
+ * own credentials.
+ *
+ *
+ * ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3;
+ */
+ public static final int ASSOCIATION_AND_DEVICE_AUTH_TOKEN_VALUE = 3;
+
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static GatewayAuthMethod valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static GatewayAuthMethod forNumber(int value) {
+ switch (value) {
+ case 0: return GATEWAY_AUTH_METHOD_UNSPECIFIED;
+ case 1: return ASSOCIATION_ONLY;
+ case 2: return DEVICE_AUTH_TOKEN_ONLY;
+ case 3: return ASSOCIATION_AND_DEVICE_AUTH_TOKEN;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static final com.google.protobuf.Internal.EnumLiteMap<
+ GatewayAuthMethod> internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public GatewayAuthMethod findValueByNumber(int number) {
+ return GatewayAuthMethod.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValues().get(ordinal());
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.ResourcesProto.getDescriptor().getEnumTypes().get(4);
+ }
+
+ private static final GatewayAuthMethod[] VALUES = values();
+
+ public static GatewayAuthMethod valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private GatewayAuthMethod(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.cloud.iot.v1.GatewayAuthMethod)
+}
+
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayConfig.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayConfig.java
new file mode 100644
index 000000000000..9a23f883de9a
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayConfig.java
@@ -0,0 +1,1051 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/resources.proto
+
+package com.google.cloud.iot.v1;
+
+/**
+ *
+ * Gateway-related configuration and state.
+ *
+ *
+ * Protobuf type {@code google.cloud.iot.v1.GatewayConfig}
+ */
+public final class GatewayConfig extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.GatewayConfig)
+ GatewayConfigOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use GatewayConfig.newBuilder() to construct.
+ private GatewayConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private GatewayConfig() {
+ gatewayType_ = 0;
+ gatewayAuthMethod_ = 0;
+ lastAccessedGatewayId_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private GatewayConfig(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8: {
+ int rawValue = input.readEnum();
+
+ gatewayType_ = rawValue;
+ break;
+ }
+ case 16: {
+ int rawValue = input.readEnum();
+
+ gatewayAuthMethod_ = rawValue;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ lastAccessedGatewayId_ = s;
+ break;
+ }
+ case 34: {
+ com.google.protobuf.Timestamp.Builder subBuilder = null;
+ if (lastAccessedGatewayTime_ != null) {
+ subBuilder = lastAccessedGatewayTime_.toBuilder();
+ }
+ lastAccessedGatewayTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(lastAccessedGatewayTime_);
+ lastAccessedGatewayTime_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.ResourcesProto.internal_static_google_cloud_iot_v1_GatewayConfig_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.iot.v1.ResourcesProto.internal_static_google_cloud_iot_v1_GatewayConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.iot.v1.GatewayConfig.class, com.google.cloud.iot.v1.GatewayConfig.Builder.class);
+ }
+
+ public static final int GATEWAY_TYPE_FIELD_NUMBER = 1;
+ private int gatewayType_;
+ /**
+ *
+ * Indicates whether the device is a gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public int getGatewayTypeValue() {
+ return gatewayType_;
+ }
+ /**
+ *
+ * Indicates whether the device is a gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public com.google.cloud.iot.v1.GatewayType getGatewayType() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.iot.v1.GatewayType result = com.google.cloud.iot.v1.GatewayType.valueOf(gatewayType_);
+ return result == null ? com.google.cloud.iot.v1.GatewayType.UNRECOGNIZED : result;
+ }
+
+ public static final int GATEWAY_AUTH_METHOD_FIELD_NUMBER = 2;
+ private int gatewayAuthMethod_;
+ /**
+ *
+ * Indicates how to authorize and/or authenticate devices to access the
+ * gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2;
+ */
+ public int getGatewayAuthMethodValue() {
+ return gatewayAuthMethod_;
+ }
+ /**
+ *
+ * Indicates how to authorize and/or authenticate devices to access the
+ * gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2;
+ */
+ public com.google.cloud.iot.v1.GatewayAuthMethod getGatewayAuthMethod() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.iot.v1.GatewayAuthMethod result = com.google.cloud.iot.v1.GatewayAuthMethod.valueOf(gatewayAuthMethod_);
+ return result == null ? com.google.cloud.iot.v1.GatewayAuthMethod.UNRECOGNIZED : result;
+ }
+
+ public static final int LAST_ACCESSED_GATEWAY_ID_FIELD_NUMBER = 3;
+ private volatile java.lang.Object lastAccessedGatewayId_;
+ /**
+ *
+ * [Output only] The ID of the gateway the device accessed most recently.
+ *
+ *
+ * string last_accessed_gateway_id = 3;
+ */
+ public java.lang.String getLastAccessedGatewayId() {
+ java.lang.Object ref = lastAccessedGatewayId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ lastAccessedGatewayId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output only] The ID of the gateway the device accessed most recently.
+ *
+ *
+ * string last_accessed_gateway_id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getLastAccessedGatewayIdBytes() {
+ java.lang.Object ref = lastAccessedGatewayId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ lastAccessedGatewayId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int LAST_ACCESSED_GATEWAY_TIME_FIELD_NUMBER = 4;
+ private com.google.protobuf.Timestamp lastAccessedGatewayTime_;
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ public boolean hasLastAccessedGatewayTime() {
+ return lastAccessedGatewayTime_ != null;
+ }
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ public com.google.protobuf.Timestamp getLastAccessedGatewayTime() {
+ return lastAccessedGatewayTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastAccessedGatewayTime_;
+ }
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ public com.google.protobuf.TimestampOrBuilder getLastAccessedGatewayTimeOrBuilder() {
+ return getLastAccessedGatewayTime();
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (gatewayType_ != com.google.cloud.iot.v1.GatewayType.GATEWAY_TYPE_UNSPECIFIED.getNumber()) {
+ output.writeEnum(1, gatewayType_);
+ }
+ if (gatewayAuthMethod_ != com.google.cloud.iot.v1.GatewayAuthMethod.GATEWAY_AUTH_METHOD_UNSPECIFIED.getNumber()) {
+ output.writeEnum(2, gatewayAuthMethod_);
+ }
+ if (!getLastAccessedGatewayIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, lastAccessedGatewayId_);
+ }
+ if (lastAccessedGatewayTime_ != null) {
+ output.writeMessage(4, getLastAccessedGatewayTime());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (gatewayType_ != com.google.cloud.iot.v1.GatewayType.GATEWAY_TYPE_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(1, gatewayType_);
+ }
+ if (gatewayAuthMethod_ != com.google.cloud.iot.v1.GatewayAuthMethod.GATEWAY_AUTH_METHOD_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(2, gatewayAuthMethod_);
+ }
+ if (!getLastAccessedGatewayIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, lastAccessedGatewayId_);
+ }
+ if (lastAccessedGatewayTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, getLastAccessedGatewayTime());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.iot.v1.GatewayConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.iot.v1.GatewayConfig other = (com.google.cloud.iot.v1.GatewayConfig) obj;
+
+ boolean result = true;
+ result = result && gatewayType_ == other.gatewayType_;
+ result = result && gatewayAuthMethod_ == other.gatewayAuthMethod_;
+ result = result && getLastAccessedGatewayId()
+ .equals(other.getLastAccessedGatewayId());
+ result = result && (hasLastAccessedGatewayTime() == other.hasLastAccessedGatewayTime());
+ if (hasLastAccessedGatewayTime()) {
+ result = result && getLastAccessedGatewayTime()
+ .equals(other.getLastAccessedGatewayTime());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + GATEWAY_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + gatewayType_;
+ hash = (37 * hash) + GATEWAY_AUTH_METHOD_FIELD_NUMBER;
+ hash = (53 * hash) + gatewayAuthMethod_;
+ hash = (37 * hash) + LAST_ACCESSED_GATEWAY_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getLastAccessedGatewayId().hashCode();
+ if (hasLastAccessedGatewayTime()) {
+ hash = (37 * hash) + LAST_ACCESSED_GATEWAY_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getLastAccessedGatewayTime().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.iot.v1.GatewayConfig parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.GatewayConfig parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.GatewayConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.GatewayConfig parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.GatewayConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.GatewayConfig parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.GatewayConfig parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.GatewayConfig parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.GatewayConfig parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.GatewayConfig parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.GatewayConfig parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.GatewayConfig parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.iot.v1.GatewayConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Gateway-related configuration and state.
+ *
+ *
+ * Protobuf type {@code google.cloud.iot.v1.GatewayConfig}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:google.cloud.iot.v1.GatewayConfig)
+ com.google.cloud.iot.v1.GatewayConfigOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.ResourcesProto.internal_static_google_cloud_iot_v1_GatewayConfig_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.iot.v1.ResourcesProto.internal_static_google_cloud_iot_v1_GatewayConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.iot.v1.GatewayConfig.class, com.google.cloud.iot.v1.GatewayConfig.Builder.class);
+ }
+
+ // Construct using com.google.cloud.iot.v1.GatewayConfig.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ gatewayType_ = 0;
+
+ gatewayAuthMethod_ = 0;
+
+ lastAccessedGatewayId_ = "";
+
+ if (lastAccessedGatewayTimeBuilder_ == null) {
+ lastAccessedGatewayTime_ = null;
+ } else {
+ lastAccessedGatewayTime_ = null;
+ lastAccessedGatewayTimeBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.cloud.iot.v1.ResourcesProto.internal_static_google_cloud_iot_v1_GatewayConfig_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.GatewayConfig getDefaultInstanceForType() {
+ return com.google.cloud.iot.v1.GatewayConfig.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.GatewayConfig build() {
+ com.google.cloud.iot.v1.GatewayConfig result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.GatewayConfig buildPartial() {
+ com.google.cloud.iot.v1.GatewayConfig result = new com.google.cloud.iot.v1.GatewayConfig(this);
+ result.gatewayType_ = gatewayType_;
+ result.gatewayAuthMethod_ = gatewayAuthMethod_;
+ result.lastAccessedGatewayId_ = lastAccessedGatewayId_;
+ if (lastAccessedGatewayTimeBuilder_ == null) {
+ result.lastAccessedGatewayTime_ = lastAccessedGatewayTime_;
+ } else {
+ result.lastAccessedGatewayTime_ = lastAccessedGatewayTimeBuilder_.build();
+ }
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.cloud.iot.v1.GatewayConfig) {
+ return mergeFrom((com.google.cloud.iot.v1.GatewayConfig)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.cloud.iot.v1.GatewayConfig other) {
+ if (other == com.google.cloud.iot.v1.GatewayConfig.getDefaultInstance()) return this;
+ if (other.gatewayType_ != 0) {
+ setGatewayTypeValue(other.getGatewayTypeValue());
+ }
+ if (other.gatewayAuthMethod_ != 0) {
+ setGatewayAuthMethodValue(other.getGatewayAuthMethodValue());
+ }
+ if (!other.getLastAccessedGatewayId().isEmpty()) {
+ lastAccessedGatewayId_ = other.lastAccessedGatewayId_;
+ onChanged();
+ }
+ if (other.hasLastAccessedGatewayTime()) {
+ mergeLastAccessedGatewayTime(other.getLastAccessedGatewayTime());
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ com.google.cloud.iot.v1.GatewayConfig parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (com.google.cloud.iot.v1.GatewayConfig) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int gatewayType_ = 0;
+ /**
+ *
+ * Indicates whether the device is a gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public int getGatewayTypeValue() {
+ return gatewayType_;
+ }
+ /**
+ *
+ * Indicates whether the device is a gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public Builder setGatewayTypeValue(int value) {
+ gatewayType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Indicates whether the device is a gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public com.google.cloud.iot.v1.GatewayType getGatewayType() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.iot.v1.GatewayType result = com.google.cloud.iot.v1.GatewayType.valueOf(gatewayType_);
+ return result == null ? com.google.cloud.iot.v1.GatewayType.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ * Indicates whether the device is a gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public Builder setGatewayType(com.google.cloud.iot.v1.GatewayType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ gatewayType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Indicates whether the device is a gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public Builder clearGatewayType() {
+
+ gatewayType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int gatewayAuthMethod_ = 0;
+ /**
+ *
+ * Indicates how to authorize and/or authenticate devices to access the
+ * gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2;
+ */
+ public int getGatewayAuthMethodValue() {
+ return gatewayAuthMethod_;
+ }
+ /**
+ *
+ * Indicates how to authorize and/or authenticate devices to access the
+ * gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2;
+ */
+ public Builder setGatewayAuthMethodValue(int value) {
+ gatewayAuthMethod_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Indicates how to authorize and/or authenticate devices to access the
+ * gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2;
+ */
+ public com.google.cloud.iot.v1.GatewayAuthMethod getGatewayAuthMethod() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.iot.v1.GatewayAuthMethod result = com.google.cloud.iot.v1.GatewayAuthMethod.valueOf(gatewayAuthMethod_);
+ return result == null ? com.google.cloud.iot.v1.GatewayAuthMethod.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ * Indicates how to authorize and/or authenticate devices to access the
+ * gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2;
+ */
+ public Builder setGatewayAuthMethod(com.google.cloud.iot.v1.GatewayAuthMethod value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ gatewayAuthMethod_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Indicates how to authorize and/or authenticate devices to access the
+ * gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2;
+ */
+ public Builder clearGatewayAuthMethod() {
+
+ gatewayAuthMethod_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object lastAccessedGatewayId_ = "";
+ /**
+ *
+ * [Output only] The ID of the gateway the device accessed most recently.
+ *
+ *
+ * string last_accessed_gateway_id = 3;
+ */
+ public java.lang.String getLastAccessedGatewayId() {
+ java.lang.Object ref = lastAccessedGatewayId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ lastAccessedGatewayId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output only] The ID of the gateway the device accessed most recently.
+ *
+ *
+ * string last_accessed_gateway_id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getLastAccessedGatewayIdBytes() {
+ java.lang.Object ref = lastAccessedGatewayId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ lastAccessedGatewayId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output only] The ID of the gateway the device accessed most recently.
+ *
+ *
+ * string last_accessed_gateway_id = 3;
+ */
+ public Builder setLastAccessedGatewayId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ lastAccessedGatewayId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output only] The ID of the gateway the device accessed most recently.
+ *
+ *
+ * string last_accessed_gateway_id = 3;
+ */
+ public Builder clearLastAccessedGatewayId() {
+
+ lastAccessedGatewayId_ = getDefaultInstance().getLastAccessedGatewayId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output only] The ID of the gateway the device accessed most recently.
+ *
+ *
+ * string last_accessed_gateway_id = 3;
+ */
+ public Builder setLastAccessedGatewayIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ lastAccessedGatewayId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp lastAccessedGatewayTime_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastAccessedGatewayTimeBuilder_;
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ public boolean hasLastAccessedGatewayTime() {
+ return lastAccessedGatewayTimeBuilder_ != null || lastAccessedGatewayTime_ != null;
+ }
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ public com.google.protobuf.Timestamp getLastAccessedGatewayTime() {
+ if (lastAccessedGatewayTimeBuilder_ == null) {
+ return lastAccessedGatewayTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastAccessedGatewayTime_;
+ } else {
+ return lastAccessedGatewayTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ public Builder setLastAccessedGatewayTime(com.google.protobuf.Timestamp value) {
+ if (lastAccessedGatewayTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ lastAccessedGatewayTime_ = value;
+ onChanged();
+ } else {
+ lastAccessedGatewayTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ public Builder setLastAccessedGatewayTime(
+ com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (lastAccessedGatewayTimeBuilder_ == null) {
+ lastAccessedGatewayTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ lastAccessedGatewayTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ public Builder mergeLastAccessedGatewayTime(com.google.protobuf.Timestamp value) {
+ if (lastAccessedGatewayTimeBuilder_ == null) {
+ if (lastAccessedGatewayTime_ != null) {
+ lastAccessedGatewayTime_ =
+ com.google.protobuf.Timestamp.newBuilder(lastAccessedGatewayTime_).mergeFrom(value).buildPartial();
+ } else {
+ lastAccessedGatewayTime_ = value;
+ }
+ onChanged();
+ } else {
+ lastAccessedGatewayTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ public Builder clearLastAccessedGatewayTime() {
+ if (lastAccessedGatewayTimeBuilder_ == null) {
+ lastAccessedGatewayTime_ = null;
+ onChanged();
+ } else {
+ lastAccessedGatewayTime_ = null;
+ lastAccessedGatewayTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ public com.google.protobuf.Timestamp.Builder getLastAccessedGatewayTimeBuilder() {
+
+ onChanged();
+ return getLastAccessedGatewayTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ public com.google.protobuf.TimestampOrBuilder getLastAccessedGatewayTimeOrBuilder() {
+ if (lastAccessedGatewayTimeBuilder_ != null) {
+ return lastAccessedGatewayTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return lastAccessedGatewayTime_ == null ?
+ com.google.protobuf.Timestamp.getDefaultInstance() : lastAccessedGatewayTime_;
+ }
+ }
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
+ getLastAccessedGatewayTimeFieldBuilder() {
+ if (lastAccessedGatewayTimeBuilder_ == null) {
+ lastAccessedGatewayTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
+ getLastAccessedGatewayTime(),
+ getParentForChildren(),
+ isClean());
+ lastAccessedGatewayTime_ = null;
+ }
+ return lastAccessedGatewayTimeBuilder_;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.iot.v1.GatewayConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.iot.v1.GatewayConfig)
+ private static final com.google.cloud.iot.v1.GatewayConfig DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.iot.v1.GatewayConfig();
+ }
+
+ public static com.google.cloud.iot.v1.GatewayConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public GatewayConfig parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new GatewayConfig(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.GatewayConfig getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayConfigOrBuilder.java
new file mode 100644
index 000000000000..321431e4ad3a
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayConfigOrBuilder.java
@@ -0,0 +1,91 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/resources.proto
+
+package com.google.cloud.iot.v1;
+
+public interface GatewayConfigOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.iot.v1.GatewayConfig)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ * Indicates whether the device is a gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ int getGatewayTypeValue();
+ /**
+ *
+ * Indicates whether the device is a gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ com.google.cloud.iot.v1.GatewayType getGatewayType();
+
+ /**
+ *
+ * Indicates how to authorize and/or authenticate devices to access the
+ * gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2;
+ */
+ int getGatewayAuthMethodValue();
+ /**
+ *
+ * Indicates how to authorize and/or authenticate devices to access the
+ * gateway.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2;
+ */
+ com.google.cloud.iot.v1.GatewayAuthMethod getGatewayAuthMethod();
+
+ /**
+ *
+ * [Output only] The ID of the gateway the device accessed most recently.
+ *
+ *
+ * string last_accessed_gateway_id = 3;
+ */
+ java.lang.String getLastAccessedGatewayId();
+ /**
+ *
+ * [Output only] The ID of the gateway the device accessed most recently.
+ *
+ *
+ * string last_accessed_gateway_id = 3;
+ */
+ com.google.protobuf.ByteString
+ getLastAccessedGatewayIdBytes();
+
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ boolean hasLastAccessedGatewayTime();
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ com.google.protobuf.Timestamp getLastAccessedGatewayTime();
+ /**
+ *
+ * [Output only] The most recent time at which the device accessed the gateway
+ * specified in `last_accessed_gateway`.
+ *
+ *
+ * .google.protobuf.Timestamp last_accessed_gateway_time = 4;
+ */
+ com.google.protobuf.TimestampOrBuilder getLastAccessedGatewayTimeOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayListOptions.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayListOptions.java
new file mode 100644
index 000000000000..7a49febdbaa4
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayListOptions.java
@@ -0,0 +1,1045 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/device_manager.proto
+
+package com.google.cloud.iot.v1;
+
+/**
+ *
+ * Options for limiting the list based on gateway type and associations.
+ *
+ *
+ * Protobuf type {@code google.cloud.iot.v1.GatewayListOptions}
+ */
+public final class GatewayListOptions extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.GatewayListOptions)
+ GatewayListOptionsOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use GatewayListOptions.newBuilder() to construct.
+ private GatewayListOptions(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private GatewayListOptions() {
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private GatewayListOptions(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8: {
+ int rawValue = input.readEnum();
+ filterCase_ = 1;
+ filter_ = rawValue;
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+ filterCase_ = 2;
+ filter_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+ filterCase_ = 3;
+ filter_ = s;
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_GatewayListOptions_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_GatewayListOptions_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.iot.v1.GatewayListOptions.class, com.google.cloud.iot.v1.GatewayListOptions.Builder.class);
+ }
+
+ private int filterCase_ = 0;
+ private java.lang.Object filter_;
+ public enum FilterCase
+ implements com.google.protobuf.Internal.EnumLite {
+ GATEWAY_TYPE(1),
+ ASSOCIATIONS_GATEWAY_ID(2),
+ ASSOCIATIONS_DEVICE_ID(3),
+ FILTER_NOT_SET(0);
+ private final int value;
+ private FilterCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static FilterCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static FilterCase forNumber(int value) {
+ switch (value) {
+ case 1: return GATEWAY_TYPE;
+ case 2: return ASSOCIATIONS_GATEWAY_ID;
+ case 3: return ASSOCIATIONS_DEVICE_ID;
+ case 0: return FILTER_NOT_SET;
+ default: return null;
+ }
+ }
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public FilterCase
+ getFilterCase() {
+ return FilterCase.forNumber(
+ filterCase_);
+ }
+
+ public static final int GATEWAY_TYPE_FIELD_NUMBER = 1;
+ /**
+ *
+ * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ * is specified, only non-gateway devices are returned. If
+ * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public int getGatewayTypeValue() {
+ if (filterCase_ == 1) {
+ return (java.lang.Integer) filter_;
+ }
+ return 0;
+ }
+ /**
+ *
+ * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ * is specified, only non-gateway devices are returned. If
+ * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public com.google.cloud.iot.v1.GatewayType getGatewayType() {
+ if (filterCase_ == 1) {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.iot.v1.GatewayType result = com.google.cloud.iot.v1.GatewayType.valueOf(
+ (java.lang.Integer) filter_);
+ return result == null ? com.google.cloud.iot.v1.GatewayType.UNRECOGNIZED : result;
+ }
+ return com.google.cloud.iot.v1.GatewayType.GATEWAY_TYPE_UNSPECIFIED;
+ }
+
+ public static final int ASSOCIATIONS_GATEWAY_ID_FIELD_NUMBER = 2;
+ /**
+ *
+ * If set, only devices associated with the specified gateway are returned.
+ * The gateway ID can be numeric (`num_id`) or the user-defined string
+ * (`id`). For example, if `123` is specified, only devices bound to the
+ * gateway with `num_id` 123 are returned.
+ *
+ *
+ * string associations_gateway_id = 2;
+ */
+ public java.lang.String getAssociationsGatewayId() {
+ java.lang.Object ref = "";
+ if (filterCase_ == 2) {
+ ref = filter_;
+ }
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (filterCase_ == 2) {
+ filter_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * If set, only devices associated with the specified gateway are returned.
+ * The gateway ID can be numeric (`num_id`) or the user-defined string
+ * (`id`). For example, if `123` is specified, only devices bound to the
+ * gateway with `num_id` 123 are returned.
+ *
+ *
+ * string associations_gateway_id = 2;
+ */
+ public com.google.protobuf.ByteString
+ getAssociationsGatewayIdBytes() {
+ java.lang.Object ref = "";
+ if (filterCase_ == 2) {
+ ref = filter_;
+ }
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ if (filterCase_ == 2) {
+ filter_ = b;
+ }
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ASSOCIATIONS_DEVICE_ID_FIELD_NUMBER = 3;
+ /**
+ *
+ * If set, returns only the gateways with which the specified device is
+ * associated. The device ID can be numeric (`num_id`) or the user-defined
+ * string (`id`). For example, if `456` is specified, returns only the
+ * gateways to which the device with `num_id` 456 is bound.
+ *
+ *
+ * string associations_device_id = 3;
+ */
+ public java.lang.String getAssociationsDeviceId() {
+ java.lang.Object ref = "";
+ if (filterCase_ == 3) {
+ ref = filter_;
+ }
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (filterCase_ == 3) {
+ filter_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * If set, returns only the gateways with which the specified device is
+ * associated. The device ID can be numeric (`num_id`) or the user-defined
+ * string (`id`). For example, if `456` is specified, returns only the
+ * gateways to which the device with `num_id` 456 is bound.
+ *
+ *
+ * string associations_device_id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getAssociationsDeviceIdBytes() {
+ java.lang.Object ref = "";
+ if (filterCase_ == 3) {
+ ref = filter_;
+ }
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ if (filterCase_ == 3) {
+ filter_ = b;
+ }
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (filterCase_ == 1) {
+ output.writeEnum(1, ((java.lang.Integer) filter_));
+ }
+ if (filterCase_ == 2) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_);
+ }
+ if (filterCase_ == 3) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (filterCase_ == 1) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(1, ((java.lang.Integer) filter_));
+ }
+ if (filterCase_ == 2) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_);
+ }
+ if (filterCase_ == 3) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.iot.v1.GatewayListOptions)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.iot.v1.GatewayListOptions other = (com.google.cloud.iot.v1.GatewayListOptions) obj;
+
+ boolean result = true;
+ result = result && getFilterCase().equals(
+ other.getFilterCase());
+ if (!result) return false;
+ switch (filterCase_) {
+ case 1:
+ result = result && getGatewayTypeValue()
+ == other.getGatewayTypeValue();
+ break;
+ case 2:
+ result = result && getAssociationsGatewayId()
+ .equals(other.getAssociationsGatewayId());
+ break;
+ case 3:
+ result = result && getAssociationsDeviceId()
+ .equals(other.getAssociationsDeviceId());
+ break;
+ case 0:
+ default:
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ switch (filterCase_) {
+ case 1:
+ hash = (37 * hash) + GATEWAY_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getGatewayTypeValue();
+ break;
+ case 2:
+ hash = (37 * hash) + ASSOCIATIONS_GATEWAY_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getAssociationsGatewayId().hashCode();
+ break;
+ case 3:
+ hash = (37 * hash) + ASSOCIATIONS_DEVICE_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getAssociationsDeviceId().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.iot.v1.GatewayListOptions parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.GatewayListOptions parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.GatewayListOptions parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.GatewayListOptions parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.GatewayListOptions parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.GatewayListOptions parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.GatewayListOptions parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.GatewayListOptions parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.GatewayListOptions parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.GatewayListOptions parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.GatewayListOptions parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.GatewayListOptions parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.iot.v1.GatewayListOptions prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Options for limiting the list based on gateway type and associations.
+ *
+ *
+ * Protobuf type {@code google.cloud.iot.v1.GatewayListOptions}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:google.cloud.iot.v1.GatewayListOptions)
+ com.google.cloud.iot.v1.GatewayListOptionsOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_GatewayListOptions_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_GatewayListOptions_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.iot.v1.GatewayListOptions.class, com.google.cloud.iot.v1.GatewayListOptions.Builder.class);
+ }
+
+ // Construct using com.google.cloud.iot.v1.GatewayListOptions.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ filterCase_ = 0;
+ filter_ = null;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_GatewayListOptions_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.GatewayListOptions getDefaultInstanceForType() {
+ return com.google.cloud.iot.v1.GatewayListOptions.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.GatewayListOptions build() {
+ com.google.cloud.iot.v1.GatewayListOptions result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.GatewayListOptions buildPartial() {
+ com.google.cloud.iot.v1.GatewayListOptions result = new com.google.cloud.iot.v1.GatewayListOptions(this);
+ if (filterCase_ == 1) {
+ result.filter_ = filter_;
+ }
+ if (filterCase_ == 2) {
+ result.filter_ = filter_;
+ }
+ if (filterCase_ == 3) {
+ result.filter_ = filter_;
+ }
+ result.filterCase_ = filterCase_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.cloud.iot.v1.GatewayListOptions) {
+ return mergeFrom((com.google.cloud.iot.v1.GatewayListOptions)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.cloud.iot.v1.GatewayListOptions other) {
+ if (other == com.google.cloud.iot.v1.GatewayListOptions.getDefaultInstance()) return this;
+ switch (other.getFilterCase()) {
+ case GATEWAY_TYPE: {
+ setGatewayTypeValue(other.getGatewayTypeValue());
+ break;
+ }
+ case ASSOCIATIONS_GATEWAY_ID: {
+ filterCase_ = 2;
+ filter_ = other.filter_;
+ onChanged();
+ break;
+ }
+ case ASSOCIATIONS_DEVICE_ID: {
+ filterCase_ = 3;
+ filter_ = other.filter_;
+ onChanged();
+ break;
+ }
+ case FILTER_NOT_SET: {
+ break;
+ }
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ com.google.cloud.iot.v1.GatewayListOptions parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (com.google.cloud.iot.v1.GatewayListOptions) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int filterCase_ = 0;
+ private java.lang.Object filter_;
+ public FilterCase
+ getFilterCase() {
+ return FilterCase.forNumber(
+ filterCase_);
+ }
+
+ public Builder clearFilter() {
+ filterCase_ = 0;
+ filter_ = null;
+ onChanged();
+ return this;
+ }
+
+
+ /**
+ *
+ * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ * is specified, only non-gateway devices are returned. If
+ * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public int getGatewayTypeValue() {
+ if (filterCase_ == 1) {
+ return ((java.lang.Integer) filter_).intValue();
+ }
+ return 0;
+ }
+ /**
+ *
+ * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ * is specified, only non-gateway devices are returned. If
+ * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public Builder setGatewayTypeValue(int value) {
+ filterCase_ = 1;
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ * is specified, only non-gateway devices are returned. If
+ * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public com.google.cloud.iot.v1.GatewayType getGatewayType() {
+ if (filterCase_ == 1) {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.iot.v1.GatewayType result = com.google.cloud.iot.v1.GatewayType.valueOf(
+ (java.lang.Integer) filter_);
+ return result == null ? com.google.cloud.iot.v1.GatewayType.UNRECOGNIZED : result;
+ }
+ return com.google.cloud.iot.v1.GatewayType.GATEWAY_TYPE_UNSPECIFIED;
+ }
+ /**
+ *
+ * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ * is specified, only non-gateway devices are returned. If
+ * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public Builder setGatewayType(com.google.cloud.iot.v1.GatewayType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ filterCase_ = 1;
+ filter_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ * is specified, only non-gateway devices are returned. If
+ * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ public Builder clearGatewayType() {
+ if (filterCase_ == 1) {
+ filterCase_ = 0;
+ filter_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ * If set, only devices associated with the specified gateway are returned.
+ * The gateway ID can be numeric (`num_id`) or the user-defined string
+ * (`id`). For example, if `123` is specified, only devices bound to the
+ * gateway with `num_id` 123 are returned.
+ *
+ *
+ * string associations_gateway_id = 2;
+ */
+ public java.lang.String getAssociationsGatewayId() {
+ java.lang.Object ref = "";
+ if (filterCase_ == 2) {
+ ref = filter_;
+ }
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (filterCase_ == 2) {
+ filter_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * If set, only devices associated with the specified gateway are returned.
+ * The gateway ID can be numeric (`num_id`) or the user-defined string
+ * (`id`). For example, if `123` is specified, only devices bound to the
+ * gateway with `num_id` 123 are returned.
+ *
+ *
+ * string associations_gateway_id = 2;
+ */
+ public com.google.protobuf.ByteString
+ getAssociationsGatewayIdBytes() {
+ java.lang.Object ref = "";
+ if (filterCase_ == 2) {
+ ref = filter_;
+ }
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ if (filterCase_ == 2) {
+ filter_ = b;
+ }
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * If set, only devices associated with the specified gateway are returned.
+ * The gateway ID can be numeric (`num_id`) or the user-defined string
+ * (`id`). For example, if `123` is specified, only devices bound to the
+ * gateway with `num_id` 123 are returned.
+ *
+ *
+ * string associations_gateway_id = 2;
+ */
+ public Builder setAssociationsGatewayId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ filterCase_ = 2;
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * If set, only devices associated with the specified gateway are returned.
+ * The gateway ID can be numeric (`num_id`) or the user-defined string
+ * (`id`). For example, if `123` is specified, only devices bound to the
+ * gateway with `num_id` 123 are returned.
+ *
+ *
+ * string associations_gateway_id = 2;
+ */
+ public Builder clearAssociationsGatewayId() {
+ if (filterCase_ == 2) {
+ filterCase_ = 0;
+ filter_ = null;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ * If set, only devices associated with the specified gateway are returned.
+ * The gateway ID can be numeric (`num_id`) or the user-defined string
+ * (`id`). For example, if `123` is specified, only devices bound to the
+ * gateway with `num_id` 123 are returned.
+ *
+ *
+ * string associations_gateway_id = 2;
+ */
+ public Builder setAssociationsGatewayIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ filterCase_ = 2;
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ * If set, returns only the gateways with which the specified device is
+ * associated. The device ID can be numeric (`num_id`) or the user-defined
+ * string (`id`). For example, if `456` is specified, returns only the
+ * gateways to which the device with `num_id` 456 is bound.
+ *
+ *
+ * string associations_device_id = 3;
+ */
+ public java.lang.String getAssociationsDeviceId() {
+ java.lang.Object ref = "";
+ if (filterCase_ == 3) {
+ ref = filter_;
+ }
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (filterCase_ == 3) {
+ filter_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * If set, returns only the gateways with which the specified device is
+ * associated. The device ID can be numeric (`num_id`) or the user-defined
+ * string (`id`). For example, if `456` is specified, returns only the
+ * gateways to which the device with `num_id` 456 is bound.
+ *
+ *
+ * string associations_device_id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getAssociationsDeviceIdBytes() {
+ java.lang.Object ref = "";
+ if (filterCase_ == 3) {
+ ref = filter_;
+ }
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ if (filterCase_ == 3) {
+ filter_ = b;
+ }
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * If set, returns only the gateways with which the specified device is
+ * associated. The device ID can be numeric (`num_id`) or the user-defined
+ * string (`id`). For example, if `456` is specified, returns only the
+ * gateways to which the device with `num_id` 456 is bound.
+ *
+ *
+ * string associations_device_id = 3;
+ */
+ public Builder setAssociationsDeviceId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ filterCase_ = 3;
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * If set, returns only the gateways with which the specified device is
+ * associated. The device ID can be numeric (`num_id`) or the user-defined
+ * string (`id`). For example, if `456` is specified, returns only the
+ * gateways to which the device with `num_id` 456 is bound.
+ *
+ *
+ * string associations_device_id = 3;
+ */
+ public Builder clearAssociationsDeviceId() {
+ if (filterCase_ == 3) {
+ filterCase_ = 0;
+ filter_ = null;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ * If set, returns only the gateways with which the specified device is
+ * associated. The device ID can be numeric (`num_id`) or the user-defined
+ * string (`id`). For example, if `456` is specified, returns only the
+ * gateways to which the device with `num_id` 456 is bound.
+ *
+ *
+ * string associations_device_id = 3;
+ */
+ public Builder setAssociationsDeviceIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ filterCase_ = 3;
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.iot.v1.GatewayListOptions)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.iot.v1.GatewayListOptions)
+ private static final com.google.cloud.iot.v1.GatewayListOptions DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.iot.v1.GatewayListOptions();
+ }
+
+ public static com.google.cloud.iot.v1.GatewayListOptions getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public GatewayListOptions parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new GatewayListOptions(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.GatewayListOptions getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayListOptionsOrBuilder.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayListOptionsOrBuilder.java
new file mode 100644
index 000000000000..2e39262d85d3
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayListOptionsOrBuilder.java
@@ -0,0 +1,80 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/device_manager.proto
+
+package com.google.cloud.iot.v1;
+
+public interface GatewayListOptionsOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.iot.v1.GatewayListOptions)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ * is specified, only non-gateway devices are returned. If
+ * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ int getGatewayTypeValue();
+ /**
+ *
+ * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ * is specified, only non-gateway devices are returned. If
+ * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayType gateway_type = 1;
+ */
+ com.google.cloud.iot.v1.GatewayType getGatewayType();
+
+ /**
+ *
+ * If set, only devices associated with the specified gateway are returned.
+ * The gateway ID can be numeric (`num_id`) or the user-defined string
+ * (`id`). For example, if `123` is specified, only devices bound to the
+ * gateway with `num_id` 123 are returned.
+ *
+ *
+ * string associations_gateway_id = 2;
+ */
+ java.lang.String getAssociationsGatewayId();
+ /**
+ *
+ * If set, only devices associated with the specified gateway are returned.
+ * The gateway ID can be numeric (`num_id`) or the user-defined string
+ * (`id`). For example, if `123` is specified, only devices bound to the
+ * gateway with `num_id` 123 are returned.
+ *
+ *
+ * string associations_gateway_id = 2;
+ */
+ com.google.protobuf.ByteString
+ getAssociationsGatewayIdBytes();
+
+ /**
+ *
+ * If set, returns only the gateways with which the specified device is
+ * associated. The device ID can be numeric (`num_id`) or the user-defined
+ * string (`id`). For example, if `456` is specified, returns only the
+ * gateways to which the device with `num_id` 456 is bound.
+ *
+ *
+ * string associations_device_id = 3;
+ */
+ java.lang.String getAssociationsDeviceId();
+ /**
+ *
+ * If set, returns only the gateways with which the specified device is
+ * associated. The device ID can be numeric (`num_id`) or the user-defined
+ * string (`id`). For example, if `456` is specified, returns only the
+ * gateways to which the device with `num_id` 456 is bound.
+ *
+ *
+ * string associations_device_id = 3;
+ */
+ com.google.protobuf.ByteString
+ getAssociationsDeviceIdBytes();
+
+ public com.google.cloud.iot.v1.GatewayListOptions.FilterCase getFilterCase();
+}
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayType.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayType.java
new file mode 100644
index 000000000000..2b676547654e
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/GatewayType.java
@@ -0,0 +1,140 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/resources.proto
+
+package com.google.cloud.iot.v1;
+
+/**
+ *
+ * Gateway type.
+ *
+ *
+ * Protobuf enum {@code google.cloud.iot.v1.GatewayType}
+ */
+public enum GatewayType
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ * If unspecified, the device is considered a non-gateway device.
+ *
+ *
+ * GATEWAY_TYPE_UNSPECIFIED = 0;
+ */
+ GATEWAY_TYPE_UNSPECIFIED(0),
+ /**
+ *
+ * The device is a gateway.
+ *
+ *
+ * GATEWAY = 1;
+ */
+ GATEWAY(1),
+ /**
+ *
+ * The device is not a gateway.
+ *
+ *
+ * NON_GATEWAY = 2;
+ */
+ NON_GATEWAY(2),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ * If unspecified, the device is considered a non-gateway device.
+ *
+ *
+ * GATEWAY_TYPE_UNSPECIFIED = 0;
+ */
+ public static final int GATEWAY_TYPE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ * The device is a gateway.
+ *
+ *
+ * GATEWAY = 1;
+ */
+ public static final int GATEWAY_VALUE = 1;
+ /**
+ *
+ * The device is not a gateway.
+ *
+ *
+ * NON_GATEWAY = 2;
+ */
+ public static final int NON_GATEWAY_VALUE = 2;
+
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static GatewayType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static GatewayType forNumber(int value) {
+ switch (value) {
+ case 0: return GATEWAY_TYPE_UNSPECIFIED;
+ case 1: return GATEWAY;
+ case 2: return NON_GATEWAY;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static final com.google.protobuf.Internal.EnumLiteMap<
+ GatewayType> internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public GatewayType findValueByNumber(int number) {
+ return GatewayType.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValues().get(ordinal());
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.ResourcesProto.getDescriptor().getEnumTypes().get(3);
+ }
+
+ private static final GatewayType[] VALUES = values();
+
+ public static GatewayType valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private GatewayType(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.cloud.iot.v1.GatewayType)
+}
+
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDeviceRegistriesRequest.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDeviceRegistriesRequest.java
index 2c56c7757f6a..b73a7d70dac6 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDeviceRegistriesRequest.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDeviceRegistriesRequest.java
@@ -148,8 +148,8 @@ public java.lang.String getParent() {
*
* The maximum number of registries to return in the response. If this value
* is zero, the service will select a default size. A call may return fewer
- * objects than requested, but if there is a non-empty `page_token`, it
- * indicates that more entries are available.
+ * objects than requested. A non-empty `next_page_token` in the response
+ * indicates that more data is available.
*
*
* int32 page_size = 2;
@@ -163,8 +163,8 @@ public int getPageSize() {
/**
*
* The value returned by the last `ListDeviceRegistriesResponse`; indicates
- * that this is a continuation of a prior `ListDeviceRegistries` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDeviceRegistries` call and
+ * the system should return the next page of data.
*
*
* string page_token = 3;
@@ -184,8 +184,8 @@ public java.lang.String getPageToken() {
/**
*
* The value returned by the last `ListDeviceRegistriesResponse`; indicates
- * that this is a continuation of a prior `ListDeviceRegistries` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDeviceRegistries` call and
+ * the system should return the next page of data.
*
*
* string page_token = 3;
@@ -644,8 +644,8 @@ public Builder setParentBytes(
*
* The maximum number of registries to return in the response. If this value
* is zero, the service will select a default size. A call may return fewer
- * objects than requested, but if there is a non-empty `page_token`, it
- * indicates that more entries are available.
+ * objects than requested. A non-empty `next_page_token` in the response
+ * indicates that more data is available.
*
*
* int32 page_size = 2;
@@ -657,8 +657,8 @@ public int getPageSize() {
*
* The maximum number of registries to return in the response. If this value
* is zero, the service will select a default size. A call may return fewer
- * objects than requested, but if there is a non-empty `page_token`, it
- * indicates that more entries are available.
+ * objects than requested. A non-empty `next_page_token` in the response
+ * indicates that more data is available.
*
*
* int32 page_size = 2;
@@ -673,8 +673,8 @@ public Builder setPageSize(int value) {
*
* The maximum number of registries to return in the response. If this value
* is zero, the service will select a default size. A call may return fewer
- * objects than requested, but if there is a non-empty `page_token`, it
- * indicates that more entries are available.
+ * objects than requested. A non-empty `next_page_token` in the response
+ * indicates that more data is available.
*
*
* int32 page_size = 2;
@@ -690,8 +690,8 @@ public Builder clearPageSize() {
/**
*
* The value returned by the last `ListDeviceRegistriesResponse`; indicates
- * that this is a continuation of a prior `ListDeviceRegistries` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDeviceRegistries` call and
+ * the system should return the next page of data.
*
*
* string page_token = 3;
@@ -711,8 +711,8 @@ public java.lang.String getPageToken() {
/**
*
* The value returned by the last `ListDeviceRegistriesResponse`; indicates
- * that this is a continuation of a prior `ListDeviceRegistries` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDeviceRegistries` call and
+ * the system should return the next page of data.
*
*
* string page_token = 3;
@@ -733,8 +733,8 @@ public java.lang.String getPageToken() {
/**
*
* The value returned by the last `ListDeviceRegistriesResponse`; indicates
- * that this is a continuation of a prior `ListDeviceRegistries` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDeviceRegistries` call and
+ * the system should return the next page of data.
*
*
* string page_token = 3;
@@ -752,8 +752,8 @@ public Builder setPageToken(
/**
*
* The value returned by the last `ListDeviceRegistriesResponse`; indicates
- * that this is a continuation of a prior `ListDeviceRegistries` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDeviceRegistries` call and
+ * the system should return the next page of data.
*
*
* string page_token = 3;
@@ -767,8 +767,8 @@ public Builder clearPageToken() {
/**
*
* The value returned by the last `ListDeviceRegistriesResponse`; indicates
- * that this is a continuation of a prior `ListDeviceRegistries` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDeviceRegistries` call and
+ * the system should return the next page of data.
*
*
* string page_token = 3;
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDeviceRegistriesRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDeviceRegistriesRequestOrBuilder.java
index 8ac4c04aaa98..291ad0054445 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDeviceRegistriesRequestOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDeviceRegistriesRequestOrBuilder.java
@@ -31,8 +31,8 @@ public interface ListDeviceRegistriesRequestOrBuilder extends
*
* The maximum number of registries to return in the response. If this value
* is zero, the service will select a default size. A call may return fewer
- * objects than requested, but if there is a non-empty `page_token`, it
- * indicates that more entries are available.
+ * objects than requested. A non-empty `next_page_token` in the response
+ * indicates that more data is available.
*
*
* int32 page_size = 2;
@@ -42,8 +42,8 @@ public interface ListDeviceRegistriesRequestOrBuilder extends
/**
*
* The value returned by the last `ListDeviceRegistriesResponse`; indicates
- * that this is a continuation of a prior `ListDeviceRegistries` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDeviceRegistries` call and
+ * the system should return the next page of data.
*
*
* string page_token = 3;
@@ -52,8 +52,8 @@ public interface ListDeviceRegistriesRequestOrBuilder extends
/**
*
* The value returned by the last `ListDeviceRegistriesResponse`; indicates
- * that this is a continuation of a prior `ListDeviceRegistries` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDeviceRegistries` call and
+ * the system should return the next page of data.
*
*
* string page_token = 3;
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDevicesRequest.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDevicesRequest.java
index a16367428cd0..88c0bfaf67a5 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDevicesRequest.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDevicesRequest.java
@@ -100,6 +100,19 @@ private ListDevicesRequest(
break;
}
+ case 50: {
+ com.google.cloud.iot.v1.GatewayListOptions.Builder subBuilder = null;
+ if (gatewayListOptions_ != null) {
+ subBuilder = gatewayListOptions_.toBuilder();
+ }
+ gatewayListOptions_ = input.readMessage(com.google.cloud.iot.v1.GatewayListOptions.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(gatewayListOptions_);
+ gatewayListOptions_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
case 800: {
pageSize_ = input.readInt32();
@@ -198,8 +211,8 @@ public java.lang.String getParent() {
private java.util.List deviceNumIds_;
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -210,8 +223,8 @@ public java.lang.String getParent() {
}
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -221,8 +234,8 @@ public int getDeviceNumIdsCount() {
}
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -236,9 +249,8 @@ public long getDeviceNumIds(int index) {
private com.google.protobuf.LazyStringList deviceIds_;
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -249,9 +261,8 @@ public long getDeviceNumIds(int index) {
}
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -261,9 +272,8 @@ public int getDeviceIdsCount() {
}
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -273,9 +283,8 @@ public java.lang.String getDeviceIds(int index) {
}
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -290,7 +299,7 @@ public java.lang.String getDeviceIds(int index) {
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -302,7 +311,7 @@ public boolean hasFieldMask() {
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -314,7 +323,7 @@ public com.google.protobuf.FieldMask getFieldMask() {
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -324,14 +333,47 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() {
return getFieldMask();
}
+ public static final int GATEWAY_LIST_OPTIONS_FIELD_NUMBER = 6;
+ private com.google.cloud.iot.v1.GatewayListOptions gatewayListOptions_;
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ public boolean hasGatewayListOptions() {
+ return gatewayListOptions_ != null;
+ }
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ public com.google.cloud.iot.v1.GatewayListOptions getGatewayListOptions() {
+ return gatewayListOptions_ == null ? com.google.cloud.iot.v1.GatewayListOptions.getDefaultInstance() : gatewayListOptions_;
+ }
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ public com.google.cloud.iot.v1.GatewayListOptionsOrBuilder getGatewayListOptionsOrBuilder() {
+ return getGatewayListOptions();
+ }
+
public static final int PAGE_SIZE_FIELD_NUMBER = 100;
private int pageSize_;
/**
*
* The maximum number of devices to return in the response. If this value
* is zero, the service will select a default size. A call may return fewer
- * objects than requested, but if there is a non-empty `page_token`, it
- * indicates that more entries are available.
+ * objects than requested. A non-empty `next_page_token` in the response
+ * indicates that more data is available.
*
*
* int32 page_size = 100;
@@ -345,8 +387,8 @@ public int getPageSize() {
/**
*
* The value returned by the last `ListDevicesResponse`; indicates
- * that this is a continuation of a prior `ListDevices` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDevices` call and
+ * the system should return the next page of data.
*
*
* string page_token = 101;
@@ -366,8 +408,8 @@ public java.lang.String getPageToken() {
/**
*
* The value returned by the last `ListDevicesResponse`; indicates
- * that this is a continuation of a prior `ListDevices` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDevices` call and
+ * the system should return the next page of data.
*
*
* string page_token = 101;
@@ -417,6 +459,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (fieldMask_ != null) {
output.writeMessage(4, getFieldMask());
}
+ if (gatewayListOptions_ != null) {
+ output.writeMessage(6, getGatewayListOptions());
+ }
if (pageSize_ != 0) {
output.writeInt32(100, pageSize_);
}
@@ -461,6 +506,10 @@ public int getSerializedSize() {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getFieldMask());
}
+ if (gatewayListOptions_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(6, getGatewayListOptions());
+ }
if (pageSize_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(100, pageSize_);
@@ -495,6 +544,11 @@ public boolean equals(final java.lang.Object obj) {
result = result && getFieldMask()
.equals(other.getFieldMask());
}
+ result = result && (hasGatewayListOptions() == other.hasGatewayListOptions());
+ if (hasGatewayListOptions()) {
+ result = result && getGatewayListOptions()
+ .equals(other.getGatewayListOptions());
+ }
result = result && (getPageSize()
== other.getPageSize());
result = result && getPageToken()
@@ -524,6 +578,10 @@ public int hashCode() {
hash = (37 * hash) + FIELD_MASK_FIELD_NUMBER;
hash = (53 * hash) + getFieldMask().hashCode();
}
+ if (hasGatewayListOptions()) {
+ hash = (37 * hash) + GATEWAY_LIST_OPTIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getGatewayListOptions().hashCode();
+ }
hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
hash = (53 * hash) + getPageSize();
hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
@@ -677,6 +735,12 @@ public Builder clear() {
fieldMask_ = null;
fieldMaskBuilder_ = null;
}
+ if (gatewayListOptionsBuilder_ == null) {
+ gatewayListOptions_ = null;
+ } else {
+ gatewayListOptions_ = null;
+ gatewayListOptionsBuilder_ = null;
+ }
pageSize_ = 0;
pageToken_ = "";
@@ -725,6 +789,11 @@ public com.google.cloud.iot.v1.ListDevicesRequest buildPartial() {
} else {
result.fieldMask_ = fieldMaskBuilder_.build();
}
+ if (gatewayListOptionsBuilder_ == null) {
+ result.gatewayListOptions_ = gatewayListOptions_;
+ } else {
+ result.gatewayListOptions_ = gatewayListOptionsBuilder_.build();
+ }
result.pageSize_ = pageSize_;
result.pageToken_ = pageToken_;
result.bitField0_ = to_bitField0_;
@@ -803,6 +872,9 @@ public Builder mergeFrom(com.google.cloud.iot.v1.ListDevicesRequest other) {
if (other.hasFieldMask()) {
mergeFieldMask(other.getFieldMask());
}
+ if (other.hasGatewayListOptions()) {
+ mergeGatewayListOptions(other.getGatewayListOptions());
+ }
if (other.getPageSize() != 0) {
setPageSize(other.getPageSize());
}
@@ -943,8 +1015,8 @@ private void ensureDeviceNumIdsIsMutable() {
}
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -955,8 +1027,8 @@ private void ensureDeviceNumIdsIsMutable() {
}
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -966,8 +1038,8 @@ public int getDeviceNumIdsCount() {
}
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -977,8 +1049,8 @@ public long getDeviceNumIds(int index) {
}
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -992,8 +1064,8 @@ public Builder setDeviceNumIds(
}
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -1006,8 +1078,8 @@ public Builder addDeviceNumIds(long value) {
}
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -1022,8 +1094,8 @@ public Builder addAllDeviceNumIds(
}
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -1044,9 +1116,8 @@ private void ensureDeviceIdsIsMutable() {
}
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -1057,9 +1128,8 @@ private void ensureDeviceIdsIsMutable() {
}
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -1069,9 +1139,8 @@ public int getDeviceIdsCount() {
}
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -1081,9 +1150,8 @@ public java.lang.String getDeviceIds(int index) {
}
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -1094,9 +1162,8 @@ public java.lang.String getDeviceIds(int index) {
}
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -1113,9 +1180,8 @@ public Builder setDeviceIds(
}
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -1132,9 +1198,8 @@ public Builder addDeviceIds(
}
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -1149,9 +1214,8 @@ public Builder addAllDeviceIds(
}
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -1164,9 +1228,8 @@ public Builder clearDeviceIds() {
}
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -1189,7 +1252,7 @@ public Builder addDeviceIdsBytes(
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -1201,7 +1264,7 @@ public boolean hasFieldMask() {
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -1217,7 +1280,7 @@ public com.google.protobuf.FieldMask getFieldMask() {
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -1239,7 +1302,7 @@ public Builder setFieldMask(com.google.protobuf.FieldMask value) {
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -1259,7 +1322,7 @@ public Builder setFieldMask(
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -1283,7 +1346,7 @@ public Builder mergeFieldMask(com.google.protobuf.FieldMask value) {
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -1303,7 +1366,7 @@ public Builder clearFieldMask() {
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -1317,7 +1380,7 @@ public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() {
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -1334,7 +1397,7 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() {
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -1354,13 +1417,166 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() {
return fieldMaskBuilder_;
}
+ private com.google.cloud.iot.v1.GatewayListOptions gatewayListOptions_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.iot.v1.GatewayListOptions, com.google.cloud.iot.v1.GatewayListOptions.Builder, com.google.cloud.iot.v1.GatewayListOptionsOrBuilder> gatewayListOptionsBuilder_;
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ public boolean hasGatewayListOptions() {
+ return gatewayListOptionsBuilder_ != null || gatewayListOptions_ != null;
+ }
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ public com.google.cloud.iot.v1.GatewayListOptions getGatewayListOptions() {
+ if (gatewayListOptionsBuilder_ == null) {
+ return gatewayListOptions_ == null ? com.google.cloud.iot.v1.GatewayListOptions.getDefaultInstance() : gatewayListOptions_;
+ } else {
+ return gatewayListOptionsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ public Builder setGatewayListOptions(com.google.cloud.iot.v1.GatewayListOptions value) {
+ if (gatewayListOptionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ gatewayListOptions_ = value;
+ onChanged();
+ } else {
+ gatewayListOptionsBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ public Builder setGatewayListOptions(
+ com.google.cloud.iot.v1.GatewayListOptions.Builder builderForValue) {
+ if (gatewayListOptionsBuilder_ == null) {
+ gatewayListOptions_ = builderForValue.build();
+ onChanged();
+ } else {
+ gatewayListOptionsBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ public Builder mergeGatewayListOptions(com.google.cloud.iot.v1.GatewayListOptions value) {
+ if (gatewayListOptionsBuilder_ == null) {
+ if (gatewayListOptions_ != null) {
+ gatewayListOptions_ =
+ com.google.cloud.iot.v1.GatewayListOptions.newBuilder(gatewayListOptions_).mergeFrom(value).buildPartial();
+ } else {
+ gatewayListOptions_ = value;
+ }
+ onChanged();
+ } else {
+ gatewayListOptionsBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ public Builder clearGatewayListOptions() {
+ if (gatewayListOptionsBuilder_ == null) {
+ gatewayListOptions_ = null;
+ onChanged();
+ } else {
+ gatewayListOptions_ = null;
+ gatewayListOptionsBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ public com.google.cloud.iot.v1.GatewayListOptions.Builder getGatewayListOptionsBuilder() {
+
+ onChanged();
+ return getGatewayListOptionsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ public com.google.cloud.iot.v1.GatewayListOptionsOrBuilder getGatewayListOptionsOrBuilder() {
+ if (gatewayListOptionsBuilder_ != null) {
+ return gatewayListOptionsBuilder_.getMessageOrBuilder();
+ } else {
+ return gatewayListOptions_ == null ?
+ com.google.cloud.iot.v1.GatewayListOptions.getDefaultInstance() : gatewayListOptions_;
+ }
+ }
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.iot.v1.GatewayListOptions, com.google.cloud.iot.v1.GatewayListOptions.Builder, com.google.cloud.iot.v1.GatewayListOptionsOrBuilder>
+ getGatewayListOptionsFieldBuilder() {
+ if (gatewayListOptionsBuilder_ == null) {
+ gatewayListOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.iot.v1.GatewayListOptions, com.google.cloud.iot.v1.GatewayListOptions.Builder, com.google.cloud.iot.v1.GatewayListOptionsOrBuilder>(
+ getGatewayListOptions(),
+ getParentForChildren(),
+ isClean());
+ gatewayListOptions_ = null;
+ }
+ return gatewayListOptionsBuilder_;
+ }
+
private int pageSize_ ;
/**
*
* The maximum number of devices to return in the response. If this value
* is zero, the service will select a default size. A call may return fewer
- * objects than requested, but if there is a non-empty `page_token`, it
- * indicates that more entries are available.
+ * objects than requested. A non-empty `next_page_token` in the response
+ * indicates that more data is available.
*
*
* int32 page_size = 100;
@@ -1372,8 +1588,8 @@ public int getPageSize() {
*
* The maximum number of devices to return in the response. If this value
* is zero, the service will select a default size. A call may return fewer
- * objects than requested, but if there is a non-empty `page_token`, it
- * indicates that more entries are available.
+ * objects than requested. A non-empty `next_page_token` in the response
+ * indicates that more data is available.
*
*
* int32 page_size = 100;
@@ -1388,8 +1604,8 @@ public Builder setPageSize(int value) {
*
* The maximum number of devices to return in the response. If this value
* is zero, the service will select a default size. A call may return fewer
- * objects than requested, but if there is a non-empty `page_token`, it
- * indicates that more entries are available.
+ * objects than requested. A non-empty `next_page_token` in the response
+ * indicates that more data is available.
*
*
* int32 page_size = 100;
@@ -1405,8 +1621,8 @@ public Builder clearPageSize() {
/**
*
* The value returned by the last `ListDevicesResponse`; indicates
- * that this is a continuation of a prior `ListDevices` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDevices` call and
+ * the system should return the next page of data.
*
*
* string page_token = 101;
@@ -1426,8 +1642,8 @@ public java.lang.String getPageToken() {
/**
*
* The value returned by the last `ListDevicesResponse`; indicates
- * that this is a continuation of a prior `ListDevices` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDevices` call and
+ * the system should return the next page of data.
*
*
* string page_token = 101;
@@ -1448,8 +1664,8 @@ public java.lang.String getPageToken() {
/**
*
* The value returned by the last `ListDevicesResponse`; indicates
- * that this is a continuation of a prior `ListDevices` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDevices` call and
+ * the system should return the next page of data.
*
*
* string page_token = 101;
@@ -1467,8 +1683,8 @@ public Builder setPageToken(
/**
*
* The value returned by the last `ListDevicesResponse`; indicates
- * that this is a continuation of a prior `ListDevices` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDevices` call and
+ * the system should return the next page of data.
*
*
* string page_token = 101;
@@ -1482,8 +1698,8 @@ public Builder clearPageToken() {
/**
*
* The value returned by the last `ListDevicesResponse`; indicates
- * that this is a continuation of a prior `ListDevices` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDevices` call and
+ * the system should return the next page of data.
*
*
* string page_token = 101;
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDevicesRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDevicesRequestOrBuilder.java
index 89d102539e2b..08caf56c5b6f 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDevicesRequestOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ListDevicesRequestOrBuilder.java
@@ -29,8 +29,8 @@ public interface ListDevicesRequestOrBuilder extends
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -38,8 +38,8 @@ public interface ListDevicesRequestOrBuilder extends
java.util.List getDeviceNumIdsList();
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -47,8 +47,8 @@ public interface ListDevicesRequestOrBuilder extends
int getDeviceNumIdsCount();
/**
*
- * A list of device numerical ids. If empty, it will ignore this field. This
- * field cannot hold more than 10,000 entries.
+ * A list of device numeric IDs. If empty, this field is ignored. Maximum
+ * IDs: 10,000.
*
*
* repeated uint64 device_num_ids = 2;
@@ -57,9 +57,8 @@ public interface ListDevicesRequestOrBuilder extends
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -68,9 +67,8 @@ public interface ListDevicesRequestOrBuilder extends
getDeviceIdsList();
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -78,9 +76,8 @@ public interface ListDevicesRequestOrBuilder extends
int getDeviceIdsCount();
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -88,9 +85,8 @@ public interface ListDevicesRequestOrBuilder extends
java.lang.String getDeviceIds(int index);
/**
*
- * A list of device string identifiers. If empty, it will ignore this field.
- * For example, `['device0', 'device12']`. This field cannot hold more than
- * 10,000 entries.
+ * A list of device string IDs. For example, `['device0', 'device12']`.
+ * If empty, this field is ignored. Maximum IDs: 10,000
*
*
* repeated string device_ids = 3;
@@ -101,7 +97,7 @@ public interface ListDevicesRequestOrBuilder extends
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -111,7 +107,7 @@ public interface ListDevicesRequestOrBuilder extends
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -121,7 +117,7 @@ public interface ListDevicesRequestOrBuilder extends
/**
*
* The fields of the `Device` resource to be returned in the response. The
- * fields `id`, and `num_id` are always returned by default, along with any
+ * fields `id` and `num_id` are always returned, along with any
* other fields specified.
*
*
@@ -129,12 +125,37 @@ public interface ListDevicesRequestOrBuilder extends
*/
com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder();
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ boolean hasGatewayListOptions();
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ com.google.cloud.iot.v1.GatewayListOptions getGatewayListOptions();
+ /**
+ *
+ * Options related to gateways.
+ *
+ *
+ * .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;
+ */
+ com.google.cloud.iot.v1.GatewayListOptionsOrBuilder getGatewayListOptionsOrBuilder();
+
/**
*
* The maximum number of devices to return in the response. If this value
* is zero, the service will select a default size. A call may return fewer
- * objects than requested, but if there is a non-empty `page_token`, it
- * indicates that more entries are available.
+ * objects than requested. A non-empty `next_page_token` in the response
+ * indicates that more data is available.
*
*
* int32 page_size = 100;
@@ -144,8 +165,8 @@ public interface ListDevicesRequestOrBuilder extends
/**
*
* The value returned by the last `ListDevicesResponse`; indicates
- * that this is a continuation of a prior `ListDevices` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDevices` call and
+ * the system should return the next page of data.
*
*
* string page_token = 101;
@@ -154,8 +175,8 @@ public interface ListDevicesRequestOrBuilder extends
/**
*
* The value returned by the last `ListDevicesResponse`; indicates
- * that this is a continuation of a prior `ListDevices` call, and
- * that the system should return the next page of data.
+ * that this is a continuation of a prior `ListDevices` call and
+ * the system should return the next page of data.
*
*
* string page_token = 101;
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/LogLevel.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/LogLevel.java
new file mode 100644
index 000000000000..73669e6823d1
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/LogLevel.java
@@ -0,0 +1,180 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/resources.proto
+
+package com.google.cloud.iot.v1;
+
+/**
+ *
+ * **Beta Feature**
+ * The logging verbosity for device activity. Specifies which events should be
+ * written to logs. For example, if the LogLevel is ERROR, only events that
+ * terminate in errors will be logged. LogLevel is inclusive; enabling INFO
+ * logging will also enable ERROR logging.
+ *
+ *
+ * Protobuf enum {@code google.cloud.iot.v1.LogLevel}
+ */
+public enum LogLevel
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ * No logging specified. If not specified, logging will be disabled.
+ *
+ *
+ * LOG_LEVEL_UNSPECIFIED = 0;
+ */
+ LOG_LEVEL_UNSPECIFIED(0),
+ /**
+ *
+ * Disables logging.
+ *
+ *
+ * NONE = 10;
+ */
+ NONE(10),
+ /**
+ *
+ * Error events will be logged.
+ *
+ *
+ * ERROR = 20;
+ */
+ ERROR(20),
+ /**
+ *
+ * Informational events will be logged, such as connections and
+ * disconnections.
+ *
+ *
+ * INFO = 30;
+ */
+ INFO(30),
+ /**
+ *
+ * All events will be logged.
+ *
+ *
+ * DEBUG = 40;
+ */
+ DEBUG(40),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ * No logging specified. If not specified, logging will be disabled.
+ *
+ *
+ * LOG_LEVEL_UNSPECIFIED = 0;
+ */
+ public static final int LOG_LEVEL_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ * Disables logging.
+ *
+ *
+ * NONE = 10;
+ */
+ public static final int NONE_VALUE = 10;
+ /**
+ *
+ * Error events will be logged.
+ *
+ *
+ * ERROR = 20;
+ */
+ public static final int ERROR_VALUE = 20;
+ /**
+ *
+ * Informational events will be logged, such as connections and
+ * disconnections.
+ *
+ *
+ * INFO = 30;
+ */
+ public static final int INFO_VALUE = 30;
+ /**
+ *
+ * All events will be logged.
+ *
+ *
+ * DEBUG = 40;
+ */
+ public static final int DEBUG_VALUE = 40;
+
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static LogLevel valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static LogLevel forNumber(int value) {
+ switch (value) {
+ case 0: return LOG_LEVEL_UNSPECIFIED;
+ case 10: return NONE;
+ case 20: return ERROR;
+ case 30: return INFO;
+ case 40: return DEBUG;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static final com.google.protobuf.Internal.EnumLiteMap<
+ LogLevel> internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public LogLevel findValueByNumber(int number) {
+ return LogLevel.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValues().get(ordinal());
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.ResourcesProto.getDescriptor().getEnumTypes().get(2);
+ }
+
+ private static final LogLevel[] VALUES = values();
+
+ public static LogLevel valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private LogLevel(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.cloud.iot.v1.LogLevel)
+}
+
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/PublicKeyCertificateFormat.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/PublicKeyCertificateFormat.java
index fd6b786bb182..0b07a45b253f 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/PublicKeyCertificateFormat.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/PublicKeyCertificateFormat.java
@@ -101,7 +101,7 @@ public PublicKeyCertificateFormat findValueByNumber(int number) {
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
- return com.google.cloud.iot.v1.ResourcesProto.getDescriptor().getEnumTypes().get(2);
+ return com.google.cloud.iot.v1.ResourcesProto.getDescriptor().getEnumTypes().get(5);
}
private static final PublicKeyCertificateFormat[] VALUES = values();
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/PublicKeyFormat.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/PublicKeyFormat.java
index a5b984244985..dfbd64d0439b 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/PublicKeyFormat.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/PublicKeyFormat.java
@@ -170,7 +170,7 @@ public PublicKeyFormat findValueByNumber(int number) {
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
- return com.google.cloud.iot.v1.ResourcesProto.getDescriptor().getEnumTypes().get(3);
+ return com.google.cloud.iot.v1.ResourcesProto.getDescriptor().getEnumTypes().get(6);
}
private static final PublicKeyFormat[] VALUES = values();
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ResourcesProto.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ResourcesProto.java
index 97b5949d3561..af9039b3eb93 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ResourcesProto.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/ResourcesProto.java
@@ -24,6 +24,11 @@ public static void registerAllExtensions(
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_iot_v1_Device_MetadataEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_iot_v1_GatewayConfig_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_iot_v1_GatewayConfig_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_cloud_iot_v1_DeviceRegistry_descriptor;
static final
@@ -96,7 +101,7 @@ public static void registerAllExtensions(
"\n#google/cloud/iot/v1/resources.proto\022\023g" +
"oogle.cloud.iot.v1\032\034google/api/annotatio" +
"ns.proto\032\037google/protobuf/timestamp.prot" +
- "o\032\027google/rpc/status.proto\"\315\005\n\006Device\022\n\n" +
+ "o\032\027google/rpc/status.proto\"\273\006\n\006Device\022\n\n" +
"\002id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\016\n\006num_id\030\003 \001(\004\022" +
":\n\013credentials\030\014 \003(\0132%.google.cloud.iot." +
"v1.DeviceCredential\0227\n\023last_heartbeat_ti" +
@@ -111,64 +116,81 @@ public static void registerAllExtensions(
"Timestamp\022-\n\021last_error_status\030\013 \001(\0132\022.g" +
"oogle.rpc.Status\0221\n\006config\030\r \001(\0132!.googl" +
"e.cloud.iot.v1.DeviceConfig\022/\n\005state\030\020 \001" +
- "(\0132 .google.cloud.iot.v1.DeviceState\022;\n\010" +
- "metadata\030\021 \003(\0132).google.cloud.iot.v1.Dev" +
- "ice.MetadataEntry\032/\n\rMetadataEntry\022\013\n\003ke" +
- "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\367\002\n\016DeviceReg" +
- "istry\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022P\n\032event" +
- "_notification_configs\030\n \003(\0132,.google.clo" +
- "ud.iot.v1.EventNotificationConfig\022O\n\031sta" +
- "te_notification_config\030\007 \001(\0132,.google.cl" +
- "oud.iot.v1.StateNotificationConfig\0224\n\013mq" +
- "tt_config\030\004 \001(\0132\037.google.cloud.iot.v1.Mq" +
- "ttConfig\0224\n\013http_config\030\t \001(\0132\037.google.c" +
- "loud.iot.v1.HttpConfig\022<\n\013credentials\030\010 " +
- "\003(\0132\'.google.cloud.iot.v1.RegistryCreden" +
- "tial\"H\n\nMqttConfig\022:\n\022mqtt_enabled_state" +
- "\030\001 \001(\0162\036.google.cloud.iot.v1.MqttState\"H" +
- "\n\nHttpConfig\022:\n\022http_enabled_state\030\001 \001(\016" +
- "2\036.google.cloud.iot.v1.HttpState\"O\n\027Even" +
- "tNotificationConfig\022\031\n\021subfolder_matches" +
- "\030\002 \001(\t\022\031\n\021pubsub_topic_name\030\001 \001(\t\"4\n\027Sta" +
- "teNotificationConfig\022\031\n\021pubsub_topic_nam" +
- "e\030\001 \001(\t\"o\n\022RegistryCredential\022K\n\026public_" +
- "key_certificate\030\001 \001(\0132).google.cloud.iot" +
- ".v1.PublicKeyCertificateH\000B\014\n\ncredential" +
- "\"\320\001\n\026X509CertificateDetails\022\016\n\006issuer\030\001 " +
- "\001(\t\022\017\n\007subject\030\002 \001(\t\022.\n\nstart_time\030\003 \001(\013" +
- "2\032.google.protobuf.Timestamp\022/\n\013expiry_t" +
- "ime\030\004 \001(\0132\032.google.protobuf.Timestamp\022\033\n" +
- "\023signature_algorithm\030\005 \001(\t\022\027\n\017public_key" +
- "_type\030\006 \001(\t\"\257\001\n\024PublicKeyCertificate\022?\n\006" +
- "format\030\001 \001(\0162/.google.cloud.iot.v1.Publi" +
- "cKeyCertificateFormat\022\023\n\013certificate\030\002 \001" +
- "(\t\022A\n\014x509_details\030\003 \001(\0132+.google.cloud." +
- "iot.v1.X509CertificateDetails\"\225\001\n\020Device" +
- "Credential\022>\n\npublic_key\030\002 \001(\0132(.google." +
- "cloud.iot.v1.PublicKeyCredentialH\000\0223\n\017ex" +
- "piration_time\030\006 \001(\0132\032.google.protobuf.Ti" +
- "mestampB\014\n\ncredential\"X\n\023PublicKeyCreden" +
- "tial\0224\n\006format\030\001 \001(\0162$.google.cloud.iot." +
- "v1.PublicKeyFormat\022\013\n\003key\030\002 \001(\t\"\240\001\n\014Devi" +
- "ceConfig\022\017\n\007version\030\001 \001(\003\0225\n\021cloud_updat" +
- "e_time\030\002 \001(\0132\032.google.protobuf.Timestamp" +
- "\0223\n\017device_ack_time\030\003 \001(\0132\032.google.proto" +
- "buf.Timestamp\022\023\n\013binary_data\030\004 \001(\014\"S\n\013De" +
- "viceState\022/\n\013update_time\030\001 \001(\0132\032.google." +
- "protobuf.Timestamp\022\023\n\013binary_data\030\002 \001(\014*" +
- "L\n\tMqttState\022\032\n\026MQTT_STATE_UNSPECIFIED\020\000" +
- "\022\020\n\014MQTT_ENABLED\020\001\022\021\n\rMQTT_DISABLED\020\002*L\n" +
- "\tHttpState\022\032\n\026HTTP_STATE_UNSPECIFIED\020\000\022\020" +
- "\n\014HTTP_ENABLED\020\001\022\021\n\rHTTP_DISABLED\020\002*e\n\032P" +
- "ublicKeyCertificateFormat\022-\n)UNSPECIFIED" +
- "_PUBLIC_KEY_CERTIFICATE_FORMAT\020\000\022\030\n\024X509" +
- "_CERTIFICATE_PEM\020\001*v\n\017PublicKeyFormat\022!\n" +
- "\035UNSPECIFIED_PUBLIC_KEY_FORMAT\020\000\022\013\n\007RSA_" +
- "PEM\020\003\022\020\n\014RSA_X509_PEM\020\001\022\r\n\tES256_PEM\020\002\022\022" +
- "\n\016ES256_X509_PEM\020\004Bf\n\027com.google.cloud.i" +
- "ot.v1B\016ResourcesProtoP\001Z6google.golang.o" +
- "rg/genproto/googleapis/cloud/iot/v1;iot\370" +
- "\001\001b\006proto3"
+ "(\0132 .google.cloud.iot.v1.DeviceState\0220\n\t" +
+ "log_level\030\025 \001(\0162\035.google.cloud.iot.v1.Lo" +
+ "gLevel\022;\n\010metadata\030\021 \003(\0132).google.cloud." +
+ "iot.v1.Device.MetadataEntry\022:\n\016gateway_c" +
+ "onfig\030\030 \001(\0132\".google.cloud.iot.v1.Gatewa" +
+ "yConfig\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n" +
+ "\005value\030\002 \001(\t:\0028\001\"\356\001\n\rGatewayConfig\0226\n\014ga" +
+ "teway_type\030\001 \001(\0162 .google.cloud.iot.v1.G" +
+ "atewayType\022C\n\023gateway_auth_method\030\002 \001(\0162" +
+ "&.google.cloud.iot.v1.GatewayAuthMethod\022" +
+ " \n\030last_accessed_gateway_id\030\003 \001(\t\022>\n\032las" +
+ "t_accessed_gateway_time\030\004 \001(\0132\032.google.p" +
+ "rotobuf.Timestamp\"\251\003\n\016DeviceRegistry\022\n\n\002" +
+ "id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022P\n\032event_notifica" +
+ "tion_configs\030\n \003(\0132,.google.cloud.iot.v1" +
+ ".EventNotificationConfig\022O\n\031state_notifi" +
+ "cation_config\030\007 \001(\0132,.google.cloud.iot.v" +
+ "1.StateNotificationConfig\0224\n\013mqtt_config" +
+ "\030\004 \001(\0132\037.google.cloud.iot.v1.MqttConfig\022" +
+ "4\n\013http_config\030\t \001(\0132\037.google.cloud.iot." +
+ "v1.HttpConfig\0220\n\tlog_level\030\013 \001(\0162\035.googl" +
+ "e.cloud.iot.v1.LogLevel\022<\n\013credentials\030\010" +
+ " \003(\0132\'.google.cloud.iot.v1.RegistryCrede" +
+ "ntial\"H\n\nMqttConfig\022:\n\022mqtt_enabled_stat" +
+ "e\030\001 \001(\0162\036.google.cloud.iot.v1.MqttState\"" +
+ "H\n\nHttpConfig\022:\n\022http_enabled_state\030\001 \001(" +
+ "\0162\036.google.cloud.iot.v1.HttpState\"O\n\027Eve" +
+ "ntNotificationConfig\022\031\n\021subfolder_matche" +
+ "s\030\002 \001(\t\022\031\n\021pubsub_topic_name\030\001 \001(\t\"4\n\027St" +
+ "ateNotificationConfig\022\031\n\021pubsub_topic_na" +
+ "me\030\001 \001(\t\"o\n\022RegistryCredential\022K\n\026public" +
+ "_key_certificate\030\001 \001(\0132).google.cloud.io" +
+ "t.v1.PublicKeyCertificateH\000B\014\n\ncredentia" +
+ "l\"\320\001\n\026X509CertificateDetails\022\016\n\006issuer\030\001" +
+ " \001(\t\022\017\n\007subject\030\002 \001(\t\022.\n\nstart_time\030\003 \001(" +
+ "\0132\032.google.protobuf.Timestamp\022/\n\013expiry_" +
+ "time\030\004 \001(\0132\032.google.protobuf.Timestamp\022\033" +
+ "\n\023signature_algorithm\030\005 \001(\t\022\027\n\017public_ke" +
+ "y_type\030\006 \001(\t\"\257\001\n\024PublicKeyCertificate\022?\n" +
+ "\006format\030\001 \001(\0162/.google.cloud.iot.v1.Publ" +
+ "icKeyCertificateFormat\022\023\n\013certificate\030\002 " +
+ "\001(\t\022A\n\014x509_details\030\003 \001(\0132+.google.cloud" +
+ ".iot.v1.X509CertificateDetails\"\225\001\n\020Devic" +
+ "eCredential\022>\n\npublic_key\030\002 \001(\0132(.google" +
+ ".cloud.iot.v1.PublicKeyCredentialH\000\0223\n\017e" +
+ "xpiration_time\030\006 \001(\0132\032.google.protobuf.T" +
+ "imestampB\014\n\ncredential\"X\n\023PublicKeyCrede" +
+ "ntial\0224\n\006format\030\001 \001(\0162$.google.cloud.iot" +
+ ".v1.PublicKeyFormat\022\013\n\003key\030\002 \001(\t\"\240\001\n\014Dev" +
+ "iceConfig\022\017\n\007version\030\001 \001(\003\0225\n\021cloud_upda" +
+ "te_time\030\002 \001(\0132\032.google.protobuf.Timestam" +
+ "p\0223\n\017device_ack_time\030\003 \001(\0132\032.google.prot" +
+ "obuf.Timestamp\022\023\n\013binary_data\030\004 \001(\014\"S\n\013D" +
+ "eviceState\022/\n\013update_time\030\001 \001(\0132\032.google" +
+ ".protobuf.Timestamp\022\023\n\013binary_data\030\002 \001(\014" +
+ "*L\n\tMqttState\022\032\n\026MQTT_STATE_UNSPECIFIED\020" +
+ "\000\022\020\n\014MQTT_ENABLED\020\001\022\021\n\rMQTT_DISABLED\020\002*L" +
+ "\n\tHttpState\022\032\n\026HTTP_STATE_UNSPECIFIED\020\000\022" +
+ "\020\n\014HTTP_ENABLED\020\001\022\021\n\rHTTP_DISABLED\020\002*O\n\010" +
+ "LogLevel\022\031\n\025LOG_LEVEL_UNSPECIFIED\020\000\022\010\n\004N" +
+ "ONE\020\n\022\t\n\005ERROR\020\024\022\010\n\004INFO\020\036\022\t\n\005DEBUG\020(*I\n" +
+ "\013GatewayType\022\034\n\030GATEWAY_TYPE_UNSPECIFIED" +
+ "\020\000\022\013\n\007GATEWAY\020\001\022\017\n\013NON_GATEWAY\020\002*\221\001\n\021Gat" +
+ "ewayAuthMethod\022#\n\037GATEWAY_AUTH_METHOD_UN" +
+ "SPECIFIED\020\000\022\024\n\020ASSOCIATION_ONLY\020\001\022\032\n\026DEV" +
+ "ICE_AUTH_TOKEN_ONLY\020\002\022%\n!ASSOCIATION_AND" +
+ "_DEVICE_AUTH_TOKEN\020\003*e\n\032PublicKeyCertifi" +
+ "cateFormat\022-\n)UNSPECIFIED_PUBLIC_KEY_CER" +
+ "TIFICATE_FORMAT\020\000\022\030\n\024X509_CERTIFICATE_PE" +
+ "M\020\001*v\n\017PublicKeyFormat\022!\n\035UNSPECIFIED_PU" +
+ "BLIC_KEY_FORMAT\020\000\022\013\n\007RSA_PEM\020\003\022\020\n\014RSA_X5" +
+ "09_PEM\020\001\022\r\n\tES256_PEM\020\002\022\022\n\016ES256_X509_PE" +
+ "M\020\004Bf\n\027com.google.cloud.iot.v1B\016Resource" +
+ "sProtoP\001Z6google.golang.org/genproto/goo" +
+ "gleapis/cloud/iot/v1;iot\370\001\001b\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -190,81 +212,87 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
internal_static_google_cloud_iot_v1_Device_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_Device_descriptor,
- new java.lang.String[] { "Id", "Name", "NumId", "Credentials", "LastHeartbeatTime", "LastEventTime", "LastStateTime", "LastConfigAckTime", "LastConfigSendTime", "Blocked", "LastErrorTime", "LastErrorStatus", "Config", "State", "Metadata", });
+ new java.lang.String[] { "Id", "Name", "NumId", "Credentials", "LastHeartbeatTime", "LastEventTime", "LastStateTime", "LastConfigAckTime", "LastConfigSendTime", "Blocked", "LastErrorTime", "LastErrorStatus", "Config", "State", "LogLevel", "Metadata", "GatewayConfig", });
internal_static_google_cloud_iot_v1_Device_MetadataEntry_descriptor =
internal_static_google_cloud_iot_v1_Device_descriptor.getNestedTypes().get(0);
internal_static_google_cloud_iot_v1_Device_MetadataEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_Device_MetadataEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
- internal_static_google_cloud_iot_v1_DeviceRegistry_descriptor =
+ internal_static_google_cloud_iot_v1_GatewayConfig_descriptor =
getDescriptor().getMessageTypes().get(1);
+ internal_static_google_cloud_iot_v1_GatewayConfig_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_iot_v1_GatewayConfig_descriptor,
+ new java.lang.String[] { "GatewayType", "GatewayAuthMethod", "LastAccessedGatewayId", "LastAccessedGatewayTime", });
+ internal_static_google_cloud_iot_v1_DeviceRegistry_descriptor =
+ getDescriptor().getMessageTypes().get(2);
internal_static_google_cloud_iot_v1_DeviceRegistry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_DeviceRegistry_descriptor,
- new java.lang.String[] { "Id", "Name", "EventNotificationConfigs", "StateNotificationConfig", "MqttConfig", "HttpConfig", "Credentials", });
+ new java.lang.String[] { "Id", "Name", "EventNotificationConfigs", "StateNotificationConfig", "MqttConfig", "HttpConfig", "LogLevel", "Credentials", });
internal_static_google_cloud_iot_v1_MqttConfig_descriptor =
- getDescriptor().getMessageTypes().get(2);
+ getDescriptor().getMessageTypes().get(3);
internal_static_google_cloud_iot_v1_MqttConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_MqttConfig_descriptor,
new java.lang.String[] { "MqttEnabledState", });
internal_static_google_cloud_iot_v1_HttpConfig_descriptor =
- getDescriptor().getMessageTypes().get(3);
+ getDescriptor().getMessageTypes().get(4);
internal_static_google_cloud_iot_v1_HttpConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_HttpConfig_descriptor,
new java.lang.String[] { "HttpEnabledState", });
internal_static_google_cloud_iot_v1_EventNotificationConfig_descriptor =
- getDescriptor().getMessageTypes().get(4);
+ getDescriptor().getMessageTypes().get(5);
internal_static_google_cloud_iot_v1_EventNotificationConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_EventNotificationConfig_descriptor,
new java.lang.String[] { "SubfolderMatches", "PubsubTopicName", });
internal_static_google_cloud_iot_v1_StateNotificationConfig_descriptor =
- getDescriptor().getMessageTypes().get(5);
+ getDescriptor().getMessageTypes().get(6);
internal_static_google_cloud_iot_v1_StateNotificationConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_StateNotificationConfig_descriptor,
new java.lang.String[] { "PubsubTopicName", });
internal_static_google_cloud_iot_v1_RegistryCredential_descriptor =
- getDescriptor().getMessageTypes().get(6);
+ getDescriptor().getMessageTypes().get(7);
internal_static_google_cloud_iot_v1_RegistryCredential_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_RegistryCredential_descriptor,
new java.lang.String[] { "PublicKeyCertificate", "Credential", });
internal_static_google_cloud_iot_v1_X509CertificateDetails_descriptor =
- getDescriptor().getMessageTypes().get(7);
+ getDescriptor().getMessageTypes().get(8);
internal_static_google_cloud_iot_v1_X509CertificateDetails_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_X509CertificateDetails_descriptor,
new java.lang.String[] { "Issuer", "Subject", "StartTime", "ExpiryTime", "SignatureAlgorithm", "PublicKeyType", });
internal_static_google_cloud_iot_v1_PublicKeyCertificate_descriptor =
- getDescriptor().getMessageTypes().get(8);
+ getDescriptor().getMessageTypes().get(9);
internal_static_google_cloud_iot_v1_PublicKeyCertificate_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_PublicKeyCertificate_descriptor,
new java.lang.String[] { "Format", "Certificate", "X509Details", });
internal_static_google_cloud_iot_v1_DeviceCredential_descriptor =
- getDescriptor().getMessageTypes().get(9);
+ getDescriptor().getMessageTypes().get(10);
internal_static_google_cloud_iot_v1_DeviceCredential_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_DeviceCredential_descriptor,
new java.lang.String[] { "PublicKey", "ExpirationTime", "Credential", });
internal_static_google_cloud_iot_v1_PublicKeyCredential_descriptor =
- getDescriptor().getMessageTypes().get(10);
+ getDescriptor().getMessageTypes().get(11);
internal_static_google_cloud_iot_v1_PublicKeyCredential_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_PublicKeyCredential_descriptor,
new java.lang.String[] { "Format", "Key", });
internal_static_google_cloud_iot_v1_DeviceConfig_descriptor =
- getDescriptor().getMessageTypes().get(11);
+ getDescriptor().getMessageTypes().get(12);
internal_static_google_cloud_iot_v1_DeviceConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_DeviceConfig_descriptor,
new java.lang.String[] { "Version", "CloudUpdateTime", "DeviceAckTime", "BinaryData", });
internal_static_google_cloud_iot_v1_DeviceState_descriptor =
- getDescriptor().getMessageTypes().get(12);
+ getDescriptor().getMessageTypes().get(13);
internal_static_google_cloud_iot_v1_DeviceState_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_iot_v1_DeviceState_descriptor,
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/SendCommandToDeviceRequest.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/SendCommandToDeviceRequest.java
new file mode 100644
index 000000000000..ede0f5fe7ed7
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/SendCommandToDeviceRequest.java
@@ -0,0 +1,851 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/device_manager.proto
+
+package com.google.cloud.iot.v1;
+
+/**
+ *
+ * Request for `SendCommandToDevice`.
+ *
+ *
+ * Protobuf type {@code google.cloud.iot.v1.SendCommandToDeviceRequest}
+ */
+public final class SendCommandToDeviceRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.SendCommandToDeviceRequest)
+ SendCommandToDeviceRequestOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use SendCommandToDeviceRequest.newBuilder() to construct.
+ private SendCommandToDeviceRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private SendCommandToDeviceRequest() {
+ name_ = "";
+ binaryData_ = com.google.protobuf.ByteString.EMPTY;
+ subfolder_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private SendCommandToDeviceRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 18: {
+
+ binaryData_ = input.readBytes();
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ subfolder_ = s;
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_SendCommandToDeviceRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_SendCommandToDeviceRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.iot.v1.SendCommandToDeviceRequest.class, com.google.cloud.iot.v1.SendCommandToDeviceRequest.Builder.class);
+ }
+
+ public static final int NAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object name_;
+ /**
+ *
+ * The name of the device. For example,
+ * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The name of the device. For example,
+ * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int BINARY_DATA_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString binaryData_;
+ /**
+ *
+ * The command data to send to the device.
+ *
+ *
+ * bytes binary_data = 2;
+ */
+ public com.google.protobuf.ByteString getBinaryData() {
+ return binaryData_;
+ }
+
+ public static final int SUBFOLDER_FIELD_NUMBER = 3;
+ private volatile java.lang.Object subfolder_;
+ /**
+ *
+ * Optional subfolder for the command. If empty, the command will be delivered
+ * to the /devices/{device-id}/commands topic, otherwise it will be delivered
+ * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
+ * subfolders are allowed. This field must not have more than 256 characters,
+ * and must not contain any MQTT wildcards ("+" or "#") or null characters.
+ *
+ *
+ * string subfolder = 3;
+ */
+ public java.lang.String getSubfolder() {
+ java.lang.Object ref = subfolder_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ subfolder_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Optional subfolder for the command. If empty, the command will be delivered
+ * to the /devices/{device-id}/commands topic, otherwise it will be delivered
+ * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
+ * subfolders are allowed. This field must not have more than 256 characters,
+ * and must not contain any MQTT wildcards ("+" or "#") or null characters.
+ *
+ *
+ * string subfolder = 3;
+ */
+ public com.google.protobuf.ByteString
+ getSubfolderBytes() {
+ java.lang.Object ref = subfolder_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ subfolder_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (!binaryData_.isEmpty()) {
+ output.writeBytes(2, binaryData_);
+ }
+ if (!getSubfolderBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subfolder_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (!binaryData_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, binaryData_);
+ }
+ if (!getSubfolderBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, subfolder_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.iot.v1.SendCommandToDeviceRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.iot.v1.SendCommandToDeviceRequest other = (com.google.cloud.iot.v1.SendCommandToDeviceRequest) obj;
+
+ boolean result = true;
+ result = result && getName()
+ .equals(other.getName());
+ result = result && getBinaryData()
+ .equals(other.getBinaryData());
+ result = result && getSubfolder()
+ .equals(other.getSubfolder());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + BINARY_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getBinaryData().hashCode();
+ hash = (37 * hash) + SUBFOLDER_FIELD_NUMBER;
+ hash = (53 * hash) + getSubfolder().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.iot.v1.SendCommandToDeviceRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Request for `SendCommandToDevice`.
+ *
+ *
+ * Protobuf type {@code google.cloud.iot.v1.SendCommandToDeviceRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:google.cloud.iot.v1.SendCommandToDeviceRequest)
+ com.google.cloud.iot.v1.SendCommandToDeviceRequestOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_SendCommandToDeviceRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_SendCommandToDeviceRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.iot.v1.SendCommandToDeviceRequest.class, com.google.cloud.iot.v1.SendCommandToDeviceRequest.Builder.class);
+ }
+
+ // Construct using com.google.cloud.iot.v1.SendCommandToDeviceRequest.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ name_ = "";
+
+ binaryData_ = com.google.protobuf.ByteString.EMPTY;
+
+ subfolder_ = "";
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_SendCommandToDeviceRequest_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.SendCommandToDeviceRequest getDefaultInstanceForType() {
+ return com.google.cloud.iot.v1.SendCommandToDeviceRequest.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.SendCommandToDeviceRequest build() {
+ com.google.cloud.iot.v1.SendCommandToDeviceRequest result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.SendCommandToDeviceRequest buildPartial() {
+ com.google.cloud.iot.v1.SendCommandToDeviceRequest result = new com.google.cloud.iot.v1.SendCommandToDeviceRequest(this);
+ result.name_ = name_;
+ result.binaryData_ = binaryData_;
+ result.subfolder_ = subfolder_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.cloud.iot.v1.SendCommandToDeviceRequest) {
+ return mergeFrom((com.google.cloud.iot.v1.SendCommandToDeviceRequest)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.cloud.iot.v1.SendCommandToDeviceRequest other) {
+ if (other == com.google.cloud.iot.v1.SendCommandToDeviceRequest.getDefaultInstance()) return this;
+ if (!other.getName().isEmpty()) {
+ name_ = other.name_;
+ onChanged();
+ }
+ if (other.getBinaryData() != com.google.protobuf.ByteString.EMPTY) {
+ setBinaryData(other.getBinaryData());
+ }
+ if (!other.getSubfolder().isEmpty()) {
+ subfolder_ = other.subfolder_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ com.google.cloud.iot.v1.SendCommandToDeviceRequest parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (com.google.cloud.iot.v1.SendCommandToDeviceRequest) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private java.lang.Object name_ = "";
+ /**
+ *
+ * The name of the device. For example,
+ * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The name of the device. For example,
+ * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The name of the device. For example,
+ * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the device. For example,
+ * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the device. For example,
+ * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ *
+ *
+ * string name = 1;
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString binaryData_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ * The command data to send to the device.
+ *
+ *
+ * bytes binary_data = 2;
+ */
+ public com.google.protobuf.ByteString getBinaryData() {
+ return binaryData_;
+ }
+ /**
+ *
+ * The command data to send to the device.
+ *
+ *
+ * bytes binary_data = 2;
+ */
+ public Builder setBinaryData(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ binaryData_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The command data to send to the device.
+ *
+ *
+ * bytes binary_data = 2;
+ */
+ public Builder clearBinaryData() {
+
+ binaryData_ = getDefaultInstance().getBinaryData();
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object subfolder_ = "";
+ /**
+ *
+ * Optional subfolder for the command. If empty, the command will be delivered
+ * to the /devices/{device-id}/commands topic, otherwise it will be delivered
+ * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
+ * subfolders are allowed. This field must not have more than 256 characters,
+ * and must not contain any MQTT wildcards ("+" or "#") or null characters.
+ *
+ *
+ * string subfolder = 3;
+ */
+ public java.lang.String getSubfolder() {
+ java.lang.Object ref = subfolder_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ subfolder_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Optional subfolder for the command. If empty, the command will be delivered
+ * to the /devices/{device-id}/commands topic, otherwise it will be delivered
+ * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
+ * subfolders are allowed. This field must not have more than 256 characters,
+ * and must not contain any MQTT wildcards ("+" or "#") or null characters.
+ *
+ *
+ * string subfolder = 3;
+ */
+ public com.google.protobuf.ByteString
+ getSubfolderBytes() {
+ java.lang.Object ref = subfolder_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ subfolder_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Optional subfolder for the command. If empty, the command will be delivered
+ * to the /devices/{device-id}/commands topic, otherwise it will be delivered
+ * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
+ * subfolders are allowed. This field must not have more than 256 characters,
+ * and must not contain any MQTT wildcards ("+" or "#") or null characters.
+ *
+ *
+ * string subfolder = 3;
+ */
+ public Builder setSubfolder(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ subfolder_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Optional subfolder for the command. If empty, the command will be delivered
+ * to the /devices/{device-id}/commands topic, otherwise it will be delivered
+ * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
+ * subfolders are allowed. This field must not have more than 256 characters,
+ * and must not contain any MQTT wildcards ("+" or "#") or null characters.
+ *
+ *
+ * string subfolder = 3;
+ */
+ public Builder clearSubfolder() {
+
+ subfolder_ = getDefaultInstance().getSubfolder();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Optional subfolder for the command. If empty, the command will be delivered
+ * to the /devices/{device-id}/commands topic, otherwise it will be delivered
+ * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
+ * subfolders are allowed. This field must not have more than 256 characters,
+ * and must not contain any MQTT wildcards ("+" or "#") or null characters.
+ *
+ *
+ * string subfolder = 3;
+ */
+ public Builder setSubfolderBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ subfolder_ = value;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.iot.v1.SendCommandToDeviceRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.iot.v1.SendCommandToDeviceRequest)
+ private static final com.google.cloud.iot.v1.SendCommandToDeviceRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.iot.v1.SendCommandToDeviceRequest();
+ }
+
+ public static com.google.cloud.iot.v1.SendCommandToDeviceRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public SendCommandToDeviceRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new SendCommandToDeviceRequest(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.SendCommandToDeviceRequest getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/SendCommandToDeviceRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/SendCommandToDeviceRequestOrBuilder.java
new file mode 100644
index 000000000000..8a539cf7fe1c
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/SendCommandToDeviceRequestOrBuilder.java
@@ -0,0 +1,66 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/device_manager.proto
+
+package com.google.cloud.iot.v1;
+
+public interface SendCommandToDeviceRequestOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.iot.v1.SendCommandToDeviceRequest)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ * The name of the device. For example,
+ * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ *
+ *
+ * string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ * The name of the device. For example,
+ * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ *
+ *
+ * string name = 1;
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ /**
+ *
+ * The command data to send to the device.
+ *
+ *
+ * bytes binary_data = 2;
+ */
+ com.google.protobuf.ByteString getBinaryData();
+
+ /**
+ *
+ * Optional subfolder for the command. If empty, the command will be delivered
+ * to the /devices/{device-id}/commands topic, otherwise it will be delivered
+ * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
+ * subfolders are allowed. This field must not have more than 256 characters,
+ * and must not contain any MQTT wildcards ("+" or "#") or null characters.
+ *
+ *
+ * string subfolder = 3;
+ */
+ java.lang.String getSubfolder();
+ /**
+ *
+ * Optional subfolder for the command. If empty, the command will be delivered
+ * to the /devices/{device-id}/commands topic, otherwise it will be delivered
+ * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
+ * subfolders are allowed. This field must not have more than 256 characters,
+ * and must not contain any MQTT wildcards ("+" or "#") or null characters.
+ *
+ *
+ * string subfolder = 3;
+ */
+ com.google.protobuf.ByteString
+ getSubfolderBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/SendCommandToDeviceResponse.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/SendCommandToDeviceResponse.java
new file mode 100644
index 000000000000..05373863ddd1
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/SendCommandToDeviceResponse.java
@@ -0,0 +1,421 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/device_manager.proto
+
+package com.google.cloud.iot.v1;
+
+/**
+ *
+ * Response for `SendCommandToDevice`.
+ *
+ *
+ * Protobuf type {@code google.cloud.iot.v1.SendCommandToDeviceResponse}
+ */
+public final class SendCommandToDeviceResponse extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.SendCommandToDeviceResponse)
+ SendCommandToDeviceResponseOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use SendCommandToDeviceResponse.newBuilder() to construct.
+ private SendCommandToDeviceResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private SendCommandToDeviceResponse() {
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private SendCommandToDeviceResponse(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_SendCommandToDeviceResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_SendCommandToDeviceResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.iot.v1.SendCommandToDeviceResponse.class, com.google.cloud.iot.v1.SendCommandToDeviceResponse.Builder.class);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.iot.v1.SendCommandToDeviceResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.iot.v1.SendCommandToDeviceResponse other = (com.google.cloud.iot.v1.SendCommandToDeviceResponse) obj;
+
+ boolean result = true;
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.iot.v1.SendCommandToDeviceResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Response for `SendCommandToDevice`.
+ *
+ *
+ * Protobuf type {@code google.cloud.iot.v1.SendCommandToDeviceResponse}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:google.cloud.iot.v1.SendCommandToDeviceResponse)
+ com.google.cloud.iot.v1.SendCommandToDeviceResponseOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_SendCommandToDeviceResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_SendCommandToDeviceResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.iot.v1.SendCommandToDeviceResponse.class, com.google.cloud.iot.v1.SendCommandToDeviceResponse.Builder.class);
+ }
+
+ // Construct using com.google.cloud.iot.v1.SendCommandToDeviceResponse.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_SendCommandToDeviceResponse_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.SendCommandToDeviceResponse getDefaultInstanceForType() {
+ return com.google.cloud.iot.v1.SendCommandToDeviceResponse.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.SendCommandToDeviceResponse build() {
+ com.google.cloud.iot.v1.SendCommandToDeviceResponse result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.SendCommandToDeviceResponse buildPartial() {
+ com.google.cloud.iot.v1.SendCommandToDeviceResponse result = new com.google.cloud.iot.v1.SendCommandToDeviceResponse(this);
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.cloud.iot.v1.SendCommandToDeviceResponse) {
+ return mergeFrom((com.google.cloud.iot.v1.SendCommandToDeviceResponse)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.cloud.iot.v1.SendCommandToDeviceResponse other) {
+ if (other == com.google.cloud.iot.v1.SendCommandToDeviceResponse.getDefaultInstance()) return this;
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ com.google.cloud.iot.v1.SendCommandToDeviceResponse parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (com.google.cloud.iot.v1.SendCommandToDeviceResponse) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.iot.v1.SendCommandToDeviceResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.iot.v1.SendCommandToDeviceResponse)
+ private static final com.google.cloud.iot.v1.SendCommandToDeviceResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.iot.v1.SendCommandToDeviceResponse();
+ }
+
+ public static com.google.cloud.iot.v1.SendCommandToDeviceResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public SendCommandToDeviceResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new SendCommandToDeviceResponse(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.SendCommandToDeviceResponse getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/SendCommandToDeviceResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/SendCommandToDeviceResponseOrBuilder.java
new file mode 100644
index 000000000000..ef85ec03de42
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/SendCommandToDeviceResponseOrBuilder.java
@@ -0,0 +1,9 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/device_manager.proto
+
+package com.google.cloud.iot.v1;
+
+public interface SendCommandToDeviceResponseOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.iot.v1.SendCommandToDeviceResponse)
+ com.google.protobuf.MessageOrBuilder {
+}
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UnbindDeviceFromGatewayRequest.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UnbindDeviceFromGatewayRequest.java
new file mode 100644
index 000000000000..115bf4485863
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UnbindDeviceFromGatewayRequest.java
@@ -0,0 +1,915 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/device_manager.proto
+
+package com.google.cloud.iot.v1;
+
+/**
+ *
+ * Request for `UnbindDeviceFromGateway`.
+ *
+ *
+ * Protobuf type {@code google.cloud.iot.v1.UnbindDeviceFromGatewayRequest}
+ */
+public final class UnbindDeviceFromGatewayRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.UnbindDeviceFromGatewayRequest)
+ UnbindDeviceFromGatewayRequestOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use UnbindDeviceFromGatewayRequest.newBuilder() to construct.
+ private UnbindDeviceFromGatewayRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private UnbindDeviceFromGatewayRequest() {
+ parent_ = "";
+ gatewayId_ = "";
+ deviceId_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private UnbindDeviceFromGatewayRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ parent_ = s;
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ gatewayId_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ deviceId_ = s;
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.class, com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.Builder.class);
+ }
+
+ public static final int PARENT_FIELD_NUMBER = 1;
+ private volatile java.lang.Object parent_;
+ /**
+ *
+ * The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ *
+ *
+ * string parent = 1;
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ *
+ *
+ * string parent = 1;
+ */
+ public com.google.protobuf.ByteString
+ getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int GATEWAY_ID_FIELD_NUMBER = 2;
+ private volatile java.lang.Object gatewayId_;
+ /**
+ *
+ * The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ *
+ *
+ * string gateway_id = 2;
+ */
+ public java.lang.String getGatewayId() {
+ java.lang.Object ref = gatewayId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ gatewayId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ *
+ *
+ * string gateway_id = 2;
+ */
+ public com.google.protobuf.ByteString
+ getGatewayIdBytes() {
+ java.lang.Object ref = gatewayId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ gatewayId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DEVICE_ID_FIELD_NUMBER = 3;
+ private volatile java.lang.Object deviceId_;
+ /**
+ *
+ * The device to disassociate from the specified gateway. The value of
+ * `device_id` can be either the device numeric ID or the user-defined device
+ * identifier.
+ *
+ *
+ * string device_id = 3;
+ */
+ public java.lang.String getDeviceId() {
+ java.lang.Object ref = deviceId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ deviceId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The device to disassociate from the specified gateway. The value of
+ * `device_id` can be either the device numeric ID or the user-defined device
+ * identifier.
+ *
+ *
+ * string device_id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getDeviceIdBytes() {
+ java.lang.Object ref = deviceId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ deviceId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (!getGatewayIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gatewayId_);
+ }
+ if (!getDeviceIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceId_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (!getGatewayIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gatewayId_);
+ }
+ if (!getDeviceIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceId_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest other = (com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest) obj;
+
+ boolean result = true;
+ result = result && getParent()
+ .equals(other.getParent());
+ result = result && getGatewayId()
+ .equals(other.getGatewayId());
+ result = result && getDeviceId()
+ .equals(other.getDeviceId());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ hash = (37 * hash) + GATEWAY_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getGatewayId().hashCode();
+ hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getDeviceId().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Request for `UnbindDeviceFromGateway`.
+ *
+ *
+ * Protobuf type {@code google.cloud.iot.v1.UnbindDeviceFromGatewayRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:google.cloud.iot.v1.UnbindDeviceFromGatewayRequest)
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequestOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.class, com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.Builder.class);
+ }
+
+ // Construct using com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ parent_ = "";
+
+ gatewayId_ = "";
+
+ deviceId_ = "";
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayRequest_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest getDefaultInstanceForType() {
+ return com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest build() {
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest buildPartial() {
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest result = new com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest(this);
+ result.parent_ = parent_;
+ result.gatewayId_ = gatewayId_;
+ result.deviceId_ = deviceId_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest) {
+ return mergeFrom((com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest other) {
+ if (other == com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest.getDefaultInstance()) return this;
+ if (!other.getParent().isEmpty()) {
+ parent_ = other.parent_;
+ onChanged();
+ }
+ if (!other.getGatewayId().isEmpty()) {
+ gatewayId_ = other.gatewayId_;
+ onChanged();
+ }
+ if (!other.getDeviceId().isEmpty()) {
+ deviceId_ = other.deviceId_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private java.lang.Object parent_ = "";
+ /**
+ *
+ * The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ *
+ *
+ * string parent = 1;
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ *
+ *
+ * string parent = 1;
+ */
+ public com.google.protobuf.ByteString
+ getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ *
+ *
+ * string parent = 1;
+ */
+ public Builder setParent(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ *
+ *
+ * string parent = 1;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ *
+ *
+ * string parent = 1;
+ */
+ public Builder setParentBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object gatewayId_ = "";
+ /**
+ *
+ * The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ *
+ *
+ * string gateway_id = 2;
+ */
+ public java.lang.String getGatewayId() {
+ java.lang.Object ref = gatewayId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ gatewayId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ *
+ *
+ * string gateway_id = 2;
+ */
+ public com.google.protobuf.ByteString
+ getGatewayIdBytes() {
+ java.lang.Object ref = gatewayId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ gatewayId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ *
+ *
+ * string gateway_id = 2;
+ */
+ public Builder setGatewayId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ gatewayId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ *
+ *
+ * string gateway_id = 2;
+ */
+ public Builder clearGatewayId() {
+
+ gatewayId_ = getDefaultInstance().getGatewayId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ *
+ *
+ * string gateway_id = 2;
+ */
+ public Builder setGatewayIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ gatewayId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object deviceId_ = "";
+ /**
+ *
+ * The device to disassociate from the specified gateway. The value of
+ * `device_id` can be either the device numeric ID or the user-defined device
+ * identifier.
+ *
+ *
+ * string device_id = 3;
+ */
+ public java.lang.String getDeviceId() {
+ java.lang.Object ref = deviceId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ deviceId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The device to disassociate from the specified gateway. The value of
+ * `device_id` can be either the device numeric ID or the user-defined device
+ * identifier.
+ *
+ *
+ * string device_id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getDeviceIdBytes() {
+ java.lang.Object ref = deviceId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ deviceId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The device to disassociate from the specified gateway. The value of
+ * `device_id` can be either the device numeric ID or the user-defined device
+ * identifier.
+ *
+ *
+ * string device_id = 3;
+ */
+ public Builder setDeviceId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ deviceId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The device to disassociate from the specified gateway. The value of
+ * `device_id` can be either the device numeric ID or the user-defined device
+ * identifier.
+ *
+ *
+ * string device_id = 3;
+ */
+ public Builder clearDeviceId() {
+
+ deviceId_ = getDefaultInstance().getDeviceId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The device to disassociate from the specified gateway. The value of
+ * `device_id` can be either the device numeric ID or the user-defined device
+ * identifier.
+ *
+ *
+ * string device_id = 3;
+ */
+ public Builder setDeviceIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ deviceId_ = value;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.iot.v1.UnbindDeviceFromGatewayRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.iot.v1.UnbindDeviceFromGatewayRequest)
+ private static final com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest();
+ }
+
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public UnbindDeviceFromGatewayRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new UnbindDeviceFromGatewayRequest(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UnbindDeviceFromGatewayRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UnbindDeviceFromGatewayRequestOrBuilder.java
new file mode 100644
index 000000000000..517d464d1431
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UnbindDeviceFromGatewayRequestOrBuilder.java
@@ -0,0 +1,71 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/device_manager.proto
+
+package com.google.cloud.iot.v1;
+
+public interface UnbindDeviceFromGatewayRequestOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.iot.v1.UnbindDeviceFromGatewayRequest)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ * The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ *
+ *
+ * string parent = 1;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ * The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ *
+ *
+ * string parent = 1;
+ */
+ com.google.protobuf.ByteString
+ getParentBytes();
+
+ /**
+ *
+ * The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ *
+ *
+ * string gateway_id = 2;
+ */
+ java.lang.String getGatewayId();
+ /**
+ *
+ * The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ *
+ *
+ * string gateway_id = 2;
+ */
+ com.google.protobuf.ByteString
+ getGatewayIdBytes();
+
+ /**
+ *
+ * The device to disassociate from the specified gateway. The value of
+ * `device_id` can be either the device numeric ID or the user-defined device
+ * identifier.
+ *
+ *
+ * string device_id = 3;
+ */
+ java.lang.String getDeviceId();
+ /**
+ *
+ * The device to disassociate from the specified gateway. The value of
+ * `device_id` can be either the device numeric ID or the user-defined device
+ * identifier.
+ *
+ *
+ * string device_id = 3;
+ */
+ com.google.protobuf.ByteString
+ getDeviceIdBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UnbindDeviceFromGatewayResponse.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UnbindDeviceFromGatewayResponse.java
new file mode 100644
index 000000000000..385630345151
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UnbindDeviceFromGatewayResponse.java
@@ -0,0 +1,421 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/device_manager.proto
+
+package com.google.cloud.iot.v1;
+
+/**
+ *
+ * Response for `UnbindDeviceFromGateway`.
+ *
+ *
+ * Protobuf type {@code google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}
+ */
+public final class UnbindDeviceFromGatewayResponse extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.UnbindDeviceFromGatewayResponse)
+ UnbindDeviceFromGatewayResponseOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use UnbindDeviceFromGatewayResponse.newBuilder() to construct.
+ private UnbindDeviceFromGatewayResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private UnbindDeviceFromGatewayResponse() {
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private UnbindDeviceFromGatewayResponse(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.class, com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.Builder.class);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse other = (com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) obj;
+
+ boolean result = true;
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Response for `UnbindDeviceFromGateway`.
+ *
+ *
+ * Protobuf type {@code google.cloud.iot.v1.UnbindDeviceFromGatewayResponse}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:google.cloud.iot.v1.UnbindDeviceFromGatewayResponse)
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponseOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.class, com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.Builder.class);
+ }
+
+ // Construct using com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.cloud.iot.v1.DeviceManagerProto.internal_static_google_cloud_iot_v1_UnbindDeviceFromGatewayResponse_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse getDefaultInstanceForType() {
+ return com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse build() {
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse buildPartial() {
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse result = new com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse(this);
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) {
+ return mergeFrom((com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse other) {
+ if (other == com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse.getDefaultInstance()) return this;
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.iot.v1.UnbindDeviceFromGatewayResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.iot.v1.UnbindDeviceFromGatewayResponse)
+ private static final com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse();
+ }
+
+ public static com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public UnbindDeviceFromGatewayResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new UnbindDeviceFromGatewayResponse(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.iot.v1.UnbindDeviceFromGatewayResponse getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UnbindDeviceFromGatewayResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UnbindDeviceFromGatewayResponseOrBuilder.java
new file mode 100644
index 000000000000..ace2c0a15084
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UnbindDeviceFromGatewayResponseOrBuilder.java
@@ -0,0 +1,9 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/iot/v1/device_manager.proto
+
+package com.google.cloud.iot.v1;
+
+public interface UnbindDeviceFromGatewayResponseOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.iot.v1.UnbindDeviceFromGatewayResponse)
+ com.google.protobuf.MessageOrBuilder {
+}
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UpdateDeviceRequest.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UpdateDeviceRequest.java
index 9e5d9c797b6b..c413ea2a5d78 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UpdateDeviceRequest.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UpdateDeviceRequest.java
@@ -108,7 +108,7 @@ private UpdateDeviceRequest(
private com.google.cloud.iot.v1.Device device_;
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -121,7 +121,7 @@ public boolean hasDevice() {
}
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -134,7 +134,7 @@ public com.google.cloud.iot.v1.Device getDevice() {
}
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -543,7 +543,7 @@ public Builder mergeFrom(
com.google.cloud.iot.v1.Device, com.google.cloud.iot.v1.Device.Builder, com.google.cloud.iot.v1.DeviceOrBuilder> deviceBuilder_;
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -556,7 +556,7 @@ public boolean hasDevice() {
}
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -573,7 +573,7 @@ public com.google.cloud.iot.v1.Device getDevice() {
}
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -596,7 +596,7 @@ public Builder setDevice(com.google.cloud.iot.v1.Device value) {
}
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -617,7 +617,7 @@ public Builder setDevice(
}
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -642,7 +642,7 @@ public Builder mergeDevice(com.google.cloud.iot.v1.Device value) {
}
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -663,7 +663,7 @@ public Builder clearDevice() {
}
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -678,7 +678,7 @@ public com.google.cloud.iot.v1.Device.Builder getDeviceBuilder() {
}
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -696,7 +696,7 @@ public com.google.cloud.iot.v1.DeviceOrBuilder getDeviceOrBuilder() {
}
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UpdateDeviceRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UpdateDeviceRequestOrBuilder.java
index 037a0bcfd238..b8821efdbd05 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UpdateDeviceRequestOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/UpdateDeviceRequestOrBuilder.java
@@ -9,7 +9,7 @@ public interface UpdateDeviceRequestOrBuilder extends
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -20,7 +20,7 @@ public interface UpdateDeviceRequestOrBuilder extends
boolean hasDevice();
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -31,7 +31,7 @@ public interface UpdateDeviceRequestOrBuilder extends
com.google.cloud.iot.v1.Device getDevice();
/**
*
- * The new values for the device registry. The `id` and `num_id` fields must
+ * The new values for the device. The `id` and `num_id` fields must
* be empty, and the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/proto/google/cloud/iot/v1/device_manager.proto b/google-api-grpc/proto-google-cloud-iot-v1/src/main/proto/google/cloud/iot/v1/device_manager.proto
index dd9f994107e7..12e5a973dd7f 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/proto/google/cloud/iot/v1/device_manager.proto
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/proto/google/cloud/iot/v1/device_manager.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google Inc.
+// Copyright 2018 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,6 +11,7 @@
// 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.
+//
syntax = "proto3";
@@ -24,6 +25,7 @@ import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
option cc_enable_arenas = true;
option go_package = "google.golang.org/genproto/googleapis/cloud/iot/v1;iot";
@@ -32,8 +34,7 @@ option java_outer_classname = "DeviceManagerProto";
option java_package = "com.google.cloud.iot.v1";
-// Internet of things (IoT) service. Allows to manipulate device registry
-// instances and the registration of devices (Things) to the cloud.
+// Internet of Things (IoT) service. Securely connect and manage IoT devices.
service DeviceManager {
// Creates a device registry that contains devices.
rpc CreateDeviceRegistry(CreateDeviceRegistryRequest) returns (DeviceRegistry) {
@@ -106,9 +107,6 @@ service DeviceManager {
rpc DeleteDevice(DeleteDeviceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/registries/*/devices/*}"
- additional_bindings {
- delete: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}"
- }
};
}
@@ -117,7 +115,7 @@ service DeviceManager {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*/registries/*}/devices"
additional_bindings {
- get: "/v1/{parent=projects/*/locations/*/groups/*}/devices"
+ get: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices"
}
};
}
@@ -198,6 +196,54 @@ service DeviceManager {
}
};
}
+
+ // Sends a command to the specified device. In order for a device to be able
+ // to receive commands, it must:
+ // 1) be connected to Cloud IoT Core using the MQTT protocol, and
+ // 2) be subscribed to the group of MQTT topics specified by
+ // /devices/{device-id}/commands/#. This subscription will receive commands
+ // at the top-level topic /devices/{device-id}/commands as well as commands
+ // for subfolders, like /devices/{device-id}/commands/subfolder.
+ // Note that subscribing to specific subfolders is not supported.
+ // If the command could not be delivered to the device, this method will
+ // return an error; in particular, if the device is not subscribed, this
+ // method will return FAILED_PRECONDITION. Otherwise, this method will
+ // return OK. If the subscription is QoS 1, at least once delivery will be
+ // guaranteed; for QoS 0, no acknowledgment will be expected from the device.
+ rpc SendCommandToDevice(SendCommandToDeviceRequest) returns (SendCommandToDeviceResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice"
+ body: "*"
+ }
+ };
+ }
+
+ // Associates the device with the gateway.
+ rpc BindDeviceToGateway(BindDeviceToGatewayRequest) returns (BindDeviceToGatewayResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway"
+ body: "*"
+ }
+ };
+ }
+
+ // Deletes the association between the device and the gateway.
+ rpc UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest) returns (UnbindDeviceFromGatewayResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway"
+ body: "*"
+ additional_bindings {
+ post: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway"
+ body: "*"
+ }
+ };
+ }
}
// Request for `CreateDeviceRegistry`.
@@ -249,13 +295,13 @@ message ListDeviceRegistriesRequest {
// The maximum number of registries to return in the response. If this value
// is zero, the service will select a default size. A call may return fewer
- // objects than requested, but if there is a non-empty `page_token`, it
- // indicates that more entries are available.
+ // objects than requested. A non-empty `next_page_token` in the response
+ // indicates that more data is available.
int32 page_size = 2;
// The value returned by the last `ListDeviceRegistriesResponse`; indicates
- // that this is a continuation of a prior `ListDeviceRegistries` call, and
- // that the system should return the next page of data.
+ // that this is a continuation of a prior `ListDeviceRegistries` call and
+ // the system should return the next page of data.
string page_token = 3;
}
@@ -278,7 +324,7 @@ message CreateDeviceRequest {
string parent = 1;
// The device registration details. The field `name` must be empty. The server
- // will generate that field from the device registry `id` provided and the
+ // generates `name` from the device registry `id` and the
// `parent` field.
Device device = 2;
}
@@ -297,7 +343,7 @@ message GetDeviceRequest {
// Request for `UpdateDevice`.
message UpdateDeviceRequest {
- // The new values for the device registry. The `id` and `num_id` fields must
+ // The new values for the device. The `id` and `num_id` fields must
// be empty, and the field `name` must specify the name path. For example,
// `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
// `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
@@ -324,32 +370,58 @@ message ListDevicesRequest {
// `projects/my-project/locations/us-central1/registries/my-registry`.
string parent = 1;
- // A list of device numerical ids. If empty, it will ignore this field. This
- // field cannot hold more than 10,000 entries.
+ // A list of device numeric IDs. If empty, this field is ignored. Maximum
+ // IDs: 10,000.
repeated uint64 device_num_ids = 2;
- // A list of device string identifiers. If empty, it will ignore this field.
- // For example, `['device0', 'device12']`. This field cannot hold more than
- // 10,000 entries.
+ // A list of device string IDs. For example, `['device0', 'device12']`.
+ // If empty, this field is ignored. Maximum IDs: 10,000
repeated string device_ids = 3;
// The fields of the `Device` resource to be returned in the response. The
- // fields `id`, and `num_id` are always returned by default, along with any
+ // fields `id` and `num_id` are always returned, along with any
// other fields specified.
google.protobuf.FieldMask field_mask = 4;
+ // Options related to gateways.
+ GatewayListOptions gateway_list_options = 6;
+
// The maximum number of devices to return in the response. If this value
// is zero, the service will select a default size. A call may return fewer
- // objects than requested, but if there is a non-empty `page_token`, it
- // indicates that more entries are available.
+ // objects than requested. A non-empty `next_page_token` in the response
+ // indicates that more data is available.
int32 page_size = 100;
// The value returned by the last `ListDevicesResponse`; indicates
- // that this is a continuation of a prior `ListDevices` call, and
- // that the system should return the next page of data.
+ // that this is a continuation of a prior `ListDevices` call and
+ // the system should return the next page of data.
string page_token = 101;
}
+// Options for limiting the list based on gateway type and associations.
+message GatewayListOptions {
+ // If not set, all devices and gateways are returned. If set, the list is
+ // filtered based on gateway type and associations.
+ oneof filter {
+ // If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
+ // is specified, only non-gateway devices are returned. If
+ // `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
+ GatewayType gateway_type = 1;
+
+ // If set, only devices associated with the specified gateway are returned.
+ // The gateway ID can be numeric (`num_id`) or the user-defined string
+ // (`id`). For example, if `123` is specified, only devices bound to the
+ // gateway with `num_id` 123 are returned.
+ string associations_gateway_id = 2;
+
+ // If set, returns only the gateways with which the specified device is
+ // associated. The device ID can be numeric (`num_id`) or the user-defined
+ // string (`id`). For example, if `456` is specified, returns only the
+ // gateways to which the device with `num_id` 456 is bound.
+ string associations_device_id = 3;
+ }
+}
+
// Response for `ListDevices`.
message ListDevicesResponse {
// The devices that match the request.
@@ -417,3 +489,68 @@ message ListDeviceStatesResponse {
// update time, starting from the most recent one.
repeated DeviceState device_states = 1;
}
+
+// Request for `SendCommandToDevice`.
+message SendCommandToDeviceRequest {
+ // The name of the device. For example,
+ // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ string name = 1;
+
+ // The command data to send to the device.
+ bytes binary_data = 2;
+
+ // Optional subfolder for the command. If empty, the command will be delivered
+ // to the /devices/{device-id}/commands topic, otherwise it will be delivered
+ // to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
+ // subfolders are allowed. This field must not have more than 256 characters,
+ // and must not contain any MQTT wildcards ("+" or "#") or null characters.
+ string subfolder = 3;
+}
+
+// Response for `SendCommandToDevice`.
+message SendCommandToDeviceResponse {
+
+}
+
+// Request for `BindDeviceToGateway`.
+message BindDeviceToGatewayRequest {
+ // The name of the registry. For example,
+ // `projects/example-project/locations/us-central1/registries/my-registry`.
+ string parent = 1;
+
+ // The value of `gateway_id` can be either the device numeric ID or the
+ // user-defined device identifier.
+ string gateway_id = 2;
+
+ // The device to associate with the specified gateway. The value of
+ // `device_id` can be either the device numeric ID or the user-defined device
+ // identifier.
+ string device_id = 3;
+}
+
+// Response for `BindDeviceToGateway`.
+message BindDeviceToGatewayResponse {
+
+}
+
+// Request for `UnbindDeviceFromGateway`.
+message UnbindDeviceFromGatewayRequest {
+ // The name of the registry. For example,
+ // `projects/example-project/locations/us-central1/registries/my-registry`.
+ string parent = 1;
+
+ // The value of `gateway_id` can be either the device numeric ID or the
+ // user-defined device identifier.
+ string gateway_id = 2;
+
+ // The device to disassociate from the specified gateway. The value of
+ // `device_id` can be either the device numeric ID or the user-defined device
+ // identifier.
+ string device_id = 3;
+}
+
+// Response for `UnbindDeviceFromGateway`.
+message UnbindDeviceFromGatewayResponse {
+
+}
diff --git a/google-api-grpc/proto-google-cloud-iot-v1/src/main/proto/google/cloud/iot/v1/resources.proto b/google-api-grpc/proto-google-cloud-iot-v1/src/main/proto/google/cloud/iot/v1/resources.proto
index 542947637077..a362ca26b391 100644
--- a/google-api-grpc/proto-google-cloud-iot-v1/src/main/proto/google/cloud/iot/v1/resources.proto
+++ b/google-api-grpc/proto-google-cloud-iot-v1/src/main/proto/google/cloud/iot/v1/resources.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google Inc.
+// Copyright 2018 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,6 +11,7 @@
// 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.
+//
syntax = "proto3";
@@ -106,6 +107,12 @@ message Device {
// has been reported, this field is not present.
DeviceState state = 16;
+ // **Beta Feature**
+ //
+ // The logging verbosity for device activity. If unspecified,
+ // DeviceRegistry.log_level will be used.
+ LogLevel log_level = 21;
+
// The metadata key-value pairs assigned to the device. This metadata is not
// interpreted or indexed by Cloud IoT Core. It can be used to add contextual
// information for the device.
@@ -119,6 +126,26 @@ message Device {
// The total size of all keys and values must be less than 256 KB, and the
// maximum number of key-value pairs is 500.
map metadata = 17;
+
+ // Gateway-related configuration and state.
+ GatewayConfig gateway_config = 24;
+}
+
+// Gateway-related configuration and state.
+message GatewayConfig {
+ // Indicates whether the device is a gateway.
+ GatewayType gateway_type = 1;
+
+ // Indicates how to authorize and/or authenticate devices to access the
+ // gateway.
+ GatewayAuthMethod gateway_auth_method = 2;
+
+ // [Output only] The ID of the gateway the device accessed most recently.
+ string last_accessed_gateway_id = 3;
+
+ // [Output only] The most recent time at which the device accessed the gateway
+ // specified in `last_accessed_gateway`.
+ google.protobuf.Timestamp last_accessed_gateway_time = 4;
}
// A container for a group of devices.
@@ -155,6 +182,12 @@ message DeviceRegistry {
// The DeviceService (HTTP) configuration for this device registry.
HttpConfig http_config = 9;
+ // **Beta Feature**
+ //
+ // The default logging verbosity for activity from devices in this registry.
+ // The verbosity level can be overridden by Device.log_level.
+ LogLevel log_level = 11;
+
// The credentials used to verify the device credentials. No more than 10
// credentials can be bound to a single registry at a time. The verification
// process occurs at the time of device creation or update. If this field is
@@ -342,6 +375,63 @@ enum HttpState {
HTTP_DISABLED = 2;
}
+// **Beta Feature**
+//
+// The logging verbosity for device activity. Specifies which events should be
+// written to logs. For example, if the LogLevel is ERROR, only events that
+// terminate in errors will be logged. LogLevel is inclusive; enabling INFO
+// logging will also enable ERROR logging.
+enum LogLevel {
+ // No logging specified. If not specified, logging will be disabled.
+ LOG_LEVEL_UNSPECIFIED = 0;
+
+ // Disables logging.
+ NONE = 10;
+
+ // Error events will be logged.
+ ERROR = 20;
+
+ // Informational events will be logged, such as connections and
+ // disconnections.
+ INFO = 30;
+
+ // All events will be logged.
+ DEBUG = 40;
+}
+
+// Gateway type.
+enum GatewayType {
+ // If unspecified, the device is considered a non-gateway device.
+ GATEWAY_TYPE_UNSPECIFIED = 0;
+
+ // The device is a gateway.
+ GATEWAY = 1;
+
+ // The device is not a gateway.
+ NON_GATEWAY = 2;
+}
+
+// The gateway authorization/authentication method. This setting determines how
+// Cloud IoT Core authorizes/authenticate devices to access the gateway.
+enum GatewayAuthMethod {
+ // No authentication/authorization method specified. No devices are allowed to
+ // access the gateway.
+ GATEWAY_AUTH_METHOD_UNSPECIFIED = 0;
+
+ // The device is authenticated through the gateway association only. Device
+ // credentials are ignored even if provided.
+ ASSOCIATION_ONLY = 1;
+
+ // The device is authenticated through its own credentials. Gateway
+ // association is not checked.
+ DEVICE_AUTH_TOKEN_ONLY = 2;
+
+ // The device is authenticated through both device credentials and gateway
+ // association. The device must be bound to the gateway and must provide its
+ // own credentials.
+ ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3;
+}
+
// The supported formats for the public key.
enum PublicKeyCertificateFormat {
// The format has not been specified. This is an invalid default value and
diff --git a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java b/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java
index 53aee631cf58..a47e4806e071 100644
--- a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java
+++ b/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java
@@ -42,8 +42,7 @@
// AUTO-GENERATED DOCUMENTATION AND SERVICE
/**
- * Service Description: Internet of things (IoT) service. Allows to manipulate device registry
- * instances and the registration of devices (Things) to the cloud.
+ * Service Description: Internet of Things (IoT) service. Securely connect and manage IoT devices.
*
* This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
@@ -697,8 +696,8 @@ public final ListDeviceRegistriesPagedResponse listDeviceRegistries(
*
* @param parent The name of the device registry where this device should be created. For example,
* `projects/example-project/locations/us-central1/registries/my-registry`.
- * @param device The device registration details. The field `name` must be empty. The server will
- * generate that field from the device registry `id` provided and the `parent` field.
+ * @param device The device registration details. The field `name` must be empty. The server
+ * generates `name` from the device registry `id` and the `parent` field.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Device createDevice(RegistryName parent, Device device) {
@@ -727,8 +726,8 @@ public final Device createDevice(RegistryName parent, Device device) {
*
* @param parent The name of the device registry where this device should be created. For example,
* `projects/example-project/locations/us-central1/registries/my-registry`.
- * @param device The device registration details. The field `name` must be empty. The server will
- * generate that field from the device registry `id` provided and the `parent` field.
+ * @param device The device registration details. The field `name` must be empty. The server
+ * generates `name` from the device registry `id` and the `parent` field.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Device createDevice(String parent, Device device) {
@@ -895,8 +894,8 @@ public final UnaryCallable getDeviceCallable() {
* }
*
*
- * @param device The new values for the device registry. The `id` and `num_id` fields must be
- * empty, and the field `name` must specify the name path. For example,
+ * @param device The new values for the device. The `id` and `num_id` fields must be empty, and
+ * the field `name` must specify the name path. For example,
* `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
* `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
* @param updateMask Only updates the `device` fields indicated by this mask. The field mask must
@@ -1828,6 +1827,417 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
return stub.testIamPermissionsCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Sends a command to the specified device. In order for a device to be able to receive commands,
+ * it must: 1) be connected to Cloud IoT Core using the MQTT protocol, and 2) be subscribed to the
+ * group of MQTT topics specified by /devices/{device-id}/commands/#. This subscription will
+ * receive commands at the top-level topic /devices/{device-id}/commands as well as commands for
+ * subfolders, like /devices/{device-id}/commands/subfolder. Note that subscribing to specific
+ * subfolders is not supported. If the command could not be delivered to the device, this method
+ * will return an error; in particular, if the device is not subscribed, this method will return
+ * FAILED_PRECONDITION. Otherwise, this method will return OK. If the subscription is QoS 1, at
+ * least once delivery will be guaranteed; for QoS 0, no acknowledgment will be expected from the
+ * device.
+ *
+ * Sample code:
+ *
+ *
+ * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
+ * DeviceName name = DeviceName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
+ * ByteString binaryData = ByteString.copyFromUtf8("");
+ * String subfolder = "";
+ * SendCommandToDeviceResponse response = deviceManagerClient.sendCommandToDevice(name, binaryData, subfolder);
+ * }
+ *
+ *
+ * @param name The name of the device. For example,
+ * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ * @param binaryData The command data to send to the device.
+ * @param subfolder Optional subfolder for the command. If empty, the command will be delivered to
+ * the /devices/{device-id}/commands topic, otherwise it will be delivered to the
+ * /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This
+ * field must not have more than 256 characters, and must not contain any MQTT wildcards ("+"
+ * or "#") or null characters.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SendCommandToDeviceResponse sendCommandToDevice(
+ DeviceName name, ByteString binaryData, String subfolder) {
+
+ SendCommandToDeviceRequest request =
+ SendCommandToDeviceRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setBinaryData(binaryData)
+ .setSubfolder(subfolder)
+ .build();
+ return sendCommandToDevice(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Sends a command to the specified device. In order for a device to be able to receive commands,
+ * it must: 1) be connected to Cloud IoT Core using the MQTT protocol, and 2) be subscribed to the
+ * group of MQTT topics specified by /devices/{device-id}/commands/#. This subscription will
+ * receive commands at the top-level topic /devices/{device-id}/commands as well as commands for
+ * subfolders, like /devices/{device-id}/commands/subfolder. Note that subscribing to specific
+ * subfolders is not supported. If the command could not be delivered to the device, this method
+ * will return an error; in particular, if the device is not subscribed, this method will return
+ * FAILED_PRECONDITION. Otherwise, this method will return OK. If the subscription is QoS 1, at
+ * least once delivery will be guaranteed; for QoS 0, no acknowledgment will be expected from the
+ * device.
+ *
+ * Sample code:
+ *
+ *
+ * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
+ * DeviceName name = DeviceName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
+ * ByteString binaryData = ByteString.copyFromUtf8("");
+ * String subfolder = "";
+ * SendCommandToDeviceResponse response = deviceManagerClient.sendCommandToDevice(name.toString(), binaryData, subfolder);
+ * }
+ *
+ *
+ * @param name The name of the device. For example,
+ * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
+ * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
+ * @param binaryData The command data to send to the device.
+ * @param subfolder Optional subfolder for the command. If empty, the command will be delivered to
+ * the /devices/{device-id}/commands topic, otherwise it will be delivered to the
+ * /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This
+ * field must not have more than 256 characters, and must not contain any MQTT wildcards ("+"
+ * or "#") or null characters.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SendCommandToDeviceResponse sendCommandToDevice(
+ String name, ByteString binaryData, String subfolder) {
+
+ SendCommandToDeviceRequest request =
+ SendCommandToDeviceRequest.newBuilder()
+ .setName(name)
+ .setBinaryData(binaryData)
+ .setSubfolder(subfolder)
+ .build();
+ return sendCommandToDevice(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Sends a command to the specified device. In order for a device to be able to receive commands,
+ * it must: 1) be connected to Cloud IoT Core using the MQTT protocol, and 2) be subscribed to the
+ * group of MQTT topics specified by /devices/{device-id}/commands/#. This subscription will
+ * receive commands at the top-level topic /devices/{device-id}/commands as well as commands for
+ * subfolders, like /devices/{device-id}/commands/subfolder. Note that subscribing to specific
+ * subfolders is not supported. If the command could not be delivered to the device, this method
+ * will return an error; in particular, if the device is not subscribed, this method will return
+ * FAILED_PRECONDITION. Otherwise, this method will return OK. If the subscription is QoS 1, at
+ * least once delivery will be guaranteed; for QoS 0, no acknowledgment will be expected from the
+ * device.
+ *
+ * Sample code:
+ *
+ *
+ * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
+ * DeviceName name = DeviceName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
+ * ByteString binaryData = ByteString.copyFromUtf8("");
+ * SendCommandToDeviceRequest request = SendCommandToDeviceRequest.newBuilder()
+ * .setName(name.toString())
+ * .setBinaryData(binaryData)
+ * .build();
+ * SendCommandToDeviceResponse response = deviceManagerClient.sendCommandToDevice(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SendCommandToDeviceResponse sendCommandToDevice(SendCommandToDeviceRequest request) {
+ return sendCommandToDeviceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Sends a command to the specified device. In order for a device to be able to receive commands,
+ * it must: 1) be connected to Cloud IoT Core using the MQTT protocol, and 2) be subscribed to the
+ * group of MQTT topics specified by /devices/{device-id}/commands/#. This subscription will
+ * receive commands at the top-level topic /devices/{device-id}/commands as well as commands for
+ * subfolders, like /devices/{device-id}/commands/subfolder. Note that subscribing to specific
+ * subfolders is not supported. If the command could not be delivered to the device, this method
+ * will return an error; in particular, if the device is not subscribed, this method will return
+ * FAILED_PRECONDITION. Otherwise, this method will return OK. If the subscription is QoS 1, at
+ * least once delivery will be guaranteed; for QoS 0, no acknowledgment will be expected from the
+ * device.
+ *
+ * Sample code:
+ *
+ *
+ * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
+ * DeviceName name = DeviceName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
+ * ByteString binaryData = ByteString.copyFromUtf8("");
+ * SendCommandToDeviceRequest request = SendCommandToDeviceRequest.newBuilder()
+ * .setName(name.toString())
+ * .setBinaryData(binaryData)
+ * .build();
+ * ApiFuture<SendCommandToDeviceResponse> future = deviceManagerClient.sendCommandToDeviceCallable().futureCall(request);
+ * // Do something
+ * SendCommandToDeviceResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ sendCommandToDeviceCallable() {
+ return stub.sendCommandToDeviceCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Associates the device with the gateway.
+ *
+ * Sample code:
+ *
+ *
+ * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
+ * RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
+ * String gatewayId = "";
+ * String deviceId = "";
+ * BindDeviceToGatewayResponse response = deviceManagerClient.bindDeviceToGateway(parent, gatewayId, deviceId);
+ * }
+ *
+ *
+ * @param parent The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ * @param gatewayId The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ * @param deviceId The device to associate with the specified gateway. The value of `device_id`
+ * can be either the device numeric ID or the user-defined device identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final BindDeviceToGatewayResponse bindDeviceToGateway(
+ RegistryName parent, String gatewayId, String deviceId) {
+
+ BindDeviceToGatewayRequest request =
+ BindDeviceToGatewayRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setGatewayId(gatewayId)
+ .setDeviceId(deviceId)
+ .build();
+ return bindDeviceToGateway(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Associates the device with the gateway.
+ *
+ * Sample code:
+ *
+ *
+ * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
+ * RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
+ * String gatewayId = "";
+ * String deviceId = "";
+ * BindDeviceToGatewayResponse response = deviceManagerClient.bindDeviceToGateway(parent.toString(), gatewayId, deviceId);
+ * }
+ *
+ *
+ * @param parent The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ * @param gatewayId The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ * @param deviceId The device to associate with the specified gateway. The value of `device_id`
+ * can be either the device numeric ID or the user-defined device identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final BindDeviceToGatewayResponse bindDeviceToGateway(
+ String parent, String gatewayId, String deviceId) {
+
+ BindDeviceToGatewayRequest request =
+ BindDeviceToGatewayRequest.newBuilder()
+ .setParent(parent)
+ .setGatewayId(gatewayId)
+ .setDeviceId(deviceId)
+ .build();
+ return bindDeviceToGateway(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Associates the device with the gateway.
+ *
+ * Sample code:
+ *
+ *
+ * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
+ * RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
+ * String gatewayId = "";
+ * String deviceId = "";
+ * BindDeviceToGatewayRequest request = BindDeviceToGatewayRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setGatewayId(gatewayId)
+ * .setDeviceId(deviceId)
+ * .build();
+ * BindDeviceToGatewayResponse response = deviceManagerClient.bindDeviceToGateway(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final BindDeviceToGatewayResponse bindDeviceToGateway(BindDeviceToGatewayRequest request) {
+ return bindDeviceToGatewayCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Associates the device with the gateway.
+ *
+ * Sample code:
+ *
+ *
+ * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
+ * RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
+ * String gatewayId = "";
+ * String deviceId = "";
+ * BindDeviceToGatewayRequest request = BindDeviceToGatewayRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setGatewayId(gatewayId)
+ * .setDeviceId(deviceId)
+ * .build();
+ * ApiFuture<BindDeviceToGatewayResponse> future = deviceManagerClient.bindDeviceToGatewayCallable().futureCall(request);
+ * // Do something
+ * BindDeviceToGatewayResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ bindDeviceToGatewayCallable() {
+ return stub.bindDeviceToGatewayCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes the association between the device and the gateway.
+ *
+ * Sample code:
+ *
+ *
+ * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
+ * RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
+ * String gatewayId = "";
+ * String deviceId = "";
+ * UnbindDeviceFromGatewayResponse response = deviceManagerClient.unbindDeviceFromGateway(parent, gatewayId, deviceId);
+ * }
+ *
+ *
+ * @param parent The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ * @param gatewayId The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ * @param deviceId The device to disassociate from the specified gateway. The value of `device_id`
+ * can be either the device numeric ID or the user-defined device identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UnbindDeviceFromGatewayResponse unbindDeviceFromGateway(
+ RegistryName parent, String gatewayId, String deviceId) {
+
+ UnbindDeviceFromGatewayRequest request =
+ UnbindDeviceFromGatewayRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setGatewayId(gatewayId)
+ .setDeviceId(deviceId)
+ .build();
+ return unbindDeviceFromGateway(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes the association between the device and the gateway.
+ *
+ * Sample code:
+ *
+ *
+ * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
+ * RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
+ * String gatewayId = "";
+ * String deviceId = "";
+ * UnbindDeviceFromGatewayResponse response = deviceManagerClient.unbindDeviceFromGateway(parent.toString(), gatewayId, deviceId);
+ * }
+ *
+ *
+ * @param parent The name of the registry. For example,
+ * `projects/example-project/locations/us-central1/registries/my-registry`.
+ * @param gatewayId The value of `gateway_id` can be either the device numeric ID or the
+ * user-defined device identifier.
+ * @param deviceId The device to disassociate from the specified gateway. The value of `device_id`
+ * can be either the device numeric ID or the user-defined device identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UnbindDeviceFromGatewayResponse unbindDeviceFromGateway(
+ String parent, String gatewayId, String deviceId) {
+
+ UnbindDeviceFromGatewayRequest request =
+ UnbindDeviceFromGatewayRequest.newBuilder()
+ .setParent(parent)
+ .setGatewayId(gatewayId)
+ .setDeviceId(deviceId)
+ .build();
+ return unbindDeviceFromGateway(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes the association between the device and the gateway.
+ *
+ * Sample code:
+ *
+ *
+ * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
+ * RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
+ * String gatewayId = "";
+ * String deviceId = "";
+ * UnbindDeviceFromGatewayRequest request = UnbindDeviceFromGatewayRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setGatewayId(gatewayId)
+ * .setDeviceId(deviceId)
+ * .build();
+ * UnbindDeviceFromGatewayResponse response = deviceManagerClient.unbindDeviceFromGateway(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UnbindDeviceFromGatewayResponse unbindDeviceFromGateway(
+ UnbindDeviceFromGatewayRequest request) {
+ return unbindDeviceFromGatewayCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes the association between the device and the gateway.
+ *
+ * Sample code:
+ *
+ *
+ * try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
+ * RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
+ * String gatewayId = "";
+ * String deviceId = "";
+ * UnbindDeviceFromGatewayRequest request = UnbindDeviceFromGatewayRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setGatewayId(gatewayId)
+ * .setDeviceId(deviceId)
+ * .build();
+ * ApiFuture<UnbindDeviceFromGatewayResponse> future = deviceManagerClient.unbindDeviceFromGatewayCallable().futureCall(request);
+ * // Do something
+ * UnbindDeviceFromGatewayResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ unbindDeviceFromGatewayCallable() {
+ return stub.unbindDeviceFromGatewayCallable();
+ }
+
@Override
public final void close() {
stub.close();
diff --git a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerSettings.java b/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerSettings.java
index 889b4419b819..ffd1fe30f419 100644
--- a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerSettings.java
+++ b/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerSettings.java
@@ -159,6 +159,24 @@ public UnaryCallSettings getIamPolicySettings() {
return ((DeviceManagerStubSettings) getStubSettings()).testIamPermissionsSettings();
}
+ /** Returns the object with the settings used for calls to sendCommandToDevice. */
+ public UnaryCallSettings
+ sendCommandToDeviceSettings() {
+ return ((DeviceManagerStubSettings) getStubSettings()).sendCommandToDeviceSettings();
+ }
+
+ /** Returns the object with the settings used for calls to bindDeviceToGateway. */
+ public UnaryCallSettings
+ bindDeviceToGatewaySettings() {
+ return ((DeviceManagerStubSettings) getStubSettings()).bindDeviceToGatewaySettings();
+ }
+
+ /** Returns the object with the settings used for calls to unbindDeviceFromGateway. */
+ public UnaryCallSettings
+ unbindDeviceFromGatewaySettings() {
+ return ((DeviceManagerStubSettings) getStubSettings()).unbindDeviceFromGatewaySettings();
+ }
+
public static final DeviceManagerSettings create(DeviceManagerStubSettings stub)
throws IOException {
return new DeviceManagerSettings.Builder(stub.toBuilder()).build();
@@ -350,6 +368,25 @@ public UnaryCallSettings.Builder getIamPolicySettin
return getStubSettingsBuilder().testIamPermissionsSettings();
}
+ /** Returns the builder for the settings used for calls to sendCommandToDevice. */
+ public UnaryCallSettings.Builder
+ sendCommandToDeviceSettings() {
+ return getStubSettingsBuilder().sendCommandToDeviceSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to bindDeviceToGateway. */
+ public UnaryCallSettings.Builder
+ bindDeviceToGatewaySettings() {
+ return getStubSettingsBuilder().bindDeviceToGatewaySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to unbindDeviceFromGateway. */
+ public UnaryCallSettings.Builder<
+ UnbindDeviceFromGatewayRequest, UnbindDeviceFromGatewayResponse>
+ unbindDeviceFromGatewaySettings() {
+ return getStubSettingsBuilder().unbindDeviceFromGatewaySettings();
+ }
+
@Override
public DeviceManagerSettings build() throws IOException {
return new DeviceManagerSettings(this);
diff --git a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/package-info.java b/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/package-info.java
index 9534a559c886..bb3d760b274e 100644
--- a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/package-info.java
+++ b/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/package-info.java
@@ -21,8 +21,8 @@
*
* =================== DeviceManagerClient ===================
*
- *
Service Description: Internet of things (IoT) service. Allows to manipulate device registry
- * instances and the registration of devices (Things) to the cloud.
+ *
Service Description: Internet of Things (IoT) service. Securely connect and manage IoT
+ * devices.
*
*
Sample for DeviceManagerClient:
*
diff --git a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStub.java b/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStub.java
index 7ac5ab4de6f5..fe374b36066c 100644
--- a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStub.java
+++ b/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStub.java
@@ -21,6 +21,8 @@
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
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;
@@ -39,6 +41,10 @@
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;
@@ -137,6 +143,21 @@ public UnaryCallable getIamPolicyCallable() {
throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
}
+ public UnaryCallable
+ sendCommandToDeviceCallable() {
+ throw new UnsupportedOperationException("Not implemented: sendCommandToDeviceCallable()");
+ }
+
+ public UnaryCallable
+ bindDeviceToGatewayCallable() {
+ throw new UnsupportedOperationException("Not implemented: bindDeviceToGatewayCallable()");
+ }
+
+ public UnaryCallable
+ unbindDeviceFromGatewayCallable() {
+ throw new UnsupportedOperationException("Not implemented: unbindDeviceFromGatewayCallable()");
+ }
+
@Override
public abstract void close();
}
diff --git a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStubSettings.java b/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStubSettings.java
index 0e93c14c2a09..4687eddc63b4 100644
--- a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStubSettings.java
+++ b/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStubSettings.java
@@ -40,6 +40,8 @@
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
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;
@@ -58,6 +60,10 @@
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.common.collect.ImmutableList;
@@ -138,6 +144,12 @@ public class DeviceManagerStubSettings extends StubSettings getIamPolicySettings;
private final UnaryCallSettings
testIamPermissionsSettings;
+ private final UnaryCallSettings
+ sendCommandToDeviceSettings;
+ private final UnaryCallSettings
+ bindDeviceToGatewaySettings;
+ private final UnaryCallSettings
+ unbindDeviceFromGatewaySettings;
/** Returns the object with the settings used for calls to createDeviceRegistry. */
public UnaryCallSettings
@@ -229,6 +241,24 @@ public UnaryCallSettings getIamPolicySettings() {
return testIamPermissionsSettings;
}
+ /** Returns the object with the settings used for calls to sendCommandToDevice. */
+ public UnaryCallSettings
+ sendCommandToDeviceSettings() {
+ return sendCommandToDeviceSettings;
+ }
+
+ /** Returns the object with the settings used for calls to bindDeviceToGateway. */
+ public UnaryCallSettings
+ bindDeviceToGatewaySettings() {
+ return bindDeviceToGatewaySettings;
+ }
+
+ /** Returns the object with the settings used for calls to unbindDeviceFromGateway. */
+ public UnaryCallSettings
+ unbindDeviceFromGatewaySettings() {
+ return unbindDeviceFromGatewaySettings;
+ }
+
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public DeviceManagerStub createStub() throws IOException {
if (getTransportChannelProvider()
@@ -313,6 +343,9 @@ protected DeviceManagerStubSettings(Builder settingsBuilder) throws IOException
setIamPolicySettings = settingsBuilder.setIamPolicySettings().build();
getIamPolicySettings = settingsBuilder.getIamPolicySettings().build();
testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
+ sendCommandToDeviceSettings = settingsBuilder.sendCommandToDeviceSettings().build();
+ bindDeviceToGatewaySettings = settingsBuilder.bindDeviceToGatewaySettings().build();
+ unbindDeviceFromGatewaySettings = settingsBuilder.unbindDeviceFromGatewaySettings().build();
}
private static final PagedListDescriptor<
@@ -349,7 +382,9 @@ public String extractNextToken(ListDeviceRegistriesResponse payload) {
@Override
public Iterable extractResources(ListDeviceRegistriesResponse payload) {
- return payload.getDeviceRegistriesList();
+ return payload.getDeviceRegistriesList() != null
+ ? payload.getDeviceRegistriesList()
+ : ImmutableList.of();
}
};
@@ -383,7 +418,9 @@ public String extractNextToken(ListDevicesResponse payload) {
@Override
public Iterable extractResources(ListDevicesResponse payload) {
- return payload.getDevicesList();
+ return payload.getDevicesList() != null
+ ? payload.getDevicesList()
+ : ImmutableList.of();
}
};
@@ -459,6 +496,13 @@ public static class Builder extends StubSettings.Builder getIamPolicySettings;
private final UnaryCallSettings.Builder
testIamPermissionsSettings;
+ private final UnaryCallSettings.Builder
+ sendCommandToDeviceSettings;
+ private final UnaryCallSettings.Builder
+ bindDeviceToGatewaySettings;
+ private final UnaryCallSettings.Builder<
+ UnbindDeviceFromGatewayRequest, UnbindDeviceFromGatewayResponse>
+ unbindDeviceFromGatewaySettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
@@ -552,6 +596,12 @@ protected Builder(ClientContext clientContext) {
testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ sendCommandToDeviceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+ bindDeviceToGatewaySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+ unbindDeviceFromGatewaySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
unaryMethodSettingsBuilders =
ImmutableList.>of(
createDeviceRegistrySettings,
@@ -569,7 +619,10 @@ protected Builder(ClientContext clientContext) {
listDeviceStatesSettings,
setIamPolicySettings,
getIamPolicySettings,
- testIamPermissionsSettings);
+ testIamPermissionsSettings,
+ sendCommandToDeviceSettings,
+ bindDeviceToGatewaySettings,
+ unbindDeviceFromGatewaySettings);
initDefaults(this);
}
@@ -665,6 +718,21 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+ builder
+ .sendCommandToDeviceSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("rate_limited_aware"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("rate_limited_aware"));
+
+ builder
+ .bindDeviceToGatewaySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
+ builder
+ .unbindDeviceFromGatewaySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
return builder;
}
@@ -687,6 +755,9 @@ protected Builder(DeviceManagerStubSettings settings) {
setIamPolicySettings = settings.setIamPolicySettings.toBuilder();
getIamPolicySettings = settings.getIamPolicySettings.toBuilder();
testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder();
+ sendCommandToDeviceSettings = settings.sendCommandToDeviceSettings.toBuilder();
+ bindDeviceToGatewaySettings = settings.bindDeviceToGatewaySettings.toBuilder();
+ unbindDeviceFromGatewaySettings = settings.unbindDeviceFromGatewaySettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
@@ -705,7 +776,10 @@ protected Builder(DeviceManagerStubSettings settings) {
listDeviceStatesSettings,
setIamPolicySettings,
getIamPolicySettings,
- testIamPermissionsSettings);
+ testIamPermissionsSettings,
+ sendCommandToDeviceSettings,
+ bindDeviceToGatewaySettings,
+ unbindDeviceFromGatewaySettings);
}
// NEXT_MAJOR_VER: remove 'throws Exception'
@@ -818,6 +892,25 @@ public UnaryCallSettings.Builder getIamPolicySettin
return testIamPermissionsSettings;
}
+ /** Returns the builder for the settings used for calls to sendCommandToDevice. */
+ public UnaryCallSettings.Builder
+ sendCommandToDeviceSettings() {
+ return sendCommandToDeviceSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to bindDeviceToGateway. */
+ public UnaryCallSettings.Builder
+ bindDeviceToGatewaySettings() {
+ return bindDeviceToGatewaySettings;
+ }
+
+ /** Returns the builder for the settings used for calls to unbindDeviceFromGateway. */
+ public UnaryCallSettings.Builder<
+ UnbindDeviceFromGatewayRequest, UnbindDeviceFromGatewayResponse>
+ unbindDeviceFromGatewaySettings() {
+ return unbindDeviceFromGatewaySettings;
+ }
+
@Override
public DeviceManagerStubSettings build() throws IOException {
return new DeviceManagerStubSettings(this);
diff --git a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/GrpcDeviceManagerStub.java b/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/GrpcDeviceManagerStub.java
index 4bedbca02ef5..4cefb4ea4e91 100644
--- a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/GrpcDeviceManagerStub.java
+++ b/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/GrpcDeviceManagerStub.java
@@ -26,6 +26,8 @@
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.RequestParamsExtractor;
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;
@@ -44,6 +46,10 @@
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.common.collect.ImmutableMap;
@@ -208,6 +214,38 @@ public class GrpcDeviceManagerStub extends DeviceManagerStub {
.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 BackgroundResource backgroundResources;
@@ -238,6 +276,12 @@ public class GrpcDeviceManagerStub extends DeviceManagerStub {
private final UnaryCallable getIamPolicyCallable;
private final UnaryCallable
testIamPermissionsCallable;
+ private final UnaryCallable
+ sendCommandToDeviceCallable;
+ private final UnaryCallable
+ bindDeviceToGatewayCallable;
+ private final UnaryCallable
+ unbindDeviceFromGatewayCallable;
private final GrpcStubCallableFactory callableFactory;
@@ -496,6 +540,49 @@ public Map extract(TestIamPermissionsRequest request) {
}
})
.build();
+ GrpcCallSettings
+ sendCommandToDeviceTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(sendCommandToDeviceMethodDescriptor)
+ .setParamsExtractor(
+ new RequestParamsExtractor() {
+ @Override
+ public Map extract(SendCommandToDeviceRequest request) {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ }
+ })
+ .build();
+ GrpcCallSettings
+ bindDeviceToGatewayTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(bindDeviceToGatewayMethodDescriptor)
+ .setParamsExtractor(
+ new RequestParamsExtractor() {
+ @Override
+ public Map extract(BindDeviceToGatewayRequest request) {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ }
+ })
+ .build();
+ GrpcCallSettings
+ unbindDeviceFromGatewayTransportSettings =
+ GrpcCallSettings
+ .newBuilder()
+ .setMethodDescriptor(unbindDeviceFromGatewayMethodDescriptor)
+ .setParamsExtractor(
+ new RequestParamsExtractor() {
+ @Override
+ public Map extract(UnbindDeviceFromGatewayRequest request) {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ }
+ })
+ .build();
this.createDeviceRegistryCallable =
callableFactory.createUnaryCallable(
@@ -569,6 +656,21 @@ public Map extract(TestIamPermissionsRequest request) {
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);
backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
}
@@ -651,6 +753,21 @@ public UnaryCallable getIamPolicyCallable() {
return testIamPermissionsCallable;
}
+ public UnaryCallable
+ sendCommandToDeviceCallable() {
+ return sendCommandToDeviceCallable;
+ }
+
+ public UnaryCallable
+ bindDeviceToGatewayCallable() {
+ return bindDeviceToGatewayCallable;
+ }
+
+ public UnaryCallable
+ unbindDeviceFromGatewayCallable() {
+ return unbindDeviceFromGatewayCallable;
+ }
+
@Override
public final void close() {
shutdown();
diff --git a/google-cloud-clients/google-cloud-iot/src/test/java/com/google/cloud/iot/v1/DeviceManagerClientTest.java b/google-cloud-clients/google-cloud-iot/src/test/java/com/google/cloud/iot/v1/DeviceManagerClientTest.java
index 2e29a774afa9..abd9a18d249e 100644
--- a/google-cloud-clients/google-cloud-iot/src/test/java/com/google/cloud/iot/v1/DeviceManagerClientTest.java
+++ b/google-cloud-clients/google-cloud-iot/src/test/java/com/google/cloud/iot/v1/DeviceManagerClientTest.java
@@ -781,4 +781,141 @@ public void testIamPermissionsExceptionTest() throws Exception {
// Expected exception
}
}
+
+ @Test
+ @SuppressWarnings("all")
+ public void sendCommandToDeviceTest() {
+ SendCommandToDeviceResponse expectedResponse = SendCommandToDeviceResponse.newBuilder().build();
+ mockDeviceManager.addResponse(expectedResponse);
+
+ DeviceName name = DeviceName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
+ ByteString binaryData = ByteString.copyFromUtf8("40");
+ String subfolder = "subfolder153561774";
+
+ SendCommandToDeviceResponse actualResponse =
+ client.sendCommandToDevice(name, binaryData, subfolder);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockDeviceManager.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ SendCommandToDeviceRequest actualRequest = (SendCommandToDeviceRequest) actualRequests.get(0);
+
+ Assert.assertEquals(name, DeviceName.parse(actualRequest.getName()));
+ Assert.assertEquals(binaryData, actualRequest.getBinaryData());
+ Assert.assertEquals(subfolder, actualRequest.getSubfolder());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ @SuppressWarnings("all")
+ public void sendCommandToDeviceExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+ mockDeviceManager.addException(exception);
+
+ try {
+ DeviceName name = DeviceName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
+ ByteString binaryData = ByteString.copyFromUtf8("40");
+ String subfolder = "subfolder153561774";
+
+ client.sendCommandToDevice(name, binaryData, subfolder);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception
+ }
+ }
+
+ @Test
+ @SuppressWarnings("all")
+ public void bindDeviceToGatewayTest() {
+ BindDeviceToGatewayResponse expectedResponse = BindDeviceToGatewayResponse.newBuilder().build();
+ mockDeviceManager.addResponse(expectedResponse);
+
+ RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
+ String gatewayId = "gatewayId955798774";
+ String deviceId = "deviceId25209764";
+
+ BindDeviceToGatewayResponse actualResponse =
+ client.bindDeviceToGateway(parent, gatewayId, deviceId);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockDeviceManager.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ BindDeviceToGatewayRequest actualRequest = (BindDeviceToGatewayRequest) actualRequests.get(0);
+
+ Assert.assertEquals(parent, RegistryName.parse(actualRequest.getParent()));
+ Assert.assertEquals(gatewayId, actualRequest.getGatewayId());
+ Assert.assertEquals(deviceId, actualRequest.getDeviceId());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ @SuppressWarnings("all")
+ public void bindDeviceToGatewayExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+ mockDeviceManager.addException(exception);
+
+ try {
+ RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
+ String gatewayId = "gatewayId955798774";
+ String deviceId = "deviceId25209764";
+
+ client.bindDeviceToGateway(parent, gatewayId, deviceId);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception
+ }
+ }
+
+ @Test
+ @SuppressWarnings("all")
+ public void unbindDeviceFromGatewayTest() {
+ UnbindDeviceFromGatewayResponse expectedResponse =
+ UnbindDeviceFromGatewayResponse.newBuilder().build();
+ mockDeviceManager.addResponse(expectedResponse);
+
+ RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
+ String gatewayId = "gatewayId955798774";
+ String deviceId = "deviceId25209764";
+
+ UnbindDeviceFromGatewayResponse actualResponse =
+ client.unbindDeviceFromGateway(parent, gatewayId, deviceId);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockDeviceManager.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ UnbindDeviceFromGatewayRequest actualRequest =
+ (UnbindDeviceFromGatewayRequest) actualRequests.get(0);
+
+ Assert.assertEquals(parent, RegistryName.parse(actualRequest.getParent()));
+ Assert.assertEquals(gatewayId, actualRequest.getGatewayId());
+ Assert.assertEquals(deviceId, actualRequest.getDeviceId());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ @SuppressWarnings("all")
+ public void unbindDeviceFromGatewayExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+ mockDeviceManager.addException(exception);
+
+ try {
+ RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
+ String gatewayId = "gatewayId955798774";
+ String deviceId = "deviceId25209764";
+
+ client.unbindDeviceFromGateway(parent, gatewayId, deviceId);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception
+ }
+ }
}
diff --git a/google-cloud-clients/google-cloud-iot/src/test/java/com/google/cloud/iot/v1/MockDeviceManagerImpl.java b/google-cloud-clients/google-cloud-iot/src/test/java/com/google/cloud/iot/v1/MockDeviceManagerImpl.java
index 0fc8486ddf96..53874def53c9 100644
--- a/google-cloud-clients/google-cloud-iot/src/test/java/com/google/cloud/iot/v1/MockDeviceManagerImpl.java
+++ b/google-cloud-clients/google-cloud-iot/src/test/java/com/google/cloud/iot/v1/MockDeviceManagerImpl.java
@@ -298,4 +298,52 @@ public void testIamPermissions(
responseObserver.onError(new IllegalArgumentException("Unrecognized response type"));
}
}
+
+ @Override
+ public void sendCommandToDevice(
+ SendCommandToDeviceRequest request,
+ StreamObserver responseObserver) {
+ Object response = responses.remove();
+ if (response instanceof SendCommandToDeviceResponse) {
+ requests.add(request);
+ responseObserver.onNext((SendCommandToDeviceResponse) response);
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError((Exception) response);
+ } else {
+ responseObserver.onError(new IllegalArgumentException("Unrecognized response type"));
+ }
+ }
+
+ @Override
+ public void bindDeviceToGateway(
+ BindDeviceToGatewayRequest request,
+ StreamObserver responseObserver) {
+ Object response = responses.remove();
+ if (response instanceof BindDeviceToGatewayResponse) {
+ requests.add(request);
+ responseObserver.onNext((BindDeviceToGatewayResponse) response);
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError((Exception) response);
+ } else {
+ responseObserver.onError(new IllegalArgumentException("Unrecognized response type"));
+ }
+ }
+
+ @Override
+ public void unbindDeviceFromGateway(
+ UnbindDeviceFromGatewayRequest request,
+ StreamObserver responseObserver) {
+ Object response = responses.remove();
+ if (response instanceof UnbindDeviceFromGatewayResponse) {
+ requests.add(request);
+ responseObserver.onNext((UnbindDeviceFromGatewayResponse) response);
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError((Exception) response);
+ } else {
+ responseObserver.onError(new IllegalArgumentException("Unrecognized response type"));
+ }
+ }
}