// NewClient docomo APIのClientを生成する
349099
func NewClient(apiKey string) *Client {
	c := &Client{}

	c.domain = DomainURL
	c.apiKey = apiKey
	c.context = ""

	ctx := context.Background()
	c.Trend = &TrendService{client: c, ctx: ctx}
	c.KnowledgeQA = &KnowledgeQAService{client: c, ctx: ctx}
	c.Dialogue = &DialogueService{client: c, ctx: ctx}

	return c
}
597682
func NewClient(endpoint *Endpoint, user, password string) (*Client, error) {
	return NewClientWithParameters(endpoint, user, password, DefaultParameters)
}
1339463
func NewClient(config *Config) (*Client, error) {
	// bootstrap the config
	defConfig := DefaultConfig()

	if len(config.Address) == 0 {
		config.Address = defConfig.Address
	}

	if len(config.Scheme) == 0 {
		config.Scheme = defConfig.Scheme
	}

	if config.HttpClient == nil {
		config.HttpClient = defConfig.HttpClient
	}

	client := &Client{
		config: *config,
	}
	return client, nil
}
648060
func NewClient(accessKeyID, accessKeySecret string) *Client {
	c := new(Client)
	c.AccessKeyID = accessKeyID
	c.AccessKeySecret = accessKeySecret

	return c
}
410358
func NewClient() *Client {
	c := new(Client)
	c.SetSoftwareName(DefaultSoftwareName)
	c.logger = NewLogger()
	return c
}
962012
func NewClient(endpoint, apiKey string, client *http.Client) DPClient {
	baseURL, err := url.Parse(endpoint)
	if err != nil {
		panic(fmt.Sprintf("Could not parse endpoint base URL %q: %v", endpoint, err))
	}
	httpSink := sfxclient.NewHTTPSink()
	httpSink.AuthToken = apiKey
	httpSink.DatapointEndpoint = baseURL.ResolveReference(datapointURL).String()
	httpSink.EventEndpoint = baseURL.ResolveReference(eventURL).String()
	httpSink.Client = client
	return httpSink
}
421391
func NewClient(accessKeyId, accessKeySecret string) *Client {
	return &Client{
		accessKeyId:     accessKeyId,
		accessKeySecret: accessKeySecret,
		internal:        false,
		//region:          region,
		version:    APIVersion,
		endpoint:   DefaultEndpoint,
		httpClient: &http.Client{},
	}
}
854638
func NewClient(baseAddr string) *Client {
	return &Client{
		baseAddr: baseAddr,
		client:   &http.Client{},
	}
}
559543
func NewClient(host string, port int) (client *Client, err error) {
	client = new(Client)
	client.Host = host
	client.Port = port
	client.Connection, err = net.Dial("tcp", fmt.Sprintf("%v:%v", client.Host, client.Port))
	return
}
220445
func NewClient(caller base.APICaller) (*Client, error) {
	modelTag, isModel := caller.ModelTag()
	if !isModel {
		return nil, errors.New("expected model specific API connection")
	}
	facadeCaller := base.NewFacadeCaller(caller, firewallerFacade)
	return &Client{
		facade:       facadeCaller,
		ModelWatcher: common.NewModelWatcher(facadeCaller),
		CloudSpecAPI: cloudspec.NewCloudSpecAPI(facadeCaller, modelTag),
	}, nil
}
1334149
func NewClient(caller base.APICallCloser) *Client {
	return NewClientWithCache(caller, NewMacaroonCache(clock.WallClock))
}
1126099
func NewClient() (*Client, error) {
	cc := ClientConfig{
		ChunkSize:   1420,
		Compression: COMP_GZIP,
	}
	return NewClientWithConfig(cc)
}
953552
func NewClient(opts ...ClientOption) *Client {
	client := &Client{
		client:  &http.Client{Timeout: defaultTimeout},
		baseURL: defaultBaseURL,
	}
	for _, opt := range opts {
		opt(client)
	}
	return client
}
389347
func NewClient(parentCtx context.Context, region, host string) (*Client, error) {
	if host == "" {
		return nil, fmt.Errorf("Invalid host")
	}
	if region == "" || region == "[" {
		return nil, fmt.Errorf("Invalid region")
	}

	ctx, cancel := context.WithCancel(parentCtx)
	return &Client{
		push:        make(chan string, 100), // FIXME verify if buffered make sense here
		sub:         make(chan string, 100), // FIXME verify if buffered make sense here
		host:        host,
		region:      region,
		ctx:         ctx,
		cancel:      cancel,
		exitSignal:  make(chan struct{}),
		readySignal: make(chan interface{}),
	}, nil
}
515987
func NewClient(st base.APICallCloser) *Client {
	frontend, backend := base.NewClientFacade(st, "FirewallRules")
	return &Client{ClientFacade: frontend, st: st, facade: backend}
}
123623
func NewClient() (*Client, error) {
	osdbServer := os.Getenv("OSDB_SERVER")
	if osdbServer == "" {
		osdbServer = DefaultOSDBServer
	}
	rpc, err := xmlrpc.NewClient(osdbServer, nil)
	if err != nil {
		return nil, err
	}

	c := &Client{
		UserAgent: DefaultUserAgent,
		Client:    rpc, // xmlrpc.Client
	}

	return c, nil
}
831634
func (c ClientConfig) NewClient(entities ...dosa.DomainObject) (dosa.Client, error) {
	reg, err := dosa.NewRegistrar(c.Scope, c.NamePrefix, entities...)
	if err != nil {
		return nil, err
	}

	conn, err := NewConnector(c.Yarpc)
	if err != nil {
		return nil, err
	}

	return dosa.NewClient(reg, conn), nil
}