All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.quicksight.model.RegisterUserRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for QuickSight module holds the client classes that are used for communicating with QuickSight.

There is a newer version: 2.28.3
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.quicksight.model;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class RegisterUserRequest extends QuickSightRequest implements
        ToCopyableBuilder {
    private static final SdkField IDENTITY_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("IdentityType").getter(getter(RegisterUserRequest::identityTypeAsString))
            .setter(setter(Builder::identityType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdentityType").build()).build();

    private static final SdkField EMAIL_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Email")
            .getter(getter(RegisterUserRequest::email)).setter(setter(Builder::email))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Email").build()).build();

    private static final SdkField USER_ROLE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("UserRole").getter(getter(RegisterUserRequest::userRoleAsString)).setter(setter(Builder::userRole))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UserRole").build()).build();

    private static final SdkField IAM_ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("IamArn")
            .getter(getter(RegisterUserRequest::iamArn)).setter(setter(Builder::iamArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IamArn").build()).build();

    private static final SdkField SESSION_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("SessionName").getter(getter(RegisterUserRequest::sessionName)).setter(setter(Builder::sessionName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SessionName").build()).build();

    private static final SdkField AWS_ACCOUNT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("AwsAccountId").getter(getter(RegisterUserRequest::awsAccountId)).setter(setter(Builder::awsAccountId))
            .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("AwsAccountId").build()).build();

    private static final SdkField NAMESPACE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("Namespace").getter(getter(RegisterUserRequest::namespace)).setter(setter(Builder::namespace))
            .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("Namespace").build()).build();

    private static final SdkField USER_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("UserName").getter(getter(RegisterUserRequest::userName)).setter(setter(Builder::userName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UserName").build()).build();

    private static final SdkField CUSTOM_PERMISSIONS_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("CustomPermissionsName").getter(getter(RegisterUserRequest::customPermissionsName))
            .setter(setter(Builder::customPermissionsName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CustomPermissionsName").build())
            .build();

    private static final SdkField EXTERNAL_LOGIN_FEDERATION_PROVIDER_TYPE_FIELD = SdkField
            . builder(MarshallingType.STRING)
            .memberName("ExternalLoginFederationProviderType")
            .getter(getter(RegisterUserRequest::externalLoginFederationProviderType))
            .setter(setter(Builder::externalLoginFederationProviderType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                    .locationName("ExternalLoginFederationProviderType").build()).build();

    private static final SdkField CUSTOM_FEDERATION_PROVIDER_URL_FIELD = SdkField
            . builder(MarshallingType.STRING)
            .memberName("CustomFederationProviderUrl")
            .getter(getter(RegisterUserRequest::customFederationProviderUrl))
            .setter(setter(Builder::customFederationProviderUrl))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CustomFederationProviderUrl")
                    .build()).build();

    private static final SdkField EXTERNAL_LOGIN_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ExternalLoginId").getter(getter(RegisterUserRequest::externalLoginId))
            .setter(setter(Builder::externalLoginId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExternalLoginId").build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("Tags")
            .getter(getter(RegisterUserRequest::tags))
            .setter(setter(Builder::tags))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(Tag::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(IDENTITY_TYPE_FIELD,
            EMAIL_FIELD, USER_ROLE_FIELD, IAM_ARN_FIELD, SESSION_NAME_FIELD, AWS_ACCOUNT_ID_FIELD, NAMESPACE_FIELD,
            USER_NAME_FIELD, CUSTOM_PERMISSIONS_NAME_FIELD, EXTERNAL_LOGIN_FEDERATION_PROVIDER_TYPE_FIELD,
            CUSTOM_FEDERATION_PROVIDER_URL_FIELD, EXTERNAL_LOGIN_ID_FIELD, TAGS_FIELD));

    private final String identityType;

    private final String email;

    private final String userRole;

    private final String iamArn;

    private final String sessionName;

    private final String awsAccountId;

    private final String namespace;

    private final String userName;

    private final String customPermissionsName;

    private final String externalLoginFederationProviderType;

    private final String customFederationProviderUrl;

    private final String externalLoginId;

    private final List tags;

    private RegisterUserRequest(BuilderImpl builder) {
        super(builder);
        this.identityType = builder.identityType;
        this.email = builder.email;
        this.userRole = builder.userRole;
        this.iamArn = builder.iamArn;
        this.sessionName = builder.sessionName;
        this.awsAccountId = builder.awsAccountId;
        this.namespace = builder.namespace;
        this.userName = builder.userName;
        this.customPermissionsName = builder.customPermissionsName;
        this.externalLoginFederationProviderType = builder.externalLoginFederationProviderType;
        this.customFederationProviderUrl = builder.customFederationProviderUrl;
        this.externalLoginId = builder.externalLoginId;
        this.tags = builder.tags;
    }

    /**
     * 

* The identity type that your Amazon QuickSight account uses to manage the identity of users. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #identityType} will * return {@link IdentityType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #identityTypeAsString}. *

* * @return The identity type that your Amazon QuickSight account uses to manage the identity of users. * @see IdentityType */ public final IdentityType identityType() { return IdentityType.fromValue(identityType); } /** *

* The identity type that your Amazon QuickSight account uses to manage the identity of users. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #identityType} will * return {@link IdentityType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #identityTypeAsString}. *

* * @return The identity type that your Amazon QuickSight account uses to manage the identity of users. * @see IdentityType */ public final String identityTypeAsString() { return identityType; } /** *

* The email address of the user that you want to register. *

* * @return The email address of the user that you want to register. */ public final String email() { return email; } /** *

* The Amazon QuickSight role for the user. The user role can be one of the following: *

*
    *
  • *

    * READER: A user who has read-only access to dashboards. *

    *
  • *
  • *

    * AUTHOR: A user who can create data sources, datasets, analyses, and dashboards. *

    *
  • *
  • *

    * ADMIN: A user who is an author, who can also manage Amazon QuickSight settings. *

    *
  • *
  • *

    * RESTRICTED_READER: This role isn't currently available for use. *

    *
  • *
  • *

    * RESTRICTED_AUTHOR: This role isn't currently available for use. *

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, {@link #userRole} will * return {@link UserRole#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #userRoleAsString}. *

* * @return The Amazon QuickSight role for the user. The user role can be one of the following:

*
    *
  • *

    * READER: A user who has read-only access to dashboards. *

    *
  • *
  • *

    * AUTHOR: A user who can create data sources, datasets, analyses, and dashboards. *

    *
  • *
  • *

    * ADMIN: A user who is an author, who can also manage Amazon QuickSight settings. *

    *
  • *
  • *

    * RESTRICTED_READER: This role isn't currently available for use. *

    *
  • *
  • *

    * RESTRICTED_AUTHOR: This role isn't currently available for use. *

    *
  • * @see UserRole */ public final UserRole userRole() { return UserRole.fromValue(userRole); } /** *

    * The Amazon QuickSight role for the user. The user role can be one of the following: *

    *
      *
    • *

      * READER: A user who has read-only access to dashboards. *

      *
    • *
    • *

      * AUTHOR: A user who can create data sources, datasets, analyses, and dashboards. *

      *
    • *
    • *

      * ADMIN: A user who is an author, who can also manage Amazon QuickSight settings. *

      *
    • *
    • *

      * RESTRICTED_READER: This role isn't currently available for use. *

      *
    • *
    • *

      * RESTRICTED_AUTHOR: This role isn't currently available for use. *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #userRole} will * return {@link UserRole#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #userRoleAsString}. *

    * * @return The Amazon QuickSight role for the user. The user role can be one of the following:

    *
      *
    • *

      * READER: A user who has read-only access to dashboards. *

      *
    • *
    • *

      * AUTHOR: A user who can create data sources, datasets, analyses, and dashboards. *

      *
    • *
    • *

      * ADMIN: A user who is an author, who can also manage Amazon QuickSight settings. *

      *
    • *
    • *

      * RESTRICTED_READER: This role isn't currently available for use. *

      *
    • *
    • *

      * RESTRICTED_AUTHOR: This role isn't currently available for use. *

      *
    • * @see UserRole */ public final String userRoleAsString() { return userRole; } /** *

      * The ARN of the IAM user or role that you are registering with Amazon QuickSight. *

      * * @return The ARN of the IAM user or role that you are registering with Amazon QuickSight. */ public final String iamArn() { return iamArn; } /** *

      * You need to use this parameter only when you register one or more users using an assumed IAM role. You don't need * to provide the session name for other scenarios, for example when you are registering an IAM user or an Amazon * QuickSight user. You can register multiple users using the same IAM role if each user has a different session * name. For more information on assuming IAM roles, see assume-role in * the CLI Reference. *

      * * @return You need to use this parameter only when you register one or more users using an assumed IAM role. You * don't need to provide the session name for other scenarios, for example when you are registering an IAM * user or an Amazon QuickSight user. You can register multiple users using the same IAM role if each user * has a different session name. For more information on assuming IAM roles, see assume-role * in the CLI Reference. */ public final String sessionName() { return sessionName; } /** *

      * The ID for the Amazon Web Services account that the user is in. Currently, you use the ID for the Amazon Web * Services account that contains your Amazon QuickSight account. *

      * * @return The ID for the Amazon Web Services account that the user is in. Currently, you use the ID for the Amazon * Web Services account that contains your Amazon QuickSight account. */ public final String awsAccountId() { return awsAccountId; } /** *

      * The namespace. Currently, you should set this to default. *

      * * @return The namespace. Currently, you should set this to default. */ public final String namespace() { return namespace; } /** *

      * The Amazon QuickSight user name that you want to create for the user you are registering. *

      * * @return The Amazon QuickSight user name that you want to create for the user you are registering. */ public final String userName() { return userName; } /** *

      * (Enterprise edition only) The name of the custom permissions profile that you want to assign to this user. * Customized permissions allows you to control a user's access by restricting access the following operations: *

      *
        *
      • *

        * Create and update data sources *

        *
      • *
      • *

        * Create and update datasets *

        *
      • *
      • *

        * Create and update email reports *

        *
      • *
      • *

        * Subscribe to email reports *

        *
      • *
      *

      * To add custom permissions to an existing user, use * UpdateUser * instead. *

      *

      * A set of custom permissions includes any combination of these restrictions. Currently, you need to create the * profile names for custom permission sets by using the Amazon QuickSight console. Then, you use the * RegisterUser API operation to assign the named set of permissions to a Amazon QuickSight user. *

      *

      * Amazon QuickSight custom permissions are applied through IAM policies. Therefore, they override the permissions * typically granted by assigning Amazon QuickSight users to one of the default security cohorts in Amazon * QuickSight (admin, author, reader, admin pro, author pro, reader pro). *

      *

      * This feature is available only to Amazon QuickSight Enterprise edition subscriptions. *

      * * @return (Enterprise edition only) The name of the custom permissions profile that you want to assign to this * user. Customized permissions allows you to control a user's access by restricting access the following * operations:

      *
        *
      • *

        * Create and update data sources *

        *
      • *
      • *

        * Create and update datasets *

        *
      • *
      • *

        * Create and update email reports *

        *
      • *
      • *

        * Subscribe to email reports *

        *
      • *
      *

      * To add custom permissions to an existing user, use * UpdateUser * instead. *

      *

      * A set of custom permissions includes any combination of these restrictions. Currently, you need to create * the profile names for custom permission sets by using the Amazon QuickSight console. Then, you use the * RegisterUser API operation to assign the named set of permissions to a Amazon QuickSight * user. *

      *

      * Amazon QuickSight custom permissions are applied through IAM policies. Therefore, they override the * permissions typically granted by assigning Amazon QuickSight users to one of the default security cohorts * in Amazon QuickSight (admin, author, reader, admin pro, author pro, reader pro). *

      *

      * This feature is available only to Amazon QuickSight Enterprise edition subscriptions. */ public final String customPermissionsName() { return customPermissionsName; } /** *

      * The type of supported external login provider that provides identity to let a user federate into Amazon * QuickSight with an associated Identity and Access Management(IAM) role. The type of supported external login * provider can be one of the following. *

      *
        *
      • *

        * COGNITO: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com. When choosing the * COGNITO provider type, don’t use the "CustomFederationProviderUrl" parameter which is only needed * when the external provider is custom. *

        *
      • *
      • *

        * CUSTOM_OIDC: Custom OpenID Connect (OIDC) provider. When choosing CUSTOM_OIDC type, use * the CustomFederationProviderUrl parameter to provide the custom OIDC provider URL. *

        *
      • *
      * * @return The type of supported external login provider that provides identity to let a user federate into Amazon * QuickSight with an associated Identity and Access Management(IAM) role. The type of supported external * login provider can be one of the following.

      *
        *
      • *

        * COGNITO: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com. When choosing * the COGNITO provider type, don’t use the "CustomFederationProviderUrl" parameter which is * only needed when the external provider is custom. *

        *
      • *
      • *

        * CUSTOM_OIDC: Custom OpenID Connect (OIDC) provider. When choosing CUSTOM_OIDC * type, use the CustomFederationProviderUrl parameter to provide the custom OIDC provider URL. *

        *
      • */ public final String externalLoginFederationProviderType() { return externalLoginFederationProviderType; } /** *

        * The URL of the custom OpenID Connect (OIDC) provider that provides identity to let a user federate into Amazon * QuickSight with an associated Identity and Access Management(IAM) role. This parameter should only be used when * ExternalLoginFederationProviderType parameter is set to CUSTOM_OIDC. *

        * * @return The URL of the custom OpenID Connect (OIDC) provider that provides identity to let a user federate into * Amazon QuickSight with an associated Identity and Access Management(IAM) role. This parameter should only * be used when ExternalLoginFederationProviderType parameter is set to * CUSTOM_OIDC. */ public final String customFederationProviderUrl() { return customFederationProviderUrl; } /** *

        * The identity ID for a user in the external login provider. *

        * * @return The identity ID for a user in the external login provider. */ public final String externalLoginId() { return externalLoginId; } /** * For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

        * The tags to associate with the user. *

        *

        * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

        *

        * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasTags} method. *

        * * @return The tags to associate with the user. */ public final List tags() { return tags; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(identityTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(email()); hashCode = 31 * hashCode + Objects.hashCode(userRoleAsString()); hashCode = 31 * hashCode + Objects.hashCode(iamArn()); hashCode = 31 * hashCode + Objects.hashCode(sessionName()); hashCode = 31 * hashCode + Objects.hashCode(awsAccountId()); hashCode = 31 * hashCode + Objects.hashCode(namespace()); hashCode = 31 * hashCode + Objects.hashCode(userName()); hashCode = 31 * hashCode + Objects.hashCode(customPermissionsName()); hashCode = 31 * hashCode + Objects.hashCode(externalLoginFederationProviderType()); hashCode = 31 * hashCode + Objects.hashCode(customFederationProviderUrl()); hashCode = 31 * hashCode + Objects.hashCode(externalLoginId()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof RegisterUserRequest)) { return false; } RegisterUserRequest other = (RegisterUserRequest) obj; return Objects.equals(identityTypeAsString(), other.identityTypeAsString()) && Objects.equals(email(), other.email()) && Objects.equals(userRoleAsString(), other.userRoleAsString()) && Objects.equals(iamArn(), other.iamArn()) && Objects.equals(sessionName(), other.sessionName()) && Objects.equals(awsAccountId(), other.awsAccountId()) && Objects.equals(namespace(), other.namespace()) && Objects.equals(userName(), other.userName()) && Objects.equals(customPermissionsName(), other.customPermissionsName()) && Objects.equals(externalLoginFederationProviderType(), other.externalLoginFederationProviderType()) && Objects.equals(customFederationProviderUrl(), other.customFederationProviderUrl()) && Objects.equals(externalLoginId(), other.externalLoginId()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("RegisterUserRequest").add("IdentityType", identityTypeAsString()).add("Email", email()) .add("UserRole", userRoleAsString()).add("IamArn", iamArn()).add("SessionName", sessionName()) .add("AwsAccountId", awsAccountId()).add("Namespace", namespace()).add("UserName", userName()) .add("CustomPermissionsName", customPermissionsName()) .add("ExternalLoginFederationProviderType", externalLoginFederationProviderType()) .add("CustomFederationProviderUrl", customFederationProviderUrl()).add("ExternalLoginId", externalLoginId()) .add("Tags", hasTags() ? tags() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "IdentityType": return Optional.ofNullable(clazz.cast(identityTypeAsString())); case "Email": return Optional.ofNullable(clazz.cast(email())); case "UserRole": return Optional.ofNullable(clazz.cast(userRoleAsString())); case "IamArn": return Optional.ofNullable(clazz.cast(iamArn())); case "SessionName": return Optional.ofNullable(clazz.cast(sessionName())); case "AwsAccountId": return Optional.ofNullable(clazz.cast(awsAccountId())); case "Namespace": return Optional.ofNullable(clazz.cast(namespace())); case "UserName": return Optional.ofNullable(clazz.cast(userName())); case "CustomPermissionsName": return Optional.ofNullable(clazz.cast(customPermissionsName())); case "ExternalLoginFederationProviderType": return Optional.ofNullable(clazz.cast(externalLoginFederationProviderType())); case "CustomFederationProviderUrl": return Optional.ofNullable(clazz.cast(customFederationProviderUrl())); case "ExternalLoginId": return Optional.ofNullable(clazz.cast(externalLoginId())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((RegisterUserRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends QuickSightRequest.Builder, SdkPojo, CopyableBuilder { /** *

        * The identity type that your Amazon QuickSight account uses to manage the identity of users. *

        * * @param identityType * The identity type that your Amazon QuickSight account uses to manage the identity of users. * @see IdentityType * @return Returns a reference to this object so that method calls can be chained together. * @see IdentityType */ Builder identityType(String identityType); /** *

        * The identity type that your Amazon QuickSight account uses to manage the identity of users. *

        * * @param identityType * The identity type that your Amazon QuickSight account uses to manage the identity of users. * @see IdentityType * @return Returns a reference to this object so that method calls can be chained together. * @see IdentityType */ Builder identityType(IdentityType identityType); /** *

        * The email address of the user that you want to register. *

        * * @param email * The email address of the user that you want to register. * @return Returns a reference to this object so that method calls can be chained together. */ Builder email(String email); /** *

        * The Amazon QuickSight role for the user. The user role can be one of the following: *

        *
          *
        • *

          * READER: A user who has read-only access to dashboards. *

          *
        • *
        • *

          * AUTHOR: A user who can create data sources, datasets, analyses, and dashboards. *

          *
        • *
        • *

          * ADMIN: A user who is an author, who can also manage Amazon QuickSight settings. *

          *
        • *
        • *

          * RESTRICTED_READER: This role isn't currently available for use. *

          *
        • *
        • *

          * RESTRICTED_AUTHOR: This role isn't currently available for use. *

          *
        • *
        * * @param userRole * The Amazon QuickSight role for the user. The user role can be one of the following:

        *
          *
        • *

          * READER: A user who has read-only access to dashboards. *

          *
        • *
        • *

          * AUTHOR: A user who can create data sources, datasets, analyses, and dashboards. *

          *
        • *
        • *

          * ADMIN: A user who is an author, who can also manage Amazon QuickSight settings. *

          *
        • *
        • *

          * RESTRICTED_READER: This role isn't currently available for use. *

          *
        • *
        • *

          * RESTRICTED_AUTHOR: This role isn't currently available for use. *

          *
        • * @see UserRole * @return Returns a reference to this object so that method calls can be chained together. * @see UserRole */ Builder userRole(String userRole); /** *

          * The Amazon QuickSight role for the user. The user role can be one of the following: *

          *
            *
          • *

            * READER: A user who has read-only access to dashboards. *

            *
          • *
          • *

            * AUTHOR: A user who can create data sources, datasets, analyses, and dashboards. *

            *
          • *
          • *

            * ADMIN: A user who is an author, who can also manage Amazon QuickSight settings. *

            *
          • *
          • *

            * RESTRICTED_READER: This role isn't currently available for use. *

            *
          • *
          • *

            * RESTRICTED_AUTHOR: This role isn't currently available for use. *

            *
          • *
          * * @param userRole * The Amazon QuickSight role for the user. The user role can be one of the following:

          *
            *
          • *

            * READER: A user who has read-only access to dashboards. *

            *
          • *
          • *

            * AUTHOR: A user who can create data sources, datasets, analyses, and dashboards. *

            *
          • *
          • *

            * ADMIN: A user who is an author, who can also manage Amazon QuickSight settings. *

            *
          • *
          • *

            * RESTRICTED_READER: This role isn't currently available for use. *

            *
          • *
          • *

            * RESTRICTED_AUTHOR: This role isn't currently available for use. *

            *
          • * @see UserRole * @return Returns a reference to this object so that method calls can be chained together. * @see UserRole */ Builder userRole(UserRole userRole); /** *

            * The ARN of the IAM user or role that you are registering with Amazon QuickSight. *

            * * @param iamArn * The ARN of the IAM user or role that you are registering with Amazon QuickSight. * @return Returns a reference to this object so that method calls can be chained together. */ Builder iamArn(String iamArn); /** *

            * You need to use this parameter only when you register one or more users using an assumed IAM role. You don't * need to provide the session name for other scenarios, for example when you are registering an IAM user or an * Amazon QuickSight user. You can register multiple users using the same IAM role if each user has a different * session name. For more information on assuming IAM roles, see assume-role * in the CLI Reference. *

            * * @param sessionName * You need to use this parameter only when you register one or more users using an assumed IAM role. You * don't need to provide the session name for other scenarios, for example when you are registering an * IAM user or an Amazon QuickSight user. You can register multiple users using the same IAM role if each * user has a different session name. For more information on assuming IAM roles, see assume-role * in the CLI Reference. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sessionName(String sessionName); /** *

            * The ID for the Amazon Web Services account that the user is in. Currently, you use the ID for the Amazon Web * Services account that contains your Amazon QuickSight account. *

            * * @param awsAccountId * The ID for the Amazon Web Services account that the user is in. Currently, you use the ID for the * Amazon Web Services account that contains your Amazon QuickSight account. * @return Returns a reference to this object so that method calls can be chained together. */ Builder awsAccountId(String awsAccountId); /** *

            * The namespace. Currently, you should set this to default. *

            * * @param namespace * The namespace. Currently, you should set this to default. * @return Returns a reference to this object so that method calls can be chained together. */ Builder namespace(String namespace); /** *

            * The Amazon QuickSight user name that you want to create for the user you are registering. *

            * * @param userName * The Amazon QuickSight user name that you want to create for the user you are registering. * @return Returns a reference to this object so that method calls can be chained together. */ Builder userName(String userName); /** *

            * (Enterprise edition only) The name of the custom permissions profile that you want to assign to this user. * Customized permissions allows you to control a user's access by restricting access the following operations: *

            *
              *
            • *

              * Create and update data sources *

              *
            • *
            • *

              * Create and update datasets *

              *
            • *
            • *

              * Create and update email reports *

              *
            • *
            • *

              * Subscribe to email reports *

              *
            • *
            *

            * To add custom permissions to an existing user, use * UpdateUser * instead. *

            *

            * A set of custom permissions includes any combination of these restrictions. Currently, you need to create the * profile names for custom permission sets by using the Amazon QuickSight console. Then, you use the * RegisterUser API operation to assign the named set of permissions to a Amazon QuickSight user. *

            *

            * Amazon QuickSight custom permissions are applied through IAM policies. Therefore, they override the * permissions typically granted by assigning Amazon QuickSight users to one of the default security cohorts in * Amazon QuickSight (admin, author, reader, admin pro, author pro, reader pro). *

            *

            * This feature is available only to Amazon QuickSight Enterprise edition subscriptions. *

            * * @param customPermissionsName * (Enterprise edition only) The name of the custom permissions profile that you want to assign to this * user. Customized permissions allows you to control a user's access by restricting access the following * operations:

            *
              *
            • *

              * Create and update data sources *

              *
            • *
            • *

              * Create and update datasets *

              *
            • *
            • *

              * Create and update email reports *

              *
            • *
            • *

              * Subscribe to email reports *

              *
            • *
            *

            * To add custom permissions to an existing user, use * UpdateUser * instead. *

            *

            * A set of custom permissions includes any combination of these restrictions. Currently, you need to * create the profile names for custom permission sets by using the Amazon QuickSight console. Then, you * use the RegisterUser API operation to assign the named set of permissions to a Amazon * QuickSight user. *

            *

            * Amazon QuickSight custom permissions are applied through IAM policies. Therefore, they override the * permissions typically granted by assigning Amazon QuickSight users to one of the default security * cohorts in Amazon QuickSight (admin, author, reader, admin pro, author pro, reader pro). *

            *

            * This feature is available only to Amazon QuickSight Enterprise edition subscriptions. * @return Returns a reference to this object so that method calls can be chained together. */ Builder customPermissionsName(String customPermissionsName); /** *

            * The type of supported external login provider that provides identity to let a user federate into Amazon * QuickSight with an associated Identity and Access Management(IAM) role. The type of supported external login * provider can be one of the following. *

            *
              *
            • *

              * COGNITO: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com. When choosing the * COGNITO provider type, don’t use the "CustomFederationProviderUrl" parameter which is only * needed when the external provider is custom. *

              *
            • *
            • *

              * CUSTOM_OIDC: Custom OpenID Connect (OIDC) provider. When choosing CUSTOM_OIDC type, * use the CustomFederationProviderUrl parameter to provide the custom OIDC provider URL. *

              *
            • *
            * * @param externalLoginFederationProviderType * The type of supported external login provider that provides identity to let a user federate into * Amazon QuickSight with an associated Identity and Access Management(IAM) role. The type of supported * external login provider can be one of the following.

            *
              *
            • *

              * COGNITO: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com. When * choosing the COGNITO provider type, don’t use the "CustomFederationProviderUrl" parameter * which is only needed when the external provider is custom. *

              *
            • *
            • *

              * CUSTOM_OIDC: Custom OpenID Connect (OIDC) provider. When choosing * CUSTOM_OIDC type, use the CustomFederationProviderUrl parameter to provide * the custom OIDC provider URL. *

              *
            • * @return Returns a reference to this object so that method calls can be chained together. */ Builder externalLoginFederationProviderType(String externalLoginFederationProviderType); /** *

              * The URL of the custom OpenID Connect (OIDC) provider that provides identity to let a user federate into * Amazon QuickSight with an associated Identity and Access Management(IAM) role. This parameter should only be * used when ExternalLoginFederationProviderType parameter is set to CUSTOM_OIDC. *

              * * @param customFederationProviderUrl * The URL of the custom OpenID Connect (OIDC) provider that provides identity to let a user federate * into Amazon QuickSight with an associated Identity and Access Management(IAM) role. This parameter * should only be used when ExternalLoginFederationProviderType parameter is set to * CUSTOM_OIDC. * @return Returns a reference to this object so that method calls can be chained together. */ Builder customFederationProviderUrl(String customFederationProviderUrl); /** *

              * The identity ID for a user in the external login provider. *

              * * @param externalLoginId * The identity ID for a user in the external login provider. * @return Returns a reference to this object so that method calls can be chained together. */ Builder externalLoginId(String externalLoginId); /** *

              * The tags to associate with the user. *

              * * @param tags * The tags to associate with the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

              * The tags to associate with the user. *

              * * @param tags * The tags to associate with the user. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

              * The tags to associate with the user. *

              * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.quicksight.model.Tag.Builder} avoiding the need to create one manually * via {@link software.amazon.awssdk.services.quicksight.model.Tag#builder()}. * *

              * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.quicksight.model.Tag.Builder#build()} is called immediately and its * result is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on * {@link software.amazon.awssdk.services.quicksight.model.Tag.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(java.util.Collection) */ Builder tags(Consumer... tags); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends QuickSightRequest.BuilderImpl implements Builder { private String identityType; private String email; private String userRole; private String iamArn; private String sessionName; private String awsAccountId; private String namespace; private String userName; private String customPermissionsName; private String externalLoginFederationProviderType; private String customFederationProviderUrl; private String externalLoginId; private List tags = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(RegisterUserRequest model) { super(model); identityType(model.identityType); email(model.email); userRole(model.userRole); iamArn(model.iamArn); sessionName(model.sessionName); awsAccountId(model.awsAccountId); namespace(model.namespace); userName(model.userName); customPermissionsName(model.customPermissionsName); externalLoginFederationProviderType(model.externalLoginFederationProviderType); customFederationProviderUrl(model.customFederationProviderUrl); externalLoginId(model.externalLoginId); tags(model.tags); } public final String getIdentityType() { return identityType; } public final void setIdentityType(String identityType) { this.identityType = identityType; } @Override public final Builder identityType(String identityType) { this.identityType = identityType; return this; } @Override public final Builder identityType(IdentityType identityType) { this.identityType(identityType == null ? null : identityType.toString()); return this; } public final String getEmail() { return email; } public final void setEmail(String email) { this.email = email; } @Override public final Builder email(String email) { this.email = email; return this; } public final String getUserRole() { return userRole; } public final void setUserRole(String userRole) { this.userRole = userRole; } @Override public final Builder userRole(String userRole) { this.userRole = userRole; return this; } @Override public final Builder userRole(UserRole userRole) { this.userRole(userRole == null ? null : userRole.toString()); return this; } public final String getIamArn() { return iamArn; } public final void setIamArn(String iamArn) { this.iamArn = iamArn; } @Override public final Builder iamArn(String iamArn) { this.iamArn = iamArn; return this; } public final String getSessionName() { return sessionName; } public final void setSessionName(String sessionName) { this.sessionName = sessionName; } @Override public final Builder sessionName(String sessionName) { this.sessionName = sessionName; return this; } public final String getAwsAccountId() { return awsAccountId; } public final void setAwsAccountId(String awsAccountId) { this.awsAccountId = awsAccountId; } @Override public final Builder awsAccountId(String awsAccountId) { this.awsAccountId = awsAccountId; return this; } public final String getNamespace() { return namespace; } public final void setNamespace(String namespace) { this.namespace = namespace; } @Override public final Builder namespace(String namespace) { this.namespace = namespace; return this; } public final String getUserName() { return userName; } public final void setUserName(String userName) { this.userName = userName; } @Override public final Builder userName(String userName) { this.userName = userName; return this; } public final String getCustomPermissionsName() { return customPermissionsName; } public final void setCustomPermissionsName(String customPermissionsName) { this.customPermissionsName = customPermissionsName; } @Override public final Builder customPermissionsName(String customPermissionsName) { this.customPermissionsName = customPermissionsName; return this; } public final String getExternalLoginFederationProviderType() { return externalLoginFederationProviderType; } public final void setExternalLoginFederationProviderType(String externalLoginFederationProviderType) { this.externalLoginFederationProviderType = externalLoginFederationProviderType; } @Override public final Builder externalLoginFederationProviderType(String externalLoginFederationProviderType) { this.externalLoginFederationProviderType = externalLoginFederationProviderType; return this; } public final String getCustomFederationProviderUrl() { return customFederationProviderUrl; } public final void setCustomFederationProviderUrl(String customFederationProviderUrl) { this.customFederationProviderUrl = customFederationProviderUrl; } @Override public final Builder customFederationProviderUrl(String customFederationProviderUrl) { this.customFederationProviderUrl = customFederationProviderUrl; return this; } public final String getExternalLoginId() { return externalLoginId; } public final void setExternalLoginId(String externalLoginId) { this.externalLoginId = externalLoginId; } @Override public final Builder externalLoginId(String externalLoginId) { this.externalLoginId = externalLoginId; return this; } public final List getTags() { List result = TagListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public RegisterUserRequest build() { return new RegisterUserRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy