/** * * * <pre> * [Required] The resource name of the Google Cloud Platform project. Written * as <code>projects/</code> plus the * <a href="https://support.google.com/cloud/answer/6158840">Google Cloud * Platform project ID</a>. * Example: <code>projects/my-project-123</code>. * </pre> * * <code>string project_name = 1;</code> */ public Builder clearProjectName() { projectName_ = getDefaultInstance().getProjectName(); onChanged(); return this; } /**
hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROJECT_NAME_FIELD_NUMBER; hash = (53 * hash) + getProjectName().hashCode(); if (getGroupIdCount() > 0) { hash = (37 * hash) + GROUP_ID_FIELD_NUMBER;
result = result && getProjectName().equals(other.getProjectName()); result = result && getGroupIdList().equals(other.getGroupIdList()); result = result && (hasServiceFilter() == other.hasServiceFilter());
== com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest .getDefaultInstance()) return this; if (!other.getProjectName().isEmpty()) { projectName_ = other.projectName_; onChanged();
@Test @SuppressWarnings("all") public void listGroupStatsTest() { String nextPageToken = ""; ErrorGroupStats errorGroupStatsElement = ErrorGroupStats.newBuilder().build(); List<ErrorGroupStats> errorGroupStats = Arrays.asList(errorGroupStatsElement); ListGroupStatsResponse expectedResponse = ListGroupStatsResponse.newBuilder() .setNextPageToken(nextPageToken) .addAllErrorGroupStats(errorGroupStats) .build(); mockErrorStatsService.addResponse(expectedResponse); ProjectName projectName = ProjectName.of("[PROJECT]"); QueryTimeRange timeRange = QueryTimeRange.newBuilder().build(); ListGroupStatsPagedResponse pagedListResponse = client.listGroupStats(projectName, timeRange); List<ErrorGroupStats> resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getErrorGroupStatsList().get(0), resources.get(0)); List<GeneratedMessageV3> actualRequests = mockErrorStatsService.getRequests(); Assert.assertEquals(1, actualRequests.size()); ListGroupStatsRequest actualRequest = (ListGroupStatsRequest) actualRequests.get(0); Assert.assertEquals(projectName, ProjectName.parse(actualRequest.getProjectName())); Assert.assertEquals(timeRange, actualRequest.getTimeRange()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
/** * * * <pre> * [Required] The resource name of the Google Cloud Platform project. Written * as <code>projects/</code> plus the * <a href="https://support.google.com/cloud/answer/6158840">Google Cloud * Platform project ID</a>. * Example: <code>projects/my-project-123</code>. * </pre> * * <code>string project_name = 1;</code> */ public Builder clearProjectName() { projectName_ = getDefaultInstance().getProjectName(); onChanged(); return this; } /**
hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROJECT_NAME_FIELD_NUMBER; hash = (53 * hash) + getProjectName().hashCode(); if (getGroupIdCount() > 0) { hash = (37 * hash) + GROUP_ID_FIELD_NUMBER;
result = result && getProjectName().equals(other.getProjectName()); result = result && getGroupIdList().equals(other.getGroupIdList()); result = result && (hasServiceFilter() == other.hasServiceFilter());
== com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest .getDefaultInstance()) return this; if (!other.getProjectName().isEmpty()) { projectName_ = other.projectName_; onChanged();