// NewV4SigningClientWithHTTPClient returns an *http.Client that will sign all requests with AWS V4 Signing.
482996
func NewV4SigningClientWithHTTPClient(creds *credentials.Credentials, region string, httpClient *http.Client) *http.Client {
	return &http.Client{
		Transport: Transport{
			client: httpClient,
			creds:  creds,
			signer: v4.NewSigner(creds),
			region: region,
		},
	}
}
1345598
func NewClient(clientID string, secret string, APIBase string) (*Client, error) {
	if clientID == "" || secret == "" || APIBase == "" {
		return nil, errors.New("ClientID, Secret and APIBase are required to create a Client")
	}

	return &Client{
		Client:   &http.Client{},
		ClientID: clientID,
		Secret:   secret,
		APIBase:  APIBase,
	}, nil
}
1086164
func (o *PutEndpointIDParams) WithHTTPClient(client *http.Client) *PutEndpointIDParams {
	o.SetHTTPClient(client)
	return o
}
175269
func New(v4s *v4.Signer, client *http.Client, service string, region string) (*http.Client, error) {
	c := client
	switch {
	case v4s == nil:
		return nil, MissingSignerError{}
	case service == "":
		return nil, MissingServiceError{}
	case region == "":
		return nil, MissingRegionError{}
	case c == nil:
		c = http.DefaultClient
	}
	s := &Signer{
		transport: c.Transport,
		v4:        v4s,
		service:   service,
		region:    region,
		logger:    log.New(ioutil.Discard, "", 0),
	}
	if s.transport == nil {
		s.transport = http.DefaultTransport
	}
	signer = s
	c.Transport = s
	return c, nil
}
346218
func (o *CreateJSONWebKeySetParams) WithHTTPClient(client *http.Client) *CreateJSONWebKeySetParams {
	o.SetHTTPClient(client)
	return o
}
421621
func newClient(server string, opts ...client.ClientOption) *client.Client {
	if server == "" {
		return client.NewOrFail(opts...)
	}
	cl := client.NewOrFail(append(opts[:len(opts):cap(opts)], client.OptionServer(server))...)
	if err := cl.SetupAuth(); err != nil {
		log.Fatalf("Could not setup auth for connecting to %v: %v", server, err)
	}
	return cl
}
886354
func NewClient(auth Auth) *Client {
	return &Client{auth: auth, client: http.DefaultClient}
}
287681
func (o *FlushInactiveOAuth2TokensParams) WithHTTPClient(client *http.Client) *FlushInactiveOAuth2TokensParams {
	o.SetHTTPClient(client)
	return o
}
225137
func WithHttpClient(client *http.Client) ConfigOption {
	return func(o *configOption) {
		o.httpClient = client
	}
}
1304672
func NewV4(endpoint string, accessKeyID, secretAccessKey string, secure bool) (*Client, error) {
	creds := credentials.NewStaticV4(accessKeyID, secretAccessKey, "")
	clnt, err := privateNew(endpoint, creds, secure, "", BucketLookupAuto)
	if err != nil {
		return nil, err
	}
	clnt.overrideSignerType = credentials.SignatureV4
	return clnt, nil
}
1365766
func NewVPCClient(accessKeyId string, accessKeySecret string, regionID common.Region) *Client {
	return NewVPCClientWithSecurityToken(accessKeyId, accessKeySecret, "", regionID)
}
550895
func (o *UserinfoParams) WithHTTPClient(client *http.Client) *UserinfoParams {
	o.SetHTTPClient(client)
	return o
}
221554
func NewClientWithCodec(codec ClientCodec) *Client {
	client := &Client{
		codec:   codec,
		pending: make(map[uint64]*Call),
	}
	go client.input()
	return client
}
884459
func (o *IsInstanceAliveParams) WithHTTPClient(client *http.Client) *IsInstanceAliveParams {
	o.SetHTTPClient(client)
	return o
}
252797
func NewClient(createConnection Dialer, s Signer, signerCacheSize uint) *Client {
	return &Client{
		createConnection: createConnection,
		signRequest:      NewMemoizeSigner(s, signerCacheSize).Sign,
	}
}
979325
func isRequestSignatureV4(r *http.Request) bool {
	return strings.HasPrefix(r.Header.Get("Authorization"), signV4Algorithm)
}
849456
func (o *GetOAuth2ClientParams) WithHTTPClient(client *http.Client) *GetOAuth2ClientParams {
	o.SetHTTPClient(client)
	return o
}