public abstract class ExplicitlySetBmcModel extends Object
Base class for models implementing the explicitly set behavior.
Subclasses should be annotated with
com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME)
.
All the properties that were explicitly set by user will be serialized, even if set to null
.
Constructor and Description |
---|
ExplicitlySetBmcModel() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
protected void |
markPropertyAsExplicitlySet(String propertyName)
Specify that a model property was explicitly set by user.
|
String |
toString() |
boolean |
wasPropertyExplicitlySet(String propertyName)
Get whether a property was explicitly specified by user.
|
protected void markPropertyAsExplicitlySet(String propertyName)
Specify that a model property was explicitly set by user. The method should be used inside property setters.
propertyName
- the name of the model property to mark as
set by user. Should match the property name
exactly.public boolean wasPropertyExplicitlySet(String propertyName)
Get whether a property was explicitly specified by user. It is highly unlikely that this is the method you want to use as a user.
propertyName
- the name of the property.Copyright © 2016–2023. All rights reserved.