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; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest buildPartial() { io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest result = new io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest(this); result.parent_ = parent_; result.filter_ = filter_; onBuilt(); return result; }
@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; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (!getFilterBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); } unknownFields.writeTo(output); }
/** * * * <pre> * The filter expression. * </pre> * * <code>string filter = 2;</code> */ public Builder clearFilter() { filter_ = getDefaultInstance().getFilter(); onChanged(); return this; } /**
/** * * * <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; } /**
@java.lang.Override public io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest getDefaultInstanceForType() { return io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest.getDefaultInstance(); }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
@java.lang.Override public io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest build() { io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } 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; }
@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())); }
/** * * * <pre> * The filter expression. * </pre> * * <code>string filter = 2;</code> */ public Builder clearFilter() { filter_ = getDefaultInstance().getFilter(); onChanged(); return this; } /**
/** * * * <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; } /**
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getParentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (!getFilterBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
io.grpc.protobuf.ProtoUtils.marshaller( io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
@java.lang.Override public io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest build() { io.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
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; }