// contactDefinition returns true and current context if it is an ContactDefinition,
// nil and false otherwise.
320260
func contactDefinition() (*design.ContactDefinition, bool) {
	a, ok := dslengine.CurrentDefinition().(*design.ContactDefinition)
	if !ok {
		dslengine.IncompatibleDSL()
	}
	return a, ok
}
308789
func (s *Type) SetDefinition(v string) *Type {
	s.Definition = &v
	return s
}
1335168
func (c *cachingECSClient) DescribeTaskDefinition(input *ecs.DescribeTaskDefinitionInput) (*ecs.DescribeTaskDefinitionOutput, error) {
	if _, err := arn.Parse(*input.TaskDefinition); err != nil {
		return c.ecsClient.DescribeTaskDefinition(input)
	}

	if v, ok := c.taskDefinitions.Get(*input.TaskDefinition); ok {
		return &ecs.DescribeTaskDefinitionOutput{
			TaskDefinition: v.(*ecs.TaskDefinition),
		}, nil
	}

	resp, err := c.ecsClient.DescribeTaskDefinition(input)
	if err != nil {
		return resp, err
	}

	c.taskDefinitions.Set(*resp.TaskDefinition.TaskDefinitionArn, resp.TaskDefinition, 0)

	return resp, err
}
1228195
func (s *ServiceActionDetail) SetDefinition(v map[string]*string) *ServiceActionDetail {
	s.Definition = v
	return s
}
834291
func (self *Contact) Create(opts ContactCreate) (*ContactInformation, error) {
	var res map[string]interface{}
	createArgs := map[string]interface{}{
		"given":      opts.Firstname,
		"family":     opts.Lastname,
		"email":      opts.Email,
		"password":   opts.Password,
		"streetaddr": opts.Address,
		"zip":        opts.Zipcode,
		"city":       opts.City,
		"country":    opts.Country,
		"phone":      opts.Phone,
		"type":       opts.ContactType(),
	}

	params := []interface{}{self.Key, createArgs}
	if err := self.Call("contact.create", params, &res); err != nil {
		return nil, err
	}
	return toContactInformation(res), nil
}
1330218
func (d *Dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) {
	conn, err := d.dial(ctx, network, address)
	if err != nil {
		return nil, err
	}

	closable := &closableConn{Conn: conn}

	// Start tracking the connection
	d.mu.Lock()
	d.conns[closable] = struct{}{}
	d.mu.Unlock()

	// When the connection is closed, remove it from the map. This will
	// be no-op if the connection isn't in the map, e.g. if CloseAll()
	// is called.
	closable.onClose = func() {
		d.mu.Lock()
		delete(d.conns, closable)
		d.mu.Unlock()
	}

	return closable, nil
}
33328
func (s *StartOutboundVoiceContactOutput) SetContactId(v string) *StartOutboundVoiceContactOutput {
	s.ContactId = &v
	return s
}
852227
func (s *ContactDetail) SetContactType(v string) *ContactDetail {
	s.ContactType = &v
	return s
}
423914
func (s *GetCoreDefinitionVersionOutput) SetDefinition(v *CoreDefinitionVersion) *GetCoreDefinitionVersionOutput {
	s.Definition = v
	return s
}
4567
func relationalFieldDefinition(failIfNotSD bool) (*gorma.RelationalFieldDefinition, bool) {
	a, ok := dslengine.CurrentDefinition().(*gorma.RelationalFieldDefinition)
	if !ok && failIfNotSD {
		dslengine.IncompatibleDSL()
	}
	return a, ok
}
653380
func (s *ListWebhookItem) SetDefinition(v *WebhookDefinition) *ListWebhookItem {
	s.Definition = v
	return s
}
696869
func (r Account_Contact) GetAllContactTypes() (resp []datatypes.Account_Contact_Type, err error) {
	err = r.Session.DoRequest("SoftLayer_Account_Contact", "getAllContactTypes", nil, &r.Options, &resp)
	return
}
707222
func (c *Client) Definitions(o ...Modifier) ([]*MetricDefinition, error) {
	o = prepend(o, c.URL("GET", TypeEndpoint(Generic)))

	r, err := c.Send(o...)
	if err != nil {
		return nil, err
	}

	defer r.Body.Close()

	if r.StatusCode == http.StatusOK {
		b, err := ioutil.ReadAll(r.Body)
		if err != nil {
			return nil, err
		}
		md := []*MetricDefinition{}
		if b != nil {
			if err = json.Unmarshal(b, &md); err != nil {
				return nil, err
			}
		}
		return md, err
	} else if r.StatusCode > 399 {
		return nil, c.parseErrorResponse(r)
	}

	return nil, nil
}
1278335
func (s *GetLoggerDefinitionVersionOutput) SetDefinition(v *LoggerDefinitionVersion) *GetLoggerDefinitionVersionOutput {
	s.Definition = v
	return s
}
279400
func mediaTypeDefinition() (*design.MediaTypeDefinition, bool) {
	m, ok := dslengine.CurrentDefinition().(*design.MediaTypeDefinition)
	if !ok {
		dslengine.IncompatibleDSL()
	}
	return m, ok
}
602568
func (e *Job) MatchesDefinition(def catalog.Definition) bool {
	return e.JobID == def.JobID &&
		e.Flavor == def.Flavor &&
		e.Schedule == def.Schedule &&
		e.Acls.Equal(&def.Acls) &&
		bytes.Equal(e.Task, def.Task) &&
		bytes.Equal(e.TriggeringPolicyRaw, def.TriggeringPolicy) &&
		equalSortedLists(e.TriggeredJobIDs, def.TriggeredJobIDs)
}
915738
func (s *ContactsService) UpdateContact(accountID string, contactID int64, contactAttributes Contact) (*contactResponse, error) {
	path := versioned(contactPath(accountID, contactID))
	contactResponse := &contactResponse{}

	resp, err := s.client.patch(path, contactAttributes, contactResponse)
	if err != nil {
		return nil, err
	}

	contactResponse.HttpResponse = resp
	return contactResponse, nil
}