diff --git a/java-secretmanager/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClient.java b/java-secretmanager/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClient.java index 1b4554ad8835..3d5ee677188e 100644 --- a/java-secretmanager/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClient.java +++ b/java-secretmanager/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClient.java @@ -310,7 +310,7 @@ public final ListSecretsPagedResponse listSecrets(ListSecretsRequest request) { * while (true) { * ListSecretsResponse response = * secretManagerServiceClient.listSecretsCallable().call(request); - * for (Secret element : response.getResponsesList()) { + * for (Secret element : response.getSecretsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1026,7 +1026,7 @@ public final ListSecretVersionsPagedResponse listSecretVersions( * while (true) { * ListSecretVersionsResponse response = * secretManagerServiceClient.listSecretVersionsCallable().call(request); - * for (SecretVersion element : response.getResponsesList()) { + * for (SecretVersion element : response.getVersionsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1696,7 +1696,7 @@ public final SecretVersion destroySecretVersion(DestroySecretVersionRequest requ * SecretManagerServiceClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(ProjectName.of("[PROJECT]").toString()) + * .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -1727,7 +1727,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * SecretManagerServiceClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(ProjectName.of("[PROJECT]").toString()) + * .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -1756,7 +1756,7 @@ public final UnaryCallable setIamPolicyCallable() { * SecretManagerServiceClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(ProjectName.of("[PROJECT]").toString()) + * .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * Policy response = secretManagerServiceClient.getIamPolicy(request); @@ -1784,7 +1784,7 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * SecretManagerServiceClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(ProjectName.of("[PROJECT]").toString()) + * .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * ApiFuture future = @@ -1816,7 +1816,7 @@ public final UnaryCallable getIamPolicyCallable() { * SecretManagerServiceClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(ProjectName.of("[PROJECT]").toString()) + * .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * TestIamPermissionsResponse response = secretManagerServiceClient.testIamPermissions(request); @@ -1848,7 +1848,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * SecretManagerServiceClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(ProjectName.of("[PROJECT]").toString()) + * .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * ApiFuture future = diff --git a/java-secretmanager/google-cloud-secretmanager/src/test/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClientTest.java b/java-secretmanager/google-cloud-secretmanager/src/test/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClientTest.java index 60f8a41fa015..f9ece048c2b0 100644 --- a/java-secretmanager/google-cloud-secretmanager/src/test/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClientTest.java +++ b/java-secretmanager/google-cloud-secretmanager/src/test/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClientTest.java @@ -1108,7 +1108,7 @@ public void setIamPolicyTest() throws Exception { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() - .setResource(ProjectName.of("[PROJECT]").toString()) + .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); @@ -1137,7 +1137,7 @@ public void setIamPolicyExceptionTest() throws Exception { try { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() - .setResource(ProjectName.of("[PROJECT]").toString()) + .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); @@ -1161,7 +1161,7 @@ public void getIamPolicyTest() throws Exception { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() - .setResource(ProjectName.of("[PROJECT]").toString()) + .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); @@ -1188,7 +1188,7 @@ public void getIamPolicyExceptionTest() throws Exception { try { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() - .setResource(ProjectName.of("[PROJECT]").toString()) + .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); client.getIamPolicy(request); @@ -1206,7 +1206,7 @@ public void testIamPermissionsTest() throws Exception { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() - .setResource(ProjectName.of("[PROJECT]").toString()) + .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString()) .addAllPermissions(new ArrayList()) .build(); @@ -1233,7 +1233,7 @@ public void testIamPermissionsExceptionTest() throws Exception { try { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() - .setResource(ProjectName.of("[PROJECT]").toString()) + .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString()) .addAllPermissions(new ArrayList()) .build(); client.testIamPermissions(request);