
commonMain.aws.sdk.kotlin.services.codecommit.model.CreateRepositoryRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codecommit.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Represents the input of a create repository operation.
*/
public class CreateRepositoryRequest private constructor(builder: Builder) {
/**
* The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to programmatically retrieve a key ID. For more information about acceptable values for kmsKeyID, see [KeyId](https://docs.aws.amazon.com/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId) in the Decrypt API description in the *Key Management Service API Reference*.
*
* If no key is specified, the default `aws/codecommit` Amazon Web Services managed key is used.
*/
public val kmsKeyId: kotlin.String? = builder.kmsKeyId
/**
* A comment or description about the new repository.
*
* The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.
*/
public val repositoryDescription: kotlin.String? = builder.repositoryDescription
/**
* The name of the new repository to be created.
*
* The repository name must be unique across the calling Amazon Web Services account. Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For more information about the limits on repository names, see [Quotas](https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html) in the *CodeCommit User Guide*. The suffix .git is prohibited.
*/
public val repositoryName: kotlin.String? = builder.repositoryName
/**
* One or more tag key-value pairs to use when tagging this repository.
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.CreateRepositoryRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateRepositoryRequest(")
append("kmsKeyId=$kmsKeyId,")
append("repositoryDescription=$repositoryDescription,")
append("repositoryName=$repositoryName,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = kmsKeyId?.hashCode() ?: 0
result = 31 * result + (repositoryDescription?.hashCode() ?: 0)
result = 31 * result + (repositoryName?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreateRepositoryRequest
if (kmsKeyId != other.kmsKeyId) return false
if (repositoryDescription != other.repositoryDescription) return false
if (repositoryName != other.repositoryName) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.CreateRepositoryRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to programmatically retrieve a key ID. For more information about acceptable values for kmsKeyID, see [KeyId](https://docs.aws.amazon.com/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId) in the Decrypt API description in the *Key Management Service API Reference*.
*
* If no key is specified, the default `aws/codecommit` Amazon Web Services managed key is used.
*/
public var kmsKeyId: kotlin.String? = null
/**
* A comment or description about the new repository.
*
* The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.
*/
public var repositoryDescription: kotlin.String? = null
/**
* The name of the new repository to be created.
*
* The repository name must be unique across the calling Amazon Web Services account. Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For more information about the limits on repository names, see [Quotas](https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html) in the *CodeCommit User Guide*. The suffix .git is prohibited.
*/
public var repositoryName: kotlin.String? = null
/**
* One or more tag key-value pairs to use when tagging this repository.
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.CreateRepositoryRequest) : this() {
this.kmsKeyId = x.kmsKeyId
this.repositoryDescription = x.repositoryDescription
this.repositoryName = x.repositoryName
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.CreateRepositoryRequest = CreateRepositoryRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy