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

software.amazon.awssdk.services.iotfleetwise.model.CustomProperty Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Io T Fleet Wise module holds the client classes that are used for communicating with Io T Fleet Wise.

There is a newer version: 2.29.39
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.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;

/**
 * 

* Represents a member of the complex data structure. The data type of the property can be either primitive or another * struct. *

*/ @Generated("software.amazon.awssdk:codegen") public final class CustomProperty implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField FULLY_QUALIFIED_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("fullyQualifiedName").getter(getter(CustomProperty::fullyQualifiedName)) .setter(setter(Builder::fullyQualifiedName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fullyQualifiedName").build()) .build(); private static final SdkField DATA_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("dataType").getter(getter(CustomProperty::dataTypeAsString)).setter(setter(Builder::dataType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dataType").build()).build(); private static final SdkField DATA_ENCODING_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("dataEncoding").getter(getter(CustomProperty::dataEncodingAsString)) .setter(setter(Builder::dataEncoding)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dataEncoding").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("description").getter(getter(CustomProperty::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(CustomProperty::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(CustomProperty::comment)).setter(setter(Builder::comment)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("comment").build()).build(); private static final SdkField STRUCT_FULLY_QUALIFIED_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("structFullyQualifiedName").getter(getter(CustomProperty::structFullyQualifiedName)) .setter(setter(Builder::structFullyQualifiedName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("structFullyQualifiedName").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(FULLY_QUALIFIED_NAME_FIELD, DATA_TYPE_FIELD, DATA_ENCODING_FIELD, DESCRIPTION_FIELD, DEPRECATION_MESSAGE_FIELD, COMMENT_FIELD, STRUCT_FULLY_QUALIFIED_NAME_FIELD)); private static final long serialVersionUID = 1L; private final String fullyQualifiedName; private final String dataType; private final String dataEncoding; private final String description; private final String deprecationMessage; private final String comment; private final String structFullyQualifiedName; private CustomProperty(BuilderImpl builder) { this.fullyQualifiedName = builder.fullyQualifiedName; this.dataType = builder.dataType; this.dataEncoding = builder.dataEncoding; this.description = builder.description; this.deprecationMessage = builder.deprecationMessage; this.comment = builder.comment; this.structFullyQualifiedName = builder.structFullyQualifiedName; } /** *

* The fully qualified name of the custom property. For example, the fully qualified name of a custom property might * be ComplexDataTypes.VehicleDataTypes.SVMCamera.FPS. *

* * @return The fully qualified name of the custom property. For example, the fully qualified name of a custom * property might be ComplexDataTypes.VehicleDataTypes.SVMCamera.FPS. */ public final String fullyQualifiedName() { return fullyQualifiedName; } /** *

* The data type for the custom property. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #dataType} will * return {@link NodeDataType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #dataTypeAsString}. *

* * @return The data type for the custom property. * @see NodeDataType */ public final NodeDataType dataType() { return NodeDataType.fromValue(dataType); } /** *

* The data type for the custom property. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #dataType} will * return {@link NodeDataType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #dataTypeAsString}. *

* * @return The data type for the custom property. * @see NodeDataType */ public final String dataTypeAsString() { return dataType; } /** *

* Indicates whether the property is binary data. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #dataEncoding} will * return {@link NodeDataEncoding#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #dataEncodingAsString}. *

* * @return Indicates whether the property is binary data. * @see NodeDataEncoding */ public final NodeDataEncoding dataEncoding() { return NodeDataEncoding.fromValue(dataEncoding); } /** *

* Indicates whether the property is binary data. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #dataEncoding} will * return {@link NodeDataEncoding#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #dataEncodingAsString}. *

* * @return Indicates whether the property is binary data. * @see NodeDataEncoding */ public final String dataEncodingAsString() { return dataEncoding; } /** *

* A brief description of the custom property. *

* * @return A brief description of the custom property. */ 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; } /** *

* The fully qualified name of the struct node for the custom property if the data type of the custom property is * Struct or StructArray. *

* * @return The fully qualified name of the struct node for the custom property if the data type of the custom * property is Struct or StructArray. */ public final String structFullyQualifiedName() { return structFullyQualifiedName; } @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(fullyQualifiedName()); hashCode = 31 * hashCode + Objects.hashCode(dataTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(dataEncodingAsString()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(deprecationMessage()); hashCode = 31 * hashCode + Objects.hashCode(comment()); hashCode = 31 * hashCode + Objects.hashCode(structFullyQualifiedName()); 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 CustomProperty)) { return false; } CustomProperty other = (CustomProperty) obj; return Objects.equals(fullyQualifiedName(), other.fullyQualifiedName()) && Objects.equals(dataTypeAsString(), other.dataTypeAsString()) && Objects.equals(dataEncodingAsString(), other.dataEncodingAsString()) && Objects.equals(description(), other.description()) && Objects.equals(deprecationMessage(), other.deprecationMessage()) && Objects.equals(comment(), other.comment()) && Objects.equals(structFullyQualifiedName(), other.structFullyQualifiedName()); } /** * 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("CustomProperty").add("FullyQualifiedName", fullyQualifiedName()) .add("DataType", dataTypeAsString()).add("DataEncoding", dataEncodingAsString()) .add("Description", description()).add("DeprecationMessage", deprecationMessage()).add("Comment", comment()) .add("StructFullyQualifiedName", structFullyQualifiedName()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "fullyQualifiedName": return Optional.ofNullable(clazz.cast(fullyQualifiedName())); case "dataType": return Optional.ofNullable(clazz.cast(dataTypeAsString())); case "dataEncoding": return Optional.ofNullable(clazz.cast(dataEncodingAsString())); case "description": return Optional.ofNullable(clazz.cast(description())); case "deprecationMessage": return Optional.ofNullable(clazz.cast(deprecationMessage())); case "comment": return Optional.ofNullable(clazz.cast(comment())); case "structFullyQualifiedName": return Optional.ofNullable(clazz.cast(structFullyQualifiedName())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CustomProperty) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The fully qualified name of the custom property. For example, the fully qualified name of a custom property * might be ComplexDataTypes.VehicleDataTypes.SVMCamera.FPS. *

* * @param fullyQualifiedName * The fully qualified name of the custom property. For example, the fully qualified name of a custom * property might be ComplexDataTypes.VehicleDataTypes.SVMCamera.FPS. * @return Returns a reference to this object so that method calls can be chained together. */ Builder fullyQualifiedName(String fullyQualifiedName); /** *

* The data type for the custom property. *

* * @param dataType * The data type for the custom property. * @see NodeDataType * @return Returns a reference to this object so that method calls can be chained together. * @see NodeDataType */ Builder dataType(String dataType); /** *

* The data type for the custom property. *

* * @param dataType * The data type for the custom property. * @see NodeDataType * @return Returns a reference to this object so that method calls can be chained together. * @see NodeDataType */ Builder dataType(NodeDataType dataType); /** *

* Indicates whether the property is binary data. *

* * @param dataEncoding * Indicates whether the property is binary data. * @see NodeDataEncoding * @return Returns a reference to this object so that method calls can be chained together. * @see NodeDataEncoding */ Builder dataEncoding(String dataEncoding); /** *

* Indicates whether the property is binary data. *

* * @param dataEncoding * Indicates whether the property is binary data. * @see NodeDataEncoding * @return Returns a reference to this object so that method calls can be chained together. * @see NodeDataEncoding */ Builder dataEncoding(NodeDataEncoding dataEncoding); /** *

* A brief description of the custom property. *

* * @param description * A brief description of the custom property. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

* The deprecation message for the node or the branch that was moved or deleted. *

* * @param deprecationMessage * The deprecation message for the node or the branch that was moved or deleted. * @return Returns a reference to this object so that method calls can be chained together. */ Builder deprecationMessage(String deprecationMessage); /** *

* A comment in addition to the description. *

* * @param comment * A comment in addition to the description. * @return Returns a reference to this object so that method calls can be chained together. */ Builder comment(String comment); /** *

* The fully qualified name of the struct node for the custom property if the data type of the custom property * is Struct or StructArray. *

* * @param structFullyQualifiedName * The fully qualified name of the struct node for the custom property if the data type of the custom * property is Struct or StructArray. * @return Returns a reference to this object so that method calls can be chained together. */ Builder structFullyQualifiedName(String structFullyQualifiedName); } static final class BuilderImpl implements Builder { private String fullyQualifiedName; private String dataType; private String dataEncoding; private String description; private String deprecationMessage; private String comment; private String structFullyQualifiedName; private BuilderImpl() { } private BuilderImpl(CustomProperty model) { fullyQualifiedName(model.fullyQualifiedName); dataType(model.dataType); dataEncoding(model.dataEncoding); description(model.description); deprecationMessage(model.deprecationMessage); comment(model.comment); structFullyQualifiedName(model.structFullyQualifiedName); } public final String getFullyQualifiedName() { return fullyQualifiedName; } public final void setFullyQualifiedName(String fullyQualifiedName) { this.fullyQualifiedName = fullyQualifiedName; } @Override public final Builder fullyQualifiedName(String fullyQualifiedName) { this.fullyQualifiedName = fullyQualifiedName; return this; } public final String getDataType() { return dataType; } public final void setDataType(String dataType) { this.dataType = dataType; } @Override public final Builder dataType(String dataType) { this.dataType = dataType; return this; } @Override public final Builder dataType(NodeDataType dataType) { this.dataType(dataType == null ? null : dataType.toString()); return this; } public final String getDataEncoding() { return dataEncoding; } public final void setDataEncoding(String dataEncoding) { this.dataEncoding = dataEncoding; } @Override public final Builder dataEncoding(String dataEncoding) { this.dataEncoding = dataEncoding; return this; } @Override public final Builder dataEncoding(NodeDataEncoding dataEncoding) { this.dataEncoding(dataEncoding == null ? null : dataEncoding.toString()); return this; } public final String getDescription() { return description; } public final void setDescription(String description) { this.description = description; } @Override public final Builder description(String description) { this.description = description; return this; } public final String getDeprecationMessage() { return deprecationMessage; } public final void setDeprecationMessage(String deprecationMessage) { this.deprecationMessage = deprecationMessage; } @Override public final Builder deprecationMessage(String deprecationMessage) { this.deprecationMessage = deprecationMessage; return this; } public final String getComment() { return comment; } public final void setComment(String comment) { this.comment = comment; } @Override public final Builder comment(String comment) { this.comment = comment; return this; } public final String getStructFullyQualifiedName() { return structFullyQualifiedName; } public final void setStructFullyQualifiedName(String structFullyQualifiedName) { this.structFullyQualifiedName = structFullyQualifiedName; } @Override public final Builder structFullyQualifiedName(String structFullyQualifiedName) { this.structFullyQualifiedName = structFullyQualifiedName; return this; } @Override public CustomProperty build() { return new CustomProperty(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy