Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.directory.model;
 

Contains information about a Remote Authentication Dial In User Service (RADIUS) server.

 
 public class RadiusSettings implements SerializableCloneable {

    
An array of strings that contains the IP addresses of the RADIUS server endpoints, or the IP addresses of your RADIUS server load balancer.
 
The port that your RADIUS server is using for communications. Your on-premises network must allow inbound traffic over this port from the AWS Directory Service servers.

Constraints:
Range: 1025 - 65535

 
     private Integer radiusPort;

    
The amount of time, in seconds, to wait for the RADIUS server to respond.

Constraints:
Range: 1 - 20

 
     private Integer radiusTimeout;

    
The maximum number of times that communication with the RADIUS server is attempted.

Constraints:
Range: 0 - 10

 
     private Integer radiusRetries;

    
The shared secret code that was specified when your RADIUS endpoints were created.

Constraints:
Length: 8 - 512

 
     private String sharedSecret;

    
The protocol specified for your RADIUS endpoints.

Constraints:
Allowed Values: PAP, CHAP, MS-CHAPv1, MS-CHAPv2

 
     private String authenticationProtocol;

    
Not currently used.

Constraints:
Length: 1 - 64

 
     private String displayLabel;

    
Not currently used.
 
     private Boolean useSameUsername;

    
An array of strings that contains the IP addresses of the RADIUS server endpoints, or the IP addresses of your RADIUS server load balancer.

Returns:
An array of strings that contains the IP addresses of the RADIUS server endpoints, or the IP addresses of your RADIUS server load balancer.
    public java.util.List<StringgetRadiusServers() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
An array of strings that contains the IP addresses of the RADIUS server endpoints, or the IP addresses of your RADIUS server load balancer.

Parameters:
radiusServers An array of strings that contains the IP addresses of the RADIUS server endpoints, or the IP addresses of your RADIUS server load balancer.
    public void setRadiusServers(java.util.Collection<StringradiusServers) {
        if (radiusServers == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringradiusServersCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(radiusServers.size());
        radiusServersCopy.addAll(radiusServers);
        this. = radiusServersCopy;
    }
    
    
An array of strings that contains the IP addresses of the RADIUS server endpoints, or the IP addresses of your RADIUS server load balancer.

NOTE: This method appends the values to the existing list (if any). Use setRadiusServers(java.util.Collection) or withRadiusServers(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
radiusServers An array of strings that contains the IP addresses of the RADIUS server endpoints, or the IP addresses of your RADIUS server load balancer.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RadiusSettings withRadiusServers(String... radiusServers) {
        if (getRadiusServers() == nullsetRadiusServers(new java.util.ArrayList<String>(radiusServers.length));
        for (String value : radiusServers) {
            getRadiusServers().add(value);
        }
        return this;
    }
    
    
An array of strings that contains the IP addresses of the RADIUS server endpoints, or the IP addresses of your RADIUS server load balancer.

Returns a reference to this object so that method calls can be chained together.

Parameters:
radiusServers An array of strings that contains the IP addresses of the RADIUS server endpoints, or the IP addresses of your RADIUS server load balancer.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RadiusSettings withRadiusServers(java.util.Collection<StringradiusServers) {
        if (radiusServers == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringradiusServersCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(radiusServers.size());
            radiusServersCopy.addAll(radiusServers);
            this. = radiusServersCopy;
        }
        return this;
    }

    
The port that your RADIUS server is using for communications. Your on-premises network must allow inbound traffic over this port from the AWS Directory Service servers.

Constraints:
Range: 1025 - 65535

Returns:
The port that your RADIUS server is using for communications. Your on-premises network must allow inbound traffic over this port from the AWS Directory Service servers.
    public Integer getRadiusPort() {
        return ;
    }
    
    
The port that your RADIUS server is using for communications. Your on-premises network must allow inbound traffic over this port from the AWS Directory Service servers.

Constraints:
Range: 1025 - 65535

Parameters:
radiusPort The port that your RADIUS server is using for communications. Your on-premises network must allow inbound traffic over this port from the AWS Directory Service servers.
    public void setRadiusPort(Integer radiusPort) {
        this. = radiusPort;
    }
    
    
The port that your RADIUS server is using for communications. Your on-premises network must allow inbound traffic over this port from the AWS Directory Service servers.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1025 - 65535

Parameters:
radiusPort The port that your RADIUS server is using for communications. Your on-premises network must allow inbound traffic over this port from the AWS Directory Service servers.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RadiusSettings withRadiusPort(Integer radiusPort) {
        this. = radiusPort;
        return this;
    }

    
The amount of time, in seconds, to wait for the RADIUS server to respond.

Constraints:
Range: 1 - 20

Returns:
The amount of time, in seconds, to wait for the RADIUS server to respond.
    public Integer getRadiusTimeout() {
        return ;
    }
    
    
The amount of time, in seconds, to wait for the RADIUS server to respond.

Constraints:
Range: 1 - 20

Parameters:
radiusTimeout The amount of time, in seconds, to wait for the RADIUS server to respond.
    public void setRadiusTimeout(Integer radiusTimeout) {
        this. = radiusTimeout;
    }
    
    
The amount of time, in seconds, to wait for the RADIUS server to respond.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1 - 20

Parameters:
radiusTimeout The amount of time, in seconds, to wait for the RADIUS server to respond.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RadiusSettings withRadiusTimeout(Integer radiusTimeout) {
        this. = radiusTimeout;
        return this;
    }

    
The maximum number of times that communication with the RADIUS server is attempted.

Constraints:
Range: 0 - 10

Returns:
The maximum number of times that communication with the RADIUS server is attempted.
    public Integer getRadiusRetries() {
        return ;
    }
    
    
The maximum number of times that communication with the RADIUS server is attempted.

Constraints:
Range: 0 - 10

Parameters:
radiusRetries The maximum number of times that communication with the RADIUS server is attempted.
    public void setRadiusRetries(Integer radiusRetries) {
        this. = radiusRetries;
    }
    
    
The maximum number of times that communication with the RADIUS server is attempted.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 0 - 10

Parameters:
radiusRetries The maximum number of times that communication with the RADIUS server is attempted.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RadiusSettings withRadiusRetries(Integer radiusRetries) {
        this. = radiusRetries;
        return this;
    }

    
The shared secret code that was specified when your RADIUS endpoints were created.

Constraints:
Length: 8 - 512

Returns:
The shared secret code that was specified when your RADIUS endpoints were created.
    public String getSharedSecret() {
        return ;
    }
    
    
The shared secret code that was specified when your RADIUS endpoints were created.

Constraints:
Length: 8 - 512

Parameters:
sharedSecret The shared secret code that was specified when your RADIUS endpoints were created.
    public void setSharedSecret(String sharedSecret) {
        this. = sharedSecret;
    }
    
    
The shared secret code that was specified when your RADIUS endpoints were created.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 8 - 512

Parameters:
sharedSecret The shared secret code that was specified when your RADIUS endpoints were created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RadiusSettings withSharedSecret(String sharedSecret) {
        this. = sharedSecret;
        return this;
    }

    
The protocol specified for your RADIUS endpoints.

Constraints:
Allowed Values: PAP, CHAP, MS-CHAPv1, MS-CHAPv2

Returns:
The protocol specified for your RADIUS endpoints.
See also:
RadiusAuthenticationProtocol
    public String getAuthenticationProtocol() {
        return ;
    }
    
    
The protocol specified for your RADIUS endpoints.

Constraints:
Allowed Values: PAP, CHAP, MS-CHAPv1, MS-CHAPv2

Parameters:
authenticationProtocol The protocol specified for your RADIUS endpoints.
See also:
RadiusAuthenticationProtocol
    public void setAuthenticationProtocol(String authenticationProtocol) {
        this. = authenticationProtocol;
    }
    
    
The protocol specified for your RADIUS endpoints.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: PAP, CHAP, MS-CHAPv1, MS-CHAPv2

Parameters:
authenticationProtocol The protocol specified for your RADIUS endpoints.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
RadiusAuthenticationProtocol
    public RadiusSettings withAuthenticationProtocol(String authenticationProtocol) {
        this. = authenticationProtocol;
        return this;
    }

    
The protocol specified for your RADIUS endpoints.

Constraints:
Allowed Values: PAP, CHAP, MS-CHAPv1, MS-CHAPv2

Parameters:
authenticationProtocol The protocol specified for your RADIUS endpoints.
See also:
RadiusAuthenticationProtocol
    public void setAuthenticationProtocol(RadiusAuthenticationProtocol authenticationProtocol) {
        this. = authenticationProtocol.toString();
    }
    
    
The protocol specified for your RADIUS endpoints.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: PAP, CHAP, MS-CHAPv1, MS-CHAPv2

Parameters:
authenticationProtocol The protocol specified for your RADIUS endpoints.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
RadiusAuthenticationProtocol
        this. = authenticationProtocol.toString();
        return this;
    }

    
Not currently used.

Constraints:
Length: 1 - 64

Returns:
Not currently used.
    public String getDisplayLabel() {
        return ;
    }
    
    
Not currently used.

Constraints:
Length: 1 - 64

Parameters:
displayLabel Not currently used.
    public void setDisplayLabel(String displayLabel) {
        this. = displayLabel;
    }
    
    
Not currently used.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 64

Parameters:
displayLabel Not currently used.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RadiusSettings withDisplayLabel(String displayLabel) {
        this. = displayLabel;
        return this;
    }

    
Not currently used.

Returns:
Not currently used.
    public Boolean isUseSameUsername() {
        return ;
    }
    
    
Not currently used.

Parameters:
useSameUsername Not currently used.
    public void setUseSameUsername(Boolean useSameUsername) {
        this. = useSameUsername;
    }
    
    
Not currently used.

Returns a reference to this object so that method calls can be chained together.

Parameters:
useSameUsername Not currently used.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RadiusSettings withUseSameUsername(Boolean useSameUsername) {
        this. = useSameUsername;
        return this;
    }

    
Not currently used.

Returns:
Not currently used.
    public Boolean getUseSameUsername() {
        return ;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getRadiusServers() != nullsb.append("RadiusServers: " + getRadiusServers() + ",");
        if (getRadiusPort() != nullsb.append("RadiusPort: " + getRadiusPort() + ",");
        if (getRadiusTimeout() != nullsb.append("RadiusTimeout: " + getRadiusTimeout() + ",");
        if (getRadiusRetries() != nullsb.append("RadiusRetries: " + getRadiusRetries() + ",");
        if (getSharedSecret() != nullsb.append("SharedSecret: " + getSharedSecret() + ",");
        if (getAuthenticationProtocol() != nullsb.append("AuthenticationProtocol: " + getAuthenticationProtocol() + ",");
        if (getDisplayLabel() != nullsb.append("DisplayLabel: " + getDisplayLabel() + ",");
        if (isUseSameUsername() != nullsb.append("UseSameUsername: " + isUseSameUsername() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getRadiusServers() == null) ? 0 : getRadiusServers().hashCode()); 
        hashCode = prime * hashCode + ((getRadiusPort() == null) ? 0 : getRadiusPort().hashCode()); 
        hashCode = prime * hashCode + ((getRadiusTimeout() == null) ? 0 : getRadiusTimeout().hashCode()); 
        hashCode = prime * hashCode + ((getRadiusRetries() == null) ? 0 : getRadiusRetries().hashCode()); 
        hashCode = prime * hashCode + ((getSharedSecret() == null) ? 0 : getSharedSecret().hashCode()); 
        hashCode = prime * hashCode + ((getAuthenticationProtocol() == null) ? 0 : getAuthenticationProtocol().hashCode()); 
        hashCode = prime * hashCode + ((getDisplayLabel() == null) ? 0 : getDisplayLabel().hashCode()); 
        hashCode = prime * hashCode + ((isUseSameUsername() == null) ? 0 : isUseSameUsername().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof RadiusSettings == falsereturn false;
        RadiusSettings other = (RadiusSettings)obj;
        
        if (other.getRadiusServers() == null ^ this.getRadiusServers() == nullreturn false;
        if (other.getRadiusServers() != null && other.getRadiusServers().equals(this.getRadiusServers()) == falsereturn false
        if (other.getRadiusPort() == null ^ this.getRadiusPort() == nullreturn false;
        if (other.getRadiusPort() != null && other.getRadiusPort().equals(this.getRadiusPort()) == falsereturn false
        if (other.getRadiusTimeout() == null ^ this.getRadiusTimeout() == nullreturn false;
        if (other.getRadiusTimeout() != null && other.getRadiusTimeout().equals(this.getRadiusTimeout()) == falsereturn false
        if (other.getRadiusRetries() == null ^ this.getRadiusRetries() == nullreturn false;
        if (other.getRadiusRetries() != null && other.getRadiusRetries().equals(this.getRadiusRetries()) == falsereturn false
        if (other.getSharedSecret() == null ^ this.getSharedSecret() == nullreturn false;
        if (other.getSharedSecret() != null && other.getSharedSecret().equals(this.getSharedSecret()) == falsereturn false
        if (other.getAuthenticationProtocol() == null ^ this.getAuthenticationProtocol() == nullreturn false;
        if (other.getAuthenticationProtocol() != null && other.getAuthenticationProtocol().equals(this.getAuthenticationProtocol()) == falsereturn false
        if (other.getDisplayLabel() == null ^ this.getDisplayLabel() == nullreturn false;
        if (other.getDisplayLabel() != null && other.getDisplayLabel().equals(this.getDisplayLabel()) == falsereturn false
        if (other.isUseSameUsername() == null ^ this.isUseSameUsername() == nullreturn false;
        if (other.isUseSameUsername() != null && other.isUseSameUsername().equals(this.isUseSameUsername()) == falsereturn false
        return true;
    }
    
    @Override
    public RadiusSettings clone() {
        try {
            return (RadiusSettingssuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X