Class ImportFunctionResponse
- java.lang.Object
-
- com.huaweicloud.sdk.core.SdkResponse
-
- com.huaweicloud.sdk.functiongraph.v2.model.ImportFunctionResponse
-
public class ImportFunctionResponse extends com.huaweicloud.sdk.core.SdkResponseResponse Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImportFunctionResponse.CodeTypeEnum函数代码类型,取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。static classImportFunctionResponse.RuntimeEnumFunctionGraph函数的执行环境 Python2.7: Python语言2.7版本。 Python3.6: Pyton语言3.6版本。 Python3.9: Python语言3.9版本。 Go1.8: Go语言1.8版本。 Go1.x: Go语言1.x版本。 Java8: Java语言8版本。 Java11: Java语言11版本。 Node.js6.10: Nodejs语言6.10版本。 Node.js8.10: Nodejs语言8.10版本。 Node.js10.16: Nodejs语言10.16版本。 Node.js12.13: Nodejs语言12.13版本。 Node.js14.18: Nodejs语言14.18版本。 C#(.NET Core 2.0): C#语言2.0版本。 C#(.NET Core 2.1): C#语言2.1版本。 C#(.NET Core 3.1): C#语言3.1版本。 Custom: 自定义运行时。 PHP7.3: Php语言7.3版本。 http: HTTP函数。
-
Constructor Summary
Constructors Constructor Description ImportFunctionResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImportFunctionResponseaddDependListItem(String dependListItem)ImportFunctionResponseaddDependVersionListItem(String dependVersionListItem)booleanequals(Object o)StringgetAppXrole()函数app使用的权限委托名称,需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。StringgetCodeFilename()函数的文件名,当CodeType为jar/zip时必须提供该字段,inline和obs不需要提供。LonggetCodeSize()函数大小,单位:字节。ImportFunctionResponse.CodeTypeEnumgetCodeType()函数代码类型,取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。StringgetCodeUrl()当CodeType为obs时,该值为函数代码包在OBS上的地址,CodeType为其他值时,该字段为空。IntegergetCpu()函数占用的cpu资源。 单位为millicore(1 core=1000 millicores)。 取值与MemorySize成比例,默认是128M内存占0.1个核(100 millicores)。 函数占用的CPU为基础CPU:200 millicores,再加上内存按比例占用的CPU,计算方法:内存/128 *100 + 200。List<String>getDependList()依赖id列表List<String>getDependVersionList()依赖版本id列表StringgetDescription()函数描述。StringgetDigest()函数代码SHA512 hash值,用于判断函数是否变化。StringgetDomainId()域名id。StringgetEnterpriseProjectId()企业项目ID,在企业用户创建函数时必填。StringgetExtendConfig()函数扩展配置。StringgetFuncName()函数名称。StringgetFuncUrn()函数的URN(Uniform Resource Name),唯一标识函数。FuncVpcgetFuncVpc()Get funcVpcStringgetHandler()函数执行入口 规则:xx.xx,必须包含“.StringgetImageName()函数版本的内部标识。StringgetInitializerHandler()函数初始化入口,规则:xx.xx,必须包含“.IntegergetInitializerTimeout()初始化超时时间,超时函数将被强行停止,范围1~300秒。java.time.OffsetDateTimegetLastModified()函数最后一次更新时间。IntegergetMemorySize()函数消耗的内存。 单位M。 取值范围为:128、256、512、768、1024、1280、1536、1792、2048、2560、3072、3584、4096。 最小值为128,最大值为4096。StringgetNamespace()租户的project id。StringgetPackage()函数所属的分组Package,用于用户针对函数的自定义分组。StringgetProjectName()租户的project name。ImportFunctionResponse.RuntimeEnumgetRuntime()FunctionGraph函数的执行环境 Python2.7: Python语言2.7版本。 Python3.6: Pyton语言3.6版本。 Python3.9: Python语言3.9版本。 Go1.8: Go语言1.8版本。 Go1.x: Go语言1.x版本。 Java8: Java语言8版本。 Java11: Java语言11版本。 Node.js6.10: Nodejs语言6.10版本。 Node.js8.10: Nodejs语言8.10版本。 Node.js10.16: Nodejs语言10.16版本。 Node.js12.13: Nodejs语言12.13版本。 Node.js14.18: Nodejs语言14.18版本。 C#(.NET Core 2.0): C#语言2.0版本。 C#(.NET Core 2.1): C#语言2.1版本。 C#(.NET Core 3.1): C#语言3.1版本。 Custom: 自定义运行时。 PHP7.3: Php语言7.3版本。 http: HTTP函数。StrategyConfiggetStrategyConfig()Get strategyConfigIntegergetTimeout()函数执行超时时间,超时函数将被强行停止,范围3~900秒,可以通过白名单配置延长到12小时,具体可以咨询华为云函数工作流服务进行配置StringgetUserData()用户自定义的name/value信息。 在函数中使用的参数。 举例:如函数要访问某个主机,可以设置自定义参数:Host={host_ip},最多定义20个,总长度不超过4KB。StringgetVersion()函数版本号,由系统自动生成,规则:vYYYYMMDD-HHMMSS(v+年月日-时分秒)。StringgetVersionDescription()函数版本描述。StringgetXrole()函数使用的权限委托名称,需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。inthashCode()voidsetAppXrole(String appXrole)voidsetCodeFilename(String codeFilename)voidsetCodeSize(Long codeSize)voidsetCodeType(ImportFunctionResponse.CodeTypeEnum codeType)voidsetCodeUrl(String codeUrl)voidsetCpu(Integer cpu)voidsetDependList(List<String> dependList)voidsetDependVersionList(List<String> dependVersionList)voidsetDescription(String description)voidsetDigest(String digest)voidsetDomainId(String domainId)voidsetEnterpriseProjectId(String enterpriseProjectId)voidsetExtendConfig(String extendConfig)voidsetFuncName(String funcName)voidsetFuncUrn(String funcUrn)voidsetFuncVpc(FuncVpc funcVpc)voidsetHandler(String handler)voidsetImageName(String imageName)voidsetInitializerHandler(String initializerHandler)voidsetInitializerTimeout(Integer initializerTimeout)voidsetLastModified(java.time.OffsetDateTime lastModified)voidsetMemorySize(Integer memorySize)voidsetNamespace(String namespace)voidsetPackage(String _package)voidsetProjectName(String projectName)voidsetRuntime(ImportFunctionResponse.RuntimeEnum runtime)voidsetStrategyConfig(StrategyConfig strategyConfig)voidsetTimeout(Integer timeout)voidsetUserData(String userData)voidsetVersion(String version)voidsetVersionDescription(String versionDescription)voidsetXrole(String xrole)StringtoString()ImportFunctionResponsewithAppXrole(String appXrole)ImportFunctionResponsewithCodeFilename(String codeFilename)ImportFunctionResponsewithCodeSize(Long codeSize)ImportFunctionResponsewithCodeType(ImportFunctionResponse.CodeTypeEnum codeType)ImportFunctionResponsewithCodeUrl(String codeUrl)ImportFunctionResponsewithCpu(Integer cpu)ImportFunctionResponsewithDependList(java.util.function.Consumer<List<String>> dependListSetter)ImportFunctionResponsewithDependList(List<String> dependList)ImportFunctionResponsewithDependVersionList(java.util.function.Consumer<List<String>> dependVersionListSetter)ImportFunctionResponsewithDependVersionList(List<String> dependVersionList)ImportFunctionResponsewithDescription(String description)ImportFunctionResponsewithDigest(String digest)ImportFunctionResponsewithDomainId(String domainId)ImportFunctionResponsewithEnterpriseProjectId(String enterpriseProjectId)ImportFunctionResponsewithExtendConfig(String extendConfig)ImportFunctionResponsewithFuncName(String funcName)ImportFunctionResponsewithFuncUrn(String funcUrn)ImportFunctionResponsewithFuncVpc(FuncVpc funcVpc)ImportFunctionResponsewithFuncVpc(java.util.function.Consumer<FuncVpc> funcVpcSetter)ImportFunctionResponsewithHandler(String handler)ImportFunctionResponsewithImageName(String imageName)ImportFunctionResponsewithInitializerHandler(String initializerHandler)ImportFunctionResponsewithInitializerTimeout(Integer initializerTimeout)ImportFunctionResponsewithLastModified(java.time.OffsetDateTime lastModified)ImportFunctionResponsewithMemorySize(Integer memorySize)ImportFunctionResponsewithNamespace(String namespace)ImportFunctionResponsewithPackage(String _package)ImportFunctionResponsewithProjectName(String projectName)ImportFunctionResponsewithRuntime(ImportFunctionResponse.RuntimeEnum runtime)ImportFunctionResponsewithStrategyConfig(StrategyConfig strategyConfig)ImportFunctionResponsewithStrategyConfig(java.util.function.Consumer<StrategyConfig> strategyConfigSetter)ImportFunctionResponsewithTimeout(Integer timeout)ImportFunctionResponsewithUserData(String userData)ImportFunctionResponsewithVersion(String version)ImportFunctionResponsewithVersionDescription(String versionDescription)ImportFunctionResponsewithXrole(String xrole)
-
-
-
Method Detail
-
withFuncUrn
public ImportFunctionResponse withFuncUrn(String funcUrn)
-
getFuncUrn
public String getFuncUrn()
函数的URN(Uniform Resource Name),唯一标识函数。- Returns:
- funcUrn
-
setFuncUrn
public void setFuncUrn(String funcUrn)
-
withFuncName
public ImportFunctionResponse withFuncName(String funcName)
-
getFuncName
public String getFuncName()
函数名称。- Returns:
- funcName
-
setFuncName
public void setFuncName(String funcName)
-
withDomainId
public ImportFunctionResponse withDomainId(String domainId)
-
getDomainId
public String getDomainId()
域名id。- Returns:
- domainId
-
setDomainId
public void setDomainId(String domainId)
-
withNamespace
public ImportFunctionResponse withNamespace(String namespace)
-
getNamespace
public String getNamespace()
租户的project id。- Returns:
- namespace
-
setNamespace
public void setNamespace(String namespace)
-
withProjectName
public ImportFunctionResponse withProjectName(String projectName)
-
getProjectName
public String getProjectName()
租户的project name。- Returns:
- projectName
-
setProjectName
public void setProjectName(String projectName)
-
withPackage
public ImportFunctionResponse withPackage(String _package)
-
getPackage
public String getPackage()
函数所属的分组Package,用于用户针对函数的自定义分组。- Returns:
- _package
-
setPackage
public void setPackage(String _package)
-
withRuntime
public ImportFunctionResponse withRuntime(ImportFunctionResponse.RuntimeEnum runtime)
-
getRuntime
public ImportFunctionResponse.RuntimeEnum getRuntime()
FunctionGraph函数的执行环境 Python2.7: Python语言2.7版本。 Python3.6: Pyton语言3.6版本。 Python3.9: Python语言3.9版本。 Go1.8: Go语言1.8版本。 Go1.x: Go语言1.x版本。 Java8: Java语言8版本。 Java11: Java语言11版本。 Node.js6.10: Nodejs语言6.10版本。 Node.js8.10: Nodejs语言8.10版本。 Node.js10.16: Nodejs语言10.16版本。 Node.js12.13: Nodejs语言12.13版本。 Node.js14.18: Nodejs语言14.18版本。 C#(.NET Core 2.0): C#语言2.0版本。 C#(.NET Core 2.1): C#语言2.1版本。 C#(.NET Core 3.1): C#语言3.1版本。 Custom: 自定义运行时。 PHP7.3: Php语言7.3版本。 http: HTTP函数。- Returns:
- runtime
-
setRuntime
public void setRuntime(ImportFunctionResponse.RuntimeEnum runtime)
-
withTimeout
public ImportFunctionResponse withTimeout(Integer timeout)
-
getTimeout
public Integer getTimeout()
函数执行超时时间,超时函数将被强行停止,范围3~900秒,可以通过白名单配置延长到12小时,具体可以咨询华为云函数工作流服务进行配置- Returns:
- timeout
-
setTimeout
public void setTimeout(Integer timeout)
-
withHandler
public ImportFunctionResponse withHandler(String handler)
-
getHandler
public String getHandler()
函数执行入口 规则:xx.xx,必须包含“. ” 举例:对于node.js函数:myfunction.handler,则表示函数的文件名为myfunction.js,执行的入口函数名为handler。- Returns:
- handler
-
setHandler
public void setHandler(String handler)
-
withMemorySize
public ImportFunctionResponse withMemorySize(Integer memorySize)
-
getMemorySize
public Integer getMemorySize()
函数消耗的内存。 单位M。 取值范围为:128、256、512、768、1024、1280、1536、1792、2048、2560、3072、3584、4096。 最小值为128,最大值为4096。- Returns:
- memorySize
-
setMemorySize
public void setMemorySize(Integer memorySize)
-
withCpu
public ImportFunctionResponse withCpu(Integer cpu)
-
getCpu
public Integer getCpu()
函数占用的cpu资源。 单位为millicore(1 core=1000 millicores)。 取值与MemorySize成比例,默认是128M内存占0.1个核(100 millicores)。 函数占用的CPU为基础CPU:200 millicores,再加上内存按比例占用的CPU,计算方法:内存/128 *100 + 200。- Returns:
- cpu
-
setCpu
public void setCpu(Integer cpu)
-
withCodeType
public ImportFunctionResponse withCodeType(ImportFunctionResponse.CodeTypeEnum codeType)
-
getCodeType
public ImportFunctionResponse.CodeTypeEnum getCodeType()
函数代码类型,取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。- Returns:
- codeType
-
setCodeType
public void setCodeType(ImportFunctionResponse.CodeTypeEnum codeType)
-
withCodeUrl
public ImportFunctionResponse withCodeUrl(String codeUrl)
-
getCodeUrl
public String getCodeUrl()
当CodeType为obs时,该值为函数代码包在OBS上的地址,CodeType为其他值时,该字段为空。- Returns:
- codeUrl
-
setCodeUrl
public void setCodeUrl(String codeUrl)
-
withCodeFilename
public ImportFunctionResponse withCodeFilename(String codeFilename)
-
getCodeFilename
public String getCodeFilename()
函数的文件名,当CodeType为jar/zip时必须提供该字段,inline和obs不需要提供。- Returns:
- codeFilename
-
setCodeFilename
public void setCodeFilename(String codeFilename)
-
withCodeSize
public ImportFunctionResponse withCodeSize(Long codeSize)
-
getCodeSize
public Long getCodeSize()
函数大小,单位:字节。- Returns:
- codeSize
-
setCodeSize
public void setCodeSize(Long codeSize)
-
withUserData
public ImportFunctionResponse withUserData(String userData)
-
getUserData
public String getUserData()
用户自定义的name/value信息。 在函数中使用的参数。 举例:如函数要访问某个主机,可以设置自定义参数:Host={host_ip},最多定义20个,总长度不超过4KB。- Returns:
- userData
-
setUserData
public void setUserData(String userData)
-
withDigest
public ImportFunctionResponse withDigest(String digest)
-
getDigest
public String getDigest()
函数代码SHA512 hash值,用于判断函数是否变化。- Returns:
- digest
-
setDigest
public void setDigest(String digest)
-
withVersion
public ImportFunctionResponse withVersion(String version)
-
getVersion
public String getVersion()
函数版本号,由系统自动生成,规则:vYYYYMMDD-HHMMSS(v+年月日-时分秒)。- Returns:
- version
-
setVersion
public void setVersion(String version)
-
withImageName
public ImportFunctionResponse withImageName(String imageName)
-
getImageName
public String getImageName()
函数版本的内部标识。- Returns:
- imageName
-
setImageName
public void setImageName(String imageName)
-
withXrole
public ImportFunctionResponse withXrole(String xrole)
-
getXrole
public String getXrole()
函数使用的权限委托名称,需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。- Returns:
- xrole
-
setXrole
public void setXrole(String xrole)
-
withAppXrole
public ImportFunctionResponse withAppXrole(String appXrole)
-
getAppXrole
public String getAppXrole()
函数app使用的权限委托名称,需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。- Returns:
- appXrole
-
setAppXrole
public void setAppXrole(String appXrole)
-
withDescription
public ImportFunctionResponse withDescription(String description)
-
getDescription
public String getDescription()
函数描述。- Returns:
- description
-
setDescription
public void setDescription(String description)
-
withVersionDescription
public ImportFunctionResponse withVersionDescription(String versionDescription)
-
getVersionDescription
public String getVersionDescription()
函数版本描述。- Returns:
- versionDescription
-
setVersionDescription
public void setVersionDescription(String versionDescription)
-
withLastModified
public ImportFunctionResponse withLastModified(java.time.OffsetDateTime lastModified)
-
getLastModified
public java.time.OffsetDateTime getLastModified()
函数最后一次更新时间。- Returns:
- lastModified
-
setLastModified
public void setLastModified(java.time.OffsetDateTime lastModified)
-
withFuncVpc
public ImportFunctionResponse withFuncVpc(FuncVpc funcVpc)
-
withFuncVpc
public ImportFunctionResponse withFuncVpc(java.util.function.Consumer<FuncVpc> funcVpcSetter)
-
getFuncVpc
public FuncVpc getFuncVpc()
Get funcVpc- Returns:
- funcVpc
-
setFuncVpc
public void setFuncVpc(FuncVpc funcVpc)
-
withDependList
public ImportFunctionResponse withDependList(List<String> dependList)
-
addDependListItem
public ImportFunctionResponse addDependListItem(String dependListItem)
-
withDependList
public ImportFunctionResponse withDependList(java.util.function.Consumer<List<String>> dependListSetter)
-
withDependVersionList
public ImportFunctionResponse withDependVersionList(List<String> dependVersionList)
-
addDependVersionListItem
public ImportFunctionResponse addDependVersionListItem(String dependVersionListItem)
-
withDependVersionList
public ImportFunctionResponse withDependVersionList(java.util.function.Consumer<List<String>> dependVersionListSetter)
-
withStrategyConfig
public ImportFunctionResponse withStrategyConfig(StrategyConfig strategyConfig)
-
withStrategyConfig
public ImportFunctionResponse withStrategyConfig(java.util.function.Consumer<StrategyConfig> strategyConfigSetter)
-
getStrategyConfig
public StrategyConfig getStrategyConfig()
Get strategyConfig- Returns:
- strategyConfig
-
setStrategyConfig
public void setStrategyConfig(StrategyConfig strategyConfig)
-
withExtendConfig
public ImportFunctionResponse withExtendConfig(String extendConfig)
-
getExtendConfig
public String getExtendConfig()
函数扩展配置。- Returns:
- extendConfig
-
setExtendConfig
public void setExtendConfig(String extendConfig)
-
withInitializerHandler
public ImportFunctionResponse withInitializerHandler(String initializerHandler)
-
getInitializerHandler
public String getInitializerHandler()
函数初始化入口,规则:xx.xx,必须包含“. ”。 举例:对于node.js函数:myfunction.initializer,则表示函数的文件名为myfunction.js,初始化的入口函数名为initializer。- Returns:
- initializerHandler
-
setInitializerHandler
public void setInitializerHandler(String initializerHandler)
-
withInitializerTimeout
public ImportFunctionResponse withInitializerTimeout(Integer initializerTimeout)
-
getInitializerTimeout
public Integer getInitializerTimeout()
初始化超时时间,超时函数将被强行停止,范围1~300秒。- Returns:
- initializerTimeout
-
setInitializerTimeout
public void setInitializerTimeout(Integer initializerTimeout)
-
withEnterpriseProjectId
public ImportFunctionResponse withEnterpriseProjectId(String enterpriseProjectId)
-
getEnterpriseProjectId
public String getEnterpriseProjectId()
企业项目ID,在企业用户创建函数时必填。- Returns:
- enterpriseProjectId
-
setEnterpriseProjectId
public void setEnterpriseProjectId(String enterpriseProjectId)
-
-