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

com.tencentcloudapi.aiart.v20221229.models.ImageToImageRequest Maven / Gradle / Ivy

/*
 * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.tencentcloudapi.aiart.v20221229.models;

import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;

public class ImageToImageRequest extends AbstractModel{

    /**
    * 输入图 Base64 数据。
算法将根据输入的图片,结合文本描述智能生成与之相关的图像。
Base64 和 Url 必须提供一个,如果都提供以 Base64 为准。
图片限制:单边分辨率小于2000,转成 Base64 字符串后小于 5MB。
    */
    @SerializedName("InputImage")
    @Expose
    private String InputImage;

    /**
    * 输入图 Url。
算法将根据输入的图片,结合文本描述智能生成与之相关的图像。
Base64 和 Url 必须提供一个,如果都提供以 Base64 为准。
图片限制:单边分辨率小于2000,转成 Base64 字符串后小于 5MB。
    */
    @SerializedName("InputUrl")
    @Expose
    private String InputUrl;

    /**
    * 文本描述。
用于在输入图的基础上引导生成图效果,增加生成结果中出现描述内容的可能。
推荐使用中文。最多支持256个 utf-8 字符。
    */
    @SerializedName("Prompt")
    @Expose
    private String Prompt;

    /**
    * 反向文本描述。
用于一定程度上从反面引导模型生成的走向,减少生成结果中出现描述内容的可能,但不能完全杜绝。
推荐使用中文。最多可传256个 utf-8 字符。
    */
    @SerializedName("NegativePrompt")
    @Expose
    private String NegativePrompt;

    /**
    * 绘画风格。
请在  [智能图生图风格列表](https://cloud.tencent.com/document/product/1668/86250) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。
    */
    @SerializedName("Styles")
    @Expose
    private String [] Styles;

    /**
    * 生成图结果的配置,包括输出图片分辨率和尺寸等。
    */
    @SerializedName("ResultConfig")
    @Expose
    private ResultConfig ResultConfig;

    /**
    * 为生成结果图添加标识的开关,默认为1。
1:添加标识。
0:不添加标识。
其他数值:默认按1处理。
建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
    */
    @SerializedName("LogoAdd")
    @Expose
    private Long LogoAdd;

    /**
    * 标识内容设置。
默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
    */
    @SerializedName("LogoParam")
    @Expose
    private LogoParam LogoParam;

    /**
    * 生成自由度。
Strength 值越小,生成图和原图越接近。取值范围0~1,不传默认为0.75。
    */
    @SerializedName("Strength")
    @Expose
    private Float Strength;

    /**
    * 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
    */
    @SerializedName("RspImgType")
    @Expose
    private String RspImgType;

    /**
     * Get 输入图 Base64 数据。
算法将根据输入的图片,结合文本描述智能生成与之相关的图像。
Base64 和 Url 必须提供一个,如果都提供以 Base64 为准。
图片限制:单边分辨率小于2000,转成 Base64 字符串后小于 5MB。 
     * @return InputImage 输入图 Base64 数据。
算法将根据输入的图片,结合文本描述智能生成与之相关的图像。
Base64 和 Url 必须提供一个,如果都提供以 Base64 为准。
图片限制:单边分辨率小于2000,转成 Base64 字符串后小于 5MB。
     */
    public String getInputImage() {
        return this.InputImage;
    }

    /**
     * Set 输入图 Base64 数据。
算法将根据输入的图片,结合文本描述智能生成与之相关的图像。
Base64 和 Url 必须提供一个,如果都提供以 Base64 为准。
图片限制:单边分辨率小于2000,转成 Base64 字符串后小于 5MB。
     * @param InputImage 输入图 Base64 数据。
算法将根据输入的图片,结合文本描述智能生成与之相关的图像。
Base64 和 Url 必须提供一个,如果都提供以 Base64 为准。
图片限制:单边分辨率小于2000,转成 Base64 字符串后小于 5MB。
     */
    public void setInputImage(String InputImage) {
        this.InputImage = InputImage;
    }

    /**
     * Get 输入图 Url。
算法将根据输入的图片,结合文本描述智能生成与之相关的图像。
Base64 和 Url 必须提供一个,如果都提供以 Base64 为准。
图片限制:单边分辨率小于2000,转成 Base64 字符串后小于 5MB。 
     * @return InputUrl 输入图 Url。
算法将根据输入的图片,结合文本描述智能生成与之相关的图像。
Base64 和 Url 必须提供一个,如果都提供以 Base64 为准。
图片限制:单边分辨率小于2000,转成 Base64 字符串后小于 5MB。
     */
    public String getInputUrl() {
        return this.InputUrl;
    }

    /**
     * Set 输入图 Url。
算法将根据输入的图片,结合文本描述智能生成与之相关的图像。
Base64 和 Url 必须提供一个,如果都提供以 Base64 为准。
图片限制:单边分辨率小于2000,转成 Base64 字符串后小于 5MB。
     * @param InputUrl 输入图 Url。
算法将根据输入的图片,结合文本描述智能生成与之相关的图像。
Base64 和 Url 必须提供一个,如果都提供以 Base64 为准。
图片限制:单边分辨率小于2000,转成 Base64 字符串后小于 5MB。
     */
    public void setInputUrl(String InputUrl) {
        this.InputUrl = InputUrl;
    }

    /**
     * Get 文本描述。
用于在输入图的基础上引导生成图效果,增加生成结果中出现描述内容的可能。
推荐使用中文。最多支持256个 utf-8 字符。 
     * @return Prompt 文本描述。
用于在输入图的基础上引导生成图效果,增加生成结果中出现描述内容的可能。
推荐使用中文。最多支持256个 utf-8 字符。
     */
    public String getPrompt() {
        return this.Prompt;
    }

    /**
     * Set 文本描述。
用于在输入图的基础上引导生成图效果,增加生成结果中出现描述内容的可能。
推荐使用中文。最多支持256个 utf-8 字符。
     * @param Prompt 文本描述。
用于在输入图的基础上引导生成图效果,增加生成结果中出现描述内容的可能。
推荐使用中文。最多支持256个 utf-8 字符。
     */
    public void setPrompt(String Prompt) {
        this.Prompt = Prompt;
    }

    /**
     * Get 反向文本描述。
用于一定程度上从反面引导模型生成的走向,减少生成结果中出现描述内容的可能,但不能完全杜绝。
推荐使用中文。最多可传256个 utf-8 字符。 
     * @return NegativePrompt 反向文本描述。
用于一定程度上从反面引导模型生成的走向,减少生成结果中出现描述内容的可能,但不能完全杜绝。
推荐使用中文。最多可传256个 utf-8 字符。
     */
    public String getNegativePrompt() {
        return this.NegativePrompt;
    }

    /**
     * Set 反向文本描述。
用于一定程度上从反面引导模型生成的走向,减少生成结果中出现描述内容的可能,但不能完全杜绝。
推荐使用中文。最多可传256个 utf-8 字符。
     * @param NegativePrompt 反向文本描述。
用于一定程度上从反面引导模型生成的走向,减少生成结果中出现描述内容的可能,但不能完全杜绝。
推荐使用中文。最多可传256个 utf-8 字符。
     */
    public void setNegativePrompt(String NegativePrompt) {
        this.NegativePrompt = NegativePrompt;
    }

    /**
     * Get 绘画风格。
请在  [智能图生图风格列表](https://cloud.tencent.com/document/product/1668/86250) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。 
     * @return Styles 绘画风格。
请在  [智能图生图风格列表](https://cloud.tencent.com/document/product/1668/86250) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。
     */
    public String [] getStyles() {
        return this.Styles;
    }

    /**
     * Set 绘画风格。
请在  [智能图生图风格列表](https://cloud.tencent.com/document/product/1668/86250) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。
     * @param Styles 绘画风格。
请在  [智能图生图风格列表](https://cloud.tencent.com/document/product/1668/86250) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。
     */
    public void setStyles(String [] Styles) {
        this.Styles = Styles;
    }

    /**
     * Get 生成图结果的配置,包括输出图片分辨率和尺寸等。 
     * @return ResultConfig 生成图结果的配置,包括输出图片分辨率和尺寸等。
     */
    public ResultConfig getResultConfig() {
        return this.ResultConfig;
    }

    /**
     * Set 生成图结果的配置,包括输出图片分辨率和尺寸等。
     * @param ResultConfig 生成图结果的配置,包括输出图片分辨率和尺寸等。
     */
    public void setResultConfig(ResultConfig ResultConfig) {
        this.ResultConfig = ResultConfig;
    }

    /**
     * Get 为生成结果图添加标识的开关,默认为1。
1:添加标识。
0:不添加标识。
其他数值:默认按1处理。
建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。 
     * @return LogoAdd 为生成结果图添加标识的开关,默认为1。
1:添加标识。
0:不添加标识。
其他数值:默认按1处理。
建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
     */
    public Long getLogoAdd() {
        return this.LogoAdd;
    }

    /**
     * Set 为生成结果图添加标识的开关,默认为1。
1:添加标识。
0:不添加标识。
其他数值:默认按1处理。
建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
     * @param LogoAdd 为生成结果图添加标识的开关,默认为1。
1:添加标识。
0:不添加标识。
其他数值:默认按1处理。
建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
     */
    public void setLogoAdd(Long LogoAdd) {
        this.LogoAdd = LogoAdd;
    }

    /**
     * Get 标识内容设置。
默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。 
     * @return LogoParam 标识内容设置。
默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
     */
    public LogoParam getLogoParam() {
        return this.LogoParam;
    }

    /**
     * Set 标识内容设置。
默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
     * @param LogoParam 标识内容设置。
默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
     */
    public void setLogoParam(LogoParam LogoParam) {
        this.LogoParam = LogoParam;
    }

    /**
     * Get 生成自由度。
Strength 值越小,生成图和原图越接近。取值范围0~1,不传默认为0.75。 
     * @return Strength 生成自由度。
Strength 值越小,生成图和原图越接近。取值范围0~1,不传默认为0.75。
     */
    public Float getStrength() {
        return this.Strength;
    }

    /**
     * Set 生成自由度。
Strength 值越小,生成图和原图越接近。取值范围0~1,不传默认为0.75。
     * @param Strength 生成自由度。
Strength 值越小,生成图和原图越接近。取值范围0~1,不传默认为0.75。
     */
    public void setStrength(Float Strength) {
        this.Strength = Strength;
    }

    /**
     * Get 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。 
     * @return RspImgType 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
     */
    public String getRspImgType() {
        return this.RspImgType;
    }

    /**
     * Set 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
     * @param RspImgType 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
     */
    public void setRspImgType(String RspImgType) {
        this.RspImgType = RspImgType;
    }

    public ImageToImageRequest() {
    }

    /**
     * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
     *       and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
     */
    public ImageToImageRequest(ImageToImageRequest source) {
        if (source.InputImage != null) {
            this.InputImage = new String(source.InputImage);
        }
        if (source.InputUrl != null) {
            this.InputUrl = new String(source.InputUrl);
        }
        if (source.Prompt != null) {
            this.Prompt = new String(source.Prompt);
        }
        if (source.NegativePrompt != null) {
            this.NegativePrompt = new String(source.NegativePrompt);
        }
        if (source.Styles != null) {
            this.Styles = new String[source.Styles.length];
            for (int i = 0; i < source.Styles.length; i++) {
                this.Styles[i] = new String(source.Styles[i]);
            }
        }
        if (source.ResultConfig != null) {
            this.ResultConfig = new ResultConfig(source.ResultConfig);
        }
        if (source.LogoAdd != null) {
            this.LogoAdd = new Long(source.LogoAdd);
        }
        if (source.LogoParam != null) {
            this.LogoParam = new LogoParam(source.LogoParam);
        }
        if (source.Strength != null) {
            this.Strength = new Float(source.Strength);
        }
        if (source.RspImgType != null) {
            this.RspImgType = new String(source.RspImgType);
        }
    }


    /**
     * Internal implementation, normal users should not use it.
     */
    public void toMap(HashMap map, String prefix) {
        this.setParamSimple(map, prefix + "InputImage", this.InputImage);
        this.setParamSimple(map, prefix + "InputUrl", this.InputUrl);
        this.setParamSimple(map, prefix + "Prompt", this.Prompt);
        this.setParamSimple(map, prefix + "NegativePrompt", this.NegativePrompt);
        this.setParamArraySimple(map, prefix + "Styles.", this.Styles);
        this.setParamObj(map, prefix + "ResultConfig.", this.ResultConfig);
        this.setParamSimple(map, prefix + "LogoAdd", this.LogoAdd);
        this.setParamObj(map, prefix + "LogoParam.", this.LogoParam);
        this.setParamSimple(map, prefix + "Strength", this.Strength);
        this.setParamSimple(map, prefix + "RspImgType", this.RspImgType);

    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy