@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.grafeas.v1beta1.DeleteNoteRequest)) { return super.equals(obj); } io.grafeas.v1beta1.DeleteNoteRequest other = (io.grafeas.v1beta1.DeleteNoteRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The name of the note in the form of * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
public Builder mergeFrom(io.grafeas.v1beta1.DeleteNoteRequest other) { if (other == io.grafeas.v1beta1.DeleteNoteRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Test @SuppressWarnings("all") public void deleteNoteTest() { Empty expectedResponse = Empty.newBuilder().build(); mockGrafeasV1Beta1.addResponse(expectedResponse); NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); client.deleteNote(name); List<GeneratedMessageV3> actualRequests = mockGrafeasV1Beta1.getRequests(); Assert.assertEquals(1, actualRequests.size()); DeleteNoteRequest actualRequest = (DeleteNoteRequest) actualRequests.get(0); Assert.assertEquals(name, NoteName.parse(actualRequest.getName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.grafeas.v1beta1.DeleteNoteRequest)) { return super.equals(obj); } io.grafeas.v1beta1.DeleteNoteRequest other = (io.grafeas.v1beta1.DeleteNoteRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The name of the note in the form of * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
public Builder mergeFrom(io.grafeas.v1beta1.DeleteNoteRequest other) { if (other == io.grafeas.v1beta1.DeleteNoteRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }