
com.tencentcloudapi.aiart.v20221229.models.TextToImageRequest 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 TextToImageRequest extends AbstractModel{
/**
* 文本描述。
算法将根据输入的文本智能生成与之相关的图像。建议详细描述画面主体、细节、场景等,文本描述越丰富,生成效果越精美。
不能为空,推荐使用中文。最多可传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/86249) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用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;
/**
* 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
*/
@SerializedName("RspImgType")
@Expose
private String RspImgType;
/**
* 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/86249) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。
* @return Styles 绘画风格。
请在 [智能文生图风格列表](https://cloud.tencent.com/document/product/1668/86249) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。
*/
public String [] getStyles() {
return this.Styles;
}
/**
* Set 绘画风格。
请在 [智能文生图风格列表](https://cloud.tencent.com/document/product/1668/86249) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。
* @param Styles 绘画风格。
请在 [智能文生图风格列表](https://cloud.tencent.com/document/product/1668/86249) 中选择期望的风格,传入风格编号。
推荐使用且只使用一种风格。不传默认使用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 返回图像方式(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 TextToImageRequest() {
}
/**
* 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 TextToImageRequest(TextToImageRequest source) {
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.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 + "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 + "RspImgType", this.RspImgType);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy