static Project convert( String name, com.linecorp.centraldogma.server.internal.storage.project.Project project) { return new Project(name); }
public Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); case SCHEMA: return getSchema(); case PLUGINS: return getPlugins(); } throw new IllegalStateException(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Project) return this.equals((Project)that); return false; }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NAME: return isSetName(); case SCHEMA: return isSetSchema(); case PLUGINS: return isSetPlugins(); } throw new IllegalStateException(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, Project struct) throws org.apache.thrift.TException { struct.validate(); if (struct.isSetSchema()) { oprot.writeFieldBegin(SCHEMA_FIELD_DESC); struct.schema.write(oprot); if (struct.isSetPlugins()) { oprot.writeFieldBegin(PLUGINS_FIELD_DESC);
if (isSetSchema()) { if (!first) sb.append(", "); sb.append("schema:"); if (isSetPlugins()) { if (!first) sb.append(", "); sb.append("plugins:");
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NAME: return isSetName(); case SCHEMA: return isSetSchema(); case PLUGINS: return isSetPlugins(); } throw new IllegalStateException(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, Project struct) throws org.apache.thrift.TException { struct.validate(); if (struct.isSetSchema()) { oprot.writeFieldBegin(SCHEMA_FIELD_DESC); struct.schema.write(oprot); if (struct.isSetPlugins()) { oprot.writeFieldBegin(PLUGINS_FIELD_DESC);
if (isSetSchema()) { if (!first) sb.append(", "); sb.append("schema:"); if (isSetPlugins()) { if (!first) sb.append(", "); sb.append("plugins:");
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); case SCHEMA: return getSchema(); case PLUGINS: return getPlugins(); } throw new IllegalStateException(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); boolean present_schema = true && (isSetSchema()); list.add(present_schema); if (present_schema) list.add(schema); boolean present_plugins = true && (isSetPlugins()); list.add(present_plugins); if (present_plugins) list.add(plugins); return list.hashCode(); }
public Project deepCopy() { return new Project(this); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Project struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.name); BitSet optionals = new BitSet(); if (struct.isSetSchema()) { optionals.set(0); } if (struct.isSetPlugins()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSchema()) { struct.schema.write(oprot); } if (struct.isSetPlugins()) { { oprot.writeI32(struct.plugins.size()); for (Plugin _iter44 : struct.plugins) { _iter44.write(oprot); } } } }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Project) return this.equals((Project)that); return false; }
public ProjectDto(Project project) { name = project.getName(); if (project.getSchema() != null) { schema = new SchemaDto(project.getSchema()); } if (project.getPlugins() != null) { plugins = project.getPlugins().stream().map(PluginDto::new).collect(Collectors.toList()); } }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); boolean present_schema = true && (isSetSchema()); list.add(present_schema); if (present_schema) list.add(schema); boolean present_plugins = true && (isSetPlugins()); list.add(present_plugins); if (present_plugins) list.add(plugins); return list.hashCode(); }
static Project convert( String name, com.linecorp.centraldogma.server.internal.storage.project.Project project) { return new Project(name); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Project struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.name); BitSet optionals = new BitSet(); if (struct.isSetSchema()) { optionals.set(0); } if (struct.isSetPlugins()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSchema()) { struct.schema.write(oprot); } if (struct.isSetPlugins()) { { oprot.writeI32(struct.plugins.size()); for (Plugin _iter36 : struct.plugins) { _iter36.write(oprot); } } } }