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

com.huaweicloud.sdk.codeartsinspector.v3.model.DomainSettings Maven / Gradle / Ivy

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

/**
 * DomainSettings
 */
public class DomainSettings {

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

    private String domainId;

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

    private String loginUrl;

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

    private String loginUsername;

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

    private String loginPassword;

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

    private String loginCookies;

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

    private String verifyUrl;

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

    private Map httpHeaders = null;

    public DomainSettings withDomainId(String domainId) {
        this.domainId = domainId;
        return this;
    }

    /**
     * 网站域名ID
     * @return domainId
     */
    public String getDomainId() {
        return domainId;
    }

    public void setDomainId(String domainId) {
        this.domainId = domainId;
    }

    public DomainSettings withLoginUrl(String loginUrl) {
        this.loginUrl = loginUrl;
        return this;
    }

    /**
     * 网站需要登录时,设置登录页面
     * @return loginUrl
     */
    public String getLoginUrl() {
        return loginUrl;
    }

    public void setLoginUrl(String loginUrl) {
        this.loginUrl = loginUrl;
    }

    public DomainSettings withLoginUsername(String loginUsername) {
        this.loginUsername = loginUsername;
        return this;
    }

    /**
     * 网站需要登录时,设置登录用户名
     * @return loginUsername
     */
    public String getLoginUsername() {
        return loginUsername;
    }

    public void setLoginUsername(String loginUsername) {
        this.loginUsername = loginUsername;
    }

    public DomainSettings withLoginPassword(String loginPassword) {
        this.loginPassword = loginPassword;
        return this;
    }

    /**
     * 网站需要登录时,设置登录密码
     * @return loginPassword
     */
    public String getLoginPassword() {
        return loginPassword;
    }

    public void setLoginPassword(String loginPassword) {
        this.loginPassword = loginPassword;
    }

    public DomainSettings withLoginCookies(String loginCookies) {
        this.loginCookies = loginCookies;
        return this;
    }

    /**
     * 网站需要登录时,设置登录cookie
     * @return loginCookies
     */
    public String getLoginCookies() {
        return loginCookies;
    }

    public void setLoginCookies(String loginCookies) {
        this.loginCookies = loginCookies;
    }

    public DomainSettings withVerifyUrl(String verifyUrl) {
        this.verifyUrl = verifyUrl;
        return this;
    }

    /**
     * 设置用于验证登录是否成功的网址
     * @return verifyUrl
     */
    public String getVerifyUrl() {
        return verifyUrl;
    }

    public void setVerifyUrl(String verifyUrl) {
        this.verifyUrl = verifyUrl;
    }

    public DomainSettings withHttpHeaders(Map httpHeaders) {
        this.httpHeaders = httpHeaders;
        return this;
    }

    public DomainSettings putHttpHeadersItem(String key, String httpHeadersItem) {
        if (this.httpHeaders == null) {
            this.httpHeaders = new HashMap<>();
        }
        this.httpHeaders.put(key, httpHeadersItem);
        return this;
    }

    public DomainSettings withHttpHeaders(Consumer> httpHeadersSetter) {
        if (this.httpHeaders == null) {
            this.httpHeaders = new HashMap<>();
        }
        httpHeadersSetter.accept(this.httpHeaders);
        return this;
    }

    /**
     * 设置自定义HTTP请求头
     * @return httpHeaders
     */
    public Map getHttpHeaders() {
        return httpHeaders;
    }

    public void setHttpHeaders(Map httpHeaders) {
        this.httpHeaders = httpHeaders;
    }

    @Override
    public boolean equals(java.lang.Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        DomainSettings that = (DomainSettings) obj;
        return Objects.equals(this.domainId, that.domainId) && Objects.equals(this.loginUrl, that.loginUrl)
            && Objects.equals(this.loginUsername, that.loginUsername)
            && Objects.equals(this.loginPassword, that.loginPassword)
            && Objects.equals(this.loginCookies, that.loginCookies) && Objects.equals(this.verifyUrl, that.verifyUrl)
            && Objects.equals(this.httpHeaders, that.httpHeaders);
    }

    @Override
    public int hashCode() {
        return Objects.hash(domainId, loginUrl, loginUsername, loginPassword, loginCookies, verifyUrl, httpHeaders);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class DomainSettings {\n");
        sb.append("    domainId: ").append(toIndentedString(domainId)).append("\n");
        sb.append("    loginUrl: ").append(toIndentedString(loginUrl)).append("\n");
        sb.append("    loginUsername: ").append(toIndentedString(loginUsername)).append("\n");
        sb.append("    loginPassword: ").append(toIndentedString(loginPassword)).append("\n");
        sb.append("    loginCookies: ").append(toIndentedString(loginCookies)).append("\n");
        sb.append("    verifyUrl: ").append(toIndentedString(verifyUrl)).append("\n");
        sb.append("    httpHeaders: ").append(toIndentedString(httpHeaders)).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