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

com.huaweicloud.sdk.aom.v1.model.Metadata Maven / Gradle / Ivy

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

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

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

/**
 * 任务节点元数据。
 */
public class Metadata {

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

    private String type;

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

    private Map _configuration = null;

    public Metadata withType(String type) {
        this.type = type;
        return this;
    }

    /**
     * 节点类型。
     * @return type
     */
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Metadata withConfiguration(Map _configuration) {
        this._configuration = _configuration;
        return this;
    }

    public Metadata putConfigurationItem(String key, Object _configurationItem) {
        if (this._configuration == null) {
            this._configuration = new HashMap<>();
        }
        this._configuration.put(key, _configurationItem);
        return this;
    }

    public Metadata withConfiguration(Consumer> _configurationSetter) {
        if (this._configuration == null) {
            this._configuration = new HashMap<>();
        }
        _configurationSetter.accept(this._configuration);
        return this;
    }

    /**
     * 配置信息。
     * @return _configuration
     */
    public Map getConfiguration() {
        return _configuration;
    }

    public void setConfiguration(Map _configuration) {
        this._configuration = _configuration;
    }

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

    @Override
    public int hashCode() {
        return Objects.hash(type, _configuration);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class Metadata {\n");
        sb.append("    type: ").append(toIndentedString(type)).append("\n");
        sb.append("    _configuration: ").append(toIndentedString(_configuration)).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