/** Creates a Builder by copying an existing ProfileSyncRequest instance */ private Builder(org.kaaproject.kaa.common.endpoint.gen.ProfileSyncRequest other) { super(org.kaaproject.kaa.common.endpoint.gen.ProfileSyncRequest.SCHEMA$); if (isValidValue(fields()[0], other.endpointPublicKey)) { this.endpointPublicKey = data().deepCopy(fields()[0].schema(), other.endpointPublicKey); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.profileBody)) { this.profileBody = data().deepCopy(fields()[1].schema(), other.profileBody); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.endpointAccessToken)) { this.endpointAccessToken = data().deepCopy(fields()[2].schema(), other.endpointAccessToken); fieldSetFlags()[2] = true; } }
/** Creates a Builder by copying an existing Builder */ private Builder(org.kaaproject.kaa.common.endpoint.gen.ProfileSyncRequest.Builder other) { super(other); if (isValidValue(fields()[0], other.endpointPublicKey)) { this.endpointPublicKey = data().deepCopy(fields()[0].schema(), other.endpointPublicKey); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.profileBody)) { this.profileBody = data().deepCopy(fields()[1].schema(), other.profileBody); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.endpointAccessToken)) { this.endpointAccessToken = data().deepCopy(fields()[2].schema(), other.endpointAccessToken); fieldSetFlags()[2] = true; } }
@Override public ProfileSyncRequest build() { try { ProfileSyncRequest record = new ProfileSyncRequest(); record.endpointPublicKey = fieldSetFlags()[0] ? this.endpointPublicKey : (java.nio.ByteBuffer) defaultValue(fields()[0]); record.profileBody = fieldSetFlags()[1] ? this.profileBody : (java.nio.ByteBuffer) defaultValue(fields()[1]); record.endpointAccessToken = fieldSetFlags()[2] ? this.endpointAccessToken : (java.lang.String) defaultValue(fields()[2]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Sets the value of the 'endpointAccessToken' field */ public org.kaaproject.kaa.common.endpoint.gen.ProfileSyncRequest.Builder setEndpointAccessToken(java.lang.String value) { validate(fields()[2], value); this.endpointAccessToken = value; fieldSetFlags()[2] = true; return this; }
/** Sets the value of the 'profileBody' field */ public org.kaaproject.kaa.common.endpoint.gen.ProfileSyncRequest.Builder setProfileBody(java.nio.ByteBuffer value) { validate(fields()[1], value); this.profileBody = value; fieldSetFlags()[1] = true; return this; }
/** Sets the value of the 'endpointPublicKey' field */ public org.kaaproject.kaa.common.endpoint.gen.ProfileSyncRequest.Builder setEndpointPublicKey(java.nio.ByteBuffer value) { validate(fields()[0], value); this.endpointPublicKey = value; fieldSetFlags()[0] = true; return this; }