/* * Copyright 2018-2023 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 com.amazonaws.services.iotsitewise.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreatePortalRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* A friendly name for the portal. *

*/ private String portalName; /** *

* A description for the portal. *

*/ private String portalDescription; /** *

* The Amazon Web Services administrator's contact email address. *

*/ private String portalContactEmail; /** *

* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse * this client token if a new idempotent request is required. *

*/ private String clientToken; /** *

* A logo image to display in the portal. Upload a square, high-resolution image. The image is displayed on a dark * background. *

*/ private ImageFile portalLogoImageFile; /** *

* The ARN of a service * role that allows the portal's users to access your IoT SiteWise resources on your behalf. For more information, * see Using service * roles for IoT SiteWise Monitor in the IoT SiteWise User Guide. *

*/ private String roleArn; /** *

* A list of key-value pairs that contain metadata for the portal. For more information, see Tagging your IoT SiteWise * resources in the IoT SiteWise User Guide. *

*/ private java.util.Map tags; /** *

* The service to use to authenticate users to the portal. Choose from the following options: *

* *

* You can't change this value after you create a portal. *

*

* Default: SSO *

*/ private String portalAuthMode; /** *

* The email address that sends alarm notifications. *

* *

* If you use the IoT * Events managed Lambda function to manage your emails, you must verify the sender email * address in Amazon SES. *

*
*/ private String notificationSenderEmail; /** *

* Contains the configuration information of an alarm created in an IoT SiteWise Monitor portal. You can use the * alarm to monitor an asset property and get notified when the asset property value is outside a specified range. * For more information, see Monitoring with alarms in * the IoT SiteWise Application Guide. *

*/ private Alarms alarms; /** *

* A friendly name for the portal. *

* * @param portalName * A friendly name for the portal. */ public void setPortalName(String portalName) { this.portalName = portalName; } /** *

* A friendly name for the portal. *

* * @return A friendly name for the portal. */ public String getPortalName() { return this.portalName; } /** *

* A friendly name for the portal. *

* * @param portalName * A friendly name for the portal. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePortalRequest withPortalName(String portalName) { setPortalName(portalName); return this; } /** *

* A description for the portal. *

* * @param portalDescription * A description for the portal. */ public void setPortalDescription(String portalDescription) { this.portalDescription = portalDescription; } /** *

* A description for the portal. *

* * @return A description for the portal. */ public String getPortalDescription() { return this.portalDescription; } /** *

* A description for the portal. *

* * @param portalDescription * A description for the portal. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePortalRequest withPortalDescription(String portalDescription) { setPortalDescription(portalDescription); return this; } /** *

* The Amazon Web Services administrator's contact email address. *

* * @param portalContactEmail * The Amazon Web Services administrator's contact email address. */ public void setPortalContactEmail(String portalContactEmail) { this.portalContactEmail = portalContactEmail; } /** *

* The Amazon Web Services administrator's contact email address. *

* * @return The Amazon Web Services administrator's contact email address. */ public String getPortalContactEmail() { return this.portalContactEmail; } /** *

* The Amazon Web Services administrator's contact email address. *

* * @param portalContactEmail * The Amazon Web Services administrator's contact email address. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePortalRequest withPortalContactEmail(String portalContactEmail) { setPortalContactEmail(portalContactEmail); return this; } /** *

* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse * this client token if a new idempotent request is required. *

* * @param clientToken * A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't * reuse this client token if a new idempotent request is required. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse * this client token if a new idempotent request is required. *

* * @return A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't * reuse this client token if a new idempotent request is required. */ public String getClientToken() { return this.clientToken; } /** *

* A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse * this client token if a new idempotent request is required. *

* * @param clientToken * A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't * reuse this client token if a new idempotent request is required. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePortalRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* A logo image to display in the portal. Upload a square, high-resolution image. The image is displayed on a dark * background. *

* * @param portalLogoImageFile * A logo image to display in the portal. Upload a square, high-resolution image. The image is displayed on a * dark background. */ public void setPortalLogoImageFile(ImageFile portalLogoImageFile) { this.portalLogoImageFile = portalLogoImageFile; } /** *

* A logo image to display in the portal. Upload a square, high-resolution image. The image is displayed on a dark * background. *

* * @return A logo image to display in the portal. Upload a square, high-resolution image. The image is displayed on * a dark background. */ public ImageFile getPortalLogoImageFile() { return this.portalLogoImageFile; } /** *

* A logo image to display in the portal. Upload a square, high-resolution image. The image is displayed on a dark * background. *

* * @param portalLogoImageFile * A logo image to display in the portal. Upload a square, high-resolution image. The image is displayed on a * dark background. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePortalRequest withPortalLogoImageFile(ImageFile portalLogoImageFile) { setPortalLogoImageFile(portalLogoImageFile); return this; } /** *

* The ARN of a service * role that allows the portal's users to access your IoT SiteWise resources on your behalf. For more information, * see Using service * roles for IoT SiteWise Monitor in the IoT SiteWise User Guide. *

* * @param roleArn * The ARN of a * service role that allows the portal's users to access your IoT SiteWise resources on your behalf. For more * information, see Using service * roles for IoT SiteWise Monitor in the IoT SiteWise User Guide. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The ARN of a service * role that allows the portal's users to access your IoT SiteWise resources on your behalf. For more information, * see Using service * roles for IoT SiteWise Monitor in the IoT SiteWise User Guide. *

* * @return The ARN of a * service role that allows the portal's users to access your IoT SiteWise resources on your behalf. For * more information, see Using service * roles for IoT SiteWise Monitor in the IoT SiteWise User Guide. */ public String getRoleArn() { return this.roleArn; } /** *

* The ARN of a service * role that allows the portal's users to access your IoT SiteWise resources on your behalf. For more information, * see Using service * roles for IoT SiteWise Monitor in the IoT SiteWise User Guide. *

* * @param roleArn * The ARN of a * service role that allows the portal's users to access your IoT SiteWise resources on your behalf. For more * information, see Using service * roles for IoT SiteWise Monitor in the IoT SiteWise User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePortalRequest withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** *

* A list of key-value pairs that contain metadata for the portal. For more information, see Tagging your IoT SiteWise * resources in the IoT SiteWise User Guide. *

* * @return A list of key-value pairs that contain metadata for the portal. For more information, see Tagging your IoT * SiteWise resources in the IoT SiteWise User Guide. */ public java.util.Map getTags() { return tags; } /** *

* A list of key-value pairs that contain metadata for the portal. For more information, see Tagging your IoT SiteWise * resources in the IoT SiteWise User Guide. *

* * @param tags * A list of key-value pairs that contain metadata for the portal. For more information, see Tagging your IoT * SiteWise resources in the IoT SiteWise User Guide. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* A list of key-value pairs that contain metadata for the portal. For more information, see Tagging your IoT SiteWise * resources in the IoT SiteWise User Guide. *

* * @param tags * A list of key-value pairs that contain metadata for the portal. For more information, see Tagging your IoT * SiteWise resources in the IoT SiteWise User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePortalRequest withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see CreatePortalRequest#withTags * @returns a reference to this object so that method calls can be chained together. */ public CreatePortalRequest addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePortalRequest clearTagsEntries() { this.tags = null; return this; } /** *

* The service to use to authenticate users to the portal. Choose from the following options: *

*
    *
  • *

    * SSO – The portal uses IAM Identity Center (successor to Single Sign-On) to authenticate users and * manage user permissions. Before you can create a portal that uses IAM Identity Center, you must enable IAM * Identity Center. For more information, see Enabling IAM * Identity Center in the IoT SiteWise User Guide. This option is only available in Amazon Web Services * Regions other than the China Regions. *

    *
  • *
  • *

    * IAM – The portal uses Identity and Access Management to authenticate users and manage user * permissions. *

    *
  • *
*

* You can't change this value after you create a portal. *

*

* Default: SSO *

* * @param portalAuthMode * The service to use to authenticate users to the portal. Choose from the following options:

*
    *
  • *

    * SSO – The portal uses IAM Identity Center (successor to Single Sign-On) to authenticate users * and manage user permissions. Before you can create a portal that uses IAM Identity Center, you must enable * IAM Identity Center. For more information, see Enabling IAM Identity Center in the IoT SiteWise User Guide. This option is only available in * Amazon Web Services Regions other than the China Regions. *

    *
  • *
  • *

    * IAM – The portal uses Identity and Access Management to authenticate users and manage user * permissions. *

    *
  • *
*

* You can't change this value after you create a portal. *

*

* Default: SSO * @see AuthMode */ public void setPortalAuthMode(String portalAuthMode) { this.portalAuthMode = portalAuthMode; } /** *

* The service to use to authenticate users to the portal. Choose from the following options: *

*
    *
  • *

    * SSO – The portal uses IAM Identity Center (successor to Single Sign-On) to authenticate users and * manage user permissions. Before you can create a portal that uses IAM Identity Center, you must enable IAM * Identity Center. For more information, see Enabling IAM * Identity Center in the IoT SiteWise User Guide. This option is only available in Amazon Web Services * Regions other than the China Regions. *

    *
  • *
  • *

    * IAM – The portal uses Identity and Access Management to authenticate users and manage user * permissions. *

    *
  • *
*

* You can't change this value after you create a portal. *

*

* Default: SSO *

* * @return The service to use to authenticate users to the portal. Choose from the following options:

*
    *
  • *

    * SSO – The portal uses IAM Identity Center (successor to Single Sign-On) to authenticate * users and manage user permissions. Before you can create a portal that uses IAM Identity Center, you must * enable IAM Identity Center. For more information, see Enabling IAM Identity Center in the IoT SiteWise User Guide. This option is only available in * Amazon Web Services Regions other than the China Regions. *

    *
  • *
  • *

    * IAM – The portal uses Identity and Access Management to authenticate users and manage user * permissions. *

    *
  • *
*

* You can't change this value after you create a portal. *

*

* Default: SSO * @see AuthMode */ public String getPortalAuthMode() { return this.portalAuthMode; } /** *

* The service to use to authenticate users to the portal. Choose from the following options: *

*
    *
  • *

    * SSO – The portal uses IAM Identity Center (successor to Single Sign-On) to authenticate users and * manage user permissions. Before you can create a portal that uses IAM Identity Center, you must enable IAM * Identity Center. For more information, see Enabling IAM * Identity Center in the IoT SiteWise User Guide. This option is only available in Amazon Web Services * Regions other than the China Regions. *

    *
  • *
  • *

    * IAM – The portal uses Identity and Access Management to authenticate users and manage user * permissions. *

    *
  • *
*

* You can't change this value after you create a portal. *

*

* Default: SSO *

* * @param portalAuthMode * The service to use to authenticate users to the portal. Choose from the following options:

*
    *
  • *

    * SSO – The portal uses IAM Identity Center (successor to Single Sign-On) to authenticate users * and manage user permissions. Before you can create a portal that uses IAM Identity Center, you must enable * IAM Identity Center. For more information, see Enabling IAM Identity Center in the IoT SiteWise User Guide. This option is only available in * Amazon Web Services Regions other than the China Regions. *

    *
  • *
  • *

    * IAM – The portal uses Identity and Access Management to authenticate users and manage user * permissions. *

    *
  • *
*

* You can't change this value after you create a portal. *

*

* Default: SSO * @return Returns a reference to this object so that method calls can be chained together. * @see AuthMode */ public CreatePortalRequest withPortalAuthMode(String portalAuthMode) { setPortalAuthMode(portalAuthMode); return this; } /** *

* The service to use to authenticate users to the portal. Choose from the following options: *

*
    *
  • *

    * SSO – The portal uses IAM Identity Center (successor to Single Sign-On) to authenticate users and * manage user permissions. Before you can create a portal that uses IAM Identity Center, you must enable IAM * Identity Center. For more information, see Enabling IAM * Identity Center in the IoT SiteWise User Guide. This option is only available in Amazon Web Services * Regions other than the China Regions. *

    *
  • *
  • *

    * IAM – The portal uses Identity and Access Management to authenticate users and manage user * permissions. *

    *
  • *
*

* You can't change this value after you create a portal. *

*

* Default: SSO *

* * @param portalAuthMode * The service to use to authenticate users to the portal. Choose from the following options:

*
    *
  • *

    * SSO – The portal uses IAM Identity Center (successor to Single Sign-On) to authenticate users * and manage user permissions. Before you can create a portal that uses IAM Identity Center, you must enable * IAM Identity Center. For more information, see Enabling IAM Identity Center in the IoT SiteWise User Guide. This option is only available in * Amazon Web Services Regions other than the China Regions. *

    *
  • *
  • *

    * IAM – The portal uses Identity and Access Management to authenticate users and manage user * permissions. *

    *
  • *
*

* You can't change this value after you create a portal. *

*

* Default: SSO * @return Returns a reference to this object so that method calls can be chained together. * @see AuthMode */ public CreatePortalRequest withPortalAuthMode(AuthMode portalAuthMode) { this.portalAuthMode = portalAuthMode.toString(); return this; } /** *

* The email address that sends alarm notifications. *

* *

* If you use the IoT * Events managed Lambda function to manage your emails, you must verify the sender email * address in Amazon SES. *

*
* * @param notificationSenderEmail * The email address that sends alarm notifications.

*

* If you use the IoT Events managed * Lambda function to manage your emails, you must verify the sender * email address in Amazon SES. *

*/ public void setNotificationSenderEmail(String notificationSenderEmail) { this.notificationSenderEmail = notificationSenderEmail; } /** *

* The email address that sends alarm notifications. *

* *

* If you use the IoT * Events managed Lambda function to manage your emails, you must verify the sender email * address in Amazon SES. *

*
* * @return The email address that sends alarm notifications.

*

* If you use the IoT Events managed * Lambda function to manage your emails, you must verify the * sender email address in Amazon SES. *

*/ public String getNotificationSenderEmail() { return this.notificationSenderEmail; } /** *

* The email address that sends alarm notifications. *

* *

* If you use the IoT * Events managed Lambda function to manage your emails, you must verify the sender email * address in Amazon SES. *

*
* * @param notificationSenderEmail * The email address that sends alarm notifications.

*

* If you use the IoT Events managed * Lambda function to manage your emails, you must verify the sender * email address in Amazon SES. *

* @return Returns a reference to this object so that method calls can be chained together. */ public CreatePortalRequest withNotificationSenderEmail(String notificationSenderEmail) { setNotificationSenderEmail(notificationSenderEmail); return this; } /** *

* Contains the configuration information of an alarm created in an IoT SiteWise Monitor portal. You can use the * alarm to monitor an asset property and get notified when the asset property value is outside a specified range. * For more information, see Monitoring with alarms in * the IoT SiteWise Application Guide. *

* * @param alarms * Contains the configuration information of an alarm created in an IoT SiteWise Monitor portal. You can use * the alarm to monitor an asset property and get notified when the asset property value is outside a * specified range. For more information, see Monitoring with * alarms in the IoT SiteWise Application Guide. */ public void setAlarms(Alarms alarms) { this.alarms = alarms; } /** *

* Contains the configuration information of an alarm created in an IoT SiteWise Monitor portal. You can use the * alarm to monitor an asset property and get notified when the asset property value is outside a specified range. * For more information, see Monitoring with alarms in * the IoT SiteWise Application Guide. *

* * @return Contains the configuration information of an alarm created in an IoT SiteWise Monitor portal. You can use * the alarm to monitor an asset property and get notified when the asset property value is outside a * specified range. For more information, see Monitoring with * alarms in the IoT SiteWise Application Guide. */ public Alarms getAlarms() { return this.alarms; } /** *

* Contains the configuration information of an alarm created in an IoT SiteWise Monitor portal. You can use the * alarm to monitor an asset property and get notified when the asset property value is outside a specified range. * For more information, see Monitoring with alarms in * the IoT SiteWise Application Guide. *

* * @param alarms * Contains the configuration information of an alarm created in an IoT SiteWise Monitor portal. You can use * the alarm to monitor an asset property and get notified when the asset property value is outside a * specified range. For more information, see Monitoring with * alarms in the IoT SiteWise Application Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePortalRequest withAlarms(Alarms alarms) { setAlarms(alarms); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPortalName() != null) sb.append("PortalName: ").append(getPortalName()).append(","); if (getPortalDescription() != null) sb.append("PortalDescription: ").append(getPortalDescription()).append(","); if (getPortalContactEmail() != null) sb.append("PortalContactEmail: ").append(getPortalContactEmail()).append(","); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getPortalLogoImageFile() != null) sb.append("PortalLogoImageFile: ").append(getPortalLogoImageFile()).append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getPortalAuthMode() != null) sb.append("PortalAuthMode: ").append(getPortalAuthMode()).append(","); if (getNotificationSenderEmail() != null) sb.append("NotificationSenderEmail: ").append(getNotificationSenderEmail()).append(","); if (getAlarms() != null) sb.append("Alarms: ").append(getAlarms()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreatePortalRequest == false) return false; CreatePortalRequest other = (CreatePortalRequest) obj; if (other.getPortalName() == null ^ this.getPortalName() == null) return false; if (other.getPortalName() != null && other.getPortalName().equals(this.getPortalName()) == false) return false; if (other.getPortalDescription() == null ^ this.getPortalDescription() == null) return false; if (other.getPortalDescription() != null && other.getPortalDescription().equals(this.getPortalDescription()) == false) return false; if (other.getPortalContactEmail() == null ^ this.getPortalContactEmail() == null) return false; if (other.getPortalContactEmail() != null && other.getPortalContactEmail().equals(this.getPortalContactEmail()) == false) return false; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getPortalLogoImageFile() == null ^ this.getPortalLogoImageFile() == null) return false; if (other.getPortalLogoImageFile() != null && other.getPortalLogoImageFile().equals(this.getPortalLogoImageFile()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getPortalAuthMode() == null ^ this.getPortalAuthMode() == null) return false; if (other.getPortalAuthMode() != null && other.getPortalAuthMode().equals(this.getPortalAuthMode()) == false) return false; if (other.getNotificationSenderEmail() == null ^ this.getNotificationSenderEmail() == null) return false; if (other.getNotificationSenderEmail() != null && other.getNotificationSenderEmail().equals(this.getNotificationSenderEmail()) == false) return false; if (other.getAlarms() == null ^ this.getAlarms() == null) return false; if (other.getAlarms() != null && other.getAlarms().equals(this.getAlarms()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPortalName() == null) ? 0 : getPortalName().hashCode()); hashCode = prime * hashCode + ((getPortalDescription() == null) ? 0 : getPortalDescription().hashCode()); hashCode = prime * hashCode + ((getPortalContactEmail() == null) ? 0 : getPortalContactEmail().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getPortalLogoImageFile() == null) ? 0 : getPortalLogoImageFile().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getPortalAuthMode() == null) ? 0 : getPortalAuthMode().hashCode()); hashCode = prime * hashCode + ((getNotificationSenderEmail() == null) ? 0 : getNotificationSenderEmail().hashCode()); hashCode = prime * hashCode + ((getAlarms() == null) ? 0 : getAlarms().hashCode()); return hashCode; } @Override public CreatePortalRequest clone() { return (CreatePortalRequest) super.clone(); } }