Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

docs: fix docstring formatting #551

Merged
merged 2 commits into from Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -1236,7 +1236,8 @@ public void getIamPolicyTest() throws Exception {

GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(NamespaceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]").toString())
.setResource(
ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();

Expand All @@ -1263,7 +1264,8 @@ public void getIamPolicyExceptionTest() throws Exception {
try {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(NamespaceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]").toString())
.setResource(
ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
client.getIamPolicy(request);
Expand All @@ -1285,7 +1287,8 @@ public void setIamPolicyTest() throws Exception {

SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(NamespaceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]").toString())
.setResource(
ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
.setPolicy(Policy.newBuilder().build())
.build();

Expand All @@ -1312,7 +1315,8 @@ public void setIamPolicyExceptionTest() throws Exception {
try {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(NamespaceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]").toString())
.setResource(
ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
.setPolicy(Policy.newBuilder().build())
.build();
client.setIamPolicy(request);
Expand All @@ -1330,7 +1334,8 @@ public void testIamPermissionsTest() throws Exception {

TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(NamespaceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]").toString())
.setResource(
ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
.addAllPermissions(new ArrayList<String>())
.build();

Expand All @@ -1357,7 +1362,8 @@ public void testIamPermissionsExceptionTest() throws Exception {
try {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(NamespaceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]").toString())
.setResource(
ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
client.testIamPermissions(request);
Expand Down
Expand Up @@ -1272,8 +1272,7 @@ public void getIamPolicyTest() throws Exception {

GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
.setResource(NamespaceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();

Expand All @@ -1300,8 +1299,7 @@ public void getIamPolicyExceptionTest() throws Exception {
try {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
.setResource(NamespaceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
client.getIamPolicy(request);
Expand All @@ -1323,8 +1321,7 @@ public void setIamPolicyTest() throws Exception {

SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
.setResource(NamespaceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]").toString())
.setPolicy(Policy.newBuilder().build())
.build();

Expand All @@ -1351,8 +1348,7 @@ public void setIamPolicyExceptionTest() throws Exception {
try {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
.setResource(NamespaceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]").toString())
.setPolicy(Policy.newBuilder().build())
.build();
client.setIamPolicy(request);
Expand All @@ -1370,8 +1366,7 @@ public void testIamPermissionsTest() throws Exception {

TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
.setResource(NamespaceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]").toString())
.addAllPermissions(new ArrayList<String>())
.build();

Expand All @@ -1398,8 +1393,7 @@ public void testIamPermissionsExceptionTest() throws Exception {
try {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
.setResource(NamespaceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
client.testIamPermissions(request);
Expand Down
Expand Up @@ -318,10 +318,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
}
if (!getEndpointIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, endpointId_);
}
if (endpoint_ != null) {
Expand All @@ -336,10 +336,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
}
if (!getEndpointIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, endpointId_);
}
if (endpoint_ != null) {
Expand Down
Expand Up @@ -320,10 +320,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
}
if (!getNamespaceIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespaceId_);
}
if (namespace_ != null) {
Expand All @@ -338,10 +338,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
}
if (!getNamespaceIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespaceId_);
}
if (namespace_ != null) {
Expand Down
Expand Up @@ -318,10 +318,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
}
if (!getServiceIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceId_);
}
if (service_ != null) {
Expand All @@ -336,10 +336,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
}
if (!getServiceIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceId_);
}
if (service_ != null) {
Expand Down
Expand Up @@ -179,7 +179,7 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
unknownFields.writeTo(output);
Expand All @@ -191,7 +191,7 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -179,7 +179,7 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
unknownFields.writeTo(output);
Expand All @@ -191,7 +191,7 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -179,7 +179,7 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
unknownFields.writeTo(output);
Expand All @@ -191,7 +191,7 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -479,10 +479,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getAddressBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, address_);
}
if (port_ != 0) {
Expand All @@ -499,10 +499,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!getAddressBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, address_);
}
if (port_ != 0) {
Expand Down
Expand Up @@ -181,7 +181,7 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
unknownFields.writeTo(output);
Expand All @@ -193,7 +193,7 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -179,7 +179,7 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
unknownFields.writeTo(output);
Expand All @@ -191,7 +191,7 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -181,7 +181,7 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
unknownFields.writeTo(output);
Expand All @@ -193,7 +193,7 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -421,19 +421,19 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
}
if (pageSize_ != 0) {
output.writeInt32(2, pageSize_);
}
if (!getPageTokenBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
}
if (!getFilterBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_);
}
if (!getOrderByBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_);
}
unknownFields.writeTo(output);
Expand All @@ -445,19 +445,19 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
}
if (pageSize_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_);
}
if (!getPageTokenBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
}
if (!getFilterBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_);
}
if (!getOrderByBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -266,7 +266,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
for (int i = 0; i < endpoints_.size(); i++) {
output.writeMessage(1, endpoints_.get(i));
}
if (!getNextPageTokenBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
}
unknownFields.writeTo(output);
Expand All @@ -281,7 +281,7 @@ public int getSerializedSize() {
for (int i = 0; i < endpoints_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpoints_.get(i));
}
if (!getNextPageTokenBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
}
size += unknownFields.getSerializedSize();
Expand Down