commonMain.aws.sdk.kotlin.services.codeartifact.model.PackageGroupAllowedRepository.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codeartifact-jvm Show documentation
Show all versions of codeartifact-jvm Show documentation
The AWS SDK for Kotlin client for codeartifact
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codeartifact.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Details about an allowed repository for a package group, including its name and origin configuration.
*/
public class PackageGroupAllowedRepository private constructor(builder: Builder) {
/**
* The origin configuration restriction type of the allowed repository.
*/
public val originRestrictionType: aws.sdk.kotlin.services.codeartifact.model.PackageGroupOriginRestrictionType? = builder.originRestrictionType
/**
* The name of the allowed repository.
*/
public val repositoryName: kotlin.String? = builder.repositoryName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codeartifact.model.PackageGroupAllowedRepository = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PackageGroupAllowedRepository(")
append("originRestrictionType=$originRestrictionType,")
append("repositoryName=$repositoryName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = originRestrictionType?.hashCode() ?: 0
result = 31 * result + (repositoryName?.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 PackageGroupAllowedRepository
if (originRestrictionType != other.originRestrictionType) return false
if (repositoryName != other.repositoryName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codeartifact.model.PackageGroupAllowedRepository = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The origin configuration restriction type of the allowed repository.
*/
public var originRestrictionType: aws.sdk.kotlin.services.codeartifact.model.PackageGroupOriginRestrictionType? = null
/**
* The name of the allowed repository.
*/
public var repositoryName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.PackageGroupAllowedRepository) : this() {
this.originRestrictionType = x.originRestrictionType
this.repositoryName = x.repositoryName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codeartifact.model.PackageGroupAllowedRepository = PackageGroupAllowedRepository(this)
internal fun correctErrors(): Builder {
return this
}
}
}