// Create DOCUMENT-END.
358627
func yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) bool {
	*event = yaml_event_t{
		typ:      yaml_DOCUMENT_END_EVENT,
		implicit: implicit,
	}
	return true
}
1151472
func (htmlDoc *htmlDocument) append(e element) {
	htmlDoc.elements = append(htmlDoc.elements, e)
}
154119
func (l Local) Create(_ context.Context, path string) (io.WriteCloser, error) {
	dir := l.fullPath(filepath.Dir(path))
	if _, err := os.Stat(dir); os.IsNotExist(err) {
		if err := os.MkdirAll(dir, LocalCreatePathMode); err != nil {
			return nil, err
		}
	}

	f, err := os.Create(l.fullPath(path))
	if err != nil {
		return nil, err
	}
	return f, nil
}
877578
func (c *validatingWebhookConfigurations) Create(validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
	result = &v1beta1.ValidatingWebhookConfiguration{}
	err = c.client.Post().
		Resource("validatingwebhookconfigurations").
		Body(validatingWebhookConfiguration).
		Do().
		Into(result)
	return
}
1131264
func (h *TermsHashImpl) finishDocument() error {
	if h.nextTermsHash != nil {
		return h.nextTermsHash.finishDocument()
	}
	return nil
}
1121153
func CreateDocumentFragment() *js.Object {
	doc := GetDocument()
	if doc == nil {
		return nil
	}
	return doc.Call("createDocumentFragment")
}
804739
func NewPaperDocCreateUpdateResult(DocId string, Revision int64, Title string) *PaperDocCreateUpdateResult {
	s := new(PaperDocCreateUpdateResult)
	s.DocId = DocId
	s.Revision = Revision
	s.Title = Title
	return s
}
262194
func (b *backups) Create(meta *Metadata, paths *Paths, dbInfo *DBInfo, keepCopy, noDownload bool) (string, error) {
	// TODO(fwereade): 2016-03-17 lp:1558657
	meta.Started = time.Now().UTC()

	// The metadata file will not contain the ID or the "finished" data.
	// However, that information is not as critical. The alternatives
	// are either adding the metadata file to the archive after the fact
	// or adding placeholders here for the finished data and filling
	// them in afterward.  Neither is particularly trivial.
	metadataFile, err := meta.AsJSONBuffer()
	if err != nil {
		return "", errors.Annotate(err, "while preparing the metadata")
	}

	// Create the archive.
	filesToBackUp, err := getFilesToBackUp("", paths, meta.Origin.Machine)
	if err != nil {
		return "", errors.Annotate(err, "while listing files to back up")
	}

	dumper, err := getDBDumper(dbInfo)
	if err != nil {
		return "", errors.Annotate(err, "while preparing for DB dump")
	}

	args := createArgs{paths.BackupDir, filesToBackUp, dumper, metadataFile, noDownload}
	result, err := runCreate(&args)
	if err != nil {
		return "", errors.Annotate(err, "while creating backup archive")
	}
	defer result.archiveFile.Close()

	// Finalize the metadata.
	err = finishMeta(meta, result)
	if err != nil {
		return "", errors.Annotate(err, "while updating metadata")
	}

	// Store the archive if asked by user
	if keepCopy {
		err = storeArchive(b.storage, meta, result.archiveFile)
		if err != nil {
			return "", errors.Annotate(err, "while storing backup archive")
		}
	}

	return result.filename, nil
}
304036
func (h *Client) DocumentPath(documentPath string) *Client {
	h.documentPath = documentPath
	h.documentPathSet = true
	return h
}
303995
func (s *Selection) End() *Selection {
	if s.prevSel != nil {
		return s.prevSel
	}
	return newEmptySelection(s.document)
}
324313
func (q *DateRangeQuery) End(end string, inclusive bool) *DateRangeQuery {
	q.options["end"] = end
	q.options["inclusive_end"] = inclusive
	return q
}
727234
func NewDocumentHandler(b *DocumentBackend) *DocumentHandler {
	h := &DocumentHandler{
		Router: NewRouter(),
		Logger: b.Logger,

		DocumentService: b.DocumentService,
		LabelService:    b.LabelService,
	}

	h.HandlerFunc("POST", documentsPath, h.handlePostDocument)
	h.HandlerFunc("GET", documentsPath, h.handleGetDocuments)
	h.HandlerFunc("GET", documentPath, h.handleGetDocument)
	h.HandlerFunc("PUT", documentPath, h.handlePutDocument)
	h.HandlerFunc("DELETE", documentPath, h.handleDeleteDocument)

	h.HandlerFunc("GET", documentLabelsPath, h.handleGetDocumentLabel)
	h.HandlerFunc("POST", documentLabelsPath, h.handlePostDocumentLabel)
	h.HandlerFunc("DELETE", documentLabelsIDPath, h.handleDeleteDocumentLabel)

	return h
}
1018192
func (endpoint *HostComputeEndpoint) Create() (*HostComputeEndpoint, error) {
	logrus.Debugf("hcn::HostComputeEndpoint::Create id=%s", endpoint.Id)

	if endpoint.HostComputeNamespace != "" {
		return nil, errors.New("endpoint create error, endpoint json HostComputeNamespace is read only and should not be set")
	}

	jsonString, err := json.Marshal(endpoint)
	if err != nil {
		return nil, err
	}

	logrus.Debugf("hcn::HostComputeEndpoint::Create JSON: %s", jsonString)
	endpoint, hcnErr := createEndpoint(endpoint.HostComputeNetwork, string(jsonString))
	if hcnErr != nil {
		return nil, hcnErr
	}
	return endpoint, nil
}
422423
func (c *Client) Create(md MetricDefinition, o ...Modifier) (bool, error) {
	// Keep the order, add custom prepend
	o = prepend(o, c.URL("POST", TypeEndpoint(md.Type)), Data(md))

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

	defer r.Body.Close()

	if r.StatusCode > 399 {
		err = c.parseErrorResponse(r)
		if err, ok := err.(*HawkularClientError); ok {
			if err.Code != http.StatusConflict {
				return false, err
			}
			return false, nil
		}
		return false, err
	}
	return true, nil
}
601867
func (p *Lexer) End() bool {
	c, err := p.Byte()

	if err != nil {
		return true
	}

	if IsEndChar(c) {
		return true
	}
	p.UnreadByte()
	return false
}
267088
func (b *DynamoDBBackend) create(ctx context.Context, item backend.Item, mode int) error {
	r := record{
		HashKey:   hashKey,
		FullPath:  prependPrefix(item.Key),
		Value:     item.Value,
		Timestamp: time.Now().UTC().Unix(),
		ID:        time.Now().UTC().UnixNano(),
	}
	if !item.Expires.IsZero() {
		r.Expires = aws.Int64(item.Expires.UTC().Unix())
	}
	av, err := dynamodbattribute.MarshalMap(r)
	if err != nil {
		return trace.Wrap(err)
	}
	input := dynamodb.PutItemInput{
		Item:      av,
		TableName: aws.String(b.Tablename),
	}
	switch mode {
	case modeCreate:
		input.SetConditionExpression("attribute_not_exists(FullPath)")
	case modeUpdate:
		input.SetConditionExpression("attribute_exists(FullPath)")
	case modePut:
	default:
		return trace.BadParameter("unrecognized mode")
	}
	_, err = b.svc.PutItemWithContext(ctx, &input)
	err = convertError(err)
	if err != nil {
		return trace.Wrap(err)
	}
	return nil
}
1074634
func (ctx *Context) CreateBackend(vsID, rsID string, opts *BackendOptions) error {
	ctx.mutex.Lock()
	defer ctx.mutex.Unlock()
	return ctx.createBackend(vsID, rsID, opts)
}