com.amazonaws.services.ec2.model.ClientLoginBannerResponseOptions Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* Copyright 2017-2022 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.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* Current state of options for customizable text banner that will be displayed on Amazon Web Services provided clients
* when a VPN session is established.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ClientLoginBannerResponseOptions implements Serializable, Cloneable {
/**
*
* Current state of text banner feature.
*
*
* Valid values: true | false
*
*/
private Boolean enabled;
/**
*
* Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session
* is established. UTF-8 encoded characters only. Maximum of 1400 characters.
*
*/
private String bannerText;
/**
*
* Current state of text banner feature.
*
*
* Valid values: true | false
*
*
* @param enabled
* Current state of text banner feature.
*
* Valid values: true | false
*/
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
/**
*
* Current state of text banner feature.
*
*
* Valid values: true | false
*
*
* @return Current state of text banner feature.
*
* Valid values: true | false
*/
public Boolean getEnabled() {
return this.enabled;
}
/**
*
* Current state of text banner feature.
*
*
* Valid values: true | false
*
*
* @param enabled
* Current state of text banner feature.
*
* Valid values: true | false
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClientLoginBannerResponseOptions withEnabled(Boolean enabled) {
setEnabled(enabled);
return this;
}
/**
*
* Current state of text banner feature.
*
*
* Valid values: true | false
*
*
* @return Current state of text banner feature.
*
* Valid values: true | false
*/
public Boolean isEnabled() {
return this.enabled;
}
/**
*
* Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session
* is established. UTF-8 encoded characters only. Maximum of 1400 characters.
*
*
* @param bannerText
* Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN
* session is established. UTF-8 encoded characters only. Maximum of 1400 characters.
*/
public void setBannerText(String bannerText) {
this.bannerText = bannerText;
}
/**
*
* Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session
* is established. UTF-8 encoded characters only. Maximum of 1400 characters.
*
*
* @return Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN
* session is established. UTF-8 encoded characters only. Maximum of 1400 characters.
*/
public String getBannerText() {
return this.bannerText;
}
/**
*
* Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session
* is established. UTF-8 encoded characters only. Maximum of 1400 characters.
*
*
* @param bannerText
* Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN
* session is established. UTF-8 encoded characters only. Maximum of 1400 characters.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClientLoginBannerResponseOptions withBannerText(String bannerText) {
setBannerText(bannerText);
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 (getEnabled() != null)
sb.append("Enabled: ").append(getEnabled()).append(",");
if (getBannerText() != null)
sb.append("BannerText: ").append(getBannerText());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ClientLoginBannerResponseOptions == false)
return false;
ClientLoginBannerResponseOptions other = (ClientLoginBannerResponseOptions) obj;
if (other.getEnabled() == null ^ this.getEnabled() == null)
return false;
if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false)
return false;
if (other.getBannerText() == null ^ this.getBannerText() == null)
return false;
if (other.getBannerText() != null && other.getBannerText().equals(this.getBannerText()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode());
hashCode = prime * hashCode + ((getBannerText() == null) ? 0 : getBannerText().hashCode());
return hashCode;
}
@Override
public ClientLoginBannerResponseOptions clone() {
try {
return (ClientLoginBannerResponseOptions) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}