commonMain.aws.sdk.kotlin.services.servicediscovery.model.ServiceSummary.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.servicediscovery.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* A complex type that contains information about a specified service.
*/
public class ServiceSummary private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) that Cloud Map assigns to the service when you create it.
*/
public val arn: kotlin.String? = builder.arn
/**
* The date and time that the service was created.
*/
public val createDate: aws.smithy.kotlin.runtime.time.Instant? = builder.createDate
/**
* The description that you specify when you create the service.
*/
public val description: kotlin.String? = builder.description
/**
* Information about the Route 53 DNS records that you want Cloud Map to create when you register an instance.
*/
public val dnsConfig: aws.sdk.kotlin.services.servicediscovery.model.DnsConfig? = builder.dnsConfig
/**
* *Public DNS and HTTP namespaces only.* Settings for an optional health check. If you specify settings for a health check, Cloud Map associates the health check with the records that you specify in `DnsConfig`.
*/
public val healthCheckConfig: aws.sdk.kotlin.services.servicediscovery.model.HealthCheckConfig? = builder.healthCheckConfig
/**
* Information about an optional custom health check. A custom health check, which requires that you use a third-party health checker to evaluate the health of your resources, is useful in the following circumstances:
* + You can't use a health check that's defined by `HealthCheckConfig` because the resource isn't available over the internet. For example, you can use a custom health check when the instance is in an Amazon VPC. (To check the health of resources in a VPC, the health checker must also be in the VPC.)
* + You want to use a third-party health checker regardless of where your resources are located.
*
* If you specify a health check configuration, you can specify either `HealthCheckCustomConfig` or `HealthCheckConfig` but not both.
*/
public val healthCheckCustomConfig: aws.sdk.kotlin.services.servicediscovery.model.HealthCheckCustomConfig? = builder.healthCheckCustomConfig
/**
* The ID that Cloud Map assigned to the service when you created it.
*/
public val id: kotlin.String? = builder.id
/**
* The number of instances that are currently associated with the service. Instances that were previously associated with the service but that are deleted aren't included in the count. The count might not reflect pending registrations and deregistrations.
*/
public val instanceCount: kotlin.Int? = builder.instanceCount
/**
* The name of the service.
*/
public val name: kotlin.String? = builder.name
/**
* Describes the systems that can be used to discover the service instances.
*
* ## DNS_HTTP
* The service instances can be discovered using either DNS queries or the `DiscoverInstances` API operation.
*
* ## HTTP
* The service instances can only be discovered using the `DiscoverInstances` API operation.
*
* ## DNS
* Reserved.
*/
public val type: aws.sdk.kotlin.services.servicediscovery.model.ServiceType? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.servicediscovery.model.ServiceSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ServiceSummary(")
append("arn=$arn,")
append("createDate=$createDate,")
append("description=$description,")
append("dnsConfig=$dnsConfig,")
append("healthCheckConfig=$healthCheckConfig,")
append("healthCheckCustomConfig=$healthCheckCustomConfig,")
append("id=$id,")
append("instanceCount=$instanceCount,")
append("name=$name,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn?.hashCode() ?: 0
result = 31 * result + (createDate?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (dnsConfig?.hashCode() ?: 0)
result = 31 * result + (healthCheckConfig?.hashCode() ?: 0)
result = 31 * result + (healthCheckCustomConfig?.hashCode() ?: 0)
result = 31 * result + (id?.hashCode() ?: 0)
result = 31 * result + (instanceCount ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (type?.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 ServiceSummary
if (arn != other.arn) return false
if (createDate != other.createDate) return false
if (description != other.description) return false
if (dnsConfig != other.dnsConfig) return false
if (healthCheckConfig != other.healthCheckConfig) return false
if (healthCheckCustomConfig != other.healthCheckCustomConfig) return false
if (id != other.id) return false
if (instanceCount != other.instanceCount) return false
if (name != other.name) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.servicediscovery.model.ServiceSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) that Cloud Map assigns to the service when you create it.
*/
public var arn: kotlin.String? = null
/**
* The date and time that the service was created.
*/
public var createDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The description that you specify when you create the service.
*/
public var description: kotlin.String? = null
/**
* Information about the Route 53 DNS records that you want Cloud Map to create when you register an instance.
*/
public var dnsConfig: aws.sdk.kotlin.services.servicediscovery.model.DnsConfig? = null
/**
* *Public DNS and HTTP namespaces only.* Settings for an optional health check. If you specify settings for a health check, Cloud Map associates the health check with the records that you specify in `DnsConfig`.
*/
public var healthCheckConfig: aws.sdk.kotlin.services.servicediscovery.model.HealthCheckConfig? = null
/**
* Information about an optional custom health check. A custom health check, which requires that you use a third-party health checker to evaluate the health of your resources, is useful in the following circumstances:
* + You can't use a health check that's defined by `HealthCheckConfig` because the resource isn't available over the internet. For example, you can use a custom health check when the instance is in an Amazon VPC. (To check the health of resources in a VPC, the health checker must also be in the VPC.)
* + You want to use a third-party health checker regardless of where your resources are located.
*
* If you specify a health check configuration, you can specify either `HealthCheckCustomConfig` or `HealthCheckConfig` but not both.
*/
public var healthCheckCustomConfig: aws.sdk.kotlin.services.servicediscovery.model.HealthCheckCustomConfig? = null
/**
* The ID that Cloud Map assigned to the service when you created it.
*/
public var id: kotlin.String? = null
/**
* The number of instances that are currently associated with the service. Instances that were previously associated with the service but that are deleted aren't included in the count. The count might not reflect pending registrations and deregistrations.
*/
public var instanceCount: kotlin.Int? = null
/**
* The name of the service.
*/
public var name: kotlin.String? = null
/**
* Describes the systems that can be used to discover the service instances.
*
* ## DNS_HTTP
* The service instances can be discovered using either DNS queries or the `DiscoverInstances` API operation.
*
* ## HTTP
* The service instances can only be discovered using the `DiscoverInstances` API operation.
*
* ## DNS
* Reserved.
*/
public var type: aws.sdk.kotlin.services.servicediscovery.model.ServiceType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.servicediscovery.model.ServiceSummary) : this() {
this.arn = x.arn
this.createDate = x.createDate
this.description = x.description
this.dnsConfig = x.dnsConfig
this.healthCheckConfig = x.healthCheckConfig
this.healthCheckCustomConfig = x.healthCheckCustomConfig
this.id = x.id
this.instanceCount = x.instanceCount
this.name = x.name
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.servicediscovery.model.ServiceSummary = ServiceSummary(this)
/**
* construct an [aws.sdk.kotlin.services.servicediscovery.model.DnsConfig] inside the given [block]
*/
public fun dnsConfig(block: aws.sdk.kotlin.services.servicediscovery.model.DnsConfig.Builder.() -> kotlin.Unit) {
this.dnsConfig = aws.sdk.kotlin.services.servicediscovery.model.DnsConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.servicediscovery.model.HealthCheckConfig] inside the given [block]
*/
public fun healthCheckConfig(block: aws.sdk.kotlin.services.servicediscovery.model.HealthCheckConfig.Builder.() -> kotlin.Unit) {
this.healthCheckConfig = aws.sdk.kotlin.services.servicediscovery.model.HealthCheckConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.servicediscovery.model.HealthCheckCustomConfig] inside the given [block]
*/
public fun healthCheckCustomConfig(block: aws.sdk.kotlin.services.servicediscovery.model.HealthCheckCustomConfig.Builder.() -> kotlin.Unit) {
this.healthCheckCustomConfig = aws.sdk.kotlin.services.servicediscovery.model.HealthCheckCustomConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy