public WatchRepositoryResult deepCopy() { return new WatchRepositoryResult(this); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case REVISION: if (value == null) { unsetRevision(); } else { setRevision((Revision)value); } break; } }
public Object getFieldValue(_Fields field) { switch (field) { case REVISION: return getRevision(); } throw new IllegalStateException(); }
private static void handleWatchRepositoryResult( CompletableFuture<com.linecorp.centraldogma.common.Revision> future, AsyncMethodCallback resultHandler) { future.handle((res, cause) -> { if (cause == null) { final WatchRepositoryResult wrr = new WatchRepositoryResult(); wrr.setRevision(convert(res)); resultHandler.onComplete(wrr); } else if (cause instanceof CancellationException) { resultHandler.onComplete(CentralDogmaConstants.EMPTY_WATCH_REPOSITORY_RESULT); } else { logAndInvokeOnError("watchRepository", resultHandler, cause); } return null; }); }
public boolean equals(WatchRepositoryResult that) { if (that == null) return false; boolean this_present_revision = true && this.isSetRevision(); boolean that_present_revision = true && that.isSetRevision(); if (this_present_revision || that_present_revision) { if (!(this_present_revision && that_present_revision)) return false; if (!this.revision.equals(that.revision)) return false; } return true; }
public void write(org.apache.thrift.protocol.TProtocol oprot, WatchRepositoryResult struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.revision != null) { if (struct.isSetRevision()) { oprot.writeFieldBegin(REVISION_FIELD_DESC); struct.revision.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void read(org.apache.thrift.protocol.TProtocol iprot, WatchRepositoryResult struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REVISION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.revision = new Revision(); struct.revision.read(iprot); struct.setRevisionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); }
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); } }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof WatchRepositoryResult) return this.equals((WatchRepositoryResult)that); return false; }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, WatchRepositoryResult struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.revision = new Revision(); struct.revision.read(iprot); struct.setRevisionIsSet(true); } } }
private static void handleWatchRepositoryResult( CompletableFuture<com.linecorp.centraldogma.common.Revision> future, AsyncMethodCallback resultHandler) { future.handle((res, cause) -> { if (cause == null) { final WatchRepositoryResult wrr = new WatchRepositoryResult(); wrr.setRevision(convert(res)); resultHandler.onComplete(wrr); } else if (cause instanceof CancellationException) { resultHandler.onComplete(CentralDogmaConstants.EMPTY_WATCH_REPOSITORY_RESULT); } else { logAndInvokeOnError("watchRepository", resultHandler, cause); } return null; }); }
/** 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 REVISION: return isSetRevision(); } throw new IllegalStateException(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, WatchRepositoryResult struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.revision != null) { if (struct.isSetRevision()) { oprot.writeFieldBegin(REVISION_FIELD_DESC); struct.revision.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void read(org.apache.thrift.protocol.TProtocol iprot, WatchRepositoryResult struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REVISION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.revision = new Revision(); struct.revision.read(iprot); struct.setRevisionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); }
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); } }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof WatchRepositoryResult) return this.equals((WatchRepositoryResult)that); return false; }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, WatchRepositoryResult struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.revision = new Revision(); struct.revision.read(iprot); struct.setRevisionIsSet(true); } } }
private static void handleWatchRepositoryResult( CompletableFuture<com.linecorp.centraldogma.common.Revision> future, AsyncMethodCallback resultHandler) { future.handle(voidFunction((res, cause) -> { if (cause == null) { final WatchRepositoryResult wrr = new WatchRepositoryResult(); wrr.setRevision(convert(res)); resultHandler.onComplete(wrr); } else if (cause instanceof CancellationException) { resultHandler.onComplete(CentralDogmaConstants.EMPTY_WATCH_REPOSITORY_RESULT); } else { logAndInvokeOnError("watchRepository", resultHandler, cause); } })); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case REVISION: if (value == null) { unsetRevision(); } else { setRevision((Revision)value); } break; } }
public Object getFieldValue(_Fields field) { switch (field) { case REVISION: return getRevision(); } throw new IllegalStateException(); }