Skip to content

Commit ebf8304

Browse files
authored
Model all int as Long in JetBrains generation (#861)
Service allows `int` to be 64-bit, so generate these as `Long` for consistency across products ## License By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 9ec0bbb commit ebf8304

File tree

2 files changed

+5
-5
lines changed
  • telemetry/jetbrains/src

2 files changed

+5
-5
lines changed

telemetry/jetbrains/src/main/kotlin/software/aws/toolkits/telemetry/generator/TelemetryParser.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ enum class MetricMetadataTypes(@get:JsonValue val type: String) {
1818
override fun kotlinType(): TypeName = com.squareup.kotlinpoet.STRING
1919
},
2020
INT("int") {
21-
override fun kotlinType(): TypeName = com.squareup.kotlinpoet.INT
21+
override fun kotlinType(): TypeName = com.squareup.kotlinpoet.LONG
2222
},
2323
DOUBLE("double") {
2424
override fun kotlinType(): TypeName = com.squareup.kotlinpoet.DOUBLE

telemetry/jetbrains/src/test/resources/generatesWithNormalInput/output/software/aws/toolkits/telemetry/LambdaTelemetry.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import com.intellij.openapi.project.Project
99
import java.time.Instant
1010
import kotlin.Boolean
1111
import kotlin.Double
12-
import kotlin.Int
12+
import kotlin.Long
1313
import kotlin.String
1414
import kotlin.Suppress
1515
import software.amazon.awssdk.services.toolkittelemetry.model.Unit
@@ -174,7 +174,7 @@ public object LambdaTelemetry {
174174
public fun remoteinvoke(
175175
project: Project?,
176176
lambdaRuntime: LambdaRuntime? = null,
177-
inttype: Int,
177+
inttype: Long,
178178
duration: Double? = null,
179179
passive: Boolean = false,
180180
`value`: Double = 1.0,
@@ -203,7 +203,7 @@ public object LambdaTelemetry {
203203
public fun remoteinvoke(
204204
connectionSettings: ConnectionSettings? = null,
205205
lambdaRuntime: LambdaRuntime? = null,
206-
inttype: Int,
206+
inttype: Long,
207207
duration: Double? = null,
208208
passive: Boolean = false,
209209
`value`: Double = 1.0,
@@ -232,7 +232,7 @@ public object LambdaTelemetry {
232232
public fun remoteinvoke(
233233
metadata: MetricEventMetadata,
234234
lambdaRuntime: LambdaRuntime? = null,
235-
inttype: Int,
235+
inttype: Long,
236236
duration: Double? = null,
237237
passive: Boolean = false,
238238
`value`: Double = 1.0,

0 commit comments

Comments
 (0)