// SetContentHash sets the content hash associated with a name. Only works if the caller
// owns the name, and the associated resolver implements a `setContenthash` function.
975711
func (ens *ENS) SetContentHash(name string, hash []byte) (*types.Transaction, error) {
	node := EnsNode(name)

	resolver, err := ens.getResolver(node)
	if err != nil {
		return nil, err
	}

	opts := ens.TransactOpts
	opts.GasLimit = 200000

	// IMPORTANT: The old contract is deprecated. This code should be removed latest on June 1st 2019
	supported, err := resolver.SupportsInterface(contentHash_Interface_Id)
	if err != nil {
		return nil, err
	}

	if !supported {
		resolver, err := ens.getFallbackResolver(node)
		if err != nil {
			return nil, err
		}
		opts := ens.TransactOpts
		opts.GasLimit = 200000
		var b [32]byte
		copy(b[:], hash)
		return resolver.Contract.SetContent(&opts, node, b)
	}

	// END DEPRECATED CODE
	return resolver.Contract.SetContenthash(&opts, node, hash)
}
850198
func (_PublicResolver *PublicResolverTransactor) SetContenthash(opts *bind.TransactOpts, node [32]byte, hash []byte) (*types.Transaction, error) {
	return _PublicResolver.contract.Transact(opts, "setContenthash", node, hash)
}
1371923
func (s *SendAnnouncementInput) SetContent(v *Content) *SendAnnouncementInput {
	s.Content = v
	return s
}
1144325
func (s *UpdateProjectInput) SetContents(v []byte) *UpdateProjectInput {
	s.Contents = v
	return s
}
382244
func (s *GetCredentialReportOutput) SetContent(v []byte) *GetCredentialReportOutput {
	s.Content = v
	return s
}
1231490
func (s *PostCommentForComparedCommitInput) SetContent(v string) *PostCommentForComparedCommitInput {
	s.Content = &v
	return s
}
171453
func (m *MessageEdit) SetContent(str string) *MessageEdit {
	m.Content = &str
	return m
}
542115
func (c *Config) SetRecipientHash(alias, name, value string) error {
	if alias == "" {
		c.Root.setRecipientHash(name, value)
	} else {
		if sc, found := c.Mounts[alias]; found && sc != nil {
			sc.setRecipientHash(name, value)
		}
	}

	return c.Save()
}
91796
func (s *PutComplianceItemsInput) SetItemContentHash(v string) *PutComplianceItemsInput {
	s.ItemContentHash = &v
	return s
}
1009684
func (s *GetLayerVersionOutput) SetContent(v *LayerVersionContentOutput) *GetLayerVersionOutput {
	s.Content = v
	return s
}
47462
func (s *ResendConfirmationCodeInput) SetSecretHash(v string) *ResendConfirmationCodeInput {
	s.SecretHash = &v
	return s
}
1217882
func (s *ListCompilationJobsInput) SetNameContains(v string) *ListCompilationJobsInput {
	s.NameContains = &v
	return s
}
22665
func (_PublicResolver *PublicResolverCallerSession) Contenthash(node [32]byte) ([]byte, error) {
	return _PublicResolver.Contract.Contenthash(&_PublicResolver.CallOpts, node)
}
675078
func FileContentHash(filename string) (string, error) {
	f, err := os.Open(filename)
	if err != nil {
		return "", err
	}
	defer f.Close()
	return ContentHash(f)
}
1088159
func (s *Patch) SetContentUrl(v string) *Patch {
	s.ContentUrl = &v
	return s
}
1002963
func (s *RawString) SetContent(v string) *RawString {
	s.Content = &v
	return s
}
472247
func (s *ListLabelingJobsInput) SetNameContains(v string) *ListLabelingJobsInput {
	s.NameContains = &v
	return s
}