commonMain.aws.sdk.kotlin.services.greengrass.model.FunctionRunAsConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of greengrass-jvm Show documentation
Show all versions of greengrass-jvm Show documentation
The AWS SDK for Kotlin client for Greengrass
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.greengrass.model
/**
* Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must set ''IsolationMode'' to ''NoContainer'' and update config.json in ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''.
*/
public class FunctionRunAsConfig private constructor(builder: Builder) {
/**
* The group ID whose permissions are used to run a Lambda function.
*/
public val gid: kotlin.Int? = builder.gid
/**
* The user ID whose permissions are used to run a Lambda function.
*/
public val uid: kotlin.Int? = builder.uid
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.greengrass.model.FunctionRunAsConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FunctionRunAsConfig(")
append("gid=$gid,")
append("uid=$uid")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = gid ?: 0
result = 31 * result + (uid ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as FunctionRunAsConfig
if (gid != other.gid) return false
if (uid != other.uid) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.greengrass.model.FunctionRunAsConfig = Builder(this).apply(block).build()
public class Builder {
/**
* The group ID whose permissions are used to run a Lambda function.
*/
public var gid: kotlin.Int? = null
/**
* The user ID whose permissions are used to run a Lambda function.
*/
public var uid: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.greengrass.model.FunctionRunAsConfig) : this() {
this.gid = x.gid
this.uid = x.uid
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.greengrass.model.FunctionRunAsConfig = FunctionRunAsConfig(this)
internal fun correctErrors(): Builder {
return this
}
}
}