// SetFormat writes the magic values necessary for specified format
// and then updates the checksum accordingly.
164578
func (b *block) SetFormat(format int) {
	// Set the magic values.
	switch format {
	case formatV7:
		// Do nothing.
	case formatGNU:
		copy(b.GNU().Magic(), magicGNU)
		copy(b.GNU().Version(), versionGNU)
	case formatSTAR:
		copy(b.STAR().Magic(), magicUSTAR)
		copy(b.STAR().Version(), versionUSTAR)
		copy(b.STAR().Trailer(), trailerSTAR)
	case formatUSTAR, formatPAX:
		copy(b.USTAR().Magic(), magicUSTAR)
		copy(b.USTAR().Version(), versionUSTAR)
	default:
		panic("invalid format")
	}

	// Update checksum.
	// This field is special in that it is terminated by a NULL then space.
	var f formatter
	field := b.V7().Chksum()
	chksum, _ := b.ComputeChecksum() // Possible values are 256..128776
	f.formatOctal(field[:7], chksum) // Never fails since 128776 < 262143
	field[7] = ' '
}
845184
func (s *StorageDescriptor) SetInputFormat(v string) *StorageDescriptor {
	s.InputFormat = &v
	return s
}
19295
func (s *GetDocumentOutput) SetDocumentFormat(v string) *GetDocumentOutput {
	s.DocumentFormat = &v
	return s
}
629784
func (s *JobManifestSpec) SetFormat(v string) *JobManifestSpec {
	s.Format = &v
	return s
}
123488
func (s *DocumentVersionInfo) SetDocumentFormat(v string) *DocumentVersionInfo {
	s.DocumentFormat = &v
	return s
}
521072
func (s *CreateDocumentInput) SetDocumentFormat(v string) *CreateDocumentInput {
	s.DocumentFormat = &v
	return s
}
486741
func (s *GetDocumentInput) SetDocumentFormat(v string) *GetDocumentInput {
	s.DocumentFormat = &v
	return s
}
222157
func (b *MultiHandler) SetFormatter(f Formatter) {
	for _, h := range b.handlers {
		h.SetFormatter(f)
	}
}
973534
func (s *RedshiftSettings) SetTimeFormat(v string) *RedshiftSettings {
	s.TimeFormat = &v
	return s
}
312208
func (s *CloudWatchLogsLogStream) SetDatetimeFormat(v string) *CloudWatchLogsLogStream {
	s.DatetimeFormat = &v
	return s
}
1197136
func (l *Logger) SetTimeFormat(s string) *Logger {
	l.mu.Lock()
	l.TimeFormat = s
	l.mu.Unlock()

	return l
}
863906
func (s *UpdateDocumentInput) SetDocumentFormat(v string) *UpdateDocumentInput {
	s.DocumentFormat = &v
	return s
}
63707
func (s *S3DestinationUpdate) SetCompressionFormat(v string) *S3DestinationUpdate {
	s.CompressionFormat = &v
	return s
}
655202
func (hook *LfsHook) SetFormatter(formatter logrus.Formatter) {
	hook.lock.Lock()
	defer hook.lock.Unlock()
	if formatter == nil {
		formatter = defaultFormatter
	} else {
		switch formatter.(type) {
		case *logrus.TextFormatter:
			textFormatter := formatter.(*logrus.TextFormatter)
			textFormatter.DisableColors = true
		}
	}

	hook.formatter = formatter
}
666448
func (s *ImportJobRequest) SetFormat(v string) *ImportJobRequest {
	s.Format = &v
	return s
}
815976
func (s *RedshiftSettings) SetDateFormat(v string) *RedshiftSettings {
	s.DateFormat = &v
	return s
}
1068639
func (s *DescribeServicesInput) SetFormatVersion(v string) *DescribeServicesInput {
	s.FormatVersion = &v
	return s
}