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

com.huaweicloud.sdk.iotda.v5.model.UpdateDesireds Maven / Gradle / Ivy

There is a newer version: 3.1.115
Show newest version
package com.huaweicloud.sdk.iotda.v5.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;

/**
 * 修改设备影子预期数据结构体。
 */
public class UpdateDesireds {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "shadow")

    private List shadow = null;

    public UpdateDesireds withShadow(List shadow) {
        this.shadow = shadow;
        return this;
    }

    public UpdateDesireds addShadowItem(UpdateDesired shadowItem) {
        if (this.shadow == null) {
            this.shadow = new ArrayList<>();
        }
        this.shadow.add(shadowItem);
        return this;
    }

    public UpdateDesireds withShadow(Consumer> shadowSetter) {
        if (this.shadow == null) {
            this.shadow = new ArrayList<>();
        }
        shadowSetter.accept(this.shadow);
        return this;
    }

    /**
     * **参数说明**:设备影子期望值构体。
     * @return shadow
     */
    public List getShadow() {
        return shadow;
    }

    public void setShadow(List shadow) {
        this.shadow = shadow;
    }

    @Override
    public boolean equals(java.lang.Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        UpdateDesireds that = (UpdateDesireds) obj;
        return Objects.equals(this.shadow, that.shadow);
    }

    @Override
    public int hashCode() {
        return Objects.hash(shadow);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class UpdateDesireds {\n");
        sb.append("    shadow: ").append(toIndentedString(shadow)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(java.lang.Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy