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

com.oracle.bmc.fleetappsmanagement.model.CreatePropertyDetails Maven / Gradle / Ivy

There is a newer version: 3.55.1
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.fleetappsmanagement.model;

/**
 * The information about new Property. 
* 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: 20230831") @com.fasterxml.jackson.databind.annotation.JsonDeserialize( builder = CreatePropertyDetails.Builder.class) @com.fasterxml.jackson.annotation.JsonFilter( com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) public final class CreatePropertyDetails extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ "compartmentId", "displayName", "selection", "valueType", "values" }) public CreatePropertyDetails( String compartmentId, String displayName, Selection selection, ValueType valueType, java.util.List values) { super(); this.compartmentId = compartmentId; this.displayName = displayName; this.selection = selection; this.valueType = valueType; this.values = values; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** Tenancy OCID */ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** * Tenancy OCID * * @param compartmentId the value to set * @return this builder */ public Builder compartmentId(String compartmentId) { this.compartmentId = compartmentId; this.__explicitlySet__.add("compartmentId"); return this; } /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering * confidential information. * *

Example: {@code My new resource} */ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private String displayName; /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering * confidential information. * *

Example: {@code My new resource} * * @param displayName the value to set * @return this builder */ public Builder displayName(String displayName) { this.displayName = displayName; this.__explicitlySet__.add("displayName"); return this; } /** Text selection of the property. */ @com.fasterxml.jackson.annotation.JsonProperty("selection") private Selection selection; /** * Text selection of the property. * * @param selection the value to set * @return this builder */ public Builder selection(Selection selection) { this.selection = selection; this.__explicitlySet__.add("selection"); return this; } /** Format of the value. */ @com.fasterxml.jackson.annotation.JsonProperty("valueType") private ValueType valueType; /** * Format of the value. * * @param valueType the value to set * @return this builder */ public Builder valueType(ValueType valueType) { this.valueType = valueType; this.__explicitlySet__.add("valueType"); return this; } /** Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). */ @com.fasterxml.jackson.annotation.JsonProperty("values") private java.util.List values; /** * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). * * @param values the value to set * @return this builder */ public Builder values(java.util.List values) { this.values = values; this.__explicitlySet__.add("values"); return this; } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public CreatePropertyDetails build() { CreatePropertyDetails model = new CreatePropertyDetails( this.compartmentId, this.displayName, this.selection, this.valueType, this.values); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } return model; } @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(CreatePropertyDetails model) { if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } if (model.wasPropertyExplicitlySet("selection")) { this.selection(model.getSelection()); } if (model.wasPropertyExplicitlySet("valueType")) { this.valueType(model.getValueType()); } if (model.wasPropertyExplicitlySet("values")) { this.values(model.getValues()); } return this; } } /** Create a new builder. */ public static Builder builder() { return new Builder(); } public Builder toBuilder() { return new Builder().copy(this); } /** Tenancy OCID */ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** * Tenancy OCID * * @return the value */ public String getCompartmentId() { return compartmentId; } /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering * confidential information. * *

Example: {@code My new resource} */ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private final String displayName; /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering * confidential information. * *

Example: {@code My new resource} * * @return the value */ public String getDisplayName() { return displayName; } /** Text selection of the property. */ @com.fasterxml.jackson.annotation.JsonProperty("selection") private final Selection selection; /** * Text selection of the property. * * @return the value */ public Selection getSelection() { return selection; } /** Format of the value. */ @com.fasterxml.jackson.annotation.JsonProperty("valueType") private final ValueType valueType; /** * Format of the value. * * @return the value */ public ValueType getValueType() { return valueType; } /** Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). */ @com.fasterxml.jackson.annotation.JsonProperty("values") private final java.util.List values; /** * Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). * * @return the value */ public java.util.List getValues() { return values; } @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("CreatePropertyDetails("); sb.append("super=").append(super.toString()); sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", selection=").append(String.valueOf(this.selection)); sb.append(", valueType=").append(String.valueOf(this.valueType)); sb.append(", values=").append(String.valueOf(this.values)); sb.append(")"); return sb.toString(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof CreatePropertyDetails)) { return false; } CreatePropertyDetails other = (CreatePropertyDetails) o; return java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.selection, other.selection) && java.util.Objects.equals(this.valueType, other.valueType) && java.util.Objects.equals(this.values, other.values) && super.equals(other); } @Override public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.selection == null ? 43 : this.selection.hashCode()); result = (result * PRIME) + (this.valueType == null ? 43 : this.valueType.hashCode()); result = (result * PRIME) + (this.values == null ? 43 : this.values.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy