Codota Logo
Policy$Builder.addAllBindings
Code IndexAdd Codota to your IDE (free)

How to use
addAllBindings
method
in
com.google.iam.v1.Policy$Builder

Best Java code snippets using com.google.iam.v1.Policy$Builder.addAllBindings (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: googleapis/google-cloud-java

 @Override
 protected com.google.iam.v1.Policy toPb(Policy policy) {
  com.google.iam.v1.Policy.Builder policyBuilder = com.google.iam.v1.Policy.newBuilder();
  List<com.google.iam.v1.Binding> bindingPbList = new LinkedList<>();
  for (Map.Entry<Role, Set<Identity>> binding : policy.getBindings().entrySet()) {
   com.google.iam.v1.Binding.Builder bindingBuilder = com.google.iam.v1.Binding.newBuilder();
   bindingBuilder.setRole(binding.getKey().getValue());
   bindingBuilder.addAllMembers(
     Lists.transform(
       new ArrayList<>(binding.getValue()),
       new Function<Identity, String>() {
        @Override
        public String apply(Identity identity) {
         return IDENTITY_STR_VALUE_FUNCTION.apply(identity);
        }
       }));
   bindingPbList.add(bindingBuilder.build());
  }
  policyBuilder.addAllBindings(bindingPbList);
  if (policy.etag != null) {
   policyBuilder.setEtag(ByteString.copyFrom(BaseEncoding.base64().decode(policy.etag)));
  }
  policyBuilder.setVersion(policy.version);
  return policyBuilder.build();
 }
}
origin: GoogleCloudPlatform/java-docs-samples

.addAllBindings(newBindings)
.build();
origin: GoogleCloudPlatform/java-docs-samples

.addAllBindings(newBindings)
.build();
origin: com.google.cloud/google-cloud-core

 @Override
 protected com.google.iam.v1.Policy toPb(Policy policy) {
  com.google.iam.v1.Policy.Builder policyBuilder = com.google.iam.v1.Policy.newBuilder();
  List<com.google.iam.v1.Binding> bindingPbList = new LinkedList<>();
  for (Map.Entry<Role, Set<Identity>> binding : policy.getBindings().entrySet()) {
   com.google.iam.v1.Binding.Builder bindingBuilder = com.google.iam.v1.Binding.newBuilder();
   bindingBuilder.setRole(binding.getKey().getValue());
   bindingBuilder.addAllMembers(
     Lists.transform(
       new ArrayList<>(binding.getValue()),
       new Function<Identity, String>() {
        @Override
        public String apply(Identity identity) {
         return IDENTITY_STR_VALUE_FUNCTION.apply(identity);
        }
       }));
   bindingPbList.add(bindingBuilder.build());
  }
  policyBuilder.addAllBindings(bindingPbList);
  if (policy.etag != null) {
   policyBuilder.setEtag(ByteString.copyFrom(BaseEncoding.base64().decode(policy.etag)));
  }
  policyBuilder.setVersion(policy.version);
  return policyBuilder.build();
 }
}
com.google.iam.v1Policy$BuilderaddAllBindings

Popular methods of Policy$Builder

  • build
  • setEtag
  • setVersion
  • addBindings
  • mergeFrom
  • buildPartial

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now