diff --git a/.changelog/34096.txt b/.changelog/34096.txt new file mode 100644 index 00000000000..e75b945c010 --- /dev/null +++ b/.changelog/34096.txt @@ -0,0 +1,3 @@ +```release-note:note +provider: This release includes an update to the AWS SDK for Go v2 with breaking type changes to several services: `finspace`, `kafka`, `medialive`, `rds`, `s3control`, `timestreamwrite`, and `xray`. These changes primarily affect how arguments with default values are serialized for outbound requests, changing scalar types to pointers. See [this AWS SDK for Go V2 issue](https://github.com/aws/aws-sdk-go-v2/issues/2162) for additional context. The corresponding provider changes should make this breakfix transparent to users, but as with any breaking change there is the potential for missed edge cases. If errors are observed in the impacted resources, please link to this dependency update pull request in the bug report. +``` diff --git a/go.mod b/go.mod index 86b6ea6f985..533bc53ab4d 100644 --- a/go.mod +++ b/go.mod @@ -5,52 +5,52 @@ go 1.20 require ( github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c github.com/YakDriver/regexache v0.23.0 - github.com/aws/aws-sdk-go v1.46.2 + github.com/aws/aws-sdk-go v1.46.3 github.com/aws/aws-sdk-go-v2 v1.21.2 - github.com/aws/aws-sdk-go-v2/config v1.19.0 + github.com/aws/aws-sdk-go-v2/config v1.19.1 github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.91 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.92 github.com/aws/aws-sdk-go-v2/service/accessanalyzer v1.21.2 github.com/aws/aws-sdk-go-v2/service/account v1.11.7 github.com/aws/aws-sdk-go-v2/service/acm v1.19.2 - github.com/aws/aws-sdk-go-v2/service/appconfig v1.22.0 + github.com/aws/aws-sdk-go-v2/service/appconfig v1.23.0 github.com/aws/aws-sdk-go-v2/service/auditmanager v1.27.0 github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.4.2 github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.12.7 github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.24.2 github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.5.7 github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.15.8 - github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.16.2 + github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.17.0 github.com/aws/aws-sdk-go-v2/service/comprehend v1.25.7 github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.27.2 - github.com/aws/aws-sdk-go-v2/service/directoryservice v1.18.7 + github.com/aws/aws-sdk-go-v2/service/directoryservice v1.19.0 github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.3.2 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.126.0 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.127.0 github.com/aws/aws-sdk-go-v2/service/emrserverless v1.11.2 - github.com/aws/aws-sdk-go-v2/service/finspace v1.12.4 - github.com/aws/aws-sdk-go-v2/service/fis v1.16.2 + github.com/aws/aws-sdk-go-v2/service/finspace v1.13.0 + github.com/aws/aws-sdk-go-v2/service/fis v1.17.0 github.com/aws/aws-sdk-go-v2/service/glacier v1.16.2 github.com/aws/aws-sdk-go-v2/service/healthlake v1.17.7 github.com/aws/aws-sdk-go-v2/service/identitystore v1.18.4 github.com/aws/aws-sdk-go-v2/service/inspector2 v1.17.0 github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.6.2 github.com/aws/aws-sdk-go-v2/service/ivschat v1.6.2 - github.com/aws/aws-sdk-go-v2/service/kafka v1.23.0 + github.com/aws/aws-sdk-go-v2/service/kafka v1.24.0 github.com/aws/aws-sdk-go-v2/service/kendra v1.44.0 github.com/aws/aws-sdk-go-v2/service/keyspaces v1.4.7 - github.com/aws/aws-sdk-go-v2/service/lambda v1.40.0 - github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.32.7 - github.com/aws/aws-sdk-go-v2/service/lightsail v1.28.7 - github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.20.7 - github.com/aws/aws-sdk-go-v2/service/medialive v1.37.2 - github.com/aws/aws-sdk-go-v2/service/mediapackage v1.23.5 + github.com/aws/aws-sdk-go-v2/service/lambda v1.41.0 + github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.33.0 + github.com/aws/aws-sdk-go-v2/service/lightsail v1.29.0 + github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.21.0 + github.com/aws/aws-sdk-go-v2/service/medialive v1.38.0 + github.com/aws/aws-sdk-go-v2/service/mediapackage v1.24.0 github.com/aws/aws-sdk-go-v2/service/oam v1.4.2 - github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.5.2 + github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.6.0 github.com/aws/aws-sdk-go-v2/service/pipes v1.4.3 github.com/aws/aws-sdk-go-v2/service/pricing v1.21.9 github.com/aws/aws-sdk-go-v2/service/qldb v1.16.7 github.com/aws/aws-sdk-go-v2/service/rbin v1.10.2 - github.com/aws/aws-sdk-go-v2/service/rds v1.57.0 + github.com/aws/aws-sdk-go-v2/service/rds v1.58.0 github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.20.7 github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.4.3 github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.16.2 @@ -58,22 +58,22 @@ require ( github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.3.8 github.com/aws/aws-sdk-go-v2/service/route53domains v1.17.5 github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2 - github.com/aws/aws-sdk-go-v2/service/s3control v1.33.2 + github.com/aws/aws-sdk-go-v2/service/s3control v1.34.0 github.com/aws/aws-sdk-go-v2/service/scheduler v1.3.2 github.com/aws/aws-sdk-go-v2/service/securitylake v1.7.2 github.com/aws/aws-sdk-go-v2/service/servicequotas v1.16.2 github.com/aws/aws-sdk-go-v2/service/sesv2 v1.21.0 github.com/aws/aws-sdk-go-v2/service/signer v1.16.7 - github.com/aws/aws-sdk-go-v2/service/ssm v1.39.0 + github.com/aws/aws-sdk-go-v2/service/ssm v1.40.0 github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.17.2 github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.23.2 github.com/aws/aws-sdk-go-v2/service/swf v1.17.5 - github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.19.2 + github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.20.0 github.com/aws/aws-sdk-go-v2/service/transcribe v1.29.0 github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.3.0 github.com/aws/aws-sdk-go-v2/service/vpclattice v1.2.2 github.com/aws/aws-sdk-go-v2/service/workspaces v1.31.3 - github.com/aws/aws-sdk-go-v2/service/xray v1.19.0 + github.com/aws/aws-sdk-go-v2/service/xray v1.20.0 github.com/beevik/etree v1.2.0 github.com/gertd/go-pluralize v0.2.1 github.com/google/go-cmp v0.6.0 diff --git a/go.sum b/go.sum index 72e618b7492..c5fb5e7c19a 100644 --- a/go.sum +++ b/go.sum @@ -22,21 +22,21 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmms github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.46.2 h1:XZbOmjtN1VCfEtQq7QNFsbxIqO+bB+bRhiOBjp6AzWc= -github.com/aws/aws-sdk-go v1.46.2/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.46.3 h1:zcrCu14ANOji6m38bUTxYdPqne4EXIvJQ2KXZ5oi9k0= +github.com/aws/aws-sdk-go v1.46.3/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v1.21.1/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= github.com/aws/aws-sdk-go-v2 v1.21.2 h1:+LXZ0sgo8quN9UOKXXzAWRT3FWd4NxeXWOZom9pE7GA= github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.14 h1:Sc82v7tDQ/vdU1WtuSyzZ1I7y/68j//HJ6uozND1IDs= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.14/go.mod h1:9NCTOURS8OpxvoAVHq79LK81/zC78hfRWFn+aL0SPcY= -github.com/aws/aws-sdk-go-v2/config v1.19.0 h1:AdzDvwH6dWuVARCl3RTLGRc4Ogy+N7yLFxVxXe1ClQ0= -github.com/aws/aws-sdk-go-v2/config v1.19.0/go.mod h1:ZwDUgFnQgsazQTnWfeLWk5GjeqTQTL8lMkoE1UXzxdE= +github.com/aws/aws-sdk-go-v2/config v1.19.1 h1:oe3vqcGftyk40icfLymhhhNysAwk0NfiwkDi2GTPMXs= +github.com/aws/aws-sdk-go-v2/config v1.19.1/go.mod h1:ZwDUgFnQgsazQTnWfeLWk5GjeqTQTL8lMkoE1UXzxdE= github.com/aws/aws-sdk-go-v2/credentials v1.13.43 h1:LU8vo40zBlo3R7bAvBVy/ku4nxGEyZe9N8MqAeFTzF8= github.com/aws/aws-sdk-go-v2/credentials v1.13.43/go.mod h1:zWJBz1Yf1ZtX5NGax9ZdNjhhI4rgjfgsyk6vTY1yfVg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 h1:PIktER+hwIG286DqXyvVENjgLTAwGgoeriLDD5C+YlQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13/go.mod h1:f/Ib/qYjhV2/qdsf79H3QP/eRE4AkVyEf6sk7XfZ1tg= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.91 h1:haAyxKHwoE+y/TJt+qHcPQf1dCViyyGbWcKjjYUllTE= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.91/go.mod h1:ACQ6ta5YFlfSOz2c9A+EVYawLxFMZ0rI3Q0A0tGieKo= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.92 h1:nLA7dGFC6v4P6b+hzqt5GqIGmIuN+jTJzojfdOLXWFE= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.92/go.mod h1:h+ei9z19AhoN+Dac92DwkzfbJ4mFUea92xgl5pKSG0Q= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.42/go.mod h1:oDfgXoBBmj+kXnqxDDnIDnC56QBosglKp8ftRCTxR+0= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 h1:nFBQlGtkbPzp/NjZLuFxRqmT91rLJkgvsEQs68h962Y= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43/go.mod h1:auo+PiyLl0n1l8A0e8RIeR8tOzYPfZZH/JNlrJ8igTQ= @@ -53,8 +53,8 @@ github.com/aws/aws-sdk-go-v2/service/account v1.11.7 h1:77Y0z87uZbG7R3djQJhxLetw github.com/aws/aws-sdk-go-v2/service/account v1.11.7/go.mod h1:hIGpFtNvJLOEDfp9hqnRVYfah6i9JDKqpyh/EGxDw1U= github.com/aws/aws-sdk-go-v2/service/acm v1.19.2 h1:M+BY1Sk+AcWg596Nz3MMX630a3vposBFDaTan+UD/Kk= github.com/aws/aws-sdk-go-v2/service/acm v1.19.2/go.mod h1:Zx0vrYeKZEZIPnggUx09FdoXze1+2i6Od+lHsG/L3vU= -github.com/aws/aws-sdk-go-v2/service/appconfig v1.22.0 h1:ZmMQo8WGpMGTwPcMS5zwN6FZ53vDjq6SxgdydBCeNbI= -github.com/aws/aws-sdk-go-v2/service/appconfig v1.22.0/go.mod h1:7bTOwXFz4+VxkDVB26d7TAhFKloGA3EtwtLAydyv1ek= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.23.0 h1:lN+EsDRxYDYeRHYXZ+3uTSYeEhmXYULg5qBABSqVIrk= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.23.0/go.mod h1:7bTOwXFz4+VxkDVB26d7TAhFKloGA3EtwtLAydyv1ek= github.com/aws/aws-sdk-go-v2/service/auditmanager v1.27.0 h1:pz81qsD+FxrrHOaNrfGSWbQ4cU6Dxj2I5tvlrLmgCUE= github.com/aws/aws-sdk-go-v2/service/auditmanager v1.27.0/go.mod h1:zEDWBhc3yodpWk3ZLDNPlTOZGNx0bGx90XQma07xR1Q= github.com/aws/aws-sdk-go-v2/service/cleanrooms v1.4.2 h1:qt0XqbZAU+ZnaqQqvuafocTm/KPKIxf0GPRObbMvhGc= @@ -67,26 +67,26 @@ github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.5.7 h1:d2tImK3KffYtFb0xVY4C github.com/aws/aws-sdk-go-v2/service/codecatalyst v1.5.7/go.mod h1:mbPhpQ0SRnwxVDYqHOLny+X3QozY1DBPbhBvtYtTlCw= github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.15.8 h1:ZNCHBGGFpOH1G0tJhpLjsWITXOuDZEOAwq5HN351aDc= github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.15.8/go.mod h1:RhrN9J+LVtEMjEQPZQyhnO4A0LiOKT732AHDy7sYsIc= -github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.16.2 h1:6Z7VdDdfhOAvDrLbAtQp5BNEg0hK5EEWHcPC6L7hUQg= -github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.16.2/go.mod h1:B10oKKFd10DeYPN8qYeXFtNCEGjSnZ60EG3FeGli8FA= +github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.17.0 h1:STOjCDhbX5IPRG3lUVpc9mQv0o7ECZFDEMHUzCVwOjg= +github.com/aws/aws-sdk-go-v2/service/codestarnotifications v1.17.0/go.mod h1:B10oKKFd10DeYPN8qYeXFtNCEGjSnZ60EG3FeGli8FA= github.com/aws/aws-sdk-go-v2/service/comprehend v1.25.7 h1:x03mvMDVDdvH/Xk+U7kLaQJ3eA7kSYr0t5lbZgi0bnk= github.com/aws/aws-sdk-go-v2/service/comprehend v1.25.7/go.mod h1:zvkBeCgksf5F/XOlNY6g34QOlo1dOUne9okw6gznZAI= github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.27.2 h1:X9F5HmF5GELOsSwdu0cJFviemuVHqteYIIfpZZ7yvEI= github.com/aws/aws-sdk-go-v2/service/computeoptimizer v1.27.2/go.mod h1:if6fmhug8f0CUqd7xHbxY8VsgLPRRXAs26/sbVJT9wc= -github.com/aws/aws-sdk-go-v2/service/directoryservice v1.18.7 h1:LC7t9aJhYs90DVlkbWNv0hRLkH5M5Upe936paKhl2Hw= -github.com/aws/aws-sdk-go-v2/service/directoryservice v1.18.7/go.mod h1:2m0QmkUL+PSwJ74GY+5xR3rgDUmjg9W629PMxsLvG68= +github.com/aws/aws-sdk-go-v2/service/directoryservice v1.19.0 h1:erGB6hvk3Gala8lkpaGg5I6exnShvTLl7/Gmlt/NoaM= +github.com/aws/aws-sdk-go-v2/service/directoryservice v1.19.0/go.mod h1:2m0QmkUL+PSwJ74GY+5xR3rgDUmjg9W629PMxsLvG68= github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.3.2 h1:PhSKGmHpNQ4zRWPd36fquIbrxRlp0ia8S7O3gR4ah74= github.com/aws/aws-sdk-go-v2/service/docdbelastic v1.3.2/go.mod h1:JE7FKd3vLDLXxZK48NYQQNnMkqalW0TYYDYMtXO7AK4= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.22.1 h1:TYq4EU2vEEluoaBG0RCPnbibSndTQSzlpbZdmT/YRcs= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.22.1/go.mod h1:1EJb9/tJwI7iqiStZBcmHijQxcgp7dlPuD2YgoZIrJQ= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.126.0 h1:EGYP4IDYHYe4IcpCUxEAIVKr9nZXvtql4HNhEPK1Y3w= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.126.0/go.mod h1:raUdIDoNuDPn9dMG3cCmIm8RoWOmZUqQPzuw8xpmB8Y= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.127.0 h1:4xtATQuR0qIvX+QTWHlgTUnwlDPNzHcvMsB+qkRSPRo= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.127.0/go.mod h1:raUdIDoNuDPn9dMG3cCmIm8RoWOmZUqQPzuw8xpmB8Y= github.com/aws/aws-sdk-go-v2/service/emrserverless v1.11.2 h1:diyMrawOZ56CavFS//UFFjk2LY1ooXeTqAecXsjtXwI= github.com/aws/aws-sdk-go-v2/service/emrserverless v1.11.2/go.mod h1:ZrmnnT6zI3+0XsQIGCu/vXhIFk4Vwu4WKqeMDSzm4z4= -github.com/aws/aws-sdk-go-v2/service/finspace v1.12.4 h1:xML1DGju5bsRtFejZfHuWtaut3WkYrGTHMf2G3T3de0= -github.com/aws/aws-sdk-go-v2/service/finspace v1.12.4/go.mod h1:TKYYw/RwUTrm8/6qRvxtNZpAfzPJ0zrUJAWOrrreCpQ= -github.com/aws/aws-sdk-go-v2/service/fis v1.16.2 h1:xF0M2Psxq96eDH68AswIe13jb2fvlMM9criypoQKotY= -github.com/aws/aws-sdk-go-v2/service/fis v1.16.2/go.mod h1:zLKsp8cB3L0gqEW4d8NG1cZwQeczg4HqqLm5/b9d8rs= +github.com/aws/aws-sdk-go-v2/service/finspace v1.13.0 h1:gsitjGgLSd0hdfReRk+Lc6Rrcg7UMUIqe3eO1m61H5o= +github.com/aws/aws-sdk-go-v2/service/finspace v1.13.0/go.mod h1:TKYYw/RwUTrm8/6qRvxtNZpAfzPJ0zrUJAWOrrreCpQ= +github.com/aws/aws-sdk-go-v2/service/fis v1.17.0 h1:zAsleap91sZkiLMQm0oB1ypNdGdSpAtCgRrBY35Fiwg= +github.com/aws/aws-sdk-go-v2/service/fis v1.17.0/go.mod h1:zLKsp8cB3L0gqEW4d8NG1cZwQeczg4HqqLm5/b9d8rs= github.com/aws/aws-sdk-go-v2/service/glacier v1.16.2 h1:3e1Y17V637Qx/9rZJZFpC1FR/lL3Js9IFwZCWCkxiIo= github.com/aws/aws-sdk-go-v2/service/glacier v1.16.2/go.mod h1:W5b9hqb4sCTIBOacfItRmL72QzvB2Qasq5tmJfn9BlQ= github.com/aws/aws-sdk-go-v2/service/healthlake v1.17.7 h1:785/FmKD/qDYKW2adVxc4y3PIybe+U/qRI3zHe3quLw= @@ -112,28 +112,28 @@ github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.6.2 h1:JD5IUr3CejC0kGxvn github.com/aws/aws-sdk-go-v2/service/internetmonitor v1.6.2/go.mod h1:Dj1bgHF1Ikb61w1D9bXLypZfPD9vwojs7DUe+wurCL0= github.com/aws/aws-sdk-go-v2/service/ivschat v1.6.2 h1:fs5s2FluB+7MxT9ciRYrYQjfPxfFAakFfHS+KpscQx4= github.com/aws/aws-sdk-go-v2/service/ivschat v1.6.2/go.mod h1:ZMkzeFf1mD4t/D0astNbbdGBXrY6Xn0CqcQfq7znfao= -github.com/aws/aws-sdk-go-v2/service/kafka v1.23.0 h1:tQvLHodH1ul0PTvinZw0OQ+jn4io1Cz+O1/f4qepinc= -github.com/aws/aws-sdk-go-v2/service/kafka v1.23.0/go.mod h1:n5GUmBbNhSLO2NMpODVwrfqqZWaP2cro4QXxamzU1RE= +github.com/aws/aws-sdk-go-v2/service/kafka v1.24.0 h1:25GTIbwI/L/zdNHTxzJDg4JiiLOnZBL2WZSj8UyK16M= +github.com/aws/aws-sdk-go-v2/service/kafka v1.24.0/go.mod h1:n5GUmBbNhSLO2NMpODVwrfqqZWaP2cro4QXxamzU1RE= github.com/aws/aws-sdk-go-v2/service/kendra v1.44.0 h1:lr+JNpmf4zPFobZC192iiy+8KIesdEQXjmTGy4hJrEo= github.com/aws/aws-sdk-go-v2/service/kendra v1.44.0/go.mod h1:/OvU9HvHY03NYNI01IXJO8LLK/7AQOsK87byCDE+pQc= github.com/aws/aws-sdk-go-v2/service/keyspaces v1.4.7 h1:2CSLIVJSGMa5S6Og4M/Nx9AZLOs0xJVX/qmcj4YRL4E= github.com/aws/aws-sdk-go-v2/service/keyspaces v1.4.7/go.mod h1:s42chwUVdTwyeMFLFJ3RZVx/cQ8X2791JqHeKs39OcE= -github.com/aws/aws-sdk-go-v2/service/lambda v1.40.0 h1:M5NR3l0p/+8H0Ers+e2iKIwi2YmifUMgdTtEjZnwTeU= -github.com/aws/aws-sdk-go-v2/service/lambda v1.40.0/go.mod h1:kFs07FNyTowZkz+dGBR33xJbzGs2mkC5Kfm6/lyR5CA= -github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.32.7 h1:E7FrBLLabuWke0vzZLxktK8xNLoGblQsZVN2o+V2wYk= -github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.32.7/go.mod h1:dbmSa5HVnGr1MZwEi4okJLfx4Z7J8ur/cSwiBIgTkZg= -github.com/aws/aws-sdk-go-v2/service/lightsail v1.28.7 h1:NdIzvYLlzuI+XQOe+zeZjvOb5v2aQkij7UZb1sunFBA= -github.com/aws/aws-sdk-go-v2/service/lightsail v1.28.7/go.mod h1:u2yl3D9ygNXthorLQOj2wmMPSxWBGZ+XTlkVbsK2Bh8= -github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.20.7 h1:JLYBJJvjLd4pMwkA0e1ACju6r0oWjid2/veWGWCOZp4= -github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.20.7/go.mod h1:xpU8ugTBGYX8Q2Oo0JeRsXUz22emMuKiNJs8N3GkByQ= -github.com/aws/aws-sdk-go-v2/service/medialive v1.37.2 h1:C1Gzy5Y4BlkJDIf2efW3F/PVGiXsJTtAzJ40aCOHVXg= -github.com/aws/aws-sdk-go-v2/service/medialive v1.37.2/go.mod h1:lINBgPiWIs+HmltgiBaphp9vb6ARUbxqkf2iV5RG71s= -github.com/aws/aws-sdk-go-v2/service/mediapackage v1.23.5 h1:ZlGt4WjWSHkSATHSIMqqthfg6u3o6o0W2Cc9Do0yg+E= -github.com/aws/aws-sdk-go-v2/service/mediapackage v1.23.5/go.mod h1:DX1RiU0NNEEKHsi6Qx17XICo4R63yV6ED8HRQXqZzRM= +github.com/aws/aws-sdk-go-v2/service/lambda v1.41.0 h1:AQK0v7JA0stOOi1cNOq4n9N3X1a3N3A2Ezt3UEyHL9o= +github.com/aws/aws-sdk-go-v2/service/lambda v1.41.0/go.mod h1:kFs07FNyTowZkz+dGBR33xJbzGs2mkC5Kfm6/lyR5CA= +github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.33.0 h1:z5zCrHSiY/oFWR2tKYzHlKUEmSoiZ6nEc+v2hcRtdA0= +github.com/aws/aws-sdk-go-v2/service/lexmodelsv2 v1.33.0/go.mod h1:dbmSa5HVnGr1MZwEi4okJLfx4Z7J8ur/cSwiBIgTkZg= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.29.0 h1:Io+ezo97hWDmcg3tSMJbMoL1zd5zJ8BxK8Y8yB2Chfs= +github.com/aws/aws-sdk-go-v2/service/lightsail v1.29.0/go.mod h1:u2yl3D9ygNXthorLQOj2wmMPSxWBGZ+XTlkVbsK2Bh8= +github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.21.0 h1:0nqFG7I3G+4JodX+pxIi++qi96EGSXAZxwPQYFDZI9c= +github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.21.0/go.mod h1:xpU8ugTBGYX8Q2Oo0JeRsXUz22emMuKiNJs8N3GkByQ= +github.com/aws/aws-sdk-go-v2/service/medialive v1.38.0 h1:0/fzOrxQrnMYs/apbFW0Pg155NWquYVQnNW2EC90lbg= +github.com/aws/aws-sdk-go-v2/service/medialive v1.38.0/go.mod h1:lINBgPiWIs+HmltgiBaphp9vb6ARUbxqkf2iV5RG71s= +github.com/aws/aws-sdk-go-v2/service/mediapackage v1.24.0 h1:C90hhUxpV3sTNEW4nHpbVLTrrkCaGy68LRM23F/XTX8= +github.com/aws/aws-sdk-go-v2/service/mediapackage v1.24.0/go.mod h1:DX1RiU0NNEEKHsi6Qx17XICo4R63yV6ED8HRQXqZzRM= github.com/aws/aws-sdk-go-v2/service/oam v1.4.2 h1:7yyahY9W1PT1f/YzJANF0Rcjt1iYv/Gfo1VVb5xMNlE= github.com/aws/aws-sdk-go-v2/service/oam v1.4.2/go.mod h1:Xy10stQLwlkUqnDebKBrHJkiPgj4ifwo35kYwrSfhvI= -github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.5.2 h1:58RoS3VXfcd4yNaZeteWVsTRPGVoIMm+BOP8Yaqp0yI= -github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.5.2/go.mod h1:FYUH57MkKKdCtmW/e7AVL4IDHdMA/u3N6yCkvcXlehM= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.6.0 h1:i3dePKIcfgtcHWWWtt6861lsIPcVt8grtYMnD/d7pt0= +github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.6.0/go.mod h1:FYUH57MkKKdCtmW/e7AVL4IDHdMA/u3N6yCkvcXlehM= github.com/aws/aws-sdk-go-v2/service/pipes v1.4.3 h1:OgaiJYVLvgbPP46LUzZW1u0huJaSN8dc7XlEwPfTDg0= github.com/aws/aws-sdk-go-v2/service/pipes v1.4.3/go.mod h1:Q2dPlvCZoor/OzUVvQ3wLBOiSYGbEmXqSYYi6YaV5O0= github.com/aws/aws-sdk-go-v2/service/pricing v1.21.9 h1:SlhalyLhNxYXFXORYs/mfuSlmDzSgt2e950VhYzieB4= @@ -142,8 +142,8 @@ github.com/aws/aws-sdk-go-v2/service/qldb v1.16.7 h1:lLP/LlzaI67MXKfyTVLox6HBKgB github.com/aws/aws-sdk-go-v2/service/qldb v1.16.7/go.mod h1:po39i8aELtAKkN5FtMRzOhuOjEi6v/pwAS6FqRT4ags= github.com/aws/aws-sdk-go-v2/service/rbin v1.10.2 h1:69qtIi4V7ehV07agrcPnZY6Pq6ZkW+LAInuvyql2rIw= github.com/aws/aws-sdk-go-v2/service/rbin v1.10.2/go.mod h1:brD/m0i8L/zx56h8JRC1K+37C6fbom3boeSNPgY6t8M= -github.com/aws/aws-sdk-go-v2/service/rds v1.57.0 h1:kUCf6QowN4v8Jz1LRCr9ar3vcrKJu5YtbAbdXUGvvF4= -github.com/aws/aws-sdk-go-v2/service/rds v1.57.0/go.mod h1:NNx09yR8B7z4I5xTt2rUq+5h2lmA9T9bbm7NME/74Ac= +github.com/aws/aws-sdk-go-v2/service/rds v1.58.0 h1:ErFOugr4ORe+d6OGNk3Csr5ItF9DRcHJMFZnuh4isUM= +github.com/aws/aws-sdk-go-v2/service/rds v1.58.0/go.mod h1:NNx09yR8B7z4I5xTt2rUq+5h2lmA9T9bbm7NME/74Ac= github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.20.7 h1:jmA2Y9wChfXRi20BZhswSl8BMOBzIP4nj6umS7Dz1UU= github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.20.7/go.mod h1:CKZw7PAz+RoNy/k2ZOb+td+3gC6+WCQw6Xn1yROp1Mo= github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.4.3 h1:HSCkOqof4ks93+7tTl/dRysP4uFhNv7SOgLwN9J32MU= @@ -158,8 +158,8 @@ github.com/aws/aws-sdk-go-v2/service/route53domains v1.17.5 h1:18p6+HD6xj5oOtDNi github.com/aws/aws-sdk-go-v2/service/route53domains v1.17.5/go.mod h1:BhMj1pZPuQfzuS96s4ScniYr9qhPwDMA19N4eWPM1Lg= github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2 h1:Ll5/YVCOzRB+gxPqs2uD0R7/MyATC0w85626glSKmp4= github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2/go.mod h1:Zjfqt7KhQK+PO1bbOsFNzKgaq7TcxzmEoDWN8lM0qzQ= -github.com/aws/aws-sdk-go-v2/service/s3control v1.33.2 h1:leQTMJgJevNcCcUVAHg0OePm/pgKKjHAHaBKkBwO0qg= -github.com/aws/aws-sdk-go-v2/service/s3control v1.33.2/go.mod h1:RCYpYoSEUpDfeQeZYHMFgY15cUNc/IbG06sF7IDSSO0= +github.com/aws/aws-sdk-go-v2/service/s3control v1.34.0 h1:C04Uf6qSXocZG79rsY3E4H95iMcEhldIqZEXnHpMmmQ= +github.com/aws/aws-sdk-go-v2/service/s3control v1.34.0/go.mod h1:RCYpYoSEUpDfeQeZYHMFgY15cUNc/IbG06sF7IDSSO0= github.com/aws/aws-sdk-go-v2/service/scheduler v1.3.2 h1:VYWFZZ2jYWRu0bZ5+nSJiToRrUd1MyQt5ox3MlA+VsU= github.com/aws/aws-sdk-go-v2/service/scheduler v1.3.2/go.mod h1:vPsUqtS4023/mjhV5zyXUaGmCgBMomsPTPvJFhaPhZY= github.com/aws/aws-sdk-go-v2/service/securitylake v1.7.2 h1:UWaB/MOz3+efoi5lbiqMGKlAQ13zM/N1RsU8oDoDp0k= @@ -172,8 +172,8 @@ github.com/aws/aws-sdk-go-v2/service/signer v1.16.7 h1:dqT9OiL6KP8byHMxz3+VfVBrh github.com/aws/aws-sdk-go-v2/service/signer v1.16.7/go.mod h1:vUcaaoXjmmxEXOyhhq4NyLB87H1hDjYoq9rhAEv7Ez4= github.com/aws/aws-sdk-go-v2/service/sqs v1.24.6 h1:gOp27f7sRnebYZmBTEU9SshxNmUSZpLxwhEbR4B7IG0= github.com/aws/aws-sdk-go-v2/service/sqs v1.24.6/go.mod h1:hG0BRoUOVHMQDcMWnZx4rC0NBbxxvYa4zMPdh7kxI/w= -github.com/aws/aws-sdk-go-v2/service/ssm v1.39.0 h1:TDA81vAA0TIaw64bYe0ItJw0gxCZnKa9wcxgr1i9Ow0= -github.com/aws/aws-sdk-go-v2/service/ssm v1.39.0/go.mod h1:qpnJ98BgJ3YUEvHMgJ1OADwaOgqhgv0nxnqAjTKupeY= +github.com/aws/aws-sdk-go-v2/service/ssm v1.40.0 h1:DHZFzwbFXlfw15I0ERlTVB/YH9iHNr2C1axjRpB7/Gg= +github.com/aws/aws-sdk-go-v2/service/ssm v1.40.0/go.mod h1:qpnJ98BgJ3YUEvHMgJ1OADwaOgqhgv0nxnqAjTKupeY= github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.17.2 h1:2lPwcd4q0u9QYrt3DgitFx1OO0q/rrLMngTDUCJ59os= github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.17.2/go.mod h1:AXw7Qt+vLe1WHqoyBmEnNBGXdKqP7h1aXM+y8Guipc4= github.com/aws/aws-sdk-go-v2/service/ssmincidents v1.23.2 h1:UtLWhmsg8CQUcUH+XFDXu7btMcmkHvLujkr2YjPaJCY= @@ -186,8 +186,8 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 h1:0BkLfgeDjfZnZ+MhB3ONb01u9pwF github.com/aws/aws-sdk-go-v2/service/sts v1.23.2/go.mod h1:Eows6e1uQEsc4ZaHANmsPRzAKcVDrcmjjWiih2+HUUQ= github.com/aws/aws-sdk-go-v2/service/swf v1.17.5 h1:MR6A/XkUKAkaRuUiuLHcZPgjCB+o9iRxBBSym7pVDek= github.com/aws/aws-sdk-go-v2/service/swf v1.17.5/go.mod h1:yQR+w4YfnXyKeDIIFX3tDZ1wndz+VESqcEJN5cFIjSI= -github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.19.2 h1:ppsskGhrtUfE07a5EQpIjneB3gDcOxUI3gByyLh87QI= -github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.19.2/go.mod h1:7bY9UbR+qbrj3nSV1IxGol1OLA1fM5dZQ4y97FF1zvA= +github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.20.0 h1:Z1kRc8lKJdhLxtx4HT65O1GTtH+ohKmBWqObQOwJ3F0= +github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.20.0/go.mod h1:7bY9UbR+qbrj3nSV1IxGol1OLA1fM5dZQ4y97FF1zvA= github.com/aws/aws-sdk-go-v2/service/transcribe v1.29.0 h1:kTRJ0ZloHKzGchHa5REs7pGVeaxqR00r5R5TOKQE6rU= github.com/aws/aws-sdk-go-v2/service/transcribe v1.29.0/go.mod h1:JfI0OCCqM779RRoXNL8829r6i9ItxodDcm8VjA9uifY= github.com/aws/aws-sdk-go-v2/service/verifiedpermissions v1.3.0 h1:nDGWTtrIRyvGtfmd4DBddauFZnoyhl9dalOfPa0OPCs= @@ -196,8 +196,8 @@ github.com/aws/aws-sdk-go-v2/service/vpclattice v1.2.2 h1:EBqXw8PnMWXoWgSuoM1Kgz github.com/aws/aws-sdk-go-v2/service/vpclattice v1.2.2/go.mod h1:RQBqiF63AQ7bu3qVkreCMIQtnodEafCbCsMM3GK6FSQ= github.com/aws/aws-sdk-go-v2/service/workspaces v1.31.3 h1:2eetvB/mGjlHV4jmz5bCtOK8/TaVbNgqJF0mmDZS5Ko= github.com/aws/aws-sdk-go-v2/service/workspaces v1.31.3/go.mod h1:/RuGfv7gjDalR0ep9ZwiPTkLVrlGX65VDubzeTssrE4= -github.com/aws/aws-sdk-go-v2/service/xray v1.19.0 h1:zdUpJfisSUxtf+xrcAJnGaZHjLy3nUMZX3swoyGMYK0= -github.com/aws/aws-sdk-go-v2/service/xray v1.19.0/go.mod h1:FVEAranUTitntkgI5wg0kQofo6y2O5clJixXTJA2zqU= +github.com/aws/aws-sdk-go-v2/service/xray v1.20.0 h1:PRn/UykuiRp7FptdntY89wLbcBHwNToarq2NoPd/qXs= +github.com/aws/aws-sdk-go-v2/service/xray v1.20.0/go.mod h1:FVEAranUTitntkgI5wg0kQofo6y2O5clJixXTJA2zqU= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beevik/etree v1.2.0 h1:l7WETslUG/T+xOPs47dtd6jov2Ii/8/OjCldk5fYfQw= diff --git a/internal/framework/flex/int.go b/internal/framework/flex/int.go index a19917f130e..f936e37f9ea 100644 --- a/internal/framework/flex/int.go +++ b/internal/framework/flex/int.go @@ -56,3 +56,13 @@ func Int32ToFramework(ctx context.Context, v *int32) types.Int64 { return output } + +// Int32FromFramework coverts a Framework Int64 value to an int32 pointer. +// A null Int64 is converted to a nil int32 pointer. +func Int32FromFramework(ctx context.Context, v types.Int64) *int32 { + var output *int32 + + panicOnError(Expand(ctx, v, &output)) + + return output +} diff --git a/internal/framework/flex/int_test.go b/internal/framework/flex/int_test.go index 94cf8801932..d91ab87541c 100644 --- a/internal/framework/flex/int_test.go +++ b/internal/framework/flex/int_test.go @@ -160,3 +160,43 @@ func TestInt32ToFramework(t *testing.T) { }) } } + +func TestInt32FromFramework(t *testing.T) { + t.Parallel() + + type testCase struct { + input types.Int64 + expected *int32 + } + tests := map[string]testCase{ + "valid int64": { + input: types.Int64Value(42), + expected: aws.Int32(42), + }, + "zero int64": { + input: types.Int64Value(0), + expected: aws.Int32(0), + }, + "null int64": { + input: types.Int64Null(), + expected: nil, + }, + "unknown int64": { + input: types.Int64Unknown(), + expected: nil, + }, + } + + for name, test := range tests { + name, test := name, test + t.Run(name, func(t *testing.T) { + t.Parallel() + + got := flex.Int32FromFramework(context.Background(), test.input) + + if diff := cmp.Diff(got, test.expected); diff != "" { + t.Errorf("unexpected diff (+wanted, -got): %s", diff) + } + }) + } +} diff --git a/internal/service/finspace/kx_cluster.go b/internal/service/finspace/kx_cluster.go index dd8c2d713cb..36760452873 100644 --- a/internal/service/finspace/kx_cluster.go +++ b/internal/service/finspace/kx_cluster.go @@ -716,7 +716,7 @@ func expandSavedownStorageConfiguration(tfList []interface{}) *types.KxSavedownS } if v, ok := tfMap["size"].(int); ok && v != 0 { - a.Size = int32(v) + a.Size = aws.Int32(int32(v)) } return a @@ -1005,7 +1005,7 @@ func flattenSavedownStorageConfiguration(apiObject *types.KxSavedownStorageConfi m["type"] = v } - if v := apiObject.Size; v >= 10 && v <= 16000 { + if v := aws.ToInt32(apiObject.Size); v >= 10 && v <= 16000 { m["size"] = v } diff --git a/internal/service/finspace/kx_environment.go b/internal/service/finspace/kx_environment.go index 15154e1a005..d9968affdf9 100644 --- a/internal/service/finspace/kx_environment.go +++ b/internal/service/finspace/kx_environment.go @@ -598,7 +598,7 @@ func expandAttachmentNetworkACLConfiguration(tfMap map[string]interface{}) *type a := &types.NetworkACLEntry{} if v, ok := tfMap["rule_number"].(int); ok && v > 0 { - a.RuleNumber = int32(v) + a.RuleNumber = aws.Int32(int32(v)) } if v, ok := tfMap["protocol"].(string); ok && v != "" { a.Protocol = &v diff --git a/internal/service/kafka/replicator.go b/internal/service/kafka/replicator.go index 51d64182ba1..84ed9edb432 100644 --- a/internal/service/kafka/replicator.go +++ b/internal/service/kafka/replicator.go @@ -528,12 +528,12 @@ func flattenConsumerGroupReplication(apiObject *types.ConsumerGroupReplication) tfMap["consumer_groups_to_exclude"] = flex.FlattenStringValueSet(v) } - if apiObject.SynchroniseConsumerGroupOffsets { - tfMap["synchronise_consumer_group_offsets"] = aws.Bool(apiObject.SynchroniseConsumerGroupOffsets) + if aws.ToBool(apiObject.SynchroniseConsumerGroupOffsets) { + tfMap["synchronise_consumer_group_offsets"] = apiObject.SynchroniseConsumerGroupOffsets } - if apiObject.DetectAndCopyNewConsumerGroups { - tfMap["detect_and_copy_new_consumer_groups"] = aws.Bool(apiObject.DetectAndCopyNewConsumerGroups) + if aws.ToBool(apiObject.DetectAndCopyNewConsumerGroups) { + tfMap["detect_and_copy_new_consumer_groups"] = apiObject.DetectAndCopyNewConsumerGroups } return tfMap @@ -554,16 +554,16 @@ func flattenTopicReplication(apiObject *types.TopicReplication) map[string]inter tfMap["topics_to_exclude"] = flex.FlattenStringValueSet(v) } - if apiObject.CopyTopicConfigurations { - tfMap["copy_topic_configurations"] = aws.Bool(apiObject.CopyTopicConfigurations) + if aws.ToBool(apiObject.CopyTopicConfigurations) { + tfMap["copy_topic_configurations"] = apiObject.CopyTopicConfigurations } - if apiObject.CopyAccessControlListsForTopics { - tfMap["copy_access_control_lists_for_topics"] = aws.Bool(apiObject.CopyAccessControlListsForTopics) + if aws.ToBool(apiObject.CopyAccessControlListsForTopics) { + tfMap["copy_access_control_lists_for_topics"] = apiObject.CopyAccessControlListsForTopics } - if apiObject.DetectAndCopyNewTopics { - tfMap["detect_and_copy_new_topics"] = aws.Bool(apiObject.CopyAccessControlListsForTopics) + if aws.ToBool(apiObject.DetectAndCopyNewTopics) { + tfMap["detect_and_copy_new_topics"] = apiObject.CopyAccessControlListsForTopics } return tfMap @@ -639,11 +639,11 @@ func expandConsumerGroupReplicationUpdate(tfMap map[string]interface{}) *types.C } if v, ok := tfMap["synchronise_consumer_group_offsets"].(bool); ok { - apiObject.SynchroniseConsumerGroupOffsets = v + apiObject.SynchroniseConsumerGroupOffsets = aws.Bool(v) } if v, ok := tfMap["detect_and_copy_new_consumer_groups"].(bool); ok { - apiObject.DetectAndCopyNewConsumerGroups = v + apiObject.DetectAndCopyNewConsumerGroups = aws.Bool(v) } return apiObject @@ -661,15 +661,15 @@ func expandTopicReplicationUpdate(tfMap map[string]interface{}) *types.TopicRepl } if v, ok := tfMap["copy_topic_configurations"].(bool); ok { - apiObject.CopyTopicConfigurations = v + apiObject.CopyTopicConfigurations = aws.Bool(v) } if v, ok := tfMap["copy_access_control_lists_for_topics"].(bool); ok { - apiObject.CopyAccessControlListsForTopics = v + apiObject.CopyAccessControlListsForTopics = aws.Bool(v) } if v, ok := tfMap["detect_and_copy_new_topics"].(bool); ok { - apiObject.DetectAndCopyNewTopics = v + apiObject.DetectAndCopyNewTopics = aws.Bool(v) } return apiObject @@ -735,11 +735,11 @@ func expandConsumerGroupReplication(tfMap map[string]interface{}) *types.Consume } if v, ok := tfMap["synchronise_consumer_group_offsets"].(bool); ok { - apiObject.SynchroniseConsumerGroupOffsets = v + apiObject.SynchroniseConsumerGroupOffsets = aws.Bool(v) } if v, ok := tfMap["detect_and_copy_new_consumer_groups"].(bool); ok { - apiObject.DetectAndCopyNewConsumerGroups = v + apiObject.DetectAndCopyNewConsumerGroups = aws.Bool(v) } return apiObject @@ -757,15 +757,15 @@ func expandTopicReplication(tfMap map[string]interface{}) *types.TopicReplicatio } if v, ok := tfMap["copy_topic_configurations"].(bool); ok { - apiObject.CopyTopicConfigurations = v + apiObject.CopyTopicConfigurations = aws.Bool(v) } if v, ok := tfMap["copy_access_control_lists_for_topics"].(bool); ok { - apiObject.CopyAccessControlListsForTopics = v + apiObject.CopyAccessControlListsForTopics = aws.Bool(v) } if v, ok := tfMap["detect_and_copy_new_topics"].(bool); ok { - apiObject.DetectAndCopyNewTopics = v + apiObject.DetectAndCopyNewTopics = aws.Bool(v) } return apiObject diff --git a/internal/service/medialive/channel.go b/internal/service/medialive/channel.go index 2a9d88d4b43..3305ab11f3d 100644 --- a/internal/service/medialive/channel.go +++ b/internal/service/medialive/channel.go @@ -1196,8 +1196,8 @@ func expandInputAttachmentInputSettings(tfList []interface{}) *types.InputSettin if v, ok := m["denoise_filter"].(string); ok && v != "" { out.DenoiseFilter = types.InputDenoiseFilter(v) } - if v, ok := m["filter_strength"].(int); ok { - out.FilterStrength = int32(v) + if v, ok := m["filter_strength"].(int); ok && v != 0 { + out.FilterStrength = aws.Int32(int32(v)) } if v, ok := m["input_filter"].(string); ok && v != "" { out.InputFilter = types.InputFilter(v) @@ -1205,8 +1205,8 @@ func expandInputAttachmentInputSettings(tfList []interface{}) *types.InputSettin if v, ok := m["network_input_settings"].([]interface{}); ok && len(v) > 0 { out.NetworkInputSettings = expandInputAttachmentInputSettingsNetworkInputSettings(v) } - if v, ok := m["scte35_pid"].(int); ok { - out.Scte35Pid = int32(v) + if v, ok := m["scte35_pid"].(int); ok && v != 0 { + out.Scte35Pid = aws.Int32(int32(v)) } if v, ok := m["smpte2038_data_preference"].(string); ok && v != "" { out.Smpte2038DataPreference = types.Smpte2038DataPreference(v) @@ -1308,8 +1308,8 @@ func expandInputAttachmentInputSettingsAudioSelectorsSelectorSettingsAudioPidSel m := tfList[0].(map[string]interface{}) var out types.AudioPidSelection - if v, ok := m["pid"].(int); ok { - out.Pid = int32(v) + if v, ok := m["pid"].(int); ok && v != 0 { + out.Pid = aws.Int32(int32(v)) } return &out @@ -1346,8 +1346,8 @@ func expandInputAttachmentInputSettingsAudioSelectorsSelectorSettingsAudioTrackS } var o types.AudioTrack - if v, ok := m["track"].(int); ok { - o.Track = int32(v) + if v, ok := m["track"].(int); ok && v != 0 { + o.Track = aws.Int32(int32(v)) } out = append(out, o) @@ -1441,8 +1441,8 @@ func expandInputAttachmentInputSettingsCaptionSelectorsSelectorSettingsAncillary m := tfList[0].(map[string]interface{}) var out types.AncillarySourceSettings - if v, ok := m["source_ancillary_channel_number"].(int); ok { - out.SourceAncillaryChannelNumber = int32(v) + if v, ok := m["source_ancillary_channel_number"].(int); ok && v != 0 { + out.SourceAncillaryChannelNumber = aws.Int32(int32(v)) } return &out @@ -1460,7 +1460,7 @@ func expandInputAttachmentInputSettingsCaptionSelectorsSelectorSettingsDvbSubSou out.OcrLanguage = types.DvbSubOcrLanguage(v) } if v, ok := m["pid"].(int); ok { - out.Pid = int32(v) + out.Pid = aws.Int32(int32(v)) } return &out @@ -1480,8 +1480,8 @@ func expandInputAttachmentInputSettingsCaptionSelectorsSelectorSettingsEmbeddedS if v, ok := m["scte20_detection"].(string); ok && v != "" { out.Scte20Detection = types.EmbeddedScte20Detection(v) } - if v, ok := m["source_608_channel_number"].(int); ok { - out.Source608ChannelNumber = int32(v) + if v, ok := m["source_608_channel_number"].(int); ok && v != 0 { + out.Source608ChannelNumber = aws.Int32(int32(v)) } return &out @@ -1498,8 +1498,8 @@ func expandInputAttachmentInputSettingsCaptionSelectorsSelectorSettingsScte20Sou if v, ok := m["convert_608_to_708"].(string); ok && v != "" { out.Convert608To708 = types.Scte20Convert608To708(v) } - if v, ok := m["source_608_channel_number"].(int); ok { - out.Source608ChannelNumber = int32(v) + if v, ok := m["source_608_channel_number"].(int); ok && v != 0 { + out.Source608ChannelNumber = aws.Int32(int32(v)) } return &out @@ -1516,8 +1516,8 @@ func expandInputAttachmentInputSettingsCaptionSelectorsSelectorSettingsScte27Sou if v, ok := m["ocr_language"].(string); ok && v != "" { out.OcrLanguage = types.Scte27OcrLanguage(v) } - if v, ok := m["pid"].(int); ok { - out.Pid = int32(v) + if v, ok := m["pid"].(int); ok && v != 0 { + out.Pid = aws.Int32(int32(v)) } return &out @@ -1549,17 +1549,17 @@ func expandInputAttachmentInputSettingsCaptionSelectorsSelectorSettingsTeletextS m := tfList[0].(map[string]interface{}) var out types.CaptionRectangle - if v, ok := m["height"].(float32); ok { - out.Height = float64(v) + if v, ok := m["height"].(float32); ok && v != 0.0 { + out.Height = aws.Float64(float64(v)) } - if v, ok := m["left_offset"].(float32); ok { - out.LeftOffset = float64(v) + if v, ok := m["left_offset"].(float32); ok && v != 0.0 { + out.LeftOffset = aws.Float64(float64(v)) } - if v, ok := m["top_offset"].(float32); ok { - out.TopOffset = float64(v) + if v, ok := m["top_offset"].(float32); ok && v != 0.0 { + out.TopOffset = aws.Float64(float64(v)) } - if v, ok := m["width"].(float32); ok { - out.Width = float64(v) + if v, ok := m["width"].(float32); ok && v != 0.0 { + out.Width = aws.Float64(float64(v)) } return &out @@ -1591,17 +1591,17 @@ func expandNetworkInputSettingsHLSInputSettings(tfList []interface{}) *types.Hls m := tfList[0].(map[string]interface{}) var out types.HlsInputSettings - if v, ok := m["bandwidth"].(int); ok { - out.Bandwidth = int32(v) + if v, ok := m["bandwidth"].(int); ok && v != 0 { + out.Bandwidth = aws.Int32(int32(v)) } - if v, ok := m["buffer_segments"].(int); ok { - out.BufferSegments = int32(v) + if v, ok := m["buffer_segments"].(int); ok && v != 0 { + out.BufferSegments = aws.Int32(int32(v)) } - if v, ok := m["retries"].(int); ok { - out.Retries = int32(v) + if v, ok := m["retries"].(int); ok && v != 0 { + out.Retries = aws.Int32(int32(v)) } - if v, ok := m["retry_interval"].(int); ok { - out.RetryInterval = int32(v) + if v, ok := m["retry_interval"].(int); ok && v != 0 { + out.RetryInterval = aws.Int32(int32(v)) } if v, ok := m["scte35_source"].(string); ok && v != "" { out.Scte35Source = types.HlsScte35SourceType(v) @@ -1621,8 +1621,8 @@ func expandInputAttachmentAutomaticInputFailoverSettings(tfList []interface{}) * if v, ok := m["secondary_input_id"].(string); ok && v != "" { out.SecondaryInputId = aws.String(v) } - if v, ok := m["error_clear_time_msec"].(int); ok { - out.ErrorClearTimeMsec = int32(v) + if v, ok := m["error_clear_time_msec"].(int); ok && v != 0 { + out.ErrorClearTimeMsec = aws.Int32(int32(v)) } if v, ok := m["failover_conditions"].(*schema.Set); ok && v.Len() > 0 { out.FailoverConditions = expandInputAttachmentAutomaticInputFailoverSettingsFailoverConditions(v.List()) @@ -1689,8 +1689,8 @@ func expandInputAttachmentAutomaticInputFailoverSettingsFailoverConditionsFailov if v, ok := m["audio_selector_name"].(string); ok && v != "" { out.AudioSelectorName = aws.String(v) } - if v, ok := m["audio_silence_threshold_msec"].(int); ok { - out.AudioSilenceThresholdMsec = int32(v) + if v, ok := m["audio_silence_threshold_msec"].(int); ok && v != 0 { + out.AudioSilenceThresholdMsec = aws.Int32(int32(v)) } return &out @@ -1704,8 +1704,8 @@ func expandInputAttachmentAutomaticInputFailoverSettingsFailoverConditionsFailov m := tfList[0].(map[string]interface{}) var out types.InputLossFailoverSettings - if v, ok := m["input_loss_threshold_msec"].(int); ok { - out.InputLossThresholdMsec = int32(v) + if v, ok := m["input_loss_threshold_msec"].(int); ok && v != 0 { + out.InputLossThresholdMsec = aws.Int32(int32(v)) } return &out @@ -1719,11 +1719,11 @@ func expandInputAttachmentAutomaticInputFailoverSettingsFailoverConditionsFailov m := tfList[0].(map[string]interface{}) var out types.VideoBlackFailoverSettings - if v, ok := m["black_detect_threshold"].(float32); ok { - out.BlackDetectThreshold = float64(v) + if v, ok := m["black_detect_threshold"].(float32); ok && v != 0.0 { + out.BlackDetectThreshold = aws.Float64(float64(v)) } - if v, ok := m["video_black_threshold_msec"].(int); ok { - out.VideoBlackThresholdMsec = int32(v) + if v, ok := m["video_black_threshold_msec"].(int); ok && v != 0 { + out.VideoBlackThresholdMsec = aws.Int32(int32(v)) } return &out @@ -1760,10 +1760,10 @@ func flattenInputAttachmentsInputSettings(in *types.InputSettings) []interface{} "caption_selector": flattenInputAttachmentsInputSettingsCaptionSelectors(in.CaptionSelectors), "deblock_filter": string(in.DeblockFilter), "denoise_filter": string(in.DenoiseFilter), - "filter_strength": int(in.FilterStrength), + "filter_strength": int(aws.ToInt32(in.FilterStrength)), "input_filter": string(in.InputFilter), "network_input_settings": flattenInputAttachmentsInputSettingsNetworkInputSettings(in.NetworkInputSettings), - "scte35_pid": int(in.Scte35Pid), + "scte35_pid": int(aws.ToInt32(in.Scte35Pid)), "smpte2038_data_preference": string(in.Smpte2038DataPreference), "source_end_behavior": string(in.SourceEndBehavior), } @@ -1837,7 +1837,7 @@ func flattenInputAttachmentsInputSettingsAudioSelectorsSelectorSettingsAudioPidS } m := map[string]interface{}{ - "pid": int(in.Pid), + "pid": int(aws.ToInt32(in.Pid)), } return []interface{}{m} @@ -1877,7 +1877,7 @@ func flattenInputAttachmentsInputSettingsAudioSelectorsSelectorSettingsAudioTrac for _, v := range tfList { m := map[string]interface{}{ - "track": int(v.Track), + "track": int(aws.ToInt32(v.Track)), } out = append(out, m) @@ -1930,7 +1930,7 @@ func flattenInputAttachmentsInputSettingsCaptionSelectorsSelectorSettingsAncilla } m := map[string]interface{}{ - "source_ancillary_channel_number": int(in.SourceAncillaryChannelNumber), + "source_ancillary_channel_number": int(aws.ToInt32(in.SourceAncillaryChannelNumber)), } return []interface{}{m} @@ -1943,7 +1943,7 @@ func flattenInputAttachmentsInputSettingsCaptionSelectorsSelectorSettingsDvbSubS m := map[string]interface{}{ "ocr_language": string(in.OcrLanguage), - "pid": int(in.Pid), + "pid": int(aws.ToInt32(in.Pid)), } return []interface{}{m} @@ -1957,7 +1957,7 @@ func flattenInputAttachmentsInputSettingsCaptionSelectorsSelectorSettingsEmbedde m := map[string]interface{}{ "convert_608_to_708": string(in.Convert608To708), "scte20_detection": string(in.Scte20Detection), - "source_608_channel_number": int(in.Source608ChannelNumber), + "source_608_channel_number": int(aws.ToInt32(in.Source608ChannelNumber)), } return []interface{}{m} @@ -1970,7 +1970,7 @@ func flattenInputAttachmentsInputSettingsCaptionSelectorsSelectorSettingsScte20S m := map[string]interface{}{ "convert_608_to_708": string(in.Convert608To708), - "source_608_channel_number": int(in.Source608ChannelNumber), + "source_608_channel_number": int(aws.ToInt32(in.Source608ChannelNumber)), } return []interface{}{m} @@ -1983,7 +1983,7 @@ func flattenInputAttachmentsInputSettingsCaptionSelectorsSelectorSettingsScte27S m := map[string]interface{}{ "ocr_language": string(in.OcrLanguage), - "pid": int(in.Pid), + "pid": int(aws.ToInt32(in.Pid)), } return []interface{}{m} @@ -2008,10 +2008,10 @@ func flattenInputAttachmentsInputSettingsCaptionSelectorsSelectorSettingsTeletex } m := map[string]interface{}{ - "height": float32(in.Height), - "left_offset": float32(in.LeftOffset), - "top_offset": float32(in.TopOffset), - "width": float32(in.Width), + "height": float32(aws.ToFloat64(in.Height)), + "left_offset": float32(aws.ToFloat64(in.LeftOffset)), + "top_offset": float32(aws.ToFloat64(in.TopOffset)), + "width": float32(aws.ToFloat64(in.Width)), } return []interface{}{m} @@ -2036,10 +2036,10 @@ func flattenNetworkInputSettingsHLSInputSettings(in *types.HlsInputSettings) []i } m := map[string]interface{}{ - "bandwidth": int(in.Bandwidth), - "buffer_segments": int(in.BufferSegments), - "retries": int(in.Retries), - "retry_interval": int(in.RetryInterval), + "bandwidth": int(aws.ToInt32(in.Bandwidth)), + "buffer_segments": int(aws.ToInt32(in.BufferSegments)), + "retries": int(aws.ToInt32(in.Retries)), + "retry_interval": int(aws.ToInt32(in.RetryInterval)), "scte35_source": string(in.Scte35Source), } @@ -2053,7 +2053,7 @@ func flattenInputAttachmentAutomaticInputFailoverSettings(in *types.AutomaticInp m := map[string]interface{}{ "secondary_input_id": aws.ToString(in.SecondaryInputId), - "error_clear_time_msec": int(in.ErrorClearTimeMsec), + "error_clear_time_msec": int(aws.ToInt32(in.ErrorClearTimeMsec)), "failover_conditions": flattenInputAttachmentAutomaticInputFailoverSettingsFailoverConditions(in.FailoverConditions), "input_preference": string(in.InputPreference), } @@ -2099,7 +2099,7 @@ func flattenInputAttachmentAutomaticInputFailoverSettingsFailoverConditionsFailo m := map[string]interface{}{ "audio_selector_name": aws.ToString(in.AudioSelectorName), - "audio_silence_threshold_msec": int(in.AudioSilenceThresholdMsec), + "audio_silence_threshold_msec": int(aws.ToInt32(in.AudioSilenceThresholdMsec)), } return []interface{}{m} @@ -2111,7 +2111,7 @@ func flattenInputAttachmentAutomaticInputFailoverSettingsFailoverConditionsFailo } m := map[string]interface{}{ - "input_loss_threshold_msec": int(in.InputLossThresholdMsec), + "input_loss_threshold_msec": int(aws.ToInt32(in.InputLossThresholdMsec)), } return []interface{}{m} @@ -2123,8 +2123,8 @@ func flattenInputAttachmentAutomaticInputFailoverSettingsFailoverConditionsFailo } m := map[string]interface{}{ - "black_detect_threshold": float32(in.BlackDetectThreshold), - "video_black_threshold_msec": int(in.VideoBlackThresholdMsec), + "black_detect_threshold": float32(aws.ToFloat64(in.BlackDetectThreshold)), + "video_black_threshold_msec": int(aws.ToInt32(in.VideoBlackThresholdMsec)), } return []interface{}{m} diff --git a/internal/service/medialive/channel_encoder_settings_schema.go b/internal/service/medialive/channel_encoder_settings_schema.go index 95a262b7240..a5500e12baa 100644 --- a/internal/service/medialive/channel_encoder_settings_schema.go +++ b/internal/service/medialive/channel_encoder_settings_schema.go @@ -3199,8 +3199,8 @@ func expandAudioDescriptionsAudioNormalizationSettings(tfList []interface{}) *ty if v, ok := m["algorithm_control"].(string); ok && v != "" { out.AlgorithmControl = types.AudioNormalizationAlgorithmControl(v) } - if v, ok := m["target_lkfs"].(float32); ok { - out.TargetLkfs = float64(v) + if v, ok := m["target_lkfs"].(float32); ok && v != 0.0 { + out.TargetLkfs = aws.Float64(float64(v)) } return &out @@ -3247,8 +3247,8 @@ func expandAudioDescriptionsCodecSettingsAacSettings(tfList []interface{}) *type m := tfList[0].(map[string]interface{}) var out types.AacSettings - if v, ok := m["bitrate"].(float64); ok { - out.Bitrate = v + if v, ok := m["bitrate"].(float64); ok && v != 0.0 { + out.Bitrate = aws.Float64(v) } if v, ok := m["coding_mode"].(string); ok && v != "" { out.CodingMode = types.AacCodingMode(v) @@ -3265,8 +3265,8 @@ func expandAudioDescriptionsCodecSettingsAacSettings(tfList []interface{}) *type if v, ok := m["raw_format"].(string); ok && v != "" { out.RawFormat = types.AacRawFormat(v) } - if v, ok := m["sample_rate"].(float64); ok { - out.SampleRate = v + if v, ok := m["sample_rate"].(float64); ok && v != 0.0 { + out.SampleRate = aws.Float64(v) } if v, ok := m["spec"].(string); ok && v != "" { out.Spec = types.AacSpec(v) @@ -3286,8 +3286,8 @@ func expandAudioDescriptionsCodecSettingsAc3Settings(tfList []interface{}) *type m := tfList[0].(map[string]interface{}) var out types.Ac3Settings - if v, ok := m["bitrate"].(float64); ok { - out.Bitrate = v + if v, ok := m["bitrate"].(float64); ok && v != 0.0 { + out.Bitrate = aws.Float64(v) } if v, ok := m["bitstream_mode"].(string); ok && v != "" { out.BitstreamMode = types.Ac3BitstreamMode(v) @@ -3295,8 +3295,8 @@ func expandAudioDescriptionsCodecSettingsAc3Settings(tfList []interface{}) *type if v, ok := m["coding_mode"].(string); ok && v != "" { out.CodingMode = types.Ac3CodingMode(v) } - if v, ok := m["dialnorm"].(int); ok { - out.Dialnorm = int32(v) + if v, ok := m["dialnorm"].(int); ok && v != 0 { + out.Dialnorm = aws.Int32(int32(v)) } if v, ok := m["drc_profile"].(string); ok && v != "" { out.DrcProfile = types.Ac3DrcProfile(v) @@ -3319,14 +3319,14 @@ func expandAudioDescriptionsCodecSettingsEac3AtmosSettings(tfList []interface{}) m := tfList[0].(map[string]interface{}) var out types.Eac3AtmosSettings - if v, ok := m["bitrate"].(float32); ok { - out.Bitrate = float64(v) + if v, ok := m["bitrate"].(float32); ok && v != 0.0 { + out.Bitrate = aws.Float64(float64(v)) } if v, ok := m["coding_mode"].(string); ok && v != "" { out.CodingMode = types.Eac3AtmosCodingMode(v) } - if v, ok := m["dialnorm"].(int); ok { - out.Dialnorm = int32(v) + if v, ok := m["dialnorm"].(int); ok && v != 0 { + out.Dialnorm = aws.Int32(int32(v)) } if v, ok := m["drc_line"].(string); ok && v != "" { out.DrcLine = types.Eac3AtmosDrcLine(v) @@ -3334,11 +3334,11 @@ func expandAudioDescriptionsCodecSettingsEac3AtmosSettings(tfList []interface{}) if v, ok := m["drc_rf"].(string); ok && v != "" { out.DrcRf = types.Eac3AtmosDrcRf(v) } - if v, ok := m["height_trim"].(float32); ok { - out.HeightTrim = float64(v) + if v, ok := m["height_trim"].(float32); ok && v != 0.0 { + out.HeightTrim = aws.Float64(float64(v)) } - if v, ok := m["surround_trim"].(float32); ok { - out.SurroundTrim = float64(v) + if v, ok := m["surround_trim"].(float32); ok && v != 0.0 { + out.SurroundTrim = aws.Float64(float64(v)) } return &out @@ -3355,8 +3355,8 @@ func expandAudioDescriptionsCodecSettingsEac3Settings(tfList []interface{}) *typ if v, ok := m["attenuation_control"].(string); ok && v != "" { out.AttenuationControl = types.Eac3AttenuationControl(v) } - if v, ok := m["bitrate"].(float32); ok { - out.Bitrate = float64(v) + if v, ok := m["bitrate"].(float32); ok && v != 0.0 { + out.Bitrate = aws.Float64(float64(v)) } if v, ok := m["bitstream_mode"].(string); ok && v != "" { out.BitstreamMode = types.Eac3BitstreamMode(v) @@ -3367,8 +3367,8 @@ func expandAudioDescriptionsCodecSettingsEac3Settings(tfList []interface{}) *typ if v, ok := m["dc_filter"].(string); ok && v != "" { out.DcFilter = types.Eac3DcFilter(v) } - if v, ok := m["dialnorm"].(int); ok { - out.Dialnorm = int32(v) + if v, ok := m["dialnorm"].(int); ok && v != 0 { + out.Dialnorm = aws.Int32(int32(v)) } if v, ok := m["drc_line"].(string); ok && v != "" { out.DrcLine = types.Eac3DrcLine(v) @@ -3382,17 +3382,17 @@ func expandAudioDescriptionsCodecSettingsEac3Settings(tfList []interface{}) *typ if v, ok := m["lfe_filter"].(string); ok && v != "" { out.LfeFilter = types.Eac3LfeFilter(v) } - if v, ok := m["lo_ro_center_mix_level"].(float32); ok { - out.LoRoCenterMixLevel = float64(v) + if v, ok := m["lo_ro_center_mix_level"].(float32); ok && v != 0.0 { + out.LoRoCenterMixLevel = aws.Float64(float64(v)) } - if v, ok := m["lo_ro_surround_mix_level"].(float32); ok { - out.LoRoSurroundMixLevel = float64(v) + if v, ok := m["lo_ro_surround_mix_level"].(float32); ok && v != 0.0 { + out.LoRoSurroundMixLevel = aws.Float64(float64(v)) } - if v, ok := m["lt_rt_center_mix_level"].(float32); ok { - out.LtRtCenterMixLevel = float64(v) + if v, ok := m["lt_rt_center_mix_level"].(float32); ok && v != 0.0 { + out.LtRtCenterMixLevel = aws.Float64(float64(v)) } - if v, ok := m["lt_rt_surround_mix_level"].(float32); ok { - out.LtRtSurroundMixLevel = float64(v) + if v, ok := m["lt_rt_surround_mix_level"].(float32); ok && v != 0.0 { + out.LtRtSurroundMixLevel = aws.Float64(float64(v)) } if v, ok := m["metadata_control"].(string); ok && v != "" { out.MetadataControl = types.Eac3MetadataControl(v) @@ -3421,14 +3421,14 @@ func expandAudioDescriptionsCodecSettingsMp2Settings(tfList []interface{}) *type m := tfList[0].(map[string]interface{}) var out types.Mp2Settings - if v, ok := m["bitrate"].(float32); ok { - out.Bitrate = float64(v) + if v, ok := m["bitrate"].(float32); ok && v != 0.0 { + out.Bitrate = aws.Float64(float64(v)) } if v, ok := m["coding_mode"].(string); ok && v != "" { out.CodingMode = types.Mp2CodingMode(v) } - if v, ok := m["sample_rate"].(float32); ok { - out.Bitrate = float64(v) + if v, ok := m["sample_rate"].(float32); ok && v != 0.0 { + out.Bitrate = aws.Float64(float64(v)) } return &out @@ -3442,14 +3442,14 @@ func expandAudioDescriptionsCodecSettingsWavSettings(tfList []interface{}) *type m := tfList[0].(map[string]interface{}) var out types.WavSettings - if v, ok := m["bit_depth"].(float32); ok { - out.BitDepth = float64(v) + if v, ok := m["bit_depth"].(float32); ok && v != 0.0 { + out.BitDepth = aws.Float64(float64(v)) } if v, ok := m["coding_mode"].(string); ok && v != "" { out.CodingMode = types.WavCodingMode(v) } - if v, ok := m["sample_rate"].(float32); ok { - out.SampleRate = float64(v) + if v, ok := m["sample_rate"].(float32); ok && v != 0.0 { + out.SampleRate = aws.Float64(float64(v)) } return &out @@ -3466,11 +3466,11 @@ func expandChannelEncoderSettingsAudioDescriptionsRemixSettings(tfList []interfa if v, ok := m["channel_mappings"].(*schema.Set); ok && v.Len() > 0 { out.ChannelMappings = expandChannelMappings(v.List()) } - if v, ok := m["channels_in"].(int); ok { - out.ChannelsIn = int32(v) + if v, ok := m["channels_in"].(int); ok && v != 0 { + out.ChannelsIn = aws.Int32(int32(v)) } - if v, ok := m["channels_out"].(int); ok { - out.ChannelsOut = int32(v) + if v, ok := m["channels_out"].(int); ok && v != 0 { + out.ChannelsOut = aws.Int32(int32(v)) } return &out @@ -3492,8 +3492,8 @@ func expandChannelMappings(tfList []interface{}) []types.AudioChannelMapping { if v, ok := m["input_channel_levels"].(*schema.Set); ok && v.Len() > 0 { o.InputChannelLevels = expandInputChannelLevels(v.List()) } - if v, ok := m["output_channel"].(int); ok { - o.OutputChannel = int32(v) + if v, ok := m["output_channel"].(int); ok && v != 0 { + o.OutputChannel = aws.Int32(int32(v)) } out = append(out, o) @@ -3515,11 +3515,11 @@ func expandInputChannelLevels(tfList []interface{}) []types.InputChannelLevel { } var o types.InputChannelLevel - if v, ok := m["gain"].(int); ok { - o.Gain = int32(v) + if v, ok := m["gain"].(int); ok && v != 0 { + o.Gain = aws.Int32(int32(v)) } - if v, ok := m["input_channel"].(int); ok { - o.InputChannel = int32(v) + if v, ok := m["input_channel"].(int); ok && v != 0 { + o.InputChannel = aws.Int32(int32(v)) } out = append(out, o) @@ -3611,8 +3611,8 @@ func expandArchiveGroupSettings(tfList []interface{}) *types.ArchiveGroupSetting if v, ok := m["archive_cdn_settings"].([]interface{}); ok && len(v) > 0 { o.ArchiveCdnSettings = expandArchiveCDNSettings(v) } - if v, ok := m["rollover_interval"].(int); ok { - o.RolloverInterval = int32(v) + if v, ok := m["rollover_interval"].(int); ok && v != 0 { + o.RolloverInterval = aws.Int32(int32(v)) } return &o @@ -3724,8 +3724,8 @@ func expandHLSGroupSettings(tfList []interface{}) *types.HlsGroupSettings { if v, ok := m["incomplete_segment_behavior"].(string); ok && v != "" { out.IncompleteSegmentBehavior = types.HlsIncompleteSegmentBehavior(v) } - if v, ok := m["index_n_segments"].(int); ok { - out.IndexNSegments = int32(v) + if v, ok := m["index_n_segments"].(int); ok && v != 0 { + out.IndexNSegments = aws.Int32(int32(v)) } if v, ok := m["input_loss_action"].(string); ok && v != "" { out.InputLossAction = types.InputLossActionForHlsOut(v) @@ -3736,8 +3736,8 @@ func expandHLSGroupSettings(tfList []interface{}) *types.HlsGroupSettings { if v, ok := m["iv_source"].(string); ok && v != "" { out.IvSource = types.HlsIvSource(v) } - if v, ok := m["keep_segments"].(int); ok { - out.KeepSegments = int32(v) + if v, ok := m["keep_segments"].(int); ok && v != 0 { + out.KeepSegments = aws.Int32(int32(v)) } if v, ok := m["key_format"].(string); ok && v != "" { out.KeyFormat = aws.String(v) @@ -3754,8 +3754,8 @@ func expandHLSGroupSettings(tfList []interface{}) *types.HlsGroupSettings { if v, ok := m["manifest_duration_format"].(string); ok && v != "" { out.ManifestDurationFormat = types.HlsManifestDurationFormat(v) } - if v, ok := m["min_segment_length"].(int); ok { - out.MinSegmentLength = int32(v) + if v, ok := m["min_segment_length"].(int); ok && v != 0 { + out.MinSegmentLength = aws.Int32(int32(v)) } if v, ok := m["mode"].(string); ok && v != "" { out.Mode = types.HlsMode(v) @@ -3769,17 +3769,17 @@ func expandHLSGroupSettings(tfList []interface{}) *types.HlsGroupSettings { if v, ok := m["program_date_time_clock"].(string); ok && v != "" { out.ProgramDateTimeClock = types.HlsProgramDateTimeClock(v) } - if v, ok := m["program_date_time_period"].(int); ok { - out.ProgramDateTimePeriod = int32(v) + if v, ok := m["program_date_time_period"].(int); ok && v != 0 { + out.ProgramDateTimePeriod = aws.Int32(int32(v)) } if v, ok := m["redundant_manifest"].(string); ok && v != "" { out.RedundantManifest = types.HlsRedundantManifest(v) } - if v, ok := m["segment_length"].(int); ok { - out.SegmentLength = int32(v) + if v, ok := m["segment_length"].(int); ok && v != 0 { + out.SegmentLength = aws.Int32(int32(v)) } - if v, ok := m["segments_per_subdirectory"].(int); ok { - out.SegmentsPerSubdirectory = int32(v) + if v, ok := m["segments_per_subdirectory"].(int); ok && v != 0 { + out.SegmentsPerSubdirectory = aws.Int32(int32(v)) } if v, ok := m["stream_inf_resolution"].(string); ok && v != "" { out.StreamInfResolution = types.HlsStreamInfResolution(v) @@ -3787,11 +3787,11 @@ func expandHLSGroupSettings(tfList []interface{}) *types.HlsGroupSettings { if v, ok := m["timed_metadata_id3_frame"].(string); ok && v != "" { out.TimedMetadataId3Frame = types.HlsTimedMetadataId3Frame(v) } - if v, ok := m["timed_metadata_id3_period"].(int); ok { - out.TimedMetadataId3Period = int32(v) + if v, ok := m["timed_metadata_id3_period"].(int); ok && v != 0 { + out.TimedMetadataId3Period = aws.Int32(int32(v)) } - if v, ok := m["timestamp_delta_milliseconds"].(int); ok { - out.TimestampDeltaMilliseconds = int32(v) + if v, ok := m["timestamp_delta_milliseconds"].(int); ok && v != 0 { + out.TimestampDeltaMilliseconds = aws.Int32(int32(v)) } if v, ok := m["ts_file_mode"].(string); ok && v != "" { out.TsFileMode = types.HlsTsFileMode(v) @@ -3820,8 +3820,8 @@ func expandMsSmoothGroupSettings(tfList []interface{}) *types.MsSmoothGroupSetti if v, ok := m["certificate_mode"].(string); ok && v != "" { out.CertificateMode = types.SmoothGroupCertificateMode(v) } - if v, ok := m["connection_retry_interval"].(int); ok { - out.ConnectionRetryInterval = int32(v) + if v, ok := m["connection_retry_interval"].(int); ok && v != 0 { + out.ConnectionRetryInterval = aws.Int32(int32(v)) } if v, ok := m["event_id"].(string); ok && v != "" { out.EventId = aws.String(v) @@ -3832,26 +3832,26 @@ func expandMsSmoothGroupSettings(tfList []interface{}) *types.MsSmoothGroupSetti if v, ok := m["event_stop_behavior"].(string); ok && v != "" { out.EventStopBehavior = types.SmoothGroupEventStopBehavior(v) } - if v, ok := m["filecache_duration"].(int); ok { - out.FilecacheDuration = int32(v) + if v, ok := m["filecache_duration"].(int); ok && v != 0 { + out.FilecacheDuration = aws.Int32(int32(v)) } - if v, ok := m["fragment_length"].(int); ok { - out.FragmentLength = int32(v) + if v, ok := m["fragment_length"].(int); ok && v != 0 { + out.FragmentLength = aws.Int32(int32(v)) } if v, ok := m["input_loss_action"].(string); ok && v != "" { out.InputLossAction = types.InputLossActionForMsSmoothOut(v) } - if v, ok := m["num_retries"].(int); ok { - out.NumRetries = int32(v) + if v, ok := m["num_retries"].(int); ok && v != 0 { + out.NumRetries = aws.Int32(int32(v)) } - if v, ok := m["restart_delay"].(int); ok { - out.RestartDelay = int32(v) + if v, ok := m["restart_delay"].(int); ok && v != 0 { + out.RestartDelay = aws.Int32(int32(v)) } if v, ok := m["segmentation_mode"].(string); ok && v != "" { out.SegmentationMode = types.SmoothGroupSegmentationMode(v) } - if v, ok := m["send_delay_ms"].(int); ok { - out.SendDelayMs = int32(v) + if v, ok := m["send_delay_ms"].(int); ok && v != 0 { + out.SendDelayMs = aws.Int32(int32(v)) } if v, ok := m["sparse_track_type"].(string); ok && v != "" { out.SparseTrackType = types.SmoothGroupSparseTrackType(v) @@ -3903,20 +3903,20 @@ func expandHSLAkamaiSettings(tfList []interface{}) *types.HlsAkamaiSettings { m := tfList[0].(map[string]interface{}) var out types.HlsAkamaiSettings - if v, ok := m["connection_retry_interval"].(int); ok { - out.ConnectionRetryInterval = int32(v) + if v, ok := m["connection_retry_interval"].(int); ok && v != 0 { + out.ConnectionRetryInterval = aws.Int32(int32(v)) } - if v, ok := m["filecache_duration"].(int); ok { - out.FilecacheDuration = int32(v) + if v, ok := m["filecache_duration"].(int); ok && v != 0 { + out.FilecacheDuration = aws.Int32(int32(v)) } if v, ok := m["http_transfer_mode"].(string); ok && v != "" { out.HttpTransferMode = types.HlsAkamaiHttpTransferMode(v) } - if v, ok := m["num_retries"].(int); ok { - out.NumRetries = int32(v) + if v, ok := m["num_retries"].(int); ok && v != 0 { + out.NumRetries = aws.Int32(int32(v)) } - if v, ok := m["restart_delay"].(int); ok { - out.RestartDelay = int32(v) + if v, ok := m["restart_delay"].(int); ok && v != 0 { + out.RestartDelay = aws.Int32(int32(v)) } if v, ok := m["salt"].(string); ok && v != "" { out.Salt = aws.String(v) @@ -3936,17 +3936,17 @@ func expandHSLBasicPutSettings(tfList []interface{}) *types.HlsBasicPutSettings m := tfList[0].(map[string]interface{}) var out types.HlsBasicPutSettings - if v, ok := m["connection_retry_interval"].(int); ok { - out.ConnectionRetryInterval = int32(v) + if v, ok := m["connection_retry_interval"].(int); ok && v != 0 { + out.ConnectionRetryInterval = aws.Int32(int32(v)) } - if v, ok := m["filecache_duration"].(int); ok { - out.FilecacheDuration = int32(v) + if v, ok := m["filecache_duration"].(int); ok && v != 0 { + out.FilecacheDuration = aws.Int32(int32(v)) } - if v, ok := m["num_retries"].(int); ok { - out.NumRetries = int32(v) + if v, ok := m["num_retries"].(int); ok && v != 0 { + out.NumRetries = aws.Int32(int32(v)) } - if v, ok := m["restart_delay"].(int); ok { - out.RestartDelay = int32(v) + if v, ok := m["restart_delay"].(int); ok && v != 0 { + out.RestartDelay = aws.Int32(int32(v)) } return &out @@ -3960,20 +3960,20 @@ func expandHLSMediaStoreSettings(tfList []interface{}) *types.HlsMediaStoreSetti m := tfList[0].(map[string]interface{}) var out types.HlsMediaStoreSettings - if v, ok := m["connection_retry_interval"].(int); ok { - out.ConnectionRetryInterval = int32(v) + if v, ok := m["connection_retry_interval"].(int); ok && v != 0 { + out.ConnectionRetryInterval = aws.Int32(int32(v)) } - if v, ok := m["filecache_duration"].(int); ok { - out.FilecacheDuration = int32(v) + if v, ok := m["filecache_duration"].(int); ok && v != 0 { + out.FilecacheDuration = aws.Int32(int32(v)) } if v, ok := m["media_store_storage_class"].(string); ok && v != "" { out.MediaStoreStorageClass = types.HlsMediaStoreStorageClass(v) } - if v, ok := m["num_retries"].(int); ok { - out.NumRetries = int32(v) + if v, ok := m["num_retries"].(int); ok && v != 0 { + out.NumRetries = aws.Int32(int32(v)) } - if v, ok := m["restart_delay"].(int); ok { - out.RestartDelay = int32(v) + if v, ok := m["restart_delay"].(int); ok && v != 0 { + out.RestartDelay = aws.Int32(int32(v)) } return &out @@ -4002,20 +4002,20 @@ func expandHLSWebdavSettings(tfList []interface{}) *types.HlsWebdavSettings { m := tfList[0].(map[string]interface{}) var out types.HlsWebdavSettings - if v, ok := m["connection_retry_interval"].(int); ok { - out.ConnectionRetryInterval = int32(v) + if v, ok := m["connection_retry_interval"].(int); ok && v != 0 { + out.ConnectionRetryInterval = aws.Int32(int32(v)) } - if v, ok := m["filecache_duration"].(int); ok { - out.FilecacheDuration = int32(v) + if v, ok := m["filecache_duration"].(int); ok && v != 0 { + out.FilecacheDuration = aws.Int32(int32(v)) } if v, ok := m["http_transfer_mode"].(string); ok && v != "" { out.HttpTransferMode = types.HlsWebdavHttpTransferMode(v) } - if v, ok := m["num_retries"].(int); ok { - out.NumRetries = int32(v) + if v, ok := m["num_retries"].(int); ok && v != 0 { + out.NumRetries = aws.Int32(int32(v)) } - if v, ok := m["restart_delay"].(int); ok { - out.RestartDelay = int32(v) + if v, ok := m["restart_delay"].(int); ok && v != 0 { + out.RestartDelay = aws.Int32(int32(v)) } return &out } @@ -4033,8 +4033,8 @@ func expandHSLGroupSettingsCaptionLanguageMappings(tfList []interface{}) []types } var o types.CaptionLanguageMapping - if v, ok := m["caption_channel"].(int); ok { - o.CaptionChannel = int32(v) + if v, ok := m["caption_channel"].(int); ok && v != 0 { + o.CaptionChannel = aws.Int32(int32(v)) } if v, ok := m["language_code"].(string); ok && v != "" { o.LanguageCode = aws.String(v) @@ -4182,8 +4182,8 @@ func expandRtmpGroupSettings(tfList []interface{}) *types.RtmpGroupSettings { if v, ok := m["cache_full_behavior"].(string); ok && v != "" { out.CacheFullBehavior = types.RtmpCacheFullBehavior(v) } - if v, ok := m["cache_length"].(int); ok { - out.CacheLength = int32(v) + if v, ok := m["cache_length"].(int); ok && v != 0 { + out.CacheLength = aws.Int32(int32(v)) } if v, ok := m["caption_data"].(string); ok && v != "" { out.CaptionData = types.RtmpCaptionData(v) @@ -4191,8 +4191,8 @@ func expandRtmpGroupSettings(tfList []interface{}) *types.RtmpGroupSettings { if v, ok := m["input_loss_action"].(string); ok && v != "" { out.InputLossAction = types.InputLossActionForRtmpOut(v) } - if v, ok := m["restart_delay"].(int); ok { - out.RestartDelay = int32(v) + if v, ok := m["restart_delay"].(int); ok && v != 0 { + out.RestartDelay = aws.Int32(int32(v)) } return &out @@ -4212,8 +4212,8 @@ func expandUdpGroupSettings(tfList []interface{}) *types.UdpGroupSettings { if v, ok := m["timed_metadata_id3_frame"].(string); ok && v != "" { out.TimedMetadataId3Frame = types.UdpTimedMetadataId3Frame(v) } - if v, ok := m["timed_metadata_id3_period"].(int); ok { - out.TimedMetadataId3Period = int32(v) + if v, ok := m["timed_metadata_id3_period"].(int); ok && v != 0 { + out.TimedMetadataId3Period = aws.Int32(int32(v)) } return &out @@ -4499,8 +4499,8 @@ func expandStandardHLSSettingsH3u8Settings(tfList []interface{}) *types.M3u8Sett m := tfList[0].(map[string]interface{}) var out types.M3u8Settings - if v, ok := m["audio_frames_per_pes"].(int); ok { - out.AudioFramesPerPes = int32(v) + if v, ok := m["audio_frames_per_pes"].(int); ok && v != 0 { + out.AudioFramesPerPes = aws.Int32(int32(v)) } if v, ok := m["audio_pids"].(string); ok && v != "" { out.AudioPids = aws.String(v) @@ -4511,26 +4511,26 @@ func expandStandardHLSSettingsH3u8Settings(tfList []interface{}) *types.M3u8Sett if v, ok := m["nielsen_id3_behavior"].(string); ok && v != "" { out.NielsenId3Behavior = types.M3u8NielsenId3Behavior(v) } - if v, ok := m["pat_interval"].(int); ok { - out.PatInterval = int32(v) + if v, ok := m["pat_interval"].(int); ok && v != 0 { + out.PatInterval = aws.Int32(int32(v)) } if v, ok := m["pcr_control"].(string); ok && v != "" { out.PcrControl = types.M3u8PcrControl(v) } - if v, ok := m["pcr_period"].(int); ok { - out.PcrPeriod = int32(v) + if v, ok := m["pcr_period"].(int); ok && v != 0 { + out.PcrPeriod = aws.Int32(int32(v)) } if v, ok := m["pcr_pid"].(string); ok && v != "" { out.PcrPid = aws.String(v) } - if v, ok := m["pmt_interval"].(int); ok { - out.PmtInterval = int32(v) + if v, ok := m["pmt_interval"].(int); ok && v != 0 { + out.PmtInterval = aws.Int32(int32(v)) } if v, ok := m["pmt_pid"].(string); ok && v != "" { out.PmtPid = aws.String(v) } - if v, ok := m["program_num"].(int); ok { - out.ProgramNum = int32(v) + if v, ok := m["program_num"].(int); ok && v != 0 { + out.ProgramNum = aws.Int32(int32(v)) } if v, ok := m["scte35_behavior"].(string); ok && v != "" { out.Scte35Behavior = types.M3u8Scte35Behavior(v) @@ -4544,8 +4544,8 @@ func expandStandardHLSSettingsH3u8Settings(tfList []interface{}) *types.M3u8Sett if v, ok := m["timed_metadata_pid"].(string); ok && v != "" { out.TimedMetadataPid = aws.String(v) } - if v, ok := m["transport_stream_id"].(int); ok { - out.TransportStreamId = int32(v) + if v, ok := m["transport_stream_id"].(int); ok && v != 0 { + out.TransportStreamId = aws.Int32(int32(v)) } if v, ok := m["video_pid"].(string); ok && v != "" { out.VideoPid = aws.String(v) @@ -4568,11 +4568,11 @@ func expandOutputsOutputSettingsRtmpOutputSettings(tfList []interface{}) *types. if v, ok := m["certificate_mode"].(string); ok && v != "" { settings.CertificateMode = types.RtmpOutputCertificateMode(v) } - if v, ok := m["connection_retry_interval"].(int); ok { - settings.ConnectionRetryInterval = int32(v) + if v, ok := m["connection_retry_interval"].(int); ok && v != 0 { + settings.ConnectionRetryInterval = aws.Int32(int32(v)) } - if v, ok := m["num_retries"].(int); ok { - settings.NumRetries = int32(v) + if v, ok := m["num_retries"].(int); ok && v != 0 { + settings.NumRetries = aws.Int32(int32(v)) } return &settings @@ -4592,8 +4592,8 @@ func expandOutputsOutputSettingsUdpOutputSettings(tfList []interface{}) *types.U if v, ok := m["destination"].([]interface{}); ok && len(v) > 0 { settings.Destination = expandDestination(v) } - if v, ok := m["buffer_msec"].(int); ok { - settings.BufferMsec = int32(v) + if v, ok := m["buffer_msec"].(int); ok && v != 0 { + settings.BufferMsec = aws.Int32(int32(v)) } if v, ok := m["fec_output_settings"].([]interface{}); ok && len(v) > 0 { settings.FecOutputSettings = expandFecOutputSettings(v) @@ -4643,14 +4643,14 @@ func expandFecOutputSettings(tfList []interface{}) *types.FecOutputSettings { m := tfList[0].(map[string]interface{}) var settings types.FecOutputSettings - if v, ok := m["column_depth"].(int); ok { - settings.ColumnDepth = int32(v) + if v, ok := m["column_depth"].(int); ok && v != 0 { + settings.ColumnDepth = aws.Int32(int32(v)) } if v, ok := m["include_fec"].(string); ok && v != "" { settings.IncludeFec = types.FecOutputIncludeFec(v) } - if v, ok := m["row_length"].(int); ok { - settings.RowLength = int32(v) + if v, ok := m["row_length"].(int); ok && v != 0 { + settings.RowLength = aws.Int32(int32(v)) } return &settings @@ -4679,8 +4679,8 @@ func expandM2tsSettings(tfList []interface{}) *types.M2tsSettings { if v, ok := m["audio_buffer_model"].(string); ok && v != "" { s.AudioBufferModel = types.M2tsAudioBufferModel(v) } - if v, ok := m["audio_frames_per_pes"].(int); ok { - s.AudioFramesPerPes = int32(v) + if v, ok := m["audio_frames_per_pes"].(int); ok && v != 0 { + s.AudioFramesPerPes = aws.Int32(int32(v)) } if v, ok := m["audio_pids"].(string); ok && v != "" { s.AudioPids = aws.String(v) @@ -4688,8 +4688,8 @@ func expandM2tsSettings(tfList []interface{}) *types.M2tsSettings { if v, ok := m["audio_stream_type"].(string); ok && v != "" { s.AudioStreamType = types.M2tsAudioStreamType(v) } - if v, ok := m["bitrate"].(int); ok { - s.Bitrate = int32(v) + if v, ok := m["bitrate"].(int); ok && v != 0 { + s.Bitrate = aws.Int32(int32(v)) } if v, ok := m["buffer_model"].(string); ok && v != "" { s.BufferModel = types.M2tsBufferModel(v) @@ -4715,8 +4715,8 @@ func expandM2tsSettings(tfList []interface{}) *types.M2tsSettings { m := tfList[0].(map[string]interface{}) var s types.DvbTdtSettings - if v, ok := m["rep_interval"].(int); ok { - s.RepInterval = int32(v) + if v, ok := m["rep_interval"].(int); ok && v != 0 { + s.RepInterval = aws.Int32(int32(v)) } return &s }(v) @@ -4730,8 +4730,8 @@ func expandM2tsSettings(tfList []interface{}) *types.M2tsSettings { if v, ok := m["ebp_audio_interval"].(string); ok && v != "" { s.EbpAudioInterval = types.M2tsAudioInterval(v) } - if v, ok := m["ebp_lookahead_ms"].(int); ok { - s.EbpLookaheadMs = int32(v) + if v, ok := m["ebp_lookahead_ms"].(int); ok && v != 0 { + s.EbpLookaheadMs = aws.Int32(int32(v)) } if v, ok := m["ebp_placement"].(string); ok && v != "" { s.EbpPlacement = types.M2tsEbpPlacement(v) @@ -4748,8 +4748,8 @@ func expandM2tsSettings(tfList []interface{}) *types.M2tsSettings { if v, ok := m["etv_signal_pid"].(string); ok && v != "" { s.EtvSignalPid = aws.String(v) } - if v, ok := m["fragment_time"].(float64); ok { - s.FragmentTime = v + if v, ok := m["fragment_time"].(float64); ok && v != 0.0 { + s.FragmentTime = aws.Float64(v) } if v, ok := m["klv"].(string); ok && v != "" { s.Klv = types.M2tsKlv(v) @@ -4760,29 +4760,29 @@ func expandM2tsSettings(tfList []interface{}) *types.M2tsSettings { if v, ok := m["nielsen_id3_behavior"].(string); ok && v != "" { s.NielsenId3Behavior = types.M2tsNielsenId3Behavior(v) } - if v, ok := m["null_packet_bitrate"].(float32); ok { - s.NullPacketBitrate = float64(v) + if v, ok := m["null_packet_bitrate"].(float32); ok && v != 0.0 { + s.NullPacketBitrate = aws.Float64(float64(v)) } - if v, ok := m["pat_interval"].(int); ok { - s.PatInterval = int32(v) + if v, ok := m["pat_interval"].(int); ok && v != 0 { + s.PatInterval = aws.Int32(int32(v)) } if v, ok := m["pcr_control"].(string); ok && v != "" { s.PcrControl = types.M2tsPcrControl(v) } - if v, ok := m["pcr_period"].(int); ok { - s.PcrPeriod = int32(v) + if v, ok := m["pcr_period"].(int); ok && v != 0 { + s.PcrPeriod = aws.Int32(int32(v)) } if v, ok := m["pcr_pid"].(string); ok && v != "" { s.PcrPid = aws.String(v) } - if v, ok := m["pmt_interval"].(int); ok { - s.PmtInterval = int32(v) + if v, ok := m["pmt_interval"].(int); ok && v != 0 { + s.PmtInterval = aws.Int32(int32(v)) } if v, ok := m["pmt_pid"].(string); ok && v != "" { s.PmtPid = aws.String(v) } - if v, ok := m["program_num"].(int); ok { - s.ProgramNum = int32(v) + if v, ok := m["program_num"].(int); ok && v != 0 { + s.ProgramNum = aws.Int32(int32(v)) } if v, ok := m["rate_mode"].(string); ok && v != "" { s.RateMode = types.M2tsRateMode(v) @@ -4802,8 +4802,8 @@ func expandM2tsSettings(tfList []interface{}) *types.M2tsSettings { if v, ok := m["segmentation_style"].(string); ok && v != "" { s.SegmentationStyle = types.M2tsSegmentationStyle(v) } - if v, ok := m["segmentation_time"].(float64); ok { - s.SegmentationTime = v + if v, ok := m["segmentation_time"].(float64); ok && v != 0.0 { + s.SegmentationTime = aws.Float64(v) } if v, ok := m["timed_metadata_behavior"].(string); ok && v != "" { s.TimedMetadataBehavior = types.M2tsTimedMetadataBehavior(v) @@ -4811,8 +4811,8 @@ func expandM2tsSettings(tfList []interface{}) *types.M2tsSettings { if v, ok := m["timed_metadata_pid"].(string); ok && v != "" { s.TimedMetadataPid = aws.String(v) } - if v, ok := m["transport_stream_id"].(int); ok { - s.TransportStreamId = int32(v) + if v, ok := m["transport_stream_id"].(int); ok && v != 0 { + s.TransportStreamId = aws.Int32(int32(v)) } if v, ok := m["video_pid"].(string); ok && v != "" { s.VideoPid = aws.String(v) @@ -4829,14 +4829,14 @@ func expandM2tsDvbNitSettings(tfList []interface{}) *types.DvbNitSettings { m := tfList[0].(map[string]interface{}) var s types.DvbNitSettings - if v, ok := m["network_ids"].(int); ok { - s.NetworkId = int32(v) + if v, ok := m["network_ids"].(int); ok && v != 0 { + s.NetworkId = aws.Int32(int32(v)) } if v, ok := m["network_name"].(string); ok && v != "" { s.NetworkName = aws.String(v) } - if v, ok := m["network_ids"].(int); ok { - s.RepInterval = int32(v) + if v, ok := m["network_ids"].(int); ok && v != 0 { + s.RepInterval = aws.Int32(int32(v)) } return &s } @@ -4852,8 +4852,8 @@ func expandM2tsDvbSdtSettings(tfList []interface{}) *types.DvbSdtSettings { if v, ok := m["output_sdt"].(string); ok && v != "" { s.OutputSdt = types.DvbSdtOutputSdt(v) } - if v, ok := m["rep_interval"].(int); ok { - s.RepInterval = int32(v) + if v, ok := m["rep_interval"].(int); ok && v != 0 { + s.RepInterval = aws.Int32(int32(v)) } if v, ok := m["service_name"].(string); ok && v != "" { s.ServiceName = aws.String(v) @@ -4875,8 +4875,8 @@ func expandChannelEncoderSettingsTimecodeConfig(tfList []interface{}) *types.Tim if v, ok := m["source"].(string); ok && v != "" { config.Source = types.TimecodeConfigSource(v) } - if v, ok := m["sync_threshold"].(int32); ok { - config.SyncThreshold = v + if v, ok := m["sync_threshold"].(int); ok && v != 0 { + config.SyncThreshold = aws.Int32(int32(v)) } return &config @@ -4901,8 +4901,8 @@ func expandChannelEncoderSettingsVideoDescriptions(tfList []interface{}) []types if v, ok := m["codec_settings"].([]interface{}); ok && len(v) > 0 { d.CodecSettings = expandChannelEncoderSettingsVideoDescriptionsCodecSettings(v) } - if v, ok := m["height"].(int); ok { - d.Height = int32(v) + if v, ok := m["height"].(int); ok && v != 0 { + d.Height = aws.Int32(int32(v)) } if v, ok := m["respond_to_afd"].(string); ok && v != "" { d.RespondToAfd = types.VideoDescriptionRespondToAfd(v) @@ -4910,11 +4910,11 @@ func expandChannelEncoderSettingsVideoDescriptions(tfList []interface{}) []types if v, ok := m["scaling_behavior"].(string); ok && v != "" { d.ScalingBehavior = types.VideoDescriptionScalingBehavior(v) } - if v, ok := m["sharpness"].(int); ok { - d.Sharpness = int32(v) + if v, ok := m["sharpness"].(int); ok && v != 0 { + d.Sharpness = aws.Int32(int32(v)) } - if v, ok := m["width"].(int); ok { - d.Width = int32(v) + if v, ok := m["width"].(int); ok && v != 0 { + d.Width = aws.Int32(int32(v)) } videoDesc = append(videoDesc, d) @@ -5044,8 +5044,8 @@ func expandsCaptionDescriptionsDestinationSettingsBurnInDestinationSettings(tfLi if v, ok := m["background_color"].(string); ok && len(v) > 0 { out.BackgroundColor = types.BurnInBackgroundColor(v) } - if v, ok := m["background_opacity"].(int); ok { - out.BackgroundOpacity = int32(v) + if v, ok := m["background_opacity"].(int); ok && v != 0 { + out.BackgroundOpacity = aws.Int32(int32(v)) } if v, ok := m["font"].([]interface{}); ok && len(v) > 0 { out.Font = expandInputLocation(v) @@ -5053,11 +5053,11 @@ func expandsCaptionDescriptionsDestinationSettingsBurnInDestinationSettings(tfLi if v, ok := m["font_color"].(string); ok && len(v) > 0 { out.FontColor = types.BurnInFontColor(v) } - if v, ok := m["font_opacity"].(int); ok { - out.FontOpacity = int32(v) + if v, ok := m["font_opacity"].(int); ok && v != 0 { + out.FontOpacity = aws.Int32(int32(v)) } - if v, ok := m["font_resolution"].(int); ok { - out.FontResolution = int32(v) + if v, ok := m["font_resolution"].(int); ok && v != 0 { + out.FontResolution = aws.Int32(int32(v)) } if v, ok := m["font_size"].(string); ok && v != "" { out.FontSize = aws.String(v) @@ -5065,29 +5065,29 @@ func expandsCaptionDescriptionsDestinationSettingsBurnInDestinationSettings(tfLi if v, ok := m["outline_color"].(string); ok && len(v) > 0 { out.OutlineColor = types.BurnInOutlineColor(v) } - if v, ok := m["outline_size"].(int); ok { - out.OutlineSize = int32(v) + if v, ok := m["outline_size"].(int); ok && v != 0 { + out.OutlineSize = aws.Int32(int32(v)) } if v, ok := m["shadow_color"].(string); ok && len(v) > 0 { out.ShadowColor = types.BurnInShadowColor(v) } - if v, ok := m["shadow_opacity"].(int); ok { - out.ShadowOpacity = int32(v) + if v, ok := m["shadow_opacity"].(int); ok && v != 0 { + out.ShadowOpacity = aws.Int32(int32(v)) } - if v, ok := m["shadow_x_offset"].(int); ok { - out.ShadowXOffset = int32(v) + if v, ok := m["shadow_x_offset"].(int); ok && v != 0 { + out.ShadowXOffset = aws.Int32(int32(v)) } - if v, ok := m["shadow_y_offset"].(int); ok { - out.ShadowYOffset = int32(v) + if v, ok := m["shadow_y_offset"].(int); ok && v != 0 { + out.ShadowYOffset = aws.Int32(int32(v)) } if v, ok := m["teletext_grid_control"].(string); ok && len(v) > 0 { out.TeletextGridControl = types.BurnInTeletextGridControl(v) } - if v, ok := m["x_position"].(int); ok { - out.XPosition = int32(v) + if v, ok := m["x_position"].(int); ok && v != 0 { + out.XPosition = aws.Int32(int32(v)) } - if v, ok := m["y_position"].(int); ok { - out.YPosition = int32(v) + if v, ok := m["y_position"].(int); ok && v != 0 { + out.YPosition = aws.Int32(int32(v)) } return &out @@ -5107,8 +5107,8 @@ func expandsCaptionDescriptionsDestinationSettingsDvbSubDestinationSettings(tfLi if v, ok := m["background_color"].(string); ok && len(v) > 0 { out.BackgroundColor = types.DvbSubDestinationBackgroundColor(v) } - if v, ok := m["background_opacity"].(int); ok { - out.BackgroundOpacity = int32(v) + if v, ok := m["background_opacity"].(int); ok && v != 0 { + out.BackgroundOpacity = aws.Int32(int32(v)) } if v, ok := m["font"].([]interface{}); ok && len(v) > 0 { out.Font = expandInputLocation(v) @@ -5116,11 +5116,11 @@ func expandsCaptionDescriptionsDestinationSettingsDvbSubDestinationSettings(tfLi if v, ok := m["font_color"].(string); ok && len(v) > 0 { out.FontColor = types.DvbSubDestinationFontColor(v) } - if v, ok := m["font_opacity"].(int); ok { - out.FontOpacity = int32(v) + if v, ok := m["font_opacity"].(int); ok && v != 0 { + out.FontOpacity = aws.Int32(int32(v)) } - if v, ok := m["font_resolution"].(int); ok { - out.FontResolution = int32(v) + if v, ok := m["font_resolution"].(int); ok && v != 0 { + out.FontResolution = aws.Int32(int32(v)) } if v, ok := m["font_size"].(string); ok && v != "" { out.FontSize = aws.String(v) @@ -5128,29 +5128,29 @@ func expandsCaptionDescriptionsDestinationSettingsDvbSubDestinationSettings(tfLi if v, ok := m["outline_color"].(string); ok && len(v) > 0 { out.OutlineColor = types.DvbSubDestinationOutlineColor(v) } - if v, ok := m["outline_size"].(int); ok { - out.OutlineSize = int32(v) + if v, ok := m["outline_size"].(int); ok && v != 0 { + out.OutlineSize = aws.Int32(int32(v)) } if v, ok := m["shadow_color"].(string); ok && len(v) > 0 { out.ShadowColor = types.DvbSubDestinationShadowColor(v) } - if v, ok := m["shadow_opacity"].(int); ok { - out.ShadowOpacity = int32(v) + if v, ok := m["shadow_opacity"].(int); ok && v != 0 { + out.ShadowOpacity = aws.Int32(int32(v)) } - if v, ok := m["shadow_x_offset"].(int); ok { - out.ShadowXOffset = int32(v) + if v, ok := m["shadow_x_offset"].(int); ok && v != 0 { + out.ShadowXOffset = aws.Int32(int32(v)) } - if v, ok := m["shadow_y_offset"].(int); ok { - out.ShadowYOffset = int32(v) + if v, ok := m["shadow_y_offset"].(int); ok && v != 0 { + out.ShadowYOffset = aws.Int32(int32(v)) } if v, ok := m["teletext_grid_control"].(string); ok && len(v) > 0 { out.TeletextGridControl = types.DvbSubDestinationTeletextGridControl(v) } - if v, ok := m["x_position"].(int); ok { - out.XPosition = int32(v) + if v, ok := m["x_position"].(int); ok && v != 0 { + out.XPosition = aws.Int32(int32(v)) } - if v, ok := m["y_position"].(int); ok { - out.YPosition = int32(v) + if v, ok := m["y_position"].(int); ok && v != 0 { + out.YPosition = aws.Int32(int32(v)) } return &out @@ -5221,8 +5221,8 @@ func expandChannelEncoderSettingsGlobalConfiguration(tfList []interface{}) *type var out types.GlobalConfiguration - if v, ok := m["initial_audio_gain"].(int); ok { - out.InitialAudioGain = int32(v) + if v, ok := m["initial_audio_gain"].(int); ok && v != 0 { + out.InitialAudioGain = aws.Int32(int32(v)) } if v, ok := m["input_end_action"].(string); ok && len(v) > 0 { @@ -5257,8 +5257,8 @@ func expandChannelEncoderSettingsGlobalConfigurationInputLossBehavior(tfList []i var out types.InputLossBehavior - if v, ok := m["black_frame_msec"].(int); ok { - out.BlackFrameMsec = int32(v) + if v, ok := m["black_frame_msec"].(int); ok && v != 0 { + out.BlackFrameMsec = aws.Int32(int32(v)) } if v, ok := m["input_loss_image_color"].(string); ok && v != "" { @@ -5273,8 +5273,8 @@ func expandChannelEncoderSettingsGlobalConfigurationInputLossBehavior(tfList []i out.InputLossImageType = types.InputLossImageType(v) } - if v, ok := m["repeat_frame_msec"].(int); ok { - out.RepeatFrameMsec = int32(v) + if v, ok := m["repeat_frame_msec"].(int); ok && v != 0 { + out.RepeatFrameMsec = aws.Int32(int32(v)) } return &out @@ -5363,8 +5363,8 @@ func expandsVideoDescriptionsCodecSettingsFrameCaptureSettings(tfList []interfac m := tfList[0].(map[string]interface{}) var out types.FrameCaptureSettings - if v, ok := m["capture_interval"].(int); ok { - out.CaptureInterval = int32(v) + if v, ok := m["capture_interval"].(int); ok && v != 0 { + out.CaptureInterval = aws.Int32(int32(v)) } if v, ok := m["capture_interval_units"].(string); ok && v != "" { out.CaptureIntervalUnits = types.FrameCaptureIntervalUnit(v) @@ -5387,14 +5387,14 @@ func expandsVideoDescriptionsCodecSettingsH264Settings(tfList []interface{}) *ty if v, ok := m["afd_signaling"].(string); ok && v != "" { out.AfdSignaling = types.AfdSignaling(v) } - if v, ok := m["bitrate"].(int); ok { - out.Bitrate = int32(v) + if v, ok := m["bitrate"].(int); ok && v != 0 { + out.Bitrate = aws.Int32(int32(v)) } - if v, ok := m["buf_fill_pct"].(int); ok { - out.BufFillPct = int32(v) + if v, ok := m["buf_fill_pct"].(int); ok && v != 0 { + out.BufFillPct = aws.Int32(int32(v)) } - if v, ok := m["buf_size"].(int); ok { - out.BufSize = int32(v) + if v, ok := m["buf_size"].(int); ok && v != 0 { + out.BufSize = aws.Int32(int32(v)) } if v, ok := m["color_metadata"].(string); ok && v != "" { out.ColorMetadata = types.H264ColorMetadata(v) @@ -5417,23 +5417,23 @@ func expandsVideoDescriptionsCodecSettingsH264Settings(tfList []interface{}) *ty if v, ok := m["framerate_control"].(string); ok && v != "" { out.FramerateControl = types.H264FramerateControl(v) } - if v, ok := m["framerate_denominator"].(int); ok { - out.FramerateDenominator = int32(v) + if v, ok := m["framerate_denominator"].(int); ok && v != 0 { + out.FramerateDenominator = aws.Int32(int32(v)) } - if v, ok := m["framerate_numerator"].(int); ok { - out.FramerateNumerator = int32(v) + if v, ok := m["framerate_numerator"].(int); ok && v != 0 { + out.FramerateNumerator = aws.Int32(int32(v)) } if v, ok := m["gop_b_reference"].(string); ok && v != "" { out.GopBReference = types.H264GopBReference(v) } - if v, ok := m["gop_closed_cadence"].(int); ok { - out.GopClosedCadence = int32(v) + if v, ok := m["gop_closed_cadence"].(int); ok && v != 0 { + out.GopClosedCadence = aws.Int32(int32(v)) } - if v, ok := m["gop_num_b_frames"].(int); ok { - out.GopNumBFrames = int32(v) + if v, ok := m["gop_num_b_frames"].(int); ok && v != 0 { + out.GopNumBFrames = aws.Int32(int32(v)) } - if v, ok := m["gop_size"].(float64); ok { - out.GopSize = v + if v, ok := m["gop_size"].(float64); ok && v != 0.0 { + out.GopSize = aws.Float64(v) } if v, ok := m["gop_size_units"].(string); ok && v != "" { out.GopSizeUnits = types.H264GopSizeUnits(v) @@ -5444,23 +5444,23 @@ func expandsVideoDescriptionsCodecSettingsH264Settings(tfList []interface{}) *ty if v, ok := m["look_ahead_rate_control"].(string); ok && v != "" { out.LookAheadRateControl = types.H264LookAheadRateControl(v) } - if v, ok := m["max_bitrate"].(int); ok { - out.MaxBitrate = int32(v) + if v, ok := m["max_bitrate"].(int); ok && v != 0 { + out.MaxBitrate = aws.Int32(int32(v)) } - if v, ok := m["min_i_interval"].(int); ok { - out.MinIInterval = int32(v) + if v, ok := m["min_i_interval"].(int); ok && v != 0 { + out.MinIInterval = aws.Int32(int32(v)) } - if v, ok := m["num_ref_frames"].(int); ok { - out.NumRefFrames = int32(v) + if v, ok := m["num_ref_frames"].(int); ok && v != 0 { + out.NumRefFrames = aws.Int32(int32(v)) } if v, ok := m["par_control"].(string); ok && v != "" { out.ParControl = types.H264ParControl(v) } - if v, ok := m["par_denominator"].(int); ok { - out.ParDenominator = int32(v) + if v, ok := m["par_denominator"].(int); ok && v != 0 { + out.ParDenominator = aws.Int32(int32(v)) } - if v, ok := m["par_numerator"].(int); ok { - out.ParNumerator = int32(v) + if v, ok := m["par_numerator"].(int); ok && v != 0 { + out.ParNumerator = aws.Int32(int32(v)) } if v, ok := m["profile"].(string); ok && v != "" { out.Profile = types.H264Profile(v) @@ -5468,8 +5468,8 @@ func expandsVideoDescriptionsCodecSettingsH264Settings(tfList []interface{}) *ty if v, ok := m["quality_level"].(string); ok && v != "" { out.QualityLevel = types.H264QualityLevel(v) } - if v, ok := m["qvbr_quality_level"].(int); ok { - out.QvbrQualityLevel = int32(v) + if v, ok := m["qvbr_quality_level"].(int); ok && v != 0 { + out.QvbrQualityLevel = aws.Int32(int32(v)) } if v, ok := m["rate_control_mode"].(string); ok && v != "" { out.RateControlMode = types.H264RateControlMode(v) @@ -5480,11 +5480,11 @@ func expandsVideoDescriptionsCodecSettingsH264Settings(tfList []interface{}) *ty if v, ok := m["scene_change_detect"].(string); ok && v != "" { out.SceneChangeDetect = types.H264SceneChangeDetect(v) } - if v, ok := m["slices"].(int); ok { - out.Slices = int32(v) + if v, ok := m["slices"].(int); ok && v != 0 { + out.Slices = aws.Int32(int32(v)) } - if v, ok := m["softness"].(int); ok { - out.Softness = int32(v) + if v, ok := m["softness"].(int); ok && v != 0 { + out.Softness = aws.Int32(int32(v)) } if v, ok := m["spatial_aq"].(string); ok && v != "" { out.SpatialAq = types.H264SpatialAq(v) @@ -5546,11 +5546,11 @@ func expandsVideoDescriptionsCodecSettingsH265Settings(tfList []interface{}) *ty m := tfList[0].(map[string]interface{}) var out types.H265Settings - if v, ok := m["framerate_denominator"].(int); ok { - out.FramerateDenominator = int32(v) + if v, ok := m["framerate_denominator"].(int); ok && v != 0 { + out.FramerateDenominator = aws.Int32(int32(v)) } - if v, ok := m["framerate_numerator"].(int); ok { - out.FramerateNumerator = int32(v) + if v, ok := m["framerate_numerator"].(int); ok && v != 0 { + out.FramerateNumerator = aws.Int32(int32(v)) } if v, ok := m["adaptive_quantization"].(string); ok && v != "" { out.AdaptiveQuantization = types.H265AdaptiveQuantization(v) @@ -5561,11 +5561,11 @@ func expandsVideoDescriptionsCodecSettingsH265Settings(tfList []interface{}) *ty if v, ok := m["alternative_transfer_function"].(string); ok && v != "" { out.AlternativeTransferFunction = types.H265AlternativeTransferFunction(v) } - if v, ok := m["bitrate"].(int); ok { - out.Bitrate = int32(v) + if v, ok := m["bitrate"].(int); ok && v != 0 { + out.Bitrate = aws.Int32(int32(v)) } - if v, ok := m["buf_size"].(int); ok { - out.BufSize = int32(v) + if v, ok := m["buf_size"].(int); ok && v != 0 { + out.BufSize = aws.Int32(int32(v)) } if v, ok := m["color_metadata"].(string); ok && v != "" { out.ColorMetadata = types.H265ColorMetadata(v) @@ -5582,11 +5582,11 @@ func expandsVideoDescriptionsCodecSettingsH265Settings(tfList []interface{}) *ty if v, ok := m["flicker_aq"].(string); ok && v != "" { out.FlickerAq = types.H265FlickerAq(v) } - if v, ok := m["gop_closed_cadence"].(int); ok { - out.GopClosedCadence = int32(v) + if v, ok := m["gop_closed_cadence"].(int); ok && v != 0 { + out.GopClosedCadence = aws.Int32(int32(v)) } - if v, ok := m["gop_size"].(float64); ok { - out.GopSize = v + if v, ok := m["gop_size"].(float64); ok && v != 0.0 { + out.GopSize = aws.Float64(v) } if v, ok := m["gop_size_units"].(string); ok && v != "" { out.GopSizeUnits = types.H265GopSizeUnits(v) @@ -5597,23 +5597,23 @@ func expandsVideoDescriptionsCodecSettingsH265Settings(tfList []interface{}) *ty if v, ok := m["look_ahead_rate_control"].(string); ok && v != "" { out.LookAheadRateControl = types.H265LookAheadRateControl(v) } - if v, ok := m["max_bitrate"].(int); ok { - out.MaxBitrate = int32(v) + if v, ok := m["max_bitrate"].(int); ok && v != 0 { + out.MaxBitrate = aws.Int32(int32(v)) } - if v, ok := m["min_i_interval"].(int); ok { - out.MinIInterval = int32(v) + if v, ok := m["min_i_interval"].(int); ok && v != 0 { + out.MinIInterval = aws.Int32(int32(v)) } - if v, ok := m["par_denominator"].(int); ok { - out.ParDenominator = int32(v) + if v, ok := m["par_denominator"].(int); ok && v != 0 { + out.ParDenominator = aws.Int32(int32(v)) } - if v, ok := m["par_numerator"].(int); ok { - out.ParNumerator = int32(v) + if v, ok := m["par_numerator"].(int); ok && v != 0 { + out.ParNumerator = aws.Int32(int32(v)) } if v, ok := m["profile"].(string); ok && v != "" { out.Profile = types.H265Profile(v) } - if v, ok := m["qvbr_quality_level"].(int); ok { - out.QvbrQualityLevel = int32(v) + if v, ok := m["qvbr_quality_level"].(int); ok && v != 0 { + out.QvbrQualityLevel = aws.Int32(int32(v)) } if v, ok := m["rate_control_mode"].(string); ok && v != "" { out.RateControlMode = types.H265RateControlMode(v) @@ -5624,8 +5624,8 @@ func expandsVideoDescriptionsCodecSettingsH265Settings(tfList []interface{}) *ty if v, ok := m["scene_change_detect"].(string); ok && v != "" { out.SceneChangeDetect = types.H265SceneChangeDetect(v) } - if v, ok := m["slices"].(int); ok { - out.Slices = int32(v) + if v, ok := m["slices"].(int); ok && v != 0 { + out.Slices = aws.Int32(int32(v)) } if v, ok := m["tier"].(string); ok && v != "" { out.Tier = types.H265Tier(v) @@ -5675,11 +5675,11 @@ func expandH265Hdr10Settings(tfList []interface{}) *types.Hdr10Settings { m := tfList[0].(map[string]interface{}) var out types.Hdr10Settings - if v, ok := m["max_cll"].(int); ok { - out.MaxCll = int32(v) + if v, ok := m["max_cll"].(int); ok && v != 0 { + out.MaxCll = aws.Int32(int32(v)) } - if v, ok := m["max_fall"].(int); ok { - out.MaxFall = int32(v) + if v, ok := m["max_fall"].(int); ok && v != 0 { + out.MaxFall = aws.Int32(int32(v)) } return &out @@ -5771,8 +5771,8 @@ func expandNielsenNaseIiNwSettings(tfList []interface{}) *types.NielsenNaesIiNw if v, ok := m["check_digit_string"].(string); ok && v != "" { out.CheckDigitString = aws.String(v) } - if v, ok := m["sid"].(float32); ok { - out.Sid = float64(v) + if v, ok := m["sid"].(float32); ok && v != 0.0 { + out.Sid = aws.Float64(float64(v)) } return &out @@ -6050,22 +6050,22 @@ func flattenStandardHLSSettingsM3u8Settings(in *types.M3u8Settings) []interface{ } m := map[string]interface{}{ - "audio_frames_per_pes": int(in.AudioFramesPerPes), + "audio_frames_per_pes": int(aws.ToInt32(in.AudioFramesPerPes)), "audio_pids": aws.ToString(in.AudioPids), "ecm_pid": aws.ToString(in.EcmPid), "nielsen_id3_behavior": string(in.NielsenId3Behavior), - "pat_interval": int(in.PatInterval), + "pat_interval": int(aws.ToInt32(in.PatInterval)), "pcr_control": string(in.PcrControl), - "pcr_period": int(in.PcrPeriod), + "pcr_period": int(aws.ToInt32(in.PcrPeriod)), "pcr_pid": aws.ToString(in.PcrPid), - "pmt_interval": int(in.PmtInterval), + "pmt_interval": int(aws.ToInt32(in.PmtInterval)), "pmt_pid": aws.ToString(in.PmtPid), - "program_num": int(in.ProgramNum), + "program_num": int(aws.ToInt32(in.ProgramNum)), "scte35_behavior": string(in.Scte35Behavior), "scte35_pid": aws.ToString(in.Scte35Pid), "timed_metadata_behavior": string(in.TimedMetadataBehavior), "timed_metadata_pid": aws.ToString(in.TimedMetadataPid), - "transport_stream_id": int(in.TransportStreamId), + "transport_stream_id": int(aws.ToInt32(in.TransportStreamId)), "video_pid": aws.ToString(in.VideoPid), } @@ -6080,8 +6080,8 @@ func flattenOutputsOutputSettingsRtmpOutputSettings(in *types.RtmpOutputSettings m := map[string]interface{}{ "destination": flattenDestination(in.Destination), "certificate_mode": string(in.CertificateMode), - "connection_retry_interval": int(in.ConnectionRetryInterval), - "num_retries": int(in.NumRetries), + "connection_retry_interval": int(aws.ToInt32(in.ConnectionRetryInterval)), + "num_retries": int(aws.ToInt32(in.NumRetries)), } return []interface{}{m} @@ -6095,7 +6095,7 @@ func flattenOutputsOutputSettingsUdpOutputSettings(in *types.UdpOutputSettings) m := map[string]interface{}{ "container_settings": flattenOutputsOutputSettingsUdpOutputSettingsContainerSettings(in.ContainerSettings), "destination": flattenDestination(in.Destination), - "buffer_msec": int(in.BufferMsec), + "buffer_msec": int(aws.ToInt32(in.BufferMsec)), "fec_output_settings": flattenFecOutputSettings(in.FecOutputSettings), } @@ -6133,9 +6133,9 @@ func flattenFecOutputSettings(in *types.FecOutputSettings) []interface{} { } m := map[string]interface{}{ - "column_depth": int(in.ColumnDepth), + "column_depth": int(aws.ToInt32(in.ColumnDepth)), "include_fec": string(in.IncludeFec), - "row_length": int(in.RowLength), + "row_length": int(aws.ToInt32(in.RowLength)), } return []interface{}{m} @@ -6152,10 +6152,10 @@ func flattenM2tsSettings(in *types.M2tsSettings) []interface{} { "arib_captions_pid": aws.ToString(in.AribCaptionsPid), "arib_captions_pid_control": string(in.AribCaptionsPidControl), "audio_buffer_model": string(in.AudioBufferModel), - "audio_frames_per_pes": int(in.AudioFramesPerPes), + "audio_frames_per_pes": int(aws.ToInt32(in.AudioFramesPerPes)), "audio_pids": aws.ToString(in.AudioPids), "audio_stream_type": string(in.AudioStreamType), - "bitrate": int(in.Bitrate), + "bitrate": int(aws.ToInt32(in.Bitrate)), "buffer_model": string(in.BufferModel), "cc_descriptor": string(in.CcDescriptor), "dvb_nit_settings": flattenDvbNitSettings(in.DvbNitSettings), @@ -6165,7 +6165,7 @@ func flattenM2tsSettings(in *types.M2tsSettings) []interface{} { "dvb_teletext_pid": aws.ToString(in.DvbTeletextPid), "ebif": string(in.Ebif), "ebp_audio_interval": string(in.EbpAudioInterval), - "ebp_lookahead_ms": int(in.EbpLookaheadMs), + "ebp_lookahead_ms": int(aws.ToInt32(in.EbpLookaheadMs)), "ebp_placement": string(in.EbpPlacement), "ecm_pid": aws.ToString(in.EcmPid), "es_rate_in_pes": string(in.EsRateInPes), @@ -6175,14 +6175,14 @@ func flattenM2tsSettings(in *types.M2tsSettings) []interface{} { "klv": string(in.Klv), "klv_data_pids": aws.ToString(in.KlvDataPids), "nielsen_id3_behavior": string(in.NielsenId3Behavior), - "null_packet_bitrate": float32(in.NullPacketBitrate), - "pat_interval": int(in.PatInterval), + "null_packet_bitrate": float32(aws.ToFloat64(in.NullPacketBitrate)), + "pat_interval": int(aws.ToInt32(in.PatInterval)), "pcr_control": string(in.PcrControl), - "pcr_period": int(in.PcrPeriod), + "pcr_period": int(aws.ToInt32(in.PcrPeriod)), "pcr_pid": aws.ToString(in.PcrPid), - "pmt_interval": int(in.PmtInterval), + "pmt_interval": int(aws.ToInt32(in.PmtInterval)), "pmt_pid": aws.ToString(in.PmtPid), - "program_num": int(in.ProgramNum), + "program_num": int(aws.ToInt32(in.ProgramNum)), "rate_mode": string(in.RateMode), "scte27_pids": aws.ToString(in.Scte27Pids), "scte35_control": string(in.Scte35Control), @@ -6192,7 +6192,7 @@ func flattenM2tsSettings(in *types.M2tsSettings) []interface{} { "segmentation_time": in.SegmentationTime, "timed_metadata_behavior": string(in.TimedMetadataBehavior), "timed_metadata_pid": aws.ToString(in.TimedMetadataPid), - "transport_stream_id": int(in.TransportStreamId), + "transport_stream_id": int(aws.ToInt32(in.TransportStreamId)), "video_pid": aws.ToString(in.VideoPid), } @@ -6205,9 +6205,9 @@ func flattenDvbNitSettings(in *types.DvbNitSettings) []interface{} { } m := map[string]interface{}{ - "network_id": int(in.NetworkId), + "network_id": int(aws.ToInt32(in.NetworkId)), "network_name": aws.ToString(in.NetworkName), - "rep_interval": int(in.RepInterval), + "rep_interval": int(aws.ToInt32(in.RepInterval)), } return []interface{}{m} @@ -6220,7 +6220,7 @@ func flattenDvbSdtSettings(in *types.DvbSdtSettings) []interface{} { m := map[string]interface{}{ "output_sdt": string(in.OutputSdt), - "rep_interval": int(in.RepInterval), + "rep_interval": int(aws.ToInt32(in.RepInterval)), "service_name": aws.ToString(in.ServiceName), "service_provider_name": aws.ToString(in.ServiceProviderName), } @@ -6234,21 +6234,21 @@ func flattenDvbTdtSettings(in *types.DvbTdtSettings) []interface{} { } m := map[string]interface{}{ - "rep_interval": int(in.RepInterval), + "rep_interval": int(aws.ToInt32(in.RepInterval)), } return []interface{}{m} } -func flattenOutputGroupSettingsArchiveGroupSettings(as *types.ArchiveGroupSettings) []interface{} { - if as == nil { +func flattenOutputGroupSettingsArchiveGroupSettings(in *types.ArchiveGroupSettings) []interface{} { + if in == nil { return nil } m := map[string]interface{}{ - "destination": flattenDestination(as.Destination), - "archive_cdn_settings": flattenOutputGroupSettingsArchiveCDNSettings(as.ArchiveCdnSettings), - "rollover_interval": int(as.RolloverInterval), + "destination": flattenDestination(in.Destination), + "archive_cdn_settings": flattenOutputGroupSettingsArchiveCDNSettings(in.ArchiveCdnSettings), + "rollover_interval": int(aws.ToInt32(in.RolloverInterval)), } return []interface{}{m} @@ -6291,29 +6291,29 @@ func flattenOutputGroupSettingsHLSGroupSettings(in *types.HlsGroupSettings) []in "hls_id3_segment_tagging": string(in.HlsId3SegmentTagging), "iframe_only_playlists": string(in.IFrameOnlyPlaylists), "incomplete_segment_behavior": string(in.IncompleteSegmentBehavior), - "index_n_segments": int(in.IndexNSegments), + "index_n_segments": int(aws.ToInt32(in.IndexNSegments)), "input_loss_action": string(in.InputLossAction), "iv_in_manifest": string(in.IvInManifest), "iv_source": string(in.IvSource), - "keep_segments": int(in.KeepSegments), + "keep_segments": int(aws.ToInt32(in.KeepSegments)), "key_format": aws.ToString(in.KeyFormat), "key_format_versions": aws.ToString(in.KeyFormatVersions), "key_provider_settings": flattenHLSKeyProviderSettings(in.KeyProviderSettings), "manifest_compression": string(in.ManifestCompression), "manifest_duration_format": string(in.ManifestDurationFormat), - "min_segment_length": int(in.MinSegmentLength), + "min_segment_length": int(aws.ToInt32(in.MinSegmentLength)), "mode": string(in.Mode), "output_selection": string(in.OutputSelection), "program_date_time": string(in.ProgramDateTime), "program_date_time_clock": string(in.ProgramDateTimeClock), - "program_date_time_period": int(in.ProgramDateTimePeriod), + "program_date_time_period": int(aws.ToInt32(in.ProgramDateTimePeriod)), "redundant_manifest": string(in.RedundantManifest), - "segment_length": int(in.SegmentLength), - "segments_per_subdirectory": int(in.SegmentsPerSubdirectory), + "segment_length": int(aws.ToInt32(in.SegmentLength)), + "segments_per_subdirectory": int(aws.ToInt32(in.SegmentsPerSubdirectory)), "stream_inf_resolution": string(in.StreamInfResolution), "timed_metadata_id3_frame": string(in.TimedMetadataId3Frame), - "timed_metadata_id3_period": int(in.TimedMetadataId3Period), - "timestamp_delta_milliseconds": int(in.TimestampDeltaMilliseconds), + "timed_metadata_id3_period": int(aws.ToInt32(in.TimedMetadataId3Period)), + "timestamp_delta_milliseconds": int(aws.ToInt32(in.TimestampDeltaMilliseconds)), "ts_file_mode": string(in.TsFileMode), } @@ -6330,17 +6330,17 @@ func flattenOutputGroupSettingsMsSmoothGroupSettings(in *types.MsSmoothGroupSett "acquisition_point_id": aws.ToString(in.AcquisitionPointId), "audio_only_timecode_control": string(in.AudioOnlyTimecodeControl), "certificate_mode": string(in.CertificateMode), - "connection_retry_interval": int(in.ConnectionRetryInterval), + "connection_retry_interval": int(aws.ToInt32(in.ConnectionRetryInterval)), "event_id": aws.ToString(in.EventId), "event_id_mode": string(in.EventIdMode), "event_stop_behavior": string(in.EventStopBehavior), - "filecache_duration": int(in.FilecacheDuration), - "fragment_length": int(in.FragmentLength), + "filecache_duration": int(aws.ToInt32(in.FilecacheDuration)), + "fragment_length": int(aws.ToInt32(in.FragmentLength)), "input_loss_action": string(in.InputLossAction), - "num_retries": int(in.NumRetries), - "restart_delay": int(in.RestartDelay), + "num_retries": int(aws.ToInt32(in.NumRetries)), + "restart_delay": int(aws.ToInt32(in.RestartDelay)), "segmentation_mode": string(in.SegmentationMode), - "send_delay_ms": int(in.SendDelayMs), + "send_delay_ms": int(aws.ToInt32(in.SendDelayMs)), "sparse_track_type": string(in.SparseTrackType), "stream_manifest_behavior": string(in.StreamManifestBehavior), "timestamp_offset": aws.ToString(in.TimestampOffset), @@ -6371,7 +6371,7 @@ func flattenHLSCaptionLanguageMappings(in []types.CaptionLanguageMapping) []inte var out []interface{} for _, item := range in { m := map[string]interface{}{ - "caption_channel": int(item.CaptionChannel), + "caption_channel": int(aws.ToInt32(item.CaptionChannel)), "language_code": aws.ToString(item.LanguageCode), "language_description": aws.ToString(item.LanguageDescription), } @@ -6404,11 +6404,11 @@ func flattenHLSAkamaiSettings(in *types.HlsAkamaiSettings) []interface{} { } m := map[string]interface{}{ - "connection_retry_interval": int(in.ConnectionRetryInterval), - "filecache_duration": int(in.FilecacheDuration), + "connection_retry_interval": int(aws.ToInt32(in.ConnectionRetryInterval)), + "filecache_duration": int(aws.ToInt32(in.FilecacheDuration)), "http_transfer_mode": string(in.HttpTransferMode), - "num_retries": int(in.NumRetries), - "restart_delay": int(in.RestartDelay), + "num_retries": int(aws.ToInt32(in.NumRetries)), + "restart_delay": int(aws.ToInt32(in.RestartDelay)), "salt": aws.ToString(in.Salt), "token": aws.ToString(in.Token), } @@ -6422,10 +6422,10 @@ func flattenHLSBasicPutSettings(in *types.HlsBasicPutSettings) []interface{} { } m := map[string]interface{}{ - "connection_retry_interval": int(in.ConnectionRetryInterval), - "filecache_duration": int(in.FilecacheDuration), - "num_retries": int(in.NumRetries), - "restart_delay": int(in.RestartDelay), + "connection_retry_interval": int(aws.ToInt32(in.ConnectionRetryInterval)), + "filecache_duration": int(aws.ToInt32(in.FilecacheDuration)), + "num_retries": int(aws.ToInt32(in.NumRetries)), + "restart_delay": int(aws.ToInt32(in.RestartDelay)), } return []interface{}{m} @@ -6437,11 +6437,11 @@ func flattenHLSMediaStoreSettings(in *types.HlsMediaStoreSettings) []interface{} } m := map[string]interface{}{ - "connection_retry_interval": int(in.ConnectionRetryInterval), - "filecache_duration": int(in.FilecacheDuration), + "connection_retry_interval": int(aws.ToInt32(in.ConnectionRetryInterval)), + "filecache_duration": int(aws.ToInt32(in.FilecacheDuration)), "media_store_storage_class": string(in.MediaStoreStorageClass), - "num_retries": int(in.NumRetries), - "restart_delay": int(in.RestartDelay), + "num_retries": int(aws.ToInt32(in.NumRetries)), + "restart_delay": int(aws.ToInt32(in.RestartDelay)), } return []interface{}{m} @@ -6477,11 +6477,11 @@ func flattenHLSWebdavSettings(in *types.HlsWebdavSettings) []interface{} { } m := map[string]interface{}{ - "connection_retry_interval": int(in.ConnectionRetryInterval), - "filecache_duration": int(in.FilecacheDuration), + "connection_retry_interval": int(aws.ToInt32(in.ConnectionRetryInterval)), + "filecache_duration": int(aws.ToInt32(in.FilecacheDuration)), "http_transfer_mode": string(in.HttpTransferMode), - "num_retries": int(in.NumRetries), - "restart_delay": int(in.RestartDelay), + "num_retries": int(aws.ToInt32(in.NumRetries)), + "restart_delay": int(aws.ToInt32(in.RestartDelay)), } return []interface{}{m} @@ -6550,19 +6550,19 @@ func flattenOutputGroupSettingsMediaPackageGroupSettings(mp *types.MediaPackageG return []interface{}{m} } -func flattenOutputGroupSettingsRtmpGroupSettings(rt *types.RtmpGroupSettings) []interface{} { - if rt == nil { +func flattenOutputGroupSettingsRtmpGroupSettings(in *types.RtmpGroupSettings) []interface{} { + if in == nil { return nil } m := map[string]interface{}{ - "ad_markers": flattenAdMakers(rt.AdMarkers), - "authentication_scheme": string(rt.AuthenticationScheme), - "cache_full_behavior": string(rt.CacheFullBehavior), - "cache_length": int(rt.CacheLength), - "caption_data": string(rt.CaptionData), - "input_loss_action": string(rt.InputLossAction), - "restart_delay": int(rt.RestartDelay), + "ad_markers": flattenAdMakers(in.AdMarkers), + "authentication_scheme": string(in.AuthenticationScheme), + "cache_full_behavior": string(in.CacheFullBehavior), + "cache_length": int(aws.ToInt32(in.CacheLength)), + "caption_data": string(in.CaptionData), + "input_loss_action": string(in.InputLossAction), + "restart_delay": int(aws.ToInt32(in.RestartDelay)), } return []interface{}{m} @@ -6576,7 +6576,7 @@ func flattenOutputGroupSettingsUdpGroupSettings(in *types.UdpGroupSettings) []in m := map[string]interface{}{ "input_loss_action": string(in.InputLossAction), "timed_metadata_id3_frame": string(in.TimedMetadataId3Frame), - "timed_metadata_id3_period": int(in.TimedMetadataId3Period), + "timed_metadata_id3_period": int(aws.ToInt32(in.TimedMetadataId3Period)), } return []interface{}{m} @@ -6636,7 +6636,7 @@ func flattenTimecodeConfig(in *types.TimecodeConfig) []interface{} { m := map[string]interface{}{ "source": string(in.Source), - "sync_threshold": int(in.SyncThreshold), + "sync_threshold": int(aws.ToInt32(in.SyncThreshold)), } return []interface{}{m} @@ -6653,11 +6653,11 @@ func flattenVideoDescriptions(tfList []types.VideoDescription) []interface{} { m := map[string]interface{}{ "name": aws.ToString(item.Name), "codec_settings": flattenVideoDescriptionsCodecSettings(item.CodecSettings), - "height": int(item.Height), + "height": int(aws.ToInt32(item.Height)), "respond_to_afd": string(item.RespondToAfd), "scaling_behavior": string(item.ScalingBehavior), - "sharpness": int(item.Sharpness), - "width": int(item.Width), + "sharpness": int(aws.ToInt32(item.Sharpness)), + "width": int(aws.ToInt32(item.Width)), } out = append(out, m) @@ -6732,21 +6732,21 @@ func flattenCaptionDescriptionsCaptionDestinationSettingsBurnInDestinationSettin m := map[string]interface{}{ "alignment": string(in.Alignment), "background_color": string(in.BackgroundColor), - "background_opacity": int(in.BackgroundOpacity), + "background_opacity": int(aws.ToInt32(in.BackgroundOpacity)), "font": flattenInputLocation(in.Font), "font_color": string(in.FontColor), - "font_opacity": int(in.FontOpacity), - "font_resolution": int(in.FontResolution), + "font_opacity": int(aws.ToInt32(in.FontOpacity)), + "font_resolution": int(aws.ToInt32(in.FontResolution)), "font_size": aws.ToString(in.FontSize), "outline_color": string(in.OutlineColor), - "outline_size": int(in.OutlineSize), + "outline_size": int(aws.ToInt32(in.OutlineSize)), "shadow_color": string(in.ShadowColor), - "shadow_opacity": int(in.ShadowOpacity), - "shadow_x_offset": int(in.ShadowXOffset), - "shadow_y_offset": int(in.ShadowYOffset), + "shadow_opacity": int(aws.ToInt32(in.ShadowOpacity)), + "shadow_x_offset": int(aws.ToInt32(in.ShadowXOffset)), + "shadow_y_offset": int(aws.ToInt32(in.ShadowYOffset)), "teletext_grid_control": string(in.TeletextGridControl), - "x_position": int(in.XPosition), - "y_position": int(in.YPosition), + "x_position": int(aws.ToInt32(in.XPosition)), + "y_position": int(aws.ToInt32(in.YPosition)), } return []interface{}{m} @@ -6760,21 +6760,21 @@ func flattenCaptionDescriptionsCaptionDestinationSettingsDvbSubDestinationSettin m := map[string]interface{}{ "alignment": string(in.Alignment), "background_color": string(in.BackgroundColor), - "background_opacity": int(in.BackgroundOpacity), + "background_opacity": int(aws.ToInt32(in.BackgroundOpacity)), "font": flattenInputLocation(in.Font), "font_color": string(in.FontColor), - "font_opacity": int(in.FontOpacity), - "font_resolution": int(in.FontResolution), + "font_opacity": int(aws.ToInt32(in.FontOpacity)), + "font_resolution": int(aws.ToInt32(in.FontResolution)), "font_size": aws.ToString(in.FontSize), "outline_color": string(in.OutlineColor), - "outline_size": int(in.OutlineSize), + "outline_size": int(aws.ToInt32(in.OutlineSize)), "shadow_color": string(in.ShadowColor), - "shadow_opacity": int(in.ShadowOpacity), - "shadow_x_offset": int(in.ShadowXOffset), - "shadow_y_offset": int(in.ShadowYOffset), + "shadow_opacity": int(aws.ToInt32(in.ShadowOpacity)), + "shadow_x_offset": int(aws.ToInt32(in.ShadowXOffset)), + "shadow_y_offset": int(aws.ToInt32(in.ShadowYOffset)), "teletext_grid_control": string(in.TeletextGridControl), - "x_position": int(in.XPosition), - "y_position": int(in.YPosition), + "x_position": int(aws.ToInt32(in.XPosition)), + "y_position": int(aws.ToInt32(in.YPosition)), } return []interface{}{m} @@ -6819,18 +6819,18 @@ func flattenCaptionDescriptionsCaptionDestinationSettingsWebvttDestinationSettin return []interface{}{m} } -func flattenGlobalConfiguration(apiObject *types.GlobalConfiguration) []interface{} { - if apiObject == nil { +func flattenGlobalConfiguration(in *types.GlobalConfiguration) []interface{} { + if in == nil { return nil } m := map[string]interface{}{ - "initial_audio_gain": int(apiObject.InitialAudioGain), - "input_end_action": string(apiObject.InputEndAction), - "input_loss_behavior": flattenGlobalConfigurationInputLossBehavior(apiObject.InputLossBehavior), - "output_locking_mode": string(apiObject.OutputLockingMode), - "output_timing_source": string(apiObject.OutputTimingSource), - "support_low_framerate_inputs": string(apiObject.SupportLowFramerateInputs), + "initial_audio_gain": int(aws.ToInt32(in.InitialAudioGain)), + "input_end_action": string(in.InputEndAction), + "input_loss_behavior": flattenGlobalConfigurationInputLossBehavior(in.InputLossBehavior), + "output_locking_mode": string(in.OutputLockingMode), + "output_timing_source": string(in.OutputTimingSource), + "support_low_framerate_inputs": string(in.SupportLowFramerateInputs), } return []interface{}{m} @@ -6842,11 +6842,11 @@ func flattenGlobalConfigurationInputLossBehavior(in *types.InputLossBehavior) [] } m := map[string]interface{}{ - "black_frame_msec": int(in.BlackFrameMsec), + "black_frame_msec": int(aws.ToInt32(in.BlackFrameMsec)), "input_loss_image_color": aws.ToString(in.InputLossImageColor), "input_loss_image_slate": flattenInputLocation(in.InputLossImageSlate), "input_loss_image_type": string(in.InputLossImageType), - "repeat_frame_msec": int(in.RepeatFrameMsec), + "repeat_frame_msec": int(aws.ToInt32(in.RepeatFrameMsec)), } return []interface{}{m} @@ -6910,7 +6910,7 @@ func flattenCodecSettingsFrameCaptureSettings(in *types.FrameCaptureSettings) [] } m := map[string]interface{}{ - "capture_interval": int(in.CaptureInterval), + "capture_interval": int(aws.ToInt32(in.CaptureInterval)), "capture_interval_units": string(in.CaptureIntervalUnits), } @@ -6925,9 +6925,9 @@ func flattenCodecSettingsH264Settings(in *types.H264Settings) []interface{} { m := map[string]interface{}{ "adaptive_quantization": string(in.AdaptiveQuantization), "afd_signaling": string(in.AfdSignaling), - "bitrate": int(in.Bitrate), - "buf_fill_pct": int(in.BufFillPct), - "buf_size": int(in.BufSize), + "bitrate": int(aws.ToInt32(in.Bitrate)), + "buf_fill_pct": int(aws.ToInt32(in.BufFillPct)), + "buf_size": int(aws.ToInt32(in.BufSize)), "color_metadata": string(in.ColorMetadata), "entropy_encoding": string(in.EntropyEncoding), "filter_settings": flattenH264SettingsFilterSettings(in.FilterSettings), @@ -6935,28 +6935,28 @@ func flattenCodecSettingsH264Settings(in *types.H264Settings) []interface{} { "flicker_aq": string(in.FlickerAq), "force_field_pictures": string(in.ForceFieldPictures), "framerate_control": string(in.FramerateControl), - "framerate_denominator": int(in.FramerateDenominator), - "framerate_numerator": int(in.FramerateNumerator), + "framerate_denominator": int(aws.ToInt32(in.FramerateDenominator)), + "framerate_numerator": int(aws.ToInt32(in.FramerateNumerator)), "gop_b_reference": string(in.GopBReference), - "gop_closed_cadence": int(in.GopClosedCadence), - "gop_num_b_frames": int(in.GopNumBFrames), + "gop_closed_cadence": int(aws.ToInt32(in.GopClosedCadence)), + "gop_num_b_frames": int(aws.ToInt32(in.GopNumBFrames)), "gop_size": in.GopSize, "gop_size_units": string(in.GopSizeUnits), "level": string(in.Level), "look_ahead_rate_control": string(in.LookAheadRateControl), - "max_bitrate": int(in.MaxBitrate), - "min_i_interval": int(in.MinIInterval), - "num_ref_frames": int(in.NumRefFrames), + "max_bitrate": int(aws.ToInt32(in.MaxBitrate)), + "min_i_interval": int(aws.ToInt32(in.MinIInterval)), + "num_ref_frames": int(aws.ToInt32(in.NumRefFrames)), "par_control": string(in.ParControl), - "par_denominator": int(in.ParDenominator), - "par_numerator": int(in.ParNumerator), + "par_denominator": int(aws.ToInt32(in.ParDenominator)), + "par_numerator": int(aws.ToInt32(in.ParNumerator)), "profile": string(in.Profile), "quality_level": string(in.QualityLevel), - "qvbr_quality_level": int(in.QvbrQualityLevel), + "qvbr_quality_level": int(aws.ToInt32(in.QvbrQualityLevel)), "rate_control_mode": string(in.RateControlMode), "scan_type": string(in.ScanType), "scene_change_detect": string(in.SceneChangeDetect), - "slices": int(in.Slices), + "slices": int(aws.ToInt32(in.Slices)), "spatial_aq": string(in.SpatialAq), "subgop_length": string(in.SubgopLength), "syntax": string(in.Syntax), @@ -6998,33 +6998,33 @@ func flattenCodecSettingsH265Settings(in *types.H265Settings) []interface{} { } m := map[string]interface{}{ - "framerate_denominator": int(in.FramerateDenominator), - "framerate_numerator": int(in.FramerateNumerator), + "framerate_denominator": int(aws.ToInt32(in.FramerateDenominator)), + "framerate_numerator": int(aws.ToInt32(in.FramerateNumerator)), "adaptive_quantization": string(in.AdaptiveQuantization), "afd_signaling": string(in.AfdSignaling), "alternative_transfer_function": string(in.AlternativeTransferFunction), - "bitrate": int(in.Bitrate), - "buf_size": int(in.BufSize), + "bitrate": int(aws.ToInt32(in.Bitrate)), + "buf_size": int(aws.ToInt32(in.BufSize)), "color_metadata": string(in.ColorMetadata), "color_space_settings": flattenH265ColorSpaceSettings(in.ColorSpaceSettings), "filter_settings": flattenH265FilterSettings(in.FilterSettings), "fixed_afd": string(in.FixedAfd), "flicker_aq": string(in.FlickerAq), - "gop_closed_cadence": int(in.GopClosedCadence), + "gop_closed_cadence": int(aws.ToInt32(in.GopClosedCadence)), "gop_size": in.GopSize, "gop_size_units": string(in.GopSizeUnits), "level": string(in.Level), "look_ahead_rate_control": string(in.LookAheadRateControl), - "max_bitrate": int(in.MaxBitrate), - "min_i_interval": int(in.MinIInterval), - "par_denominator": int(in.ParDenominator), - "par_numerator": int(in.ParNumerator), + "max_bitrate": int(aws.ToInt32(in.MaxBitrate)), + "min_i_interval": int(aws.ToInt32(in.MinIInterval)), + "par_denominator": int(aws.ToInt32(in.ParDenominator)), + "par_numerator": int(aws.ToInt32(in.ParNumerator)), "profile": string(in.Profile), - "qvbr_quality_level": int(in.QvbrQualityLevel), + "qvbr_quality_level": int(aws.ToInt32(in.QvbrQualityLevel)), "rate_control_mode": string(in.RateControlMode), "scan_type": string(in.ScanType), "scene_change_detect": string(in.SceneChangeDetect), - "slices": int(in.Slices), + "slices": int(aws.ToInt32(in.Slices)), "tier": string(in.Tier), "timecode_burnin_settings": flattenH265TimecodeBurninSettings(in.TimecodeBurninSettings), "timecode_insertion": string(in.TimecodeInsertion), @@ -7063,8 +7063,8 @@ func flattenH265Hdr10Settings(in *types.Hdr10Settings) []interface{} { } m := map[string]interface{}{ - "max_cll": int(in.MaxCll), - "max_fall": int(in.MaxFall), + "max_cll": int(aws.ToInt32(in.MaxCll)), + "max_fall": int(aws.ToInt32(in.MaxFall)), } return []interface{}{m} @@ -7197,7 +7197,7 @@ func flattenCodecSettingsAc3Settings(in *types.Ac3Settings) []interface{} { "bitrate": in.Bitrate, "bitstream_mode": string(in.BitstreamMode), "coding_mode": string(in.CodingMode), - "dialnorm": int(in.Dialnorm), + "dialnorm": int(aws.ToInt32(in.Dialnorm)), "drc_profile": string(in.DrcProfile), "lfe_filter": string(in.LfeFilter), "metadata_control": string(in.MetadataControl), @@ -7212,13 +7212,13 @@ func flattenCodecSettingsEac3AtmosSettings(in *types.Eac3AtmosSettings) []interf } m := map[string]interface{}{ - "bitrate": float32(in.Bitrate), + "bitrate": float32(aws.ToFloat64(in.Bitrate)), "coding_mode": string(in.CodingMode), - "dialnorm": int(in.Dialnorm), + "dialnorm": int(aws.ToInt32(in.Dialnorm)), "drc_line": string(in.DrcLine), "drc_rf": string(in.DrcRf), - "height_trim": float32(in.HeightTrim), - "surround_trim": float32(in.SurroundTrim), + "height_trim": float32(aws.ToFloat64(in.HeightTrim)), + "surround_trim": float32(aws.ToFloat64(in.SurroundTrim)), } return []interface{}{m} @@ -7231,19 +7231,19 @@ func flattenCodecSettingsEac3Settings(in *types.Eac3Settings) []interface{} { m := map[string]interface{}{ "attenuation_control": string(in.AttenuationControl), - "bitrate": float32(in.Bitrate), + "bitrate": float32(aws.ToFloat64(in.Bitrate)), "bitstream_mode": string(in.BitstreamMode), "coding_mode": string(in.CodingMode), "dc_filter": string(in.DcFilter), - "dialnorm": int(in.Dialnorm), + "dialnorm": int(aws.ToInt32(in.Dialnorm)), "drc_line": string(in.DrcLine), "drc_rf": string(in.DrcRf), "lfe_control": string(in.LfeControl), "lfe_filter": string(in.LfeFilter), - "lo_ro_center_mix_level": float32(in.LoRoCenterMixLevel), - "lo_ro_surround_mix_level": float32(in.LoRoSurroundMixLevel), - "lt_rt_center_mix_level": float32(in.LtRtCenterMixLevel), - "lt_rt_surround_mix_level": float32(in.LtRtSurroundMixLevel), + "lo_ro_center_mix_level": float32(aws.ToFloat64(in.LoRoCenterMixLevel)), + "lo_ro_surround_mix_level": float32(aws.ToFloat64(in.LoRoSurroundMixLevel)), + "lt_rt_center_mix_level": float32(aws.ToFloat64(in.LtRtCenterMixLevel)), + "lt_rt_surround_mix_level": float32(aws.ToFloat64(in.LtRtSurroundMixLevel)), "metadata_control": string(in.MetadataControl), "passthrough_control": string(in.PassthroughControl), "phase_control": string(in.PhaseControl), @@ -7261,9 +7261,9 @@ func flattenCodecSettingsMp2Settings(in *types.Mp2Settings) []interface{} { } m := map[string]interface{}{ - "bitrate": float32(in.Bitrate), + "bitrate": float32(aws.ToFloat64(in.Bitrate)), "coding_mode": string(in.CodingMode), - "sample_rate": float32(in.SampleRate), + "sample_rate": float32(aws.ToFloat64(in.SampleRate)), } return []interface{}{m} @@ -7275,9 +7275,9 @@ func flattenCodecSettingsWavSettings(in *types.WavSettings) []interface{} { } m := map[string]interface{}{ - "bit_depth": float32(in.BitDepth), + "bit_depth": float32(aws.ToFloat64(in.BitDepth)), "coding_mode": string(in.CodingMode), - "sample_rate": float32(in.SampleRate), + "sample_rate": float32(aws.ToFloat64(in.SampleRate)), } return []interface{}{m} @@ -7290,8 +7290,8 @@ func flattenAudioDescriptionsRemixSettings(in *types.RemixSettings) []interface{ m := map[string]interface{}{ "channel_mappings": flattenChannelMappings(in.ChannelMappings), - "channels_in": int(in.ChannelsIn), - "channels_out": int(in.ChannelsOut), + "channels_in": int(aws.ToInt32(in.ChannelsIn)), + "channels_out": int(aws.ToInt32(in.ChannelsOut)), } return []interface{}{m} @@ -7306,7 +7306,7 @@ func flattenChannelMappings(in []types.AudioChannelMapping) []interface{} { for _, item := range in { m := map[string]interface{}{ "input_channel_levels": flattenInputChannelLevels(item.InputChannelLevels), - "output_channel": int(item.OutputChannel), + "output_channel": int(aws.ToInt32(item.OutputChannel)), } out = append(out, m) @@ -7323,8 +7323,8 @@ func flattenInputChannelLevels(in []types.InputChannelLevel) []interface{} { var out []interface{} for _, item := range in { m := map[string]interface{}{ - "gain": int(item.Gain), - "input_channel": int(item.InputChannel), + "gain": int(aws.ToInt32(item.Gain)), + "input_channel": int(aws.ToInt32(item.InputChannel)), } out = append(out, m) @@ -7354,7 +7354,7 @@ func flattenNielsenNaesIiNwSettings(in *types.NielsenNaesIiNw) []interface{} { m := map[string]interface{}{ "check_digit_string": aws.ToString(in.CheckDigitString), - "sid": float32(in.Sid), + "sid": float32(aws.ToFloat64(in.Sid)), } return []interface{}{m} diff --git a/internal/service/medialive/multiplex.go b/internal/service/medialive/multiplex.go index 4c72c8b120b..b0f35bbb6ad 100644 --- a/internal/service/medialive/multiplex.go +++ b/internal/service/medialive/multiplex.go @@ -413,16 +413,16 @@ func expandMultiplexSettings(tfList []interface{}) *types.MultiplexSettings { s := types.MultiplexSettings{} if v, ok := m["transport_stream_bitrate"]; ok { - s.TransportStreamBitrate = int32(v.(int)) + s.TransportStreamBitrate = aws.Int32(int32(v.(int))) } if v, ok := m["transport_stream_id"]; ok { - s.TransportStreamId = int32(v.(int)) + s.TransportStreamId = aws.Int32(int32(v.(int))) } if val, ok := m["maximum_video_buffer_delay_milliseconds"]; ok { - s.MaximumVideoBufferDelayMilliseconds = int32(val.(int)) + s.MaximumVideoBufferDelayMilliseconds = aws.Int32(int32(val.(int))) } if val, ok := m["transport_stream_reserved_bitrate"]; ok { - s.TransportStreamReservedBitrate = int32(val.(int)) + s.TransportStreamReservedBitrate = aws.Int32(int32(val.(int))) } return &s diff --git a/internal/service/medialive/multiplex_program.go b/internal/service/medialive/multiplex_program.go index 4ebc039c22c..08a3b9ce1c2 100644 --- a/internal/service/medialive/multiplex_program.go +++ b/internal/service/medialive/multiplex_program.go @@ -406,7 +406,7 @@ func (mps multiplexProgramSettingsObject) expand(ctx context.Context) (*mltypes. data := mps[0] l := &mltypes.MultiplexProgramSettings{ - ProgramNumber: int32(data.ProgramNumber.ValueInt64()), + ProgramNumber: flex.Int32FromFramework(ctx, data.ProgramNumber), PreferredChannelPipeline: mltypes.PreferredChannelPipeline(data.PreferredChannelPipeline.ValueString()), } @@ -458,27 +458,27 @@ func (sd serviceDescriptorObject) expand(ctx context.Context) *mltypes.Multiplex type videoSettingsObject []videoSettings -func (vs videoSettingsObject) expand(_ context.Context) *mltypes.MultiplexVideoSettings { +func (vs videoSettingsObject) expand(ctx context.Context) *mltypes.MultiplexVideoSettings { if len(vs) == 0 { return nil } return &mltypes.MultiplexVideoSettings{ - ConstantBitrate: int32(vs[0].ConstantBitrate.ValueInt64()), + ConstantBitrate: flex.Int32FromFramework(ctx, vs[0].ConstantBitrate), } } type statmuxSettingsObject []statmuxSettings -func (sms statmuxSettingsObject) expand(_ context.Context) *mltypes.MultiplexStatmuxVideoSettings { +func (sms statmuxSettingsObject) expand(ctx context.Context) *mltypes.MultiplexStatmuxVideoSettings { if len(sms) == 0 { return nil } return &mltypes.MultiplexStatmuxVideoSettings{ - MaximumBitrate: int32(sms[0].MaximumBitrate.ValueInt64()), - MinimumBitrate: int32(sms[0].MinimumBitrate.ValueInt64()), - Priority: int32(sms[0].Priority.ValueInt64()), + MaximumBitrate: flex.Int32FromFramework(ctx, sms[0].MaximumBitrate), + MinimumBitrate: flex.Int32FromFramework(ctx, sms[0].MinimumBitrate), + Priority: flex.Int32FromFramework(ctx, sms[0].Priority), } } @@ -515,7 +515,7 @@ func flattenMultiplexProgramSettings(ctx context.Context, mps *mltypes.Multiplex } attrs := map[string]attr.Value{} - attrs["program_number"] = types.Int64Value(int64(mps.ProgramNumber)) + attrs["program_number"] = flex.Int32ToFramework(ctx, mps.ProgramNumber) attrs["preferred_channel_pipeline"] = flex.StringValueToFrameworkLegacy(ctx, mps.PreferredChannelPipeline) attrs["service_descriptor"] = flattenServiceDescriptor(ctx, mps.ServiceDescriptor) attrs["video_settings"] = flattenVideoSettings(ctx, mps.VideoSettings) @@ -541,7 +541,7 @@ func flattenServiceDescriptor(ctx context.Context, sd *mltypes.MultiplexProgramS return types.ListValueMust(elemType, []attr.Value{vals}) } -func flattenStatMuxSettings(_ context.Context, mps *mltypes.MultiplexStatmuxVideoSettings) types.List { +func flattenStatMuxSettings(ctx context.Context, mps *mltypes.MultiplexStatmuxVideoSettings) types.List { elemType := types.ObjectType{AttrTypes: statmuxAttrs} if mps == nil { @@ -549,9 +549,9 @@ func flattenStatMuxSettings(_ context.Context, mps *mltypes.MultiplexStatmuxVide } attrs := map[string]attr.Value{} - attrs["minimum_bitrate"] = types.Int64Value(int64(mps.MinimumBitrate)) - attrs["maximum_bitrate"] = types.Int64Value(int64(mps.MaximumBitrate)) - attrs["priority"] = types.Int64Value(int64(mps.Priority)) + attrs["minimum_bitrate"] = flex.Int32ToFramework(ctx, mps.MinimumBitrate) + attrs["maximum_bitrate"] = flex.Int32ToFramework(ctx, mps.MaximumBitrate) + attrs["priority"] = flex.Int32ToFramework(ctx, mps.Priority) vals := types.ObjectValueMust(statmuxAttrs, attrs) @@ -566,7 +566,7 @@ func flattenVideoSettings(ctx context.Context, mps *mltypes.MultiplexVideoSettin } attrs := map[string]attr.Value{} - attrs["constant_bitrate"] = types.Int64Value(int64(mps.ConstantBitrate)) + attrs["constant_bitrate"] = flex.Int32ToFramework(ctx, mps.ConstantBitrate) attrs["statmux_settings"] = flattenStatMuxSettings(ctx, mps.StatmuxSettings) vals := types.ObjectValueMust(videoSettingsAttrs, attrs) diff --git a/internal/service/rds/blue_green.go b/internal/service/rds/blue_green.go index 1ca80d93e93..5f046f18f95 100644 --- a/internal/service/rds/blue_green.go +++ b/internal/service/rds/blue_green.go @@ -99,7 +99,7 @@ func newInstanceHandler(conn *rds_sdkv2.Client) *instanceHandler { func (h *instanceHandler) precondition(ctx context.Context, d *schema.ResourceData) error { needsPreConditions := false input := &rds_sdkv2.ModifyDBInstanceInput{ - ApplyImmediately: true, + ApplyImmediately: aws.Bool(true), DBInstanceIdentifier: aws.String(d.Get("identifier").(string)), } @@ -142,7 +142,7 @@ func (h *instanceHandler) createBlueGreenInput(d *schema.ResourceData) *rds_sdkv func (h *instanceHandler) modifyTarget(ctx context.Context, identifier string, d *schema.ResourceData, timeout time.Duration, operation string) error { modifyInput := &rds_sdkv2.ModifyDBInstanceInput{ - ApplyImmediately: true, + ApplyImmediately: aws.Bool(true), DBInstanceIdentifier: aws.String(identifier), } diff --git a/internal/service/rds/export_task.go b/internal/service/rds/export_task.go index f1bfec73158..4640ba32368 100644 --- a/internal/service/rds/export_task.go +++ b/internal/service/rds/export_task.go @@ -372,7 +372,7 @@ func (rd *resourceExportTaskData) refreshFromOutput(ctx context.Context, out *aw rd.FailureCause = flex.StringToFramework(ctx, out.FailureCause) rd.IAMRoleArn = flex.StringToFramework(ctx, out.IamRoleArn) rd.KMSKeyID = flex.StringToFramework(ctx, out.KmsKeyId) - rd.PercentProgress = types.Int64Value(int64(out.PercentProgress)) + rd.PercentProgress = types.Int64Value(int64(aws.ToInt32(out.PercentProgress))) rd.S3BucketName = flex.StringToFramework(ctx, out.S3Bucket) rd.S3Prefix = flex.StringToFramework(ctx, out.S3Prefix) rd.SnapshotTime = timeToFramework(ctx, out.SnapshotTime) diff --git a/internal/service/rds/instance.go b/internal/service/rds/instance.go index 70057eee39e..d0a08c19a35 100644 --- a/internal/service/rds/instance.go +++ b/internal/service/rds/instance.go @@ -1934,7 +1934,7 @@ func resourceInstanceUpdate(ctx context.Context, d *schema.ResourceData, meta in } if d.Get("deletion_protection").(bool) { input := &rds_sdkv2.ModifyDBInstanceInput{ - ApplyImmediately: true, + ApplyImmediately: aws.Bool(true), DBInstanceIdentifier: aws.String(sourceARN.Identifier), DeletionProtection: aws.Bool(false), } @@ -1945,7 +1945,7 @@ func resourceInstanceUpdate(ctx context.Context, d *schema.ResourceData, meta in } deleteInput := &rds_sdkv2.DeleteDBInstanceInput{ DBInstanceIdentifier: aws.String(sourceARN.Identifier), - SkipFinalSnapshot: true, + SkipFinalSnapshot: aws.Bool(true), } _, err = tfresource.RetryWhen(ctx, 5*time.Minute, func() (any, error) { @@ -1984,12 +1984,14 @@ func resourceInstanceUpdate(ctx context.Context, d *schema.ResourceData, meta in o, _ := d.GetChange("identifier") oldID = o.(string) } + + applyImmediately := d.Get("apply_immediately").(bool) input := &rds_sdkv2.ModifyDBInstanceInput{ - ApplyImmediately: d.Get("apply_immediately").(bool), + ApplyImmediately: aws.Bool(applyImmediately), DBInstanceIdentifier: aws.String(oldID), } - if !input.ApplyImmediately { + if !applyImmediately { log.Println("[INFO] Only settings updating, instance changes will be applied in next maintenance window") } @@ -1997,7 +1999,7 @@ func resourceInstanceUpdate(ctx context.Context, d *schema.ResourceData, meta in if d.HasChange("engine_version") { input.EngineVersion = aws.String(d.Get("engine_version").(string)) - input.AllowMajorVersionUpgrade = d.Get("allow_major_version_upgrade").(bool) + input.AllowMajorVersionUpgrade = aws.Bool(d.Get("allow_major_version_upgrade").(bool)) // if we were to make life easier for practitioners, we could loop through // replicas at this point to update them first, prior to dbInstanceModify() // for the source diff --git a/internal/service/s3control/storage_lens_configuration.go b/internal/service/s3control/storage_lens_configuration.go index 695e0098115..169fd31f7a8 100644 --- a/internal/service/s3control/storage_lens_configuration.go +++ b/internal/service/s3control/storage_lens_configuration.go @@ -846,11 +846,11 @@ func expandSelectionCriteria(tfMap map[string]interface{}) *types.SelectionCrite } if v, ok := tfMap["max_depth"].(int); ok && v != 0 { - apiObject.MaxDepth = int32(v) + apiObject.MaxDepth = aws.Int32(int32(v)) } if v, ok := tfMap["min_storage_bytes_percentage"].(float64); ok && v != 0.0 { - apiObject.MinStorageBytesPercentage = v + apiObject.MinStorageBytesPercentage = aws.Float64(v) } return apiObject @@ -1185,8 +1185,8 @@ func flattenSelectionCriteria(apiObject *types.SelectionCriteria) map[string]int tfMap["delimiter"] = aws.ToString(v) } - tfMap["max_depth"] = apiObject.MaxDepth - tfMap["min_storage_bytes_percentage"] = apiObject.MinStorageBytesPercentage + tfMap["max_depth"] = aws.ToInt32(apiObject.MaxDepth) + tfMap["min_storage_bytes_percentage"] = aws.ToFloat64(apiObject.MinStorageBytesPercentage) return tfMap } diff --git a/internal/service/timestreamwrite/table.go b/internal/service/timestreamwrite/table.go index 7f83c5909ff..aca1e2521a5 100644 --- a/internal/service/timestreamwrite/table.go +++ b/internal/service/timestreamwrite/table.go @@ -353,11 +353,11 @@ func expandRetentionProperties(tfList []interface{}) *types.RetentionProperties apiObject := &types.RetentionProperties{} if v, ok := tfMap["magnetic_store_retention_period_in_days"].(int); ok { - apiObject.MagneticStoreRetentionPeriodInDays = int64(v) + apiObject.MagneticStoreRetentionPeriodInDays = aws.Int64(int64(v)) } if v, ok := tfMap["memory_store_retention_period_in_hours"].(int); ok { - apiObject.MemoryStoreRetentionPeriodInHours = int64(v) + apiObject.MemoryStoreRetentionPeriodInHours = aws.Int64(int64(v)) } return apiObject @@ -369,8 +369,8 @@ func flattenRetentionProperties(apiObject *types.RetentionProperties) []interfac } tfMap := map[string]interface{}{ - "magnetic_store_retention_period_in_days": apiObject.MagneticStoreRetentionPeriodInDays, - "memory_store_retention_period_in_hours": apiObject.MemoryStoreRetentionPeriodInHours, + "magnetic_store_retention_period_in_days": aws.ToInt64(apiObject.MagneticStoreRetentionPeriodInDays), + "memory_store_retention_period_in_hours": aws.ToInt64(apiObject.MemoryStoreRetentionPeriodInHours), } return []interface{}{tfMap} diff --git a/internal/service/xray/sampling_rule.go b/internal/service/xray/sampling_rule.go index 01885f82c21..fefdc6ceba0 100644 --- a/internal/service/xray/sampling_rule.go +++ b/internal/service/xray/sampling_rule.go @@ -122,14 +122,14 @@ func resourceSamplingRuleCreate(ctx context.Context, d *schema.ResourceData, met FixedRate: d.Get("fixed_rate").(float64), Host: aws.String(d.Get("host").(string)), HTTPMethod: aws.String(d.Get("http_method").(string)), - Priority: int32(d.Get("priority").(int)), + Priority: aws.Int32(int32(d.Get("priority").(int))), ReservoirSize: int32(d.Get("reservoir_size").(int)), ResourceARN: aws.String(d.Get("resource_arn").(string)), RuleName: aws.String(name), ServiceName: aws.String(d.Get("service_name").(string)), ServiceType: aws.String(d.Get("service_type").(string)), URLPath: aws.String(d.Get("url_path").(string)), - Version: int32(d.Get("version").(int)), + Version: aws.Int32(int32(d.Get("version").(int))), } if v, ok := d.GetOk("attributes"); ok && len(v.(map[string]interface{})) > 0 {