// SetCommentsForComparedCommitData sets the CommentsForComparedCommitData field's value.
18931
func (s *GetCommentsForComparedCommitOutput) SetCommentsForComparedCommitData(v []*CommentsForComparedCommit) *GetCommentsForComparedCommitOutput {
	s.CommentsForComparedCommitData = v
	return s
}
867645
func (s *Job) SetComment(v string) *Job {
	s.Comment = &v
	return s
}
340579
func (s *MaintenanceWindowRunCommandParameters) SetComment(v string) *MaintenanceWindowRunCommandParameters {
	s.Comment = &v
	return s
}
414344
func (s *PublicKeyConfig) SetComment(v string) *PublicKeyConfig {
	s.Comment = &v
	return s
}
1198412
func (s *CancelJobInput) SetComment(v string) *CancelJobInput {
	s.Comment = &v
	return s
}
249904
func (s *FieldLevelEncryptionSummary) SetComment(v string) *FieldLevelEncryptionSummary {
	s.Comment = &v
	return s
}
984956
func (c *CommentStats) GetTotalCommitComments() int {
	if c == nil || c.TotalCommitComments == nil {
		return 0
	}
	return *c.TotalCommitComments
}
1241243
func (s *DeleteCommentContentOutput) SetComment(v *Comment) *DeleteCommentContentOutput {
	s.Comment = v
	return s
}
888786
func (s *CommentsForPullRequest) SetComments(v []*Comment) *CommentsForPullRequest {
	s.Comments = v
	return s
}
1161730
func (s *RepositoriesService) CompareCommits(ctx context.Context, owner, repo string, base, head string) (*CommitsComparison, *Response, error) {
	u := fmt.Sprintf("repos/%v/%v/compare/%v...%v", owner, repo, base, head)

	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	comp := new(CommitsComparison)
	resp, err := s.client.Do(ctx, req, comp)
	if err != nil {
		return nil, resp, err
	}

	return comp, resp, nil
}
1098113
func (s *SubModule) SetCommitId(v string) *SubModule {
	s.CommitId = &v
	return s
}
1164414
func (s *AssociateTargetsWithJobInput) SetComment(v string) *AssociateTargetsWithJobInput {
	s.Comment = &v
	return s
}
59385
func (s *GitHubLocation) SetCommitId(v string) *GitHubLocation {
	s.CommitId = &v
	return s
}
143295
func (s *FieldLevelEncryptionConfig) SetComment(v string) *FieldLevelEncryptionConfig {
	s.Comment = &v
	return s
}
986430
func SetComment() echo.MiddlewareFunc {
	return func(next echo.HandlerFunc) echo.HandlerFunc {
		return echo.HandlerFunc(func(c echo.Context) error {

			var cid uint64
			var e error
			if cid, e = strconv.ParseUint(c.Param("cid"), 10, 64); e != nil {
				c.JSON(http.StatusBadRequest, &rest.Response{
					HumanMessage: "Invalid comment identifier specified",
					Message:      e.Error(),
					Status:       http.StatusBadRequest,
					Success:      false,
				})
				return e
			}

			var comment *nerdz.ProjectPostComment
			if comment, e = nerdz.NewProjectPostComment(cid); e != nil {
				c.JSON(http.StatusBadRequest, &rest.Response{
					HumanMessage: "Invalid comment identifier specified",
					Message:      e.Error(),
					Status:       http.StatusBadRequest,
					Success:      false,
				})
				return e
			}

			post := c.Get("post").(*nerdz.ProjectPost)
			if comment.Hpid != post.Hpid {
				errstr := "Mismatch between comment ID and post ID. Comment not related to the post"
				c.JSON(http.StatusBadRequest, &rest.Response{
					HumanMessage: errstr,
					Message:      errstr,
					Status:       http.StatusBadRequest,
					Success:      false,
				})
				return errors.New(errstr)
			}
			c.Set("comment", comment)
			return next(c)
		})
	}
}
946846
func (s *CommandInvocation) SetComment(v string) *CommandInvocation {
	s.Comment = &v
	return s
}
1017978
func (s *AssociateVPCWithHostedZoneInput) SetComment(v string) *AssociateVPCWithHostedZoneInput {
	s.Comment = &v
	return s
}