software.amazon.awssdk.services.iotfleetwise.model.Branch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotfleetwise Show documentation
Show all versions of iotfleetwise Show documentation
The AWS Java SDK for Io T Fleet Wise module holds the client classes that are used for
communicating with Io T Fleet Wise.
/*
* 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.iotfleetwise.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;
/**
*
* A group of signals that are defined in a hierarchical structure.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class Branch implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField FULLY_QUALIFIED_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("fullyQualifiedName").getter(getter(Branch::fullyQualifiedName))
.setter(setter(Builder::fullyQualifiedName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fullyQualifiedName").build())
.build();
private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("description").getter(getter(Branch::description)).setter(setter(Builder::description))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("description").build()).build();
private static final SdkField DEPRECATION_MESSAGE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("deprecationMessage").getter(getter(Branch::deprecationMessage))
.setter(setter(Builder::deprecationMessage))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("deprecationMessage").build())
.build();
private static final SdkField COMMENT_FIELD = SdkField. builder(MarshallingType.STRING).memberName("comment")
.getter(getter(Branch::comment)).setter(setter(Builder::comment))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("comment").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(FULLY_QUALIFIED_NAME_FIELD,
DESCRIPTION_FIELD, DEPRECATION_MESSAGE_FIELD, COMMENT_FIELD));
private static final long serialVersionUID = 1L;
private final String fullyQualifiedName;
private final String description;
private final String deprecationMessage;
private final String comment;
private Branch(BuilderImpl builder) {
this.fullyQualifiedName = builder.fullyQualifiedName;
this.description = builder.description;
this.deprecationMessage = builder.deprecationMessage;
this.comment = builder.comment;
}
/**
*
* The fully qualified name of the branch. For example, the fully qualified name of a branch might be
* Vehicle.Body.Engine
.
*
*
* @return The fully qualified name of the branch. For example, the fully qualified name of a branch might be
* Vehicle.Body.Engine
.
*/
public final String fullyQualifiedName() {
return fullyQualifiedName;
}
/**
*
* A brief description of the branch.
*
*
* @return A brief description of the branch.
*/
public final String description() {
return description;
}
/**
*
* The deprecation message for the node or the branch that was moved or deleted.
*
*
* @return The deprecation message for the node or the branch that was moved or deleted.
*/
public final String deprecationMessage() {
return deprecationMessage;
}
/**
*
* A comment in addition to the description.
*
*
* @return A comment in addition to the description.
*/
public final String comment() {
return comment;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(fullyQualifiedName());
hashCode = 31 * hashCode + Objects.hashCode(description());
hashCode = 31 * hashCode + Objects.hashCode(deprecationMessage());
hashCode = 31 * hashCode + Objects.hashCode(comment());
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 Branch)) {
return false;
}
Branch other = (Branch) obj;
return Objects.equals(fullyQualifiedName(), other.fullyQualifiedName())
&& Objects.equals(description(), other.description())
&& Objects.equals(deprecationMessage(), other.deprecationMessage()) && Objects.equals(comment(), other.comment());
}
/**
* 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("Branch").add("FullyQualifiedName", fullyQualifiedName()).add("Description", description())
.add("DeprecationMessage", deprecationMessage()).add("Comment", comment()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "fullyQualifiedName":
return Optional.ofNullable(clazz.cast(fullyQualifiedName()));
case "description":
return Optional.ofNullable(clazz.cast(description()));
case "deprecationMessage":
return Optional.ofNullable(clazz.cast(deprecationMessage()));
case "comment":
return Optional.ofNullable(clazz.cast(comment()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy