public Repository deepCopy() { return new Repository(this); }
/** 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 HEAD: return isSetHead(); } throw new IllegalStateException(); }
static CompletableFuture<Repository> convert( String name, com.linecorp.centraldogma.server.internal.storage.repository.Repository repo) { return repo.history( com.linecorp.centraldogma.common.Revision.HEAD, com.linecorp.centraldogma.common.Revision.HEAD, com.linecorp.centraldogma.server.internal.storage.repository.Repository.ALL_PATH, 1).thenApply( history -> new Repository(name).setHead(convert(history.get(0)))); }
public void write(org.apache.thrift.protocol.TProtocol oprot, Repository struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } if (struct.head != null) { if (struct.isSetHead()) { oprot.writeFieldBegin(HEAD_FIELD_DESC); struct.head.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Repository struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.name); BitSet optionals = new BitSet(); if (struct.isSetHead()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetHead()) { struct.head.write(oprot); } }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Repository) return this.equals((Repository)that); return false; }
static CompletableFuture<Repository> convert( String name, com.linecorp.centraldogma.server.internal.storage.repository.Repository repo) { return repo.history( com.linecorp.centraldogma.common.Revision.HEAD, com.linecorp.centraldogma.common.Revision.HEAD, com.linecorp.centraldogma.server.internal.storage.repository.Repository.ALL_PATH, 1).thenApply( history -> new Repository(name).setHead(convert(history.get(0)))); }
/** 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 HEAD: return isSetHead(); } throw new IllegalStateException(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, Repository struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } if (struct.head != null) { if (struct.isSetHead()) { oprot.writeFieldBegin(HEAD_FIELD_DESC); struct.head.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Repository struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.name); BitSet optionals = new BitSet(); if (struct.isSetHead()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetHead()) { struct.head.write(oprot); } }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Repository) return this.equals((Repository)that); return false; }
static CompletableFuture<Repository> convert( String name, com.linecorp.centraldogma.server.internal.storage.repository.Repository repo) { return repo.history( com.linecorp.centraldogma.common.Revision.HEAD, com.linecorp.centraldogma.common.Revision.HEAD, com.linecorp.centraldogma.server.internal.storage.repository.Repository.ALL_PATH, 1).thenApply( history -> new Repository(name).setHead(convert(history.get(0)))); }
public Repository deepCopy() { return new Repository(this); }
@Override public String toString() { StringBuilder sb = new StringBuilder("Repository("); boolean first = true; sb.append("name:"); if (this.name == null) { sb.append("null"); } else { sb.append(this.name); } first = false; if (isSetHead()) { if (!first) sb.append(", "); sb.append("head:"); if (this.head == null) { sb.append("null"); } else { sb.append(this.head); } first = false; } sb.append(")"); return sb.toString(); }