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

* The name of the fleet the devices belong to. *

*/ private String deviceFleetName; /** *

* List of devices to register with Edge Manager agent. *

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

* The name of the fleet the devices belong to. *

* * @param deviceFleetName * The name of the fleet the devices belong to. */ public void setDeviceFleetName(String deviceFleetName) { this.deviceFleetName = deviceFleetName; } /** *

* The name of the fleet the devices belong to. *

* * @return The name of the fleet the devices belong to. */ public String getDeviceFleetName() { return this.deviceFleetName; } /** *

* The name of the fleet the devices belong to. *

* * @param deviceFleetName * The name of the fleet the devices belong to. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateDevicesRequest withDeviceFleetName(String deviceFleetName) { setDeviceFleetName(deviceFleetName); return this; } /** *

* List of devices to register with Edge Manager agent. *

* * @return List of devices to register with Edge Manager agent. */ public java.util.List getDevices() { return devices; } /** *

* List of devices to register with Edge Manager agent. *

* * @param devices * List of devices to register with Edge Manager agent. */ public void setDevices(java.util.Collection devices) { if (devices == null) { this.devices = null; return; } this.devices = new java.util.ArrayList(devices); } /** *

* List of devices to register with Edge Manager agent. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setDevices(java.util.Collection)} or {@link #withDevices(java.util.Collection)} if you want to override * the existing values. *

* * @param devices * List of devices to register with Edge Manager agent. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateDevicesRequest withDevices(Device... devices) { if (this.devices == null) { setDevices(new java.util.ArrayList(devices.length)); } for (Device ele : devices) { this.devices.add(ele); } return this; } /** *

* List of devices to register with Edge Manager agent. *

* * @param devices * List of devices to register with Edge Manager agent. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateDevicesRequest withDevices(java.util.Collection devices) { setDevices(devices); 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 (getDeviceFleetName() != null) sb.append("DeviceFleetName: ").append(getDeviceFleetName()).append(","); if (getDevices() != null) sb.append("Devices: ").append(getDevices()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateDevicesRequest == false) return false; UpdateDevicesRequest other = (UpdateDevicesRequest) obj; if (other.getDeviceFleetName() == null ^ this.getDeviceFleetName() == null) return false; if (other.getDeviceFleetName() != null && other.getDeviceFleetName().equals(this.getDeviceFleetName()) == false) return false; if (other.getDevices() == null ^ this.getDevices() == null) return false; if (other.getDevices() != null && other.getDevices().equals(this.getDevices()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDeviceFleetName() == null) ? 0 : getDeviceFleetName().hashCode()); hashCode = prime * hashCode + ((getDevices() == null) ? 0 : getDevices().hashCode()); return hashCode; } @Override public UpdateDevicesRequest clone() { return (UpdateDevicesRequest) super.clone(); } }