2323
2424/** Object describing a monitor. */
2525@ JsonPropertyOrder ({
26+ Monitor .JSON_PROPERTY_ASSETS ,
2627 Monitor .JSON_PROPERTY_CREATED ,
2728 Monitor .JSON_PROPERTY_CREATOR ,
2829 Monitor .JSON_PROPERTY_DELETED ,
4647 value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator" )
4748public class Monitor {
4849 @ JsonIgnore public boolean unparsed = false ;
50+ public static final String JSON_PROPERTY_ASSETS = "assets" ;
51+ private List <MonitorAsset > assets = null ;
52+
4953 public static final String JSON_PROPERTY_CREATED = "created" ;
5054 private OffsetDateTime created ;
5155
@@ -111,6 +115,40 @@ public Monitor(
111115 this .unparsed |= !type .isValid ();
112116 }
113117
118+ public Monitor assets (List <MonitorAsset > assets ) {
119+ this .assets = assets ;
120+ for (MonitorAsset item : assets ) {
121+ this .unparsed |= item .unparsed ;
122+ }
123+ return this ;
124+ }
125+
126+ public Monitor addAssetsItem (MonitorAsset assetsItem ) {
127+ if (this .assets == null ) {
128+ this .assets = new ArrayList <>();
129+ }
130+ this .assets .add (assetsItem );
131+ this .unparsed |= assetsItem .unparsed ;
132+ return this ;
133+ }
134+
135+ /**
136+ * The list of monitor assets tied to a monitor, which represents key links for users to take
137+ * action on monitor alerts (for example, runbooks).
138+ *
139+ * @return assets
140+ */
141+ @ jakarta .annotation .Nullable
142+ @ JsonProperty (JSON_PROPERTY_ASSETS )
143+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
144+ public List <MonitorAsset > getAssets () {
145+ return assets ;
146+ }
147+
148+ public void setAssets (List <MonitorAsset > assets ) {
149+ this .assets = assets ;
150+ }
151+
114152 /**
115153 * Timestamp of the monitor creation.
116154 *
@@ -560,7 +598,8 @@ public boolean equals(Object o) {
560598 return false ;
561599 }
562600 Monitor monitor = (Monitor ) o ;
563- return Objects .equals (this .created , monitor .created )
601+ return Objects .equals (this .assets , monitor .assets )
602+ && Objects .equals (this .created , monitor .created )
564603 && Objects .equals (this .creator , monitor .creator )
565604 && Objects .equals (this .deleted , monitor .deleted )
566605 && Objects .equals (this .draftStatus , monitor .draftStatus )
@@ -584,6 +623,7 @@ public boolean equals(Object o) {
584623 @ Override
585624 public int hashCode () {
586625 return Objects .hash (
626+ assets ,
587627 created ,
588628 creator ,
589629 deleted ,
@@ -609,6 +649,7 @@ public int hashCode() {
609649 public String toString () {
610650 StringBuilder sb = new StringBuilder ();
611651 sb .append ("class Monitor {\n " );
652+ sb .append (" assets: " ).append (toIndentedString (assets )).append ("\n " );
612653 sb .append (" created: " ).append (toIndentedString (created )).append ("\n " );
613654 sb .append (" creator: " ).append (toIndentedString (creator )).append ("\n " );
614655 sb .append (" deleted: " ).append (toIndentedString (deleted )).append ("\n " );
0 commit comments