// GetContent returns the content of r, decoding it if necessary.
329342
func (r *RepositoryContent) GetContent() (string, error) {
	var encoding string
	if r.Encoding != nil {
		encoding = *r.Encoding
	}

	switch encoding {
	case "base64":
		c, err := base64.StdEncoding.DecodeString(*r.Content)
		return string(c), err
	case "":
		if r.Content == nil {
			return "", nil
		}
		return *r.Content, nil
	default:
		return "", fmt.Errorf("unsupported content encoding: %v", encoding)
	}
}
666812
func (s *CreatePolicyInput) SetContent(v string) *CreatePolicyInput {
	s.Content = &v
	return s
}
516870
func GetFileContents(path string) (*string, error) {
	if _, err := os.Stat(path); os.IsNotExist(err) {
		return nil, err
	}

	contents, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, err
	}

	strContents := string(contents)
	//If file is empty, return nil
	if strContents == "" {
		return nil, nil
	}
	return &strContents, nil
}
766048
func (s *SendVoiceMessageInput) SetContent(v *VoiceMessageContent) *SendVoiceMessageInput {
	s.Content = v
	return s
}
237073
func (s *PutLexiconInput) SetContent(v string) *PutLexiconInput {
	s.Content = &v
	return s
}
982777
func (s *GetDocumentOutput) SetContent(v string) *GetDocumentOutput {
	s.Content = &v
	return s
}
1037940
func (c *FakeClient) ReleaseContent(rlsName string, opts ...ContentOption) (resp *rls.GetReleaseContentResponse, err error) {
	for _, rel := range c.Rels {
		if rel.Name == rlsName {
			return &rls.GetReleaseContentResponse{
				Release: rel,
			}, nil
		}
	}
	return resp, storageerrors.ErrReleaseNotFound(rlsName)
}
1050808
func (F *Frisby) ExpectContent(content string) *Frisby {
	Global.NumAsserts++
	text, err := F.Resp.Text()
	if err != nil {
		F.AddError(err.Error())
		return F
	}
	contains := strings.Contains(text, content)
	if !contains {
		err_str := fmt.Sprintf("Expected Body to contain %q, but it was missing", content)
		F.AddError(err_str)
	}
	return F
}
1216378
func (f *File) ReadContent() error {
	if len(f.Content) == 0 {
		content, err := ioutil.ReadFile(path.Join(f.Path, f.FileName))
		if err != nil {
			return err
		}
		f.Content = content
	}
	return nil
}
135312
func (s *InventoryResultItem) SetContent(v []map[string]*string) *InventoryResultItem {
	s.Content = v
	return s
}
605080
func (p *ProjectCard) GetContentURL() string {
	if p == nil || p.ContentURL == nil {
		return ""
	}
	return *p.ContentURL
}
505787
func (s *InstanceAssociation) SetContent(v string) *InstanceAssociation {
	s.Content = &v
	return s
}
514121
func (b *Box) GetContentPos() (int, int) {
	return b.inner.X, b.inner.Y
}
107937
func (s *Message) SetContent(v string) *Message {
	s.Content = &v
	return s
}
1048649
func getFileContent(fileArg string) (targetName string, b []byte, err error) {
	var localFile string
	files := strings.Split(fileArg, ":")
	switch {
	case len(files) < 1:
		return "", nil, errors.New("empty `-files` parameter")
	case len(files) == 1:
		localFile = files[0]
		targetName = files[0]
	default:
		localFile = files[0]
		targetName = files[1]
	}

	b, err = ioutil.ReadFile(localFile)
	return targetName, b, err
}
1103895
func (obj *Variable) SetContent(ctx context.Context, content string, updateMRU bool) (bool, error) {
	result := &struct {
		Return bool	`json:"qReturn"`
	} {}
	err := obj.rpc(ctx, "SetContent", result, content, updateMRU)
	return result.Return, err 
}
1021132
func (d *driver) GetContent(ctx context.Context, path string) ([]byte, error) {
	content, err := d.Bucket.Get(d.ossPath(path))
	if err != nil {
		return nil, parseError(path, err)
	}
	return content, nil
}