software.amazon.awssdk.services.iotfleetwise.model.CustomStruct 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.
The 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.iotfleetwise.model;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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 custom structure represents a complex or higher-order data structure.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class CustomStruct implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField FULLY_QUALIFIED_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("fullyQualifiedName").getter(getter(CustomStruct::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(CustomStruct::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(CustomStruct::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(CustomStruct::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 Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer();
private static final long serialVersionUID = 1L;
private final String fullyQualifiedName;
private final String description;
private final String deprecationMessage;
private final String comment;
private CustomStruct(BuilderImpl builder) {
this.fullyQualifiedName = builder.fullyQualifiedName;
this.description = builder.description;
this.deprecationMessage = builder.deprecationMessage;
this.comment = builder.comment;
}
/**
*
* The fully qualified name of the custom structure. For example, the fully qualified name of a custom structure
* might be ComplexDataTypes.VehicleDataTypes.SVMCamera
.
*
*
* @return The fully qualified name of the custom structure. For example, the fully qualified name of a custom
* structure might be ComplexDataTypes.VehicleDataTypes.SVMCamera
.
*/
public final String fullyQualifiedName() {
return fullyQualifiedName;
}
/**
*
* A brief description of the custom structure.
*
*
* @return A brief description of the custom structure.
*/
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 CustomStruct)) {
return false;
}
CustomStruct other = (CustomStruct) 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("CustomStruct").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;
}
@Override
public final Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
private static Map> memberNameToFieldInitializer() {
Map> map = new HashMap<>();
map.put("fullyQualifiedName", FULLY_QUALIFIED_NAME_FIELD);
map.put("description", DESCRIPTION_FIELD);
map.put("deprecationMessage", DEPRECATION_MESSAGE_FIELD);
map.put("comment", COMMENT_FIELD);
return Collections.unmodifiableMap(map);
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy