
com.huaweicloud.sdk.functiongraph.v2.model.ExportFunctionRequest Maven / Gradle / Ivy
package com.huaweicloud.sdk.functiongraph.v2.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/** Request Object */
public class ExportFunctionRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "function_urn")
private String functionUrn;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "config")
private Boolean config;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "code")
private Boolean code;
/** 兼容老的方式,type=code代表导出代码,type=config代码导出配置 */
public static final class TypeEnum {
/** Enum TYPE for value: "type" */
public static final TypeEnum TYPE = new TypeEnum("type");
/** Enum CODE for value: "code" */
public static final TypeEnum CODE = new TypeEnum("code");
private static final Map STATIC_FIELDS = createStaticFields();
private static Map createStaticFields() {
Map map = new HashMap<>();
map.put("type", TYPE);
map.put("code", CODE);
return Collections.unmodifiableMap(map);
}
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String value) {
if (value == null) {
return null;
}
TypeEnum result = STATIC_FIELDS.get(value);
if (result == null) {
result = new TypeEnum(value);
}
return result;
}
public static TypeEnum valueOf(String value) {
if (value == null) {
return null;
}
TypeEnum result = STATIC_FIELDS.get(value);
if (result != null) {
return result;
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
@Override
public boolean equals(Object obj) {
if (obj instanceof TypeEnum) {
return this.value.equals(((TypeEnum) obj).value);
}
return false;
}
@Override
public int hashCode() {
return this.value.hashCode();
}
}
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "type")
private TypeEnum type;
public ExportFunctionRequest withFunctionUrn(String functionUrn) {
this.functionUrn = functionUrn;
return this;
}
/** 函数的URN(Uniform Resource Name),唯一标识函数。
*
* @return functionUrn */
public String getFunctionUrn() {
return functionUrn;
}
public void setFunctionUrn(String functionUrn) {
this.functionUrn = functionUrn;
}
public ExportFunctionRequest withConfig(Boolean config) {
this.config = config;
return this;
}
/** 是否导出函数配置
*
* @return config */
public Boolean getConfig() {
return config;
}
public void setConfig(Boolean config) {
this.config = config;
}
public ExportFunctionRequest withCode(Boolean code) {
this.code = code;
return this;
}
/** 是否导出函数代码
*
* @return code */
public Boolean getCode() {
return code;
}
public void setCode(Boolean code) {
this.code = code;
}
public ExportFunctionRequest withType(TypeEnum type) {
this.type = type;
return this;
}
/** 兼容老的方式,type=code代表导出代码,type=config代码导出配置
*
* @return type */
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ExportFunctionRequest exportFunctionRequest = (ExportFunctionRequest) o;
return Objects.equals(this.functionUrn, exportFunctionRequest.functionUrn)
&& Objects.equals(this.config, exportFunctionRequest.config)
&& Objects.equals(this.code, exportFunctionRequest.code)
&& Objects.equals(this.type, exportFunctionRequest.type);
}
@Override
public int hashCode() {
return Objects.hash(functionUrn, config, code, type);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ExportFunctionRequest {\n");
sb.append(" functionUrn: ").append(toIndentedString(functionUrn)).append("\n");
sb.append(" config: ").append(toIndentedString(config)).append("\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).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 - 2025 Weber Informatics LLC | Privacy Policy