@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; hash = (53 * hash) + getProjectId().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); 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 com.google.container.v1.ListOperationsRequest)) { return super.equals(obj); } com.google.container.v1.ListOperationsRequest other = (com.google.container.v1.ListOperationsRequest) obj; boolean result = true; result = result && getProjectId().equals(other.getProjectId()); result = result && getZone().equals(other.getZone()); result = result && getParent().equals(other.getParent()); result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * Deprecated. The name of the Google Compute Engine * [zone](/compute/docs/zones#available) to return operations for, or `-` for * all zones. This field has been deprecated and replaced by the parent field. * </pre> * * <code>string zone = 2 [deprecated = true];</code> */ @java.lang.Deprecated public Builder clearZone() { zone_ = getDefaultInstance().getZone(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.container.v1.ListOperationsRequest other) { if (other == com.google.container.v1.ListOperationsRequest.getDefaultInstance()) return this; if (!other.getProjectId().isEmpty()) { projectId_ = other.projectId_; onChanged(); } if (!other.getZone().isEmpty()) { zone_ = other.zone_; onChanged(); } if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Test @SuppressWarnings("all") public void listOperationsTest() { ListOperationsResponse expectedResponse = ListOperationsResponse.newBuilder().build(); mockClusterManager.addResponse(expectedResponse); String projectId = "projectId-1969970175"; String zone = "zone3744684"; ListOperationsResponse actualResponse = client.listOperations(projectId, zone); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockClusterManager.getRequests(); Assert.assertEquals(1, actualRequests.size()); ListOperationsRequest actualRequest = (ListOperationsRequest) actualRequests.get(0); Assert.assertEquals(projectId, actualRequest.getProjectId()); Assert.assertEquals(zone, actualRequest.getZone()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }