
commonMain.aws.sdk.kotlin.services.xray.model.Http.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.xray.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Information about an HTTP request.
*/
public class Http private constructor(builder: Builder) {
/**
* The IP address of the requestor.
*/
public val clientIp: kotlin.String? = builder.clientIp
/**
* The request method.
*/
public val httpMethod: kotlin.String? = builder.httpMethod
/**
* The response status.
*/
public val httpStatus: kotlin.Int? = builder.httpStatus
/**
* The request URL.
*/
public val httpUrl: kotlin.String? = builder.httpUrl
/**
* The request's user agent string.
*/
public val userAgent: kotlin.String? = builder.userAgent
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.xray.model.Http = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Http(")
append("clientIp=$clientIp,")
append("httpMethod=$httpMethod,")
append("httpStatus=$httpStatus,")
append("httpUrl=$httpUrl,")
append("userAgent=$userAgent")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientIp?.hashCode() ?: 0
result = 31 * result + (httpMethod?.hashCode() ?: 0)
result = 31 * result + (httpStatus ?: 0)
result = 31 * result + (httpUrl?.hashCode() ?: 0)
result = 31 * result + (userAgent?.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 Http
if (clientIp != other.clientIp) return false
if (httpMethod != other.httpMethod) return false
if (httpStatus != other.httpStatus) return false
if (httpUrl != other.httpUrl) return false
if (userAgent != other.userAgent) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.xray.model.Http = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The IP address of the requestor.
*/
public var clientIp: kotlin.String? = null
/**
* The request method.
*/
public var httpMethod: kotlin.String? = null
/**
* The response status.
*/
public var httpStatus: kotlin.Int? = null
/**
* The request URL.
*/
public var httpUrl: kotlin.String? = null
/**
* The request's user agent string.
*/
public var userAgent: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.xray.model.Http) : this() {
this.clientIp = x.clientIp
this.httpMethod = x.httpMethod
this.httpStatus = x.httpStatus
this.httpUrl = x.httpUrl
this.userAgent = x.userAgent
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.xray.model.Http = Http(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy