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

com.huaweicloud.sdk.cse.v1.model.EngineExternalEntrypoint Maven / Gradle / Ivy

There is a newer version: 3.1.114
Show newest version
package com.huaweicloud.sdk.cse.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;

/**
 * EngineExternalEntrypoint
 */
public class EngineExternalEntrypoint {

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

    private String externalAddress;

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

    private String publicAddress;

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

    private Map serviceEndpoint = null;

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

    private Map publicServiceEndpoint = null;

    public EngineExternalEntrypoint withExternalAddress(String externalAddress) {
        this.externalAddress = externalAddress;
        return this;
    }

    /**
     * 微服务引擎暴露的IP地址。
     * @return externalAddress
     */
    public String getExternalAddress() {
        return externalAddress;
    }

    public void setExternalAddress(String externalAddress) {
        this.externalAddress = externalAddress;
    }

    public EngineExternalEntrypoint withPublicAddress(String publicAddress) {
        this.publicAddress = publicAddress;
        return this;
    }

    /**
     * 微服务引擎的公网地址。
     * @return publicAddress
     */
    public String getPublicAddress() {
        return publicAddress;
    }

    public void setPublicAddress(String publicAddress) {
        this.publicAddress = publicAddress;
    }

    public EngineExternalEntrypoint withServiceEndpoint(Map serviceEndpoint) {
        this.serviceEndpoint = serviceEndpoint;
        return this;
    }

    public EngineExternalEntrypoint putServiceEndpointItem(String key, EntrypointItem serviceEndpointItem) {
        if (this.serviceEndpoint == null) {
            this.serviceEndpoint = new HashMap<>();
        }
        this.serviceEndpoint.put(key, serviceEndpointItem);
        return this;
    }

    public EngineExternalEntrypoint withServiceEndpoint(Consumer> serviceEndpointSetter) {
        if (this.serviceEndpoint == null) {
            this.serviceEndpoint = new HashMap<>();
        }
        serviceEndpointSetter.accept(this.serviceEndpoint);
        return this;
    }

    /**
     * 微服务引擎组件的访问地址。
     * @return serviceEndpoint
     */
    public Map getServiceEndpoint() {
        return serviceEndpoint;
    }

    public void setServiceEndpoint(Map serviceEndpoint) {
        this.serviceEndpoint = serviceEndpoint;
    }

    public EngineExternalEntrypoint withPublicServiceEndpoint(Map publicServiceEndpoint) {
        this.publicServiceEndpoint = publicServiceEndpoint;
        return this;
    }

    public EngineExternalEntrypoint putPublicServiceEndpointItem(String key, EntrypointItem publicServiceEndpointItem) {
        if (this.publicServiceEndpoint == null) {
            this.publicServiceEndpoint = new HashMap<>();
        }
        this.publicServiceEndpoint.put(key, publicServiceEndpointItem);
        return this;
    }

    public EngineExternalEntrypoint withPublicServiceEndpoint(
        Consumer> publicServiceEndpointSetter) {
        if (this.publicServiceEndpoint == null) {
            this.publicServiceEndpoint = new HashMap<>();
        }
        publicServiceEndpointSetter.accept(this.publicServiceEndpoint);
        return this;
    }

    /**
     * 微服务引擎组件的公网地址。
     * @return publicServiceEndpoint
     */
    public Map getPublicServiceEndpoint() {
        return publicServiceEndpoint;
    }

    public void setPublicServiceEndpoint(Map publicServiceEndpoint) {
        this.publicServiceEndpoint = publicServiceEndpoint;
    }

    @Override
    public boolean equals(java.lang.Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        EngineExternalEntrypoint that = (EngineExternalEntrypoint) obj;
        return Objects.equals(this.externalAddress, that.externalAddress)
            && Objects.equals(this.publicAddress, that.publicAddress)
            && Objects.equals(this.serviceEndpoint, that.serviceEndpoint)
            && Objects.equals(this.publicServiceEndpoint, that.publicServiceEndpoint);
    }

    @Override
    public int hashCode() {
        return Objects.hash(externalAddress, publicAddress, serviceEndpoint, publicServiceEndpoint);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class EngineExternalEntrypoint {\n");
        sb.append("    externalAddress: ").append(toIndentedString(externalAddress)).append("\n");
        sb.append("    publicAddress: ").append(toIndentedString(publicAddress)).append("\n");
        sb.append("    serviceEndpoint: ").append(toIndentedString(serviceEndpoint)).append("\n");
        sb.append("    publicServiceEndpoint: ").append(toIndentedString(publicServiceEndpoint)).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