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

com.huaweicloud.sdk.apm.v1.model.SearchEnvTopologyResponse Maven / Gradle / Ivy

There is a newer version: 3.1.114
Show newest version
package com.huaweicloud.sdk.apm.v1.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huaweicloud.sdk.core.SdkResponse;

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

/**
 * Response Object
 */
public class SearchEnvTopologyResponse extends SdkResponse {

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

    private List nodeList = null;

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

    private List lineList = null;

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

    private Map collectorConfig = null;

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

    private Long realStartTime;

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

    private Long realEndTime;

    public SearchEnvTopologyResponse withNodeList(List nodeList) {
        this.nodeList = nodeList;
        return this;
    }

    public SearchEnvTopologyResponse addNodeListItem(TopoNode nodeListItem) {
        if (this.nodeList == null) {
            this.nodeList = new ArrayList<>();
        }
        this.nodeList.add(nodeListItem);
        return this;
    }

    public SearchEnvTopologyResponse withNodeList(Consumer> nodeListSetter) {
        if (this.nodeList == null) {
            this.nodeList = new ArrayList<>();
        }
        nodeListSetter.accept(this.nodeList);
        return this;
    }

    /**
     * 组件节点列表。
     * @return nodeList
     */
    public List getNodeList() {
        return nodeList;
    }

    public void setNodeList(List nodeList) {
        this.nodeList = nodeList;
    }

    public SearchEnvTopologyResponse withLineList(List lineList) {
        this.lineList = lineList;
        return this;
    }

    public SearchEnvTopologyResponse addLineListItem(TopoLine lineListItem) {
        if (this.lineList == null) {
            this.lineList = new ArrayList<>();
        }
        this.lineList.add(lineListItem);
        return this;
    }

    public SearchEnvTopologyResponse withLineList(Consumer> lineListSetter) {
        if (this.lineList == null) {
            this.lineList = new ArrayList<>();
        }
        lineListSetter.accept(this.lineList);
        return this;
    }

    /**
     * 组件之间调用指向线列表。
     * @return lineList
     */
    public List getLineList() {
        return lineList;
    }

    public void setLineList(List lineList) {
        this.lineList = lineList;
    }

    public SearchEnvTopologyResponse withCollectorConfig(Map collectorConfig) {
        this.collectorConfig = collectorConfig;
        return this;
    }

    public SearchEnvTopologyResponse putCollectorConfigItem(String key, CollectorConfigModel collectorConfigItem) {
        if (this.collectorConfig == null) {
            this.collectorConfig = new HashMap<>();
        }
        this.collectorConfig.put(key, collectorConfigItem);
        return this;
    }

    public SearchEnvTopologyResponse withCollectorConfig(
        Consumer> collectorConfigSetter) {
        if (this.collectorConfig == null) {
            this.collectorConfig = new HashMap<>();
        }
        collectorConfigSetter.accept(this.collectorConfig);
        return this;
    }

    /**
     * 采集器配置。
     * @return collectorConfig
     */
    public Map getCollectorConfig() {
        return collectorConfig;
    }

    public void setCollectorConfig(Map collectorConfig) {
        this.collectorConfig = collectorConfig;
    }

    public SearchEnvTopologyResponse withRealStartTime(Long realStartTime) {
        this.realStartTime = realStartTime;
        return this;
    }

    /**
     * 开始时间。
     * @return realStartTime
     */
    public Long getRealStartTime() {
        return realStartTime;
    }

    public void setRealStartTime(Long realStartTime) {
        this.realStartTime = realStartTime;
    }

    public SearchEnvTopologyResponse withRealEndTime(Long realEndTime) {
        this.realEndTime = realEndTime;
        return this;
    }

    /**
     * 结束时间。
     * @return realEndTime
     */
    public Long getRealEndTime() {
        return realEndTime;
    }

    public void setRealEndTime(Long realEndTime) {
        this.realEndTime = realEndTime;
    }

    @Override
    public boolean equals(java.lang.Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        SearchEnvTopologyResponse that = (SearchEnvTopologyResponse) obj;
        return Objects.equals(this.nodeList, that.nodeList) && Objects.equals(this.lineList, that.lineList)
            && Objects.equals(this.collectorConfig, that.collectorConfig)
            && Objects.equals(this.realStartTime, that.realStartTime)
            && Objects.equals(this.realEndTime, that.realEndTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(nodeList, lineList, collectorConfig, realStartTime, realEndTime);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class SearchEnvTopologyResponse {\n");
        sb.append("    nodeList: ").append(toIndentedString(nodeList)).append("\n");
        sb.append("    lineList: ").append(toIndentedString(lineList)).append("\n");
        sb.append("    collectorConfig: ").append(toIndentedString(collectorConfig)).append("\n");
        sb.append("    realStartTime: ").append(toIndentedString(realStartTime)).append("\n");
        sb.append("    realEndTime: ").append(toIndentedString(realEndTime)).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