Conver to regular Go vendor + dep tool

This commit is contained in:
Andrey Smirnov
2017-03-22 17:38:32 +03:00
parent 070347295e
commit c6c1012330
3260 changed files with 1742550 additions and 72 deletions
File diff suppressed because it is too large Load Diff
+128
View File
@@ -0,0 +1,128 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Package batchiface provides an interface to enable mocking the AWS Batch service client
// for testing your code.
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters.
package batchiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/batch"
)
// BatchAPI provides an interface to enable mocking the
// batch.Batch service client's API operation,
// paginators, and waiters. This make unit testing your code that calls out
// to the SDK's service client's calls easier.
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // AWS Batch.
// func myFunc(svc batchiface.BatchAPI) bool {
// // Make svc.CancelJob request
// }
//
// func main() {
// sess := session.New()
// svc := batch.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockBatchClient struct {
// batchiface.BatchAPI
// }
// func (m *mockBatchClient) CancelJob(input *batch.CancelJobInput) (*batch.CancelJobOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockBatchClient{}
//
// myfunc(mockSvc)
//
// // Verify myFunc's functionality
// }
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type BatchAPI interface {
CancelJob(*batch.CancelJobInput) (*batch.CancelJobOutput, error)
CancelJobWithContext(aws.Context, *batch.CancelJobInput, ...request.Option) (*batch.CancelJobOutput, error)
CancelJobRequest(*batch.CancelJobInput) (*request.Request, *batch.CancelJobOutput)
CreateComputeEnvironment(*batch.CreateComputeEnvironmentInput) (*batch.CreateComputeEnvironmentOutput, error)
CreateComputeEnvironmentWithContext(aws.Context, *batch.CreateComputeEnvironmentInput, ...request.Option) (*batch.CreateComputeEnvironmentOutput, error)
CreateComputeEnvironmentRequest(*batch.CreateComputeEnvironmentInput) (*request.Request, *batch.CreateComputeEnvironmentOutput)
CreateJobQueue(*batch.CreateJobQueueInput) (*batch.CreateJobQueueOutput, error)
CreateJobQueueWithContext(aws.Context, *batch.CreateJobQueueInput, ...request.Option) (*batch.CreateJobQueueOutput, error)
CreateJobQueueRequest(*batch.CreateJobQueueInput) (*request.Request, *batch.CreateJobQueueOutput)
DeleteComputeEnvironment(*batch.DeleteComputeEnvironmentInput) (*batch.DeleteComputeEnvironmentOutput, error)
DeleteComputeEnvironmentWithContext(aws.Context, *batch.DeleteComputeEnvironmentInput, ...request.Option) (*batch.DeleteComputeEnvironmentOutput, error)
DeleteComputeEnvironmentRequest(*batch.DeleteComputeEnvironmentInput) (*request.Request, *batch.DeleteComputeEnvironmentOutput)
DeleteJobQueue(*batch.DeleteJobQueueInput) (*batch.DeleteJobQueueOutput, error)
DeleteJobQueueWithContext(aws.Context, *batch.DeleteJobQueueInput, ...request.Option) (*batch.DeleteJobQueueOutput, error)
DeleteJobQueueRequest(*batch.DeleteJobQueueInput) (*request.Request, *batch.DeleteJobQueueOutput)
DeregisterJobDefinition(*batch.DeregisterJobDefinitionInput) (*batch.DeregisterJobDefinitionOutput, error)
DeregisterJobDefinitionWithContext(aws.Context, *batch.DeregisterJobDefinitionInput, ...request.Option) (*batch.DeregisterJobDefinitionOutput, error)
DeregisterJobDefinitionRequest(*batch.DeregisterJobDefinitionInput) (*request.Request, *batch.DeregisterJobDefinitionOutput)
DescribeComputeEnvironments(*batch.DescribeComputeEnvironmentsInput) (*batch.DescribeComputeEnvironmentsOutput, error)
DescribeComputeEnvironmentsWithContext(aws.Context, *batch.DescribeComputeEnvironmentsInput, ...request.Option) (*batch.DescribeComputeEnvironmentsOutput, error)
DescribeComputeEnvironmentsRequest(*batch.DescribeComputeEnvironmentsInput) (*request.Request, *batch.DescribeComputeEnvironmentsOutput)
DescribeJobDefinitions(*batch.DescribeJobDefinitionsInput) (*batch.DescribeJobDefinitionsOutput, error)
DescribeJobDefinitionsWithContext(aws.Context, *batch.DescribeJobDefinitionsInput, ...request.Option) (*batch.DescribeJobDefinitionsOutput, error)
DescribeJobDefinitionsRequest(*batch.DescribeJobDefinitionsInput) (*request.Request, *batch.DescribeJobDefinitionsOutput)
DescribeJobQueues(*batch.DescribeJobQueuesInput) (*batch.DescribeJobQueuesOutput, error)
DescribeJobQueuesWithContext(aws.Context, *batch.DescribeJobQueuesInput, ...request.Option) (*batch.DescribeJobQueuesOutput, error)
DescribeJobQueuesRequest(*batch.DescribeJobQueuesInput) (*request.Request, *batch.DescribeJobQueuesOutput)
DescribeJobs(*batch.DescribeJobsInput) (*batch.DescribeJobsOutput, error)
DescribeJobsWithContext(aws.Context, *batch.DescribeJobsInput, ...request.Option) (*batch.DescribeJobsOutput, error)
DescribeJobsRequest(*batch.DescribeJobsInput) (*request.Request, *batch.DescribeJobsOutput)
ListJobs(*batch.ListJobsInput) (*batch.ListJobsOutput, error)
ListJobsWithContext(aws.Context, *batch.ListJobsInput, ...request.Option) (*batch.ListJobsOutput, error)
ListJobsRequest(*batch.ListJobsInput) (*request.Request, *batch.ListJobsOutput)
RegisterJobDefinition(*batch.RegisterJobDefinitionInput) (*batch.RegisterJobDefinitionOutput, error)
RegisterJobDefinitionWithContext(aws.Context, *batch.RegisterJobDefinitionInput, ...request.Option) (*batch.RegisterJobDefinitionOutput, error)
RegisterJobDefinitionRequest(*batch.RegisterJobDefinitionInput) (*request.Request, *batch.RegisterJobDefinitionOutput)
SubmitJob(*batch.SubmitJobInput) (*batch.SubmitJobOutput, error)
SubmitJobWithContext(aws.Context, *batch.SubmitJobInput, ...request.Option) (*batch.SubmitJobOutput, error)
SubmitJobRequest(*batch.SubmitJobInput) (*request.Request, *batch.SubmitJobOutput)
TerminateJob(*batch.TerminateJobInput) (*batch.TerminateJobOutput, error)
TerminateJobWithContext(aws.Context, *batch.TerminateJobInput, ...request.Option) (*batch.TerminateJobOutput, error)
TerminateJobRequest(*batch.TerminateJobInput) (*request.Request, *batch.TerminateJobOutput)
UpdateComputeEnvironment(*batch.UpdateComputeEnvironmentInput) (*batch.UpdateComputeEnvironmentOutput, error)
UpdateComputeEnvironmentWithContext(aws.Context, *batch.UpdateComputeEnvironmentInput, ...request.Option) (*batch.UpdateComputeEnvironmentOutput, error)
UpdateComputeEnvironmentRequest(*batch.UpdateComputeEnvironmentInput) (*request.Request, *batch.UpdateComputeEnvironmentOutput)
UpdateJobQueue(*batch.UpdateJobQueueInput) (*batch.UpdateJobQueueOutput, error)
UpdateJobQueueWithContext(aws.Context, *batch.UpdateJobQueueInput, ...request.Option) (*batch.UpdateJobQueueOutput, error)
UpdateJobQueueRequest(*batch.UpdateJobQueueInput) (*request.Request, *batch.UpdateJobQueueOutput)
}
var _ BatchAPI = (*batch.Batch)(nil)
+20
View File
@@ -0,0 +1,20 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package batch
const (
// ErrCodeClientException for service response error code
// "ClientException".
//
// These errors are usually caused by a client action, such as using an action
// or resource on behalf of a user that doesn't have permission to use the action
// or resource, or specifying an identifier that is not valid.
ErrCodeClientException = "ClientException"
// ErrCodeServerException for service response error code
// "ServerException".
//
// These errors are usually caused by a server issue.
ErrCodeServerException = "ServerException"
)
+508
View File
@@ -0,0 +1,508 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package batch_test
import (
"bytes"
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/batch"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleBatch_CancelJob() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.CancelJobInput{
JobId: aws.String("String"), // Required
Reason: aws.String("String"), // Required
}
resp, err := svc.CancelJob(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_CreateComputeEnvironment() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.CreateComputeEnvironmentInput{
ComputeEnvironmentName: aws.String("String"), // Required
ServiceRole: aws.String("String"), // Required
Type: aws.String("CEType"), // Required
ComputeResources: &batch.ComputeResource{
InstanceRole: aws.String("String"), // Required
InstanceTypes: []*string{ // Required
aws.String("String"), // Required
// More values...
},
MaxvCpus: aws.Int64(1), // Required
MinvCpus: aws.Int64(1), // Required
SecurityGroupIds: []*string{ // Required
aws.String("String"), // Required
// More values...
},
Subnets: []*string{ // Required
aws.String("String"), // Required
// More values...
},
Type: aws.String("CRType"), // Required
BidPercentage: aws.Int64(1),
DesiredvCpus: aws.Int64(1),
Ec2KeyPair: aws.String("String"),
SpotIamFleetRole: aws.String("String"),
Tags: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
},
State: aws.String("CEState"),
}
resp, err := svc.CreateComputeEnvironment(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_CreateJobQueue() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.CreateJobQueueInput{
ComputeEnvironmentOrder: []*batch.ComputeEnvironmentOrder{ // Required
{ // Required
ComputeEnvironment: aws.String("String"), // Required
Order: aws.Int64(1), // Required
},
// More values...
},
JobQueueName: aws.String("String"), // Required
Priority: aws.Int64(1), // Required
State: aws.String("JQState"),
}
resp, err := svc.CreateJobQueue(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DeleteComputeEnvironment() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DeleteComputeEnvironmentInput{
ComputeEnvironment: aws.String("String"), // Required
}
resp, err := svc.DeleteComputeEnvironment(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DeleteJobQueue() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DeleteJobQueueInput{
JobQueue: aws.String("String"), // Required
}
resp, err := svc.DeleteJobQueue(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DeregisterJobDefinition() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DeregisterJobDefinitionInput{
JobDefinition: aws.String("String"), // Required
}
resp, err := svc.DeregisterJobDefinition(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DescribeComputeEnvironments() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DescribeComputeEnvironmentsInput{
ComputeEnvironments: []*string{
aws.String("String"), // Required
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("String"),
}
resp, err := svc.DescribeComputeEnvironments(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DescribeJobDefinitions() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DescribeJobDefinitionsInput{
JobDefinitionName: aws.String("String"),
JobDefinitions: []*string{
aws.String("String"), // Required
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("String"),
Status: aws.String("String"),
}
resp, err := svc.DescribeJobDefinitions(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DescribeJobQueues() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DescribeJobQueuesInput{
JobQueues: []*string{
aws.String("String"), // Required
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("String"),
}
resp, err := svc.DescribeJobQueues(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_DescribeJobs() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.DescribeJobsInput{
Jobs: []*string{ // Required
aws.String("String"), // Required
// More values...
},
}
resp, err := svc.DescribeJobs(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_ListJobs() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.ListJobsInput{
JobQueue: aws.String("String"), // Required
JobStatus: aws.String("JobStatus"),
MaxResults: aws.Int64(1),
NextToken: aws.String("String"),
}
resp, err := svc.ListJobs(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_RegisterJobDefinition() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.RegisterJobDefinitionInput{
JobDefinitionName: aws.String("String"), // Required
Type: aws.String("JobDefinitionType"), // Required
ContainerProperties: &batch.ContainerProperties{
Image: aws.String("String"), // Required
Memory: aws.Int64(1), // Required
Vcpus: aws.Int64(1), // Required
Command: []*string{
aws.String("String"), // Required
// More values...
},
Environment: []*batch.KeyValuePair{
{ // Required
Name: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
JobRoleArn: aws.String("String"),
MountPoints: []*batch.MountPoint{
{ // Required
ContainerPath: aws.String("String"),
ReadOnly: aws.Bool(true),
SourceVolume: aws.String("String"),
},
// More values...
},
Privileged: aws.Bool(true),
ReadonlyRootFilesystem: aws.Bool(true),
Ulimits: []*batch.Ulimit{
{ // Required
HardLimit: aws.Int64(1), // Required
Name: aws.String("String"), // Required
SoftLimit: aws.Int64(1), // Required
},
// More values...
},
User: aws.String("String"),
Volumes: []*batch.Volume{
{ // Required
Host: &batch.Host{
SourcePath: aws.String("String"),
},
Name: aws.String("String"),
},
// More values...
},
},
Parameters: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
}
resp, err := svc.RegisterJobDefinition(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_SubmitJob() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.SubmitJobInput{
JobDefinition: aws.String("String"), // Required
JobName: aws.String("String"), // Required
JobQueue: aws.String("String"), // Required
ContainerOverrides: &batch.ContainerOverrides{
Command: []*string{
aws.String("String"), // Required
// More values...
},
Environment: []*batch.KeyValuePair{
{ // Required
Name: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
Memory: aws.Int64(1),
Vcpus: aws.Int64(1),
},
DependsOn: []*batch.JobDependency{
{ // Required
JobId: aws.String("String"),
},
// More values...
},
Parameters: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
}
resp, err := svc.SubmitJob(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_TerminateJob() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.TerminateJobInput{
JobId: aws.String("String"), // Required
Reason: aws.String("String"), // Required
}
resp, err := svc.TerminateJob(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_UpdateComputeEnvironment() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.UpdateComputeEnvironmentInput{
ComputeEnvironment: aws.String("String"), // Required
ComputeResources: &batch.ComputeResourceUpdate{
DesiredvCpus: aws.Int64(1),
MaxvCpus: aws.Int64(1),
MinvCpus: aws.Int64(1),
},
ServiceRole: aws.String("String"),
State: aws.String("CEState"),
}
resp, err := svc.UpdateComputeEnvironment(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleBatch_UpdateJobQueue() {
sess := session.Must(session.NewSession())
svc := batch.New(sess)
params := &batch.UpdateJobQueueInput{
JobQueue: aws.String("String"), // Required
ComputeEnvironmentOrder: []*batch.ComputeEnvironmentOrder{
{ // Required
ComputeEnvironment: aws.String("String"), // Required
Order: aws.Int64(1), // Required
},
// More values...
},
Priority: aws.Int64(1),
State: aws.String("JQState"),
}
resp, err := svc.UpdateJobQueue(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
+108
View File
@@ -0,0 +1,108 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package batch
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
// AWS Batch enables you to run batch computing workloads on the AWS Cloud.
// Batch computing is a common way for developers, scientists, and engineers
// to access large amounts of compute resources, and AWS Batch removes the undifferentiated
// heavy lifting of configuring and managing the required infrastructure. AWS
// Batch will be familiar to users of traditional batch computing software.
// This service can efficiently provision resources in response to jobs submitted
// in order to eliminate capacity constraints, reduce compute costs, and deliver
// results quickly.
//
// As a fully managed service, AWS Batch enables developers, scientists, and
// engineers to run batch computing workloads of any scale. AWS Batch automatically
// provisions compute resources and optimizes the workload distribution based
// on the quantity and scale of the workloads. With AWS Batch, there is no need
// to install or manage batch computing software, which allows you to focus
// on analyzing results and solving problems. AWS Batch reduces operational
// complexities, saves time, and reduces costs, which makes it easy for developers,
// scientists, and engineers to run their batch jobs in the AWS Cloud.
// The service client's operations are safe to be used concurrently.
// It is not safe to mutate any of the client's properties though.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10
type Batch struct {
*client.Client
}
// Used for custom client initialization logic
var initClient func(*client.Client)
// Used for custom request initialization logic
var initRequest func(*request.Request)
// Service information constants
const (
ServiceName = "batch" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)
// New creates a new instance of the Batch client with a session.
// If additional configuration is needed for the client instance use the optional
// aws.Config parameter to add your extra config.
//
// Example:
// // Create a Batch client from just a session.
// svc := batch.New(mySession)
//
// // Create a Batch client with additional configuration
// svc := batch.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *Batch {
c := p.ClientConfig(EndpointsID, cfgs...)
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Batch {
svc := &Batch{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2016-08-10",
JSONVersion: "1.1",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a Batch operation and runs any
// custom request initialization.
func (c *Batch) newRequest(op *request.Operation, params, data interface{}) *request.Request {
req := c.NewRequest(op, params, data)
// Run custom request initialization if present
if initRequest != nil {
initRequest(req)
}
return req
}