com.amazonaws.services.transfer.model.DescribedUser Maven / Gradle / Ivy
Show all versions of aws-java-sdk-transfer Show documentation
/*
* Copyright 2019-2024 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.transfer.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Describes the properties of a user that was specified.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribedUser implements Serializable, Cloneable, StructuredPojo {
/**
*
* Specifies the unique Amazon Resource Name (ARN) for the user that was requested to be described.
*
*/
private String arn;
/**
*
* The landing directory (folder) for a user when they log in to the server using the client.
*
*
* A HomeDirectory
example is /bucket_name/home/mydirectory
.
*
*
*
* The HomeDirectory
parameter is only used if HomeDirectoryType
is set to
* PATH
.
*
*
*/
private String homeDirectory;
/**
*
* Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your
* user and how you want to make them visible. You must specify the Entry
and Target
pair,
* where Entry
shows how the path is made visible and Target
is the actual Amazon S3 or
* Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your Identity and
* Access Management (IAM) role provides access to paths in Target
. This value can be set only when
* HomeDirectoryType
is set to LOGICAL.
*
*
* In most cases, you can use this value instead of the session policy to lock your user down to the designated home
* directory ("chroot
"). To do this, you can set Entry
to '/' and set Target
* to the HomeDirectory parameter value.
*
*/
private java.util.List homeDirectoryMappings;
/**
*
* The type of landing directory (folder) that you want your users' home directory to be when they log in to the
* server. If you set it to PATH
, the user will see the absolute Amazon S3 bucket or Amazon EFS path as
* is in their file transfer protocol clients. If you set it to LOGICAL
, you need to provide mappings
* in the HomeDirectoryMappings
for how you want to make Amazon S3 or Amazon EFS paths visible to your
* users.
*
*
*
* If HomeDirectoryType
is LOGICAL
, you must provide mappings, using the
* HomeDirectoryMappings
parameter. If, on the other hand, HomeDirectoryType
is
* PATH
, you provide an absolute path using the HomeDirectory
parameter. You cannot have
* both HomeDirectory
and HomeDirectoryMappings
in your template.
*
*
*/
private String homeDirectoryType;
/**
*
* A session policy for your user so that you can use the same Identity and Access Management (IAM) role across
* multiple users. This policy scopes down a user's access to portions of their Amazon S3 bucket. Variables that you
* can use inside this policy include ${Transfer:UserName}
, ${Transfer:HomeDirectory}
, and
* ${Transfer:HomeBucket}
.
*
*/
private String policy;
/**
*
* Specifies the full POSIX identity, including user ID (Uid
), group ID (Gid
), and any
* secondary groups IDs (SecondaryGids
), that controls your users' access to your Amazon Elastic File
* System (Amazon EFS) file systems. The POSIX permissions that are set on files and directories in your file system
* determine the level of access your users get when transferring files into and out of your Amazon EFS file
* systems.
*
*/
private PosixProfile posixProfile;
/**
*
* The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users' access
* to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine the level of
* access that you want to provide your users when transferring files into and out of your Amazon S3 bucket or
* Amazon EFS file system. The IAM role should also contain a trust relationship that allows the server to access
* your resources when servicing your users' transfer requests.
*
*/
private String role;
/**
*
* Specifies the public key portion of the Secure Shell (SSH) keys stored for the described user.
*
*/
private java.util.List sshPublicKeys;
/**
*
* Specifies the key-value pairs for the user requested. Tag can be used to search for and group users for a variety
* of purposes.
*
*/
private java.util.List tags;
/**
*
* Specifies the name of the user that was requested to be described. User names are used for authentication
* purposes. This is the string that will be used by your user when they log in to your server.
*
*/
private String userName;
/**
*
* Specifies the unique Amazon Resource Name (ARN) for the user that was requested to be described.
*
*
* @param arn
* Specifies the unique Amazon Resource Name (ARN) for the user that was requested to be described.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* Specifies the unique Amazon Resource Name (ARN) for the user that was requested to be described.
*
*
* @return Specifies the unique Amazon Resource Name (ARN) for the user that was requested to be described.
*/
public String getArn() {
return this.arn;
}
/**
*
* Specifies the unique Amazon Resource Name (ARN) for the user that was requested to be described.
*
*
* @param arn
* Specifies the unique Amazon Resource Name (ARN) for the user that was requested to be described.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribedUser withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The landing directory (folder) for a user when they log in to the server using the client.
*
*
* A HomeDirectory
example is /bucket_name/home/mydirectory
.
*
*
*
* The HomeDirectory
parameter is only used if HomeDirectoryType
is set to
* PATH
.
*
*
*
* @param homeDirectory
* The landing directory (folder) for a user when they log in to the server using the client.
*
* A HomeDirectory
example is /bucket_name/home/mydirectory
.
*
*
*
* The HomeDirectory
parameter is only used if HomeDirectoryType
is set to
* PATH
.
*
*/
public void setHomeDirectory(String homeDirectory) {
this.homeDirectory = homeDirectory;
}
/**
*
* The landing directory (folder) for a user when they log in to the server using the client.
*
*
* A HomeDirectory
example is /bucket_name/home/mydirectory
.
*
*
*
* The HomeDirectory
parameter is only used if HomeDirectoryType
is set to
* PATH
.
*
*
*
* @return The landing directory (folder) for a user when they log in to the server using the client.
*
* A HomeDirectory
example is /bucket_name/home/mydirectory
.
*
*
*
* The HomeDirectory
parameter is only used if HomeDirectoryType
is set to
* PATH
.
*
*/
public String getHomeDirectory() {
return this.homeDirectory;
}
/**
*
* The landing directory (folder) for a user when they log in to the server using the client.
*
*
* A HomeDirectory
example is /bucket_name/home/mydirectory
.
*
*
*
* The HomeDirectory
parameter is only used if HomeDirectoryType
is set to
* PATH
.
*
*
*
* @param homeDirectory
* The landing directory (folder) for a user when they log in to the server using the client.
*
* A HomeDirectory
example is /bucket_name/home/mydirectory
.
*
*
*
* The HomeDirectory
parameter is only used if HomeDirectoryType
is set to
* PATH
.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribedUser withHomeDirectory(String homeDirectory) {
setHomeDirectory(homeDirectory);
return this;
}
/**
*
* Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your
* user and how you want to make them visible. You must specify the Entry
and Target
pair,
* where Entry
shows how the path is made visible and Target
is the actual Amazon S3 or
* Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your Identity and
* Access Management (IAM) role provides access to paths in Target
. This value can be set only when
* HomeDirectoryType
is set to LOGICAL.
*
*
* In most cases, you can use this value instead of the session policy to lock your user down to the designated home
* directory ("chroot
"). To do this, you can set Entry
to '/' and set Target
* to the HomeDirectory parameter value.
*
*
* @return Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to
* your user and how you want to make them visible. You must specify the Entry
and
* Target
pair, where Entry
shows how the path is made visible and
* Target
is the actual Amazon S3 or Amazon EFS path. If you only specify a target, it is
* displayed as is. You also must ensure that your Identity and Access Management (IAM) role provides access
* to paths in Target
. This value can be set only when HomeDirectoryType
is set to
* LOGICAL.
*
* In most cases, you can use this value instead of the session policy to lock your user down to the
* designated home directory ("chroot
"). To do this, you can set Entry
to '/' and
* set Target
to the HomeDirectory parameter value.
*/
public java.util.List getHomeDirectoryMappings() {
return homeDirectoryMappings;
}
/**
*
* Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your
* user and how you want to make them visible. You must specify the Entry
and Target
pair,
* where Entry
shows how the path is made visible and Target
is the actual Amazon S3 or
* Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your Identity and
* Access Management (IAM) role provides access to paths in Target
. This value can be set only when
* HomeDirectoryType
is set to LOGICAL.
*
*
* In most cases, you can use this value instead of the session policy to lock your user down to the designated home
* directory ("chroot
"). To do this, you can set Entry
to '/' and set Target
* to the HomeDirectory parameter value.
*
*
* @param homeDirectoryMappings
* Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to
* your user and how you want to make them visible. You must specify the Entry
and
* Target
pair, where Entry
shows how the path is made visible and
* Target
is the actual Amazon S3 or Amazon EFS path. If you only specify a target, it is
* displayed as is. You also must ensure that your Identity and Access Management (IAM) role provides access
* to paths in Target
. This value can be set only when HomeDirectoryType
is set to
* LOGICAL.
*
* In most cases, you can use this value instead of the session policy to lock your user down to the
* designated home directory ("chroot
"). To do this, you can set Entry
to '/' and
* set Target
to the HomeDirectory parameter value.
*/
public void setHomeDirectoryMappings(java.util.Collection homeDirectoryMappings) {
if (homeDirectoryMappings == null) {
this.homeDirectoryMappings = null;
return;
}
this.homeDirectoryMappings = new java.util.ArrayList(homeDirectoryMappings);
}
/**
*
* Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your
* user and how you want to make them visible. You must specify the Entry
and Target
pair,
* where Entry
shows how the path is made visible and Target
is the actual Amazon S3 or
* Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your Identity and
* Access Management (IAM) role provides access to paths in Target
. This value can be set only when
* HomeDirectoryType
is set to LOGICAL.
*
*
* In most cases, you can use this value instead of the session policy to lock your user down to the designated home
* directory ("chroot
"). To do this, you can set Entry
to '/' and set Target
* to the HomeDirectory parameter value.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setHomeDirectoryMappings(java.util.Collection)} or
* {@link #withHomeDirectoryMappings(java.util.Collection)} if you want to override the existing values.
*
*
* @param homeDirectoryMappings
* Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to
* your user and how you want to make them visible. You must specify the Entry
and
* Target
pair, where Entry
shows how the path is made visible and
* Target
is the actual Amazon S3 or Amazon EFS path. If you only specify a target, it is
* displayed as is. You also must ensure that your Identity and Access Management (IAM) role provides access
* to paths in Target
. This value can be set only when HomeDirectoryType
is set to
* LOGICAL.
*
* In most cases, you can use this value instead of the session policy to lock your user down to the
* designated home directory ("chroot
"). To do this, you can set Entry
to '/' and
* set Target
to the HomeDirectory parameter value.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribedUser withHomeDirectoryMappings(HomeDirectoryMapEntry... homeDirectoryMappings) {
if (this.homeDirectoryMappings == null) {
setHomeDirectoryMappings(new java.util.ArrayList(homeDirectoryMappings.length));
}
for (HomeDirectoryMapEntry ele : homeDirectoryMappings) {
this.homeDirectoryMappings.add(ele);
}
return this;
}
/**
*
* Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your
* user and how you want to make them visible. You must specify the Entry
and Target
pair,
* where Entry
shows how the path is made visible and Target
is the actual Amazon S3 or
* Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your Identity and
* Access Management (IAM) role provides access to paths in Target
. This value can be set only when
* HomeDirectoryType
is set to LOGICAL.
*
*
* In most cases, you can use this value instead of the session policy to lock your user down to the designated home
* directory ("chroot
"). To do this, you can set Entry
to '/' and set Target
* to the HomeDirectory parameter value.
*
*
* @param homeDirectoryMappings
* Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to
* your user and how you want to make them visible. You must specify the Entry
and
* Target
pair, where Entry
shows how the path is made visible and
* Target
is the actual Amazon S3 or Amazon EFS path. If you only specify a target, it is
* displayed as is. You also must ensure that your Identity and Access Management (IAM) role provides access
* to paths in Target
. This value can be set only when HomeDirectoryType
is set to
* LOGICAL.
*
* In most cases, you can use this value instead of the session policy to lock your user down to the
* designated home directory ("chroot
"). To do this, you can set Entry
to '/' and
* set Target
to the HomeDirectory parameter value.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribedUser withHomeDirectoryMappings(java.util.Collection homeDirectoryMappings) {
setHomeDirectoryMappings(homeDirectoryMappings);
return this;
}
/**
*
* The type of landing directory (folder) that you want your users' home directory to be when they log in to the
* server. If you set it to PATH
, the user will see the absolute Amazon S3 bucket or Amazon EFS path as
* is in their file transfer protocol clients. If you set it to LOGICAL
, you need to provide mappings
* in the HomeDirectoryMappings
for how you want to make Amazon S3 or Amazon EFS paths visible to your
* users.
*
*
*
* If HomeDirectoryType
is LOGICAL
, you must provide mappings, using the
* HomeDirectoryMappings
parameter. If, on the other hand, HomeDirectoryType
is
* PATH
, you provide an absolute path using the HomeDirectory
parameter. You cannot have
* both HomeDirectory
and HomeDirectoryMappings
in your template.
*
*
*
* @param homeDirectoryType
* The type of landing directory (folder) that you want your users' home directory to be when they log in to
* the server. If you set it to PATH
, the user will see the absolute Amazon S3 bucket or Amazon
* EFS path as is in their file transfer protocol clients. If you set it to LOGICAL
, you need to
* provide mappings in the HomeDirectoryMappings
for how you want to make Amazon S3 or Amazon
* EFS paths visible to your users.
*
* If HomeDirectoryType
is LOGICAL
, you must provide mappings, using the
* HomeDirectoryMappings
parameter. If, on the other hand, HomeDirectoryType
is
* PATH
, you provide an absolute path using the HomeDirectory
parameter. You cannot
* have both HomeDirectory
and HomeDirectoryMappings
in your template.
*
* @see HomeDirectoryType
*/
public void setHomeDirectoryType(String homeDirectoryType) {
this.homeDirectoryType = homeDirectoryType;
}
/**
*
* The type of landing directory (folder) that you want your users' home directory to be when they log in to the
* server. If you set it to PATH
, the user will see the absolute Amazon S3 bucket or Amazon EFS path as
* is in their file transfer protocol clients. If you set it to LOGICAL
, you need to provide mappings
* in the HomeDirectoryMappings
for how you want to make Amazon S3 or Amazon EFS paths visible to your
* users.
*
*
*
* If HomeDirectoryType
is LOGICAL
, you must provide mappings, using the
* HomeDirectoryMappings
parameter. If, on the other hand, HomeDirectoryType
is
* PATH
, you provide an absolute path using the HomeDirectory
parameter. You cannot have
* both HomeDirectory
and HomeDirectoryMappings
in your template.
*
*
*
* @return The type of landing directory (folder) that you want your users' home directory to be when they log in to
* the server. If you set it to PATH
, the user will see the absolute Amazon S3 bucket or Amazon
* EFS path as is in their file transfer protocol clients. If you set it to LOGICAL
, you need
* to provide mappings in the HomeDirectoryMappings
for how you want to make Amazon S3 or
* Amazon EFS paths visible to your users.
*
* If HomeDirectoryType
is LOGICAL
, you must provide mappings, using the
* HomeDirectoryMappings
parameter. If, on the other hand, HomeDirectoryType
is
* PATH
, you provide an absolute path using the HomeDirectory
parameter. You
* cannot have both HomeDirectory
and HomeDirectoryMappings
in your template.
*
* @see HomeDirectoryType
*/
public String getHomeDirectoryType() {
return this.homeDirectoryType;
}
/**
*
* The type of landing directory (folder) that you want your users' home directory to be when they log in to the
* server. If you set it to PATH
, the user will see the absolute Amazon S3 bucket or Amazon EFS path as
* is in their file transfer protocol clients. If you set it to LOGICAL
, you need to provide mappings
* in the HomeDirectoryMappings
for how you want to make Amazon S3 or Amazon EFS paths visible to your
* users.
*
*
*
* If HomeDirectoryType
is LOGICAL
, you must provide mappings, using the
* HomeDirectoryMappings
parameter. If, on the other hand, HomeDirectoryType
is
* PATH
, you provide an absolute path using the HomeDirectory
parameter. You cannot have
* both HomeDirectory
and HomeDirectoryMappings
in your template.
*
*
*
* @param homeDirectoryType
* The type of landing directory (folder) that you want your users' home directory to be when they log in to
* the server. If you set it to PATH
, the user will see the absolute Amazon S3 bucket or Amazon
* EFS path as is in their file transfer protocol clients. If you set it to LOGICAL
, you need to
* provide mappings in the HomeDirectoryMappings
for how you want to make Amazon S3 or Amazon
* EFS paths visible to your users.
*
* If HomeDirectoryType
is LOGICAL
, you must provide mappings, using the
* HomeDirectoryMappings
parameter. If, on the other hand, HomeDirectoryType
is
* PATH
, you provide an absolute path using the HomeDirectory
parameter. You cannot
* have both HomeDirectory
and HomeDirectoryMappings
in your template.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see HomeDirectoryType
*/
public DescribedUser withHomeDirectoryType(String homeDirectoryType) {
setHomeDirectoryType(homeDirectoryType);
return this;
}
/**
*
* The type of landing directory (folder) that you want your users' home directory to be when they log in to the
* server. If you set it to PATH
, the user will see the absolute Amazon S3 bucket or Amazon EFS path as
* is in their file transfer protocol clients. If you set it to LOGICAL
, you need to provide mappings
* in the HomeDirectoryMappings
for how you want to make Amazon S3 or Amazon EFS paths visible to your
* users.
*
*
*
* If HomeDirectoryType
is LOGICAL
, you must provide mappings, using the
* HomeDirectoryMappings
parameter. If, on the other hand, HomeDirectoryType
is
* PATH
, you provide an absolute path using the HomeDirectory
parameter. You cannot have
* both HomeDirectory
and HomeDirectoryMappings
in your template.
*
*
*
* @param homeDirectoryType
* The type of landing directory (folder) that you want your users' home directory to be when they log in to
* the server. If you set it to PATH
, the user will see the absolute Amazon S3 bucket or Amazon
* EFS path as is in their file transfer protocol clients. If you set it to LOGICAL
, you need to
* provide mappings in the HomeDirectoryMappings
for how you want to make Amazon S3 or Amazon
* EFS paths visible to your users.
*
* If HomeDirectoryType
is LOGICAL
, you must provide mappings, using the
* HomeDirectoryMappings
parameter. If, on the other hand, HomeDirectoryType
is
* PATH
, you provide an absolute path using the HomeDirectory
parameter. You cannot
* have both HomeDirectory
and HomeDirectoryMappings
in your template.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see HomeDirectoryType
*/
public DescribedUser withHomeDirectoryType(HomeDirectoryType homeDirectoryType) {
this.homeDirectoryType = homeDirectoryType.toString();
return this;
}
/**
*
* A session policy for your user so that you can use the same Identity and Access Management (IAM) role across
* multiple users. This policy scopes down a user's access to portions of their Amazon S3 bucket. Variables that you
* can use inside this policy include ${Transfer:UserName}
, ${Transfer:HomeDirectory}
, and
* ${Transfer:HomeBucket}
.
*
*
* @param policy
* A session policy for your user so that you can use the same Identity and Access Management (IAM) role
* across multiple users. This policy scopes down a user's access to portions of their Amazon S3 bucket.
* Variables that you can use inside this policy include ${Transfer:UserName}
,
* ${Transfer:HomeDirectory}
, and ${Transfer:HomeBucket}
.
*/
public void setPolicy(String policy) {
this.policy = policy;
}
/**
*
* A session policy for your user so that you can use the same Identity and Access Management (IAM) role across
* multiple users. This policy scopes down a user's access to portions of their Amazon S3 bucket. Variables that you
* can use inside this policy include ${Transfer:UserName}
, ${Transfer:HomeDirectory}
, and
* ${Transfer:HomeBucket}
.
*
*
* @return A session policy for your user so that you can use the same Identity and Access Management (IAM) role
* across multiple users. This policy scopes down a user's access to portions of their Amazon S3 bucket.
* Variables that you can use inside this policy include ${Transfer:UserName}
,
* ${Transfer:HomeDirectory}
, and ${Transfer:HomeBucket}
.
*/
public String getPolicy() {
return this.policy;
}
/**
*
* A session policy for your user so that you can use the same Identity and Access Management (IAM) role across
* multiple users. This policy scopes down a user's access to portions of their Amazon S3 bucket. Variables that you
* can use inside this policy include ${Transfer:UserName}
, ${Transfer:HomeDirectory}
, and
* ${Transfer:HomeBucket}
.
*
*
* @param policy
* A session policy for your user so that you can use the same Identity and Access Management (IAM) role
* across multiple users. This policy scopes down a user's access to portions of their Amazon S3 bucket.
* Variables that you can use inside this policy include ${Transfer:UserName}
,
* ${Transfer:HomeDirectory}
, and ${Transfer:HomeBucket}
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribedUser withPolicy(String policy) {
setPolicy(policy);
return this;
}
/**
*
* Specifies the full POSIX identity, including user ID (Uid
), group ID (Gid
), and any
* secondary groups IDs (SecondaryGids
), that controls your users' access to your Amazon Elastic File
* System (Amazon EFS) file systems. The POSIX permissions that are set on files and directories in your file system
* determine the level of access your users get when transferring files into and out of your Amazon EFS file
* systems.
*
*
* @param posixProfile
* Specifies the full POSIX identity, including user ID (Uid
), group ID (Gid
), and
* any secondary groups IDs (SecondaryGids
), that controls your users' access to your Amazon
* Elastic File System (Amazon EFS) file systems. The POSIX permissions that are set on files and directories
* in your file system determine the level of access your users get when transferring files into and out of
* your Amazon EFS file systems.
*/
public void setPosixProfile(PosixProfile posixProfile) {
this.posixProfile = posixProfile;
}
/**
*
* Specifies the full POSIX identity, including user ID (Uid
), group ID (Gid
), and any
* secondary groups IDs (SecondaryGids
), that controls your users' access to your Amazon Elastic File
* System (Amazon EFS) file systems. The POSIX permissions that are set on files and directories in your file system
* determine the level of access your users get when transferring files into and out of your Amazon EFS file
* systems.
*
*
* @return Specifies the full POSIX identity, including user ID (Uid
), group ID (Gid
), and
* any secondary groups IDs (SecondaryGids
), that controls your users' access to your Amazon
* Elastic File System (Amazon EFS) file systems. The POSIX permissions that are set on files and
* directories in your file system determine the level of access your users get when transferring files into
* and out of your Amazon EFS file systems.
*/
public PosixProfile getPosixProfile() {
return this.posixProfile;
}
/**
*
* Specifies the full POSIX identity, including user ID (Uid
), group ID (Gid
), and any
* secondary groups IDs (SecondaryGids
), that controls your users' access to your Amazon Elastic File
* System (Amazon EFS) file systems. The POSIX permissions that are set on files and directories in your file system
* determine the level of access your users get when transferring files into and out of your Amazon EFS file
* systems.
*
*
* @param posixProfile
* Specifies the full POSIX identity, including user ID (Uid
), group ID (Gid
), and
* any secondary groups IDs (SecondaryGids
), that controls your users' access to your Amazon
* Elastic File System (Amazon EFS) file systems. The POSIX permissions that are set on files and directories
* in your file system determine the level of access your users get when transferring files into and out of
* your Amazon EFS file systems.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribedUser withPosixProfile(PosixProfile posixProfile) {
setPosixProfile(posixProfile);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users' access
* to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine the level of
* access that you want to provide your users when transferring files into and out of your Amazon S3 bucket or
* Amazon EFS file system. The IAM role should also contain a trust relationship that allows the server to access
* your resources when servicing your users' transfer requests.
*
*
* @param role
* The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users'
* access to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine
* the level of access that you want to provide your users when transferring files into and out of your
* Amazon S3 bucket or Amazon EFS file system. The IAM role should also contain a trust relationship that
* allows the server to access your resources when servicing your users' transfer requests.
*/
public void setRole(String role) {
this.role = role;
}
/**
*
* The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users' access
* to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine the level of
* access that you want to provide your users when transferring files into and out of your Amazon S3 bucket or
* Amazon EFS file system. The IAM role should also contain a trust relationship that allows the server to access
* your resources when servicing your users' transfer requests.
*
*
* @return The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users'
* access to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine
* the level of access that you want to provide your users when transferring files into and out of your
* Amazon S3 bucket or Amazon EFS file system. The IAM role should also contain a trust relationship that
* allows the server to access your resources when servicing your users' transfer requests.
*/
public String getRole() {
return this.role;
}
/**
*
* The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users' access
* to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine the level of
* access that you want to provide your users when transferring files into and out of your Amazon S3 bucket or
* Amazon EFS file system. The IAM role should also contain a trust relationship that allows the server to access
* your resources when servicing your users' transfer requests.
*
*
* @param role
* The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users'
* access to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine
* the level of access that you want to provide your users when transferring files into and out of your
* Amazon S3 bucket or Amazon EFS file system. The IAM role should also contain a trust relationship that
* allows the server to access your resources when servicing your users' transfer requests.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribedUser withRole(String role) {
setRole(role);
return this;
}
/**
*
* Specifies the public key portion of the Secure Shell (SSH) keys stored for the described user.
*
*
* @return Specifies the public key portion of the Secure Shell (SSH) keys stored for the described user.
*/
public java.util.List getSshPublicKeys() {
return sshPublicKeys;
}
/**
*
* Specifies the public key portion of the Secure Shell (SSH) keys stored for the described user.
*
*
* @param sshPublicKeys
* Specifies the public key portion of the Secure Shell (SSH) keys stored for the described user.
*/
public void setSshPublicKeys(java.util.Collection sshPublicKeys) {
if (sshPublicKeys == null) {
this.sshPublicKeys = null;
return;
}
this.sshPublicKeys = new java.util.ArrayList(sshPublicKeys);
}
/**
*
* Specifies the public key portion of the Secure Shell (SSH) keys stored for the described user.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSshPublicKeys(java.util.Collection)} or {@link #withSshPublicKeys(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param sshPublicKeys
* Specifies the public key portion of the Secure Shell (SSH) keys stored for the described user.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribedUser withSshPublicKeys(SshPublicKey... sshPublicKeys) {
if (this.sshPublicKeys == null) {
setSshPublicKeys(new java.util.ArrayList(sshPublicKeys.length));
}
for (SshPublicKey ele : sshPublicKeys) {
this.sshPublicKeys.add(ele);
}
return this;
}
/**
*
* Specifies the public key portion of the Secure Shell (SSH) keys stored for the described user.
*
*
* @param sshPublicKeys
* Specifies the public key portion of the Secure Shell (SSH) keys stored for the described user.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribedUser withSshPublicKeys(java.util.Collection sshPublicKeys) {
setSshPublicKeys(sshPublicKeys);
return this;
}
/**
*
* Specifies the key-value pairs for the user requested. Tag can be used to search for and group users for a variety
* of purposes.
*
*
* @return Specifies the key-value pairs for the user requested. Tag can be used to search for and group users for a
* variety of purposes.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* Specifies the key-value pairs for the user requested. Tag can be used to search for and group users for a variety
* of purposes.
*
*
* @param tags
* Specifies the key-value pairs for the user requested. Tag can be used to search for and group users for a
* variety of purposes.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* Specifies the key-value pairs for the user requested. Tag can be used to search for and group users for a variety
* of purposes.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* Specifies the key-value pairs for the user requested. Tag can be used to search for and group users for a
* variety of purposes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribedUser withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* Specifies the key-value pairs for the user requested. Tag can be used to search for and group users for a variety
* of purposes.
*
*
* @param tags
* Specifies the key-value pairs for the user requested. Tag can be used to search for and group users for a
* variety of purposes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribedUser withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* Specifies the name of the user that was requested to be described. User names are used for authentication
* purposes. This is the string that will be used by your user when they log in to your server.
*
*
* @param userName
* Specifies the name of the user that was requested to be described. User names are used for authentication
* purposes. This is the string that will be used by your user when they log in to your server.
*/
public void setUserName(String userName) {
this.userName = userName;
}
/**
*
* Specifies the name of the user that was requested to be described. User names are used for authentication
* purposes. This is the string that will be used by your user when they log in to your server.
*
*
* @return Specifies the name of the user that was requested to be described. User names are used for authentication
* purposes. This is the string that will be used by your user when they log in to your server.
*/
public String getUserName() {
return this.userName;
}
/**
*
* Specifies the name of the user that was requested to be described. User names are used for authentication
* purposes. This is the string that will be used by your user when they log in to your server.
*
*
* @param userName
* Specifies the name of the user that was requested to be described. User names are used for authentication
* purposes. This is the string that will be used by your user when they log in to your server.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribedUser withUserName(String userName) {
setUserName(userName);
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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getHomeDirectory() != null)
sb.append("HomeDirectory: ").append(getHomeDirectory()).append(",");
if (getHomeDirectoryMappings() != null)
sb.append("HomeDirectoryMappings: ").append(getHomeDirectoryMappings()).append(",");
if (getHomeDirectoryType() != null)
sb.append("HomeDirectoryType: ").append(getHomeDirectoryType()).append(",");
if (getPolicy() != null)
sb.append("Policy: ").append(getPolicy()).append(",");
if (getPosixProfile() != null)
sb.append("PosixProfile: ").append(getPosixProfile()).append(",");
if (getRole() != null)
sb.append("Role: ").append(getRole()).append(",");
if (getSshPublicKeys() != null)
sb.append("SshPublicKeys: ").append(getSshPublicKeys()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getUserName() != null)
sb.append("UserName: ").append(getUserName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribedUser == false)
return false;
DescribedUser other = (DescribedUser) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getHomeDirectory() == null ^ this.getHomeDirectory() == null)
return false;
if (other.getHomeDirectory() != null && other.getHomeDirectory().equals(this.getHomeDirectory()) == false)
return false;
if (other.getHomeDirectoryMappings() == null ^ this.getHomeDirectoryMappings() == null)
return false;
if (other.getHomeDirectoryMappings() != null && other.getHomeDirectoryMappings().equals(this.getHomeDirectoryMappings()) == false)
return false;
if (other.getHomeDirectoryType() == null ^ this.getHomeDirectoryType() == null)
return false;
if (other.getHomeDirectoryType() != null && other.getHomeDirectoryType().equals(this.getHomeDirectoryType()) == false)
return false;
if (other.getPolicy() == null ^ this.getPolicy() == null)
return false;
if (other.getPolicy() != null && other.getPolicy().equals(this.getPolicy()) == false)
return false;
if (other.getPosixProfile() == null ^ this.getPosixProfile() == null)
return false;
if (other.getPosixProfile() != null && other.getPosixProfile().equals(this.getPosixProfile()) == false)
return false;
if (other.getRole() == null ^ this.getRole() == null)
return false;
if (other.getRole() != null && other.getRole().equals(this.getRole()) == false)
return false;
if (other.getSshPublicKeys() == null ^ this.getSshPublicKeys() == null)
return false;
if (other.getSshPublicKeys() != null && other.getSshPublicKeys().equals(this.getSshPublicKeys()) == 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.getUserName() == null ^ this.getUserName() == null)
return false;
if (other.getUserName() != null && other.getUserName().equals(this.getUserName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getHomeDirectory() == null) ? 0 : getHomeDirectory().hashCode());
hashCode = prime * hashCode + ((getHomeDirectoryMappings() == null) ? 0 : getHomeDirectoryMappings().hashCode());
hashCode = prime * hashCode + ((getHomeDirectoryType() == null) ? 0 : getHomeDirectoryType().hashCode());
hashCode = prime * hashCode + ((getPolicy() == null) ? 0 : getPolicy().hashCode());
hashCode = prime * hashCode + ((getPosixProfile() == null) ? 0 : getPosixProfile().hashCode());
hashCode = prime * hashCode + ((getRole() == null) ? 0 : getRole().hashCode());
hashCode = prime * hashCode + ((getSshPublicKeys() == null) ? 0 : getSshPublicKeys().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getUserName() == null) ? 0 : getUserName().hashCode());
return hashCode;
}
@Override
public DescribedUser clone() {
try {
return (DescribedUser) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.transfer.model.transform.DescribedUserMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}