All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.transfer.model.DescribedAgreement Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Transfer for SFTP module holds the client classes that are used for communicating with AWS Transfer for SFTP Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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 an agreement. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DescribedAgreement implements Serializable, Cloneable, StructuredPojo { /** *

* The unique Amazon Resource Name (ARN) for the agreement. *

*/ private String arn; /** *

* A unique identifier for the agreement. This identifier is returned when you create an agreement. *

*/ private String agreementId; /** *

* The name or short description that's used to identify the agreement. *

*/ private String description; /** *

* The current status of the agreement, either ACTIVE or INACTIVE. *

*/ private String status; /** *

* A system-assigned unique identifier for a server instance. This identifier indicates the specific server that the * agreement uses. *

*/ private String serverId; /** *

* A unique identifier for the AS2 local profile. *

*/ private String localProfileId; /** *

* A unique identifier for the partner profile used in the agreement. *

*/ private String partnerProfileId; /** *

* The landing directory (folder) for files that are transferred by using the AS2 protocol. *

*/ private String baseDirectory; /** *

* Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon * Resource Name (ARN) of the Identity and Access Management role to use. *

*

* For AS2 connectors *

*

* With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the * request parameter, SendFilePaths. We use the file’s parent directory (for example, for * --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to * temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a * final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to * provide read and write access to the parent directory of the file location used in the * StartFileTransfer request. Additionally, you need to provide read and write access to the parent * directory of the files that you intend to send with StartFileTransfer. *

*

* If you are using Basic authentication for your AS2 connector, the access role requires the * secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a * customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs * the kms:Decrypt permission for that key. *

*

* For SFTP connectors *

*

* Make sure that the access role provides read and write access to the parent directory of the file location that's * used in the StartFileTransfer request. Additionally, make sure that the role provides * secretsmanager:GetSecretValue permission to Secrets Manager. *

*/ private String accessRole; /** *

* Key-value pairs that can be used to group and search for agreements. *

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

* The unique Amazon Resource Name (ARN) for the agreement. *

* * @param arn * The unique Amazon Resource Name (ARN) for the agreement. */ public void setArn(String arn) { this.arn = arn; } /** *

* The unique Amazon Resource Name (ARN) for the agreement. *

* * @return The unique Amazon Resource Name (ARN) for the agreement. */ public String getArn() { return this.arn; } /** *

* The unique Amazon Resource Name (ARN) for the agreement. *

* * @param arn * The unique Amazon Resource Name (ARN) for the agreement. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedAgreement withArn(String arn) { setArn(arn); return this; } /** *

* A unique identifier for the agreement. This identifier is returned when you create an agreement. *

* * @param agreementId * A unique identifier for the agreement. This identifier is returned when you create an agreement. */ public void setAgreementId(String agreementId) { this.agreementId = agreementId; } /** *

* A unique identifier for the agreement. This identifier is returned when you create an agreement. *

* * @return A unique identifier for the agreement. This identifier is returned when you create an agreement. */ public String getAgreementId() { return this.agreementId; } /** *

* A unique identifier for the agreement. This identifier is returned when you create an agreement. *

* * @param agreementId * A unique identifier for the agreement. This identifier is returned when you create an agreement. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedAgreement withAgreementId(String agreementId) { setAgreementId(agreementId); return this; } /** *

* The name or short description that's used to identify the agreement. *

* * @param description * The name or short description that's used to identify the agreement. */ public void setDescription(String description) { this.description = description; } /** *

* The name or short description that's used to identify the agreement. *

* * @return The name or short description that's used to identify the agreement. */ public String getDescription() { return this.description; } /** *

* The name or short description that's used to identify the agreement. *

* * @param description * The name or short description that's used to identify the agreement. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedAgreement withDescription(String description) { setDescription(description); return this; } /** *

* The current status of the agreement, either ACTIVE or INACTIVE. *

* * @param status * The current status of the agreement, either ACTIVE or INACTIVE. * @see AgreementStatusType */ public void setStatus(String status) { this.status = status; } /** *

* The current status of the agreement, either ACTIVE or INACTIVE. *

* * @return The current status of the agreement, either ACTIVE or INACTIVE. * @see AgreementStatusType */ public String getStatus() { return this.status; } /** *

* The current status of the agreement, either ACTIVE or INACTIVE. *

* * @param status * The current status of the agreement, either ACTIVE or INACTIVE. * @return Returns a reference to this object so that method calls can be chained together. * @see AgreementStatusType */ public DescribedAgreement withStatus(String status) { setStatus(status); return this; } /** *

* The current status of the agreement, either ACTIVE or INACTIVE. *

* * @param status * The current status of the agreement, either ACTIVE or INACTIVE. * @return Returns a reference to this object so that method calls can be chained together. * @see AgreementStatusType */ public DescribedAgreement withStatus(AgreementStatusType status) { this.status = status.toString(); return this; } /** *

* A system-assigned unique identifier for a server instance. This identifier indicates the specific server that the * agreement uses. *

* * @param serverId * A system-assigned unique identifier for a server instance. This identifier indicates the specific server * that the agreement uses. */ public void setServerId(String serverId) { this.serverId = serverId; } /** *

* A system-assigned unique identifier for a server instance. This identifier indicates the specific server that the * agreement uses. *

* * @return A system-assigned unique identifier for a server instance. This identifier indicates the specific server * that the agreement uses. */ public String getServerId() { return this.serverId; } /** *

* A system-assigned unique identifier for a server instance. This identifier indicates the specific server that the * agreement uses. *

* * @param serverId * A system-assigned unique identifier for a server instance. This identifier indicates the specific server * that the agreement uses. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedAgreement withServerId(String serverId) { setServerId(serverId); return this; } /** *

* A unique identifier for the AS2 local profile. *

* * @param localProfileId * A unique identifier for the AS2 local profile. */ public void setLocalProfileId(String localProfileId) { this.localProfileId = localProfileId; } /** *

* A unique identifier for the AS2 local profile. *

* * @return A unique identifier for the AS2 local profile. */ public String getLocalProfileId() { return this.localProfileId; } /** *

* A unique identifier for the AS2 local profile. *

* * @param localProfileId * A unique identifier for the AS2 local profile. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedAgreement withLocalProfileId(String localProfileId) { setLocalProfileId(localProfileId); return this; } /** *

* A unique identifier for the partner profile used in the agreement. *

* * @param partnerProfileId * A unique identifier for the partner profile used in the agreement. */ public void setPartnerProfileId(String partnerProfileId) { this.partnerProfileId = partnerProfileId; } /** *

* A unique identifier for the partner profile used in the agreement. *

* * @return A unique identifier for the partner profile used in the agreement. */ public String getPartnerProfileId() { return this.partnerProfileId; } /** *

* A unique identifier for the partner profile used in the agreement. *

* * @param partnerProfileId * A unique identifier for the partner profile used in the agreement. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedAgreement withPartnerProfileId(String partnerProfileId) { setPartnerProfileId(partnerProfileId); return this; } /** *

* The landing directory (folder) for files that are transferred by using the AS2 protocol. *

* * @param baseDirectory * The landing directory (folder) for files that are transferred by using the AS2 protocol. */ public void setBaseDirectory(String baseDirectory) { this.baseDirectory = baseDirectory; } /** *

* The landing directory (folder) for files that are transferred by using the AS2 protocol. *

* * @return The landing directory (folder) for files that are transferred by using the AS2 protocol. */ public String getBaseDirectory() { return this.baseDirectory; } /** *

* The landing directory (folder) for files that are transferred by using the AS2 protocol. *

* * @param baseDirectory * The landing directory (folder) for files that are transferred by using the AS2 protocol. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedAgreement withBaseDirectory(String baseDirectory) { setBaseDirectory(baseDirectory); return this; } /** *

* Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon * Resource Name (ARN) of the Identity and Access Management role to use. *

*

* For AS2 connectors *

*

* With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the * request parameter, SendFilePaths. We use the file’s parent directory (for example, for * --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to * temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a * final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to * provide read and write access to the parent directory of the file location used in the * StartFileTransfer request. Additionally, you need to provide read and write access to the parent * directory of the files that you intend to send with StartFileTransfer. *

*

* If you are using Basic authentication for your AS2 connector, the access role requires the * secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a * customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs * the kms:Decrypt permission for that key. *

*

* For SFTP connectors *

*

* Make sure that the access role provides read and write access to the parent directory of the file location that's * used in the StartFileTransfer request. Additionally, make sure that the role provides * secretsmanager:GetSecretValue permission to Secrets Manager. *

* * @param accessRole * Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the * Amazon Resource Name (ARN) of the Identity and Access Management role to use.

*

* For AS2 connectors *

*

* With AS2, you can send files by calling StartFileTransfer and specifying the file paths in * the request parameter, SendFilePaths. We use the file’s parent directory (for example, for * --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to * temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and * write a final JSON file containing relevant metadata of the transmission. So, the AccessRole * needs to provide read and write access to the parent directory of the file location used in the * StartFileTransfer request. Additionally, you need to provide read and write access to the * parent directory of the files that you intend to send with StartFileTransfer. *

*

* If you are using Basic authentication for your AS2 connector, the access role requires the * secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a * customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also * needs the kms:Decrypt permission for that key. *

*

* For SFTP connectors *

*

* Make sure that the access role provides read and write access to the parent directory of the file location * that's used in the StartFileTransfer request. Additionally, make sure that the role provides * secretsmanager:GetSecretValue permission to Secrets Manager. */ public void setAccessRole(String accessRole) { this.accessRole = accessRole; } /** *

* Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon * Resource Name (ARN) of the Identity and Access Management role to use. *

*

* For AS2 connectors *

*

* With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the * request parameter, SendFilePaths. We use the file’s parent directory (for example, for * --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to * temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a * final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to * provide read and write access to the parent directory of the file location used in the * StartFileTransfer request. Additionally, you need to provide read and write access to the parent * directory of the files that you intend to send with StartFileTransfer. *

*

* If you are using Basic authentication for your AS2 connector, the access role requires the * secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a * customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs * the kms:Decrypt permission for that key. *

*

* For SFTP connectors *

*

* Make sure that the access role provides read and write access to the parent directory of the file location that's * used in the StartFileTransfer request. Additionally, make sure that the role provides * secretsmanager:GetSecretValue permission to Secrets Manager. *

* * @return Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the * Amazon Resource Name (ARN) of the Identity and Access Management role to use.

*

* For AS2 connectors *

*

* With AS2, you can send files by calling StartFileTransfer and specifying the file paths in * the request parameter, SendFilePaths. We use the file’s parent directory (for example, for * --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to * temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and * write a final JSON file containing relevant metadata of the transmission. So, the AccessRole * needs to provide read and write access to the parent directory of the file location used in the * StartFileTransfer request. Additionally, you need to provide read and write access to the * parent directory of the files that you intend to send with StartFileTransfer. *

*

* If you are using Basic authentication for your AS2 connector, the access role requires the * secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a * customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role * also needs the kms:Decrypt permission for that key. *

*

* For SFTP connectors *

*

* Make sure that the access role provides read and write access to the parent directory of the file * location that's used in the StartFileTransfer request. Additionally, make sure that the role * provides secretsmanager:GetSecretValue permission to Secrets Manager. */ public String getAccessRole() { return this.accessRole; } /** *

* Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon * Resource Name (ARN) of the Identity and Access Management role to use. *

*

* For AS2 connectors *

*

* With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the * request parameter, SendFilePaths. We use the file’s parent directory (for example, for * --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to * temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a * final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to * provide read and write access to the parent directory of the file location used in the * StartFileTransfer request. Additionally, you need to provide read and write access to the parent * directory of the files that you intend to send with StartFileTransfer. *

*

* If you are using Basic authentication for your AS2 connector, the access role requires the * secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a * customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs * the kms:Decrypt permission for that key. *

*

* For SFTP connectors *

*

* Make sure that the access role provides read and write access to the parent directory of the file location that's * used in the StartFileTransfer request. Additionally, make sure that the role provides * secretsmanager:GetSecretValue permission to Secrets Manager. *

* * @param accessRole * Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the * Amazon Resource Name (ARN) of the Identity and Access Management role to use.

*

* For AS2 connectors *

*

* With AS2, you can send files by calling StartFileTransfer and specifying the file paths in * the request parameter, SendFilePaths. We use the file’s parent directory (for example, for * --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to * temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and * write a final JSON file containing relevant metadata of the transmission. So, the AccessRole * needs to provide read and write access to the parent directory of the file location used in the * StartFileTransfer request. Additionally, you need to provide read and write access to the * parent directory of the files that you intend to send with StartFileTransfer. *

*

* If you are using Basic authentication for your AS2 connector, the access role requires the * secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a * customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also * needs the kms:Decrypt permission for that key. *

*

* For SFTP connectors *

*

* Make sure that the access role provides read and write access to the parent directory of the file location * that's used in the StartFileTransfer request. Additionally, make sure that the role provides * secretsmanager:GetSecretValue permission to Secrets Manager. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedAgreement withAccessRole(String accessRole) { setAccessRole(accessRole); return this; } /** *

* Key-value pairs that can be used to group and search for agreements. *

* * @return Key-value pairs that can be used to group and search for agreements. */ public java.util.List getTags() { return tags; } /** *

* Key-value pairs that can be used to group and search for agreements. *

* * @param tags * Key-value pairs that can be used to group and search for agreements. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* Key-value pairs that can be used to group and search for agreements. *

*

* 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 * Key-value pairs that can be used to group and search for agreements. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedAgreement withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* Key-value pairs that can be used to group and search for agreements. *

* * @param tags * Key-value pairs that can be used to group and search for agreements. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedAgreement withTags(java.util.Collection tags) { setTags(tags); 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 (getAgreementId() != null) sb.append("AgreementId: ").append(getAgreementId()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getServerId() != null) sb.append("ServerId: ").append(getServerId()).append(","); if (getLocalProfileId() != null) sb.append("LocalProfileId: ").append(getLocalProfileId()).append(","); if (getPartnerProfileId() != null) sb.append("PartnerProfileId: ").append(getPartnerProfileId()).append(","); if (getBaseDirectory() != null) sb.append("BaseDirectory: ").append(getBaseDirectory()).append(","); if (getAccessRole() != null) sb.append("AccessRole: ").append(getAccessRole()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribedAgreement == false) return false; DescribedAgreement other = (DescribedAgreement) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getAgreementId() == null ^ this.getAgreementId() == null) return false; if (other.getAgreementId() != null && other.getAgreementId().equals(this.getAgreementId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == 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.getLocalProfileId() == null ^ this.getLocalProfileId() == null) return false; if (other.getLocalProfileId() != null && other.getLocalProfileId().equals(this.getLocalProfileId()) == false) return false; if (other.getPartnerProfileId() == null ^ this.getPartnerProfileId() == null) return false; if (other.getPartnerProfileId() != null && other.getPartnerProfileId().equals(this.getPartnerProfileId()) == false) return false; if (other.getBaseDirectory() == null ^ this.getBaseDirectory() == null) return false; if (other.getBaseDirectory() != null && other.getBaseDirectory().equals(this.getBaseDirectory()) == false) return false; if (other.getAccessRole() == null ^ this.getAccessRole() == null) return false; if (other.getAccessRole() != null && other.getAccessRole().equals(this.getAccessRole()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == 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 + ((getAgreementId() == null) ? 0 : getAgreementId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getServerId() == null) ? 0 : getServerId().hashCode()); hashCode = prime * hashCode + ((getLocalProfileId() == null) ? 0 : getLocalProfileId().hashCode()); hashCode = prime * hashCode + ((getPartnerProfileId() == null) ? 0 : getPartnerProfileId().hashCode()); hashCode = prime * hashCode + ((getBaseDirectory() == null) ? 0 : getBaseDirectory().hashCode()); hashCode = prime * hashCode + ((getAccessRole() == null) ? 0 : getAccessRole().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public DescribedAgreement clone() { try { return (DescribedAgreement) 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.DescribedAgreementMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy