// CreateLicense creates a new child License under the Me
3932
func (o *Me) CreateLicense(child *License) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
683739
func (s *CreateReplicationJobInput) SetLicenseType(v string) *CreateReplicationJobInput {
	s.LicenseType = &v
	return s
}
1008698
func NewLicenseAPI(client *Client) *LicenseAPI {
	return &LicenseAPI{
		&baseAPI{
			client: client,
			FuncGetResourceURL: func() string {
				return "license"
			},
		},
	}
}
133226
func (b *BigIP) InstallLicense(licenseText string) error {
	r := map[string]string{"licenseText": licenseText}
	return b.put(r, uriShared, uriLicensing, uriRegistration)
}
490641
func matchLicense(name string) string {
	if name == "" {
		return ""
	}

	for key, lic := range Licenses {
		for _, match := range lic.PossibleMatches {
			if strings.EqualFold(name, match) {
				return key
			}
		}
	}

	return ""
}
1162117
func CreateEllipticCertificate(principal string, certType uint32) (*ssh.Certificate, ssh.Signer, error) {
	// Create ECDSA key for CA and certificate to be signed by CA.
	caKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
	if err != nil {
		return nil, nil, trace.Wrap(err)
	}
	key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
	if err != nil {
		return nil, nil, trace.Wrap(err)
	}

	cert, certSigner, err := createCertificate(principal, certType, caKey, key)
	if err != nil {
		return nil, nil, trace.Wrap(err)
	}

	return cert, certSigner, nil
}
437528
func ApplyLicense(ctx context.Context, dclient licensing.WrappedDockerClient, license *model.IssuedLicense) error {
	info, err := dclient.Info(ctx)
	if err != nil {
		return err
	}
	return licensing.StoreLicense(ctx, dclient, license, info.DockerRootDir)
}
517607
func (s *DBSnapshot) SetLicenseModel(v string) *DBSnapshot {
	s.LicenseModel = &v
	return s
}
1323230
func (e *etcdClient) CreateOnly(ctx context.Context, key string, value []byte, lease bool) (bool, error) {
	duration := spanstat.Start()
	var leaseID client.LeaseID
	if lease {
		leaseID = e.GetLeaseID()
	}
	req := e.createOpPut(key, value, leaseID)
	cond := client.Compare(client.Version(key), "=", 0)

	e.limiter.Wait(ctx)
	txnresp, err := e.client.Txn(ctx).If(cond).Then(*req).Commit()
	increaseMetric(key, metricSet, "CreateOnly", duration.EndError(err).Total(), err)
	if err != nil {
		e.checkSession(err, leaseID)
		return false, Hint(err)
	}

	return txnresp.Succeeded, nil
}
1040956
func (s *RDSInstanceDetails) SetLicenseModel(v string) *RDSInstanceDetails {
	s.LicenseModel = &v
	return s
}
162925
func (m *Map) CreateLease(u uuid.UUID, l *Lease) bool {
	if _, found := m.uuidMap[u.String()]; found {
		return false
	}
	if _, found := m.nameMap[l.ClusterName]; found {
		return false
	}
	m.uuidMap[u.String()] = l
	m.nameMap[l.ClusterName] = u
	return true
}
922290
func (s *CreateApplicationOutput) SetLicenseUrl(v string) *CreateApplicationOutput {
	s.LicenseUrl = &v
	return s
}
666474
func (s *User) SetLicenseType(v string) *User {
	s.LicenseType = &v
	return s
}
759300
func (s *GetApplicationOutput) SetLicenseUrl(v string) *GetApplicationOutput {
	s.LicenseUrl = &v
	return s
}
632867
func (c *FakeIdentities) Create(identity *user.Identity) (result *user.Identity, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootCreateAction(identitiesResource, identity), &user.Identity{})
	if obj == nil {
		return nil, err
	}
	return obj.(*user.Identity), err
}
1269891
func (vrsConnection *VRSConnection) CreateEntity(info EntityInfo) error {

	if len(info.UUID) == 0 {
		return fmt.Errorf("Uuid absent")
	}

	if len(info.Name) == 0 {
		return fmt.Errorf("Name absent")
	}

	// The Nuage_VM_Table has separate columns for enterprise and user.
	// Hence make a copy of the metadata and delete these keys.
	var metadata map[string]string
	if info.Metadata != nil {
		metadata = make(map[string]string)
		for k, v := range info.Metadata {
			metadata[string(k)] = v
		}
	}
	//delete(metadata, string(entity.MetadataKeyEnterprise))
	delete(metadata, string(entity.MetadataKeyUser))

	nuageVMTableRow := ovsdb.NuageVMTableRow{
		Type:            int(info.Type),
		VMName:          info.Name,
		VMUuid:          info.UUID,
		Domain:          info.Domain,
		NuageUser:       info.Metadata[entity.MetadataKeyUser],
		NuageEnterprise: info.Metadata[entity.MetadataKeyEnterprise],
		Metadata:        metadata,
		Ports:           info.Ports,
		Event:           int(entity.EventCategoryDefined),
		EventType:       int(entity.EventDefinedAdded),
		State:           int(entity.Running),
		Reason:          int(entity.RunningUnknown),
	}

	if info.Events != nil {
		nuageVMTableRow.Event = int(info.Events.EntityEventCategory)
		nuageVMTableRow.EventType = int(info.Events.EntityEventType)
		nuageVMTableRow.State = int(info.Events.EntityState)
		nuageVMTableRow.Reason = int(info.Events.EntityReason)
	}

	if err := vrsConnection.vmTable.InsertRow(vrsConnection.ovsdbClient, &nuageVMTableRow); err != nil {
		return fmt.Errorf("Problem adding entity info to VRS %v", err)
	}

	return nil
}
1048208
func (s *PublishLayerVersionOutput) SetLicenseInfo(v string) *PublishLayerVersionOutput {
	s.LicenseInfo = &v
	return s
}