// CtxDomain returns a domain that's been set on the request. Use it to get the
// domain set on a 401 error handler.
507067
func CtxDomain(r *http.Request) string {
	val := r.Context().Value(domainCtx)
	if val == nil {
		return ""
	}
	return val.(string)
}
1199348
func (s *DomainMembership) SetDomain(v string) *DomainMembership {
	s.Domain = &v
	return s
}
661168
func (g *Generator) Domain() string {
	tld := g.OneStringOf(topLevelDomains...)
	if g.FlipCoin(80) {
		return g.LimitedWord(3, 5) + "-" + g.LimitedWord(3, 5) + "." + tld
	}
	return g.LimitedWord(3, 10) + "." + tld
}
1304441
func (s *RestoreDBInstanceToPointInTimeInput) SetDomain(v string) *RestoreDBInstanceToPointInTimeInput {
	s.Domain = &v
	return s
}
1154093
func (s *CountPendingDecisionTasksInput) SetDomain(v string) *CountPendingDecisionTasksInput {
	s.Domain = &v
	return s
}
1214831
func (internet Internet) DomainName(v reflect.Value) (interface{}, error) {
	return internet.domainName(), nil
}
1260836
func (client *Client) AddDomain(args *AddDomainArgs) (response *AddDomainResponse, err error) {
	action := "AddDomain"
	response = &AddDomainResponse{}
	err = client.Invoke(action, args, response)
	if err == nil {
		return response, nil
	} else {
		log.Printf("%s error, %v", action, err)
		return response, err
	}
}
1182585
func (a *API) GetDomainConfig(domain int, key string) (string, error) {
	url := a.BuildURL("/v2/domain/%d/config/%s/", domain, key)
	return a.getTextPlain(url, Params{})
}
974618
func (s *LoadBalancerDescription) SetDomain(v string) *LoadBalancerDescription {
	s.Domain = &v
	return s
}
1081616
func (client *Client) GetDomains(ctx context.Context) ([]DNSDomain, error) {
	resp, err := client.dnsRequest(ctx, "/v1/domains", nil, "", "GET")
	if err != nil {
		return nil, err
	}

	var d []DNSDomainResponse
	if err := json.Unmarshal(resp, &d); err != nil {
		return nil, err
	}

	domains := make([]DNSDomain, len(d))
	for i := range d {
		domains[i] = *d[i].Domain
	}
	return domains, nil
}
515410
func (mg *MailgunImpl) GetDomain(ctx context.Context, domain string) (DomainResponse, error) {
	r := newHTTPRequest(generatePublicApiUrl(mg, domainsEndpoint) + "/" + domain)
	r.setClient(mg.Client())
	r.setBasicAuth(basicAuthUser, mg.APIKey())
	var resp DomainResponse
	err := getResponseFromJSON(ctx, r, &resp)
	return resp, err
}
251252
func BindTextdomain(domainname string, dirname string) string {
	cdirname := C.CString(dirname)
	defer C.free(unsafe.Pointer(cdirname))

	cdomainname := C.CString(domainname)
	defer C.free(unsafe.Pointer(cdomainname))

	return C.GoString(C.bindtextdomain(cdomainname, cdirname))
}
842080
func (s *DescribeUserPoolDomainInput) SetDomain(v string) *DescribeUserPoolDomainInput {
	s.Domain = &v
	return s
}
256782
func (s *SignalWorkflowExecutionInput) SetDomain(v string) *SignalWorkflowExecutionInput {
	s.Domain = &v
	return s
}
1227419
func (s *GetDomainStatisticsReportInput) SetDomain(v string) *GetDomainStatisticsReportInput {
	s.Domain = &v
	return s
}
1307891
func (s *RegistrarService) RegisterDomain(accountID string, domainName string, request *DomainRegisterRequest) (*domainRegistrationResponse, error) {
	path := versioned(fmt.Sprintf("/%v/registrar/domains/%v/registrations", accountID, domainName))
	registrationResponse := &domainRegistrationResponse{}

	// TODO: validate mandatory attributes RegistrantID

	resp, err := s.client.post(path, request, registrationResponse)
	if err != nil {
		return nil, err
	}

	registrationResponse.HttpResponse = resp
	return registrationResponse, nil
}
121067
func (c *Cookie) Domain() *String {
	if c.chain.failed() {
		return &String{c.chain, ""}
	}
	return &String{c.chain, c.value.Domain}
}