@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest)) { return super.equals(obj); } io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest other = (io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && getFilter().equals(other.getFilter()); 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) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The name of the project to get a vulnerability summary for in the form of * `projects/[PROJECT_ID]`. * </pre> * * <code>string parent = 1;</code> */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /**
public Builder mergeFrom(io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest other) { if (other == io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } if (!other.getFilter().isEmpty()) { filter_ = other.filter_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Test @SuppressWarnings("all") public void getVulnerabilityOccurrencesSummaryTest() { VulnerabilityOccurrencesSummary expectedResponse = VulnerabilityOccurrencesSummary.newBuilder().build(); mockGrafeasV1Beta1.addResponse(expectedResponse); ProjectName parent = ProjectName.of("[PROJECT]"); String filter = "filter-1274492040"; VulnerabilityOccurrencesSummary actualResponse = client.getVulnerabilityOccurrencesSummary(parent, filter); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockGrafeasV1Beta1.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetVulnerabilityOccurrencesSummaryRequest actualRequest = (GetVulnerabilityOccurrencesSummaryRequest) actualRequests.get(0); Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); Assert.assertEquals(filter, actualRequest.getFilter()); 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.GetVulnerabilityOccurrencesSummaryRequest)) { return super.equals(obj); } io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest other = (io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && getFilter().equals(other.getFilter()); 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) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The name of the project to get a vulnerability summary for in the form of * `projects/[PROJECT_ID]`. * </pre> * * <code>string parent = 1;</code> */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /**
public Builder mergeFrom(io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest other) { if (other == io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } if (!other.getFilter().isEmpty()) { filter_ = other.filter_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }