// GreetingSetting sends settings for greeting
171373
func (m *Messenger) GreetingSetting(text string) error {
	d := GreetingSetting{
		SettingType: "greeting",
		Greeting: GreetingInfo{
			Text: text,
		},
	}

	data, err := json.Marshal(d)
	if err != nil {
		return err
	}

	req, err := http.NewRequest("POST", SendSettingsURL, bytes.NewBuffer(data))
	if err != nil {
		return err
	}

	req.Header.Set("Content-Type", "application/json")
	req.URL.RawQuery = "access_token=" + m.token

	client := &http.Client{}

	resp, err := client.Do(req)
	if err != nil {
		return err
	}
	defer resp.Body.Close()

	return checkFacebookError(resp.Body)
}
1086625
func GetSettings(c context.Context) *Settings {
	if s, ok := c.Value(contextKey(0)).(*Settings); ok && s != nil {
		return s
	}
	return nil
}
915289
func (r *Request) Setting(setting Settings) *Request {
	r.setting = setting
	return r
}
1172080
func Hello(ctx *cli.Context) command.Command {
	usage := "hello"
	desc := "Returns a greeting"

	return command.NewCommand("hello", usage, desc, func(args ...string) ([]byte, error) {
		return []byte("hey what's up?"), nil
	})
}
1027866
func (s *Settings) UseSettings(settings *Settings) {
	if settings.Token != "" {
		s.Token = settings.Token
	}
	if settings.ProjectId != "" {
		s.ProjectId = settings.ProjectId
	}
	if settings.Host != "" {
		s.Host = settings.Host
	}
	if settings.Scheme != "" {
		s.Scheme = settings.Scheme
	}
	if settings.ApiVersion != "" {
		s.ApiVersion = settings.ApiVersion
	}
	if settings.UserAgent != "" {
		s.UserAgent = settings.UserAgent
	}
	if settings.Port > 0 {
		s.Port = settings.Port
	}
}
1069157
func (s *DemoServiceServer) SayHello(ctx context.Context, request *pb.HelloRequest) (*pb.HelloResponse, error) {
	customizedCounterMetric.WithLabelValues(request.Name).Inc()
	return &pb.HelloResponse{Message: fmt.Sprintf("Hello %s", request.Name)}, nil
}
1370714
func (v *VPCRouter) HasSetting() bool {
	return v.Settings != nil && v.Settings.Router != nil
}
547317
func (m *MobileGateway) HasSetting() bool {
	return m.Settings != nil && m.Settings.MobileGateway != nil
}
565928
func Welcome(w http.ResponseWriter, r *http.Request) {
	if r.URL.Path != "/" {
		http.Error(w, "Invalid API endpoint", 404)
		return
	}
	w.Write([]byte("Welcome to tiedot"))
}
219190
func (b *HttpRequest) Setting(setting HttpSettings) *HttpRequest {
	b.setting = setting
	return b
}
835313
func (this Application) Welcome() {
	this.Data = struct {
		Name    string
		Awesome bool
	}{
		Name:    this.Params["name"],
		Awesome: len(this.Options["awesome"]) == 1,
	}
	this.Render("spec/views/welcome.html")
}
946993
func (f *Font) SetHinting(hinting int) {
	C.TTF_SetFontHinting(f.f, C.int(hinting))
}
869326
func (api *VPCRouterAPI) UpdateSetting(id int64, value *sacloud.VPCRouter) (*sacloud.VPCRouter, error) {
	req := &sacloud.VPCRouter{
		// Settings
		Settings: value.Settings,
	}
	return api.request(func(res *vpcRouterResponse) error {
		return api.update(id, api.createRequest(req), res)
	})
}
802543
func (s *GetServiceSettingOutput) SetServiceSetting(v *ServiceSetting) *GetServiceSettingOutput {
	s.ServiceSetting = v
	return s
}
394818
func (c *Client) IndexPutSettings(indices ...string) *IndicesPutSettingsService {
	return NewIndicesPutSettingsService(c).Index(indices...)
}
294314
func (s *CreateJobTemplateInput) SetAccelerationSettings(v *AccelerationSettings) *CreateJobTemplateInput {
	s.AccelerationSettings = v
	return s
}
700397
func callSayHello(c hwpb.GreeterClient, name string) {
	ctx, cancel := context.WithTimeout(context.Background(), time.Second)
	defer cancel()
	r, err := c.SayHello(ctx, &hwpb.HelloRequest{Name: name})
	if err != nil {
		log.Fatalf("client.SayHello(_) = _, %v", err)
	}
	fmt.Println("Greeting: ", r.Message)
}