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

com.amazonaws.services.internetmonitor.model.ImpactedLocation Maven / Gradle / Ivy

/*
 * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.internetmonitor.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Information about a location impacted by a health event in Amazon CloudWatch Internet Monitor. *

*

* Geographic regions are hierarchically categorized into country, subdivision, metro and city geographic granularities. * The geographic region is identified based on the IP address used at the client locations. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ImpactedLocation implements Serializable, Cloneable, StructuredPojo { /** *

* The name of the network at an impacted location. *

*/ private String aSName; /** *

* The Autonomous System Number (ASN) of the network at an impacted location. *

*/ private Long aSNumber; /** *

* The name of the country where the health event is located. *

*/ private String country; /** *

* The subdivision location where the health event is located. The subdivision usually maps to states in most * countries (including the United States). For United Kingdom, it maps to a country (England, Scotland, Wales) or * province (Northern Ireland). *

*/ private String subdivision; /** *

* The metro area where the health event is located. *

*

* Metro indicates a metropolitan region in the United States, such as the region around New York City. In non-US * countries, this is a second-level subdivision. For example, in the United Kingdom, it could be a county, a London * borough, a unitary authority, council area, and so on. *

*/ private String metro; /** *

* The name of the city where the health event is located. *

*/ private String city; /** *

* The latitude where the health event is located. *

*/ private Double latitude; /** *

* The longitude where the health event is located. *

*/ private Double longitude; /** *

* The country code where the health event is located. The ISO 3166-2 codes for the country is provided, when * available. *

*/ private String countryCode; /** *

* The subdivision code where the health event is located. The ISO 3166-2 codes for country subdivisions is * provided, when available. *

*/ private String subdivisionCode; /** *

* The service location where the health event is located. *

*/ private String serviceLocation; /** *

* The status of the health event at an impacted location. *

*/ private String status; /** *

* The cause of the impairment. There are two types of network impairments: Amazon Web Services network issues or * internet issues. Internet issues are typically a problem with a network provider, like an internet service * provider (ISP). *

*/ private NetworkImpairment causedBy; /** *

* The calculated health at a specific location. *

*/ private InternetHealth internetHealth; /** *

* The name of the network at an impacted location. *

* * @param aSName * The name of the network at an impacted location. */ public void setASName(String aSName) { this.aSName = aSName; } /** *

* The name of the network at an impacted location. *

* * @return The name of the network at an impacted location. */ public String getASName() { return this.aSName; } /** *

* The name of the network at an impacted location. *

* * @param aSName * The name of the network at an impacted location. * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withASName(String aSName) { setASName(aSName); return this; } /** *

* The Autonomous System Number (ASN) of the network at an impacted location. *

* * @param aSNumber * The Autonomous System Number (ASN) of the network at an impacted location. */ public void setASNumber(Long aSNumber) { this.aSNumber = aSNumber; } /** *

* The Autonomous System Number (ASN) of the network at an impacted location. *

* * @return The Autonomous System Number (ASN) of the network at an impacted location. */ public Long getASNumber() { return this.aSNumber; } /** *

* The Autonomous System Number (ASN) of the network at an impacted location. *

* * @param aSNumber * The Autonomous System Number (ASN) of the network at an impacted location. * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withASNumber(Long aSNumber) { setASNumber(aSNumber); return this; } /** *

* The name of the country where the health event is located. *

* * @param country * The name of the country where the health event is located. */ public void setCountry(String country) { this.country = country; } /** *

* The name of the country where the health event is located. *

* * @return The name of the country where the health event is located. */ public String getCountry() { return this.country; } /** *

* The name of the country where the health event is located. *

* * @param country * The name of the country where the health event is located. * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withCountry(String country) { setCountry(country); return this; } /** *

* The subdivision location where the health event is located. The subdivision usually maps to states in most * countries (including the United States). For United Kingdom, it maps to a country (England, Scotland, Wales) or * province (Northern Ireland). *

* * @param subdivision * The subdivision location where the health event is located. The subdivision usually maps to states in most * countries (including the United States). For United Kingdom, it maps to a country (England, Scotland, * Wales) or province (Northern Ireland). */ public void setSubdivision(String subdivision) { this.subdivision = subdivision; } /** *

* The subdivision location where the health event is located. The subdivision usually maps to states in most * countries (including the United States). For United Kingdom, it maps to a country (England, Scotland, Wales) or * province (Northern Ireland). *

* * @return The subdivision location where the health event is located. The subdivision usually maps to states in * most countries (including the United States). For United Kingdom, it maps to a country (England, * Scotland, Wales) or province (Northern Ireland). */ public String getSubdivision() { return this.subdivision; } /** *

* The subdivision location where the health event is located. The subdivision usually maps to states in most * countries (including the United States). For United Kingdom, it maps to a country (England, Scotland, Wales) or * province (Northern Ireland). *

* * @param subdivision * The subdivision location where the health event is located. The subdivision usually maps to states in most * countries (including the United States). For United Kingdom, it maps to a country (England, Scotland, * Wales) or province (Northern Ireland). * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withSubdivision(String subdivision) { setSubdivision(subdivision); return this; } /** *

* The metro area where the health event is located. *

*

* Metro indicates a metropolitan region in the United States, such as the region around New York City. In non-US * countries, this is a second-level subdivision. For example, in the United Kingdom, it could be a county, a London * borough, a unitary authority, council area, and so on. *

* * @param metro * The metro area where the health event is located.

*

* Metro indicates a metropolitan region in the United States, such as the region around New York City. In * non-US countries, this is a second-level subdivision. For example, in the United Kingdom, it could be a * county, a London borough, a unitary authority, council area, and so on. */ public void setMetro(String metro) { this.metro = metro; } /** *

* The metro area where the health event is located. *

*

* Metro indicates a metropolitan region in the United States, such as the region around New York City. In non-US * countries, this is a second-level subdivision. For example, in the United Kingdom, it could be a county, a London * borough, a unitary authority, council area, and so on. *

* * @return The metro area where the health event is located.

*

* Metro indicates a metropolitan region in the United States, such as the region around New York City. In * non-US countries, this is a second-level subdivision. For example, in the United Kingdom, it could be a * county, a London borough, a unitary authority, council area, and so on. */ public String getMetro() { return this.metro; } /** *

* The metro area where the health event is located. *

*

* Metro indicates a metropolitan region in the United States, such as the region around New York City. In non-US * countries, this is a second-level subdivision. For example, in the United Kingdom, it could be a county, a London * borough, a unitary authority, council area, and so on. *

* * @param metro * The metro area where the health event is located.

*

* Metro indicates a metropolitan region in the United States, such as the region around New York City. In * non-US countries, this is a second-level subdivision. For example, in the United Kingdom, it could be a * county, a London borough, a unitary authority, council area, and so on. * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withMetro(String metro) { setMetro(metro); return this; } /** *

* The name of the city where the health event is located. *

* * @param city * The name of the city where the health event is located. */ public void setCity(String city) { this.city = city; } /** *

* The name of the city where the health event is located. *

* * @return The name of the city where the health event is located. */ public String getCity() { return this.city; } /** *

* The name of the city where the health event is located. *

* * @param city * The name of the city where the health event is located. * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withCity(String city) { setCity(city); return this; } /** *

* The latitude where the health event is located. *

* * @param latitude * The latitude where the health event is located. */ public void setLatitude(Double latitude) { this.latitude = latitude; } /** *

* The latitude where the health event is located. *

* * @return The latitude where the health event is located. */ public Double getLatitude() { return this.latitude; } /** *

* The latitude where the health event is located. *

* * @param latitude * The latitude where the health event is located. * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withLatitude(Double latitude) { setLatitude(latitude); return this; } /** *

* The longitude where the health event is located. *

* * @param longitude * The longitude where the health event is located. */ public void setLongitude(Double longitude) { this.longitude = longitude; } /** *

* The longitude where the health event is located. *

* * @return The longitude where the health event is located. */ public Double getLongitude() { return this.longitude; } /** *

* The longitude where the health event is located. *

* * @param longitude * The longitude where the health event is located. * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withLongitude(Double longitude) { setLongitude(longitude); return this; } /** *

* The country code where the health event is located. The ISO 3166-2 codes for the country is provided, when * available. *

* * @param countryCode * The country code where the health event is located. The ISO 3166-2 codes for the country is provided, when * available. */ public void setCountryCode(String countryCode) { this.countryCode = countryCode; } /** *

* The country code where the health event is located. The ISO 3166-2 codes for the country is provided, when * available. *

* * @return The country code where the health event is located. The ISO 3166-2 codes for the country is provided, * when available. */ public String getCountryCode() { return this.countryCode; } /** *

* The country code where the health event is located. The ISO 3166-2 codes for the country is provided, when * available. *

* * @param countryCode * The country code where the health event is located. The ISO 3166-2 codes for the country is provided, when * available. * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withCountryCode(String countryCode) { setCountryCode(countryCode); return this; } /** *

* The subdivision code where the health event is located. The ISO 3166-2 codes for country subdivisions is * provided, when available. *

* * @param subdivisionCode * The subdivision code where the health event is located. The ISO 3166-2 codes for country subdivisions is * provided, when available. */ public void setSubdivisionCode(String subdivisionCode) { this.subdivisionCode = subdivisionCode; } /** *

* The subdivision code where the health event is located. The ISO 3166-2 codes for country subdivisions is * provided, when available. *

* * @return The subdivision code where the health event is located. The ISO 3166-2 codes for country subdivisions is * provided, when available. */ public String getSubdivisionCode() { return this.subdivisionCode; } /** *

* The subdivision code where the health event is located. The ISO 3166-2 codes for country subdivisions is * provided, when available. *

* * @param subdivisionCode * The subdivision code where the health event is located. The ISO 3166-2 codes for country subdivisions is * provided, when available. * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withSubdivisionCode(String subdivisionCode) { setSubdivisionCode(subdivisionCode); return this; } /** *

* The service location where the health event is located. *

* * @param serviceLocation * The service location where the health event is located. */ public void setServiceLocation(String serviceLocation) { this.serviceLocation = serviceLocation; } /** *

* The service location where the health event is located. *

* * @return The service location where the health event is located. */ public String getServiceLocation() { return this.serviceLocation; } /** *

* The service location where the health event is located. *

* * @param serviceLocation * The service location where the health event is located. * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withServiceLocation(String serviceLocation) { setServiceLocation(serviceLocation); return this; } /** *

* The status of the health event at an impacted location. *

* * @param status * The status of the health event at an impacted location. * @see HealthEventStatus */ public void setStatus(String status) { this.status = status; } /** *

* The status of the health event at an impacted location. *

* * @return The status of the health event at an impacted location. * @see HealthEventStatus */ public String getStatus() { return this.status; } /** *

* The status of the health event at an impacted location. *

* * @param status * The status of the health event at an impacted location. * @return Returns a reference to this object so that method calls can be chained together. * @see HealthEventStatus */ public ImpactedLocation withStatus(String status) { setStatus(status); return this; } /** *

* The status of the health event at an impacted location. *

* * @param status * The status of the health event at an impacted location. * @return Returns a reference to this object so that method calls can be chained together. * @see HealthEventStatus */ public ImpactedLocation withStatus(HealthEventStatus status) { this.status = status.toString(); return this; } /** *

* The cause of the impairment. There are two types of network impairments: Amazon Web Services network issues or * internet issues. Internet issues are typically a problem with a network provider, like an internet service * provider (ISP). *

* * @param causedBy * The cause of the impairment. There are two types of network impairments: Amazon Web Services network * issues or internet issues. Internet issues are typically a problem with a network provider, like an * internet service provider (ISP). */ public void setCausedBy(NetworkImpairment causedBy) { this.causedBy = causedBy; } /** *

* The cause of the impairment. There are two types of network impairments: Amazon Web Services network issues or * internet issues. Internet issues are typically a problem with a network provider, like an internet service * provider (ISP). *

* * @return The cause of the impairment. There are two types of network impairments: Amazon Web Services network * issues or internet issues. Internet issues are typically a problem with a network provider, like an * internet service provider (ISP). */ public NetworkImpairment getCausedBy() { return this.causedBy; } /** *

* The cause of the impairment. There are two types of network impairments: Amazon Web Services network issues or * internet issues. Internet issues are typically a problem with a network provider, like an internet service * provider (ISP). *

* * @param causedBy * The cause of the impairment. There are two types of network impairments: Amazon Web Services network * issues or internet issues. Internet issues are typically a problem with a network provider, like an * internet service provider (ISP). * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withCausedBy(NetworkImpairment causedBy) { setCausedBy(causedBy); return this; } /** *

* The calculated health at a specific location. *

* * @param internetHealth * The calculated health at a specific location. */ public void setInternetHealth(InternetHealth internetHealth) { this.internetHealth = internetHealth; } /** *

* The calculated health at a specific location. *

* * @return The calculated health at a specific location. */ public InternetHealth getInternetHealth() { return this.internetHealth; } /** *

* The calculated health at a specific location. *

* * @param internetHealth * The calculated health at a specific location. * @return Returns a reference to this object so that method calls can be chained together. */ public ImpactedLocation withInternetHealth(InternetHealth internetHealth) { setInternetHealth(internetHealth); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getASName() != null) sb.append("ASName: ").append(getASName()).append(","); if (getASNumber() != null) sb.append("ASNumber: ").append(getASNumber()).append(","); if (getCountry() != null) sb.append("Country: ").append(getCountry()).append(","); if (getSubdivision() != null) sb.append("Subdivision: ").append(getSubdivision()).append(","); if (getMetro() != null) sb.append("Metro: ").append(getMetro()).append(","); if (getCity() != null) sb.append("City: ").append(getCity()).append(","); if (getLatitude() != null) sb.append("Latitude: ").append(getLatitude()).append(","); if (getLongitude() != null) sb.append("Longitude: ").append(getLongitude()).append(","); if (getCountryCode() != null) sb.append("CountryCode: ").append(getCountryCode()).append(","); if (getSubdivisionCode() != null) sb.append("SubdivisionCode: ").append(getSubdivisionCode()).append(","); if (getServiceLocation() != null) sb.append("ServiceLocation: ").append(getServiceLocation()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getCausedBy() != null) sb.append("CausedBy: ").append(getCausedBy()).append(","); if (getInternetHealth() != null) sb.append("InternetHealth: ").append(getInternetHealth()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ImpactedLocation == false) return false; ImpactedLocation other = (ImpactedLocation) obj; if (other.getASName() == null ^ this.getASName() == null) return false; if (other.getASName() != null && other.getASName().equals(this.getASName()) == false) return false; if (other.getASNumber() == null ^ this.getASNumber() == null) return false; if (other.getASNumber() != null && other.getASNumber().equals(this.getASNumber()) == false) return false; if (other.getCountry() == null ^ this.getCountry() == null) return false; if (other.getCountry() != null && other.getCountry().equals(this.getCountry()) == false) return false; if (other.getSubdivision() == null ^ this.getSubdivision() == null) return false; if (other.getSubdivision() != null && other.getSubdivision().equals(this.getSubdivision()) == false) return false; if (other.getMetro() == null ^ this.getMetro() == null) return false; if (other.getMetro() != null && other.getMetro().equals(this.getMetro()) == false) return false; if (other.getCity() == null ^ this.getCity() == null) return false; if (other.getCity() != null && other.getCity().equals(this.getCity()) == false) return false; if (other.getLatitude() == null ^ this.getLatitude() == null) return false; if (other.getLatitude() != null && other.getLatitude().equals(this.getLatitude()) == false) return false; if (other.getLongitude() == null ^ this.getLongitude() == null) return false; if (other.getLongitude() != null && other.getLongitude().equals(this.getLongitude()) == false) return false; if (other.getCountryCode() == null ^ this.getCountryCode() == null) return false; if (other.getCountryCode() != null && other.getCountryCode().equals(this.getCountryCode()) == false) return false; if (other.getSubdivisionCode() == null ^ this.getSubdivisionCode() == null) return false; if (other.getSubdivisionCode() != null && other.getSubdivisionCode().equals(this.getSubdivisionCode()) == false) return false; if (other.getServiceLocation() == null ^ this.getServiceLocation() == null) return false; if (other.getServiceLocation() != null && other.getServiceLocation().equals(this.getServiceLocation()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getCausedBy() == null ^ this.getCausedBy() == null) return false; if (other.getCausedBy() != null && other.getCausedBy().equals(this.getCausedBy()) == false) return false; if (other.getInternetHealth() == null ^ this.getInternetHealth() == null) return false; if (other.getInternetHealth() != null && other.getInternetHealth().equals(this.getInternetHealth()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getASName() == null) ? 0 : getASName().hashCode()); hashCode = prime * hashCode + ((getASNumber() == null) ? 0 : getASNumber().hashCode()); hashCode = prime * hashCode + ((getCountry() == null) ? 0 : getCountry().hashCode()); hashCode = prime * hashCode + ((getSubdivision() == null) ? 0 : getSubdivision().hashCode()); hashCode = prime * hashCode + ((getMetro() == null) ? 0 : getMetro().hashCode()); hashCode = prime * hashCode + ((getCity() == null) ? 0 : getCity().hashCode()); hashCode = prime * hashCode + ((getLatitude() == null) ? 0 : getLatitude().hashCode()); hashCode = prime * hashCode + ((getLongitude() == null) ? 0 : getLongitude().hashCode()); hashCode = prime * hashCode + ((getCountryCode() == null) ? 0 : getCountryCode().hashCode()); hashCode = prime * hashCode + ((getSubdivisionCode() == null) ? 0 : getSubdivisionCode().hashCode()); hashCode = prime * hashCode + ((getServiceLocation() == null) ? 0 : getServiceLocation().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getCausedBy() == null) ? 0 : getCausedBy().hashCode()); hashCode = prime * hashCode + ((getInternetHealth() == null) ? 0 : getInternetHealth().hashCode()); return hashCode; } @Override public ImpactedLocation clone() { try { return (ImpactedLocation) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.internetmonitor.model.transform.ImpactedLocationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy