@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest)) { return super.equals(obj); } com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest other = (com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest) obj; boolean result = true; result = result && getGroupName().equals(other.getGroupName()); 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) + GROUP_NAME_FIELD_NUMBER; hash = (53 * hash) + getGroupName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * [Required] The group resource name. Written as * <code>projects/<var>projectID</var>/groups/<var>group_name</var></code>. * Call * <a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list"> * <code>groupStats.list</code></a> to return a list of groups belonging to * this project. * Example: <code>projects/my-project-123/groups/my-group</code> * </pre> * * <code>string group_name = 1;</code> */ public Builder clearGroupName() { groupName_ = getDefaultInstance().getGroupName(); onChanged(); return this; } /**
public Builder mergeFrom( com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest other) { if (other == com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest.getDefaultInstance()) return this; if (!other.getGroupName().isEmpty()) { groupName_ = other.groupName_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Test @SuppressWarnings("all") public void getGroupTest() { GroupName name = GroupName.of("[PROJECT]", "[GROUP]"); String groupId = "groupId506361563"; ErrorGroup expectedResponse = ErrorGroup.newBuilder().setName(name.toString()).setGroupId(groupId).build(); mockErrorGroupService.addResponse(expectedResponse); GroupName groupName = GroupName.of("[PROJECT]", "[GROUP]"); ErrorGroup actualResponse = client.getGroup(groupName); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockErrorGroupService.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetGroupRequest actualRequest = (GetGroupRequest) actualRequests.get(0); Assert.assertEquals(groupName, GroupName.parse(actualRequest.getGroupName())); 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 com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest)) { return super.equals(obj); } com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest other = (com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest) obj; boolean result = true; result = result && getGroupName().equals(other.getGroupName()); 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) + GROUP_NAME_FIELD_NUMBER; hash = (53 * hash) + getGroupName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * [Required] The group resource name. Written as * <code>projects/<var>projectID</var>/groups/<var>group_name</var></code>. * Call * <a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list"> * <code>groupStats.list</code></a> to return a list of groups belonging to * this project. * Example: <code>projects/my-project-123/groups/my-group</code> * </pre> * * <code>string group_name = 1;</code> */ public Builder clearGroupName() { groupName_ = getDefaultInstance().getGroupName(); onChanged(); return this; } /**
public Builder mergeFrom( com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest other) { if (other == com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest.getDefaultInstance()) return this; if (!other.getGroupName().isEmpty()) { groupName_ = other.groupName_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }