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

io.opencannabis.schema.device.Device Maven / Gradle / Ivy

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

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: device/Device.proto

package io.opencannabis.schema.device;

/**
 * 
 * Specifies a structure that describes a known device.
 * 
* * Protobuf type {@code opencannabis.device.Device} */ public final class Device extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opencannabis.device.Device) DeviceOrBuilder { private static final long serialVersionUID = 0L; // Use Device.newBuilder() to construct. private Device(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Device() { uuid_ = ""; type_ = 0; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Device( 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(); uuid_ = s; break; } case 16: { int rawValue = input.readEnum(); type_ = rawValue; break; } case 26: { io.opencannabis.schema.device.DeviceFlags.Builder subBuilder = null; if (flags_ != null) { subBuilder = flags_.toBuilder(); } flags_ = input.readMessage(io.opencannabis.schema.device.DeviceFlags.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(flags_); flags_ = subBuilder.buildPartial(); } break; } case 34: { io.opencannabis.schema.device.DeviceCredentials.Builder subBuilder = null; if (key_ != null) { subBuilder = key_.toBuilder(); } key_ = input.readMessage(io.opencannabis.schema.device.DeviceCredentials.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(key_); key_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( 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 io.opencannabis.schema.device.DeviceOuterClass.internal_static_opencannabis_device_Device_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.device.DeviceOuterClass.internal_static_opencannabis_device_Device_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.device.Device.class, io.opencannabis.schema.device.Device.Builder.class); } public static final int UUID_FIELD_NUMBER = 1; private volatile java.lang.Object uuid_; /** *
   * Universally unique identifier for this device.
   * 
* * string uuid = 1 [(.gen_bq_schema.description) = "Universally unique identifier for this device."]; */ public java.lang.String getUuid() { java.lang.Object ref = uuid_; 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(); uuid_ = s; return s; } } /** *
   * Universally unique identifier for this device.
   * 
* * string uuid = 1 [(.gen_bq_schema.description) = "Universally unique identifier for this device."]; */ public com.google.protobuf.ByteString getUuidBytes() { java.lang.Object ref = uuid_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); uuid_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TYPE_FIELD_NUMBER = 2; private int type_; /** *
   * Type of this device.
   * 
* * .opencannabis.device.DeviceType type = 2 [(.gen_bq_schema.description) = "Type of this device."]; */ public int getTypeValue() { return type_; } /** *
   * Type of this device.
   * 
* * .opencannabis.device.DeviceType type = 2 [(.gen_bq_schema.description) = "Type of this device."]; */ public io.opencannabis.schema.device.DeviceType getType() { @SuppressWarnings("deprecation") io.opencannabis.schema.device.DeviceType result = io.opencannabis.schema.device.DeviceType.valueOf(type_); return result == null ? io.opencannabis.schema.device.DeviceType.UNRECOGNIZED : result; } public static final int FLAGS_FIELD_NUMBER = 3; private io.opencannabis.schema.device.DeviceFlags flags_; /** *
   * Flags for this device.
   * 
* * .opencannabis.device.DeviceFlags flags = 3 [(.gen_bq_schema.description) = "Flags for this device."]; */ public boolean hasFlags() { return flags_ != null; } /** *
   * Flags for this device.
   * 
* * .opencannabis.device.DeviceFlags flags = 3 [(.gen_bq_schema.description) = "Flags for this device."]; */ public io.opencannabis.schema.device.DeviceFlags getFlags() { return flags_ == null ? io.opencannabis.schema.device.DeviceFlags.getDefaultInstance() : flags_; } /** *
   * Flags for this device.
   * 
* * .opencannabis.device.DeviceFlags flags = 3 [(.gen_bq_schema.description) = "Flags for this device."]; */ public io.opencannabis.schema.device.DeviceFlagsOrBuilder getFlagsOrBuilder() { return getFlags(); } public static final int KEY_FIELD_NUMBER = 4; private io.opencannabis.schema.device.DeviceCredentials key_; /** *
   * Credentials for this device.
   * 
* * .opencannabis.device.DeviceCredentials key = 4 [(.gen_bq_schema.description) = "Credentials for this device."]; */ public boolean hasKey() { return key_ != null; } /** *
   * Credentials for this device.
   * 
* * .opencannabis.device.DeviceCredentials key = 4 [(.gen_bq_schema.description) = "Credentials for this device."]; */ public io.opencannabis.schema.device.DeviceCredentials getKey() { return key_ == null ? io.opencannabis.schema.device.DeviceCredentials.getDefaultInstance() : key_; } /** *
   * Credentials for this device.
   * 
* * .opencannabis.device.DeviceCredentials key = 4 [(.gen_bq_schema.description) = "Credentials for this device."]; */ public io.opencannabis.schema.device.DeviceCredentialsOrBuilder getKeyOrBuilder() { return getKey(); } 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 (!getUuidBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uuid_); } if (type_ != io.opencannabis.schema.device.DeviceType.UNKNOWN_DEVICE_TYPE.getNumber()) { output.writeEnum(2, type_); } if (flags_ != null) { output.writeMessage(3, getFlags()); } if (key_ != null) { output.writeMessage(4, getKey()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getUuidBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uuid_); } if (type_ != io.opencannabis.schema.device.DeviceType.UNKNOWN_DEVICE_TYPE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, type_); } if (flags_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getFlags()); } if (key_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getKey()); } 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 io.opencannabis.schema.device.Device)) { return super.equals(obj); } io.opencannabis.schema.device.Device other = (io.opencannabis.schema.device.Device) obj; if (!getUuid() .equals(other.getUuid())) return false; if (type_ != other.type_) return false; if (hasFlags() != other.hasFlags()) return false; if (hasFlags()) { if (!getFlags() .equals(other.getFlags())) return false; } if (hasKey() != other.hasKey()) return false; if (hasKey()) { if (!getKey() .equals(other.getKey())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + UUID_FIELD_NUMBER; hash = (53 * hash) + getUuid().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; if (hasFlags()) { hash = (37 * hash) + FLAGS_FIELD_NUMBER; hash = (53 * hash) + getFlags().hashCode(); } if (hasKey()) { hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opencannabis.schema.device.Device parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.device.Device parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.device.Device parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.device.Device parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.device.Device parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.device.Device parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.device.Device parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.device.Device 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 io.opencannabis.schema.device.Device parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opencannabis.schema.device.Device 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 io.opencannabis.schema.device.Device parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.device.Device 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(io.opencannabis.schema.device.Device 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; } /** *
   * Specifies a structure that describes a known device.
   * 
* * Protobuf type {@code opencannabis.device.Device} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opencannabis.device.Device) io.opencannabis.schema.device.DeviceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.device.DeviceOuterClass.internal_static_opencannabis_device_Device_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.device.DeviceOuterClass.internal_static_opencannabis_device_Device_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.device.Device.class, io.opencannabis.schema.device.Device.Builder.class); } // Construct using io.opencannabis.schema.device.Device.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(); uuid_ = ""; type_ = 0; if (flagsBuilder_ == null) { flags_ = null; } else { flags_ = null; flagsBuilder_ = null; } if (keyBuilder_ == null) { key_ = null; } else { key_ = null; keyBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opencannabis.schema.device.DeviceOuterClass.internal_static_opencannabis_device_Device_descriptor; } @java.lang.Override public io.opencannabis.schema.device.Device getDefaultInstanceForType() { return io.opencannabis.schema.device.Device.getDefaultInstance(); } @java.lang.Override public io.opencannabis.schema.device.Device build() { io.opencannabis.schema.device.Device result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opencannabis.schema.device.Device buildPartial() { io.opencannabis.schema.device.Device result = new io.opencannabis.schema.device.Device(this); result.uuid_ = uuid_; result.type_ = type_; if (flagsBuilder_ == null) { result.flags_ = flags_; } else { result.flags_ = flagsBuilder_.build(); } if (keyBuilder_ == null) { result.key_ = key_; } else { result.key_ = keyBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.opencannabis.schema.device.Device) { return mergeFrom((io.opencannabis.schema.device.Device)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opencannabis.schema.device.Device other) { if (other == io.opencannabis.schema.device.Device.getDefaultInstance()) return this; if (!other.getUuid().isEmpty()) { uuid_ = other.uuid_; onChanged(); } if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (other.hasFlags()) { mergeFlags(other.getFlags()); } if (other.hasKey()) { mergeKey(other.getKey()); } 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 { io.opencannabis.schema.device.Device parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opencannabis.schema.device.Device) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object uuid_ = ""; /** *
     * Universally unique identifier for this device.
     * 
* * string uuid = 1 [(.gen_bq_schema.description) = "Universally unique identifier for this device."]; */ public java.lang.String getUuid() { java.lang.Object ref = uuid_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); uuid_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Universally unique identifier for this device.
     * 
* * string uuid = 1 [(.gen_bq_schema.description) = "Universally unique identifier for this device."]; */ public com.google.protobuf.ByteString getUuidBytes() { java.lang.Object ref = uuid_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); uuid_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Universally unique identifier for this device.
     * 
* * string uuid = 1 [(.gen_bq_schema.description) = "Universally unique identifier for this device."]; */ public Builder setUuid( java.lang.String value) { if (value == null) { throw new NullPointerException(); } uuid_ = value; onChanged(); return this; } /** *
     * Universally unique identifier for this device.
     * 
* * string uuid = 1 [(.gen_bq_schema.description) = "Universally unique identifier for this device."]; */ public Builder clearUuid() { uuid_ = getDefaultInstance().getUuid(); onChanged(); return this; } /** *
     * Universally unique identifier for this device.
     * 
* * string uuid = 1 [(.gen_bq_schema.description) = "Universally unique identifier for this device."]; */ public Builder setUuidBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); uuid_ = value; onChanged(); return this; } private int type_ = 0; /** *
     * Type of this device.
     * 
* * .opencannabis.device.DeviceType type = 2 [(.gen_bq_schema.description) = "Type of this device."]; */ public int getTypeValue() { return type_; } /** *
     * Type of this device.
     * 
* * .opencannabis.device.DeviceType type = 2 [(.gen_bq_schema.description) = "Type of this device."]; */ public Builder setTypeValue(int value) { type_ = value; onChanged(); return this; } /** *
     * Type of this device.
     * 
* * .opencannabis.device.DeviceType type = 2 [(.gen_bq_schema.description) = "Type of this device."]; */ public io.opencannabis.schema.device.DeviceType getType() { @SuppressWarnings("deprecation") io.opencannabis.schema.device.DeviceType result = io.opencannabis.schema.device.DeviceType.valueOf(type_); return result == null ? io.opencannabis.schema.device.DeviceType.UNRECOGNIZED : result; } /** *
     * Type of this device.
     * 
* * .opencannabis.device.DeviceType type = 2 [(.gen_bq_schema.description) = "Type of this device."]; */ public Builder setType(io.opencannabis.schema.device.DeviceType value) { if (value == null) { throw new NullPointerException(); } type_ = value.getNumber(); onChanged(); return this; } /** *
     * Type of this device.
     * 
* * .opencannabis.device.DeviceType type = 2 [(.gen_bq_schema.description) = "Type of this device."]; */ public Builder clearType() { type_ = 0; onChanged(); return this; } private io.opencannabis.schema.device.DeviceFlags flags_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.device.DeviceFlags, io.opencannabis.schema.device.DeviceFlags.Builder, io.opencannabis.schema.device.DeviceFlagsOrBuilder> flagsBuilder_; /** *
     * Flags for this device.
     * 
* * .opencannabis.device.DeviceFlags flags = 3 [(.gen_bq_schema.description) = "Flags for this device."]; */ public boolean hasFlags() { return flagsBuilder_ != null || flags_ != null; } /** *
     * Flags for this device.
     * 
* * .opencannabis.device.DeviceFlags flags = 3 [(.gen_bq_schema.description) = "Flags for this device."]; */ public io.opencannabis.schema.device.DeviceFlags getFlags() { if (flagsBuilder_ == null) { return flags_ == null ? io.opencannabis.schema.device.DeviceFlags.getDefaultInstance() : flags_; } else { return flagsBuilder_.getMessage(); } } /** *
     * Flags for this device.
     * 
* * .opencannabis.device.DeviceFlags flags = 3 [(.gen_bq_schema.description) = "Flags for this device."]; */ public Builder setFlags(io.opencannabis.schema.device.DeviceFlags value) { if (flagsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } flags_ = value; onChanged(); } else { flagsBuilder_.setMessage(value); } return this; } /** *
     * Flags for this device.
     * 
* * .opencannabis.device.DeviceFlags flags = 3 [(.gen_bq_schema.description) = "Flags for this device."]; */ public Builder setFlags( io.opencannabis.schema.device.DeviceFlags.Builder builderForValue) { if (flagsBuilder_ == null) { flags_ = builderForValue.build(); onChanged(); } else { flagsBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Flags for this device.
     * 
* * .opencannabis.device.DeviceFlags flags = 3 [(.gen_bq_schema.description) = "Flags for this device."]; */ public Builder mergeFlags(io.opencannabis.schema.device.DeviceFlags value) { if (flagsBuilder_ == null) { if (flags_ != null) { flags_ = io.opencannabis.schema.device.DeviceFlags.newBuilder(flags_).mergeFrom(value).buildPartial(); } else { flags_ = value; } onChanged(); } else { flagsBuilder_.mergeFrom(value); } return this; } /** *
     * Flags for this device.
     * 
* * .opencannabis.device.DeviceFlags flags = 3 [(.gen_bq_schema.description) = "Flags for this device."]; */ public Builder clearFlags() { if (flagsBuilder_ == null) { flags_ = null; onChanged(); } else { flags_ = null; flagsBuilder_ = null; } return this; } /** *
     * Flags for this device.
     * 
* * .opencannabis.device.DeviceFlags flags = 3 [(.gen_bq_schema.description) = "Flags for this device."]; */ public io.opencannabis.schema.device.DeviceFlags.Builder getFlagsBuilder() { onChanged(); return getFlagsFieldBuilder().getBuilder(); } /** *
     * Flags for this device.
     * 
* * .opencannabis.device.DeviceFlags flags = 3 [(.gen_bq_schema.description) = "Flags for this device."]; */ public io.opencannabis.schema.device.DeviceFlagsOrBuilder getFlagsOrBuilder() { if (flagsBuilder_ != null) { return flagsBuilder_.getMessageOrBuilder(); } else { return flags_ == null ? io.opencannabis.schema.device.DeviceFlags.getDefaultInstance() : flags_; } } /** *
     * Flags for this device.
     * 
* * .opencannabis.device.DeviceFlags flags = 3 [(.gen_bq_schema.description) = "Flags for this device."]; */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.device.DeviceFlags, io.opencannabis.schema.device.DeviceFlags.Builder, io.opencannabis.schema.device.DeviceFlagsOrBuilder> getFlagsFieldBuilder() { if (flagsBuilder_ == null) { flagsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.device.DeviceFlags, io.opencannabis.schema.device.DeviceFlags.Builder, io.opencannabis.schema.device.DeviceFlagsOrBuilder>( getFlags(), getParentForChildren(), isClean()); flags_ = null; } return flagsBuilder_; } private io.opencannabis.schema.device.DeviceCredentials key_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.device.DeviceCredentials, io.opencannabis.schema.device.DeviceCredentials.Builder, io.opencannabis.schema.device.DeviceCredentialsOrBuilder> keyBuilder_; /** *
     * Credentials for this device.
     * 
* * .opencannabis.device.DeviceCredentials key = 4 [(.gen_bq_schema.description) = "Credentials for this device."]; */ public boolean hasKey() { return keyBuilder_ != null || key_ != null; } /** *
     * Credentials for this device.
     * 
* * .opencannabis.device.DeviceCredentials key = 4 [(.gen_bq_schema.description) = "Credentials for this device."]; */ public io.opencannabis.schema.device.DeviceCredentials getKey() { if (keyBuilder_ == null) { return key_ == null ? io.opencannabis.schema.device.DeviceCredentials.getDefaultInstance() : key_; } else { return keyBuilder_.getMessage(); } } /** *
     * Credentials for this device.
     * 
* * .opencannabis.device.DeviceCredentials key = 4 [(.gen_bq_schema.description) = "Credentials for this device."]; */ public Builder setKey(io.opencannabis.schema.device.DeviceCredentials value) { if (keyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); } else { keyBuilder_.setMessage(value); } return this; } /** *
     * Credentials for this device.
     * 
* * .opencannabis.device.DeviceCredentials key = 4 [(.gen_bq_schema.description) = "Credentials for this device."]; */ public Builder setKey( io.opencannabis.schema.device.DeviceCredentials.Builder builderForValue) { if (keyBuilder_ == null) { key_ = builderForValue.build(); onChanged(); } else { keyBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Credentials for this device.
     * 
* * .opencannabis.device.DeviceCredentials key = 4 [(.gen_bq_schema.description) = "Credentials for this device."]; */ public Builder mergeKey(io.opencannabis.schema.device.DeviceCredentials value) { if (keyBuilder_ == null) { if (key_ != null) { key_ = io.opencannabis.schema.device.DeviceCredentials.newBuilder(key_).mergeFrom(value).buildPartial(); } else { key_ = value; } onChanged(); } else { keyBuilder_.mergeFrom(value); } return this; } /** *
     * Credentials for this device.
     * 
* * .opencannabis.device.DeviceCredentials key = 4 [(.gen_bq_schema.description) = "Credentials for this device."]; */ public Builder clearKey() { if (keyBuilder_ == null) { key_ = null; onChanged(); } else { key_ = null; keyBuilder_ = null; } return this; } /** *
     * Credentials for this device.
     * 
* * .opencannabis.device.DeviceCredentials key = 4 [(.gen_bq_schema.description) = "Credentials for this device."]; */ public io.opencannabis.schema.device.DeviceCredentials.Builder getKeyBuilder() { onChanged(); return getKeyFieldBuilder().getBuilder(); } /** *
     * Credentials for this device.
     * 
* * .opencannabis.device.DeviceCredentials key = 4 [(.gen_bq_schema.description) = "Credentials for this device."]; */ public io.opencannabis.schema.device.DeviceCredentialsOrBuilder getKeyOrBuilder() { if (keyBuilder_ != null) { return keyBuilder_.getMessageOrBuilder(); } else { return key_ == null ? io.opencannabis.schema.device.DeviceCredentials.getDefaultInstance() : key_; } } /** *
     * Credentials for this device.
     * 
* * .opencannabis.device.DeviceCredentials key = 4 [(.gen_bq_schema.description) = "Credentials for this device."]; */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.device.DeviceCredentials, io.opencannabis.schema.device.DeviceCredentials.Builder, io.opencannabis.schema.device.DeviceCredentialsOrBuilder> getKeyFieldBuilder() { if (keyBuilder_ == null) { keyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.device.DeviceCredentials, io.opencannabis.schema.device.DeviceCredentials.Builder, io.opencannabis.schema.device.DeviceCredentialsOrBuilder>( getKey(), getParentForChildren(), isClean()); key_ = null; } return keyBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:opencannabis.device.Device) } // @@protoc_insertion_point(class_scope:opencannabis.device.Device) private static final io.opencannabis.schema.device.Device DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opencannabis.schema.device.Device(); } public static io.opencannabis.schema.device.Device getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Device parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Device(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 io.opencannabis.schema.device.Device getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy