public abstract class Monitor extends Object implements NamedResource
Modifier and Type | Class and Description |
---|---|
protected static class |
Monitor.Builder<T extends Monitor,B extends Monitor.Builder<T,B>>
Builder to make monitor construction easier.
|
static class |
Monitor.Frequency
Represents a monitor frequency.
|
static class |
Monitor.MonitorType
Represents the available types for a New Relic Synthetics monitor.
|
static class |
Monitor.Status
Represents the available statuses for a monitor.
|
Constructor and Description |
---|
Monitor()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getApiVersion()
Returns the API version of the monitor.
|
Date |
getCreatedAt()
Returns the date the monitor was created.
|
int |
getFrequency()
Returns the frequency of the monitor (in minutes).
|
String |
getId()
Returns the id of the monitor.
|
List<String> |
getLocations()
Returns the list of locations.
|
Date |
getModifedAt()
Returns the date the monitor was last modified.
|
String |
getName()
Returns the name of the monitor.
|
MonitorOptions |
getOptions()
Returns the monitor options.
|
double |
getSlaThreshold()
Returns the SLA threshold of the monitor.
|
String |
getStatus()
Returns the status of the monitor.
|
String |
getType()
Returns the type of the monitor.
|
long |
getUserId()
Returns the user id of the monitor.
|
void |
setFrequency(int frequency)
Sets the frequency of the monitor (in minutes).
|
void |
setFrequency(Monitor.Frequency frequency)
Sets the frequency of the monitor (in minutes).
|
void |
setId(String id)
Sets the id of the monitor.
|
void |
setLocations(List<String> locations)
Sets the list of locations.
|
void |
setName(String name)
Sets the name of the monitor.
|
void |
setOptions(MonitorOptions options)
Sets the monitor options.
|
void |
setSlaThreshold(double slaThreshold)
Sets the SLA threshold of the monitor.
|
void |
setStatus(Monitor.Status status)
Sets the status of the monitor.
|
void |
setStatus(String status)
Sets the status of the monitor.
|
void |
setType(Monitor.MonitorType type)
Sets the type of the monitor.
|
void |
setType(String type)
Sets the type of the monitor.
|
String |
toString()
Returns a string representation of the object.
|
public void setId(String id)
id
- The id of the monitorpublic String getId()
public void setName(String name)
setName
in interface NamedResource
name
- The name of the monitorpublic String getName()
getName
in interface NamedResource
public void setType(String type)
type
- The type of the monitorpublic void setType(Monitor.MonitorType type)
type
- The type of the monitorpublic String getType()
public void setFrequency(int frequency)
frequency
- The frequency of the monitorpublic void setFrequency(Monitor.Frequency frequency)
frequency
- The frequency of the monitorpublic int getFrequency()
public void setStatus(String status)
status
- The status of the monitorpublic void setStatus(Monitor.Status status)
status
- The status of the monitorpublic String getStatus()
public void setSlaThreshold(double slaThreshold)
slaThreshold
- The SLA threshold of the monitorpublic double getSlaThreshold()
public void setLocations(List<String> locations)
locations
- The list of locationspublic List<String> getLocations()
public void setOptions(MonitorOptions options)
options
- The monitor optionspublic MonitorOptions getOptions()
public long getUserId()
public String getApiVersion()
public Date getCreatedAt()
public Date getModifedAt()
Copyright © 2018. All rights reserved.