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

com.oracle.bmc.healthchecks.model.HttpMonitorSummary Maven / Gradle / Ivy

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

/**
 * A summary containing all of the mutable and immutable properties for an HTTP monitor. 
* 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: 20180501") @com.fasterxml.jackson.databind.annotation.JsonDeserialize( builder = HttpMonitorSummary.Builder.class) @com.fasterxml.jackson.annotation.JsonFilter( com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) public final class HttpMonitorSummary extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { @Deprecated @java.beans.ConstructorProperties({ "id", "resultsUrl", "homeRegion", "timeCreated", "compartmentId", "displayName", "intervalInSeconds", "isEnabled", "freeformTags", "definedTags", "protocol" }) public HttpMonitorSummary( String id, String resultsUrl, String homeRegion, java.util.Date timeCreated, String compartmentId, String displayName, Integer intervalInSeconds, Boolean isEnabled, java.util.Map freeformTags, java.util.Map> definedTags, HttpProbeProtocol protocol) { super(); this.id = id; this.resultsUrl = resultsUrl; this.homeRegion = homeRegion; this.timeCreated = timeCreated; this.compartmentId = compartmentId; this.displayName = displayName; this.intervalInSeconds = intervalInSeconds; this.isEnabled = isEnabled; this.freeformTags = freeformTags; this.definedTags = definedTags; this.protocol = protocol; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** The OCID of the resource. */ @com.fasterxml.jackson.annotation.JsonProperty("id") private String id; /** * The OCID of the resource. * * @param id the value to set * @return this builder */ public Builder id(String id) { this.id = id; this.__explicitlySet__.add("id"); return this; } /** A URL for fetching the probe results. */ @com.fasterxml.jackson.annotation.JsonProperty("resultsUrl") private String resultsUrl; /** * A URL for fetching the probe results. * * @param resultsUrl the value to set * @return this builder */ public Builder resultsUrl(String resultsUrl) { this.resultsUrl = resultsUrl; this.__explicitlySet__.add("resultsUrl"); return this; } /** The region where updates must be made and where results must be fetched from. */ @com.fasterxml.jackson.annotation.JsonProperty("homeRegion") private String homeRegion; /** * The region where updates must be made and where results must be fetched from. * * @param homeRegion the value to set * @return this builder */ public Builder homeRegion(String homeRegion) { this.homeRegion = homeRegion; this.__explicitlySet__.add("homeRegion"); return this; } /** The RFC 3339-formatted creation date and time of the probe. */ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") private java.util.Date timeCreated; /** * The RFC 3339-formatted creation date and time of the probe. * * @param timeCreated the value to set * @return this builder */ public Builder timeCreated(java.util.Date timeCreated) { this.timeCreated = timeCreated; this.__explicitlySet__.add("timeCreated"); return this; } /** The OCID of the compartment. */ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** * The OCID of the compartment. * * @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 and mutable name suitable for display in a user interface. */ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private String displayName; /** * A user-friendly and mutable name suitable for display in a user interface. * * @param displayName the value to set * @return this builder */ public Builder displayName(String displayName) { this.displayName = displayName; this.__explicitlySet__.add("displayName"); return this; } /** The monitor interval in seconds. Valid values: 10, 30, and 60. */ @com.fasterxml.jackson.annotation.JsonProperty("intervalInSeconds") private Integer intervalInSeconds; /** * The monitor interval in seconds. Valid values: 10, 30, and 60. * * @param intervalInSeconds the value to set * @return this builder */ public Builder intervalInSeconds(Integer intervalInSeconds) { this.intervalInSeconds = intervalInSeconds; this.__explicitlySet__.add("intervalInSeconds"); return this; } /** Enables or disables the monitor. Set to 'true' to launch monitoring. */ @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") private Boolean isEnabled; /** * Enables or disables the monitor. Set to 'true' to launch monitoring. * * @param isEnabled the value to set * @return this builder */ public Builder isEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; this.__explicitlySet__.add("isEnabled"); return this; } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined * name, type, or namespace. For more information, see [Resource * Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: * {@code {"Department": "Finance"}} */ @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") private java.util.Map freeformTags; /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined * name, type, or namespace. For more information, see [Resource * Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: * {@code {"Department": "Finance"}} * * @param freeformTags the value to set * @return this builder */ public Builder freeformTags(java.util.Map freeformTags) { this.freeformTags = freeformTags; this.__explicitlySet__.add("freeformTags"); return this; } /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. For * more information, see [Resource * Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: * {@code {"Operations": {"CostCenter": "42"}}} */ @com.fasterxml.jackson.annotation.JsonProperty("definedTags") private java.util.Map> definedTags; /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. For * more information, see [Resource * Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: * {@code {"Operations": {"CostCenter": "42"}}} * * @param definedTags the value to set * @return this builder */ public Builder definedTags( java.util.Map> definedTags) { this.definedTags = definedTags; this.__explicitlySet__.add("definedTags"); return this; } @com.fasterxml.jackson.annotation.JsonProperty("protocol") private HttpProbeProtocol protocol; public Builder protocol(HttpProbeProtocol protocol) { this.protocol = protocol; this.__explicitlySet__.add("protocol"); return this; } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public HttpMonitorSummary build() { HttpMonitorSummary model = new HttpMonitorSummary( this.id, this.resultsUrl, this.homeRegion, this.timeCreated, this.compartmentId, this.displayName, this.intervalInSeconds, this.isEnabled, this.freeformTags, this.definedTags, this.protocol); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } return model; } @com.fasterxml.jackson.annotation.JsonIgnore public Builder copy(HttpMonitorSummary model) { if (model.wasPropertyExplicitlySet("id")) { this.id(model.getId()); } if (model.wasPropertyExplicitlySet("resultsUrl")) { this.resultsUrl(model.getResultsUrl()); } if (model.wasPropertyExplicitlySet("homeRegion")) { this.homeRegion(model.getHomeRegion()); } if (model.wasPropertyExplicitlySet("timeCreated")) { this.timeCreated(model.getTimeCreated()); } if (model.wasPropertyExplicitlySet("compartmentId")) { this.compartmentId(model.getCompartmentId()); } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } if (model.wasPropertyExplicitlySet("intervalInSeconds")) { this.intervalInSeconds(model.getIntervalInSeconds()); } if (model.wasPropertyExplicitlySet("isEnabled")) { this.isEnabled(model.getIsEnabled()); } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } if (model.wasPropertyExplicitlySet("protocol")) { this.protocol(model.getProtocol()); } return this; } } /** Create a new builder. */ public static Builder builder() { return new Builder(); } public Builder toBuilder() { return new Builder().copy(this); } /** The OCID of the resource. */ @com.fasterxml.jackson.annotation.JsonProperty("id") private final String id; /** * The OCID of the resource. * * @return the value */ public String getId() { return id; } /** A URL for fetching the probe results. */ @com.fasterxml.jackson.annotation.JsonProperty("resultsUrl") private final String resultsUrl; /** * A URL for fetching the probe results. * * @return the value */ public String getResultsUrl() { return resultsUrl; } /** The region where updates must be made and where results must be fetched from. */ @com.fasterxml.jackson.annotation.JsonProperty("homeRegion") private final String homeRegion; /** * The region where updates must be made and where results must be fetched from. * * @return the value */ public String getHomeRegion() { return homeRegion; } /** The RFC 3339-formatted creation date and time of the probe. */ @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") private final java.util.Date timeCreated; /** * The RFC 3339-formatted creation date and time of the probe. * * @return the value */ public java.util.Date getTimeCreated() { return timeCreated; } /** The OCID of the compartment. */ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** * The OCID of the compartment. * * @return the value */ public String getCompartmentId() { return compartmentId; } /** A user-friendly and mutable name suitable for display in a user interface. */ @com.fasterxml.jackson.annotation.JsonProperty("displayName") private final String displayName; /** * A user-friendly and mutable name suitable for display in a user interface. * * @return the value */ public String getDisplayName() { return displayName; } /** The monitor interval in seconds. Valid values: 10, 30, and 60. */ @com.fasterxml.jackson.annotation.JsonProperty("intervalInSeconds") private final Integer intervalInSeconds; /** * The monitor interval in seconds. Valid values: 10, 30, and 60. * * @return the value */ public Integer getIntervalInSeconds() { return intervalInSeconds; } /** Enables or disables the monitor. Set to 'true' to launch monitoring. */ @com.fasterxml.jackson.annotation.JsonProperty("isEnabled") private final Boolean isEnabled; /** * Enables or disables the monitor. Set to 'true' to launch monitoring. * * @return the value */ public Boolean getIsEnabled() { return isEnabled; } /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined * name, type, or namespace. For more information, see [Resource * Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: * {@code {"Department": "Finance"}} */ @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") private final java.util.Map freeformTags; /** * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined * name, type, or namespace. For more information, see [Resource * Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: * {@code {"Department": "Finance"}} * * @return the value */ public java.util.Map getFreeformTags() { return freeformTags; } /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more * information, see [Resource * Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: * {@code {"Operations": {"CostCenter": "42"}}} */ @com.fasterxml.jackson.annotation.JsonProperty("definedTags") private final java.util.Map> definedTags; /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more * information, see [Resource * Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: * {@code {"Operations": {"CostCenter": "42"}}} * * @return the value */ public java.util.Map> getDefinedTags() { return definedTags; } @com.fasterxml.jackson.annotation.JsonProperty("protocol") private final HttpProbeProtocol protocol; public HttpProbeProtocol getProtocol() { return protocol; } @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("HttpMonitorSummary("); sb.append("super=").append(super.toString()); sb.append("id=").append(String.valueOf(this.id)); sb.append(", resultsUrl=").append(String.valueOf(this.resultsUrl)); sb.append(", homeRegion=").append(String.valueOf(this.homeRegion)); sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", intervalInSeconds=").append(String.valueOf(this.intervalInSeconds)); sb.append(", isEnabled=").append(String.valueOf(this.isEnabled)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", protocol=").append(String.valueOf(this.protocol)); sb.append(")"); return sb.toString(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof HttpMonitorSummary)) { return false; } HttpMonitorSummary other = (HttpMonitorSummary) o; return java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.resultsUrl, other.resultsUrl) && java.util.Objects.equals(this.homeRegion, other.homeRegion) && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.intervalInSeconds, other.intervalInSeconds) && java.util.Objects.equals(this.isEnabled, other.isEnabled) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.protocol, other.protocol) && super.equals(other); } @Override public int hashCode() { final int PRIME = 59; int result = 1; result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) + (this.resultsUrl == null ? 43 : this.resultsUrl.hashCode()); result = (result * PRIME) + (this.homeRegion == null ? 43 : this.homeRegion.hashCode()); result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); result = (result * PRIME) + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.intervalInSeconds == null ? 43 : this.intervalInSeconds.hashCode()); result = (result * PRIME) + (this.isEnabled == null ? 43 : this.isEnabled.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.protocol == null ? 43 : this.protocol.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy