commonMain.aws.sdk.kotlin.services.securityhub.model.Network.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of securityhub-jvm Show documentation
Show all versions of securityhub-jvm Show documentation
The AWS SDK for Kotlin client for SecurityHub
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.securityhub.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The details of network-related information about a finding.
*/
public class Network private constructor(builder: Builder) {
/**
* The destination domain of network-related information about a finding.
*
* Length Constraints: Minimum of 1. Maximum of 128.
*/
public val destinationDomain: kotlin.String? = builder.destinationDomain
/**
* The destination IPv4 address of network-related information about a finding.
*/
public val destinationIpv4: kotlin.String? = builder.destinationIpv4
/**
* The destination IPv6 address of network-related information about a finding.
*/
public val destinationIpv6: kotlin.String? = builder.destinationIpv6
/**
* The destination port of network-related information about a finding.
*/
public val destinationPort: kotlin.Int? = builder.destinationPort
/**
* The direction of network traffic associated with a finding.
*/
public val direction: aws.sdk.kotlin.services.securityhub.model.NetworkDirection? = builder.direction
/**
* The range of open ports that is present on the network.
*/
public val openPortRange: aws.sdk.kotlin.services.securityhub.model.PortRange? = builder.openPortRange
/**
* The protocol of network-related information about a finding.
*
* Length Constraints: Minimum of 1. Maximum of 16.
*/
public val protocol: kotlin.String? = builder.protocol
/**
* The source domain of network-related information about a finding.
*
* Length Constraints: Minimum of 1. Maximum of 128.
*/
public val sourceDomain: kotlin.String? = builder.sourceDomain
/**
* The source IPv4 address of network-related information about a finding.
*/
public val sourceIpv4: kotlin.String? = builder.sourceIpv4
/**
* The source IPv6 address of network-related information about a finding.
*/
public val sourceIpv6: kotlin.String? = builder.sourceIpv6
/**
* The source media access control (MAC) address of network-related information about a finding.
*/
public val sourceMac: kotlin.String? = builder.sourceMac
/**
* The source port of network-related information about a finding.
*/
public val sourcePort: kotlin.Int? = builder.sourcePort
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.securityhub.model.Network = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Network(")
append("destinationDomain=$destinationDomain,")
append("destinationIpv4=$destinationIpv4,")
append("destinationIpv6=$destinationIpv6,")
append("destinationPort=$destinationPort,")
append("direction=$direction,")
append("openPortRange=$openPortRange,")
append("protocol=$protocol,")
append("sourceDomain=$sourceDomain,")
append("sourceIpv4=$sourceIpv4,")
append("sourceIpv6=$sourceIpv6,")
append("sourceMac=$sourceMac,")
append("sourcePort=$sourcePort")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = destinationDomain?.hashCode() ?: 0
result = 31 * result + (destinationIpv4?.hashCode() ?: 0)
result = 31 * result + (destinationIpv6?.hashCode() ?: 0)
result = 31 * result + (destinationPort ?: 0)
result = 31 * result + (direction?.hashCode() ?: 0)
result = 31 * result + (openPortRange?.hashCode() ?: 0)
result = 31 * result + (protocol?.hashCode() ?: 0)
result = 31 * result + (sourceDomain?.hashCode() ?: 0)
result = 31 * result + (sourceIpv4?.hashCode() ?: 0)
result = 31 * result + (sourceIpv6?.hashCode() ?: 0)
result = 31 * result + (sourceMac?.hashCode() ?: 0)
result = 31 * result + (sourcePort ?: 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 Network
if (destinationDomain != other.destinationDomain) return false
if (destinationIpv4 != other.destinationIpv4) return false
if (destinationIpv6 != other.destinationIpv6) return false
if (destinationPort != other.destinationPort) return false
if (direction != other.direction) return false
if (openPortRange != other.openPortRange) return false
if (protocol != other.protocol) return false
if (sourceDomain != other.sourceDomain) return false
if (sourceIpv4 != other.sourceIpv4) return false
if (sourceIpv6 != other.sourceIpv6) return false
if (sourceMac != other.sourceMac) return false
if (sourcePort != other.sourcePort) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.securityhub.model.Network = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The destination domain of network-related information about a finding.
*
* Length Constraints: Minimum of 1. Maximum of 128.
*/
public var destinationDomain: kotlin.String? = null
/**
* The destination IPv4 address of network-related information about a finding.
*/
public var destinationIpv4: kotlin.String? = null
/**
* The destination IPv6 address of network-related information about a finding.
*/
public var destinationIpv6: kotlin.String? = null
/**
* The destination port of network-related information about a finding.
*/
public var destinationPort: kotlin.Int? = null
/**
* The direction of network traffic associated with a finding.
*/
public var direction: aws.sdk.kotlin.services.securityhub.model.NetworkDirection? = null
/**
* The range of open ports that is present on the network.
*/
public var openPortRange: aws.sdk.kotlin.services.securityhub.model.PortRange? = null
/**
* The protocol of network-related information about a finding.
*
* Length Constraints: Minimum of 1. Maximum of 16.
*/
public var protocol: kotlin.String? = null
/**
* The source domain of network-related information about a finding.
*
* Length Constraints: Minimum of 1. Maximum of 128.
*/
public var sourceDomain: kotlin.String? = null
/**
* The source IPv4 address of network-related information about a finding.
*/
public var sourceIpv4: kotlin.String? = null
/**
* The source IPv6 address of network-related information about a finding.
*/
public var sourceIpv6: kotlin.String? = null
/**
* The source media access control (MAC) address of network-related information about a finding.
*/
public var sourceMac: kotlin.String? = null
/**
* The source port of network-related information about a finding.
*/
public var sourcePort: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.securityhub.model.Network) : this() {
this.destinationDomain = x.destinationDomain
this.destinationIpv4 = x.destinationIpv4
this.destinationIpv6 = x.destinationIpv6
this.destinationPort = x.destinationPort
this.direction = x.direction
this.openPortRange = x.openPortRange
this.protocol = x.protocol
this.sourceDomain = x.sourceDomain
this.sourceIpv4 = x.sourceIpv4
this.sourceIpv6 = x.sourceIpv6
this.sourceMac = x.sourceMac
this.sourcePort = x.sourcePort
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.securityhub.model.Network = Network(this)
/**
* construct an [aws.sdk.kotlin.services.securityhub.model.PortRange] inside the given [block]
*/
public fun openPortRange(block: aws.sdk.kotlin.services.securityhub.model.PortRange.Builder.() -> kotlin.Unit) {
this.openPortRange = aws.sdk.kotlin.services.securityhub.model.PortRange.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}