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

software.amazon.awssdk.services.databasemigration.model.DatabaseInstanceSoftwareDetailsResponse Maven / Gradle / Ivy

/*
 * Copyright 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 software.amazon.awssdk.services.databasemigration.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Describes an inventory database instance for a Fleet Advisor collector. *

*/ @Generated("software.amazon.awssdk:codegen") public final class DatabaseInstanceSoftwareDetailsResponse implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ENGINE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Engine") .getter(getter(DatabaseInstanceSoftwareDetailsResponse::engine)).setter(setter(Builder::engine)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Engine").build()).build(); private static final SdkField ENGINE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EngineVersion").getter(getter(DatabaseInstanceSoftwareDetailsResponse::engineVersion)) .setter(setter(Builder::engineVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EngineVersion").build()).build(); private static final SdkField ENGINE_EDITION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EngineEdition").getter(getter(DatabaseInstanceSoftwareDetailsResponse::engineEdition)) .setter(setter(Builder::engineEdition)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EngineEdition").build()).build(); private static final SdkField SERVICE_PACK_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ServicePack").getter(getter(DatabaseInstanceSoftwareDetailsResponse::servicePack)) .setter(setter(Builder::servicePack)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServicePack").build()).build(); private static final SdkField SUPPORT_LEVEL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("SupportLevel").getter(getter(DatabaseInstanceSoftwareDetailsResponse::supportLevel)) .setter(setter(Builder::supportLevel)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SupportLevel").build()).build(); private static final SdkField OS_ARCHITECTURE_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("OsArchitecture").getter(getter(DatabaseInstanceSoftwareDetailsResponse::osArchitecture)) .setter(setter(Builder::osArchitecture)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OsArchitecture").build()).build(); private static final SdkField TOOLTIP_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Tooltip") .getter(getter(DatabaseInstanceSoftwareDetailsResponse::tooltip)).setter(setter(Builder::tooltip)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tooltip").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ENGINE_FIELD, ENGINE_VERSION_FIELD, ENGINE_EDITION_FIELD, SERVICE_PACK_FIELD, SUPPORT_LEVEL_FIELD, OS_ARCHITECTURE_FIELD, TOOLTIP_FIELD)); private static final long serialVersionUID = 1L; private final String engine; private final String engineVersion; private final String engineEdition; private final String servicePack; private final String supportLevel; private final Integer osArchitecture; private final String tooltip; private DatabaseInstanceSoftwareDetailsResponse(BuilderImpl builder) { this.engine = builder.engine; this.engineVersion = builder.engineVersion; this.engineEdition = builder.engineEdition; this.servicePack = builder.servicePack; this.supportLevel = builder.supportLevel; this.osArchitecture = builder.osArchitecture; this.tooltip = builder.tooltip; } /** *

* The database engine of a database in a Fleet Advisor collector inventory, for example * Microsoft SQL Server. *

* * @return The database engine of a database in a Fleet Advisor collector inventory, for example * Microsoft SQL Server. */ public final String engine() { return engine; } /** *

* The database engine version of a database in a Fleet Advisor collector inventory, for example 2019. *

* * @return The database engine version of a database in a Fleet Advisor collector inventory, for example * 2019. */ public final String engineVersion() { return engineVersion; } /** *

* The database engine edition of a database in a Fleet Advisor collector inventory, for example * Express. *

* * @return The database engine edition of a database in a Fleet Advisor collector inventory, for example * Express. */ public final String engineEdition() { return engineEdition; } /** *

* The service pack level of the database. *

* * @return The service pack level of the database. */ public final String servicePack() { return servicePack; } /** *

* The support level of the database, for example Mainstream support. *

* * @return The support level of the database, for example Mainstream support. */ public final String supportLevel() { return supportLevel; } /** *

* The operating system architecture of the database. *

* * @return The operating system architecture of the database. */ public final Integer osArchitecture() { return osArchitecture; } /** *

* Information about the database engine software, for example * Mainstream support ends on November 14th, 2024. *

* * @return Information about the database engine software, for example * Mainstream support ends on November 14th, 2024. */ public final String tooltip() { return tooltip; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(engine()); hashCode = 31 * hashCode + Objects.hashCode(engineVersion()); hashCode = 31 * hashCode + Objects.hashCode(engineEdition()); hashCode = 31 * hashCode + Objects.hashCode(servicePack()); hashCode = 31 * hashCode + Objects.hashCode(supportLevel()); hashCode = 31 * hashCode + Objects.hashCode(osArchitecture()); hashCode = 31 * hashCode + Objects.hashCode(tooltip()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof DatabaseInstanceSoftwareDetailsResponse)) { return false; } DatabaseInstanceSoftwareDetailsResponse other = (DatabaseInstanceSoftwareDetailsResponse) obj; return Objects.equals(engine(), other.engine()) && Objects.equals(engineVersion(), other.engineVersion()) && Objects.equals(engineEdition(), other.engineEdition()) && Objects.equals(servicePack(), other.servicePack()) && Objects.equals(supportLevel(), other.supportLevel()) && Objects.equals(osArchitecture(), other.osArchitecture()) && Objects.equals(tooltip(), other.tooltip()); } /** * 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. */ @Override public final String toString() { return ToString.builder("DatabaseInstanceSoftwareDetailsResponse").add("Engine", engine()) .add("EngineVersion", engineVersion()).add("EngineEdition", engineEdition()).add("ServicePack", servicePack()) .add("SupportLevel", supportLevel()).add("OsArchitecture", osArchitecture()).add("Tooltip", tooltip()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Engine": return Optional.ofNullable(clazz.cast(engine())); case "EngineVersion": return Optional.ofNullable(clazz.cast(engineVersion())); case "EngineEdition": return Optional.ofNullable(clazz.cast(engineEdition())); case "ServicePack": return Optional.ofNullable(clazz.cast(servicePack())); case "SupportLevel": return Optional.ofNullable(clazz.cast(supportLevel())); case "OsArchitecture": return Optional.ofNullable(clazz.cast(osArchitecture())); case "Tooltip": return Optional.ofNullable(clazz.cast(tooltip())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((DatabaseInstanceSoftwareDetailsResponse) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The database engine of a database in a Fleet Advisor collector inventory, for example * Microsoft SQL Server. *

* * @param engine * The database engine of a database in a Fleet Advisor collector inventory, for example * Microsoft SQL Server. * @return Returns a reference to this object so that method calls can be chained together. */ Builder engine(String engine); /** *

* The database engine version of a database in a Fleet Advisor collector inventory, for example * 2019. *

* * @param engineVersion * The database engine version of a database in a Fleet Advisor collector inventory, for example * 2019. * @return Returns a reference to this object so that method calls can be chained together. */ Builder engineVersion(String engineVersion); /** *

* The database engine edition of a database in a Fleet Advisor collector inventory, for example * Express. *

* * @param engineEdition * The database engine edition of a database in a Fleet Advisor collector inventory, for example * Express. * @return Returns a reference to this object so that method calls can be chained together. */ Builder engineEdition(String engineEdition); /** *

* The service pack level of the database. *

* * @param servicePack * The service pack level of the database. * @return Returns a reference to this object so that method calls can be chained together. */ Builder servicePack(String servicePack); /** *

* The support level of the database, for example Mainstream support. *

* * @param supportLevel * The support level of the database, for example Mainstream support. * @return Returns a reference to this object so that method calls can be chained together. */ Builder supportLevel(String supportLevel); /** *

* The operating system architecture of the database. *

* * @param osArchitecture * The operating system architecture of the database. * @return Returns a reference to this object so that method calls can be chained together. */ Builder osArchitecture(Integer osArchitecture); /** *

* Information about the database engine software, for example * Mainstream support ends on November 14th, 2024. *

* * @param tooltip * Information about the database engine software, for example * Mainstream support ends on November 14th, 2024. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tooltip(String tooltip); } static final class BuilderImpl implements Builder { private String engine; private String engineVersion; private String engineEdition; private String servicePack; private String supportLevel; private Integer osArchitecture; private String tooltip; private BuilderImpl() { } private BuilderImpl(DatabaseInstanceSoftwareDetailsResponse model) { engine(model.engine); engineVersion(model.engineVersion); engineEdition(model.engineEdition); servicePack(model.servicePack); supportLevel(model.supportLevel); osArchitecture(model.osArchitecture); tooltip(model.tooltip); } public final String getEngine() { return engine; } public final void setEngine(String engine) { this.engine = engine; } @Override public final Builder engine(String engine) { this.engine = engine; return this; } public final String getEngineVersion() { return engineVersion; } public final void setEngineVersion(String engineVersion) { this.engineVersion = engineVersion; } @Override public final Builder engineVersion(String engineVersion) { this.engineVersion = engineVersion; return this; } public final String getEngineEdition() { return engineEdition; } public final void setEngineEdition(String engineEdition) { this.engineEdition = engineEdition; } @Override public final Builder engineEdition(String engineEdition) { this.engineEdition = engineEdition; return this; } public final String getServicePack() { return servicePack; } public final void setServicePack(String servicePack) { this.servicePack = servicePack; } @Override public final Builder servicePack(String servicePack) { this.servicePack = servicePack; return this; } public final String getSupportLevel() { return supportLevel; } public final void setSupportLevel(String supportLevel) { this.supportLevel = supportLevel; } @Override public final Builder supportLevel(String supportLevel) { this.supportLevel = supportLevel; return this; } public final Integer getOsArchitecture() { return osArchitecture; } public final void setOsArchitecture(Integer osArchitecture) { this.osArchitecture = osArchitecture; } @Override public final Builder osArchitecture(Integer osArchitecture) { this.osArchitecture = osArchitecture; return this; } public final String getTooltip() { return tooltip; } public final void setTooltip(String tooltip) { this.tooltip = tooltip; } @Override public final Builder tooltip(String tooltip) { this.tooltip = tooltip; return this; } @Override public DatabaseInstanceSoftwareDetailsResponse build() { return new DatabaseInstanceSoftwareDetailsResponse(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy