// SetOperator sets the Operator field's value.
345990
func (s *Rule) SetOperator(v string) *Rule {
	s.Operator = &v
	return s
}
192477
func (s *CreateCloudFormationStackOutput) SetOperations(v []*Operation) *CreateCloudFormationStackOutput {
	s.Operations = v
	return s
}
1009378
func (s *StreamNameCondition) SetComparisonOperator(v string) *StreamNameCondition {
	s.ComparisonOperator = &v
	return s
}
227228
func (s *PutInstancePublicPortsOutput) SetOperation(v *Operation) *PutInstancePublicPortsOutput {
	s.Operation = v
	return s
}
401137
func (s *UpdateItemInput) SetConditionalOperator(v string) *UpdateItemInput {
	s.ConditionalOperator = &v
	return s
}
1102988
func (s *UpdateDataRetentionInput) SetOperation(v string) *UpdateDataRetentionInput {
	s.Operation = &v
	return s
}
341403
func (s *Notification) SetComparisonOperator(v string) *Notification {
	s.ComparisonOperator = &v
	return s
}
693190
func (s *GetOperationsOutput) SetOperations(v []*Operation) *GetOperationsOutput {
	s.Operations = v
	return s
}
807028
func (s *Condition) SetComparisonOperator(v string) *Condition {
	s.ComparisonOperator = &v
	return s
}
603176
func (s *CreateInstanceSnapshotOutput) SetOperations(v []*Operation) *CreateInstanceSnapshotOutput {
	s.Operations = v
	return s
}
1046733
func (s *RebootRelationalDatabaseOutput) SetOperations(v []*Operation) *RebootRelationalDatabaseOutput {
	s.Operations = v
	return s
}
1115204
func (s *CreateGrantInput) SetOperations(v []*string) *CreateGrantInput {
	s.Operations = v
	return s
}
111609
func (cmd *baseCommand) setOperate(policy *WritePolicy, key *Key, operations []*Operation) (bool, error) {
	if len(operations) == 0 {
		return false, NewAerospikeError(PARAMETER_ERROR, "No operations were passed.")
	}

	cmd.begin()
	fieldCount := 0
	readAttr := 0
	writeAttr := 0
	hasWrite := false
	readBin := false
	readHeader := false
	RespondPerEachOp := policy.RespondPerEachOp

	for i := range operations {
		switch operations[i].opType {
		case _MAP_READ:
			// Map operations require RespondPerEachOp to be true.
			RespondPerEachOp = true
			// Fall through to read.
			fallthrough
		case _READ, _CDT_READ:
			if !operations[i].headerOnly {
				readAttr |= _INFO1_READ

				// Read all bins if no bin is specified.
				if operations[i].binName == "" {
					readAttr |= _INFO1_GET_ALL
				}
				readBin = true
			} else {
				readAttr |= _INFO1_READ
				readHeader = true
			}
		case _MAP_MODIFY:
			// Map operations require RespondPerEachOp to be true.
			RespondPerEachOp = true
			// Fall through to default.
			fallthrough
		default:
			writeAttr = _INFO2_WRITE
			hasWrite = true
		}
		cmd.estimateOperationSizeForOperation(operations[i])
	}

	ksz, err := cmd.estimateKeySize(key, policy.SendKey && hasWrite)
	if err != nil {
		return hasWrite, err
	}
	fieldCount += ksz

	if err := cmd.sizeBuffer(); err != nil {
		return hasWrite, err
	}

	if readHeader && !readBin {
		readAttr |= _INFO1_NOBINDATA
	}

	if RespondPerEachOp {
		writeAttr |= _INFO2_RESPOND_ALL_OPS
	}

	if writeAttr != 0 {
		cmd.writeHeaderWithPolicy(policy, readAttr, writeAttr, fieldCount, len(operations))
	} else {
		cmd.writeHeader(&policy.BasePolicy, readAttr, writeAttr, fieldCount, len(operations))
	}
	cmd.writeKey(key, policy.SendKey && hasWrite)

	for _, operation := range operations {
		if err := cmd.writeOperationForOperation(operation); err != nil {
			return hasWrite, err
		}
	}

	cmd.end()

	return hasWrite, nil
}
347033
func (s *UpdateRelationalDatabaseOutput) SetOperations(v []*Operation) *UpdateRelationalDatabaseOutput {
	s.Operations = v
	return s
}
512208
func (s *DetachDiskOutput) SetOperations(v []*Operation) *DetachDiskOutput {
	s.Operations = v
	return s
}
104409
func (s *SizeConstraint) SetComparisonOperator(v string) *SizeConstraint {
	s.ComparisonOperator = &v
	return s
}
363347
func (s *DeleteLoadBalancerOutput) SetOperations(v []*Operation) *DeleteLoadBalancerOutput {
	s.Operations = v
	return s
}