Class Object
-
-
Field Summary
Fields Modifier and Type Field Description private final String
adapterType
private final String
objectType
private final String
name
private final JsonObject
json
private final Key
key
-
Constructor Summary
Constructors Constructor Description Object(String adapterType, String objectType, String name, List<Identifier> identifiers)
Represents an Object (resource) in VMware Aria Operations. Object(String adapterType, String objectType, String name)
Represents an Object (resource) in VMware Aria Operations. Object(Key key)
-
Method Summary
Modifier and Type Method Description final String
getAdapterType()
final String
getObjectType()
final String
getName()
final JsonObject
getJson()
final Key
getKey()
A Key that uniquely identifies this Object. final String
getIdentifierValue(String identifierKey, String defaultValue)
Retrieve the value of a given Identifier. final String
getIdentifierValue(String identifierKey)
Retrieve the value of a given Identifier. final Unit
addMetric(Metric metric)
Adds a single Metric (data point) to this Object final Unit
addMetrics(Iterable<Metric> metrics)
Adds a collection of Metrics (data points) to this Object final Unit
withMetric(String key, Double value, Long timestamp)
Creates a single Metric (data point) and adds it to this Object final Unit
withMetric(String key, Double value)
Creates a single Metric (data point) and adds it to this Object final Set<Metric>
getMetric(String key)
Gets all Metrics for a given Metric key. final List<Double>
getMetricValues(String key)
Gets all datapoints for a given Metric key. final Double
getLastMetricValue(String key)
Gets the most recent datapoint for a given Metric key. final Unit
addProperty(Property property)
Adds a single Property (data point) to this Object final Unit
addProperties(Iterable<Property> properties)
Adds a collection of Properties (data points) to this Object final Unit
withProperty(String key, String value, Long timestamp)
Creates a single StringProperty (data point) and adds it to this Object final Unit
withProperty(String key, String value)
Creates a single StringProperty (data point) and adds it to this Object final Unit
withProperty(String key, Double value, Long timestamp)
Creates a single NumericProperty (data point) and adds it to this Object final Unit
withProperty(String key, Double value)
Creates a single NumericProperty (data point) and adds it to this Object final Set<Property>
getProperty(String key)
Gets all Properties for a given Property key. final List<Double>
getNumericPropertyValues(String key)
Gets all datapoints for a given NumericProperty key. final List<String>
getStringPropertyValues(String key)
Gets all datapoints for a given StringProperty key. final Double
getLastNumericPropertyValue(String key)
Gets the most recent datapoint for a given NumericProperty key. final String
getLastStringPropertyValue(String key)
Gets the most recent datapoint for a given StringProperty key. final Unit
addEvent(Event event)
Adds a single Event to this Object. final Unit
addEvents(Iterable<Event> events)
Adds a collection of Events to this Object. final Unit
withEvent(String message, Criticality criticality, String faultKey, Boolean autoCancel, Long startDate, Long updateDate, Long cancelDate, Integer watchWaitCycle, Integer cancelWaitCycle)
Creates a new Event and adds it to this Object. final Unit
withEvent(String message, Criticality criticality, String faultKey, Boolean autoCancel, Long startDate, Long updateDate, Long cancelDate, Integer watchWaitCycle)
Creates a new Event and adds it to this Object. final Unit
withEvent(String message, Criticality criticality, String faultKey, Boolean autoCancel, Long startDate, Long updateDate, Long cancelDate)
Creates a new Event and adds it to this Object. final Unit
withEvent(String message, Criticality criticality, String faultKey, Boolean autoCancel, Long startDate, Long updateDate)
Creates a new Event and adds it to this Object. final Unit
withEvent(String message, Criticality criticality, String faultKey, Boolean autoCancel, Long startDate)
Creates a new Event and adds it to this Object. final Unit
withEvent(String message, Criticality criticality, String faultKey, Boolean autoCancel)
Creates a new Event and adds it to this Object. final Unit
withEvent(String message, Criticality criticality, String faultKey)
Creates a new Event and adds it to this Object. final Unit
withEvent(String message, Criticality criticality)
Creates a new Event and adds it to this Object. final Unit
withEvent(String message)
Creates a new Event and adds it to this Object. final List<Event>
getEvents()
final Unit
addParent(Object parent)
Adds a parent Object to this Object. final Unit
addParents(Iterable<Object> parents)
Adds a collection of parent Objects to this Object. final Set<Key>
getParents()
final Unit
addChild(Object child)
Adds a child Object to this Object. final Unit
addChildren(Iterable<Object> children)
Adds a collection of child Objects to this Object. final Set<Key>
getChildren()
final Boolean
hasContent()
-
-
Constructor Detail
-
Object
Object(String adapterType, String objectType, String name, List<Identifier> identifiers)
Represents an Object (resource) in VMware Aria Operations.- Parameters:
adapterType
- The adapter type of the objectobjectType
- The type of the objectname
- The name of the objectidentifiers
- An optional list of Identifiers for the object
-
Object
Object(String adapterType, String objectType, String name)
Represents an Object (resource) in VMware Aria Operations.- Parameters:
adapterType
- The adapter type of the objectobjectType
- The type of the objectname
- The name of the object
-
Object
Object(Key key)
-
-
Method Detail
-
getAdapterType
final String getAdapterType()
-
getObjectType
final String getObjectType()
-
getJson
final JsonObject getJson()
-
getIdentifierValue
@JvmOverloads() final String getIdentifierValue(String identifierKey, String defaultValue)
Retrieve the value of a given Identifier.
- Parameters:
identifierKey
- Key of the IdentifierdefaultValue
- An optional default value- Returns:
The value associated with the Identifier. If the value associated with the Identifier is empty and defaultValue is provided, returns defaultValue. If the Identifier does not exist, returns defaultValue if provided, else null.
-
getIdentifierValue
@JvmOverloads() final String getIdentifierValue(String identifierKey)
Retrieve the value of a given Identifier.
- Parameters:
identifierKey
- Key of the Identifier- Returns:
The value associated with the Identifier. If the value associated with the Identifier is empty and defaultValue is provided, returns defaultValue. If the Identifier does not exist, returns defaultValue if provided, else null.
-
addMetrics
final Unit addMetrics(Iterable<Metric> metrics)
-
withMetric
@JvmOverloads() final Unit withMetric(String key, Double value, Long timestamp)
- Parameters:
key
- The key identifying the Metricvalue
- The value of the data pointtimestamp
- The timestamp (in milliseconds since the Epoch) the data point was collected (defaults to now).
-
withMetric
@JvmOverloads() final Unit withMetric(String key, Double value)
- Parameters:
key
- The key identifying the Metricvalue
- The value of the data point
-
getMetric
final Set<Metric> getMetric(String key)
- Parameters:
key
- Metric key of the metrics to return.- Returns:
A Set of all metrics matching the given key.
-
getMetricValues
final List<Double> getMetricValues(String key)
Gets all datapoints for a given Metric key.
-
getLastMetricValue
final Double getLastMetricValue(String key)
Gets the most recent datapoint for a given Metric key.
- Parameters:
key
- Metric key of the metric to return.- Returns:
The latest value of the metric, or null if no metric exists with the given key..
-
addProperty
final Unit addProperty(Property property)
-
addProperties
final Unit addProperties(Iterable<Property> properties)
Adds a collection of Properties (data points) to this Object
-
withProperty
@JvmOverloads() final Unit withProperty(String key, String value, Long timestamp)
Creates a single StringProperty (data point) and adds it to this Object
- Parameters:
key
- The key identifying the Propertyvalue
- The value of the data pointtimestamp
- The timestamp (in milliseconds since the Epoch) the data point was collected (defaults to now).
-
withProperty
@JvmOverloads() final Unit withProperty(String key, String value)
Creates a single StringProperty (data point) and adds it to this Object
- Parameters:
key
- The key identifying the Propertyvalue
- The value of the data point
-
withProperty
@JvmOverloads() final Unit withProperty(String key, Double value, Long timestamp)
Creates a single NumericProperty (data point) and adds it to this Object
- Parameters:
key
- The key identifying the Propertyvalue
- The value of the data pointtimestamp
- The timestamp (in milliseconds since the Epoch) the data point was collected (defaults to now).
-
withProperty
@JvmOverloads() final Unit withProperty(String key, Double value)
Creates a single NumericProperty (data point) and adds it to this Object
- Parameters:
key
- The key identifying the Propertyvalue
- The value of the data point
-
getProperty
final Set<Property> getProperty(String key)
Gets all Properties for a given Property key.
- Parameters:
key
- Property key of the metrics to return.- Returns:
A Set of all properties matching the given key.
-
getNumericPropertyValues
final List<Double> getNumericPropertyValues(String key)
Gets all datapoints for a given NumericProperty key.
- Parameters:
key
- Property key of the NumericProperty to return.- Returns:
A List of the property values matching the given key in chronological order. If the property is StringProperty, returns an empty list.
-
getStringPropertyValues
final List<String> getStringPropertyValues(String key)
Gets all datapoints for a given StringProperty key.
- Parameters:
key
- Property key of the StringProperty to return.- Returns:
A List of the property values matching the given key in chronological order. If the property is NumericProperty, returns an empty list.
-
getLastNumericPropertyValue
final Double getLastNumericPropertyValue(String key)
Gets the most recent datapoint for a given NumericProperty key.
- Parameters:
key
- Property key of the NumericProperty to return.- Returns:
The latest value of the NumericProperty, or null if no NumericProperty exists with the given key.
-
getLastStringPropertyValue
final String getLastStringPropertyValue(String key)
Gets the most recent datapoint for a given StringProperty key.
- Parameters:
key
- Property key of the StringProperty to return.- Returns:
The latest value of the StringProperty, or null if no StringProperty exists with the given key.
-
withEvent
@JvmOverloads() final Unit withEvent(String message, Criticality criticality, String faultKey, Boolean autoCancel, Long startDate, Long updateDate, Long cancelDate, Integer watchWaitCycle, Integer cancelWaitCycle)
- Parameters:
message
- The message describes and identifies an event.criticality
- The criticality or severity of the event.faultKey
- A metric/property key that this event is related to.autoCancel
- If True, VMware Aria Operations should automatically cancel an event when it stops being sent.startDate
- If set, overrides the start date of the event.updateDate
- If set, indicates that the event has been updated by the target at the indicated time.cancelDate
- If 'autoCancel' is set to False, use the cancelDate to indicate that the event should be cancelled.watchWaitCycle
- The number of times this event must be present in a collection before VMware Aria Operations surfaces it in the UI.cancelWaitCycle
- If 'autoCancel' is set to true, sets the number of times this event must be absent in a collection before Aria Operations removes it from the UI.
-
withEvent
@JvmOverloads() final Unit withEvent(String message, Criticality criticality, String faultKey, Boolean autoCancel, Long startDate, Long updateDate, Long cancelDate, Integer watchWaitCycle)
- Parameters:
message
- The message describes and identifies an event.criticality
- The criticality or severity of the event.faultKey
- A metric/property key that this event is related to.autoCancel
- If True, VMware Aria Operations should automatically cancel an event when it stops being sent.startDate
- If set, overrides the start date of the event.updateDate
- If set, indicates that the event has been updated by the target at the indicated time.cancelDate
- If 'autoCancel' is set to False, use the cancelDate to indicate that the event should be cancelled.watchWaitCycle
- The number of times this event must be present in a collection before VMware Aria Operations surfaces it in the UI.
-
withEvent
@JvmOverloads() final Unit withEvent(String message, Criticality criticality, String faultKey, Boolean autoCancel, Long startDate, Long updateDate, Long cancelDate)
- Parameters:
message
- The message describes and identifies an event.criticality
- The criticality or severity of the event.faultKey
- A metric/property key that this event is related to.autoCancel
- If True, VMware Aria Operations should automatically cancel an event when it stops being sent.startDate
- If set, overrides the start date of the event.updateDate
- If set, indicates that the event has been updated by the target at the indicated time.cancelDate
- If 'autoCancel' is set to False, use the cancelDate to indicate that the event should be cancelled.
-
withEvent
@JvmOverloads() final Unit withEvent(String message, Criticality criticality, String faultKey, Boolean autoCancel, Long startDate, Long updateDate)
- Parameters:
message
- The message describes and identifies an event.criticality
- The criticality or severity of the event.faultKey
- A metric/property key that this event is related to.autoCancel
- If True, VMware Aria Operations should automatically cancel an event when it stops being sent.startDate
- If set, overrides the start date of the event.updateDate
- If set, indicates that the event has been updated by the target at the indicated time.
-
withEvent
@JvmOverloads() final Unit withEvent(String message, Criticality criticality, String faultKey, Boolean autoCancel, Long startDate)
- Parameters:
message
- The message describes and identifies an event.criticality
- The criticality or severity of the event.faultKey
- A metric/property key that this event is related to.autoCancel
- If True, VMware Aria Operations should automatically cancel an event when it stops being sent.startDate
- If set, overrides the start date of the event.
-
withEvent
@JvmOverloads() final Unit withEvent(String message, Criticality criticality, String faultKey, Boolean autoCancel)
- Parameters:
message
- The message describes and identifies an event.criticality
- The criticality or severity of the event.faultKey
- A metric/property key that this event is related to.autoCancel
- If True, VMware Aria Operations should automatically cancel an event when it stops being sent.
-
withEvent
@JvmOverloads() final Unit withEvent(String message, Criticality criticality, String faultKey)
- Parameters:
message
- The message describes and identifies an event.criticality
- The criticality or severity of the event.faultKey
- A metric/property key that this event is related to.
-
withEvent
@JvmOverloads() final Unit withEvent(String message, Criticality criticality)
- Parameters:
message
- The message describes and identifies an event.criticality
- The criticality or severity of the event.
-
withEvent
@JvmOverloads() final Unit withEvent(String message)
- Parameters:
message
- The message describes and identifies an event.
-
addParent
final Unit addParent(Object parent)
Adds a parent Object to this Object.
This Object will also be added as a child to the parent.
Relationships cycles are not permitted.
- Parameters:
parent
- The parent Object
-
addParents
final Unit addParents(Iterable<Object> parents)
Adds a collection of parent Objects to this Object.
This Object will also be added as a child to each of the parents.
Relationship cycles are not permitted.
- Parameters:
parents
- A collection of parent Objects.
-
getParents
final Set<Key> getParents()
-
addChild
final Unit addChild(Object child)
Adds a child Object to this Object.
This Object will also be added as a parent to the child.
Relationships cycles are not permitted.
- Parameters:
child
- The parent Object
-
addChildren
final Unit addChildren(Iterable<Object> children)
Adds a collection of child Objects to this Object.
This Object will also be added as a parent to each of the children.
Relationship cycles are not permitted.
- Parameters:
children
- A collection of child Objects.
-
getChildren
final Set<Key> getChildren()
-
hasContent
final Boolean hasContent()
- Returns:
true if this Object contains any Metrics, Properties, or Events; false otherwise.
-
-
-
-