com.huaweicloud.sdk.geip.v3.model.LockInfo Maven / Gradle / Ivy
package com.huaweicloud.sdk.geip.v3.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.Objects;
/**
* LockInfo
*/
public class LockInfo {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "id")
private String id;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "resource_type")
private String resourceType;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "resource_id")
private String resourceId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "scene")
private String scene;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "source_type")
private String sourceType;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "source_id")
private String sourceId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "check_url")
private String checkUrl;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "action")
private String action;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "created_at")
private OffsetDateTime createdAt;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "updated_at")
private OffsetDateTime updatedAt;
public LockInfo withId(String id) {
this.id = id;
return this;
}
/**
* 锁id
* @return id
*/
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public LockInfo withResourceType(String resourceType) {
this.resourceType = resourceType;
return this;
}
/**
* 资源类型
* @return resourceType
*/
public String getResourceType() {
return resourceType;
}
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
public LockInfo withResourceId(String resourceId) {
this.resourceId = resourceId;
return this;
}
/**
* 资源id
* @return resourceId
*/
public String getResourceId() {
return resourceId;
}
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
public LockInfo withScene(String scene) {
this.scene = scene;
return this;
}
/**
* 场景类型
* @return scene
*/
public String getScene() {
return scene;
}
public void setScene(String scene) {
this.scene = scene;
}
public LockInfo withSourceType(String sourceType) {
this.sourceType = sourceType;
return this;
}
/**
* 源类型
* @return sourceType
*/
public String getSourceType() {
return sourceType;
}
public void setSourceType(String sourceType) {
this.sourceType = sourceType;
}
public LockInfo withSourceId(String sourceId) {
this.sourceId = sourceId;
return this;
}
/**
* 源id
* @return sourceId
*/
public String getSourceId() {
return sourceId;
}
public void setSourceId(String sourceId) {
this.sourceId = sourceId;
}
public LockInfo withCheckUrl(String checkUrl) {
this.checkUrl = checkUrl;
return this;
}
/**
* check地址
* @return checkUrl
*/
public String getCheckUrl() {
return checkUrl;
}
public void setCheckUrl(String checkUrl) {
this.checkUrl = checkUrl;
}
public LockInfo withAction(String action) {
this.action = action;
return this;
}
/**
* 动作类型
* @return action
*/
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
public LockInfo withCreatedAt(OffsetDateTime createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* 创建时间
* @return createdAt
*/
public OffsetDateTime getCreatedAt() {
return createdAt;
}
public void setCreatedAt(OffsetDateTime createdAt) {
this.createdAt = createdAt;
}
public LockInfo withUpdatedAt(OffsetDateTime updatedAt) {
this.updatedAt = updatedAt;
return this;
}
/**
* 更新时间
* @return updatedAt
*/
public OffsetDateTime getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(OffsetDateTime updatedAt) {
this.updatedAt = updatedAt;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
LockInfo that = (LockInfo) obj;
return Objects.equals(this.id, that.id) && Objects.equals(this.resourceType, that.resourceType)
&& Objects.equals(this.resourceId, that.resourceId) && Objects.equals(this.scene, that.scene)
&& Objects.equals(this.sourceType, that.sourceType) && Objects.equals(this.sourceId, that.sourceId)
&& Objects.equals(this.checkUrl, that.checkUrl) && Objects.equals(this.action, that.action)
&& Objects.equals(this.createdAt, that.createdAt) && Objects.equals(this.updatedAt, that.updatedAt);
}
@Override
public int hashCode() {
return Objects
.hash(id, resourceType, resourceId, scene, sourceType, sourceId, checkUrl, action, createdAt, updatedAt);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class LockInfo {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n");
sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n");
sb.append(" scene: ").append(toIndentedString(scene)).append("\n");
sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n");
sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
sb.append(" checkUrl: ").append(toIndentedString(checkUrl)).append("\n");
sb.append(" action: ").append(toIndentedString(action)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 ");
}
}