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

commonMain.aws.sdk.kotlin.services.fms.model.AccountScope.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.fms.model



/**
 * Configures the accounts within the administrator's Organizations organization that the specified Firewall Manager administrator can apply policies to.
 */
public class AccountScope private constructor(builder: Builder) {
    /**
     * The list of accounts within the organization that the specified Firewall Manager administrator either can or cannot apply policies to, based on the value of `ExcludeSpecifiedAccounts`. If `ExcludeSpecifiedAccounts` is set to `true`, then the Firewall Manager administrator can apply policies to all members of the organization except for the accounts in this list. If `ExcludeSpecifiedAccounts` is set to `false`, then the Firewall Manager administrator can only apply policies to the accounts in this list.
     */
    public val accounts: List? = builder.accounts
    /**
     * A boolean value that indicates if the administrator can apply policies to all accounts within an organization. If true, the administrator can apply policies to all accounts within the organization. You can either enable management of all accounts through this operation, or you can specify a list of accounts to manage in `AccountScope$Accounts`. You cannot specify both.
     */
    public val allAccountsEnabled: kotlin.Boolean = builder.allAccountsEnabled
    /**
     * A boolean value that excludes the accounts in `AccountScope$Accounts` from the administrator's scope. If true, the Firewall Manager administrator can apply policies to all members of the organization except for the accounts listed in `AccountScope$Accounts`. You can either specify a list of accounts to exclude by `AccountScope$Accounts`, or you can enable management of all accounts by `AccountScope$AllAccountsEnabled`. You cannot specify both.
     */
    public val excludeSpecifiedAccounts: kotlin.Boolean = builder.excludeSpecifiedAccounts

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

    override fun toString(): kotlin.String = buildString {
        append("AccountScope(")
        append("accounts=$accounts,")
        append("allAccountsEnabled=$allAccountsEnabled,")
        append("excludeSpecifiedAccounts=$excludeSpecifiedAccounts")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accounts?.hashCode() ?: 0
        result = 31 * result + (allAccountsEnabled.hashCode())
        result = 31 * result + (excludeSpecifiedAccounts.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 AccountScope

        if (accounts != other.accounts) return false
        if (allAccountsEnabled != other.allAccountsEnabled) return false
        if (excludeSpecifiedAccounts != other.excludeSpecifiedAccounts) return false

        return true
    }

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

    public class Builder {
        /**
         * The list of accounts within the organization that the specified Firewall Manager administrator either can or cannot apply policies to, based on the value of `ExcludeSpecifiedAccounts`. If `ExcludeSpecifiedAccounts` is set to `true`, then the Firewall Manager administrator can apply policies to all members of the organization except for the accounts in this list. If `ExcludeSpecifiedAccounts` is set to `false`, then the Firewall Manager administrator can only apply policies to the accounts in this list.
         */
        public var accounts: List? = null
        /**
         * A boolean value that indicates if the administrator can apply policies to all accounts within an organization. If true, the administrator can apply policies to all accounts within the organization. You can either enable management of all accounts through this operation, or you can specify a list of accounts to manage in `AccountScope$Accounts`. You cannot specify both.
         */
        public var allAccountsEnabled: kotlin.Boolean = false
        /**
         * A boolean value that excludes the accounts in `AccountScope$Accounts` from the administrator's scope. If true, the Firewall Manager administrator can apply policies to all members of the organization except for the accounts listed in `AccountScope$Accounts`. You can either specify a list of accounts to exclude by `AccountScope$Accounts`, or you can enable management of all accounts by `AccountScope$AllAccountsEnabled`. You cannot specify both.
         */
        public var excludeSpecifiedAccounts: kotlin.Boolean = false

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.fms.model.AccountScope) : this() {
            this.accounts = x.accounts
            this.allAccountsEnabled = x.allAccountsEnabled
            this.excludeSpecifiedAccounts = x.excludeSpecifiedAccounts
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.fms.model.AccountScope = AccountScope(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy