com.huaweicloud.sdk.iotanalytics.v1.model.ShowPropertyRawValueResponse Maven / Gradle / Ivy
package com.huaweicloud.sdk.iotanalytics.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.List;
import java.util.Objects;
import java.util.function.Consumer;
/**
* Response Object
*/
public class ShowPropertyRawValueResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "timestamps")
private List timestamps = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "properties")
private List properties = null;
public ShowPropertyRawValueResponse withTimestamps(List timestamps) {
this.timestamps = timestamps;
return this;
}
public ShowPropertyRawValueResponse addTimestampsItem(String timestampsItem) {
if (this.timestamps == null) {
this.timestamps = new ArrayList<>();
}
this.timestamps.add(timestampsItem);
return this;
}
public ShowPropertyRawValueResponse withTimestamps(Consumer> timestampsSetter) {
if (this.timestamps == null) {
this.timestamps = new ArrayList<>();
}
timestampsSetter.accept(this.timestamps);
return this;
}
/**
* 时间序列,使用UTC时间,格式:yyyy-MM-dd'T'HH:mm:ss.SSS'Z',示例:2021-02-01T00:00:00.123Z
* @return timestamps
*/
public List getTimestamps() {
return timestamps;
}
public void setTimestamps(List timestamps) {
this.timestamps = timestamps;
}
public ShowPropertyRawValueResponse withProperties(List properties) {
this.properties = properties;
return this;
}
public ShowPropertyRawValueResponse addPropertiesItem(RawValue propertiesItem) {
if (this.properties == null) {
this.properties = new ArrayList<>();
}
this.properties.add(propertiesItem);
return this;
}
public ShowPropertyRawValueResponse withProperties(Consumer> propertiesSetter) {
if (this.properties == null) {
this.properties = new ArrayList<>();
}
propertiesSetter.accept(this.properties);
return this;
}
/**
* 响应属性列表
* @return properties
*/
public List getProperties() {
return properties;
}
public void setProperties(List properties) {
this.properties = properties;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ShowPropertyRawValueResponse that = (ShowPropertyRawValueResponse) obj;
return Objects.equals(this.timestamps, that.timestamps) && Objects.equals(this.properties, that.properties);
}
@Override
public int hashCode() {
return Objects.hash(timestamps, properties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ShowPropertyRawValueResponse {\n");
sb.append(" timestamps: ").append(toIndentedString(timestamps)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).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 ");
}
}