Class UserContext.Builder

java.lang.Object
com.ibm.cloud.cloudant.v1.model.UserContext.Builder
Enclosing class:
UserContext

public static class UserContext.Builder extends Object
Builder.
  • Constructor Details

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

      public Builder(String name, List<String> roles)
      Instantiates a new builder with required properties.
      Parameters:
      name - the name
      roles - the roles
  • Method Details

    • build

      public UserContext build()
      Builds a UserContext.
      Returns:
      the new UserContext instance
    • addRoles

      public UserContext.Builder addRoles(String roles)
      Adds a new element to roles.
      Parameters:
      roles - the new element to be added
      Returns:
      the UserContext builder
    • db

      public UserContext.Builder db(String db)
      Set the db.
      Parameters:
      db - the db
      Returns:
      the UserContext builder
    • name

      public UserContext.Builder name(String name)
      Set the name.
      Parameters:
      name - the name
      Returns:
      the UserContext builder
    • roles

      public UserContext.Builder roles(List<String> roles)
      Set the roles. Existing roles will be replaced.
      Parameters:
      roles - the roles
      Returns:
      the UserContext builder