commonMain.aws.sdk.kotlin.services.resourcegroups.model.CreateGroupRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resourcegroups-jvm Show documentation
Show all versions of resourcegroups-jvm Show documentation
The AWS SDK for Kotlin client for Resource Groups
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.resourcegroups.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateGroupRequest private constructor(builder: Builder) {
/**
* A configuration associates the resource group with an Amazon Web Services service and specifies how the service can interact with the resources in the group. A configuration is an array of GroupConfigurationItem elements. For details about the syntax of service configurations, see [Service configurations for Resource Groups](https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html).
*
* A resource group can contain either a `Configuration` or a `ResourceQuery`, but not both.
*/
public val configuration: List? = builder.configuration
/**
* The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.
*/
public val criticality: kotlin.Int? = builder.criticality
/**
* The description of the resource group. Descriptions can consist of letters, numbers, hyphens, underscores, periods, and spaces.
*/
public val description: kotlin.String? = builder.description
/**
* The name of the application group, which you can change at any time.
*/
public val displayName: kotlin.String? = builder.displayName
/**
* The name of the group, which is the identifier of the group in other operations. You can't change the name of a resource group after you create it. A resource group name can consist of letters, numbers, hyphens, periods, and underscores. The name cannot start with `AWS`, `aws`, or any other possible capitalization; these are reserved. A resource group name must be unique within each Amazon Web Services Region in your Amazon Web Services account.
*/
public val name: kotlin.String? = builder.name
/**
* A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.
*/
public val owner: kotlin.String? = builder.owner
/**
* The resource query that determines which Amazon Web Services resources are members of this group. For more information about resource queries, see [Create a tag-based group in Resource Groups](https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag).
*
* A resource group can contain either a `ResourceQuery` or a `Configuration`, but not both.
*/
public val resourceQuery: aws.sdk.kotlin.services.resourcegroups.model.ResourceQuery? = builder.resourceQuery
/**
* The tags to add to the group. A tag is key-value pair string.
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.resourcegroups.model.CreateGroupRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateGroupRequest(")
append("configuration=$configuration,")
append("criticality=$criticality,")
append("description=$description,")
append("displayName=$displayName,")
append("name=$name,")
append("owner=$owner,")
append("resourceQuery=$resourceQuery,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = configuration?.hashCode() ?: 0
result = 31 * result + (criticality ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (displayName?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (owner?.hashCode() ?: 0)
result = 31 * result + (resourceQuery?.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 CreateGroupRequest
if (configuration != other.configuration) return false
if (criticality != other.criticality) return false
if (description != other.description) return false
if (displayName != other.displayName) return false
if (name != other.name) return false
if (owner != other.owner) return false
if (resourceQuery != other.resourceQuery) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.resourcegroups.model.CreateGroupRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A configuration associates the resource group with an Amazon Web Services service and specifies how the service can interact with the resources in the group. A configuration is an array of GroupConfigurationItem elements. For details about the syntax of service configurations, see [Service configurations for Resource Groups](https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html).
*
* A resource group can contain either a `Configuration` or a `ResourceQuery`, but not both.
*/
public var configuration: List? = null
/**
* The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.
*/
public var criticality: kotlin.Int? = null
/**
* The description of the resource group. Descriptions can consist of letters, numbers, hyphens, underscores, periods, and spaces.
*/
public var description: kotlin.String? = null
/**
* The name of the application group, which you can change at any time.
*/
public var displayName: kotlin.String? = null
/**
* The name of the group, which is the identifier of the group in other operations. You can't change the name of a resource group after you create it. A resource group name can consist of letters, numbers, hyphens, periods, and underscores. The name cannot start with `AWS`, `aws`, or any other possible capitalization; these are reserved. A resource group name must be unique within each Amazon Web Services Region in your Amazon Web Services account.
*/
public var name: kotlin.String? = null
/**
* A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.
*/
public var owner: kotlin.String? = null
/**
* The resource query that determines which Amazon Web Services resources are members of this group. For more information about resource queries, see [Create a tag-based group in Resource Groups](https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag).
*
* A resource group can contain either a `ResourceQuery` or a `Configuration`, but not both.
*/
public var resourceQuery: aws.sdk.kotlin.services.resourcegroups.model.ResourceQuery? = null
/**
* The tags to add to the group. A tag is key-value pair string.
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.resourcegroups.model.CreateGroupRequest) : this() {
this.configuration = x.configuration
this.criticality = x.criticality
this.description = x.description
this.displayName = x.displayName
this.name = x.name
this.owner = x.owner
this.resourceQuery = x.resourceQuery
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.resourcegroups.model.CreateGroupRequest = CreateGroupRequest(this)
/**
* construct an [aws.sdk.kotlin.services.resourcegroups.model.ResourceQuery] inside the given [block]
*/
public fun resourceQuery(block: aws.sdk.kotlin.services.resourcegroups.model.ResourceQuery.Builder.() -> kotlin.Unit) {
this.resourceQuery = aws.sdk.kotlin.services.resourcegroups.model.ResourceQuery.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy