/* * 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.transfer.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 UpdateUserRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* 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. *

*/ private String homeDirectory; /** *

* 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 EFS paths as is in * their file transfer protocol clients. If you set it 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. *

*/ private String homeDirectoryType; /** *

* 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. *

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock down your user to the designated home * directory ("chroot"). To do this, you can set Entry to '/' and set Target * to the HomeDirectory parameter value. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] *

*/ private java.util.List homeDirectoryMappings; /** *

* 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}. *

* *

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use session * policies. *

*

* For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN) * of the policy. You save the policy as a JSON blob and pass it in the Policy argument. *

*

* For an example of a session policy, see Creating a session policy. *

*

* For more information, see AssumeRole in the Amazon * Web Services Security Token Service API Reference. *

*
*/ 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 * Systems (Amazon EFS). The POSIX permissions that are set on files and directories in your file system determines * 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; /** *

* A system-assigned unique identifier for a Transfer Family server instance that the user is assigned to. *

*/ private String serverId; /** *

* A unique string that identifies a user and is associated with a server as specified by the ServerId. * This user name must be a minimum of 3 and a maximum of 100 characters long. The following are valid characters: * a-z, A-Z, 0-9, underscore '_', hyphen '-', period '.', and at sign '@'. The user name can't start with a hyphen, * period, or at sign. *

*/ private String userName; /** *

* 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. *

* * @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. */ 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. *

* * @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. */ 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. *

* * @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. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserRequest withHomeDirectory(String homeDirectory) { setHomeDirectory(homeDirectory); 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 EFS paths as is in * their file transfer protocol clients. If you set it 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. *

* * @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 EFS * paths as is in their file transfer protocol clients. If you set it 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. * @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 EFS paths as is in * their file transfer protocol clients. If you set it 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. *

* * @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 EFS * paths as is in their file transfer protocol clients. If you set it 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. * @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 EFS paths as is in * their file transfer protocol clients. If you set it 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. *

* * @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 EFS * paths as is in their file transfer protocol clients. If you set it 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. * @return Returns a reference to this object so that method calls can be chained together. * @see HomeDirectoryType */ public UpdateUserRequest 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 EFS paths as is in * their file transfer protocol clients. If you set it 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. *

* * @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 EFS * paths as is in their file transfer protocol clients. If you set it 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. * @return Returns a reference to this object so that method calls can be chained together. * @see HomeDirectoryType */ public UpdateUserRequest withHomeDirectoryType(HomeDirectoryType homeDirectoryType) { this.homeDirectoryType = homeDirectoryType.toString(); 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. *

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock down your user to the designated home * directory ("chroot"). To do this, you can set Entry to '/' and set Target * to the HomeDirectory parameter value. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] *

* * @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.

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock down your user to the * designated home directory ("chroot"). To do this, you can set Entry to '/' and * set Target to the HomeDirectory parameter value. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] */ 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. *

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock down your user to the designated home * directory ("chroot"). To do this, you can set Entry to '/' and set Target * to the HomeDirectory parameter value. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] *

* * @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.

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock down your user to the * designated home directory ("chroot"). To do this, you can set Entry to '/' and * set Target to the HomeDirectory parameter value. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] */ 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. *

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock down your user to the designated home * directory ("chroot"). To do this, you can set Entry to '/' and set Target * to the HomeDirectory parameter value. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] *

*

* 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.

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock down your user to the * designated home directory ("chroot"). To do this, you can set Entry to '/' and * set Target to the HomeDirectory parameter value. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserRequest 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. *

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock down your user to the designated home * directory ("chroot"). To do this, you can set Entry to '/' and set Target * to the HomeDirectory parameter value. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] *

* * @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.

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock down your user to the * designated home directory ("chroot"). To do this, you can set Entry to '/' and * set Target to the HomeDirectory parameter value. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserRequest withHomeDirectoryMappings(java.util.Collection homeDirectoryMappings) { setHomeDirectoryMappings(homeDirectoryMappings); 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}. *

* *

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use session * policies. *

*

* For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN) * of the policy. You save the policy as a JSON blob and pass it in the Policy argument. *

*

* For an example of a session policy, see Creating a session policy. *

*

* For more information, see AssumeRole in the Amazon * Web Services Security Token Service API Reference. *

*
* * @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}.

*

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use * session policies. *

*

* For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource * Name (ARN) of the policy. You save the policy as a JSON blob and pass it in the Policy * argument. *

*

* For an example of a session policy, see Creating a session policy. *

*

* For more information, see AssumeRole in the * Amazon Web Services Security Token Service API Reference. *

*/ 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}. *

* *

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use session * policies. *

*

* For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN) * of the policy. You save the policy as a JSON blob and pass it in the Policy argument. *

*

* For an example of a session policy, see Creating a session policy. *

*

* For more information, see AssumeRole in the Amazon * Web Services Security Token Service API Reference. *

*
* * @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}.

*

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use * session policies. *

*

* For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource * Name (ARN) of the policy. You save the policy as a JSON blob and pass it in the Policy * argument. *

*

* For an example of a session policy, see Creating a session * policy. *

*

* For more information, see AssumeRole in the * Amazon Web Services Security Token Service API Reference. *

*/ 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}. *

* *

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use session * policies. *

*

* For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN) * of the policy. You save the policy as a JSON blob and pass it in the Policy argument. *

*

* For an example of a session policy, see Creating a session policy. *

*

* For more information, see AssumeRole in the Amazon * Web Services Security Token Service API Reference. *

*
* * @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}.

*

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use * session policies. *

*

* For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource * Name (ARN) of the policy. You save the policy as a JSON blob and pass it in the Policy * argument. *

*

* For an example of a session policy, see Creating a session policy. *

*

* For more information, see AssumeRole in the * Amazon Web Services Security Token Service API Reference. *

* @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserRequest 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 * Systems (Amazon EFS). The POSIX permissions that are set on files and directories in your file system determines * 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 Systems (Amazon EFS). The POSIX permissions that are set on files and directories in your * file system determines 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 * Systems (Amazon EFS). The POSIX permissions that are set on files and directories in your file system determines * 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 Systems (Amazon EFS). The POSIX permissions that are set on files and directories in your * file system determines 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 * Systems (Amazon EFS). The POSIX permissions that are set on files and directories in your file system determines * 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 Systems (Amazon EFS). The POSIX permissions that are set on files and directories in your * file system determines 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 UpdateUserRequest 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 UpdateUserRequest withRole(String role) { setRole(role); return this; } /** *

* A system-assigned unique identifier for a Transfer Family server instance that the user is assigned to. *

* * @param serverId * A system-assigned unique identifier for a Transfer Family server instance that the user is assigned to. */ public void setServerId(String serverId) { this.serverId = serverId; } /** *

* A system-assigned unique identifier for a Transfer Family server instance that the user is assigned to. *

* * @return A system-assigned unique identifier for a Transfer Family server instance that the user is assigned to. */ public String getServerId() { return this.serverId; } /** *

* A system-assigned unique identifier for a Transfer Family server instance that the user is assigned to. *

* * @param serverId * A system-assigned unique identifier for a Transfer Family server instance that the user is assigned to. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserRequest withServerId(String serverId) { setServerId(serverId); return this; } /** *

* A unique string that identifies a user and is associated with a server as specified by the ServerId. * This user name must be a minimum of 3 and a maximum of 100 characters long. The following are valid characters: * a-z, A-Z, 0-9, underscore '_', hyphen '-', period '.', and at sign '@'. The user name can't start with a hyphen, * period, or at sign. *

* * @param userName * A unique string that identifies a user and is associated with a server as specified by the * ServerId. This user name must be a minimum of 3 and a maximum of 100 characters long. The * following are valid characters: a-z, A-Z, 0-9, underscore '_', hyphen '-', period '.', and at sign '@'. * The user name can't start with a hyphen, period, or at sign. */ public void setUserName(String userName) { this.userName = userName; } /** *

* A unique string that identifies a user and is associated with a server as specified by the ServerId. * This user name must be a minimum of 3 and a maximum of 100 characters long. The following are valid characters: * a-z, A-Z, 0-9, underscore '_', hyphen '-', period '.', and at sign '@'. The user name can't start with a hyphen, * period, or at sign. *

* * @return A unique string that identifies a user and is associated with a server as specified by the * ServerId. This user name must be a minimum of 3 and a maximum of 100 characters long. The * following are valid characters: a-z, A-Z, 0-9, underscore '_', hyphen '-', period '.', and at sign '@'. * The user name can't start with a hyphen, period, or at sign. */ public String getUserName() { return this.userName; } /** *

* A unique string that identifies a user and is associated with a server as specified by the ServerId. * This user name must be a minimum of 3 and a maximum of 100 characters long. The following are valid characters: * a-z, A-Z, 0-9, underscore '_', hyphen '-', period '.', and at sign '@'. The user name can't start with a hyphen, * period, or at sign. *

* * @param userName * A unique string that identifies a user and is associated with a server as specified by the * ServerId. This user name must be a minimum of 3 and a maximum of 100 characters long. The * following are valid characters: a-z, A-Z, 0-9, underscore '_', hyphen '-', period '.', and at sign '@'. * The user name can't start with a hyphen, period, or at sign. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserRequest 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 (getHomeDirectory() != null) sb.append("HomeDirectory: ").append(getHomeDirectory()).append(","); if (getHomeDirectoryType() != null) sb.append("HomeDirectoryType: ").append(getHomeDirectoryType()).append(","); if (getHomeDirectoryMappings() != null) sb.append("HomeDirectoryMappings: ").append(getHomeDirectoryMappings()).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 (getServerId() != null) sb.append("ServerId: ").append(getServerId()).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 UpdateUserRequest == false) return false; UpdateUserRequest other = (UpdateUserRequest) obj; if (other.getHomeDirectory() == null ^ this.getHomeDirectory() == null) return false; if (other.getHomeDirectory() != null && other.getHomeDirectory().equals(this.getHomeDirectory()) == 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.getHomeDirectoryMappings() == null ^ this.getHomeDirectoryMappings() == null) return false; if (other.getHomeDirectoryMappings() != null && other.getHomeDirectoryMappings().equals(this.getHomeDirectoryMappings()) == 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.getServerId() == null ^ this.getServerId() == null) return false; if (other.getServerId() != null && other.getServerId().equals(this.getServerId()) == 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 + ((getHomeDirectory() == null) ? 0 : getHomeDirectory().hashCode()); hashCode = prime * hashCode + ((getHomeDirectoryType() == null) ? 0 : getHomeDirectoryType().hashCode()); hashCode = prime * hashCode + ((getHomeDirectoryMappings() == null) ? 0 : getHomeDirectoryMappings().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 + ((getServerId() == null) ? 0 : getServerId().hashCode()); hashCode = prime * hashCode + ((getUserName() == null) ? 0 : getUserName().hashCode()); return hashCode; } @Override public UpdateUserRequest clone() { return (UpdateUserRequest) super.clone(); } }