// SetManifestEncoding sets the ManifestEncoding field's value.
507364
func (s *MsSmoothGroupSettings) SetManifestEncoding(v string) *MsSmoothGroupSettings {
	s.ManifestEncoding = &v
	return s
}
60695
func (s *StartChannelOutput) SetEncoderSettings(v *EncoderSettings) *StartChannelOutput {
	s.EncoderSettings = v
	return s
}
738849
func (r *Registry) PutManifest(ctx context.Context, repository, ref string, manifest distribution.Manifest) error {
	url := r.url("/v2/%s/manifests/%s", repository, ref)
	r.Logf("registry.manifest.put url=%s repository=%s reference=%s", url, repository, ref)

	b, err := json.Marshal(manifest)
	if err != nil {
		return err
	}

	req, err := http.NewRequest("PUT", url, bytes.NewBuffer(b))
	if err != nil {
		return err
	}

	req.Header.Set("Content-Type", schema2.MediaTypeManifest)
	resp, err := r.Client.Do(req.WithContext(ctx))
	if resp != nil {
		defer resp.Body.Close()
	}
	return err
}
135187
func WriteManifest(path string, manifest map[string]interface{}) {
	body, err := yaml.Marshal(manifest)
	Expect(err).ToNot(HaveOccurred())
	err = ioutil.WriteFile(path, body, 0666)
	Expect(err).ToNot(HaveOccurred())
}
589681
func ReadManifestFile(path string) (*Manifest, int64, error) {
	buf, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, 0, err
	}

	// Decode manifest.
	var m Manifest
	if err := json.Unmarshal(buf, &m); err != nil {
		return nil, 0, err
	}

	// Set the path of the manifest.
	m.path = path
	return &m, int64(len(buf)), nil
}
1006541
func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
	s.ContentEncoding = &v
	return s
}
428150
func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
	s.EncodingType = &v
	return s
}
1308310
func (s *SNSAction) SetEncoding(v string) *SNSAction {
	s.Encoding = &v
	return s
}
1186966
func (p PartialManifestKey) AddRevision(revision []byte) ManifestKey {
	var buf bytes.Buffer
	buf.Write(p)
	cmpbin.WriteBytes(&buf, revision)
	return buf.Bytes()
}
201800
func (b *Builder) WriteManifests(manifests map[string]string, tufRepository string) error {
	for src, name := range manifests {
		dst := filepath.Join("build", "manifests", name)
		b.log.Debug("writing manifest", "src", src, "dst", dst)

		manifest, err := ioutil.ReadFile(src)
		if err != nil {
			return err
		}
		var replaceErr error
		manifest = imageArtifactPattern.ReplaceAllFunc(manifest, func(raw []byte) []byte {
			name := string(raw[16 : len(raw)-1])
			artifact, ok := b.artifacts[name]
			if !ok {
				replaceErr = fmt.Errorf("unknown image %q", name)
				return nil
			}
			artifact.Meta = map[string]string{
				"flynn.component":    name,
				"flynn.system-image": "true",
			}
			data, err := json.Marshal(artifact)
			if err != nil {
				replaceErr = err
				return nil
			}
			return data
		})
		if replaceErr != nil {
			return replaceErr
		}
		if err := os.MkdirAll(filepath.Dir(dst), 0755); err != nil {
			return err
		}
		if err := ioutil.WriteFile(dst, manifest, 0644); err != nil {
			return err
		}
	}
	return nil
}
185586
func (s *DashConfiguration) SetOriginManifestType(v string) *DashConfiguration {
	s.OriginManifestType = &v
	return s
}
75458
func (s *HlsEncryptionSettings) SetInitializationVectorInManifest(v string) *HlsEncryptionSettings {
	s.InitializationVectorInManifest = &v
	return s
}
230138
func (config *Config) SetSpaceInformation(guid string, name string, allowSSH bool) {
	config.V7SetSpaceInformation(guid, name)
	config.ConfigFile.TargetedSpace.AllowSSH = allowSSH
}
687402
func (s *CreateChannelInput) SetEncoderSettings(v *EncoderSettings) *CreateChannelInput {
	s.EncoderSettings = v
	return s
}
830385
func (s *HlsConfiguration) SetManifestEndpointPrefix(v string) *HlsConfiguration {
	s.ManifestEndpointPrefix = &v
	return s
}
248482
func (s *UpdateOriginEndpointInput) SetManifestName(v string) *UpdateOriginEndpointInput {
	s.ManifestName = &v
	return s
}
918205
func (s *S3Settings) SetEncodingType(v string) *S3Settings {
	s.EncodingType = &v
	return s
}