/* * 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.outposts.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 StartConnectionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The serial number of the dongle. *
*/ private String deviceSerialNumber; /** ** The ID of the Outpost server. *
*/ private String assetId; /** ** The public key of the client. *
*/ private String clientPublicKey; /** ** The device index of the network interface on the Outpost server. *
*/ private Integer networkInterfaceDeviceIndex; /** ** The serial number of the dongle. *
* * @param deviceSerialNumber * The serial number of the dongle. */ public void setDeviceSerialNumber(String deviceSerialNumber) { this.deviceSerialNumber = deviceSerialNumber; } /** ** The serial number of the dongle. *
* * @return The serial number of the dongle. */ public String getDeviceSerialNumber() { return this.deviceSerialNumber; } /** ** The serial number of the dongle. *
* * @param deviceSerialNumber * The serial number of the dongle. * @return Returns a reference to this object so that method calls can be chained together. */ public StartConnectionRequest withDeviceSerialNumber(String deviceSerialNumber) { setDeviceSerialNumber(deviceSerialNumber); return this; } /** ** The ID of the Outpost server. *
* * @param assetId * The ID of the Outpost server. */ public void setAssetId(String assetId) { this.assetId = assetId; } /** ** The ID of the Outpost server. *
* * @return The ID of the Outpost server. */ public String getAssetId() { return this.assetId; } /** ** The ID of the Outpost server. *
* * @param assetId * The ID of the Outpost server. * @return Returns a reference to this object so that method calls can be chained together. */ public StartConnectionRequest withAssetId(String assetId) { setAssetId(assetId); return this; } /** ** The public key of the client. *
* * @param clientPublicKey * The public key of the client. */ public void setClientPublicKey(String clientPublicKey) { this.clientPublicKey = clientPublicKey; } /** ** The public key of the client. *
* * @return The public key of the client. */ public String getClientPublicKey() { return this.clientPublicKey; } /** ** The public key of the client. *
* * @param clientPublicKey * The public key of the client. * @return Returns a reference to this object so that method calls can be chained together. */ public StartConnectionRequest withClientPublicKey(String clientPublicKey) { setClientPublicKey(clientPublicKey); return this; } /** ** The device index of the network interface on the Outpost server. *
* * @param networkInterfaceDeviceIndex * The device index of the network interface on the Outpost server. */ public void setNetworkInterfaceDeviceIndex(Integer networkInterfaceDeviceIndex) { this.networkInterfaceDeviceIndex = networkInterfaceDeviceIndex; } /** ** The device index of the network interface on the Outpost server. *
* * @return The device index of the network interface on the Outpost server. */ public Integer getNetworkInterfaceDeviceIndex() { return this.networkInterfaceDeviceIndex; } /** ** The device index of the network interface on the Outpost server. *
* * @param networkInterfaceDeviceIndex * The device index of the network interface on the Outpost server. * @return Returns a reference to this object so that method calls can be chained together. */ public StartConnectionRequest withNetworkInterfaceDeviceIndex(Integer networkInterfaceDeviceIndex) { setNetworkInterfaceDeviceIndex(networkInterfaceDeviceIndex); 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 (getDeviceSerialNumber() != null) sb.append("DeviceSerialNumber: ").append(getDeviceSerialNumber()).append(","); if (getAssetId() != null) sb.append("AssetId: ").append(getAssetId()).append(","); if (getClientPublicKey() != null) sb.append("ClientPublicKey: ").append(getClientPublicKey()).append(","); if (getNetworkInterfaceDeviceIndex() != null) sb.append("NetworkInterfaceDeviceIndex: ").append(getNetworkInterfaceDeviceIndex()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartConnectionRequest == false) return false; StartConnectionRequest other = (StartConnectionRequest) obj; if (other.getDeviceSerialNumber() == null ^ this.getDeviceSerialNumber() == null) return false; if (other.getDeviceSerialNumber() != null && other.getDeviceSerialNumber().equals(this.getDeviceSerialNumber()) == false) return false; if (other.getAssetId() == null ^ this.getAssetId() == null) return false; if (other.getAssetId() != null && other.getAssetId().equals(this.getAssetId()) == false) return false; if (other.getClientPublicKey() == null ^ this.getClientPublicKey() == null) return false; if (other.getClientPublicKey() != null && other.getClientPublicKey().equals(this.getClientPublicKey()) == false) return false; if (other.getNetworkInterfaceDeviceIndex() == null ^ this.getNetworkInterfaceDeviceIndex() == null) return false; if (other.getNetworkInterfaceDeviceIndex() != null && other.getNetworkInterfaceDeviceIndex().equals(this.getNetworkInterfaceDeviceIndex()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDeviceSerialNumber() == null) ? 0 : getDeviceSerialNumber().hashCode()); hashCode = prime * hashCode + ((getAssetId() == null) ? 0 : getAssetId().hashCode()); hashCode = prime * hashCode + ((getClientPublicKey() == null) ? 0 : getClientPublicKey().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaceDeviceIndex() == null) ? 0 : getNetworkInterfaceDeviceIndex().hashCode()); return hashCode; } @Override public StartConnectionRequest clone() { return (StartConnectionRequest) super.clone(); } }