// Build builds a request for the REST JSON protocol. func Build(r *request.Request) { rest.Build(r) if t := rest.PayloadType(r.Params); t == "structure" || t == "" { jsonrpc.Build(r) } }
func BenchmarkRESTBuild_Complex_elastictranscoderCreateJobInput(b *testing.B) { svc := awstesting.NewClient() svc.ServiceName = "elastictranscoder" svc.APIVersion = "2012-09-25" 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 BenchmarkRESTBuild_Simple_elastictranscoderListJobsByPipeline(b *testing.B) { svc := awstesting.NewClient() svc.ServiceName = "elastictranscoder" svc.APIVersion = "2012-09-25" params := &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) rest.Build(r) if r.Error != nil { b.Fatal("Unexpected error", r.Error) } } }