Skip to content

Commit

Permalink
Regenerated Clients
Browse files Browse the repository at this point in the history
  • Loading branch information
AWS SDK for Go v2 automation user committed Mar 25, 2024
1 parent c27292a commit 08fdcf7
Show file tree
Hide file tree
Showing 50 changed files with 1,844 additions and 253 deletions.
8 changes: 8 additions & 0 deletions .changelog/1c87ef715df04c2e87d8eada12e3328d.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "1c87ef71-5df0-4c2e-87d8-eada12e3328d",
"type": "feature",
"description": "Exposing TileMedia H265 options",
"modules": [
"service/medialive"
]
}
8 changes: 8 additions & 0 deletions .changelog/7b3afd396d4741a1b441cae094740eaf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "7b3afd39-6d47-41a1-b441-cae094740eaf",
"type": "feature",
"description": "Supporting GitLab and GitLab Self Managed as source types in AWS CodeBuild.",
"modules": [
"service/codebuild"
]
}
8 changes: 8 additions & 0 deletions .changelog/ac17563ce64d4cc09a65ffe717f17825.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "ac17563c-e64d-4cc0-9a65-ffe717f17825",
"type": "feature",
"description": "AWS Global Accelerator now supports cross-account sharing for bring your own IP addresses.",
"modules": [
"service/globalaccelerator"
]
}
8 changes: 8 additions & 0 deletions .changelog/c7d9272fe2fc49a48ff58c015c7c05e2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "c7d9272f-e2fc-49a4-8ff5-8c015c7c05e2",
"type": "documentation",
"description": "Documentation only update for Amazon ECS.",
"modules": [
"service/ecs"
]
}
8 changes: 8 additions & 0 deletions .changelog/cd3c2ae37d9f4d53b45b08351b506295.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "cd3c2ae3-7d9f-4d53-b45b-08351b506295",
"type": "feature",
"description": "Introduced support for the following new instance types on SageMaker Studio for JupyterLab and CodeEditor applications: m6i, m6id, m7i, c6i, c6id, c7i, r6i, r6id, r7i, and p5",
"modules": [
"service/sagemaker"
]
}
8 changes: 8 additions & 0 deletions .changelog/d84d7a7850c944cd99ca98b7c999354e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "d84d7a78-50c9-44cd-99ca-98b7c999354e",
"type": "feature",
"description": "This release increases the number of supported job template parameters from 20 to 100.",
"modules": [
"service/emrcontainers"
]
}
8 changes: 8 additions & 0 deletions .changelog/dce47ca05a5a40dfa8601c6dda8838f3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "dce47ca0-5a5a-40df-a860-1c6dda8838f3",
"type": "feature",
"description": "Added support for ModifyInstanceMetadataDefaults and GetInstanceMetadataDefaults to set Instance Metadata Service account defaults",
"modules": [
"service/ec2"
]
}
10 changes: 0 additions & 10 deletions feature/dynamodbstreams/attributevalue/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,11 +714,6 @@ func (e *Encoder) encodeScalar(v reflect.Value, fieldTag tag) (types.AttributeVa
}

func (e *Encoder) encodeNumber(v reflect.Value) (types.AttributeValue, error) {
if av, err := tryMarshaler(v); err != nil {
return nil, err
} else if av != nil {
return av, nil
}

var out string
switch v.Kind() {
Expand All @@ -742,11 +737,6 @@ func (e *Encoder) encodeNumber(v reflect.Value) (types.AttributeValue, error) {
}

func (e *Encoder) encodeString(v reflect.Value) (types.AttributeValue, error) {
if av, err := tryMarshaler(v); err != nil {
return nil, err
} else if av != nil {
return av, nil
}

switch v.Kind() {
case reflect.String:
Expand Down
91 changes: 91 additions & 0 deletions feature/dynamodbstreams/attributevalue/encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,97 @@ func TestMarshalMashaler(t *testing.T) {
}
}

type customBoolStringMarshaler string

func (m customBoolStringMarshaler) MarshalDynamoDBStreamsAttributeValue() (types.AttributeValue, error) {

if b, err := strconv.ParseBool(string(m)); err == nil {
return &types.AttributeValueMemberBOOL{Value: b}, nil
}

return &types.AttributeValueMemberS{Value: string(m)}, nil
}

func TestCustomStringMarshaler(t *testing.T) {
cases := []struct {
expected types.AttributeValue
input string
}{
{
expected: &types.AttributeValueMemberBOOL{Value: false},
input: "false",
},
{
expected: &types.AttributeValueMemberBOOL{Value: true},
input: "true",
},
{
expected: &types.AttributeValueMemberS{Value: "ABC"},
input: "ABC",
},
}

for _, testCase := range cases {
input := customBoolStringMarshaler(testCase.input)
actual, err := Marshal(input)
if err != nil {
t.Errorf("got unexpected error %v for input %v", err, testCase.input)
}
if diff := cmpDiff(testCase.expected, actual); len(diff) != 0 {
t.Errorf("expected match but got:%s", diff)
}
}
}

type customGradeMarshaler uint

func (m customGradeMarshaler) MarshalDynamoDBStreamsAttributeValue() (types.AttributeValue, error) {
if int(m) > 100 {
return nil, fmt.Errorf("grade cant be larger then 100")
}
return &types.AttributeValueMemberN{Value: strconv.FormatUint(uint64(m), 10)}, nil
}

func TestCustomNumberMarshaler(t *testing.T) {
cases := []struct {
expectedErr bool
input uint
expected types.AttributeValue
}{
{
expectedErr: false,
input: 50,
expected: &types.AttributeValueMemberN{Value: "50"},
},
{
expectedErr: false,
input: 90,
expected: &types.AttributeValueMemberN{Value: "90"},
},
{
expectedErr: true,
input: 150,
expected: nil,
},
}

for _, testCase := range cases {
input := customGradeMarshaler(testCase.input)
actual, err := Marshal(customGradeMarshaler(input))
if testCase.expectedErr && err == nil {
t.Errorf("expected error but got nil for input %v", testCase.input)
continue
}
if !testCase.expectedErr && err != nil {
t.Errorf("got unexpected error %v for input %v", err, testCase.input)
continue
}
if diff := cmpDiff(testCase.expected, actual); len(diff) != 0 {
t.Errorf("expected match but got:%s", diff)
}
}
}

type testOmitEmptyElemListStruct struct {
Values []string `dynamodbav:",omitemptyelem"`
}
Expand Down
54 changes: 54 additions & 0 deletions feature/dynamodbstreams/attributevalue/marshaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,60 @@ func BenchmarkMarshalOneMember(b *testing.B) {
})
}

func BenchmarkList20Ints(b *testing.B) {
input := []int{}
for i := 0; i < 20; i++ {
input = append(input, i)
}

b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
_, err := Marshal(input)
if err != nil {
b.Fatal(err)
}
}
})
}

func BenchmarkStruct10Fields(b *testing.B) {

type struct10Fields struct {
Field1 int
Field2 string
Field3 int
Field4 string
Field5 string
Field6 string
Field7 int
Field8 string
Field9 int
Field10 int
}

input := struct10Fields{
Field1: 10,
Field2: "ASD",
Field3: 70,
Field4: "qqqqq",
Field5: "AAA",
Field6: "bbb",
Field7: 63,
Field8: "aa",
Field9: 10,
Field10: 63,
}

b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
_, err := Marshal(input)
if err != nil {
b.Fatal(err)
}
}
})
}

func BenchmarkMarshalTwoMembers(b *testing.B) {
fieldCache = &fieldCacher{}

Expand Down
9 changes: 9 additions & 0 deletions service/codebuild/deserializers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 23 additions & 11 deletions service/codebuild/types/enums.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 08fdcf7

Please sign in to comment.