com.amazonaws.services.ec2.model.MediaDeviceInfo Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 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.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* Describes the media accelerators for the instance type.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class MediaDeviceInfo implements Serializable, Cloneable {
/**
*
* The number of media accelerators for the instance type.
*
*/
private Integer count;
/**
*
* The name of the media accelerator.
*
*/
private String name;
/**
*
* The manufacturer of the media accelerator.
*
*/
private String manufacturer;
/**
*
* Describes the memory available to the media accelerator.
*
*/
private MediaDeviceMemoryInfo memoryInfo;
/**
*
* The number of media accelerators for the instance type.
*
*
* @param count
* The number of media accelerators for the instance type.
*/
public void setCount(Integer count) {
this.count = count;
}
/**
*
* The number of media accelerators for the instance type.
*
*
* @return The number of media accelerators for the instance type.
*/
public Integer getCount() {
return this.count;
}
/**
*
* The number of media accelerators for the instance type.
*
*
* @param count
* The number of media accelerators for the instance type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MediaDeviceInfo withCount(Integer count) {
setCount(count);
return this;
}
/**
*
* The name of the media accelerator.
*
*
* @param name
* The name of the media accelerator.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the media accelerator.
*
*
* @return The name of the media accelerator.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the media accelerator.
*
*
* @param name
* The name of the media accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MediaDeviceInfo withName(String name) {
setName(name);
return this;
}
/**
*
* The manufacturer of the media accelerator.
*
*
* @param manufacturer
* The manufacturer of the media accelerator.
*/
public void setManufacturer(String manufacturer) {
this.manufacturer = manufacturer;
}
/**
*
* The manufacturer of the media accelerator.
*
*
* @return The manufacturer of the media accelerator.
*/
public String getManufacturer() {
return this.manufacturer;
}
/**
*
* The manufacturer of the media accelerator.
*
*
* @param manufacturer
* The manufacturer of the media accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MediaDeviceInfo withManufacturer(String manufacturer) {
setManufacturer(manufacturer);
return this;
}
/**
*
* Describes the memory available to the media accelerator.
*
*
* @param memoryInfo
* Describes the memory available to the media accelerator.
*/
public void setMemoryInfo(MediaDeviceMemoryInfo memoryInfo) {
this.memoryInfo = memoryInfo;
}
/**
*
* Describes the memory available to the media accelerator.
*
*
* @return Describes the memory available to the media accelerator.
*/
public MediaDeviceMemoryInfo getMemoryInfo() {
return this.memoryInfo;
}
/**
*
* Describes the memory available to the media accelerator.
*
*
* @param memoryInfo
* Describes the memory available to the media accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MediaDeviceInfo withMemoryInfo(MediaDeviceMemoryInfo memoryInfo) {
setMemoryInfo(memoryInfo);
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 (getCount() != null)
sb.append("Count: ").append(getCount()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getManufacturer() != null)
sb.append("Manufacturer: ").append(getManufacturer()).append(",");
if (getMemoryInfo() != null)
sb.append("MemoryInfo: ").append(getMemoryInfo());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof MediaDeviceInfo == false)
return false;
MediaDeviceInfo other = (MediaDeviceInfo) obj;
if (other.getCount() == null ^ this.getCount() == null)
return false;
if (other.getCount() != null && other.getCount().equals(this.getCount()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getManufacturer() == null ^ this.getManufacturer() == null)
return false;
if (other.getManufacturer() != null && other.getManufacturer().equals(this.getManufacturer()) == false)
return false;
if (other.getMemoryInfo() == null ^ this.getMemoryInfo() == null)
return false;
if (other.getMemoryInfo() != null && other.getMemoryInfo().equals(this.getMemoryInfo()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCount() == null) ? 0 : getCount().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getManufacturer() == null) ? 0 : getManufacturer().hashCode());
hashCode = prime * hashCode + ((getMemoryInfo() == null) ? 0 : getMemoryInfo().hashCode());
return hashCode;
}
@Override
public MediaDeviceInfo clone() {
try {
return (MediaDeviceInfo) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}