Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package me.tfeng.play.security.oauth2;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class ClientAuthentication extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ClientAuthentication\",\"namespace\":\"me.tfeng.play.security.oauth2\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"authorities\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}},{\"name\":\"scopes\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
@Deprecated public java.lang.String id;
@Deprecated public java.util.List authorities;
@Deprecated public java.util.List scopes;
/**
* Default constructor. Note that this does not initialize fields
* to their default values from the schema. If that is desired then
* one should use newBuilder().
*/
public ClientAuthentication() {}
/**
* All-args constructor.
*/
public ClientAuthentication(java.lang.String id, java.util.List authorities, java.util.List scopes) {
this.id = id;
this.authorities = authorities;
this.scopes = scopes;
}
public org.apache.avro.Schema getSchema() { return SCHEMA$; }
// Used by DatumWriter. Applications should not call.
public java.lang.Object get(int field$) {
switch (field$) {
case 0: return id;
case 1: return authorities;
case 2: return scopes;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
// Used by DatumReader. Applications should not call.
@SuppressWarnings(value="unchecked")
public void put(int field$, java.lang.Object value$) {
switch (field$) {
case 0: id = (java.lang.String)value$; break;
case 1: authorities = (java.util.List)value$; break;
case 2: scopes = (java.util.List)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'id' field.
*/
public java.lang.String getId() {
return id;
}
/**
* Sets the value of the 'id' field.
* @param value the value to set.
*/
public void setId(java.lang.String value) {
this.id = value;
}
/**
* Gets the value of the 'authorities' field.
*/
public java.util.List getAuthorities() {
return authorities;
}
/**
* Sets the value of the 'authorities' field.
* @param value the value to set.
*/
public void setAuthorities(java.util.List value) {
this.authorities = value;
}
/**
* Gets the value of the 'scopes' field.
*/
public java.util.List getScopes() {
return scopes;
}
/**
* Sets the value of the 'scopes' field.
* @param value the value to set.
*/
public void setScopes(java.util.List value) {
this.scopes = value;
}
/** Creates a new ClientAuthentication RecordBuilder */
public static me.tfeng.play.security.oauth2.ClientAuthentication.Builder newBuilder() {
return new me.tfeng.play.security.oauth2.ClientAuthentication.Builder();
}
/** Creates a new ClientAuthentication RecordBuilder by copying an existing Builder */
public static me.tfeng.play.security.oauth2.ClientAuthentication.Builder newBuilder(me.tfeng.play.security.oauth2.ClientAuthentication.Builder other) {
return new me.tfeng.play.security.oauth2.ClientAuthentication.Builder(other);
}
/** Creates a new ClientAuthentication RecordBuilder by copying an existing ClientAuthentication instance */
public static me.tfeng.play.security.oauth2.ClientAuthentication.Builder newBuilder(me.tfeng.play.security.oauth2.ClientAuthentication other) {
return new me.tfeng.play.security.oauth2.ClientAuthentication.Builder(other);
}
/**
* RecordBuilder for ClientAuthentication instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String id;
private java.util.List authorities;
private java.util.List scopes;
/** Creates a new Builder */
private Builder() {
super(me.tfeng.play.security.oauth2.ClientAuthentication.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(me.tfeng.play.security.oauth2.ClientAuthentication.Builder other) {
super(other);
if (isValidValue(fields()[0], other.id)) {
this.id = data().deepCopy(fields()[0].schema(), other.id);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.authorities)) {
this.authorities = data().deepCopy(fields()[1].schema(), other.authorities);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.scopes)) {
this.scopes = data().deepCopy(fields()[2].schema(), other.scopes);
fieldSetFlags()[2] = true;
}
}
/** Creates a Builder by copying an existing ClientAuthentication instance */
private Builder(me.tfeng.play.security.oauth2.ClientAuthentication other) {
super(me.tfeng.play.security.oauth2.ClientAuthentication.SCHEMA$);
if (isValidValue(fields()[0], other.id)) {
this.id = data().deepCopy(fields()[0].schema(), other.id);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.authorities)) {
this.authorities = data().deepCopy(fields()[1].schema(), other.authorities);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.scopes)) {
this.scopes = data().deepCopy(fields()[2].schema(), other.scopes);
fieldSetFlags()[2] = true;
}
}
/** Gets the value of the 'id' field */
public java.lang.String getId() {
return id;
}
/** Sets the value of the 'id' field */
public me.tfeng.play.security.oauth2.ClientAuthentication.Builder setId(java.lang.String value) {
validate(fields()[0], value);
this.id = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'id' field has been set */
public boolean hasId() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'id' field */
public me.tfeng.play.security.oauth2.ClientAuthentication.Builder clearId() {
id = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'authorities' field */
public java.util.List getAuthorities() {
return authorities;
}
/** Sets the value of the 'authorities' field */
public me.tfeng.play.security.oauth2.ClientAuthentication.Builder setAuthorities(java.util.List value) {
validate(fields()[1], value);
this.authorities = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'authorities' field has been set */
public boolean hasAuthorities() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'authorities' field */
public me.tfeng.play.security.oauth2.ClientAuthentication.Builder clearAuthorities() {
authorities = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'scopes' field */
public java.util.List getScopes() {
return scopes;
}
/** Sets the value of the 'scopes' field */
public me.tfeng.play.security.oauth2.ClientAuthentication.Builder setScopes(java.util.List value) {
validate(fields()[2], value);
this.scopes = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'scopes' field has been set */
public boolean hasScopes() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'scopes' field */
public me.tfeng.play.security.oauth2.ClientAuthentication.Builder clearScopes() {
scopes = null;
fieldSetFlags()[2] = false;
return this;
}
@Override
public ClientAuthentication build() {
try {
ClientAuthentication record = new ClientAuthentication();
record.id = fieldSetFlags()[0] ? this.id : (java.lang.String) defaultValue(fields()[0]);
record.authorities = fieldSetFlags()[1] ? this.authorities : (java.util.List) defaultValue(fields()[1]);
record.scopes = fieldSetFlags()[2] ? this.scopes : (java.util.List) defaultValue(fields()[2]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}