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

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

/*
 * Copyright 2014-2019 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.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 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.LocationTrait;
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 GetDashboardEmbedUrlRequest extends QuickSightRequest implements
        ToCopyableBuilder {
    private static final SdkField AWS_ACCOUNT_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(GetDashboardEmbedUrlRequest::awsAccountId)).setter(setter(Builder::awsAccountId))
            .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("AwsAccountId").build()).build();

    private static final SdkField DASHBOARD_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(GetDashboardEmbedUrlRequest::dashboardId)).setter(setter(Builder::dashboardId))
            .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("DashboardId").build()).build();

    private static final SdkField IDENTITY_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(GetDashboardEmbedUrlRequest::identityTypeAsString)).setter(setter(Builder::identityType))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("creds-type").build()).build();

    private static final SdkField SESSION_LIFETIME_IN_MINUTES_FIELD = SdkField. builder(MarshallingType.LONG)
            .getter(getter(GetDashboardEmbedUrlRequest::sessionLifetimeInMinutes))
            .setter(setter(Builder::sessionLifetimeInMinutes))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("session-lifetime").build())
            .build();

    private static final SdkField UNDO_REDO_DISABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .getter(getter(GetDashboardEmbedUrlRequest::undoRedoDisabled)).setter(setter(Builder::undoRedoDisabled))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("undo-redo-disabled").build())
            .build();

    private static final SdkField RESET_DISABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .getter(getter(GetDashboardEmbedUrlRequest::resetDisabled)).setter(setter(Builder::resetDisabled))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("reset-disabled").build())
            .build();

    private static final SdkField USER_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(GetDashboardEmbedUrlRequest::userArn)).setter(setter(Builder::userArn))
            .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("user-arn").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(AWS_ACCOUNT_ID_FIELD,
            DASHBOARD_ID_FIELD, IDENTITY_TYPE_FIELD, SESSION_LIFETIME_IN_MINUTES_FIELD, UNDO_REDO_DISABLED_FIELD,
            RESET_DISABLED_FIELD, USER_ARN_FIELD));

    private final String awsAccountId;

    private final String dashboardId;

    private final String identityType;

    private final Long sessionLifetimeInMinutes;

    private final Boolean undoRedoDisabled;

    private final Boolean resetDisabled;

    private final String userArn;

    private GetDashboardEmbedUrlRequest(BuilderImpl builder) {
        super(builder);
        this.awsAccountId = builder.awsAccountId;
        this.dashboardId = builder.dashboardId;
        this.identityType = builder.identityType;
        this.sessionLifetimeInMinutes = builder.sessionLifetimeInMinutes;
        this.undoRedoDisabled = builder.undoRedoDisabled;
        this.resetDisabled = builder.resetDisabled;
        this.userArn = builder.userArn;
    }

    /**
     * 

* AWS account ID that contains the dashboard you are embedding. *

* * @return AWS account ID that contains the dashboard you are embedding. */ public String awsAccountId() { return awsAccountId; } /** *

* The ID for the dashboard, also added to IAM policy *

* * @return The ID for the dashboard, also added to IAM policy */ public String dashboardId() { return dashboardId; } /** *

* The authentication method the user uses to sign in (IAM only). *

*

* 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 authentication method the user uses to sign in (IAM only). * @see IdentityType */ public IdentityType identityType() { return IdentityType.fromValue(identityType); } /** *

* The authentication method the user uses to sign in (IAM only). *

*

* 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 authentication method the user uses to sign in (IAM only). * @see IdentityType */ public String identityTypeAsString() { return identityType; } /** *

* How many minutes the session is valid. The session lifetime must be between 15 and 600 minutes. *

* * @return How many minutes the session is valid. The session lifetime must be between 15 and 600 minutes. */ public Long sessionLifetimeInMinutes() { return sessionLifetimeInMinutes; } /** *

* Remove the undo/redo button on embedded dashboard. The default is FALSE, which enables the undo/redo button. *

* * @return Remove the undo/redo button on embedded dashboard. The default is FALSE, which enables the undo/redo * button. */ public Boolean undoRedoDisabled() { return undoRedoDisabled; } /** *

* Remove the reset button on embedded dashboard. The default is FALSE, which allows the reset button. *

* * @return Remove the reset button on embedded dashboard. The default is FALSE, which allows the reset button. */ public Boolean resetDisabled() { return resetDisabled; } /** *

* The Amazon QuickSight user's ARN, for use with QUICKSIGHT identity type. You can use this for any of * the following: *

*
    *
  • *

    * Amazon QuickSight users in your account (readers, authors, or admins) *

    *
  • *
  • *

    * AD users *

    *
  • *
  • *

    * Invited non-federated users *

    *
  • *
  • *

    * Federated IAM users *

    *
  • *
  • *

    * Federated IAM role-based sessions *

    *
  • *
* * @return The Amazon QuickSight user's ARN, for use with QUICKSIGHT identity type. You can use this * for any of the following:

*
    *
  • *

    * Amazon QuickSight users in your account (readers, authors, or admins) *

    *
  • *
  • *

    * AD users *

    *
  • *
  • *

    * Invited non-federated users *

    *
  • *
  • *

    * Federated IAM users *

    *
  • *
  • *

    * Federated IAM role-based sessions *

    *
  • */ public String userArn() { return userArn; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(awsAccountId()); hashCode = 31 * hashCode + Objects.hashCode(dashboardId()); hashCode = 31 * hashCode + Objects.hashCode(identityTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(sessionLifetimeInMinutes()); hashCode = 31 * hashCode + Objects.hashCode(undoRedoDisabled()); hashCode = 31 * hashCode + Objects.hashCode(resetDisabled()); hashCode = 31 * hashCode + Objects.hashCode(userArn()); return hashCode; } @Override public boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetDashboardEmbedUrlRequest)) { return false; } GetDashboardEmbedUrlRequest other = (GetDashboardEmbedUrlRequest) obj; return Objects.equals(awsAccountId(), other.awsAccountId()) && Objects.equals(dashboardId(), other.dashboardId()) && Objects.equals(identityTypeAsString(), other.identityTypeAsString()) && Objects.equals(sessionLifetimeInMinutes(), other.sessionLifetimeInMinutes()) && Objects.equals(undoRedoDisabled(), other.undoRedoDisabled()) && Objects.equals(resetDisabled(), other.resetDisabled()) && Objects.equals(userArn(), other.userArn()); } /** * 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 String toString() { return ToString.builder("GetDashboardEmbedUrlRequest").add("AwsAccountId", awsAccountId()) .add("DashboardId", dashboardId()).add("IdentityType", identityTypeAsString()) .add("SessionLifetimeInMinutes", sessionLifetimeInMinutes()).add("UndoRedoDisabled", undoRedoDisabled()) .add("ResetDisabled", resetDisabled()).add("UserArn", userArn()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "AwsAccountId": return Optional.ofNullable(clazz.cast(awsAccountId())); case "DashboardId": return Optional.ofNullable(clazz.cast(dashboardId())); case "IdentityType": return Optional.ofNullable(clazz.cast(identityTypeAsString())); case "SessionLifetimeInMinutes": return Optional.ofNullable(clazz.cast(sessionLifetimeInMinutes())); case "UndoRedoDisabled": return Optional.ofNullable(clazz.cast(undoRedoDisabled())); case "ResetDisabled": return Optional.ofNullable(clazz.cast(resetDisabled())); case "UserArn": return Optional.ofNullable(clazz.cast(userArn())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((GetDashboardEmbedUrlRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends QuickSightRequest.Builder, SdkPojo, CopyableBuilder { /** *

    * AWS account ID that contains the dashboard you are embedding. *

    * * @param awsAccountId * AWS account ID that contains the dashboard you are embedding. * @return Returns a reference to this object so that method calls can be chained together. */ Builder awsAccountId(String awsAccountId); /** *

    * The ID for the dashboard, also added to IAM policy *

    * * @param dashboardId * The ID for the dashboard, also added to IAM policy * @return Returns a reference to this object so that method calls can be chained together. */ Builder dashboardId(String dashboardId); /** *

    * The authentication method the user uses to sign in (IAM only). *

    * * @param identityType * The authentication method the user uses to sign in (IAM only). * @see IdentityType * @return Returns a reference to this object so that method calls can be chained together. * @see IdentityType */ Builder identityType(String identityType); /** *

    * The authentication method the user uses to sign in (IAM only). *

    * * @param identityType * The authentication method the user uses to sign in (IAM only). * @see IdentityType * @return Returns a reference to this object so that method calls can be chained together. * @see IdentityType */ Builder identityType(IdentityType identityType); /** *

    * How many minutes the session is valid. The session lifetime must be between 15 and 600 minutes. *

    * * @param sessionLifetimeInMinutes * How many minutes the session is valid. The session lifetime must be between 15 and 600 minutes. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sessionLifetimeInMinutes(Long sessionLifetimeInMinutes); /** *

    * Remove the undo/redo button on embedded dashboard. The default is FALSE, which enables the undo/redo button. *

    * * @param undoRedoDisabled * Remove the undo/redo button on embedded dashboard. The default is FALSE, which enables the undo/redo * button. * @return Returns a reference to this object so that method calls can be chained together. */ Builder undoRedoDisabled(Boolean undoRedoDisabled); /** *

    * Remove the reset button on embedded dashboard. The default is FALSE, which allows the reset button. *

    * * @param resetDisabled * Remove the reset button on embedded dashboard. The default is FALSE, which allows the reset button. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resetDisabled(Boolean resetDisabled); /** *

    * The Amazon QuickSight user's ARN, for use with QUICKSIGHT identity type. You can use this for * any of the following: *

    *
      *
    • *

      * Amazon QuickSight users in your account (readers, authors, or admins) *

      *
    • *
    • *

      * AD users *

      *
    • *
    • *

      * Invited non-federated users *

      *
    • *
    • *

      * Federated IAM users *

      *
    • *
    • *

      * Federated IAM role-based sessions *

      *
    • *
    * * @param userArn * The Amazon QuickSight user's ARN, for use with QUICKSIGHT identity type. You can use this * for any of the following:

    *
      *
    • *

      * Amazon QuickSight users in your account (readers, authors, or admins) *

      *
    • *
    • *

      * AD users *

      *
    • *
    • *

      * Invited non-federated users *

      *
    • *
    • *

      * Federated IAM users *

      *
    • *
    • *

      * Federated IAM role-based sessions *

      *
    • * @return Returns a reference to this object so that method calls can be chained together. */ Builder userArn(String userArn); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends QuickSightRequest.BuilderImpl implements Builder { private String awsAccountId; private String dashboardId; private String identityType; private Long sessionLifetimeInMinutes; private Boolean undoRedoDisabled; private Boolean resetDisabled; private String userArn; private BuilderImpl() { } private BuilderImpl(GetDashboardEmbedUrlRequest model) { super(model); awsAccountId(model.awsAccountId); dashboardId(model.dashboardId); identityType(model.identityType); sessionLifetimeInMinutes(model.sessionLifetimeInMinutes); undoRedoDisabled(model.undoRedoDisabled); resetDisabled(model.resetDisabled); userArn(model.userArn); } public final String getAwsAccountId() { return awsAccountId; } @Override public final Builder awsAccountId(String awsAccountId) { this.awsAccountId = awsAccountId; return this; } public final void setAwsAccountId(String awsAccountId) { this.awsAccountId = awsAccountId; } public final String getDashboardId() { return dashboardId; } @Override public final Builder dashboardId(String dashboardId) { this.dashboardId = dashboardId; return this; } public final void setDashboardId(String dashboardId) { this.dashboardId = dashboardId; } public final String getIdentityTypeAsString() { return 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 void setIdentityType(String identityType) { this.identityType = identityType; } public final Long getSessionLifetimeInMinutes() { return sessionLifetimeInMinutes; } @Override public final Builder sessionLifetimeInMinutes(Long sessionLifetimeInMinutes) { this.sessionLifetimeInMinutes = sessionLifetimeInMinutes; return this; } public final void setSessionLifetimeInMinutes(Long sessionLifetimeInMinutes) { this.sessionLifetimeInMinutes = sessionLifetimeInMinutes; } public final Boolean getUndoRedoDisabled() { return undoRedoDisabled; } @Override public final Builder undoRedoDisabled(Boolean undoRedoDisabled) { this.undoRedoDisabled = undoRedoDisabled; return this; } public final void setUndoRedoDisabled(Boolean undoRedoDisabled) { this.undoRedoDisabled = undoRedoDisabled; } public final Boolean getResetDisabled() { return resetDisabled; } @Override public final Builder resetDisabled(Boolean resetDisabled) { this.resetDisabled = resetDisabled; return this; } public final void setResetDisabled(Boolean resetDisabled) { this.resetDisabled = resetDisabled; } public final String getUserArn() { return userArn; } @Override public final Builder userArn(String userArn) { this.userArn = userArn; return this; } public final void setUserArn(String userArn) { this.userArn = userArn; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public GetDashboardEmbedUrlRequest build() { return new GetDashboardEmbedUrlRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy