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

com.oracle.bmc.mysql.model.ShapeSummary Maven / Gradle / Ivy

There is a newer version: 3.49.0
Show newest version
/**
 * Copyright (c) 2016, 2024, Oracle and/or its affiliates.  All rights reserved.
 * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
 */
package com.oracle.bmc.mysql.model;

/**
 * The shape of the DB System. The shape determines resources to allocate to the DB System - CPU
 * cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes.
 * For a description of shapes, see [DB System Shape
 * Options](https://docs.cloud.oracle.com/mysql-database/doc/shapes.htm). 
* Note: Objects should always be created or deserialized using the {@link Builder}. This model * distinguishes fields that are {@code null} because they are unset from fields that are explicitly * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set * fields into account. The constructor, on the other hand, does not take the explicitly set fields * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code * null}). */ @jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190415") @com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ShapeSummary.Builder.class) @com.fasterxml.jackson.annotation.JsonFilter( com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) public final class ShapeSummary extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({"name", "cpuCoreCount", "memorySizeInGBs", "isSupportedFor"}) public ShapeSummary( String name, Integer cpuCoreCount, Integer memorySizeInGBs, java.util.List isSupportedFor) { super(); this.name = name; this.cpuCoreCount = cpuCoreCount; this.memorySizeInGBs = memorySizeInGBs; this.isSupportedFor = isSupportedFor; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** The name of the shape used for the DB System. */ @com.fasterxml.jackson.annotation.JsonProperty("name") private String name; /** * The name of the shape used for the DB System. * * @param name the value to set * @return this builder */ public Builder name(String name) { this.name = name; this.__explicitlySet__.add("name"); return this; } /** The number of CPU Cores the Instance provides. These are "OCPU"s. */ @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") private Integer cpuCoreCount; /** * The number of CPU Cores the Instance provides. These are "OCPU"s. * * @param cpuCoreCount the value to set * @return this builder */ public Builder cpuCoreCount(Integer cpuCoreCount) { this.cpuCoreCount = cpuCoreCount; this.__explicitlySet__.add("cpuCoreCount"); return this; } /** The amount of RAM the Instance provides. This is an IEC base-2 number. */ @com.fasterxml.jackson.annotation.JsonProperty("memorySizeInGBs") private Integer memorySizeInGBs; /** * The amount of RAM the Instance provides. This is an IEC base-2 number. * * @param memorySizeInGBs the value to set * @return this builder */ public Builder memorySizeInGBs(Integer memorySizeInGBs) { this.memorySizeInGBs = memorySizeInGBs; this.__explicitlySet__.add("memorySizeInGBs"); return this; } /** What service features the shape is supported for. */ @com.fasterxml.jackson.annotation.JsonProperty("isSupportedFor") private java.util.List isSupportedFor; /** * What service features the shape is supported for. * * @param isSupportedFor the value to set * @return this builder */ public Builder isSupportedFor(java.util.List isSupportedFor) { this.isSupportedFor = isSupportedFor; this.__explicitlySet__.add("isSupportedFor"); return this; } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public ShapeSummary build() { ShapeSummary model = new ShapeSummary( this.name, this.cpuCoreCount, this.memorySizeInGBs, this.isSupportedFor); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } return model; } @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(ShapeSummary model) { if (model.wasPropertyExplicitlySet("name")) { this.name(model.getName()); } if (model.wasPropertyExplicitlySet("cpuCoreCount")) { this.cpuCoreCount(model.getCpuCoreCount()); } if (model.wasPropertyExplicitlySet("memorySizeInGBs")) { this.memorySizeInGBs(model.getMemorySizeInGBs()); } if (model.wasPropertyExplicitlySet("isSupportedFor")) { this.isSupportedFor(model.getIsSupportedFor()); } return this; } } /** Create a new builder. */ public static Builder builder() { return new Builder(); } public Builder toBuilder() { return new Builder().copy(this); } /** The name of the shape used for the DB System. */ @com.fasterxml.jackson.annotation.JsonProperty("name") private final String name; /** * The name of the shape used for the DB System. * * @return the value */ public String getName() { return name; } /** The number of CPU Cores the Instance provides. These are "OCPU"s. */ @com.fasterxml.jackson.annotation.JsonProperty("cpuCoreCount") private final Integer cpuCoreCount; /** * The number of CPU Cores the Instance provides. These are "OCPU"s. * * @return the value */ public Integer getCpuCoreCount() { return cpuCoreCount; } /** The amount of RAM the Instance provides. This is an IEC base-2 number. */ @com.fasterxml.jackson.annotation.JsonProperty("memorySizeInGBs") private final Integer memorySizeInGBs; /** * The amount of RAM the Instance provides. This is an IEC base-2 number. * * @return the value */ public Integer getMemorySizeInGBs() { return memorySizeInGBs; } /** */ public enum IsSupportedFor implements com.oracle.bmc.http.internal.BmcEnum { Dbsystem("DBSYSTEM"), Heatwavecluster("HEATWAVECLUSTER"), /** * This value is used if a service returns a value for this enum that is not recognized by * this version of the SDK. */ UnknownEnumValue(null); private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(IsSupportedFor.class); private final String value; private static java.util.Map map; static { map = new java.util.HashMap<>(); for (IsSupportedFor v : IsSupportedFor.values()) { if (v != UnknownEnumValue) { map.put(v.getValue(), v); } } } IsSupportedFor(String value) { this.value = value; } @com.fasterxml.jackson.annotation.JsonValue public String getValue() { return value; } @com.fasterxml.jackson.annotation.JsonCreator public static IsSupportedFor create(String key) { if (map.containsKey(key)) { return map.get(key); } LOG.warn( "Received unknown value '{}' for enum 'IsSupportedFor', returning UnknownEnumValue", key); return UnknownEnumValue; } }; /** What service features the shape is supported for. */ @com.fasterxml.jackson.annotation.JsonProperty("isSupportedFor") private final java.util.List isSupportedFor; /** * What service features the shape is supported for. * * @return the value */ public java.util.List getIsSupportedFor() { return isSupportedFor; } @Override public String toString() { return this.toString(true); } /** * Return a string representation of the object. * * @param includeByteArrayContents true to include the full contents of byte arrays * @return string representation */ public String toString(boolean includeByteArrayContents) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); sb.append("ShapeSummary("); sb.append("super=").append(super.toString()); sb.append("name=").append(String.valueOf(this.name)); sb.append(", cpuCoreCount=").append(String.valueOf(this.cpuCoreCount)); sb.append(", memorySizeInGBs=").append(String.valueOf(this.memorySizeInGBs)); sb.append(", isSupportedFor=").append(String.valueOf(this.isSupportedFor)); sb.append(")"); return sb.toString(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ShapeSummary)) { return false; } ShapeSummary other = (ShapeSummary) o; return java.util.Objects.equals(this.name, other.name) && java.util.Objects.equals(this.cpuCoreCount, other.cpuCoreCount) && java.util.Objects.equals(this.memorySizeInGBs, other.memorySizeInGBs) && java.util.Objects.equals(this.isSupportedFor, other.isSupportedFor) && super.equals(other); } @Override public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); result = (result * PRIME) + (this.cpuCoreCount == null ? 43 : this.cpuCoreCount.hashCode()); result = (result * PRIME) + (this.memorySizeInGBs == null ? 43 : this.memorySizeInGBs.hashCode()); result = (result * PRIME) + (this.isSupportedFor == null ? 43 : this.isSupportedFor.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy