// SetHostName sets the HostName field's value.
326274
func (s *AgentInfo) SetHostName(v string) *AgentInfo {
	s.HostName = &v
	return s
}
786584
func WithHostname(name string) SpecOpts {
	return func(_ context.Context, _ Client, _ *containers.Container, s *Spec) error {
		s.Hostname = name
		return nil
	}
}
595119
func (r Spec) Hostname() string {
	i := strings.Index(r.Locator, "/")

	if i < 0 {
		i = len(r.Locator) + 1
	}
	return r.Locator[:i]
}
1131090
func (s *Redirect) SetHostName(v string) *Redirect {
	s.HostName = &v
	return s
}
832147
func (s *ConnectivityInfo) SetHostAddress(v string) *ConnectivityInfo {
	s.HostAddress = &v
	return s
}
1196518
func Hostname(c context.Context) string {
	p := getPayload(c)
	if p == nil {
		return ""
	}
	return p.Instance
}
505653
func (s *CreateHsmConfigurationInput) SetHsmPartitionName(v string) *CreateHsmConfigurationInput {
	s.HsmPartitionName = &v
	return s
}
457066
func (s *OriginCustomHeader) SetHeaderName(v string) *OriginCustomHeader {
	s.HeaderName = &v
	return s
}
450599
func (s *AgentPreview) SetHostname(v string) *AgentPreview {
	s.Hostname = &v
	return s
}
260270
func (s *SamplingRule) SetHost(v string) *SamplingRule {
	s.Host = &v
	return s
}
558699
func (s *RedirectActionConfig) SetHost(v string) *RedirectActionConfig {
	s.Host = &v
	return s
}
1374763
func (d *DNSProvider) setHosts(sld, tld string, hosts []Record) error {
	req, err := d.newRequestPost("namecheap.domains.dns.setHosts",
		addParam("SLD", sld),
		addParam("TLD", tld),
		func(values url.Values) {
			for i, h := range hosts {
				ind := fmt.Sprintf("%d", i+1)
				values.Add("HostName"+ind, h.Name)
				values.Add("RecordType"+ind, h.Type)
				values.Add("Address"+ind, h.Address)
				values.Add("MXPref"+ind, h.MXPref)
				values.Add("TTL"+ind, h.TTL)
			}
		},
	)
	if err != nil {
		return err
	}

	var shr setHostsResponse
	err = d.do(req, &shr)
	if err != nil {
		return err
	}

	if len(shr.Errors) > 0 {
		return fmt.Errorf("%s [%d]", shr.Errors[0].Description, shr.Errors[0].Number)
	}
	if shr.Result.IsSuccess != "true" {
		return fmt.Errorf("setHosts failed")
	}

	return nil
}
1234921
func (s *S3Action) SetBucketName(v string) *S3Action {
	s.BucketName = &v
	return s
}
1256743
func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
	s.HostName = &v
	return s
}
1200370
func (s *Volume) SetHost(v *HostVolumeProperties) *Volume {
	s.Host = v
	return s
}
577259
func (c *configV8) setHost(alias string, cfg hostConfigV8) {
	if _, ok := c.Hosts[alias]; !ok {
		c.Hosts[alias] = cfg
	}
}
215506
func (s *CreateStackInput) SetHostnameTheme(v string) *CreateStackInput {
	s.HostnameTheme = &v
	return s
}