Class CreatePolicyOptions.Builder
- java.lang.Object
-
- com.ibm.cloud.platform_services.iam_policy_management.v1.model.CreatePolicyOptions.Builder
-
- Enclosing class:
- CreatePolicyOptions
public static class CreatePolicyOptions.Builder extends java.lang.ObjectBuilder.
-
-
Constructor Summary
Constructors Constructor Description Builder()Instantiates a new builder.Builder(java.lang.String type, java.util.List<PolicySubject> subjects, java.util.List<PolicyRole> roles, java.util.List<PolicyResource> resources)Instantiates a new builder with required properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreatePolicyOptions.BuilderacceptLanguage(java.lang.String acceptLanguage)Set the acceptLanguage.CreatePolicyOptions.BuilderaddResources(PolicyResource resources)Adds a new element to resources.CreatePolicyOptions.BuilderaddRoles(PolicyRole roles)Adds a new element to roles.CreatePolicyOptions.BuilderaddSubjects(PolicySubject subjects)Adds a new element to subjects.CreatePolicyOptionsbuild()Builds a CreatePolicyOptions.CreatePolicyOptions.Builderdescription(java.lang.String description)Set the description.CreatePolicyOptions.Builderresources(java.util.List<PolicyResource> resources)Set the resources.CreatePolicyOptions.Builderroles(java.util.List<PolicyRole> roles)Set the roles.CreatePolicyOptions.Buildersubjects(java.util.List<PolicySubject> subjects)Set the subjects.CreatePolicyOptions.Buildertype(java.lang.String type)Set the type.
-
-
-
Constructor Detail
-
Builder
public Builder()
Instantiates a new builder.
-
Builder
public Builder(java.lang.String type, java.util.List<PolicySubject> subjects, java.util.List<PolicyRole> roles, java.util.List<PolicyResource> resources)Instantiates a new builder with required properties.- Parameters:
type- the typesubjects- the subjectsroles- the rolesresources- the resources
-
-
Method Detail
-
build
public CreatePolicyOptions build()
Builds a CreatePolicyOptions.- Returns:
- the new CreatePolicyOptions instance
-
addSubjects
public CreatePolicyOptions.Builder addSubjects(PolicySubject subjects)
Adds a new element to subjects.- Parameters:
subjects- the new element to be added- Returns:
- the CreatePolicyOptions builder
-
addRoles
public CreatePolicyOptions.Builder addRoles(PolicyRole roles)
Adds a new element to roles.- Parameters:
roles- the new element to be added- Returns:
- the CreatePolicyOptions builder
-
addResources
public CreatePolicyOptions.Builder addResources(PolicyResource resources)
Adds a new element to resources.- Parameters:
resources- the new element to be added- Returns:
- the CreatePolicyOptions builder
-
type
public CreatePolicyOptions.Builder type(java.lang.String type)
Set the type.- Parameters:
type- the type- Returns:
- the CreatePolicyOptions builder
-
subjects
public CreatePolicyOptions.Builder subjects(java.util.List<PolicySubject> subjects)
Set the subjects. Existing subjects will be replaced.- Parameters:
subjects- the subjects- Returns:
- the CreatePolicyOptions builder
-
roles
public CreatePolicyOptions.Builder roles(java.util.List<PolicyRole> roles)
Set the roles. Existing roles will be replaced.- Parameters:
roles- the roles- Returns:
- the CreatePolicyOptions builder
-
resources
public CreatePolicyOptions.Builder resources(java.util.List<PolicyResource> resources)
Set the resources. Existing resources will be replaced.- Parameters:
resources- the resources- Returns:
- the CreatePolicyOptions builder
-
description
public CreatePolicyOptions.Builder description(java.lang.String description)
Set the description.- Parameters:
description- the description- Returns:
- the CreatePolicyOptions builder
-
acceptLanguage
public CreatePolicyOptions.Builder acceptLanguage(java.lang.String acceptLanguage)
Set the acceptLanguage.- Parameters:
acceptLanguage- the acceptLanguage- Returns:
- the CreatePolicyOptions builder
-
-