/** Creates a Builder by copying an existing BootstrapSyncResponse instance */ private Builder(org.kaaproject.kaa.common.endpoint.gen.BootstrapSyncResponse other) { super(org.kaaproject.kaa.common.endpoint.gen.BootstrapSyncResponse.SCHEMA$); if (isValidValue(fields()[0], other.requestId)) { this.requestId = data().deepCopy(fields()[0].schema(), other.requestId); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.supportedProtocols)) { this.supportedProtocols = data().deepCopy(fields()[1].schema(), other.supportedProtocols); fieldSetFlags()[1] = true; } }
/** Creates a Builder by copying an existing Builder */ private Builder(org.kaaproject.kaa.common.endpoint.gen.BootstrapSyncResponse.Builder other) { super(other); if (isValidValue(fields()[0], other.requestId)) { this.requestId = data().deepCopy(fields()[0].schema(), other.requestId); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.supportedProtocols)) { this.supportedProtocols = data().deepCopy(fields()[1].schema(), other.supportedProtocols); fieldSetFlags()[1] = true; } }
@Override public BootstrapSyncResponse build() { try { BootstrapSyncResponse record = new BootstrapSyncResponse(); record.requestId = fieldSetFlags()[0] ? this.requestId : (java.lang.Integer) defaultValue(fields()[0]); record.supportedProtocols = fieldSetFlags()[1] ? this.supportedProtocols : (java.util.List<org.kaaproject.kaa.common.endpoint.gen.ProtocolMetaData>) defaultValue(fields()[1]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Checks whether the 'requestId' field has been set */ public boolean hasRequestId() { return fieldSetFlags()[0]; }
/** Checks whether the 'supportedProtocols' field has been set */ public boolean hasSupportedProtocols() { return fieldSetFlags()[1]; }
/** Clears the value of the 'supportedProtocols' field */ public org.kaaproject.kaa.common.endpoint.gen.BootstrapSyncResponse.Builder clearSupportedProtocols() { supportedProtocols = null; fieldSetFlags()[1] = false; return this; }
/** Sets the value of the 'requestId' field */ public org.kaaproject.kaa.common.endpoint.gen.BootstrapSyncResponse.Builder setRequestId(int value) { validate(fields()[0], value); this.requestId = value; fieldSetFlags()[0] = true; return this; }
/** Sets the value of the 'supportedProtocols' field */ public org.kaaproject.kaa.common.endpoint.gen.BootstrapSyncResponse.Builder setSupportedProtocols(java.util.List<org.kaaproject.kaa.common.endpoint.gen.ProtocolMetaData> value) { validate(fields()[1], value); this.supportedProtocols = value; fieldSetFlags()[1] = true; return this; }
/** Clears the value of the 'requestId' field */ public org.kaaproject.kaa.common.endpoint.gen.BootstrapSyncResponse.Builder clearRequestId() { fieldSetFlags()[0] = false; return this; }