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

commonMain.aws.sdk.kotlin.services.elasticbeanstalk.model.RequestEnvironmentInfoRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.31
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.elasticbeanstalk.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Request to retrieve logs from an environment and store them in your Elastic Beanstalk storage bucket.
 */
public class RequestEnvironmentInfoRequest private constructor(builder: Builder) {
    /**
     * The ID of the environment of the requested data.
     *
     * If no such environment is found, `RequestEnvironmentInfo` returns an `InvalidParameterValue` error.
     *
     * Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns `MissingRequiredParameter` error.
     */
    public val environmentId: kotlin.String? = builder.environmentId
    /**
     * The name of the environment of the requested data.
     *
     * If no such environment is found, `RequestEnvironmentInfo` returns an `InvalidParameterValue` error.
     *
     * Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns `MissingRequiredParameter` error.
     */
    public val environmentName: kotlin.String? = builder.environmentName
    /**
     * The type of information to request.
     */
    public val infoType: aws.sdk.kotlin.services.elasticbeanstalk.model.EnvironmentInfoType? = builder.infoType

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.elasticbeanstalk.model.RequestEnvironmentInfoRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("RequestEnvironmentInfoRequest(")
        append("environmentId=$environmentId,")
        append("environmentName=$environmentName,")
        append("infoType=$infoType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = environmentId?.hashCode() ?: 0
        result = 31 * result + (environmentName?.hashCode() ?: 0)
        result = 31 * result + (infoType?.hashCode() ?: 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 RequestEnvironmentInfoRequest

        if (environmentId != other.environmentId) return false
        if (environmentName != other.environmentName) return false
        if (infoType != other.infoType) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.elasticbeanstalk.model.RequestEnvironmentInfoRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The ID of the environment of the requested data.
         *
         * If no such environment is found, `RequestEnvironmentInfo` returns an `InvalidParameterValue` error.
         *
         * Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns `MissingRequiredParameter` error.
         */
        public var environmentId: kotlin.String? = null
        /**
         * The name of the environment of the requested data.
         *
         * If no such environment is found, `RequestEnvironmentInfo` returns an `InvalidParameterValue` error.
         *
         * Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns `MissingRequiredParameter` error.
         */
        public var environmentName: kotlin.String? = null
        /**
         * The type of information to request.
         */
        public var infoType: aws.sdk.kotlin.services.elasticbeanstalk.model.EnvironmentInfoType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elasticbeanstalk.model.RequestEnvironmentInfoRequest) : this() {
            this.environmentId = x.environmentId
            this.environmentName = x.environmentName
            this.infoType = x.infoType
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.elasticbeanstalk.model.RequestEnvironmentInfoRequest = RequestEnvironmentInfoRequest(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy