@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.oslogin.v1.DeletePosixAccountRequest)) { return super.equals(obj); } com.google.cloud.oslogin.v1.DeletePosixAccountRequest other = (com.google.cloud.oslogin.v1.DeletePosixAccountRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * A reference to the POSIX account to update. POSIX accounts are identified * by the project ID they are associated with. A reference to the POSIX * account is in format `users/{user}/projects/{project}`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.cloud.oslogin.v1.DeletePosixAccountRequest other) { if (other == com.google.cloud.oslogin.v1.DeletePosixAccountRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Test @SuppressWarnings("all") public void deletePosixAccountTest() { Empty expectedResponse = Empty.newBuilder().build(); mockOsLoginService.addResponse(expectedResponse); ProjectName name = ProjectName.of("[USER]", "[PROJECT]"); client.deletePosixAccount(name); List<GeneratedMessageV3> actualRequests = mockOsLoginService.getRequests(); Assert.assertEquals(1, actualRequests.size()); DeletePosixAccountRequest actualRequest = (DeletePosixAccountRequest) actualRequests.get(0); Assert.assertEquals(name, ProjectName.parse(actualRequest.getName())); 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.cloud.oslogin.v1.DeletePosixAccountRequest)) { return super.equals(obj); } com.google.cloud.oslogin.v1.DeletePosixAccountRequest other = (com.google.cloud.oslogin.v1.DeletePosixAccountRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * A reference to the POSIX account to update. POSIX accounts are identified * by the project ID they are associated with. A reference to the POSIX * account is in format `users/{user}/projects/{project}`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.cloud.oslogin.v1.DeletePosixAccountRequest other) { if (other == com.google.cloud.oslogin.v1.DeletePosixAccountRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }