Skip to content

Commit

Permalink
style: Format SetTopic/SubscriptionPolicyExample
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpri10 committed Mar 7, 2024
1 parent 363131e commit a57fb83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ public static void setSubscriptionPolicyExample(String projectId, String subscri

// Create new role -> members binding
Binding binding =
Binding.newBuilder().setRole("roles/pubsub.editor").addMembers("domain:google.com").build();
Binding.newBuilder()
.setRole("roles/pubsub.editor")
.addMembers("domain:google.com")
.build();

// Add new binding to updated policy
Policy updatedPolicy = Policy.newBuilder(oldPolicy).addBindings(binding).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ public static void setTopicPolicyExample(String projectId, String topicId) throw

// Create new role -> members binding
Binding binding =
Binding.newBuilder().setRole("roles/pubsub.editor").addMembers("domain:google.com").build();
Binding.newBuilder()
.setRole("roles/pubsub.editor")
.addMembers("domain:google.com")
.build();

// Add new binding to updated policy
Policy updatedPolicy = Policy.newBuilder(oldPolicy).addBindings(binding).build();
Expand Down

0 comments on commit a57fb83

Please sign in to comment.