// SetResult sets the Result field's value.
12715
func (s *CompleteWorkflowExecutionDecisionAttributes) SetResult(v string) *CompleteWorkflowExecutionDecisionAttributes {
	s.Result = &v
	return s
}
1288124
func (s *AddCommunicationToCaseOutput) SetResult(v bool) *AddCommunicationToCaseOutput {
	s.Result = &v
	return s
}
555464
func (s *BatchDetectSyntaxOutput) SetResultList(v []*BatchDetectSyntaxItemResult) *BatchDetectSyntaxOutput {
	s.ResultList = v
	return s
}
82907
func (s *ActivityResponse) SetResult(v string) *ActivityResponse {
	s.Result = &v
	return s
}
1295062
func (this *Future) setResult(r *PromiseResult) (e error) { //r *PromiseResult) {
	defer func() {
		if err := getError(recover()); err != nil {
			e = err
			fmt.Println("\nerror in setResult():", err)
		}
	}()

	e = errors.New("Cannot resolve/reject/cancel more than once")

	for {
		v := this.loadVal()
		if v.r != nil {
			return
		}
		newVal := *v
		newVal.r = r

		//Use CAS operation to ensure that the state of Promise isn't changed.
		//If the state is changed, must get latest state and try to call CAS again.
		//No ABA issue in this case because address of all objects are different.
		if atomic.CompareAndSwapPointer(&this.val, unsafe.Pointer(v), unsafe.Pointer(&newVal)) {
			//Close chEnd then all Get() and GetOrTimeout() will be unblocked
			close(this.final)

			//call callback functions and start the Promise pipeline
			if len(v.dones) > 0 || len(v.fails) > 0 || len(v.always) > 0 || len(v.cancels) > 0 {
				go func() {
					execCallback(r, v.dones, v.fails, v.always, v.cancels)
				}()
			}

			//start the pipeline
			if len(v.pipes) > 0 {
				go func() {
					for _, pipe := range v.pipes {
						pipeTask, pipePromise := pipe.getPipe(r.Typ == RESULT_SUCCESS)
						startPipe(r, pipeTask, pipePromise)
					}
				}()
			}
			e = nil
			break
		}
	}
	return
}
540208
func (s *Test) SetResult(v string) *Test {
	s.Result = &v
	return s
}
934104
func (s *Problem) SetResult(v string) *Problem {
	s.Result = &v
	return s
}
431145
func (s *GetQueryResultsOutput) SetResultSet(v *ResultSet) *GetQueryResultsOutput {
	s.ResultSet = v
	return s
}
497150
func (s *ListEntitiesDetectionJobsInput) SetMaxResults(v int64) *ListEntitiesDetectionJobsInput {
	s.MaxResults = &v
	return s
}
270567
func (s *BatchDetectSentimentOutput) SetResultList(v []*BatchDetectSentimentItemResult) *BatchDetectSentimentOutput {
	s.ResultList = v
	return s
}
1188085
func (s *TestAuthorizationOutput) SetAuthResults(v []*AuthResult) *TestAuthorizationOutput {
	s.AuthResults = v
	return s
}
974702
func (s *EvaluationResult) SetResultToken(v string) *EvaluationResult {
	s.ResultToken = &v
	return s
}
1285209
func (s *ListWorkerBlocksOutput) SetNumResults(v int64) *ListWorkerBlocksOutput {
	s.NumResults = &v
	return s
}
420400
func (s *DescribeIpGroupsInput) SetMaxResults(v int64) *DescribeIpGroupsInput {
	s.MaxResults = &v
	return s
}
1165825
func (s *ListGroupsInput) SetMaxResults(v int64) *ListGroupsInput {
	s.MaxResults = &v
	return s
}
1083274
func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
	s.CopyPartResult = v
	return s
}
571006
func (s *ListHITsOutput) SetNumResults(v int64) *ListHITsOutput {
	s.NumResults = &v
	return s
}