// CreateZFBAutoAssignment creates a new child ZFBAutoAssignment under the Me
13629
func (o *Me) CreateZFBAutoAssignment(child *ZFBAutoAssignment) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
378699
func NewBearerAuthorizer(a *config.Azure, scope string) (*autorest.BearerAuthorizer, error) {
	oauthConfig, err := adal.NewOAuthConfig(azure.PublicCloud.ActiveDirectoryEndpoint, a.TenantID)
	if err != nil {
		log.Printf("Error trying to create new OAuth Config:%s\n", err)
		return nil, err
	}
	token, err := adal.NewServicePrincipalToken(*oauthConfig, a.ClientID, a.ClientSecret, scope)
	if err != nil {
		log.Printf("Error trying to create New Service Principal Token:%s", err)
		return nil, err
	}
	return autorest.NewBearerAuthorizer(token), nil
}
596984
func (s *GetAssignmentOutput) SetAssignment(v *Assignment) *GetAssignmentOutput {
	s.Assignment = v
	return s
}
732355
func (s *CreateApplicationVersionInput) SetAutoCreateApplication(v bool) *CreateApplicationVersionInput {
	s.AutoCreateApplication = &v
	return s
}
534058
func (d *Driver) Create(id, parent string, opts *graphdriver.CreateOpts) error {
	var storageOpt map[string]string
	if opts != nil {
		storageOpt = opts.StorageOpt
	}

	err := d.create(id, parent, storageOpt)
	if err == nil {
		return nil
	}
	if zfsError, ok := err.(*zfs.Error); ok {
		if !strings.HasSuffix(zfsError.Stderr, "dataset already exists\n") {
			return err
		}
		// aborted build -> cleanup
	} else {
		return err
	}

	dataset := zfs.Dataset{Name: d.zfsPath(id)}
	if err := dataset.Destroy(zfs.DestroyRecursiveClones); err != nil {
		return err
	}

	// retry
	return d.create(id, parent, storageOpt)
}
312730
func (conn *Connection) CreateDB(name string, auth Auth) error {
	url, err := buildUrl(name)
	if err != nil {
		return err
	}
	resp, err := conn.request("PUT", url, nil, nil, auth)
	if err == nil {
		resp.Body.Close()
	}
	return err
}
444648
func NewAssign(Variable node.Node, Expression node.Node) *Assign {
	return &Assign{
		FreeFloating: nil,
		Variable:     Variable,
		Expression:   Expression,
	}
}
727774
func (s *LoadBalancerService) NewAssignToLoadBalancerRuleParams(id string) *AssignToLoadBalancerRuleParams {
	p := &AssignToLoadBalancerRuleParams{}
	p.p = make(map[string]interface{})
	p.p["id"] = id
	return p
}
414200
func (s *ListReviewPolicyResultsForHITOutput) SetAssignmentReviewPolicy(v *ReviewPolicy) *ListReviewPolicyResultsForHITOutput {
	s.AssignmentReviewPolicy = v
	return s
}
750053
func (a *ACL) BindingRuleCreate(rule *ACLBindingRule, q *WriteOptions) (*ACLBindingRule, *WriteMeta, error) {
	if rule.ID != "" {
		return nil, nil, fmt.Errorf("Cannot specify an ID in Binding Rule Creation")
	}

	r := a.c.newRequest("PUT", "/v1/acl/binding-rule")
	r.setWriteOptions(q)
	r.obj = rule
	rtt, resp, err := requireOK(a.c.doRequest(r))
	if err != nil {
		return nil, nil, err
	}
	defer resp.Body.Close()

	wm := &WriteMeta{RequestTime: rtt}
	var out ACLBindingRule
	if err := decodeBody(resp, &out); err != nil {
		return nil, nil, err
	}

	return &out, wm, nil
}
92770
func (o *DomainFIPAclTemplate) CreateDomainFIPAclTemplateEntry(child *DomainFIPAclTemplateEntry) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
562607
func (self *StateDB) createObject(addr common.Address) (newobj, prev *stateObject) {
	prev = self.getStateObject(addr)
	newobj = newObject(self, addr, Account{})
	newobj.setNonce(0) // sets the object to dirty
	if prev == nil {
		self.journal.append(createObjectChange{account: &addr})
	} else {
		self.journal.append(resetObjectChange{prev: prev})
	}
	self.setStateObject(newobj)
	return newobj, prev
}
968916
func (s *InstancesCount) SetAssigning(v int64) *InstancesCount {
	s.Assigning = &v
	return s
}
828370
func (o *Enterprise) CreateZFBRequest(child *ZFBRequest) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
561145
func (s *CreateHITInput) SetMaxAssignments(v int64) *CreateHITInput {
	s.MaxAssignments = &v
	return s
}
654722
func (s *AuthorizationService) CreateAuthorization(ctx context.Context, authorization *platform.Authorization) error {
	return s.CreateAuthorizationFn(ctx, authorization)
}
751480
func (s *AuthorizationService) CreateAuthorization(ctx context.Context, a *platform.Authorization) error {
	u, err := newURL(s.Addr, authorizationPath)
	if err != nil {
		return err
	}
	if err != nil {
		return err
	}

	newAuth, err := newPostAuthorizationRequest(a)
	if err != nil {
		return err
	}
	octets, err := json.Marshal(newAuth)
	if err != nil {
		return err
	}

	req, err := http.NewRequest("POST", u.String(), bytes.NewReader(octets))
	if err != nil {
		return err
	}

	req.Header.Set("Content-Type", "application/json")
	SetToken(s.Token, req)

	hc := newClient(u.Scheme, s.InsecureSkipVerify)

	resp, err := hc.Do(req)
	if err != nil {
		return err
	}
	defer resp.Body.Close()

	// TODO(jsternberg): Should this check for a 201 explicitly?
	if err := CheckError(resp); err != nil {
		return err
	}

	if err := json.NewDecoder(resp.Body).Decode(a); err != nil {
		return err
	}

	return nil
}