vendor: update all dependencies to latest versions
This commit is contained in:
parent
911d121bb9
commit
b017fcfe9a
3048 changed files with 537057 additions and 189681 deletions
271
vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_test.go
generated
vendored
271
vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_test.go
generated
vendored
|
@ -24,7 +24,6 @@ import (
|
|||
"github.com/aws/aws-sdk-go/private/protocol/ec2query"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
|
||||
"github.com/aws/aws-sdk-go/private/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var _ bytes.Buffer // always import bytes
|
||||
|
@ -108,19 +107,18 @@ const opInputService1TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService1TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService1TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService1TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService1TestCaseOperation1 for more information on using the InputService1TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService1TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService1TestCaseOperation1Request(params)
|
||||
|
@ -262,19 +260,18 @@ const opInputService2TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService2TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService2TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService2TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService2TestCaseOperation1 for more information on using the InputService2TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService2TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService2TestCaseOperation1Request(params)
|
||||
|
@ -424,19 +421,18 @@ const opInputService3TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService3TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService3TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService3TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService3TestCaseOperation1 for more information on using the InputService3TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService3TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService3TestCaseOperation1Request(params)
|
||||
|
@ -582,19 +578,18 @@ const opInputService4TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService4TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService4TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService4TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService4TestCaseOperation1 for more information on using the InputService4TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService4TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService4TestCaseOperation1Request(params)
|
||||
|
@ -728,19 +723,18 @@ const opInputService5TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService5TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService5TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService5TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService5TestCaseOperation1 for more information on using the InputService5TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService5TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService5TestCaseOperation1Request(params)
|
||||
|
@ -874,19 +868,18 @@ const opInputService6TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService6TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService6TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService6TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService6TestCaseOperation1 for more information on using the InputService6TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService6TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService6TestCaseOperation1Request(params)
|
||||
|
@ -1020,19 +1013,18 @@ const opInputService7TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService7TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService7TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService7TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService7TestCaseOperation1 for more information on using the InputService7TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService7TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService7TestCaseOperation1Request(params)
|
||||
|
@ -1167,19 +1159,18 @@ const opInputService8TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService8TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService8TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService8TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService8TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService8TestCaseOperation1 for more information on using the InputService8TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService8TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService8TestCaseOperation1Request(params)
|
||||
|
@ -1313,19 +1304,18 @@ const opInputService9TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService9TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService9TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService9TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService9TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService9TestCaseOperation1 for more information on using the InputService9TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService9TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService9TestCaseOperation1Request(params)
|
||||
|
@ -1384,19 +1374,18 @@ const opInputService9TestCaseOperation2 = "OperationName"
|
|||
|
||||
// InputService9TestCaseOperation2Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService9TestCaseOperation2 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService9TestCaseOperation2 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService9TestCaseOperation2 method directly
|
||||
// instead.
|
||||
// See InputService9TestCaseOperation2 for more information on using the InputService9TestCaseOperation2
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService9TestCaseOperation2Request method.
|
||||
// req, resp := client.InputService9TestCaseOperation2Request(params)
|
||||
|
@ -1486,10 +1475,14 @@ func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
ec2query.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertQuery(t, `Action=OperationName&Bar=val2&Foo=val1&Version=2014-01-01`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1512,10 +1505,14 @@ func TestInputService2ProtocolTestStructureWithLocationNameAndQueryNameAppliedTo
|
|||
|
||||
// build request
|
||||
ec2query.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertQuery(t, `Action=OperationName&BarLocationName=val2&Foo=val1&Version=2014-01-01&yuckQueryName=val3`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1538,10 +1535,14 @@ func TestInputService3ProtocolTestNestedStructureMembersCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
ec2query.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertQuery(t, `Action=OperationName&Struct.Scalar=foo&Version=2014-01-01`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1566,10 +1567,14 @@ func TestInputService4ProtocolTestListTypesCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
ec2query.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertQuery(t, `Action=OperationName&ListArg.1=foo&ListArg.2=bar&ListArg.3=baz&Version=2014-01-01`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1594,10 +1599,14 @@ func TestInputService5ProtocolTestListWithLocationNameAppliedToMemberCase1(t *te
|
|||
|
||||
// build request
|
||||
ec2query.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertQuery(t, `Action=OperationName&ListMemberName.1=a&ListMemberName.2=b&ListMemberName.3=c&Version=2014-01-01`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1622,10 +1631,14 @@ func TestInputService6ProtocolTestListWithLocationNameAndQueryNameCase1(t *testi
|
|||
|
||||
// build request
|
||||
ec2query.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertQuery(t, `Action=OperationName&ListQueryName.1=a&ListQueryName.2=b&ListQueryName.3=c&Version=2014-01-01`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1646,10 +1659,14 @@ func TestInputService7ProtocolTestBase64EncodedBlobsCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
ec2query.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertQuery(t, `Action=OperationName&BlobArg=Zm9v&Version=2014-01-01`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1670,10 +1687,14 @@ func TestInputService8ProtocolTestTimestampValuesCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
ec2query.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertQuery(t, `Action=OperationName&TimeArg=2015-01-25T08%3A00%3A00Z&Version=2014-01-01`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1694,10 +1715,14 @@ func TestInputService9ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
ec2query.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertQuery(t, `Action=OperationName&Token=abc123&Version=2014-01-01`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1716,10 +1741,14 @@ func TestInputService9ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) {
|
|||
|
||||
// build request
|
||||
ec2query.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertQuery(t, `Action=OperationName&Token=00000000-0000-4000-8000-000000000000&Version=2014-01-01`, util.Trim(string(body)))
|
||||
|
||||
|
|
332
vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal_test.go
generated
vendored
332
vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal_test.go
generated
vendored
|
@ -24,7 +24,6 @@ import (
|
|||
"github.com/aws/aws-sdk-go/private/protocol/ec2query"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
|
||||
"github.com/aws/aws-sdk-go/private/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var _ bytes.Buffer // always import bytes
|
||||
|
@ -108,19 +107,18 @@ const opOutputService1TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService1TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService1TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService1TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService1TestCaseOperation1 for more information on using the OutputService1TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService1TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService1TestCaseOperation1Request(params)
|
||||
|
@ -308,19 +306,18 @@ const opOutputService2TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService2TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService2TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService2TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService2TestCaseOperation1 for more information on using the OutputService2TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService2TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService2TestCaseOperation1Request(params)
|
||||
|
@ -453,19 +450,18 @@ const opOutputService3TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService3TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService3TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService3TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService3TestCaseOperation1 for more information on using the OutputService3TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService3TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService3TestCaseOperation1Request(params)
|
||||
|
@ -597,19 +593,18 @@ const opOutputService4TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService4TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService4TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService4TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService4TestCaseOperation1 for more information on using the OutputService4TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService4TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService4TestCaseOperation1Request(params)
|
||||
|
@ -741,19 +736,18 @@ const opOutputService5TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService5TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService5TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService5TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService5TestCaseOperation1 for more information on using the OutputService5TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService5TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService5TestCaseOperation1Request(params)
|
||||
|
@ -885,19 +879,18 @@ const opOutputService6TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService6TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService6TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService6TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService6TestCaseOperation1 for more information on using the OutputService6TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService6TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService6TestCaseOperation1Request(params)
|
||||
|
@ -1041,19 +1034,18 @@ const opOutputService7TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService7TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService7TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService7TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService7TestCaseOperation1 for more information on using the OutputService7TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService7TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService7TestCaseOperation1Request(params)
|
||||
|
@ -1185,19 +1177,18 @@ const opOutputService8TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService8TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService8TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService8TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService8TestCaseOperation1 for more information on using the OutputService8TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService8TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService8TestCaseOperation1Request(params)
|
||||
|
@ -1329,19 +1320,18 @@ const opOutputService9TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService9TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService9TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService9TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService9TestCaseOperation1 for more information on using the OutputService9TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService9TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService9TestCaseOperation1Request(params)
|
||||
|
@ -1426,18 +1416,38 @@ func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
ec2query.UnmarshalMeta(req)
|
||||
ec2query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "a", *out.Char)
|
||||
assert.Equal(t, 1.3, *out.Double)
|
||||
assert.Equal(t, false, *out.FalseBool)
|
||||
assert.Equal(t, 1.2, *out.Float)
|
||||
assert.Equal(t, int64(200), *out.Long)
|
||||
assert.Equal(t, int64(123), *out.Num)
|
||||
assert.Equal(t, "myname", *out.Str)
|
||||
assert.Equal(t, true, *out.TrueBool)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "a", *out.Char; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.3, *out.Double; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := false, *out.FalseBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.2, *out.Float; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(200), *out.Long; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(123), *out.Num; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "myname", *out.Str; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := true, *out.TrueBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1453,11 +1463,17 @@ func TestOutputService2ProtocolTestBlobCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
ec2query.UnmarshalMeta(req)
|
||||
ec2query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "value", string(out.Blob))
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "value", string(out.Blob); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1473,12 +1489,20 @@ func TestOutputService3ProtocolTestListsCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
ec2query.UnmarshalMeta(req)
|
||||
ec2query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", *out.ListMember[0])
|
||||
assert.Equal(t, "123", *out.ListMember[1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "123", *out.ListMember[1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1494,12 +1518,20 @@ func TestOutputService4ProtocolTestListWithCustomMemberNameCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
ec2query.UnmarshalMeta(req)
|
||||
ec2query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", *out.ListMember[0])
|
||||
assert.Equal(t, "123", *out.ListMember[1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "123", *out.ListMember[1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1515,12 +1547,20 @@ func TestOutputService5ProtocolTestFlattenedListCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
ec2query.UnmarshalMeta(req)
|
||||
ec2query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", *out.ListMember[0])
|
||||
assert.Equal(t, "123", *out.ListMember[1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "123", *out.ListMember[1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1536,12 +1576,20 @@ func TestOutputService6ProtocolTestNormalMapCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
ec2query.UnmarshalMeta(req)
|
||||
ec2query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "bam", *out.Map["baz"].Foo)
|
||||
assert.Equal(t, "bar", *out.Map["qux"].Foo)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "bam", *out.Map["baz"].Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "bar", *out.Map["qux"].Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1557,12 +1605,20 @@ func TestOutputService7ProtocolTestFlattenedMapCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
ec2query.UnmarshalMeta(req)
|
||||
ec2query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "bam", *out.Map["baz"])
|
||||
assert.Equal(t, "bar", *out.Map["qux"])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "bam", *out.Map["baz"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "bar", *out.Map["qux"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1578,12 +1634,20 @@ func TestOutputService8ProtocolTestNamedMapCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
ec2query.UnmarshalMeta(req)
|
||||
ec2query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "bam", *out.Map["baz"])
|
||||
assert.Equal(t, "bar", *out.Map["qux"])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "bam", *out.Map["baz"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "bar", *out.Map["qux"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1599,10 +1663,16 @@ func TestOutputService9ProtocolTestEmptyStringCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
ec2query.UnmarshalMeta(req)
|
||||
ec2query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "", *out.Foo)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "", *out.Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
475
vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/build_test.go
generated
vendored
475
vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/build_test.go
generated
vendored
|
@ -24,7 +24,6 @@ import (
|
|||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
|
||||
"github.com/aws/aws-sdk-go/private/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var _ bytes.Buffer // always import bytes
|
||||
|
@ -110,19 +109,18 @@ const opInputService1TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService1TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService1TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService1TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService1TestCaseOperation1 for more information on using the InputService1TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService1TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService1TestCaseOperation1Request(params)
|
||||
|
@ -259,19 +257,18 @@ const opInputService2TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService2TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService2TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService2TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService2TestCaseOperation1 for more information on using the InputService2TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService2TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService2TestCaseOperation1Request(params)
|
||||
|
@ -407,19 +404,18 @@ const opInputService3TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService3TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService3TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService3TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService3TestCaseOperation1 for more information on using the InputService3TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService3TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService3TestCaseOperation1Request(params)
|
||||
|
@ -478,19 +474,18 @@ const opInputService3TestCaseOperation2 = "OperationName"
|
|||
|
||||
// InputService3TestCaseOperation2Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService3TestCaseOperation2 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService3TestCaseOperation2 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService3TestCaseOperation2 method directly
|
||||
// instead.
|
||||
// See InputService3TestCaseOperation2 for more information on using the InputService3TestCaseOperation2
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService3TestCaseOperation2Request method.
|
||||
// req, resp := client.InputService3TestCaseOperation2Request(params)
|
||||
|
@ -639,19 +634,18 @@ const opInputService4TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService4TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService4TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService4TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService4TestCaseOperation1 for more information on using the InputService4TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService4TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService4TestCaseOperation1Request(params)
|
||||
|
@ -788,19 +782,18 @@ const opInputService5TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService5TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService5TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService5TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService5TestCaseOperation1 for more information on using the InputService5TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService5TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService5TestCaseOperation1Request(params)
|
||||
|
@ -859,19 +852,18 @@ const opInputService5TestCaseOperation2 = "OperationName"
|
|||
|
||||
// InputService5TestCaseOperation2Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService5TestCaseOperation2 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService5TestCaseOperation2 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService5TestCaseOperation2 method directly
|
||||
// instead.
|
||||
// See InputService5TestCaseOperation2 for more information on using the InputService5TestCaseOperation2
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService5TestCaseOperation2Request method.
|
||||
// req, resp := client.InputService5TestCaseOperation2Request(params)
|
||||
|
@ -930,19 +922,18 @@ const opInputService5TestCaseOperation3 = "OperationName"
|
|||
|
||||
// InputService5TestCaseOperation3Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService5TestCaseOperation3 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService5TestCaseOperation3 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService5TestCaseOperation3 method directly
|
||||
// instead.
|
||||
// See InputService5TestCaseOperation3 for more information on using the InputService5TestCaseOperation3
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService5TestCaseOperation3Request method.
|
||||
// req, resp := client.InputService5TestCaseOperation3Request(params)
|
||||
|
@ -1001,19 +992,18 @@ const opInputService5TestCaseOperation4 = "OperationName"
|
|||
|
||||
// InputService5TestCaseOperation4Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService5TestCaseOperation4 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService5TestCaseOperation4 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService5TestCaseOperation4 method directly
|
||||
// instead.
|
||||
// See InputService5TestCaseOperation4 for more information on using the InputService5TestCaseOperation4
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService5TestCaseOperation4Request method.
|
||||
// req, resp := client.InputService5TestCaseOperation4Request(params)
|
||||
|
@ -1072,19 +1062,18 @@ const opInputService5TestCaseOperation5 = "OperationName"
|
|||
|
||||
// InputService5TestCaseOperation5Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService5TestCaseOperation5 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService5TestCaseOperation5 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService5TestCaseOperation5 method directly
|
||||
// instead.
|
||||
// See InputService5TestCaseOperation5 for more information on using the InputService5TestCaseOperation5
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService5TestCaseOperation5Request method.
|
||||
// req, resp := client.InputService5TestCaseOperation5Request(params)
|
||||
|
@ -1143,19 +1132,18 @@ const opInputService5TestCaseOperation6 = "OperationName"
|
|||
|
||||
// InputService5TestCaseOperation6Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService5TestCaseOperation6 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService5TestCaseOperation6 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService5TestCaseOperation6 method directly
|
||||
// instead.
|
||||
// See InputService5TestCaseOperation6 for more information on using the InputService5TestCaseOperation6
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService5TestCaseOperation6Request method.
|
||||
// req, resp := client.InputService5TestCaseOperation6Request(params)
|
||||
|
@ -1347,19 +1335,18 @@ const opInputService6TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService6TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService6TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService6TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService6TestCaseOperation1 for more information on using the InputService6TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService6TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService6TestCaseOperation1Request(params)
|
||||
|
@ -1494,19 +1481,18 @@ const opInputService7TestCaseOperation1 = "OperationName"
|
|||
|
||||
// InputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService7TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService7TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService7TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See InputService7TestCaseOperation1 for more information on using the InputService7TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService7TestCaseOperation1Request method.
|
||||
// req, resp := client.InputService7TestCaseOperation1Request(params)
|
||||
|
@ -1566,19 +1552,18 @@ const opInputService7TestCaseOperation2 = "OperationName"
|
|||
|
||||
// InputService7TestCaseOperation2Request generates a "aws/request.Request" representing the
|
||||
// client's request for the InputService7TestCaseOperation2 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See InputService7TestCaseOperation2 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the InputService7TestCaseOperation2 method directly
|
||||
// instead.
|
||||
// See InputService7TestCaseOperation2 for more information on using the InputService7TestCaseOperation2
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the InputService7TestCaseOperation2Request method.
|
||||
// req, resp := client.InputService7TestCaseOperation2Request(params)
|
||||
|
@ -1668,10 +1653,14 @@ func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"Name":"myname"}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1679,8 +1668,12 @@ func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) {
|
|||
awstesting.AssertURL(t, "https://test/", r.URL.String())
|
||||
|
||||
// assert headers
|
||||
assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type"))
|
||||
assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"))
|
||||
if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1694,10 +1687,14 @@ func TestInputService2ProtocolTestTimestampValuesCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"TimeArg":1422172800}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1705,8 +1702,12 @@ func TestInputService2ProtocolTestTimestampValuesCase1(t *testing.T) {
|
|||
awstesting.AssertURL(t, "https://test/", r.URL.String())
|
||||
|
||||
// assert headers
|
||||
assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type"))
|
||||
assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"))
|
||||
if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1720,10 +1721,14 @@ func TestInputService3ProtocolTestBase64EncodedBlobsCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"BlobArg":"Zm9v"}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1731,8 +1736,12 @@ func TestInputService3ProtocolTestBase64EncodedBlobsCase1(t *testing.T) {
|
|||
awstesting.AssertURL(t, "https://test/", r.URL.String())
|
||||
|
||||
// assert headers
|
||||
assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type"))
|
||||
assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"))
|
||||
if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1749,10 +1758,14 @@ func TestInputService3ProtocolTestBase64EncodedBlobsCase2(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"BlobMap":{"key1":"Zm9v","key2":"YmFy"}}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1760,8 +1773,12 @@ func TestInputService3ProtocolTestBase64EncodedBlobsCase2(t *testing.T) {
|
|||
awstesting.AssertURL(t, "https://test/", r.URL.String())
|
||||
|
||||
// assert headers
|
||||
assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type"))
|
||||
assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"))
|
||||
if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1778,10 +1795,14 @@ func TestInputService4ProtocolTestNestedBlobsCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"ListParam":["Zm9v","YmFy"]}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1789,8 +1810,12 @@ func TestInputService4ProtocolTestNestedBlobsCase1(t *testing.T) {
|
|||
awstesting.AssertURL(t, "https://test/", r.URL.String())
|
||||
|
||||
// assert headers
|
||||
assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type"))
|
||||
assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"))
|
||||
if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1806,10 +1831,14 @@ func TestInputService5ProtocolTestRecursiveShapesCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"RecursiveStruct":{"NoRecurse":"foo"}}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1817,8 +1846,12 @@ func TestInputService5ProtocolTestRecursiveShapesCase1(t *testing.T) {
|
|||
awstesting.AssertURL(t, "https://test/", r.URL.String())
|
||||
|
||||
// assert headers
|
||||
assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type"))
|
||||
assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"))
|
||||
if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1836,10 +1869,14 @@ func TestInputService5ProtocolTestRecursiveShapesCase2(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveStruct":{"NoRecurse":"foo"}}}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1847,8 +1884,12 @@ func TestInputService5ProtocolTestRecursiveShapesCase2(t *testing.T) {
|
|||
awstesting.AssertURL(t, "https://test/", r.URL.String())
|
||||
|
||||
// assert headers
|
||||
assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type"))
|
||||
assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"))
|
||||
if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1870,10 +1911,14 @@ func TestInputService5ProtocolTestRecursiveShapesCase3(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveStruct":{"RecursiveStruct":{"RecursiveStruct":{"NoRecurse":"foo"}}}}}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1881,8 +1926,12 @@ func TestInputService5ProtocolTestRecursiveShapesCase3(t *testing.T) {
|
|||
awstesting.AssertURL(t, "https://test/", r.URL.String())
|
||||
|
||||
// assert headers
|
||||
assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type"))
|
||||
assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"))
|
||||
if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1905,10 +1954,14 @@ func TestInputService5ProtocolTestRecursiveShapesCase4(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveList":[{"NoRecurse":"foo"},{"NoRecurse":"bar"}]}}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1916,8 +1969,12 @@ func TestInputService5ProtocolTestRecursiveShapesCase4(t *testing.T) {
|
|||
awstesting.AssertURL(t, "https://test/", r.URL.String())
|
||||
|
||||
// assert headers
|
||||
assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type"))
|
||||
assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"))
|
||||
if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1942,10 +1999,14 @@ func TestInputService5ProtocolTestRecursiveShapesCase5(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveList":[{"NoRecurse":"foo"},{"RecursiveStruct":{"NoRecurse":"bar"}}]}}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1953,8 +2014,12 @@ func TestInputService5ProtocolTestRecursiveShapesCase5(t *testing.T) {
|
|||
awstesting.AssertURL(t, "https://test/", r.URL.String())
|
||||
|
||||
// assert headers
|
||||
assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type"))
|
||||
assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"))
|
||||
if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1977,10 +2042,14 @@ func TestInputService5ProtocolTestRecursiveShapesCase6(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"RecursiveStruct":{"RecursiveMap":{"foo":{"NoRecurse":"foo"},"bar":{"NoRecurse":"bar"}}}}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -1988,8 +2057,12 @@ func TestInputService5ProtocolTestRecursiveShapesCase6(t *testing.T) {
|
|||
awstesting.AssertURL(t, "https://test/", r.URL.String())
|
||||
|
||||
// assert headers
|
||||
assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type"))
|
||||
assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"))
|
||||
if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2003,10 +2076,14 @@ func TestInputService6ProtocolTestEmptyMapsCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"Map":{}}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -2014,8 +2091,12 @@ func TestInputService6ProtocolTestEmptyMapsCase1(t *testing.T) {
|
|||
awstesting.AssertURL(t, "https://test/", r.URL.String())
|
||||
|
||||
// assert headers
|
||||
assert.Equal(t, "application/x-amz-json-1.1", r.Header.Get("Content-Type"))
|
||||
assert.Equal(t, "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"))
|
||||
if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
|
||||
t.Errorf("expect %v to be %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2029,10 +2110,14 @@ func TestInputService7ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"Token":"abc123"}`, util.Trim(string(body)))
|
||||
|
||||
|
@ -2051,10 +2136,14 @@ func TestInputService7ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) {
|
|||
|
||||
// build request
|
||||
jsonrpc.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect no error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
if r.Body == nil {
|
||||
t.Errorf("expect body not to be nil")
|
||||
}
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
awstesting.AssertJSON(t, `{"Token":"00000000-0000-4000-8000-000000000000"}`, util.Trim(string(body)))
|
||||
|
||||
|
|
286
vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_test.go
generated
vendored
286
vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_test.go
generated
vendored
|
@ -24,7 +24,6 @@ import (
|
|||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
|
||||
"github.com/aws/aws-sdk-go/private/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var _ bytes.Buffer // always import bytes
|
||||
|
@ -108,19 +107,18 @@ const opOutputService1TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService1TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService1TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService1TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService1TestCaseOperation1 for more information on using the OutputService1TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService1TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService1TestCaseOperation1Request(params)
|
||||
|
@ -308,19 +306,18 @@ const opOutputService2TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService2TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService2TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService2TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService2TestCaseOperation1 for more information on using the OutputService2TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService2TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService2TestCaseOperation1Request(params)
|
||||
|
@ -474,19 +471,18 @@ const opOutputService3TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService3TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService3TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService3TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService3TestCaseOperation1 for more information on using the OutputService3TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService3TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService3TestCaseOperation1Request(params)
|
||||
|
@ -638,19 +634,18 @@ const opOutputService4TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService4TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService4TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService4TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService4TestCaseOperation1 for more information on using the OutputService4TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService4TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService4TestCaseOperation1Request(params)
|
||||
|
@ -707,19 +702,18 @@ const opOutputService4TestCaseOperation2 = "OperationName"
|
|||
|
||||
// OutputService4TestCaseOperation2Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService4TestCaseOperation2 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService4TestCaseOperation2 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService4TestCaseOperation2 method directly
|
||||
// instead.
|
||||
// See OutputService4TestCaseOperation2 for more information on using the OutputService4TestCaseOperation2
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService4TestCaseOperation2Request method.
|
||||
// req, resp := client.OutputService4TestCaseOperation2Request(params)
|
||||
|
@ -875,19 +869,18 @@ const opOutputService5TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService5TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService5TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService5TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService5TestCaseOperation1 for more information on using the OutputService5TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService5TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService5TestCaseOperation1Request(params)
|
||||
|
@ -1019,19 +1012,18 @@ const opOutputService6TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService6TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService6TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService6TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService6TestCaseOperation1 for more information on using the OutputService6TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService6TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService6TestCaseOperation1Request(params)
|
||||
|
@ -1116,18 +1108,38 @@ func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
jsonrpc.UnmarshalMeta(req)
|
||||
jsonrpc.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "a", *out.Char)
|
||||
assert.Equal(t, 1.3, *out.Double)
|
||||
assert.Equal(t, false, *out.FalseBool)
|
||||
assert.Equal(t, 1.2, *out.Float)
|
||||
assert.Equal(t, int64(200), *out.Long)
|
||||
assert.Equal(t, int64(123), *out.Num)
|
||||
assert.Equal(t, "myname", *out.Str)
|
||||
assert.Equal(t, true, *out.TrueBool)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "a", *out.Char; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.3, *out.Double; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := false, *out.FalseBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.2, *out.Float; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(200), *out.Long; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(123), *out.Num; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "myname", *out.Str; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := true, *out.TrueBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1143,12 +1155,20 @@ func TestOutputService2ProtocolTestBlobMembersCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
jsonrpc.UnmarshalMeta(req)
|
||||
jsonrpc.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "hi!", string(out.BlobMember))
|
||||
assert.Equal(t, "there!", string(out.StructMember.Foo))
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "hi!", string(out.BlobMember); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "there!", string(out.StructMember.Foo); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1164,12 +1184,20 @@ func TestOutputService3ProtocolTestTimestampMembersCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
jsonrpc.UnmarshalMeta(req)
|
||||
jsonrpc.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.StructMember.Foo.String())
|
||||
assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeMember.String())
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.StructMember.Foo.String(); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeMember.String(); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1185,12 +1213,20 @@ func TestOutputService4ProtocolTestListsCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
jsonrpc.UnmarshalMeta(req)
|
||||
jsonrpc.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "a", *out.ListMember[0])
|
||||
assert.Equal(t, "b", *out.ListMember[1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "a", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "b", *out.ListMember[1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1206,16 +1242,32 @@ func TestOutputService4ProtocolTestListsCase2(t *testing.T) {
|
|||
// unmarshal response
|
||||
jsonrpc.UnmarshalMeta(req)
|
||||
jsonrpc.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "a", *out.ListMember[0])
|
||||
assert.Nil(t, out.ListMember[1])
|
||||
assert.Nil(t, out.ListMemberMap[1])
|
||||
assert.Nil(t, out.ListMemberMap[2])
|
||||
assert.Nil(t, out.ListMemberStruct[1])
|
||||
assert.Nil(t, out.ListMemberStruct[2])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "a", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e := out.ListMember[1]; e != nil {
|
||||
t.Errorf("expect nil, got %v", e)
|
||||
}
|
||||
if e := out.ListMemberMap[1]; e != nil {
|
||||
t.Errorf("expect nil, got %v", e)
|
||||
}
|
||||
if e := out.ListMemberMap[2]; e != nil {
|
||||
t.Errorf("expect nil, got %v", e)
|
||||
}
|
||||
if e := out.ListMemberStruct[1]; e != nil {
|
||||
t.Errorf("expect nil, got %v", e)
|
||||
}
|
||||
if e := out.ListMemberStruct[2]; e != nil {
|
||||
t.Errorf("expect nil, got %v", e)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1231,14 +1283,26 @@ func TestOutputService5ProtocolTestMapsCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
jsonrpc.UnmarshalMeta(req)
|
||||
jsonrpc.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, int64(1), *out.MapMember["a"][0])
|
||||
assert.Equal(t, int64(2), *out.MapMember["a"][1])
|
||||
assert.Equal(t, int64(3), *out.MapMember["b"][0])
|
||||
assert.Equal(t, int64(4), *out.MapMember["b"][1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := int64(1), *out.MapMember["a"][0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(2), *out.MapMember["a"][1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(3), *out.MapMember["b"][0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(4), *out.MapMember["b"][1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1254,9 +1318,13 @@ func TestOutputService6ProtocolTestIgnoresExtraDataCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
jsonrpc.UnmarshalMeta(req)
|
||||
jsonrpc.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
1679
vendor/github.com/aws/aws-sdk-go/private/protocol/query/build_test.go
generated
vendored
1679
vendor/github.com/aws/aws-sdk-go/private/protocol/query/build_test.go
generated
vendored
File diff suppressed because it is too large
Load diff
4
vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
generated
vendored
4
vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
generated
vendored
|
@ -121,6 +121,10 @@ func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string
|
|||
return nil
|
||||
}
|
||||
|
||||
if _, ok := value.Interface().([]byte); ok {
|
||||
return q.parseScalar(v, value, prefix, tag)
|
||||
}
|
||||
|
||||
// check for unflattened list member
|
||||
if !q.isEC2 && tag.Get("flattened") == "" {
|
||||
if listName := tag.Get("locationNameList"); listName == "" {
|
||||
|
|
566
vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_test.go
generated
vendored
566
vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_test.go
generated
vendored
|
@ -24,7 +24,6 @@ import (
|
|||
"github.com/aws/aws-sdk-go/private/protocol/query"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
|
||||
"github.com/aws/aws-sdk-go/private/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var _ bytes.Buffer // always import bytes
|
||||
|
@ -108,19 +107,18 @@ const opOutputService1TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService1TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService1TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService1TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService1TestCaseOperation1 for more information on using the OutputService1TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService1TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService1TestCaseOperation1Request(params)
|
||||
|
@ -316,19 +314,18 @@ const opOutputService2TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService2TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService2TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService2TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService2TestCaseOperation1 for more information on using the OutputService2TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService2TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService2TestCaseOperation1Request(params)
|
||||
|
@ -468,19 +465,18 @@ const opOutputService3TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService3TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService3TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService3TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService3TestCaseOperation1 for more information on using the OutputService3TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService3TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService3TestCaseOperation1Request(params)
|
||||
|
@ -613,19 +609,18 @@ const opOutputService4TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService4TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService4TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService4TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService4TestCaseOperation1 for more information on using the OutputService4TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService4TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService4TestCaseOperation1Request(params)
|
||||
|
@ -757,19 +752,18 @@ const opOutputService5TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService5TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService5TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService5TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService5TestCaseOperation1 for more information on using the OutputService5TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService5TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService5TestCaseOperation1Request(params)
|
||||
|
@ -901,19 +895,18 @@ const opOutputService6TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService6TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService6TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService6TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService6TestCaseOperation1 for more information on using the OutputService6TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService6TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService6TestCaseOperation1Request(params)
|
||||
|
@ -1045,19 +1038,18 @@ const opOutputService7TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService7TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService7TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService7TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService7TestCaseOperation1 for more information on using the OutputService7TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService7TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService7TestCaseOperation1Request(params)
|
||||
|
@ -1189,19 +1181,18 @@ const opOutputService8TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService8TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService8TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService8TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService8TestCaseOperation1 for more information on using the OutputService8TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService8TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService8TestCaseOperation1Request(params)
|
||||
|
@ -1361,19 +1352,18 @@ const opOutputService9TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService9TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService9TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService9TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService9TestCaseOperation1 for more information on using the OutputService9TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService9TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService9TestCaseOperation1Request(params)
|
||||
|
@ -1533,19 +1523,18 @@ const opOutputService10TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService10TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService10TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService10TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService10TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService10TestCaseOperation1 for more information on using the OutputService10TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService10TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService10TestCaseOperation1Request(params)
|
||||
|
@ -1677,19 +1666,18 @@ const opOutputService11TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService11TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService11TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService11TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService11TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService11TestCaseOperation1 for more information on using the OutputService11TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService11TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService11TestCaseOperation1Request(params)
|
||||
|
@ -1833,19 +1821,18 @@ const opOutputService12TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService12TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService12TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService12TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService12TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService12TestCaseOperation1 for more information on using the OutputService12TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService12TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService12TestCaseOperation1Request(params)
|
||||
|
@ -1977,19 +1964,18 @@ const opOutputService13TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService13TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService13TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService13TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService13TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService13TestCaseOperation1 for more information on using the OutputService13TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService13TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService13TestCaseOperation1Request(params)
|
||||
|
@ -2121,19 +2107,18 @@ const opOutputService14TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService14TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService14TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService14TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService14TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService14TestCaseOperation1 for more information on using the OutputService14TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService14TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService14TestCaseOperation1Request(params)
|
||||
|
@ -2265,19 +2250,18 @@ const opOutputService15TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService15TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService15TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService15TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService15TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService15TestCaseOperation1 for more information on using the OutputService15TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService15TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService15TestCaseOperation1Request(params)
|
||||
|
@ -2362,19 +2346,41 @@ func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "a", *out.Char)
|
||||
assert.Equal(t, 1.3, *out.Double)
|
||||
assert.Equal(t, false, *out.FalseBool)
|
||||
assert.Equal(t, 1.2, *out.Float)
|
||||
assert.Equal(t, int64(200), *out.Long)
|
||||
assert.Equal(t, int64(123), *out.Num)
|
||||
assert.Equal(t, "myname", *out.Str)
|
||||
assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
|
||||
assert.Equal(t, true, *out.TrueBool)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "a", *out.Char; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.3, *out.Double; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := false, *out.FalseBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.2, *out.Float; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(200), *out.Long; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(123), *out.Num; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "myname", *out.Str; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String(); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := true, *out.TrueBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2390,11 +2396,17 @@ func TestOutputService2ProtocolTestNotAllMembersInResponseCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "myname", *out.Str)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "myname", *out.Str; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2410,11 +2422,17 @@ func TestOutputService3ProtocolTestBlobCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "value", string(out.Blob))
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "value", string(out.Blob); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2430,12 +2448,20 @@ func TestOutputService4ProtocolTestListsCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", *out.ListMember[0])
|
||||
assert.Equal(t, "123", *out.ListMember[1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "123", *out.ListMember[1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2451,12 +2477,20 @@ func TestOutputService5ProtocolTestListWithCustomMemberNameCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", *out.ListMember[0])
|
||||
assert.Equal(t, "123", *out.ListMember[1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "123", *out.ListMember[1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2472,12 +2506,20 @@ func TestOutputService6ProtocolTestFlattenedListCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", *out.ListMember[0])
|
||||
assert.Equal(t, "123", *out.ListMember[1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "123", *out.ListMember[1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2493,11 +2535,17 @@ func TestOutputService7ProtocolTestFlattenedSingleElementListCase1(t *testing.T)
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", *out.ListMember[0])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2513,16 +2561,32 @@ func TestOutputService8ProtocolTestListOfStructuresCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "firstbar", *out.List[0].Bar)
|
||||
assert.Equal(t, "firstbaz", *out.List[0].Baz)
|
||||
assert.Equal(t, "firstfoo", *out.List[0].Foo)
|
||||
assert.Equal(t, "secondbar", *out.List[1].Bar)
|
||||
assert.Equal(t, "secondbaz", *out.List[1].Baz)
|
||||
assert.Equal(t, "secondfoo", *out.List[1].Foo)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "firstbar", *out.List[0].Bar; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "firstbaz", *out.List[0].Baz; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "firstfoo", *out.List[0].Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "secondbar", *out.List[1].Bar; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "secondbaz", *out.List[1].Baz; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "secondfoo", *out.List[1].Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2538,16 +2602,32 @@ func TestOutputService9ProtocolTestFlattenedListOfStructuresCase1(t *testing.T)
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "firstbar", *out.List[0].Bar)
|
||||
assert.Equal(t, "firstbaz", *out.List[0].Baz)
|
||||
assert.Equal(t, "firstfoo", *out.List[0].Foo)
|
||||
assert.Equal(t, "secondbar", *out.List[1].Bar)
|
||||
assert.Equal(t, "secondbaz", *out.List[1].Baz)
|
||||
assert.Equal(t, "secondfoo", *out.List[1].Foo)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "firstbar", *out.List[0].Bar; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "firstbaz", *out.List[0].Baz; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "firstfoo", *out.List[0].Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "secondbar", *out.List[1].Bar; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "secondbaz", *out.List[1].Baz; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "secondfoo", *out.List[1].Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2563,12 +2643,20 @@ func TestOutputService10ProtocolTestFlattenedListWithLocationNameCase1(t *testin
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "a", *out.List[0])
|
||||
assert.Equal(t, "b", *out.List[1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "a", *out.List[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "b", *out.List[1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2584,12 +2672,20 @@ func TestOutputService11ProtocolTestNormalMapCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "bam", *out.Map["baz"].Foo)
|
||||
assert.Equal(t, "bar", *out.Map["qux"].Foo)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "bam", *out.Map["baz"].Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "bar", *out.Map["qux"].Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2605,12 +2701,20 @@ func TestOutputService12ProtocolTestFlattenedMapCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "bam", *out.Map["baz"])
|
||||
assert.Equal(t, "bar", *out.Map["qux"])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "bam", *out.Map["baz"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "bar", *out.Map["qux"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2626,11 +2730,17 @@ func TestOutputService13ProtocolTestFlattenedMapInShapeDefinitionCase1(t *testin
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "bar", *out.Map["qux"])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "bar", *out.Map["qux"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2646,12 +2756,20 @@ func TestOutputService14ProtocolTestNamedMapCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "bam", *out.Map["baz"])
|
||||
assert.Equal(t, "bar", *out.Map["qux"])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "bam", *out.Map["baz"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "bar", *out.Map["qux"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2667,10 +2785,16 @@ func TestOutputService15ProtocolTestEmptyStringCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
query.UnmarshalMeta(req)
|
||||
query.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "", *out.Foo)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "", *out.Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
452
vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/build_bench_test.go
generated
vendored
452
vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/build_bench_test.go
generated
vendored
|
@ -3,232 +3,131 @@
|
|||
package restjson_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/credentials"
|
||||
"github.com/aws/aws-sdk-go/aws/endpoints"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/awstesting"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/rest"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/restjson"
|
||||
"github.com/aws/aws-sdk-go/service/elastictranscoder"
|
||||
)
|
||||
|
||||
func BenchmarkRESTJSONBuild_Complex_elastictranscoderCreateJobInput(b *testing.B) {
|
||||
svc := awstesting.NewClient()
|
||||
svc.ServiceName = "elastictranscoder"
|
||||
svc.APIVersion = "2012-09-25"
|
||||
var (
|
||||
elastictranscoderSvc *elastictranscoder.ElasticTranscoder
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}))
|
||||
|
||||
sess := session.Must(session.NewSession(&aws.Config{
|
||||
Credentials: credentials.NewStaticCredentials("Key", "Secret", "Token"),
|
||||
Endpoint: aws.String(server.URL),
|
||||
S3ForcePathStyle: aws.Bool(true),
|
||||
DisableSSL: aws.Bool(true),
|
||||
Region: aws.String(endpoints.UsWest2RegionID),
|
||||
}))
|
||||
elastictranscoderSvc = elastictranscoder.New(sess)
|
||||
|
||||
c := m.Run()
|
||||
server.Close()
|
||||
os.Exit(c)
|
||||
}
|
||||
|
||||
func BenchmarkRESTJSONBuild_Complex_ETCCreateJob(b *testing.B) {
|
||||
params := elastictranscoderCreateJobInput()
|
||||
|
||||
benchRESTJSONBuild(b, func() *request.Request {
|
||||
req, _ := elastictranscoderSvc.CreateJobRequest(params)
|
||||
return req
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTJSONBuild_Simple_ETCListJobsByPipeline(b *testing.B) {
|
||||
params := elastictranscoderListJobsByPipeline()
|
||||
|
||||
benchRESTJSONBuild(b, func() *request.Request {
|
||||
req, _ := elastictranscoderSvc.ListJobsByPipelineRequest(params)
|
||||
return req
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTJSONRequest_Complex_CFCreateJob(b *testing.B) {
|
||||
benchRESTJSONRequest(b, func() *request.Request {
|
||||
req, _ := elastictranscoderSvc.CreateJobRequest(elastictranscoderCreateJobInput())
|
||||
return req
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTJSONRequest_Simple_ETCListJobsByPipeline(b *testing.B) {
|
||||
benchRESTJSONRequest(b, func() *request.Request {
|
||||
req, _ := elastictranscoderSvc.ListJobsByPipelineRequest(elastictranscoderListJobsByPipeline())
|
||||
return req
|
||||
})
|
||||
}
|
||||
|
||||
func benchRESTJSONBuild(b *testing.B, reqFn func() *request.Request) {
|
||||
b.ResetTimer()
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
r := svc.NewRequest(&request.Operation{Name: "CreateJobInput"}, restjsonBuildParms, nil)
|
||||
restjson.Build(r)
|
||||
if r.Error != nil {
|
||||
b.Fatal("Unexpected error", r.Error)
|
||||
req := reqFn()
|
||||
restjson.Build(req)
|
||||
if req.Error != nil {
|
||||
b.Fatal("Unexpected error", req.Error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkRESTBuild_Complex_elastictranscoderCreateJobInput(b *testing.B) {
|
||||
svc := awstesting.NewClient()
|
||||
svc.ServiceName = "elastictranscoder"
|
||||
svc.APIVersion = "2012-09-25"
|
||||
func benchRESTJSONRequest(b *testing.B, reqFn func() *request.Request) {
|
||||
b.ResetTimer()
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
r := svc.NewRequest(&request.Operation{Name: "CreateJobInput"}, restjsonBuildParms, nil)
|
||||
rest.Build(r)
|
||||
if r.Error != nil {
|
||||
b.Fatal("Unexpected error", r.Error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkEncodingJSONMarshal_Complex_elastictranscoderCreateJobInput(b *testing.B) {
|
||||
params := restjsonBuildParms
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
buf := &bytes.Buffer{}
|
||||
encoder := json.NewEncoder(buf)
|
||||
if err := encoder.Encode(params); err != nil {
|
||||
err := reqFn().Send()
|
||||
if err != nil {
|
||||
b.Fatal("Unexpected error", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkRESTJSONBuild_Simple_elastictranscoderListJobsByPipeline(b *testing.B) {
|
||||
svc := awstesting.NewClient()
|
||||
svc.ServiceName = "elastictranscoder"
|
||||
svc.APIVersion = "2012-09-25"
|
||||
|
||||
params := &elastictranscoder.ListJobsByPipelineInput{
|
||||
func elastictranscoderListJobsByPipeline() *elastictranscoder.ListJobsByPipelineInput {
|
||||
return &elastictranscoder.ListJobsByPipelineInput{
|
||||
PipelineId: aws.String("Id"), // Required
|
||||
Ascending: aws.String("Ascending"),
|
||||
PageToken: aws.String("Id"),
|
||||
}
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
r := svc.NewRequest(&request.Operation{Name: "ListJobsByPipeline"}, params, nil)
|
||||
restjson.Build(r)
|
||||
if r.Error != nil {
|
||||
b.Fatal("Unexpected error", r.Error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkRESTBuild_Simple_elastictranscoderListJobsByPipeline(b *testing.B) {
|
||||
svc := awstesting.NewClient()
|
||||
svc.ServiceName = "elastictranscoder"
|
||||
svc.APIVersion = "2012-09-25"
|
||||
|
||||
params := &elastictranscoder.ListJobsByPipelineInput{
|
||||
func elastictranscoderCreateJobInput() *elastictranscoder.CreateJobInput {
|
||||
return &elastictranscoder.CreateJobInput{
|
||||
Input: &elastictranscoder.JobInput{ // Required
|
||||
AspectRatio: aws.String("AspectRatio"),
|
||||
Container: aws.String("JobContainer"),
|
||||
DetectedProperties: &elastictranscoder.DetectedProperties{
|
||||
DurationMillis: aws.Int64(1),
|
||||
FileSize: aws.Int64(1),
|
||||
FrameRate: aws.String("FloatString"),
|
||||
Height: aws.Int64(1),
|
||||
Width: aws.Int64(1),
|
||||
},
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
FrameRate: aws.String("FrameRate"),
|
||||
Interlaced: aws.String("Interlaced"),
|
||||
Key: aws.String("Key"),
|
||||
Resolution: aws.String("Resolution"),
|
||||
},
|
||||
PipelineId: aws.String("Id"), // Required
|
||||
Ascending: aws.String("Ascending"),
|
||||
PageToken: aws.String("Id"),
|
||||
}
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
r := svc.NewRequest(&request.Operation{Name: "ListJobsByPipeline"}, params, nil)
|
||||
rest.Build(r)
|
||||
if r.Error != nil {
|
||||
b.Fatal("Unexpected error", r.Error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkEncodingJSONMarshal_Simple_elastictranscoderListJobsByPipeline(b *testing.B) {
|
||||
params := &elastictranscoder.ListJobsByPipelineInput{
|
||||
PipelineId: aws.String("Id"), // Required
|
||||
Ascending: aws.String("Ascending"),
|
||||
PageToken: aws.String("Id"),
|
||||
}
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
buf := &bytes.Buffer{}
|
||||
encoder := json.NewEncoder(buf)
|
||||
if err := encoder.Encode(params); err != nil {
|
||||
b.Fatal("Unexpected error", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var restjsonBuildParms = &elastictranscoder.CreateJobInput{
|
||||
Input: &elastictranscoder.JobInput{ // Required
|
||||
AspectRatio: aws.String("AspectRatio"),
|
||||
Container: aws.String("JobContainer"),
|
||||
DetectedProperties: &elastictranscoder.DetectedProperties{
|
||||
DurationMillis: aws.Int64(1),
|
||||
FileSize: aws.Int64(1),
|
||||
FrameRate: aws.String("FloatString"),
|
||||
Height: aws.Int64(1),
|
||||
Width: aws.Int64(1),
|
||||
},
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
FrameRate: aws.String("FrameRate"),
|
||||
Interlaced: aws.String("Interlaced"),
|
||||
Key: aws.String("Key"),
|
||||
Resolution: aws.String("Resolution"),
|
||||
},
|
||||
PipelineId: aws.String("Id"), // Required
|
||||
Output: &elastictranscoder.CreateJobOutput{
|
||||
AlbumArt: &elastictranscoder.JobAlbumArt{
|
||||
Artwork: []*elastictranscoder.Artwork{
|
||||
{ // Required
|
||||
AlbumArtFormat: aws.String("JpgOrPng"),
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
InputKey: aws.String("WatermarkKey"),
|
||||
MaxHeight: aws.String("DigitsOrAuto"),
|
||||
MaxWidth: aws.String("DigitsOrAuto"),
|
||||
PaddingPolicy: aws.String("PaddingPolicy"),
|
||||
SizingPolicy: aws.String("SizingPolicy"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MergePolicy: aws.String("MergePolicy"),
|
||||
},
|
||||
Captions: &elastictranscoder.Captions{
|
||||
CaptionFormats: []*elastictranscoder.CaptionFormat{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Format: aws.String("CaptionFormatFormat"),
|
||||
Pattern: aws.String("CaptionFormatPattern"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
CaptionSources: []*elastictranscoder.CaptionSource{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Key: aws.String("Key"),
|
||||
Label: aws.String("Name"),
|
||||
Language: aws.String("Key"),
|
||||
TimeOffset: aws.String("TimeOffset"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MergePolicy: aws.String("CaptionMergePolicy"),
|
||||
},
|
||||
Composition: []*elastictranscoder.Clip{
|
||||
{ // Required
|
||||
TimeSpan: &elastictranscoder.TimeSpan{
|
||||
Duration: aws.String("Time"),
|
||||
StartTime: aws.String("Time"),
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Key: aws.String("Key"),
|
||||
PresetId: aws.String("Id"),
|
||||
Rotate: aws.String("Rotate"),
|
||||
SegmentDuration: aws.String("FloatString"),
|
||||
ThumbnailEncryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
ThumbnailPattern: aws.String("ThumbnailPattern"),
|
||||
Watermarks: []*elastictranscoder.JobWatermark{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
InputKey: aws.String("WatermarkKey"),
|
||||
PresetWatermarkId: aws.String("PresetWatermarkId"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
OutputKeyPrefix: aws.String("Key"),
|
||||
Outputs: []*elastictranscoder.CreateJobOutput{
|
||||
{ // Required
|
||||
Output: &elastictranscoder.CreateJobOutput{
|
||||
AlbumArt: &elastictranscoder.JobAlbumArt{
|
||||
Artwork: []*elastictranscoder.Artwork{
|
||||
{ // Required
|
||||
|
@ -320,37 +219,132 @@ var restjsonBuildParms = &elastictranscoder.CreateJobInput{
|
|||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Playlists: []*elastictranscoder.CreateJobPlaylist{
|
||||
{ // Required
|
||||
Format: aws.String("PlaylistFormat"),
|
||||
HlsContentProtection: &elastictranscoder.HlsContentProtection{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
KeyStoragePolicy: aws.String("KeyStoragePolicy"),
|
||||
LicenseAcquisitionUrl: aws.String("ZeroTo512String"),
|
||||
Method: aws.String("HlsContentProtectionMethod"),
|
||||
},
|
||||
Name: aws.String("Filename"),
|
||||
OutputKeys: []*string{
|
||||
aws.String("Key"), // Required
|
||||
// More values...
|
||||
},
|
||||
PlayReadyDrm: &elastictranscoder.PlayReadyDrm{
|
||||
Format: aws.String("PlayReadyDrmFormatString"),
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("NonEmptyBase64EncodedString"),
|
||||
KeyId: aws.String("KeyIdGuid"),
|
||||
KeyMd5: aws.String("NonEmptyBase64EncodedString"),
|
||||
LicenseAcquisitionUrl: aws.String("OneTo512String"),
|
||||
OutputKeyPrefix: aws.String("Key"),
|
||||
Outputs: []*elastictranscoder.CreateJobOutput{
|
||||
{ // Required
|
||||
AlbumArt: &elastictranscoder.JobAlbumArt{
|
||||
Artwork: []*elastictranscoder.Artwork{
|
||||
{ // Required
|
||||
AlbumArtFormat: aws.String("JpgOrPng"),
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
InputKey: aws.String("WatermarkKey"),
|
||||
MaxHeight: aws.String("DigitsOrAuto"),
|
||||
MaxWidth: aws.String("DigitsOrAuto"),
|
||||
PaddingPolicy: aws.String("PaddingPolicy"),
|
||||
SizingPolicy: aws.String("SizingPolicy"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MergePolicy: aws.String("MergePolicy"),
|
||||
},
|
||||
Captions: &elastictranscoder.Captions{
|
||||
CaptionFormats: []*elastictranscoder.CaptionFormat{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Format: aws.String("CaptionFormatFormat"),
|
||||
Pattern: aws.String("CaptionFormatPattern"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
CaptionSources: []*elastictranscoder.CaptionSource{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Key: aws.String("Key"),
|
||||
Label: aws.String("Name"),
|
||||
Language: aws.String("Key"),
|
||||
TimeOffset: aws.String("TimeOffset"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MergePolicy: aws.String("CaptionMergePolicy"),
|
||||
},
|
||||
Composition: []*elastictranscoder.Clip{
|
||||
{ // Required
|
||||
TimeSpan: &elastictranscoder.TimeSpan{
|
||||
Duration: aws.String("Time"),
|
||||
StartTime: aws.String("Time"),
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
Key: aws.String("Key"),
|
||||
PresetId: aws.String("Id"),
|
||||
Rotate: aws.String("Rotate"),
|
||||
SegmentDuration: aws.String("FloatString"),
|
||||
ThumbnailEncryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
ThumbnailPattern: aws.String("ThumbnailPattern"),
|
||||
Watermarks: []*elastictranscoder.JobWatermark{
|
||||
{ // Required
|
||||
Encryption: &elastictranscoder.Encryption{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
Mode: aws.String("EncryptionMode"),
|
||||
},
|
||||
InputKey: aws.String("WatermarkKey"),
|
||||
PresetWatermarkId: aws.String("PresetWatermarkId"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
UserMetadata: map[string]*string{
|
||||
"Key": aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
Playlists: []*elastictranscoder.CreateJobPlaylist{
|
||||
{ // Required
|
||||
Format: aws.String("PlaylistFormat"),
|
||||
HlsContentProtection: &elastictranscoder.HlsContentProtection{
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("Base64EncodedString"),
|
||||
KeyMd5: aws.String("Base64EncodedString"),
|
||||
KeyStoragePolicy: aws.String("KeyStoragePolicy"),
|
||||
LicenseAcquisitionUrl: aws.String("ZeroTo512String"),
|
||||
Method: aws.String("HlsContentProtectionMethod"),
|
||||
},
|
||||
Name: aws.String("Filename"),
|
||||
OutputKeys: []*string{
|
||||
aws.String("Key"), // Required
|
||||
// More values...
|
||||
},
|
||||
PlayReadyDrm: &elastictranscoder.PlayReadyDrm{
|
||||
Format: aws.String("PlayReadyDrmFormatString"),
|
||||
InitializationVector: aws.String("ZeroTo255String"),
|
||||
Key: aws.String("NonEmptyBase64EncodedString"),
|
||||
KeyId: aws.String("KeyIdGuid"),
|
||||
KeyMd5: aws.String("NonEmptyBase64EncodedString"),
|
||||
LicenseAcquisitionUrl: aws.String("OneTo512String"),
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
UserMetadata: map[string]*string{
|
||||
"Key": aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
856
vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/build_test.go
generated
vendored
856
vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/build_test.go
generated
vendored
File diff suppressed because it is too large
Load diff
457
vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_test.go
generated
vendored
457
vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_test.go
generated
vendored
|
@ -24,7 +24,6 @@ import (
|
|||
"github.com/aws/aws-sdk-go/private/protocol/restjson"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
|
||||
"github.com/aws/aws-sdk-go/private/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var _ bytes.Buffer // always import bytes
|
||||
|
@ -108,19 +107,18 @@ const opOutputService1TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService1TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService1TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService1TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService1TestCaseOperation1 for more information on using the OutputService1TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService1TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService1TestCaseOperation1Request(params)
|
||||
|
@ -332,19 +330,18 @@ const opOutputService2TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService2TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService2TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService2TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService2TestCaseOperation1 for more information on using the OutputService2TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService2TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService2TestCaseOperation1Request(params)
|
||||
|
@ -498,19 +495,18 @@ const opOutputService3TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService3TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService3TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService3TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService3TestCaseOperation1 for more information on using the OutputService3TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService3TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService3TestCaseOperation1Request(params)
|
||||
|
@ -662,19 +658,18 @@ const opOutputService4TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService4TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService4TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService4TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService4TestCaseOperation1 for more information on using the OutputService4TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService4TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService4TestCaseOperation1Request(params)
|
||||
|
@ -806,19 +801,18 @@ const opOutputService5TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService5TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService5TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService5TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService5TestCaseOperation1 for more information on using the OutputService5TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService5TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService5TestCaseOperation1Request(params)
|
||||
|
@ -962,19 +956,18 @@ const opOutputService6TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService6TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService6TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService6TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService6TestCaseOperation1 for more information on using the OutputService6TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService6TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService6TestCaseOperation1Request(params)
|
||||
|
@ -1106,19 +1099,18 @@ const opOutputService7TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService7TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService7TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService7TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService7TestCaseOperation1 for more information on using the OutputService7TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService7TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService7TestCaseOperation1Request(params)
|
||||
|
@ -1250,19 +1242,18 @@ const opOutputService8TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService8TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService8TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService8TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService8TestCaseOperation1 for more information on using the OutputService8TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService8TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService8TestCaseOperation1Request(params)
|
||||
|
@ -1394,19 +1385,18 @@ const opOutputService9TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService9TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService9TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService9TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService9TestCaseOperation1 for more information on using the OutputService9TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService9TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService9TestCaseOperation1Request(params)
|
||||
|
@ -1546,19 +1536,18 @@ const opOutputService10TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService10TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService10TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService10TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService10TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService10TestCaseOperation1 for more information on using the OutputService10TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService10TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService10TestCaseOperation1Request(params)
|
||||
|
@ -1710,19 +1699,18 @@ const opOutputService11TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService11TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService11TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService11TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService11TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService11TestCaseOperation1 for more information on using the OutputService11TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService11TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService11TestCaseOperation1Request(params)
|
||||
|
@ -1854,19 +1842,18 @@ const opOutputService12TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService12TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService12TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService12TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService12TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService12TestCaseOperation1 for more information on using the OutputService12TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService12TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService12TestCaseOperation1Request(params)
|
||||
|
@ -1953,21 +1940,47 @@ func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restjson.UnmarshalMeta(req)
|
||||
restjson.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "a", *out.Char)
|
||||
assert.Equal(t, 1.3, *out.Double)
|
||||
assert.Equal(t, false, *out.FalseBool)
|
||||
assert.Equal(t, 1.2, *out.Float)
|
||||
assert.Equal(t, "test", *out.ImaHeader)
|
||||
assert.Equal(t, "abc", *out.ImaHeaderLocation)
|
||||
assert.Equal(t, int64(200), *out.Long)
|
||||
assert.Equal(t, int64(123), *out.Num)
|
||||
assert.Equal(t, int64(200), *out.Status)
|
||||
assert.Equal(t, "myname", *out.Str)
|
||||
assert.Equal(t, true, *out.TrueBool)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "a", *out.Char; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.3, *out.Double; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := false, *out.FalseBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.2, *out.Float; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "test", *out.ImaHeader; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "abc", *out.ImaHeaderLocation; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(200), *out.Long; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(123), *out.Num; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(200), *out.Status; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "myname", *out.Str; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := true, *out.TrueBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1983,12 +1996,20 @@ func TestOutputService2ProtocolTestBlobMembersCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restjson.UnmarshalMeta(req)
|
||||
restjson.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "hi!", string(out.BlobMember))
|
||||
assert.Equal(t, "there!", string(out.StructMember.Foo))
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "hi!", string(out.BlobMember); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "there!", string(out.StructMember.Foo); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2004,12 +2025,20 @@ func TestOutputService3ProtocolTestTimestampMembersCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restjson.UnmarshalMeta(req)
|
||||
restjson.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.StructMember.Foo.String())
|
||||
assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeMember.String())
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.StructMember.Foo.String(); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeMember.String(); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2025,12 +2054,20 @@ func TestOutputService4ProtocolTestListsCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restjson.UnmarshalMeta(req)
|
||||
restjson.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "a", *out.ListMember[0])
|
||||
assert.Equal(t, "b", *out.ListMember[1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "a", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "b", *out.ListMember[1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2046,12 +2083,20 @@ func TestOutputService5ProtocolTestListsWithStructureMemberCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restjson.UnmarshalMeta(req)
|
||||
restjson.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "a", *out.ListMember[0].Foo)
|
||||
assert.Equal(t, "b", *out.ListMember[1].Foo)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "a", *out.ListMember[0].Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "b", *out.ListMember[1].Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2067,14 +2112,26 @@ func TestOutputService6ProtocolTestMapsCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restjson.UnmarshalMeta(req)
|
||||
restjson.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, int64(1), *out.MapMember["a"][0])
|
||||
assert.Equal(t, int64(2), *out.MapMember["a"][1])
|
||||
assert.Equal(t, int64(3), *out.MapMember["b"][0])
|
||||
assert.Equal(t, int64(4), *out.MapMember["b"][1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := int64(1), *out.MapMember["a"][0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(2), *out.MapMember["a"][1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(3), *out.MapMember["b"][0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(4), *out.MapMember["b"][1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2090,12 +2147,20 @@ func TestOutputService7ProtocolTestComplexMapValuesCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restjson.UnmarshalMeta(req)
|
||||
restjson.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.MapMember["a"].String())
|
||||
assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.MapMember["b"].String())
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.MapMember["a"].String(); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.MapMember["b"].String(); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2111,10 +2176,14 @@ func TestOutputService8ProtocolTestIgnoresExtraDataCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restjson.UnmarshalMeta(req)
|
||||
restjson.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2133,15 +2202,29 @@ func TestOutputService9ProtocolTestSupportsHeaderMapsCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restjson.UnmarshalMeta(req)
|
||||
restjson.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "10", *out.AllHeaders["Content-Length"])
|
||||
assert.Equal(t, "boo", *out.AllHeaders["X-Bam"])
|
||||
assert.Equal(t, "bar", *out.AllHeaders["X-Foo"])
|
||||
assert.Equal(t, "boo", *out.PrefixedHeaders["Bam"])
|
||||
assert.Equal(t, "bar", *out.PrefixedHeaders["Foo"])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "10", *out.AllHeaders["Content-Length"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "boo", *out.AllHeaders["X-Bam"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "bar", *out.AllHeaders["X-Foo"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "boo", *out.PrefixedHeaders["Bam"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "bar", *out.PrefixedHeaders["Foo"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2158,12 +2241,20 @@ func TestOutputService10ProtocolTestJSONPayloadCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restjson.UnmarshalMeta(req)
|
||||
restjson.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", *out.Data.Foo)
|
||||
assert.Equal(t, "baz", *out.Header)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", *out.Data.Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "baz", *out.Header; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2179,11 +2270,17 @@ func TestOutputService11ProtocolTestStreamingPayloadCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restjson.UnmarshalMeta(req)
|
||||
restjson.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", string(out.Stream))
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", string(out.Stream); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2200,9 +2297,13 @@ func TestOutputService12ProtocolTestJSONValueTraitCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restjson.UnmarshalMeta(req)
|
||||
restjson.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
reflect.DeepEqual(out.Attr, map[string]interface{}{"Foo": "Bar"})
|
||||
}
|
||||
|
|
42
vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/build_bench_test.go
generated
vendored
42
vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/build_bench_test.go
generated
vendored
|
@ -55,13 +55,6 @@ func BenchmarkRESTXMLBuild_Complex_CFCreateDistro(b *testing.B) {
|
|||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTXMLRequest_Complex_CFCreateDistro(b *testing.B) {
|
||||
benchRESTXMLRequest(b, func() *request.Request {
|
||||
req, _ := cloudfrontSvc.CreateDistributionRequest(cloudfrontCreateDistributionInput())
|
||||
return req
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTXMLBuild_Simple_CFDeleteDistro(b *testing.B) {
|
||||
params := cloudfrontDeleteDistributionInput()
|
||||
|
||||
|
@ -71,13 +64,6 @@ func BenchmarkRESTXMLBuild_Simple_CFDeleteDistro(b *testing.B) {
|
|||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTXMLRequest_Simple_CFDeleteDistro(b *testing.B) {
|
||||
benchRESTXMLRequest(b, func() *request.Request {
|
||||
req, _ := cloudfrontSvc.DeleteDistributionRequest(cloudfrontDeleteDistributionInput())
|
||||
return req
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTXMLBuild_REST_S3HeadObject(b *testing.B) {
|
||||
params := s3HeadObjectInput()
|
||||
|
||||
|
@ -87,13 +73,6 @@ func BenchmarkRESTXMLBuild_REST_S3HeadObject(b *testing.B) {
|
|||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTXMLRequest_REST_S3HeadObject(b *testing.B) {
|
||||
benchRESTXMLRequest(b, func() *request.Request {
|
||||
req, _ := s3Svc.HeadObjectRequest(s3HeadObjectInput())
|
||||
return req
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTXMLBuild_XML_S3PutObjectAcl(b *testing.B) {
|
||||
params := s3PutObjectAclInput()
|
||||
|
||||
|
@ -103,6 +82,27 @@ func BenchmarkRESTXMLBuild_XML_S3PutObjectAcl(b *testing.B) {
|
|||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTXMLRequest_Complex_CFCreateDistro(b *testing.B) {
|
||||
benchRESTXMLRequest(b, func() *request.Request {
|
||||
req, _ := cloudfrontSvc.CreateDistributionRequest(cloudfrontCreateDistributionInput())
|
||||
return req
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTXMLRequest_Simple_CFDeleteDistro(b *testing.B) {
|
||||
benchRESTXMLRequest(b, func() *request.Request {
|
||||
req, _ := cloudfrontSvc.DeleteDistributionRequest(cloudfrontDeleteDistributionInput())
|
||||
return req
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTXMLRequest_REST_S3HeadObject(b *testing.B) {
|
||||
benchRESTXMLRequest(b, func() *request.Request {
|
||||
req, _ := s3Svc.HeadObjectRequest(s3HeadObjectInput())
|
||||
return req
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkRESTXMLRequest_XML_S3PutObjectAcl(b *testing.B) {
|
||||
benchRESTXMLRequest(b, func() *request.Request {
|
||||
req, _ := s3Svc.PutObjectAclRequest(s3PutObjectAclInput())
|
||||
|
|
1018
vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/build_test.go
generated
vendored
1018
vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/build_test.go
generated
vendored
File diff suppressed because it is too large
Load diff
544
vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/unmarshal_test.go
generated
vendored
544
vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/unmarshal_test.go
generated
vendored
|
@ -24,7 +24,6 @@ import (
|
|||
"github.com/aws/aws-sdk-go/private/protocol/restxml"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
|
||||
"github.com/aws/aws-sdk-go/private/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var _ bytes.Buffer // always import bytes
|
||||
|
@ -108,19 +107,18 @@ const opOutputService1TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService1TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService1TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService1TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService1TestCaseOperation1 for more information on using the OutputService1TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService1TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService1TestCaseOperation1Request(params)
|
||||
|
@ -177,19 +175,18 @@ const opOutputService1TestCaseOperation2 = "OperationName"
|
|||
|
||||
// OutputService1TestCaseOperation2Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService1TestCaseOperation2 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService1TestCaseOperation2 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService1TestCaseOperation2 method directly
|
||||
// instead.
|
||||
// See OutputService1TestCaseOperation2 for more information on using the OutputService1TestCaseOperation2
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService1TestCaseOperation2Request method.
|
||||
// req, resp := client.OutputService1TestCaseOperation2Request(params)
|
||||
|
@ -405,19 +402,18 @@ const opOutputService2TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService2TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService2TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService2TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService2TestCaseOperation1 for more information on using the OutputService2TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService2TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService2TestCaseOperation1Request(params)
|
||||
|
@ -550,19 +546,18 @@ const opOutputService3TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService3TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService3TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService3TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService3TestCaseOperation1 for more information on using the OutputService3TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService3TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService3TestCaseOperation1Request(params)
|
||||
|
@ -694,19 +689,18 @@ const opOutputService4TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService4TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService4TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService4TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService4TestCaseOperation1 for more information on using the OutputService4TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService4TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService4TestCaseOperation1Request(params)
|
||||
|
@ -838,19 +832,18 @@ const opOutputService5TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService5TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService5TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService5TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService5TestCaseOperation1 for more information on using the OutputService5TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService5TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService5TestCaseOperation1Request(params)
|
||||
|
@ -982,19 +975,18 @@ const opOutputService6TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService6TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService6TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService6TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService6TestCaseOperation1 for more information on using the OutputService6TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService6TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService6TestCaseOperation1Request(params)
|
||||
|
@ -1138,19 +1130,18 @@ const opOutputService7TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService7TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService7TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService7TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService7TestCaseOperation1 for more information on using the OutputService7TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService7TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService7TestCaseOperation1Request(params)
|
||||
|
@ -1282,19 +1273,18 @@ const opOutputService8TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService8TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService8TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService8TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService8TestCaseOperation1 for more information on using the OutputService8TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService8TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService8TestCaseOperation1Request(params)
|
||||
|
@ -1426,19 +1416,18 @@ const opOutputService9TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService9TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService9TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService9TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService9TestCaseOperation1 for more information on using the OutputService9TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService9TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService9TestCaseOperation1Request(params)
|
||||
|
@ -1590,19 +1579,18 @@ const opOutputService10TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService10TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService10TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService10TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService10TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService10TestCaseOperation1 for more information on using the OutputService10TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService10TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService10TestCaseOperation1Request(params)
|
||||
|
@ -1734,19 +1722,18 @@ const opOutputService11TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService11TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService11TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService11TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService11TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService11TestCaseOperation1 for more information on using the OutputService11TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService11TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService11TestCaseOperation1Request(params)
|
||||
|
@ -1942,19 +1929,18 @@ const opOutputService12TestCaseOperation1 = "OperationName"
|
|||
|
||||
// OutputService12TestCaseOperation1Request generates a "aws/request.Request" representing the
|
||||
// client's request for the OutputService12TestCaseOperation1 operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See OutputService12TestCaseOperation1 for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the OutputService12TestCaseOperation1 method directly
|
||||
// instead.
|
||||
// See OutputService12TestCaseOperation1 for more information on using the OutputService12TestCaseOperation1
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the OutputService12TestCaseOperation1Request method.
|
||||
// req, resp := client.OutputService12TestCaseOperation1Request(params)
|
||||
|
@ -2041,21 +2027,47 @@ func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "a", *out.Char)
|
||||
assert.Equal(t, 1.3, *out.Double)
|
||||
assert.Equal(t, false, *out.FalseBool)
|
||||
assert.Equal(t, 1.2, *out.Float)
|
||||
assert.Equal(t, "test", *out.ImaHeader)
|
||||
assert.Equal(t, "abc", *out.ImaHeaderLocation)
|
||||
assert.Equal(t, int64(200), *out.Long)
|
||||
assert.Equal(t, int64(123), *out.Num)
|
||||
assert.Equal(t, "myname", *out.Str)
|
||||
assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
|
||||
assert.Equal(t, true, *out.TrueBool)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "a", *out.Char; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.3, *out.Double; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := false, *out.FalseBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.2, *out.Float; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "test", *out.ImaHeader; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "abc", *out.ImaHeaderLocation; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(200), *out.Long; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(123), *out.Num; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "myname", *out.Str; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String(); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := true, *out.TrueBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2073,21 +2085,47 @@ func TestOutputService1ProtocolTestScalarMembersCase2(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "a", *out.Char)
|
||||
assert.Equal(t, 1.3, *out.Double)
|
||||
assert.Equal(t, false, *out.FalseBool)
|
||||
assert.Equal(t, 1.2, *out.Float)
|
||||
assert.Equal(t, "test", *out.ImaHeader)
|
||||
assert.Equal(t, "abc", *out.ImaHeaderLocation)
|
||||
assert.Equal(t, int64(200), *out.Long)
|
||||
assert.Equal(t, int64(123), *out.Num)
|
||||
assert.Equal(t, "", *out.Str)
|
||||
assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
|
||||
assert.Equal(t, true, *out.TrueBool)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "a", *out.Char; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.3, *out.Double; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := false, *out.FalseBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.2, *out.Float; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "test", *out.ImaHeader; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "abc", *out.ImaHeaderLocation; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(200), *out.Long; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(123), *out.Num; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "", *out.Str; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String(); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := true, *out.TrueBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2103,11 +2141,17 @@ func TestOutputService2ProtocolTestBlobCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "value", string(out.Blob))
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "value", string(out.Blob); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2123,12 +2167,20 @@ func TestOutputService3ProtocolTestListsCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", *out.ListMember[0])
|
||||
assert.Equal(t, "123", *out.ListMember[1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "123", *out.ListMember[1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2144,12 +2196,20 @@ func TestOutputService4ProtocolTestListWithCustomMemberNameCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", *out.ListMember[0])
|
||||
assert.Equal(t, "123", *out.ListMember[1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "123", *out.ListMember[1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2165,12 +2225,20 @@ func TestOutputService5ProtocolTestFlattenedListCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", *out.ListMember[0])
|
||||
assert.Equal(t, "123", *out.ListMember[1])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", *out.ListMember[0]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "123", *out.ListMember[1]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2186,12 +2254,20 @@ func TestOutputService6ProtocolTestNormalMapCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "bam", *out.Map["baz"].Foo)
|
||||
assert.Equal(t, "bar", *out.Map["qux"].Foo)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "bam", *out.Map["baz"].Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "bar", *out.Map["qux"].Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2207,12 +2283,20 @@ func TestOutputService7ProtocolTestFlattenedMapCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "bam", *out.Map["baz"])
|
||||
assert.Equal(t, "bar", *out.Map["qux"])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "bam", *out.Map["baz"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "bar", *out.Map["qux"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2228,12 +2312,20 @@ func TestOutputService8ProtocolTestNamedMapCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "bam", *out.Map["baz"])
|
||||
assert.Equal(t, "bar", *out.Map["qux"])
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "bam", *out.Map["baz"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "bar", *out.Map["qux"]; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2250,12 +2342,20 @@ func TestOutputService9ProtocolTestXMLPayloadCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", *out.Data.Foo)
|
||||
assert.Equal(t, "baz", *out.Header)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", *out.Data.Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "baz", *out.Header; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2271,11 +2371,17 @@ func TestOutputService10ProtocolTestStreamingPayloadCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "abc", string(out.Stream))
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "abc", string(out.Stream); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2300,19 +2406,41 @@ func TestOutputService11ProtocolTestScalarMembersInHeadersCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "a", *out.Char)
|
||||
assert.Equal(t, 1.5, *out.Double)
|
||||
assert.Equal(t, false, *out.FalseBool)
|
||||
assert.Equal(t, 1.5, *out.Float)
|
||||
assert.Equal(t, int64(1), *out.Integer)
|
||||
assert.Equal(t, int64(100), *out.Long)
|
||||
assert.Equal(t, "string", *out.Str)
|
||||
assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
|
||||
assert.Equal(t, true, *out.TrueBool)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "a", *out.Char; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.5, *out.Double; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := false, *out.FalseBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1.5, *out.Float; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(1), *out.Integer; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := int64(100), *out.Long; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := "string", *out.Str; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String(); e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if e, a := true, *out.TrueBool; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2328,10 +2456,16 @@ func TestOutputService12ProtocolTestEmptyStringCase1(t *testing.T) {
|
|||
// unmarshal response
|
||||
restxml.UnmarshalMeta(req)
|
||||
restxml.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
if req.Error != nil {
|
||||
t.Errorf("expect not error, got %v", req.Error)
|
||||
}
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
assert.Equal(t, "", *out.Foo)
|
||||
if out == nil {
|
||||
t.Errorf("expect not to be nil")
|
||||
}
|
||||
if e, a := "", *out.Foo; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue