@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + RESPONSE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getResponse()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.pravega.controller.stream.api.grpc.v1.Controller.SegmentValidityResponse)) { return super.equals(obj); } io.pravega.controller.stream.api.grpc.v1.Controller.SegmentValidityResponse other = (io.pravega.controller.stream.api.grpc.v1.Controller.SegmentValidityResponse) obj; boolean result = true; result = result && (getResponse() == other.getResponse()); result = result && unknownFields.equals(other.unknownFields); return result; }
@Test public void isSegmentValidTest() { createScopeAndStream(SCOPE1, STREAM1, ScalingPolicy.fixed(2)); ResultObserver<SegmentValidityResponse> result1 = new ResultObserver<>(); this.controllerService.isSegmentValid(ModelHelper.createSegmentId(SCOPE1, STREAM1, 0), result1); final SegmentValidityResponse isValid = result1.get(); Assert.assertEquals(true, isValid.getResponse()); ResultObserver<SegmentValidityResponse> result2 = new ResultObserver<>(); this.controllerService.isSegmentValid(ModelHelper.createSegmentId(SCOPE1, STREAM1, 3), result2); final SegmentValidityResponse isValid2 = result2.get(); Assert.assertEquals(false, isValid2.getResponse()); }
public Builder mergeFrom(io.pravega.controller.stream.api.grpc.v1.Controller.SegmentValidityResponse other) { if (other == io.pravega.controller.stream.api.grpc.v1.Controller.SegmentValidityResponse.getDefaultInstance()) return this; if (other.getResponse() != false) { setResponse(other.getResponse()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }