// DO NOT EDIT: This file is autogenerated via the builtin command.

package events

import (
	ast "github.com/influxdata/flux/ast"
	runtime "github.com/influxdata/flux/runtime"
)

func init() {
	runtime.RegisterPackage(pkgAST)
}

var pkgAST = &ast.Package{
	BaseNode: ast.BaseNode{
		Comments: nil,
		Errors:   nil,
		Loc:      nil,
	},
	Files: []*ast.File{&ast.File{
		BaseNode: ast.BaseNode{
			Comments: nil,
			Errors:   nil,
			Loc: &ast.SourceLocation{
				End: ast.Position{
					Column: 17,
					Line:   14,
				},
				File:   "duration.flux",
				Source: "package events\n\n\n// duration will calculate the duration between records\n// for each record. The duration calculated is between\n// the current record and the next. The last record will\n// compare against either the stopColum (default: _stop)\n// or a stop timestamp value.\n//\n// `timeColumn` - Optional string. Default '_time'. The value used to calculate duration\n// `columnName` - Optional string. Default 'duration'. The name of the result column\n// `stopColumn` - Optional string. Default '_stop'. The name of the column to compare the last record on\n// `stop` - Optional Time. Use a fixed time to compare the last record against instead of stop column.\nbuiltin duration",
				Start: ast.Position{
					Column: 1,
					Line:   1,
				},
			},
		},
		Body: []ast.Statement{&ast.BuiltinStatement{
			BaseNode: ast.BaseNode{
				Comments: []ast.Comment{ast.Comment{Text: "// duration will calculate the duration between records\n"}, ast.Comment{Text: "// for each record. The duration calculated is between\n"}, ast.Comment{Text: "// the current record and the next. The last record will\n"}, ast.Comment{Text: "// compare against either the stopColum (default: _stop)\n"}, ast.Comment{Text: "// or a stop timestamp value.\n"}, ast.Comment{Text: "//\n"}, ast.Comment{Text: "// `timeColumn` - Optional string. Default '_time'. The value used to calculate duration\n"}, ast.Comment{Text: "// `columnName` - Optional string. Default 'duration'. The name of the result column\n"}, ast.Comment{Text: "// `stopColumn` - Optional string. Default '_stop'. The name of the column to compare the last record on\n"}, ast.Comment{Text: "// `stop` - Optional Time. Use a fixed time to compare the last record against instead of stop column.\n"}},
				Errors:   nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 17,
						Line:   14,
					},
					File:   "duration.flux",
					Source: "builtin duration",
					Start: ast.Position{
						Column: 1,
						Line:   14,
					},
				},
			},
			Colon: nil,
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Comments: nil,
					Errors:   nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 17,
							Line:   14,
						},
						File:   "duration.flux",
						Source: "duration",
						Start: ast.Position{
							Column: 9,
							Line:   14,
						},
					},
				},
				Name: "duration",
			},
			Ty: ast.TypeExpression{
				BaseNode: ast.BaseNode{
					Comments: nil,
					Errors:   nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 14,
							Line:   23,
						},
						File:   "duration.flux",
						Source: "(\n    <-tables: [A],\n    ?unit: duration,\n    ?timeColumn: string,\n    ?columnName: string,\n    ?stopColumn: string,\n    ?stop: time,\n) => [B] where\n    A: Record,\n    B: Record",
						Start: ast.Position{
							Column: 20,
							Line:   14,
						},
					},
				},
				Constraints: []*ast.TypeConstraint{&ast.TypeConstraint{
					BaseNode: ast.BaseNode{
						Comments: nil,
						Errors:   nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 14,
								Line:   22,
							},
							File:   "duration.flux",
							Source: "A: Record",
							Start: ast.Position{
								Column: 5,
								Line:   22,
							},
						},
					},
					Kinds: []*ast.Identifier{&ast.Identifier{
						BaseNode: ast.BaseNode{
							Comments: nil,
							Errors:   nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 14,
									Line:   22,
								},
								File:   "duration.flux",
								Source: "Record",
								Start: ast.Position{
									Column: 8,
									Line:   22,
								},
							},
						},
						Name: "Record",
					}},
					Tvar: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Comments: nil,
							Errors:   nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 6,
									Line:   22,
								},
								File:   "duration.flux",
								Source: "A",
								Start: ast.Position{
									Column: 5,
									Line:   22,
								},
							},
						},
						Name: "A",
					},
				}, &ast.TypeConstraint{
					BaseNode: ast.BaseNode{
						Comments: nil,
						Errors:   nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 14,
								Line:   23,
							},
							File:   "duration.flux",
							Source: "B: Record",
							Start: ast.Position{
								Column: 5,
								Line:   23,
							},
						},
					},
					Kinds: []*ast.Identifier{&ast.Identifier{
						BaseNode: ast.BaseNode{
							Comments: nil,
							Errors:   nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 14,
									Line:   23,
								},
								File:   "duration.flux",
								Source: "Record",
								Start: ast.Position{
									Column: 8,
									Line:   23,
								},
							},
						},
						Name: "Record",
					}},
					Tvar: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Comments: nil,
							Errors:   nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 6,
									Line:   23,
								},
								File:   "duration.flux",
								Source: "B",
								Start: ast.Position{
									Column: 5,
									Line:   23,
								},
							},
						},
						Name: "B",
					},
				}},
				Ty: &ast.FunctionType{
					BaseNode: ast.BaseNode{
						Comments: nil,
						Errors:   nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 9,
								Line:   21,
							},
							File:   "duration.flux",
							Source: "(\n    <-tables: [A],\n    ?unit: duration,\n    ?timeColumn: string,\n    ?columnName: string,\n    ?stopColumn: string,\n    ?stop: time,\n) => [B]",
							Start: ast.Position{
								Column: 20,
								Line:   14,
							},
						},
					},
					Parameters: []*ast.ParameterType{&ast.ParameterType{
						BaseNode: ast.BaseNode{
							Comments: nil,
							Errors:   nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 18,
									Line:   15,
								},
								File:   "duration.flux",
								Source: "<-tables: [A]",
								Start: ast.Position{
									Column: 5,
									Line:   15,
								},
							},
						},
						Kind: "Pipe",
						Name: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 13,
										Line:   15,
									},
									File:   "duration.flux",
									Source: "tables",
									Start: ast.Position{
										Column: 7,
										Line:   15,
									},
								},
							},
							Name: "tables",
						},
						Ty: &ast.ArrayType{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 18,
										Line:   15,
									},
									File:   "duration.flux",
									Source: "[A]",
									Start: ast.Position{
										Column: 15,
										Line:   15,
									},
								},
							},
							ElementType: &ast.TvarType{
								BaseNode: ast.BaseNode{
									Comments: nil,
									Errors:   nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 17,
											Line:   15,
										},
										File:   "duration.flux",
										Source: "A",
										Start: ast.Position{
											Column: 16,
											Line:   15,
										},
									},
								},
								ID: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Comments: nil,
										Errors:   nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 17,
												Line:   15,
											},
											File:   "duration.flux",
											Source: "A",
											Start: ast.Position{
												Column: 16,
												Line:   15,
											},
										},
									},
									Name: "A",
								},
							},
						},
					}, &ast.ParameterType{
						BaseNode: ast.BaseNode{
							Comments: nil,
							Errors:   nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 20,
									Line:   16,
								},
								File:   "duration.flux",
								Source: "?unit: duration",
								Start: ast.Position{
									Column: 5,
									Line:   16,
								},
							},
						},
						Kind: "Optional",
						Name: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 10,
										Line:   16,
									},
									File:   "duration.flux",
									Source: "unit",
									Start: ast.Position{
										Column: 6,
										Line:   16,
									},
								},
							},
							Name: "unit",
						},
						Ty: &ast.NamedType{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 20,
										Line:   16,
									},
									File:   "duration.flux",
									Source: "duration",
									Start: ast.Position{
										Column: 12,
										Line:   16,
									},
								},
							},
							ID: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Comments: nil,
									Errors:   nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 20,
											Line:   16,
										},
										File:   "duration.flux",
										Source: "duration",
										Start: ast.Position{
											Column: 12,
											Line:   16,
										},
									},
								},
								Name: "duration",
							},
						},
					}, &ast.ParameterType{
						BaseNode: ast.BaseNode{
							Comments: nil,
							Errors:   nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 24,
									Line:   17,
								},
								File:   "duration.flux",
								Source: "?timeColumn: string",
								Start: ast.Position{
									Column: 5,
									Line:   17,
								},
							},
						},
						Kind: "Optional",
						Name: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 16,
										Line:   17,
									},
									File:   "duration.flux",
									Source: "timeColumn",
									Start: ast.Position{
										Column: 6,
										Line:   17,
									},
								},
							},
							Name: "timeColumn",
						},
						Ty: &ast.NamedType{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 24,
										Line:   17,
									},
									File:   "duration.flux",
									Source: "string",
									Start: ast.Position{
										Column: 18,
										Line:   17,
									},
								},
							},
							ID: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Comments: nil,
									Errors:   nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 24,
											Line:   17,
										},
										File:   "duration.flux",
										Source: "string",
										Start: ast.Position{
											Column: 18,
											Line:   17,
										},
									},
								},
								Name: "string",
							},
						},
					}, &ast.ParameterType{
						BaseNode: ast.BaseNode{
							Comments: nil,
							Errors:   nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 24,
									Line:   18,
								},
								File:   "duration.flux",
								Source: "?columnName: string",
								Start: ast.Position{
									Column: 5,
									Line:   18,
								},
							},
						},
						Kind: "Optional",
						Name: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 16,
										Line:   18,
									},
									File:   "duration.flux",
									Source: "columnName",
									Start: ast.Position{
										Column: 6,
										Line:   18,
									},
								},
							},
							Name: "columnName",
						},
						Ty: &ast.NamedType{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 24,
										Line:   18,
									},
									File:   "duration.flux",
									Source: "string",
									Start: ast.Position{
										Column: 18,
										Line:   18,
									},
								},
							},
							ID: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Comments: nil,
									Errors:   nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 24,
											Line:   18,
										},
										File:   "duration.flux",
										Source: "string",
										Start: ast.Position{
											Column: 18,
											Line:   18,
										},
									},
								},
								Name: "string",
							},
						},
					}, &ast.ParameterType{
						BaseNode: ast.BaseNode{
							Comments: nil,
							Errors:   nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 24,
									Line:   19,
								},
								File:   "duration.flux",
								Source: "?stopColumn: string",
								Start: ast.Position{
									Column: 5,
									Line:   19,
								},
							},
						},
						Kind: "Optional",
						Name: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 16,
										Line:   19,
									},
									File:   "duration.flux",
									Source: "stopColumn",
									Start: ast.Position{
										Column: 6,
										Line:   19,
									},
								},
							},
							Name: "stopColumn",
						},
						Ty: &ast.NamedType{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 24,
										Line:   19,
									},
									File:   "duration.flux",
									Source: "string",
									Start: ast.Position{
										Column: 18,
										Line:   19,
									},
								},
							},
							ID: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Comments: nil,
									Errors:   nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 24,
											Line:   19,
										},
										File:   "duration.flux",
										Source: "string",
										Start: ast.Position{
											Column: 18,
											Line:   19,
										},
									},
								},
								Name: "string",
							},
						},
					}, &ast.ParameterType{
						BaseNode: ast.BaseNode{
							Comments: nil,
							Errors:   nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 16,
									Line:   20,
								},
								File:   "duration.flux",
								Source: "?stop: time",
								Start: ast.Position{
									Column: 5,
									Line:   20,
								},
							},
						},
						Kind: "Optional",
						Name: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 10,
										Line:   20,
									},
									File:   "duration.flux",
									Source: "stop",
									Start: ast.Position{
										Column: 6,
										Line:   20,
									},
								},
							},
							Name: "stop",
						},
						Ty: &ast.NamedType{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 16,
										Line:   20,
									},
									File:   "duration.flux",
									Source: "time",
									Start: ast.Position{
										Column: 12,
										Line:   20,
									},
								},
							},
							ID: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Comments: nil,
									Errors:   nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 16,
											Line:   20,
										},
										File:   "duration.flux",
										Source: "time",
										Start: ast.Position{
											Column: 12,
											Line:   20,
										},
									},
								},
								Name: "time",
							},
						},
					}},
					Return: &ast.ArrayType{
						BaseNode: ast.BaseNode{
							Comments: nil,
							Errors:   nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 9,
									Line:   21,
								},
								File:   "duration.flux",
								Source: "[B]",
								Start: ast.Position{
									Column: 6,
									Line:   21,
								},
							},
						},
						ElementType: &ast.TvarType{
							BaseNode: ast.BaseNode{
								Comments: nil,
								Errors:   nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 8,
										Line:   21,
									},
									File:   "duration.flux",
									Source: "B",
									Start: ast.Position{
										Column: 7,
										Line:   21,
									},
								},
							},
							ID: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Comments: nil,
									Errors:   nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 8,
											Line:   21,
										},
										File:   "duration.flux",
										Source: "B",
										Start: ast.Position{
											Column: 7,
											Line:   21,
										},
									},
								},
								Name: "B",
							},
						},
					},
				},
			},
		}},
		Eof:      nil,
		Imports:  nil,
		Metadata: "parser-type=rust",
		Name:     "duration.flux",
		Package: &ast.PackageClause{
			BaseNode: ast.BaseNode{
				Comments: nil,
				Errors:   nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 15,
						Line:   1,
					},
					File:   "duration.flux",
					Source: "package events",
					Start: ast.Position{
						Column: 1,
						Line:   1,
					},
				},
			},
			Name: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Comments: nil,
					Errors:   nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 15,
							Line:   1,
						},
						File:   "duration.flux",
						Source: "events",
						Start: ast.Position{
							Column: 9,
							Line:   1,
						},
					},
				},
				Name: "events",
			},
		},
	}},
	Package: "events",
	Path:    "contrib/tomhollingworth/events",
}
