software.amazon.awssdk.services.applicationdiscovery.model.CustomerMeCollectorInfo 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 Migration Evaluator collectors.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class CustomerMeCollectorInfo implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField ACTIVE_ME_COLLECTORS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("activeMeCollectors").getter(getter(CustomerMeCollectorInfo::activeMeCollectors))
.setter(setter(Builder::activeMeCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("activeMeCollectors").build())
.build();
private static final SdkField HEALTHY_ME_COLLECTORS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("healthyMeCollectors").getter(getter(CustomerMeCollectorInfo::healthyMeCollectors))
.setter(setter(Builder::healthyMeCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("healthyMeCollectors").build())
.build();
private static final SdkField DENY_LISTED_ME_COLLECTORS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("denyListedMeCollectors").getter(getter(CustomerMeCollectorInfo::denyListedMeCollectors))
.setter(setter(Builder::denyListedMeCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("denyListedMeCollectors").build())
.build();
private static final SdkField SHUTDOWN_ME_COLLECTORS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("shutdownMeCollectors").getter(getter(CustomerMeCollectorInfo::shutdownMeCollectors))
.setter(setter(Builder::shutdownMeCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("shutdownMeCollectors").build())
.build();
private static final SdkField UNHEALTHY_ME_COLLECTORS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("unhealthyMeCollectors").getter(getter(CustomerMeCollectorInfo::unhealthyMeCollectors))
.setter(setter(Builder::unhealthyMeCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("unhealthyMeCollectors").build())
.build();
private static final SdkField TOTAL_ME_COLLECTORS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("totalMeCollectors").getter(getter(CustomerMeCollectorInfo::totalMeCollectors))
.setter(setter(Builder::totalMeCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("totalMeCollectors").build()).build();
private static final SdkField UNKNOWN_ME_COLLECTORS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("unknownMeCollectors").getter(getter(CustomerMeCollectorInfo::unknownMeCollectors))
.setter(setter(Builder::unknownMeCollectors))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("unknownMeCollectors").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ACTIVE_ME_COLLECTORS_FIELD,
HEALTHY_ME_COLLECTORS_FIELD, DENY_LISTED_ME_COLLECTORS_FIELD, SHUTDOWN_ME_COLLECTORS_FIELD,
UNHEALTHY_ME_COLLECTORS_FIELD, TOTAL_ME_COLLECTORS_FIELD, UNKNOWN_ME_COLLECTORS_FIELD));
private static final long serialVersionUID = 1L;
private final Integer activeMeCollectors;
private final Integer healthyMeCollectors;
private final Integer denyListedMeCollectors;
private final Integer shutdownMeCollectors;
private final Integer unhealthyMeCollectors;
private final Integer totalMeCollectors;
private final Integer unknownMeCollectors;
private CustomerMeCollectorInfo(BuilderImpl builder) {
this.activeMeCollectors = builder.activeMeCollectors;
this.healthyMeCollectors = builder.healthyMeCollectors;
this.denyListedMeCollectors = builder.denyListedMeCollectors;
this.shutdownMeCollectors = builder.shutdownMeCollectors;
this.unhealthyMeCollectors = builder.unhealthyMeCollectors;
this.totalMeCollectors = builder.totalMeCollectors;
this.unknownMeCollectors = builder.unknownMeCollectors;
}
/**
*
* The number of active Migration Evaluator collectors.
*
*
* @return The number of active Migration Evaluator collectors.
*/
public final Integer activeMeCollectors() {
return activeMeCollectors;
}
/**
*
* The number of healthy Migration Evaluator collectors.
*
*
* @return The number of healthy Migration Evaluator collectors.
*/
public final Integer healthyMeCollectors() {
return healthyMeCollectors;
}
/**
*
* The number of deny-listed Migration Evaluator collectors.
*
*
* @return The number of deny-listed Migration Evaluator collectors.
*/
public final Integer denyListedMeCollectors() {
return denyListedMeCollectors;
}
/**
*
* The number of Migration Evaluator collectors with SHUTDOWN
status.
*
*
* @return The number of Migration Evaluator collectors with SHUTDOWN
status.
*/
public final Integer shutdownMeCollectors() {
return shutdownMeCollectors;
}
/**
*
* The number of unhealthy Migration Evaluator collectors.
*
*
* @return The number of unhealthy Migration Evaluator collectors.
*/
public final Integer unhealthyMeCollectors() {
return unhealthyMeCollectors;
}
/**
*
* The total number of Migration Evaluator collectors.
*
*
* @return The total number of Migration Evaluator collectors.
*/
public final Integer totalMeCollectors() {
return totalMeCollectors;
}
/**
*
* The number of unknown Migration Evaluator collectors.
*
*
* @return The number of unknown Migration Evaluator collectors.
*/
public final Integer unknownMeCollectors() {
return unknownMeCollectors;
}
@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(activeMeCollectors());
hashCode = 31 * hashCode + Objects.hashCode(healthyMeCollectors());
hashCode = 31 * hashCode + Objects.hashCode(denyListedMeCollectors());
hashCode = 31 * hashCode + Objects.hashCode(shutdownMeCollectors());
hashCode = 31 * hashCode + Objects.hashCode(unhealthyMeCollectors());
hashCode = 31 * hashCode + Objects.hashCode(totalMeCollectors());
hashCode = 31 * hashCode + Objects.hashCode(unknownMeCollectors());
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 CustomerMeCollectorInfo)) {
return false;
}
CustomerMeCollectorInfo other = (CustomerMeCollectorInfo) obj;
return Objects.equals(activeMeCollectors(), other.activeMeCollectors())
&& Objects.equals(healthyMeCollectors(), other.healthyMeCollectors())
&& Objects.equals(denyListedMeCollectors(), other.denyListedMeCollectors())
&& Objects.equals(shutdownMeCollectors(), other.shutdownMeCollectors())
&& Objects.equals(unhealthyMeCollectors(), other.unhealthyMeCollectors())
&& Objects.equals(totalMeCollectors(), other.totalMeCollectors())
&& Objects.equals(unknownMeCollectors(), other.unknownMeCollectors());
}
/**
* 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("CustomerMeCollectorInfo").add("ActiveMeCollectors", activeMeCollectors())
.add("HealthyMeCollectors", healthyMeCollectors()).add("DenyListedMeCollectors", denyListedMeCollectors())
.add("ShutdownMeCollectors", shutdownMeCollectors()).add("UnhealthyMeCollectors", unhealthyMeCollectors())
.add("TotalMeCollectors", totalMeCollectors()).add("UnknownMeCollectors", unknownMeCollectors()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "activeMeCollectors":
return Optional.ofNullable(clazz.cast(activeMeCollectors()));
case "healthyMeCollectors":
return Optional.ofNullable(clazz.cast(healthyMeCollectors()));
case "denyListedMeCollectors":
return Optional.ofNullable(clazz.cast(denyListedMeCollectors()));
case "shutdownMeCollectors":
return Optional.ofNullable(clazz.cast(shutdownMeCollectors()));
case "unhealthyMeCollectors":
return Optional.ofNullable(clazz.cast(unhealthyMeCollectors()));
case "totalMeCollectors":
return Optional.ofNullable(clazz.cast(totalMeCollectors()));
case "unknownMeCollectors":
return Optional.ofNullable(clazz.cast(unknownMeCollectors()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function