
software.amazon.awssdk.services.iotdataplane.model.DeleteThingShadowResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotdata Show documentation
Show all versions of iotdata Show documentation
The AWS Java SDK for AWS Iot Data Plane Service module holds the client classes that are used for communicating
with AWS IoT Data Plane Service
The newest version!
/*
* Copyright 2013-2018 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.iotdataplane.model;
import java.nio.ByteBuffer;
import java.util.Objects;
import java.util.Optional;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkBytes;
import software.amazon.awssdk.core.adapter.StandardMemberCopier;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* The output from the DeleteThingShadow operation.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class DeleteThingShadowResponse extends IotDataPlaneResponse implements
ToCopyableBuilder {
private final SdkBytes payload;
private DeleteThingShadowResponse(BuilderImpl builder) {
super(builder);
this.payload = builder.payload;
}
/**
*
* The state information, in JSON format.
*
*
* @return The state information, in JSON format.
*/
public SdkBytes payload() {
return payload;
}
@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 int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(payload());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof DeleteThingShadowResponse)) {
return false;
}
DeleteThingShadowResponse other = (DeleteThingShadowResponse) obj;
return Objects.equals(payload(), other.payload());
}
@Override
public String toString() {
return ToString.builder("DeleteThingShadowResponse").add("Payload", payload()).build();
}
public Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "payload":
return Optional.ofNullable(clazz.cast(payload()));
default:
return Optional.empty();
}
}
public interface Builder extends IotDataPlaneResponse.Builder, CopyableBuilder {
/**
*
* The state information, in JSON format.
*
*
* @param payload
* The state information, in JSON format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder payload(SdkBytes payload);
}
static final class BuilderImpl extends IotDataPlaneResponse.BuilderImpl implements Builder {
private SdkBytes payload;
private BuilderImpl() {
}
private BuilderImpl(DeleteThingShadowResponse model) {
super(model);
payload(model.payload);
}
public final ByteBuffer getPayload() {
return payload == null ? null : payload.asByteBuffer();
}
@Override
public final Builder payload(SdkBytes payload) {
this.payload = StandardMemberCopier.copy(payload);
return this;
}
public final void setPayload(ByteBuffer payload) {
payload(payload == null ? null : SdkBytes.fromByteBuffer(payload));
}
@Override
public DeleteThingShadowResponse build() {
return new DeleteThingShadowResponse(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy