// RequestComment requests that the user's actual comment (i.e. non-hashed) be
// sent to the client.
481247
func (u *User) RequestComment() {
	packet := MumbleProto.RequestBlob{
		SessionComment: []uint32{u.Session},
	}
	u.client.Conn.WriteProto(&packet)
}
611073
func (s *DisassociateVPCFromHostedZoneInput) SetComment(v string) *DisassociateVPCFromHostedZoneInput {
	s.Comment = &v
	return s
}
1155743
func (c *ReactionsRemoveCall) FileComment(fileComment string) *ReactionsRemoveCall {
	c.fileComment = fileComment
	return c
}
474753
func (c oauthClient) CreateTaskComment(text string, taskID uint) (wl.TaskComment, error) {
	if taskID == 0 {
		return wl.TaskComment{}, errors.New("taskID must be > 0")
	}

	body := []byte(fmt.Sprintf(`{"text":"%s","task_id":%d}`, text, taskID))

	url := fmt.Sprintf("%s/task_comments", c.apiURL)

	req, err := c.newPostRequest(url, body)
	if err != nil {
		return wl.TaskComment{}, err
	}

	resp, err := c.do(req)
	if err != nil {
		return wl.TaskComment{}, err
	}

	if resp.StatusCode != http.StatusCreated {
		return wl.TaskComment{}, fmt.Errorf("Unexpected response code %d - expected %d", resp.StatusCode, http.StatusCreated)
	}

	taskComment := wl.TaskComment{}
	err = json.NewDecoder(resp.Body).Decode(&taskComment)
	if err != nil {
		return wl.TaskComment{}, err
	}
	return taskComment, nil
}
1151357
func (c *Comments) AddComment(comment *Comment) {
	if c.primary {
		if !c.wasLineBreak {
			c.Comments = append(c.Comments, comment)
		} else {
			c.future = append(c.future, comment)
		}
	} else {
		if !c.wasLineBreak || (c.Current == nil && !c.afterBlock) {
			c.Comments = append(c.Comments, comment)
		} else {
			c.future = append(c.future, comment)
		}
	}
}
414344
func (s *PublicKeyConfig) SetComment(v string) *PublicKeyConfig {
	s.Comment = &v
	return s
}
188405
func (f *File) addComment(commentsXML, cell string, formatSet *formatComment) {
	a := formatSet.Author
	t := formatSet.Text
	if len(a) > 255 {
		a = a[0:255]
	}
	if len(t) > 32512 {
		t = t[0:32512]
	}
	comments := f.commentsReader(commentsXML)
	if comments == nil {
		comments = &xlsxComments{
			Authors: []xlsxAuthor{
				{
					Author: formatSet.Author,
				},
			},
		}
	}
	cmt := xlsxComment{
		Ref:      cell,
		AuthorID: 0,
		Text: xlsxText{
			R: []xlsxR{
				{
					RPr: &xlsxRPr{
						B:  " ",
						Sz: &attrValFloat{Val: 9},
						Color: &xlsxColor{
							Indexed: 81,
						},
						RFont:  &attrValString{Val: "Calibri"},
						Family: &attrValInt{Val: 2},
					},
					T: a,
				},
				{
					RPr: &xlsxRPr{
						Sz: &attrValFloat{Val: 9},
						Color: &xlsxColor{
							Indexed: 81,
						},
						RFont:  &attrValString{Val: "Calibri"},
						Family: &attrValInt{Val: 2},
					},
					T: t,
				},
			},
		},
	}
	comments.CommentList.Comment = append(comments.CommentList.Comment, cmt)
	f.Comments[commentsXML] = comments
}
1184649
func (s *FieldLevelEncryptionProfileConfig) SetComment(v string) *FieldLevelEncryptionProfileConfig {
	s.Comment = &v
	return s
}
382019
func makeComment(cmap map[string]interface{}) *Comment {
	ret := new(Comment)
	ret.Author, _ = cmap["author"].(string)
	ret.Body, _ = cmap["body"].(string)
	ret.BodyHTML, _ = cmap["body_html"].(string)
	ret.Subreddit, _ = cmap["subreddit"].(string)
	ret.LinkID, _ = cmap["link_id"].(string)
	ret.ParentID, _ = cmap["parent_id"].(string)
	ret.SubredditID, _ = cmap["subreddit_id"].(string)
	ret.FullID, _ = cmap["name"].(string)
	ret.Permalink, _ = cmap["permalink"].(string)
	ret.Score, _ = cmap["score"].(float64)
	ret.UpVotes, _ = cmap["ups"].(float64)
	ret.DownVotes, _ = cmap["downs"].(float64)
	ret.Created, _ = cmap["created_utc"].(float64)
	ret.Edited, _ = cmap["edited"].(bool)
	ret.BannedBy, _ = cmap["banned_by"].(*string)
	ret.ApprovedBy, _ = cmap["approved_by"].(*string)
	ret.AuthorFlairTxt, _ = cmap["author_flair_text"].(*string)
	ret.AuthorFlairCSSClass, _ = cmap["author_flair_css_class"].(*string)
	ret.NumReports, _ = cmap["num_reports"].(*int)
	ret.Likes, _ = cmap["likes"].(*int)

	helper := new(helper)
	helper.buildComments(cmap["replies"])
	ret.Replies = helper.comments

	return ret
}
2795
func (s *Column) SetComment(v string) *Column {
	s.Comment = &v
	return s
}
1258973
func (s Session) RedditorComments(username string, params ListingOptions) ([]*Comment, error) {
	v, err := query.Values(params)
	if err != nil {
		return nil, err
	}

	baseUrl := "https://www.reddit.com"

	// If username given, add to URL
	if username != "" {
		baseUrl += "/user/" + username
	}

	redditUrl := fmt.Sprintf(baseUrl+"/comments.json?%s", v.Encode())

	req := request{
		url:       redditUrl,
		useragent: s.useragent,
	}

	body, err := req.getResponse()
	if err != nil {
		return nil, err
	}

	var comments interface{}
	if err = json.NewDecoder(body).Decode(&comments); err != nil {
		return nil, err
	}
	helper := new(helper)
	helper.buildComments(comments)

	return helper.comments, nil
}
1290971
func (p *PullRequest) GetCommentsURL() string {
	if p == nil || p.CommentsURL == nil {
		return ""
	}
	return *p.CommentsURL
}
1075911
func (i *Issue) GetComments() int {
	if i == nil || i.Comments == nil {
		return 0
	}
	return *i.Comments
}
555170
func (f *File) HeaderComment(comment string) {
	f.headers = append(f.headers, comment)
}
297051
func (s Session) SubmissionsComments(submissionID string) ([]*Comment, error) {
	redditURL := "https://www.reddit.com"
	redditURL += "/comments/" + submissionID
	redditURL += ".json"

	req := request{
		url:       redditURL,
		useragent: s.useragent,
	}
	body, err := req.getResponse()
	if err != nil {
		return nil, err
	}

	var comments interface{}
	err = json.NewDecoder(body).Decode(&comments)
	if err != nil {
		return nil, err
	}
	helper := new(helper)
	helper.buildComments(comments)

	return helper.comments, nil
}
685140
func (p *PullRequest) GetComments() int {
	if p == nil || p.Comments == nil {
		return 0
	}
	return *p.Comments
}
826264
func (operation *Operation) ParseAcceptComment(commentLine string) error {
	return parseMimeTypeList(commentLine, &operation.Consumes, "%v accept type can't be accepted")
}