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

software.amazon.awssdk.services.applicationinsights.model.ApplicationInfo Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Application Insights module holds the client classes that are used for communicating with Application Insights.

There is a newer version: 2.28.4
Show newest version
/*
 * Copyright 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 software.amazon.awssdk.services.applicationinsights.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Describes the status of the application. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ApplicationInfo implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField RESOURCE_GROUP_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(ApplicationInfo::resourceGroupName)).setter(setter(Builder::resourceGroupName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceGroupName").build()).build(); private static final SdkField LIFE_CYCLE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(ApplicationInfo::lifeCycle)).setter(setter(Builder::lifeCycle)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LifeCycle").build()).build(); private static final SdkField OPS_ITEM_SNS_TOPIC_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(ApplicationInfo::opsItemSNSTopicArn)).setter(setter(Builder::opsItemSNSTopicArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OpsItemSNSTopicArn").build()) .build(); private static final SdkField OPS_CENTER_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(ApplicationInfo::opsCenterEnabled)).setter(setter(Builder::opsCenterEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OpsCenterEnabled").build()).build(); private static final SdkField CWE_MONITOR_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(ApplicationInfo::cweMonitorEnabled)).setter(setter(Builder::cweMonitorEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CWEMonitorEnabled").build()).build(); private static final SdkField REMARKS_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(ApplicationInfo::remarks)).setter(setter(Builder::remarks)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Remarks").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(RESOURCE_GROUP_NAME_FIELD, LIFE_CYCLE_FIELD, OPS_ITEM_SNS_TOPIC_ARN_FIELD, OPS_CENTER_ENABLED_FIELD, CWE_MONITOR_ENABLED_FIELD, REMARKS_FIELD)); private static final long serialVersionUID = 1L; private final String resourceGroupName; private final String lifeCycle; private final String opsItemSNSTopicArn; private final Boolean opsCenterEnabled; private final Boolean cweMonitorEnabled; private final String remarks; private ApplicationInfo(BuilderImpl builder) { this.resourceGroupName = builder.resourceGroupName; this.lifeCycle = builder.lifeCycle; this.opsItemSNSTopicArn = builder.opsItemSNSTopicArn; this.opsCenterEnabled = builder.opsCenterEnabled; this.cweMonitorEnabled = builder.cweMonitorEnabled; this.remarks = builder.remarks; } /** *

* The name of the resource group used for the application. *

* * @return The name of the resource group used for the application. */ public String resourceGroupName() { return resourceGroupName; } /** *

* The lifecycle of the application. *

* * @return The lifecycle of the application. */ public String lifeCycle() { return lifeCycle; } /** *

* The SNS topic provided to Application Insights that is associated to the created opsItems to receive SNS * notifications for opsItem updates. *

* * @return The SNS topic provided to Application Insights that is associated to the created opsItems to receive SNS * notifications for opsItem updates. */ public String opsItemSNSTopicArn() { return opsItemSNSTopicArn; } /** *

* Indicates whether Application Insights will create opsItems for any problem detected by Application Insights for * an application. *

* * @return Indicates whether Application Insights will create opsItems for any problem detected by Application * Insights for an application. */ public Boolean opsCenterEnabled() { return opsCenterEnabled; } /** *

* Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as * instance terminated, failed deployment, and others. *

* * @return Indicates whether Application Insights can listen to CloudWatch events for the application resources, * such as instance terminated, failed deployment, and others. */ public Boolean cweMonitorEnabled() { return cweMonitorEnabled; } /** *

* The issues on the user side that block Application Insights from successfully monitoring an application. Example * remarks include: *

*
    *
  • *

    * “Configuring application, detected 1 Errors, 3 Warnings” *

    *
  • *
  • *

    * “Configuring application, detected 1 Unconfigured Components” *

    *
  • *
* * @return The issues on the user side that block Application Insights from successfully monitoring an application. * Example remarks include:

*
    *
  • *

    * “Configuring application, detected 1 Errors, 3 Warnings” *

    *
  • *
  • *

    * “Configuring application, detected 1 Unconfigured Components” *

    *
  • */ public String remarks() { return remarks; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(resourceGroupName()); hashCode = 31 * hashCode + Objects.hashCode(lifeCycle()); hashCode = 31 * hashCode + Objects.hashCode(opsItemSNSTopicArn()); hashCode = 31 * hashCode + Objects.hashCode(opsCenterEnabled()); hashCode = 31 * hashCode + Objects.hashCode(cweMonitorEnabled()); hashCode = 31 * hashCode + Objects.hashCode(remarks()); return hashCode; } @Override public boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ApplicationInfo)) { return false; } ApplicationInfo other = (ApplicationInfo) obj; return Objects.equals(resourceGroupName(), other.resourceGroupName()) && Objects.equals(lifeCycle(), other.lifeCycle()) && Objects.equals(opsItemSNSTopicArn(), other.opsItemSNSTopicArn()) && Objects.equals(opsCenterEnabled(), other.opsCenterEnabled()) && Objects.equals(cweMonitorEnabled(), other.cweMonitorEnabled()) && Objects.equals(remarks(), other.remarks()); } /** * 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. */ @Override public String toString() { return ToString.builder("ApplicationInfo").add("ResourceGroupName", resourceGroupName()).add("LifeCycle", lifeCycle()) .add("OpsItemSNSTopicArn", opsItemSNSTopicArn()).add("OpsCenterEnabled", opsCenterEnabled()) .add("CWEMonitorEnabled", cweMonitorEnabled()).add("Remarks", remarks()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ResourceGroupName": return Optional.ofNullable(clazz.cast(resourceGroupName())); case "LifeCycle": return Optional.ofNullable(clazz.cast(lifeCycle())); case "OpsItemSNSTopicArn": return Optional.ofNullable(clazz.cast(opsItemSNSTopicArn())); case "OpsCenterEnabled": return Optional.ofNullable(clazz.cast(opsCenterEnabled())); case "CWEMonitorEnabled": return Optional.ofNullable(clazz.cast(cweMonitorEnabled())); case "Remarks": return Optional.ofNullable(clazz.cast(remarks())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ApplicationInfo) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

    * The name of the resource group used for the application. *

    * * @param resourceGroupName * The name of the resource group used for the application. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceGroupName(String resourceGroupName); /** *

    * The lifecycle of the application. *

    * * @param lifeCycle * The lifecycle of the application. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lifeCycle(String lifeCycle); /** *

    * The SNS topic provided to Application Insights that is associated to the created opsItems to receive SNS * notifications for opsItem updates. *

    * * @param opsItemSNSTopicArn * The SNS topic provided to Application Insights that is associated to the created opsItems to receive * SNS notifications for opsItem updates. * @return Returns a reference to this object so that method calls can be chained together. */ Builder opsItemSNSTopicArn(String opsItemSNSTopicArn); /** *

    * Indicates whether Application Insights will create opsItems for any problem detected by Application Insights * for an application. *

    * * @param opsCenterEnabled * Indicates whether Application Insights will create opsItems for any problem detected by Application * Insights for an application. * @return Returns a reference to this object so that method calls can be chained together. */ Builder opsCenterEnabled(Boolean opsCenterEnabled); /** *

    * Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as * instance terminated, failed deployment, and others. *

    * * @param cweMonitorEnabled * Indicates whether Application Insights can listen to CloudWatch events for the application resources, * such as instance terminated, failed deployment, and others. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cweMonitorEnabled(Boolean cweMonitorEnabled); /** *

    * The issues on the user side that block Application Insights from successfully monitoring an application. * Example remarks include: *

    *
      *
    • *

      * “Configuring application, detected 1 Errors, 3 Warnings” *

      *
    • *
    • *

      * “Configuring application, detected 1 Unconfigured Components” *

      *
    • *
    * * @param remarks * The issues on the user side that block Application Insights from successfully monitoring an * application. Example remarks include:

    *
      *
    • *

      * “Configuring application, detected 1 Errors, 3 Warnings” *

      *
    • *
    • *

      * “Configuring application, detected 1 Unconfigured Components” *

      *
    • * @return Returns a reference to this object so that method calls can be chained together. */ Builder remarks(String remarks); } static final class BuilderImpl implements Builder { private String resourceGroupName; private String lifeCycle; private String opsItemSNSTopicArn; private Boolean opsCenterEnabled; private Boolean cweMonitorEnabled; private String remarks; private BuilderImpl() { } private BuilderImpl(ApplicationInfo model) { resourceGroupName(model.resourceGroupName); lifeCycle(model.lifeCycle); opsItemSNSTopicArn(model.opsItemSNSTopicArn); opsCenterEnabled(model.opsCenterEnabled); cweMonitorEnabled(model.cweMonitorEnabled); remarks(model.remarks); } public final String getResourceGroupName() { return resourceGroupName; } @Override public final Builder resourceGroupName(String resourceGroupName) { this.resourceGroupName = resourceGroupName; return this; } public final void setResourceGroupName(String resourceGroupName) { this.resourceGroupName = resourceGroupName; } public final String getLifeCycle() { return lifeCycle; } @Override public final Builder lifeCycle(String lifeCycle) { this.lifeCycle = lifeCycle; return this; } public final void setLifeCycle(String lifeCycle) { this.lifeCycle = lifeCycle; } public final String getOpsItemSNSTopicArn() { return opsItemSNSTopicArn; } @Override public final Builder opsItemSNSTopicArn(String opsItemSNSTopicArn) { this.opsItemSNSTopicArn = opsItemSNSTopicArn; return this; } public final void setOpsItemSNSTopicArn(String opsItemSNSTopicArn) { this.opsItemSNSTopicArn = opsItemSNSTopicArn; } public final Boolean getOpsCenterEnabled() { return opsCenterEnabled; } @Override public final Builder opsCenterEnabled(Boolean opsCenterEnabled) { this.opsCenterEnabled = opsCenterEnabled; return this; } public final void setOpsCenterEnabled(Boolean opsCenterEnabled) { this.opsCenterEnabled = opsCenterEnabled; } public final Boolean getCweMonitorEnabled() { return cweMonitorEnabled; } @Override public final Builder cweMonitorEnabled(Boolean cweMonitorEnabled) { this.cweMonitorEnabled = cweMonitorEnabled; return this; } public final void setCweMonitorEnabled(Boolean cweMonitorEnabled) { this.cweMonitorEnabled = cweMonitorEnabled; } public final String getRemarks() { return remarks; } @Override public final Builder remarks(String remarks) { this.remarks = remarks; return this; } public final void setRemarks(String remarks) { this.remarks = remarks; } @Override public ApplicationInfo build() { return new ApplicationInfo(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy