// toType returns the type based on mask
977525
func (cm compressionTypeMask) toType() CompressionType {

	switch cm {
	case compressionTypeV1Mask:
		return CompressionTypeV1
	case compressionTypeV2Mask:
		return CompressionTypeV2
	default:
		return CompressionTypeNone
	}
}
1247624
func (s *Device) SetType(v string) *Device {
	s.Type = &v
	return s
}
1345680
func (s *AwsSecurityFindingFilters) SetType(v []*StringFilter) *AwsSecurityFindingFilters {
	s.Type = v
	return s
}
966760
func (s *ProductViewSummary) SetType(v string) *ProductViewSummary {
	s.Type = &v
	return s
}
173789
func (s *ValidateService) Type(typ ...string) *ValidateService {
	s.typ = append(s.typ, typ...)
	return s
}
977722
func (s *SearchService) Type(typ ...string) *SearchService {
	s.typ = append(s.typ, typ...)
	return s
}
774082
func (item *MultiGetItem) Type(typ string) *MultiGetItem {
	item.typ = typ
	return item
}
829273
func (s *HistoryEvent) SetType(v string) *HistoryEvent {
	s.Type = &v
	return s
}
208675
func (s *FieldToMatch) SetType(v string) *FieldToMatch {
	s.Type = &v
	return s
}
838673
func (s *ImportJobResponse) SetType(v string) *ImportJobResponse {
	s.Type = &v
	return s
}
227724
func (s *CreateComputeEnvironmentInput) SetType(v string) *CreateComputeEnvironmentInput {
	s.Type = &v
	return s
}
1043458
func (s *Job) SetType(v string) *Job {
	s.Type = &v
	return s
}
391879
func (s *FaultRootCauseService) SetType(v string) *FaultRootCauseService {
	s.Type = &v
	return s
}
434783
func (s *TermvectorsService) Type(typ string) *TermvectorsService {
	s.typ = typ
	return s
}
1043705
func (xm *XM) WriteTo(w io.Writer) (int64, error) {
	var hasmask XMType
	if len(xm.Mask) > 0 {
		hasmask = 1
	}

	field := (xm.Type << 1) | hasmask

	return encoding.WriteTo(
		w, xm.Class, field,
		uint8(len(xm.Mask)+len(xm.Value)),
		xm.Value, xm.Mask)
}
561508
func (s *PutEncryptionConfigInput) SetType(v string) *PutEncryptionConfigInput {
	s.Type = &v
	return s
}
700792
func (s *IndicesGetFieldMappingService) Type(types ...string) *IndicesGetFieldMappingService {
	s.typ = append(s.typ, types...)
	return s
}