software.amazon.awssdk.services.applicationdiscovery.model.CustomerAgentlessCollectorInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of applicationdiscovery Show documentation
Show all versions of applicationdiscovery Show documentation
The AWS Java SDK for AWS Application Discovery Service module holds the client classes that are used
for communicating with AWS Application Discovery Service.
/*
* 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.applicationdiscovery.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;
/**
*
* The inventory data for installed Agentless Collector collectors.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class CustomerAgentlessCollectorInfo implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField ACTIVE_AGENTLESS_COLLECTORS_FIELD = SdkField
. builder(MarshallingType.INTEGER).memberName("activeAgentlessCollectors")
.getter(getter(CustomerAgentlessCollectorInfo::activeAgentlessCollectors))
.setter(setter(Builder::activeAgentlessCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("activeAgentlessCollectors").build())
.build();
private static final SdkField HEALTHY_AGENTLESS_COLLECTORS_FIELD = SdkField
. builder(MarshallingType.INTEGER)
.memberName("healthyAgentlessCollectors")
.getter(getter(CustomerAgentlessCollectorInfo::healthyAgentlessCollectors))
.setter(setter(Builder::healthyAgentlessCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("healthyAgentlessCollectors").build())
.build();
private static final SdkField DENY_LISTED_AGENTLESS_COLLECTORS_FIELD = SdkField
. builder(MarshallingType.INTEGER)
.memberName("denyListedAgentlessCollectors")
.getter(getter(CustomerAgentlessCollectorInfo::denyListedAgentlessCollectors))
.setter(setter(Builder::denyListedAgentlessCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("denyListedAgentlessCollectors")
.build()).build();
private static final SdkField SHUTDOWN_AGENTLESS_COLLECTORS_FIELD = SdkField
. builder(MarshallingType.INTEGER)
.memberName("shutdownAgentlessCollectors")
.getter(getter(CustomerAgentlessCollectorInfo::shutdownAgentlessCollectors))
.setter(setter(Builder::shutdownAgentlessCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("shutdownAgentlessCollectors")
.build()).build();
private static final SdkField UNHEALTHY_AGENTLESS_COLLECTORS_FIELD = SdkField
. builder(MarshallingType.INTEGER)
.memberName("unhealthyAgentlessCollectors")
.getter(getter(CustomerAgentlessCollectorInfo::unhealthyAgentlessCollectors))
.setter(setter(Builder::unhealthyAgentlessCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("unhealthyAgentlessCollectors")
.build()).build();
private static final SdkField TOTAL_AGENTLESS_COLLECTORS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("totalAgentlessCollectors").getter(getter(CustomerAgentlessCollectorInfo::totalAgentlessCollectors))
.setter(setter(Builder::totalAgentlessCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("totalAgentlessCollectors").build())
.build();
private static final SdkField UNKNOWN_AGENTLESS_COLLECTORS_FIELD = SdkField
. builder(MarshallingType.INTEGER)
.memberName("unknownAgentlessCollectors")
.getter(getter(CustomerAgentlessCollectorInfo::unknownAgentlessCollectors))
.setter(setter(Builder::unknownAgentlessCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("unknownAgentlessCollectors").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(
ACTIVE_AGENTLESS_COLLECTORS_FIELD, HEALTHY_AGENTLESS_COLLECTORS_FIELD, DENY_LISTED_AGENTLESS_COLLECTORS_FIELD,
SHUTDOWN_AGENTLESS_COLLECTORS_FIELD, UNHEALTHY_AGENTLESS_COLLECTORS_FIELD, TOTAL_AGENTLESS_COLLECTORS_FIELD,
UNKNOWN_AGENTLESS_COLLECTORS_FIELD));
private static final long serialVersionUID = 1L;
private final Integer activeAgentlessCollectors;
private final Integer healthyAgentlessCollectors;
private final Integer denyListedAgentlessCollectors;
private final Integer shutdownAgentlessCollectors;
private final Integer unhealthyAgentlessCollectors;
private final Integer totalAgentlessCollectors;
private final Integer unknownAgentlessCollectors;
private CustomerAgentlessCollectorInfo(BuilderImpl builder) {
this.activeAgentlessCollectors = builder.activeAgentlessCollectors;
this.healthyAgentlessCollectors = builder.healthyAgentlessCollectors;
this.denyListedAgentlessCollectors = builder.denyListedAgentlessCollectors;
this.shutdownAgentlessCollectors = builder.shutdownAgentlessCollectors;
this.unhealthyAgentlessCollectors = builder.unhealthyAgentlessCollectors;
this.totalAgentlessCollectors = builder.totalAgentlessCollectors;
this.unknownAgentlessCollectors = builder.unknownAgentlessCollectors;
}
/**
*
* The number of active Agentless Collector collectors.
*
*
* @return The number of active Agentless Collector collectors.
*/
public final Integer activeAgentlessCollectors() {
return activeAgentlessCollectors;
}
/**
*
* The number of healthy Agentless Collector collectors.
*
*
* @return The number of healthy Agentless Collector collectors.
*/
public final Integer healthyAgentlessCollectors() {
return healthyAgentlessCollectors;
}
/**
*
* The number of deny-listed Agentless Collector collectors.
*
*
* @return The number of deny-listed Agentless Collector collectors.
*/
public final Integer denyListedAgentlessCollectors() {
return denyListedAgentlessCollectors;
}
/**
*
* The number of Agentless Collector collectors with SHUTDOWN
status.
*
*
* @return The number of Agentless Collector collectors with SHUTDOWN
status.
*/
public final Integer shutdownAgentlessCollectors() {
return shutdownAgentlessCollectors;
}
/**
*
* The number of unhealthy Agentless Collector collectors.
*
*
* @return The number of unhealthy Agentless Collector collectors.
*/
public final Integer unhealthyAgentlessCollectors() {
return unhealthyAgentlessCollectors;
}
/**
*
* The total number of Agentless Collector collectors.
*
*
* @return The total number of Agentless Collector collectors.
*/
public final Integer totalAgentlessCollectors() {
return totalAgentlessCollectors;
}
/**
*
* The number of unknown Agentless Collector collectors.
*
*
* @return The number of unknown Agentless Collector collectors.
*/
public final Integer unknownAgentlessCollectors() {
return unknownAgentlessCollectors;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(activeAgentlessCollectors());
hashCode = 31 * hashCode + Objects.hashCode(healthyAgentlessCollectors());
hashCode = 31 * hashCode + Objects.hashCode(denyListedAgentlessCollectors());
hashCode = 31 * hashCode + Objects.hashCode(shutdownAgentlessCollectors());
hashCode = 31 * hashCode + Objects.hashCode(unhealthyAgentlessCollectors());
hashCode = 31 * hashCode + Objects.hashCode(totalAgentlessCollectors());
hashCode = 31 * hashCode + Objects.hashCode(unknownAgentlessCollectors());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof CustomerAgentlessCollectorInfo)) {
return false;
}
CustomerAgentlessCollectorInfo other = (CustomerAgentlessCollectorInfo) obj;
return Objects.equals(activeAgentlessCollectors(), other.activeAgentlessCollectors())
&& Objects.equals(healthyAgentlessCollectors(), other.healthyAgentlessCollectors())
&& Objects.equals(denyListedAgentlessCollectors(), other.denyListedAgentlessCollectors())
&& Objects.equals(shutdownAgentlessCollectors(), other.shutdownAgentlessCollectors())
&& Objects.equals(unhealthyAgentlessCollectors(), other.unhealthyAgentlessCollectors())
&& Objects.equals(totalAgentlessCollectors(), other.totalAgentlessCollectors())
&& Objects.equals(unknownAgentlessCollectors(), other.unknownAgentlessCollectors());
}
/**
* 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 final String toString() {
return ToString.builder("CustomerAgentlessCollectorInfo").add("ActiveAgentlessCollectors", activeAgentlessCollectors())
.add("HealthyAgentlessCollectors", healthyAgentlessCollectors())
.add("DenyListedAgentlessCollectors", denyListedAgentlessCollectors())
.add("ShutdownAgentlessCollectors", shutdownAgentlessCollectors())
.add("UnhealthyAgentlessCollectors", unhealthyAgentlessCollectors())
.add("TotalAgentlessCollectors", totalAgentlessCollectors())
.add("UnknownAgentlessCollectors", unknownAgentlessCollectors()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "activeAgentlessCollectors":
return Optional.ofNullable(clazz.cast(activeAgentlessCollectors()));
case "healthyAgentlessCollectors":
return Optional.ofNullable(clazz.cast(healthyAgentlessCollectors()));
case "denyListedAgentlessCollectors":
return Optional.ofNullable(clazz.cast(denyListedAgentlessCollectors()));
case "shutdownAgentlessCollectors":
return Optional.ofNullable(clazz.cast(shutdownAgentlessCollectors()));
case "unhealthyAgentlessCollectors":
return Optional.ofNullable(clazz.cast(unhealthyAgentlessCollectors()));
case "totalAgentlessCollectors":
return Optional.ofNullable(clazz.cast(totalAgentlessCollectors()));
case "unknownAgentlessCollectors":
return Optional.ofNullable(clazz.cast(unknownAgentlessCollectors()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function