/** Creates a Builder by copying an existing Builder */ private Builder(org.kaaproject.kaa.common.endpoint.gen.UserAttachNotification.Builder other) { super(other); if (isValidValue(fields()[0], other.userExternalId)) { this.userExternalId = data().deepCopy(fields()[0].schema(), other.userExternalId); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.endpointAccessToken)) { this.endpointAccessToken = data().deepCopy(fields()[1].schema(), other.endpointAccessToken); fieldSetFlags()[1] = true; } }
/** Creates a Builder by copying an existing UserAttachNotification instance */ private Builder(org.kaaproject.kaa.common.endpoint.gen.UserAttachNotification other) { super(org.kaaproject.kaa.common.endpoint.gen.UserAttachNotification.SCHEMA$); if (isValidValue(fields()[0], other.userExternalId)) { this.userExternalId = data().deepCopy(fields()[0].schema(), other.userExternalId); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.endpointAccessToken)) { this.endpointAccessToken = data().deepCopy(fields()[1].schema(), other.endpointAccessToken); fieldSetFlags()[1] = true; } }
@Override public UserAttachNotification build() { try { UserAttachNotification record = new UserAttachNotification(); record.userExternalId = fieldSetFlags()[0] ? this.userExternalId : (java.lang.String) defaultValue(fields()[0]); record.endpointAccessToken = fieldSetFlags()[1] ? this.endpointAccessToken : (java.lang.String) defaultValue(fields()[1]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Checks whether the 'endpointAccessToken' field has been set */ public boolean hasEndpointAccessToken() { return fieldSetFlags()[1]; }
/** Checks whether the 'userExternalId' field has been set */ public boolean hasUserExternalId() { return fieldSetFlags()[0]; }
/** Clears the value of the 'endpointAccessToken' field */ public org.kaaproject.kaa.common.endpoint.gen.UserAttachNotification.Builder clearEndpointAccessToken() { endpointAccessToken = null; fieldSetFlags()[1] = false; return this; }
/** Sets the value of the 'userExternalId' field */ public org.kaaproject.kaa.common.endpoint.gen.UserAttachNotification.Builder setUserExternalId(java.lang.String value) { validate(fields()[0], value); this.userExternalId = value; fieldSetFlags()[0] = true; return this; }
/** Clears the value of the 'userExternalId' field */ public org.kaaproject.kaa.common.endpoint.gen.UserAttachNotification.Builder clearUserExternalId() { userExternalId = null; fieldSetFlags()[0] = false; return this; }
/** Sets the value of the 'endpointAccessToken' field */ public org.kaaproject.kaa.common.endpoint.gen.UserAttachNotification.Builder setEndpointAccessToken(java.lang.String value) { validate(fields()[1], value); this.endpointAccessToken = value; fieldSetFlags()[1] = true; return this; }