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

com.amazonaws.services.applicationsignals.model.ServiceDependent Maven / Gradle / Ivy

/*
 * Copyright 2019-2024 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.applicationsignals.model;

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

/**
 * 

* This structure contains information about a service dependent that was discovered by Application Signals. A dependent * is an entity that invoked the specified service during the provided time range. Dependents include other services, * CloudWatch Synthetics canaries, and clients that are instrumented with CloudWatch RUM app monitors. *

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

* If the invoked entity is an operation on an entity, the name of that dependent operation is displayed here. *

*/ private String operationName; /** *

* This is a string-to-string map. It can include the following fields. *

*
    *
  • *

    * Type designates the type of object this is. *

    *
  • *
  • *

    * ResourceType specifies the type of the resource. This field is used only when the value of the * Type field is Resource or AWS::Resource. *

    *
  • *
  • *

    * Name specifies the name of the object. This is used only if the value of the Type field * is Service, RemoteService, or AWS::Service. *

    *
  • *
  • *

    * Identifier identifies the resource objects of this resource. This is used only if the value of the * Type field is Resource or AWS::Resource. *

    *
  • *
  • *

    * Environment specifies the location where this object is hosted, or what it belongs to. *

    *
  • *
*/ private java.util.Map dependentKeyAttributes; /** *

* If the dependent invoker was a service that invoked it from an operation, the name of that dependent operation is * displayed here. *

*/ private String dependentOperationName; /** *

* An array of structures that each contain information about one metric associated with this service dependent that * was discovered by Application Signals. *

*/ private java.util.List metricReferences; /** *

* If the invoked entity is an operation on an entity, the name of that dependent operation is displayed here. *

* * @param operationName * If the invoked entity is an operation on an entity, the name of that dependent operation is displayed * here. */ public void setOperationName(String operationName) { this.operationName = operationName; } /** *

* If the invoked entity is an operation on an entity, the name of that dependent operation is displayed here. *

* * @return If the invoked entity is an operation on an entity, the name of that dependent operation is displayed * here. */ public String getOperationName() { return this.operationName; } /** *

* If the invoked entity is an operation on an entity, the name of that dependent operation is displayed here. *

* * @param operationName * If the invoked entity is an operation on an entity, the name of that dependent operation is displayed * here. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceDependent withOperationName(String operationName) { setOperationName(operationName); return this; } /** *

* This is a string-to-string map. It can include the following fields. *

*
    *
  • *

    * Type designates the type of object this is. *

    *
  • *
  • *

    * ResourceType specifies the type of the resource. This field is used only when the value of the * Type field is Resource or AWS::Resource. *

    *
  • *
  • *

    * Name specifies the name of the object. This is used only if the value of the Type field * is Service, RemoteService, or AWS::Service. *

    *
  • *
  • *

    * Identifier identifies the resource objects of this resource. This is used only if the value of the * Type field is Resource or AWS::Resource. *

    *
  • *
  • *

    * Environment specifies the location where this object is hosted, or what it belongs to. *

    *
  • *
* * @return This is a string-to-string map. It can include the following fields.

*
    *
  • *

    * Type designates the type of object this is. *

    *
  • *
  • *

    * ResourceType specifies the type of the resource. This field is used only when the value of * the Type field is Resource or AWS::Resource. *

    *
  • *
  • *

    * Name specifies the name of the object. This is used only if the value of the * Type field is Service, RemoteService, or AWS::Service * . *

    *
  • *
  • *

    * Identifier identifies the resource objects of this resource. This is used only if the value * of the Type field is Resource or AWS::Resource. *

    *
  • *
  • *

    * Environment specifies the location where this object is hosted, or what it belongs to. *

    *
  • */ public java.util.Map getDependentKeyAttributes() { return dependentKeyAttributes; } /** *

    * This is a string-to-string map. It can include the following fields. *

    *
      *
    • *

      * Type designates the type of object this is. *

      *
    • *
    • *

      * ResourceType specifies the type of the resource. This field is used only when the value of the * Type field is Resource or AWS::Resource. *

      *
    • *
    • *

      * Name specifies the name of the object. This is used only if the value of the Type field * is Service, RemoteService, or AWS::Service. *

      *
    • *
    • *

      * Identifier identifies the resource objects of this resource. This is used only if the value of the * Type field is Resource or AWS::Resource. *

      *
    • *
    • *

      * Environment specifies the location where this object is hosted, or what it belongs to. *

      *
    • *
    * * @param dependentKeyAttributes * This is a string-to-string map. It can include the following fields.

    *
      *
    • *

      * Type designates the type of object this is. *

      *
    • *
    • *

      * ResourceType specifies the type of the resource. This field is used only when the value of * the Type field is Resource or AWS::Resource. *

      *
    • *
    • *

      * Name specifies the name of the object. This is used only if the value of the * Type field is Service, RemoteService, or AWS::Service. *

      *
    • *
    • *

      * Identifier identifies the resource objects of this resource. This is used only if the value * of the Type field is Resource or AWS::Resource. *

      *
    • *
    • *

      * Environment specifies the location where this object is hosted, or what it belongs to. *

      *
    • */ public void setDependentKeyAttributes(java.util.Map dependentKeyAttributes) { this.dependentKeyAttributes = dependentKeyAttributes; } /** *

      * This is a string-to-string map. It can include the following fields. *

      *
        *
      • *

        * Type designates the type of object this is. *

        *
      • *
      • *

        * ResourceType specifies the type of the resource. This field is used only when the value of the * Type field is Resource or AWS::Resource. *

        *
      • *
      • *

        * Name specifies the name of the object. This is used only if the value of the Type field * is Service, RemoteService, or AWS::Service. *

        *
      • *
      • *

        * Identifier identifies the resource objects of this resource. This is used only if the value of the * Type field is Resource or AWS::Resource. *

        *
      • *
      • *

        * Environment specifies the location where this object is hosted, or what it belongs to. *

        *
      • *
      * * @param dependentKeyAttributes * This is a string-to-string map. It can include the following fields.

      *
        *
      • *

        * Type designates the type of object this is. *

        *
      • *
      • *

        * ResourceType specifies the type of the resource. This field is used only when the value of * the Type field is Resource or AWS::Resource. *

        *
      • *
      • *

        * Name specifies the name of the object. This is used only if the value of the * Type field is Service, RemoteService, or AWS::Service. *

        *
      • *
      • *

        * Identifier identifies the resource objects of this resource. This is used only if the value * of the Type field is Resource or AWS::Resource. *

        *
      • *
      • *

        * Environment specifies the location where this object is hosted, or what it belongs to. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceDependent withDependentKeyAttributes(java.util.Map dependentKeyAttributes) { setDependentKeyAttributes(dependentKeyAttributes); return this; } /** * Add a single DependentKeyAttributes entry * * @see ServiceDependent#withDependentKeyAttributes * @returns a reference to this object so that method calls can be chained together. */ public ServiceDependent addDependentKeyAttributesEntry(String key, String value) { if (null == this.dependentKeyAttributes) { this.dependentKeyAttributes = new java.util.HashMap(); } if (this.dependentKeyAttributes.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.dependentKeyAttributes.put(key, value); return this; } /** * Removes all the entries added into DependentKeyAttributes. * * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceDependent clearDependentKeyAttributesEntries() { this.dependentKeyAttributes = null; return this; } /** *

        * If the dependent invoker was a service that invoked it from an operation, the name of that dependent operation is * displayed here. *

        * * @param dependentOperationName * If the dependent invoker was a service that invoked it from an operation, the name of that dependent * operation is displayed here. */ public void setDependentOperationName(String dependentOperationName) { this.dependentOperationName = dependentOperationName; } /** *

        * If the dependent invoker was a service that invoked it from an operation, the name of that dependent operation is * displayed here. *

        * * @return If the dependent invoker was a service that invoked it from an operation, the name of that dependent * operation is displayed here. */ public String getDependentOperationName() { return this.dependentOperationName; } /** *

        * If the dependent invoker was a service that invoked it from an operation, the name of that dependent operation is * displayed here. *

        * * @param dependentOperationName * If the dependent invoker was a service that invoked it from an operation, the name of that dependent * operation is displayed here. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceDependent withDependentOperationName(String dependentOperationName) { setDependentOperationName(dependentOperationName); return this; } /** *

        * An array of structures that each contain information about one metric associated with this service dependent that * was discovered by Application Signals. *

        * * @return An array of structures that each contain information about one metric associated with this service * dependent that was discovered by Application Signals. */ public java.util.List getMetricReferences() { return metricReferences; } /** *

        * An array of structures that each contain information about one metric associated with this service dependent that * was discovered by Application Signals. *

        * * @param metricReferences * An array of structures that each contain information about one metric associated with this service * dependent that was discovered by Application Signals. */ public void setMetricReferences(java.util.Collection metricReferences) { if (metricReferences == null) { this.metricReferences = null; return; } this.metricReferences = new java.util.ArrayList(metricReferences); } /** *

        * An array of structures that each contain information about one metric associated with this service dependent that * was discovered by Application Signals. *

        *

        * NOTE: This method appends the values to the existing list (if any). Use * {@link #setMetricReferences(java.util.Collection)} or {@link #withMetricReferences(java.util.Collection)} if you * want to override the existing values. *

        * * @param metricReferences * An array of structures that each contain information about one metric associated with this service * dependent that was discovered by Application Signals. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceDependent withMetricReferences(MetricReference... metricReferences) { if (this.metricReferences == null) { setMetricReferences(new java.util.ArrayList(metricReferences.length)); } for (MetricReference ele : metricReferences) { this.metricReferences.add(ele); } return this; } /** *

        * An array of structures that each contain information about one metric associated with this service dependent that * was discovered by Application Signals. *

        * * @param metricReferences * An array of structures that each contain information about one metric associated with this service * dependent that was discovered by Application Signals. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceDependent withMetricReferences(java.util.Collection metricReferences) { setMetricReferences(metricReferences); 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 (getOperationName() != null) sb.append("OperationName: ").append(getOperationName()).append(","); if (getDependentKeyAttributes() != null) sb.append("DependentKeyAttributes: ").append(getDependentKeyAttributes()).append(","); if (getDependentOperationName() != null) sb.append("DependentOperationName: ").append(getDependentOperationName()).append(","); if (getMetricReferences() != null) sb.append("MetricReferences: ").append(getMetricReferences()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ServiceDependent == false) return false; ServiceDependent other = (ServiceDependent) obj; if (other.getOperationName() == null ^ this.getOperationName() == null) return false; if (other.getOperationName() != null && other.getOperationName().equals(this.getOperationName()) == false) return false; if (other.getDependentKeyAttributes() == null ^ this.getDependentKeyAttributes() == null) return false; if (other.getDependentKeyAttributes() != null && other.getDependentKeyAttributes().equals(this.getDependentKeyAttributes()) == false) return false; if (other.getDependentOperationName() == null ^ this.getDependentOperationName() == null) return false; if (other.getDependentOperationName() != null && other.getDependentOperationName().equals(this.getDependentOperationName()) == false) return false; if (other.getMetricReferences() == null ^ this.getMetricReferences() == null) return false; if (other.getMetricReferences() != null && other.getMetricReferences().equals(this.getMetricReferences()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getOperationName() == null) ? 0 : getOperationName().hashCode()); hashCode = prime * hashCode + ((getDependentKeyAttributes() == null) ? 0 : getDependentKeyAttributes().hashCode()); hashCode = prime * hashCode + ((getDependentOperationName() == null) ? 0 : getDependentOperationName().hashCode()); hashCode = prime * hashCode + ((getMetricReferences() == null) ? 0 : getMetricReferences().hashCode()); return hashCode; } @Override public ServiceDependent clone() { try { return (ServiceDependent) 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.applicationsignals.model.transform.ServiceDependentMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy