com.huaweicloud.sdk.cloudtest.v1.model.ShowRegisterServiceResponse Maven / Gradle / Ivy
package com.huaweicloud.sdk.cloudtest.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 ShowRegisterServiceResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "services")
private List services = null;
public ShowRegisterServiceResponse withServices(List services) {
this.services = services;
return this;
}
public ShowRegisterServiceResponse addServicesItem(ServicesInfo servicesItem) {
if (this.services == null) {
this.services = new ArrayList<>();
}
this.services.add(servicesItem);
return this;
}
public ShowRegisterServiceResponse withServices(Consumer> servicesSetter) {
if (this.services == null) {
this.services = new ArrayList<>();
}
servicesSetter.accept(this.services);
return this;
}
/**
* 注册服务信息
* @return services
*/
public List getServices() {
return services;
}
public void setServices(List services) {
this.services = services;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ShowRegisterServiceResponse that = (ShowRegisterServiceResponse) obj;
return Objects.equals(this.services, that.services);
}
@Override
public int hashCode() {
return Objects.hash(services);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ShowRegisterServiceResponse {\n");
sb.append(" services: ").append(toIndentedString(services)).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 ");
}
}