commonMain.aws.sdk.kotlin.services.configservice.model.OrganizationAggregationSource.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.configservice.model
/**
* This object contains regions to set up the aggregator and an IAM role to retrieve organization details.
*/
public class OrganizationAggregationSource private constructor(builder: Builder) {
/**
* If true, aggregate existing Config regions and future regions.
*/
public val allAwsRegions: kotlin.Boolean = builder.allAwsRegions
/**
* The source regions being aggregated.
*/
public val awsRegions: List? = builder.awsRegions
/**
* ARN of the IAM role used to retrieve Amazon Web Services Organization details associated with the aggregator account.
*/
public val roleArn: kotlin.String = requireNotNull(builder.roleArn) { "A non-null value must be provided for roleArn" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.configservice.model.OrganizationAggregationSource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OrganizationAggregationSource(")
append("allAwsRegions=$allAwsRegions,")
append("awsRegions=$awsRegions,")
append("roleArn=$roleArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = allAwsRegions.hashCode()
result = 31 * result + (awsRegions?.hashCode() ?: 0)
result = 31 * result + (roleArn.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 OrganizationAggregationSource
if (allAwsRegions != other.allAwsRegions) return false
if (awsRegions != other.awsRegions) return false
if (roleArn != other.roleArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.OrganizationAggregationSource = Builder(this).apply(block).build()
public class Builder {
/**
* If true, aggregate existing Config regions and future regions.
*/
public var allAwsRegions: kotlin.Boolean = false
/**
* The source regions being aggregated.
*/
public var awsRegions: List? = null
/**
* ARN of the IAM role used to retrieve Amazon Web Services Organization details associated with the aggregator account.
*/
public var roleArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.configservice.model.OrganizationAggregationSource) : this() {
this.allAwsRegions = x.allAwsRegions
this.awsRegions = x.awsRegions
this.roleArn = x.roleArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.configservice.model.OrganizationAggregationSource = OrganizationAggregationSource(this)
internal fun correctErrors(): Builder {
if (roleArn == null) roleArn = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy