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

commonMain.aws.sdk.kotlin.services.proton.model.CreateTemplateSyncConfigRequest.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.proton.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateTemplateSyncConfigRequest private constructor(builder: Builder) {
    /**
     * The repository branch for your template.
     */
    public val branch: kotlin.String = requireNotNull(builder.branch) { "A non-null value must be provided for branch" }
    /**
     * The repository name (for example, `myrepos/myrepo`).
     */
    public val repositoryName: kotlin.String = requireNotNull(builder.repositoryName) { "A non-null value must be provided for repositoryName" }
    /**
     * The provider type for your repository.
     */
    public val repositoryProvider: aws.sdk.kotlin.services.proton.model.RepositoryProvider = requireNotNull(builder.repositoryProvider) { "A non-null value must be provided for repositoryProvider" }
    /**
     * A repository subdirectory path to your template bundle directory. When included, Proton limits the template bundle search to this repository directory.
     */
    public val subdirectory: kotlin.String? = builder.subdirectory
    /**
     * The name of your registered template.
     */
    public val templateName: kotlin.String = requireNotNull(builder.templateName) { "A non-null value must be provided for templateName" }
    /**
     * The type of the registered template.
     */
    public val templateType: aws.sdk.kotlin.services.proton.model.TemplateType = requireNotNull(builder.templateType) { "A non-null value must be provided for templateType" }

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

    override fun toString(): kotlin.String = buildString {
        append("CreateTemplateSyncConfigRequest(")
        append("branch=$branch,")
        append("repositoryName=$repositoryName,")
        append("repositoryProvider=$repositoryProvider,")
        append("subdirectory=$subdirectory,")
        append("templateName=$templateName,")
        append("templateType=$templateType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = branch.hashCode()
        result = 31 * result + (repositoryName.hashCode())
        result = 31 * result + (repositoryProvider.hashCode())
        result = 31 * result + (subdirectory?.hashCode() ?: 0)
        result = 31 * result + (templateName.hashCode())
        result = 31 * result + (templateType.hashCode())
        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 CreateTemplateSyncConfigRequest

        if (branch != other.branch) return false
        if (repositoryName != other.repositoryName) return false
        if (repositoryProvider != other.repositoryProvider) return false
        if (subdirectory != other.subdirectory) return false
        if (templateName != other.templateName) return false
        if (templateType != other.templateType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The repository branch for your template.
         */
        public var branch: kotlin.String? = null
        /**
         * The repository name (for example, `myrepos/myrepo`).
         */
        public var repositoryName: kotlin.String? = null
        /**
         * The provider type for your repository.
         */
        public var repositoryProvider: aws.sdk.kotlin.services.proton.model.RepositoryProvider? = null
        /**
         * A repository subdirectory path to your template bundle directory. When included, Proton limits the template bundle search to this repository directory.
         */
        public var subdirectory: kotlin.String? = null
        /**
         * The name of your registered template.
         */
        public var templateName: kotlin.String? = null
        /**
         * The type of the registered template.
         */
        public var templateType: aws.sdk.kotlin.services.proton.model.TemplateType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.proton.model.CreateTemplateSyncConfigRequest) : this() {
            this.branch = x.branch
            this.repositoryName = x.repositoryName
            this.repositoryProvider = x.repositoryProvider
            this.subdirectory = x.subdirectory
            this.templateName = x.templateName
            this.templateType = x.templateType
        }

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

        internal fun correctErrors(): Builder {
            if (branch == null) branch = ""
            if (repositoryName == null) repositoryName = ""
            if (repositoryProvider == null) repositoryProvider = RepositoryProvider.SdkUnknown("no value provided")
            if (templateName == null) templateName = ""
            if (templateType == null) templateType = TemplateType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy