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

com.amazonaws.services.databasemigrationservice.model.DatabaseResponse Maven / Gradle / Ivy

/*
 * 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.databasemigrationservice.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes a database in a Fleet Advisor collector inventory. *

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

* The ID of a database in a Fleet Advisor collector inventory. *

*/ private String databaseId; /** *

* The name of a database in a Fleet Advisor collector inventory. *

*/ private String databaseName; /** *

* The IP address of a database in a Fleet Advisor collector inventory. *

*/ private String ipAddress; /** *

* The number of schemas in a Fleet Advisor collector inventory database. *

*/ private Long numberOfSchemas; /** *

* The server name of a database in a Fleet Advisor collector inventory. *

*/ private ServerShortInfoResponse server; /** *

* The software details of a database in a Fleet Advisor collector inventory, such as database engine and version. *

*/ private DatabaseInstanceSoftwareDetailsResponse softwareDetails; /** *

* A list of collectors associated with the database. *

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

* The ID of a database in a Fleet Advisor collector inventory. *

* * @param databaseId * The ID of a database in a Fleet Advisor collector inventory. */ public void setDatabaseId(String databaseId) { this.databaseId = databaseId; } /** *

* The ID of a database in a Fleet Advisor collector inventory. *

* * @return The ID of a database in a Fleet Advisor collector inventory. */ public String getDatabaseId() { return this.databaseId; } /** *

* The ID of a database in a Fleet Advisor collector inventory. *

* * @param databaseId * The ID of a database in a Fleet Advisor collector inventory. * @return Returns a reference to this object so that method calls can be chained together. */ public DatabaseResponse withDatabaseId(String databaseId) { setDatabaseId(databaseId); return this; } /** *

* The name of a database in a Fleet Advisor collector inventory. *

* * @param databaseName * The name of a database in a Fleet Advisor collector inventory. */ public void setDatabaseName(String databaseName) { this.databaseName = databaseName; } /** *

* The name of a database in a Fleet Advisor collector inventory. *

* * @return The name of a database in a Fleet Advisor collector inventory. */ public String getDatabaseName() { return this.databaseName; } /** *

* The name of a database in a Fleet Advisor collector inventory. *

* * @param databaseName * The name of a database in a Fleet Advisor collector inventory. * @return Returns a reference to this object so that method calls can be chained together. */ public DatabaseResponse withDatabaseName(String databaseName) { setDatabaseName(databaseName); return this; } /** *

* The IP address of a database in a Fleet Advisor collector inventory. *

* * @param ipAddress * The IP address of a database in a Fleet Advisor collector inventory. */ public void setIpAddress(String ipAddress) { this.ipAddress = ipAddress; } /** *

* The IP address of a database in a Fleet Advisor collector inventory. *

* * @return The IP address of a database in a Fleet Advisor collector inventory. */ public String getIpAddress() { return this.ipAddress; } /** *

* The IP address of a database in a Fleet Advisor collector inventory. *

* * @param ipAddress * The IP address of a database in a Fleet Advisor collector inventory. * @return Returns a reference to this object so that method calls can be chained together. */ public DatabaseResponse withIpAddress(String ipAddress) { setIpAddress(ipAddress); return this; } /** *

* The number of schemas in a Fleet Advisor collector inventory database. *

* * @param numberOfSchemas * The number of schemas in a Fleet Advisor collector inventory database. */ public void setNumberOfSchemas(Long numberOfSchemas) { this.numberOfSchemas = numberOfSchemas; } /** *

* The number of schemas in a Fleet Advisor collector inventory database. *

* * @return The number of schemas in a Fleet Advisor collector inventory database. */ public Long getNumberOfSchemas() { return this.numberOfSchemas; } /** *

* The number of schemas in a Fleet Advisor collector inventory database. *

* * @param numberOfSchemas * The number of schemas in a Fleet Advisor collector inventory database. * @return Returns a reference to this object so that method calls can be chained together. */ public DatabaseResponse withNumberOfSchemas(Long numberOfSchemas) { setNumberOfSchemas(numberOfSchemas); return this; } /** *

* The server name of a database in a Fleet Advisor collector inventory. *

* * @param server * The server name of a database in a Fleet Advisor collector inventory. */ public void setServer(ServerShortInfoResponse server) { this.server = server; } /** *

* The server name of a database in a Fleet Advisor collector inventory. *

* * @return The server name of a database in a Fleet Advisor collector inventory. */ public ServerShortInfoResponse getServer() { return this.server; } /** *

* The server name of a database in a Fleet Advisor collector inventory. *

* * @param server * The server name of a database in a Fleet Advisor collector inventory. * @return Returns a reference to this object so that method calls can be chained together. */ public DatabaseResponse withServer(ServerShortInfoResponse server) { setServer(server); return this; } /** *

* The software details of a database in a Fleet Advisor collector inventory, such as database engine and version. *

* * @param softwareDetails * The software details of a database in a Fleet Advisor collector inventory, such as database engine and * version. */ public void setSoftwareDetails(DatabaseInstanceSoftwareDetailsResponse softwareDetails) { this.softwareDetails = softwareDetails; } /** *

* The software details of a database in a Fleet Advisor collector inventory, such as database engine and version. *

* * @return The software details of a database in a Fleet Advisor collector inventory, such as database engine and * version. */ public DatabaseInstanceSoftwareDetailsResponse getSoftwareDetails() { return this.softwareDetails; } /** *

* The software details of a database in a Fleet Advisor collector inventory, such as database engine and version. *

* * @param softwareDetails * The software details of a database in a Fleet Advisor collector inventory, such as database engine and * version. * @return Returns a reference to this object so that method calls can be chained together. */ public DatabaseResponse withSoftwareDetails(DatabaseInstanceSoftwareDetailsResponse softwareDetails) { setSoftwareDetails(softwareDetails); return this; } /** *

* A list of collectors associated with the database. *

* * @return A list of collectors associated with the database. */ public java.util.List getCollectors() { return collectors; } /** *

* A list of collectors associated with the database. *

* * @param collectors * A list of collectors associated with the database. */ public void setCollectors(java.util.Collection collectors) { if (collectors == null) { this.collectors = null; return; } this.collectors = new java.util.ArrayList(collectors); } /** *

* A list of collectors associated with the database. *

*

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

* * @param collectors * A list of collectors associated with the database. * @return Returns a reference to this object so that method calls can be chained together. */ public DatabaseResponse withCollectors(CollectorShortInfoResponse... collectors) { if (this.collectors == null) { setCollectors(new java.util.ArrayList(collectors.length)); } for (CollectorShortInfoResponse ele : collectors) { this.collectors.add(ele); } return this; } /** *

* A list of collectors associated with the database. *

* * @param collectors * A list of collectors associated with the database. * @return Returns a reference to this object so that method calls can be chained together. */ public DatabaseResponse withCollectors(java.util.Collection collectors) { setCollectors(collectors); 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 (getDatabaseId() != null) sb.append("DatabaseId: ").append(getDatabaseId()).append(","); if (getDatabaseName() != null) sb.append("DatabaseName: ").append(getDatabaseName()).append(","); if (getIpAddress() != null) sb.append("IpAddress: ").append(getIpAddress()).append(","); if (getNumberOfSchemas() != null) sb.append("NumberOfSchemas: ").append(getNumberOfSchemas()).append(","); if (getServer() != null) sb.append("Server: ").append(getServer()).append(","); if (getSoftwareDetails() != null) sb.append("SoftwareDetails: ").append(getSoftwareDetails()).append(","); if (getCollectors() != null) sb.append("Collectors: ").append(getCollectors()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DatabaseResponse == false) return false; DatabaseResponse other = (DatabaseResponse) obj; if (other.getDatabaseId() == null ^ this.getDatabaseId() == null) return false; if (other.getDatabaseId() != null && other.getDatabaseId().equals(this.getDatabaseId()) == false) return false; if (other.getDatabaseName() == null ^ this.getDatabaseName() == null) return false; if (other.getDatabaseName() != null && other.getDatabaseName().equals(this.getDatabaseName()) == false) return false; if (other.getIpAddress() == null ^ this.getIpAddress() == null) return false; if (other.getIpAddress() != null && other.getIpAddress().equals(this.getIpAddress()) == false) return false; if (other.getNumberOfSchemas() == null ^ this.getNumberOfSchemas() == null) return false; if (other.getNumberOfSchemas() != null && other.getNumberOfSchemas().equals(this.getNumberOfSchemas()) == false) return false; if (other.getServer() == null ^ this.getServer() == null) return false; if (other.getServer() != null && other.getServer().equals(this.getServer()) == false) return false; if (other.getSoftwareDetails() == null ^ this.getSoftwareDetails() == null) return false; if (other.getSoftwareDetails() != null && other.getSoftwareDetails().equals(this.getSoftwareDetails()) == false) return false; if (other.getCollectors() == null ^ this.getCollectors() == null) return false; if (other.getCollectors() != null && other.getCollectors().equals(this.getCollectors()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDatabaseId() == null) ? 0 : getDatabaseId().hashCode()); hashCode = prime * hashCode + ((getDatabaseName() == null) ? 0 : getDatabaseName().hashCode()); hashCode = prime * hashCode + ((getIpAddress() == null) ? 0 : getIpAddress().hashCode()); hashCode = prime * hashCode + ((getNumberOfSchemas() == null) ? 0 : getNumberOfSchemas().hashCode()); hashCode = prime * hashCode + ((getServer() == null) ? 0 : getServer().hashCode()); hashCode = prime * hashCode + ((getSoftwareDetails() == null) ? 0 : getSoftwareDetails().hashCode()); hashCode = prime * hashCode + ((getCollectors() == null) ? 0 : getCollectors().hashCode()); return hashCode; } @Override public DatabaseResponse clone() { try { return (DatabaseResponse) 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.databasemigrationservice.model.transform.DatabaseResponseMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy