@dataform/core 3.0.16 → 3.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle.js CHANGED
@@ -12,6 +12,6 @@
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
14
 
15
- module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=45)}([function(e,t,r){"use strict";var n,o,i=e.exports=r(6),a=r(33);i.codegen=r(63),i.fetch=r(64),i.path=r(65),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},i.toObject=function(e){for(var t={},r=0;r<e.length;){var n=e[r++],o=e[r++];void 0!==o&&(t[n]=o)}return t};var s=/\\/g,l=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(s,"\\\\").replace(l,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var c=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(c,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;n||(n=r(20));var o=new n(t||e.name);return i.decorateRoot.add(o),o.ctor=e,Object.defineProperty(e,"$type",{value:o,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:o,enumerable:!1}),o};var u=0;i.decorateEnum=function(e){if(e.$type)return e.$type;o||(o=r(5));var t=new o("Enum"+u++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,r){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var o=r.shift();if("__proto__"===o||"prototype"===o)return t;if(r.length>0)t[o]=e(t[o]||{},r,n);else{var i=t[o];i&&(n=[].concat(i).concat(n)),t[o]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(i,"decorateRoot",{get:function(){return a.decorated||(a.decorated=new(r(25)))}})},function(e,t,r){var n,o,i;o=[r(68)],void 0===(i="function"==typeof(n=function(e){"use strict";var t,r,n,o=e.Reader,i=e.Writer,a=e.util,s=e.roots.default||(e.roots.default={});return s.dataform=((n={}).WorkflowSettings=function(){function t(e){if(this.vars={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.dataformCoreVersion="",t.prototype.defaultProject="",t.prototype.defaultDataset="",t.prototype.defaultLocation="",t.prototype.defaultAssertionDataset="",t.prototype.vars=a.emptyObject,t.prototype.projectSuffix="",t.prototype.datasetSuffix="",t.prototype.namePrefix="",t.prototype.defaultNotebookRuntimeOptions=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.dataformCoreVersion&&Object.hasOwnProperty.call(e,"dataformCoreVersion")&&t.uint32(10).string(e.dataformCoreVersion),null!=e.defaultProject&&Object.hasOwnProperty.call(e,"defaultProject")&&t.uint32(18).string(e.defaultProject),null!=e.defaultDataset&&Object.hasOwnProperty.call(e,"defaultDataset")&&t.uint32(26).string(e.defaultDataset),null!=e.defaultLocation&&Object.hasOwnProperty.call(e,"defaultLocation")&&t.uint32(34).string(e.defaultLocation),null!=e.defaultAssertionDataset&&Object.hasOwnProperty.call(e,"defaultAssertionDataset")&&t.uint32(42).string(e.defaultAssertionDataset),null!=e.vars&&Object.hasOwnProperty.call(e,"vars"))for(var r=Object.keys(e.vars),n=0;n<r.length;++n)t.uint32(50).fork().uint32(10).string(r[n]).uint32(18).string(e.vars[r[n]]).ldelim();return null!=e.projectSuffix&&Object.hasOwnProperty.call(e,"projectSuffix")&&t.uint32(58).string(e.projectSuffix),null!=e.datasetSuffix&&Object.hasOwnProperty.call(e,"datasetSuffix")&&t.uint32(66).string(e.datasetSuffix),null!=e.namePrefix&&Object.hasOwnProperty.call(e,"namePrefix")&&t.uint32(74).string(e.namePrefix),null!=e.defaultNotebookRuntimeOptions&&Object.hasOwnProperty.call(e,"defaultNotebookRuntimeOptions")&&s.dataform.NotebookRuntimeOptionsConfig.encode(e.defaultNotebookRuntimeOptions,t.uint32(82).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.WorkflowSettings;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.dataformCoreVersion=e.string();break;case 2:l.defaultProject=e.string();break;case 3:l.defaultDataset=e.string();break;case 4:l.defaultLocation=e.string();break;case 5:l.defaultAssertionDataset=e.string();break;case 6:l.vars===a.emptyObject&&(l.vars={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;){var p=e.uint32();switch(p>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.vars[r]=n;break;case 7:l.projectSuffix=e.string();break;case 8:l.datasetSuffix=e.string();break;case 9:l.namePrefix=e.string();break;case 10:l.defaultNotebookRuntimeOptions=s.dataform.NotebookRuntimeOptionsConfig.decode(e,e.uint32());break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.dataformCoreVersion&&e.hasOwnProperty("dataformCoreVersion")&&!a.isString(e.dataformCoreVersion))return"dataformCoreVersion: string expected";if(null!=e.defaultProject&&e.hasOwnProperty("defaultProject")&&!a.isString(e.defaultProject))return"defaultProject: string expected";if(null!=e.defaultDataset&&e.hasOwnProperty("defaultDataset")&&!a.isString(e.defaultDataset))return"defaultDataset: string expected";if(null!=e.defaultLocation&&e.hasOwnProperty("defaultLocation")&&!a.isString(e.defaultLocation))return"defaultLocation: string expected";if(null!=e.defaultAssertionDataset&&e.hasOwnProperty("defaultAssertionDataset")&&!a.isString(e.defaultAssertionDataset))return"defaultAssertionDataset: string expected";if(null!=e.vars&&e.hasOwnProperty("vars")){if(!a.isObject(e.vars))return"vars: object expected";for(var t=Object.keys(e.vars),r=0;r<t.length;++r)if(!a.isString(e.vars[t[r]]))return"vars: string{k:string} expected"}if(null!=e.projectSuffix&&e.hasOwnProperty("projectSuffix")&&!a.isString(e.projectSuffix))return"projectSuffix: string expected";if(null!=e.datasetSuffix&&e.hasOwnProperty("datasetSuffix")&&!a.isString(e.datasetSuffix))return"datasetSuffix: string expected";if(null!=e.namePrefix&&e.hasOwnProperty("namePrefix")&&!a.isString(e.namePrefix))return"namePrefix: string expected";if(null!=e.defaultNotebookRuntimeOptions&&e.hasOwnProperty("defaultNotebookRuntimeOptions")){var n=s.dataform.NotebookRuntimeOptionsConfig.verify(e.defaultNotebookRuntimeOptions);if(n)return"defaultNotebookRuntimeOptions."+n}return null},t.fromObject=function(e){if(e instanceof s.dataform.WorkflowSettings)return e;var t=new s.dataform.WorkflowSettings;if(null!=e.dataformCoreVersion&&(t.dataformCoreVersion=String(e.dataformCoreVersion)),null!=e.defaultProject&&(t.defaultProject=String(e.defaultProject)),null!=e.defaultDataset&&(t.defaultDataset=String(e.defaultDataset)),null!=e.defaultLocation&&(t.defaultLocation=String(e.defaultLocation)),null!=e.defaultAssertionDataset&&(t.defaultAssertionDataset=String(e.defaultAssertionDataset)),e.vars){if("object"!=typeof e.vars)throw TypeError(".dataform.WorkflowSettings.vars: object expected");t.vars={};for(var r=Object.keys(e.vars),n=0;n<r.length;++n)t.vars[r[n]]=String(e.vars[r[n]])}if(null!=e.projectSuffix&&(t.projectSuffix=String(e.projectSuffix)),null!=e.datasetSuffix&&(t.datasetSuffix=String(e.datasetSuffix)),null!=e.namePrefix&&(t.namePrefix=String(e.namePrefix)),null!=e.defaultNotebookRuntimeOptions){if("object"!=typeof e.defaultNotebookRuntimeOptions)throw TypeError(".dataform.WorkflowSettings.defaultNotebookRuntimeOptions: object expected");t.defaultNotebookRuntimeOptions=s.dataform.NotebookRuntimeOptionsConfig.fromObject(e.defaultNotebookRuntimeOptions)}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.objects||t.defaults)&&(n.vars={}),t.defaults&&(n.dataformCoreVersion="",n.defaultProject="",n.defaultDataset="",n.defaultLocation="",n.defaultAssertionDataset="",n.projectSuffix="",n.datasetSuffix="",n.namePrefix="",n.defaultNotebookRuntimeOptions=null),null!=e.dataformCoreVersion&&e.hasOwnProperty("dataformCoreVersion")&&(n.dataformCoreVersion=e.dataformCoreVersion),null!=e.defaultProject&&e.hasOwnProperty("defaultProject")&&(n.defaultProject=e.defaultProject),null!=e.defaultDataset&&e.hasOwnProperty("defaultDataset")&&(n.defaultDataset=e.defaultDataset),null!=e.defaultLocation&&e.hasOwnProperty("defaultLocation")&&(n.defaultLocation=e.defaultLocation),null!=e.defaultAssertionDataset&&e.hasOwnProperty("defaultAssertionDataset")&&(n.defaultAssertionDataset=e.defaultAssertionDataset),e.vars&&(r=Object.keys(e.vars)).length){n.vars={};for(var o=0;o<r.length;++o)n.vars[r[o]]=e.vars[r[o]]}return null!=e.projectSuffix&&e.hasOwnProperty("projectSuffix")&&(n.projectSuffix=e.projectSuffix),null!=e.datasetSuffix&&e.hasOwnProperty("datasetSuffix")&&(n.datasetSuffix=e.datasetSuffix),null!=e.namePrefix&&e.hasOwnProperty("namePrefix")&&(n.namePrefix=e.namePrefix),null!=e.defaultNotebookRuntimeOptions&&e.hasOwnProperty("defaultNotebookRuntimeOptions")&&(n.defaultNotebookRuntimeOptions=s.dataform.NotebookRuntimeOptionsConfig.toObject(e.defaultNotebookRuntimeOptions,t)),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.WorkflowSettings"},t}(),n.ActionConfigs=function(){function t(e){if(this.actions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.actions=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.actions&&e.actions.length)for(var r=0;r<e.actions.length;++r)s.dataform.ActionConfig.encode(e.actions[r],t.uint32(10).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfigs;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.actions&&n.actions.length||(n.actions=[]),n.actions.push(s.dataform.ActionConfig.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.actions&&e.hasOwnProperty("actions")){if(!Array.isArray(e.actions))return"actions: array expected";for(var t=0;t<e.actions.length;++t){var r=s.dataform.ActionConfig.verify(e.actions[t]);if(r)return"actions."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfigs)return e;var t=new s.dataform.ActionConfigs;if(e.actions){if(!Array.isArray(e.actions))throw TypeError(".dataform.ActionConfigs.actions: array expected");t.actions=[];for(var r=0;r<e.actions.length;++r){if("object"!=typeof e.actions[r])throw TypeError(".dataform.ActionConfigs.actions: object expected");t.actions[r]=s.dataform.ActionConfig.fromObject(e.actions[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.actions=[]),e.actions&&e.actions.length){r.actions=[];for(var n=0;n<e.actions.length;++n)r.actions[n]=s.dataform.ActionConfig.toObject(e.actions[n],t)}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfigs"},t}(),n.ActionConfig=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r,n,l;return t.prototype.table=null,t.prototype.view=null,t.prototype.incrementalTable=null,t.prototype.assertion=null,t.prototype.operation=null,t.prototype.declaration=null,t.prototype.notebook=null,t.prototype.dataPreparation=null,Object.defineProperty(t.prototype,"action",{get:a.oneOfGetter(r=["table","view","incrementalTable","assertion","operation","declaration","notebook","dataPreparation"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.table&&Object.hasOwnProperty.call(e,"table")&&s.dataform.ActionConfig.TableConfig.encode(e.table,t.uint32(10).fork()).ldelim(),null!=e.view&&Object.hasOwnProperty.call(e,"view")&&s.dataform.ActionConfig.ViewConfig.encode(e.view,t.uint32(18).fork()).ldelim(),null!=e.incrementalTable&&Object.hasOwnProperty.call(e,"incrementalTable")&&s.dataform.ActionConfig.IncrementalTableConfig.encode(e.incrementalTable,t.uint32(26).fork()).ldelim(),null!=e.assertion&&Object.hasOwnProperty.call(e,"assertion")&&s.dataform.ActionConfig.AssertionConfig.encode(e.assertion,t.uint32(34).fork()).ldelim(),null!=e.operation&&Object.hasOwnProperty.call(e,"operation")&&s.dataform.ActionConfig.OperationConfig.encode(e.operation,t.uint32(42).fork()).ldelim(),null!=e.declaration&&Object.hasOwnProperty.call(e,"declaration")&&s.dataform.ActionConfig.DeclarationConfig.encode(e.declaration,t.uint32(50).fork()).ldelim(),null!=e.notebook&&Object.hasOwnProperty.call(e,"notebook")&&s.dataform.ActionConfig.NotebookConfig.encode(e.notebook,t.uint32(58).fork()).ldelim(),null!=e.dataPreparation&&Object.hasOwnProperty.call(e,"dataPreparation")&&s.dataform.ActionConfig.DataPreparationConfig.encode(e.dataPreparation,t.uint32(66).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.table=s.dataform.ActionConfig.TableConfig.decode(e,e.uint32());break;case 2:n.view=s.dataform.ActionConfig.ViewConfig.decode(e,e.uint32());break;case 3:n.incrementalTable=s.dataform.ActionConfig.IncrementalTableConfig.decode(e,e.uint32());break;case 4:n.assertion=s.dataform.ActionConfig.AssertionConfig.decode(e,e.uint32());break;case 5:n.operation=s.dataform.ActionConfig.OperationConfig.decode(e,e.uint32());break;case 6:n.declaration=s.dataform.ActionConfig.DeclarationConfig.decode(e,e.uint32());break;case 7:n.notebook=s.dataform.ActionConfig.NotebookConfig.decode(e,e.uint32());break;case 8:n.dataPreparation=s.dataform.ActionConfig.DataPreparationConfig.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.table&&e.hasOwnProperty("table")&&(t.action=1,r=s.dataform.ActionConfig.TableConfig.verify(e.table)))return"table."+r;if(null!=e.view&&e.hasOwnProperty("view")){if(1===t.action)return"action: multiple values";if(t.action=1,r=s.dataform.ActionConfig.ViewConfig.verify(e.view))return"view."+r}if(null!=e.incrementalTable&&e.hasOwnProperty("incrementalTable")){if(1===t.action)return"action: multiple values";if(t.action=1,r=s.dataform.ActionConfig.IncrementalTableConfig.verify(e.incrementalTable))return"incrementalTable."+r}if(null!=e.assertion&&e.hasOwnProperty("assertion")){if(1===t.action)return"action: multiple values";if(t.action=1,r=s.dataform.ActionConfig.AssertionConfig.verify(e.assertion))return"assertion."+r}if(null!=e.operation&&e.hasOwnProperty("operation")){if(1===t.action)return"action: multiple values";if(t.action=1,r=s.dataform.ActionConfig.OperationConfig.verify(e.operation))return"operation."+r}if(null!=e.declaration&&e.hasOwnProperty("declaration")){if(1===t.action)return"action: multiple values";if(t.action=1,r=s.dataform.ActionConfig.DeclarationConfig.verify(e.declaration))return"declaration."+r}if(null!=e.notebook&&e.hasOwnProperty("notebook")){if(1===t.action)return"action: multiple values";if(t.action=1,r=s.dataform.ActionConfig.NotebookConfig.verify(e.notebook))return"notebook."+r}if(null!=e.dataPreparation&&e.hasOwnProperty("dataPreparation")){if(1===t.action)return"action: multiple values";var r;if(t.action=1,r=s.dataform.ActionConfig.DataPreparationConfig.verify(e.dataPreparation))return"dataPreparation."+r}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig)return e;var t=new s.dataform.ActionConfig;if(null!=e.table){if("object"!=typeof e.table)throw TypeError(".dataform.ActionConfig.table: object expected");t.table=s.dataform.ActionConfig.TableConfig.fromObject(e.table)}if(null!=e.view){if("object"!=typeof e.view)throw TypeError(".dataform.ActionConfig.view: object expected");t.view=s.dataform.ActionConfig.ViewConfig.fromObject(e.view)}if(null!=e.incrementalTable){if("object"!=typeof e.incrementalTable)throw TypeError(".dataform.ActionConfig.incrementalTable: object expected");t.incrementalTable=s.dataform.ActionConfig.IncrementalTableConfig.fromObject(e.incrementalTable)}if(null!=e.assertion){if("object"!=typeof e.assertion)throw TypeError(".dataform.ActionConfig.assertion: object expected");t.assertion=s.dataform.ActionConfig.AssertionConfig.fromObject(e.assertion)}if(null!=e.operation){if("object"!=typeof e.operation)throw TypeError(".dataform.ActionConfig.operation: object expected");t.operation=s.dataform.ActionConfig.OperationConfig.fromObject(e.operation)}if(null!=e.declaration){if("object"!=typeof e.declaration)throw TypeError(".dataform.ActionConfig.declaration: object expected");t.declaration=s.dataform.ActionConfig.DeclarationConfig.fromObject(e.declaration)}if(null!=e.notebook){if("object"!=typeof e.notebook)throw TypeError(".dataform.ActionConfig.notebook: object expected");t.notebook=s.dataform.ActionConfig.NotebookConfig.fromObject(e.notebook)}if(null!=e.dataPreparation){if("object"!=typeof e.dataPreparation)throw TypeError(".dataform.ActionConfig.dataPreparation: object expected");t.dataPreparation=s.dataform.ActionConfig.DataPreparationConfig.fromObject(e.dataPreparation)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.table&&e.hasOwnProperty("table")&&(r.table=s.dataform.ActionConfig.TableConfig.toObject(e.table,t),t.oneofs&&(r.action="table")),null!=e.view&&e.hasOwnProperty("view")&&(r.view=s.dataform.ActionConfig.ViewConfig.toObject(e.view,t),t.oneofs&&(r.action="view")),null!=e.incrementalTable&&e.hasOwnProperty("incrementalTable")&&(r.incrementalTable=s.dataform.ActionConfig.IncrementalTableConfig.toObject(e.incrementalTable,t),t.oneofs&&(r.action="incrementalTable")),null!=e.assertion&&e.hasOwnProperty("assertion")&&(r.assertion=s.dataform.ActionConfig.AssertionConfig.toObject(e.assertion,t),t.oneofs&&(r.action="assertion")),null!=e.operation&&e.hasOwnProperty("operation")&&(r.operation=s.dataform.ActionConfig.OperationConfig.toObject(e.operation,t),t.oneofs&&(r.action="operation")),null!=e.declaration&&e.hasOwnProperty("declaration")&&(r.declaration=s.dataform.ActionConfig.DeclarationConfig.toObject(e.declaration,t),t.oneofs&&(r.action="declaration")),null!=e.notebook&&e.hasOwnProperty("notebook")&&(r.notebook=s.dataform.ActionConfig.NotebookConfig.toObject(e.notebook,t),t.oneofs&&(r.action="notebook")),null!=e.dataPreparation&&e.hasOwnProperty("dataPreparation")&&(r.dataPreparation=s.dataform.ActionConfig.DataPreparationConfig.toObject(e.dataPreparation,t),t.oneofs&&(r.action="dataPreparation")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig"},t.Target=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.project="",t.prototype.dataset="",t.prototype.name="",t.prototype.includeDependentAssertions=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(10).string(e.project),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(34).string(e.name),null!=e.includeDependentAssertions&&Object.hasOwnProperty.call(e,"includeDependentAssertions")&&t.uint32(40).bool(e.includeDependentAssertions),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.Target;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.project=e.string();break;case 2:n.dataset=e.string();break;case 4:n.name=e.string();break;case 5:n.includeDependentAssertions=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project)?"project: string expected":null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset)?"dataset: string expected":null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name)?"name: string expected":null!=e.includeDependentAssertions&&e.hasOwnProperty("includeDependentAssertions")&&"boolean"!=typeof e.includeDependentAssertions?"includeDependentAssertions: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.Target)return e;var t=new s.dataform.ActionConfig.Target;return null!=e.project&&(t.project=String(e.project)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.name&&(t.name=String(e.name)),null!=e.includeDependentAssertions&&(t.includeDependentAssertions=Boolean(e.includeDependentAssertions)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.project="",r.dataset="",r.name="",r.includeDependentAssertions=!1),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),null!=e.dataset&&e.hasOwnProperty("dataset")&&(r.dataset=e.dataset),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.includeDependentAssertions&&e.hasOwnProperty("includeDependentAssertions")&&(r.includeDependentAssertions=e.includeDependentAssertions),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.Target"},t}(),t.ColumnDescriptor=function(){function t(e){if(this.path=[],this.bigqueryPolicyTags=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.path=a.emptyArray,t.prototype.description="",t.prototype.bigqueryPolicyTags=a.emptyArray,t.prototype.tags=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.path&&e.path.length)for(var r=0;r<e.path.length;++r)t.uint32(10).string(e.path[r]);if(null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(18).string(e.description),null!=e.bigqueryPolicyTags&&e.bigqueryPolicyTags.length)for(r=0;r<e.bigqueryPolicyTags.length;++r)t.uint32(26).string(e.bigqueryPolicyTags[r]);if(null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(34).string(e.tags[r]);return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.ColumnDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.path&&n.path.length||(n.path=[]),n.path.push(e.string());break;case 2:n.description=e.string();break;case 3:n.bigqueryPolicyTags&&n.bigqueryPolicyTags.length||(n.bigqueryPolicyTags=[]),n.bigqueryPolicyTags.push(e.string());break;case 4:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var t=0;t<e.path.length;++t)if(!a.isString(e.path[t]))return"path: string[] expected"}if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.bigqueryPolicyTags&&e.hasOwnProperty("bigqueryPolicyTags")){if(!Array.isArray(e.bigqueryPolicyTags))return"bigqueryPolicyTags: array expected";for(t=0;t<e.bigqueryPolicyTags.length;++t)if(!a.isString(e.bigqueryPolicyTags[t]))return"bigqueryPolicyTags: string[] expected"}if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.ColumnDescriptor)return e;var t=new s.dataform.ActionConfig.ColumnDescriptor;if(e.path){if(!Array.isArray(e.path))throw TypeError(".dataform.ActionConfig.ColumnDescriptor.path: array expected");t.path=[];for(var r=0;r<e.path.length;++r)t.path[r]=String(e.path[r])}if(null!=e.description&&(t.description=String(e.description)),e.bigqueryPolicyTags){if(!Array.isArray(e.bigqueryPolicyTags))throw TypeError(".dataform.ActionConfig.ColumnDescriptor.bigqueryPolicyTags: array expected");for(t.bigqueryPolicyTags=[],r=0;r<e.bigqueryPolicyTags.length;++r)t.bigqueryPolicyTags[r]=String(e.bigqueryPolicyTags[r])}if(e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.ColumnDescriptor.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.path=[],r.bigqueryPolicyTags=[],r.tags=[]),t.defaults&&(r.description=""),e.path&&e.path.length){r.path=[];for(var n=0;n<e.path.length;++n)r.path[n]=e.path[n]}if(null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),e.bigqueryPolicyTags&&e.bigqueryPolicyTags.length)for(r.bigqueryPolicyTags=[],n=0;n<e.bigqueryPolicyTags.length;++n)r.bigqueryPolicyTags[n]=e.bigqueryPolicyTags[n];if(e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.ColumnDescriptor"},t}(),t.TableAssertionsConfig=function(){function t(e){if(this.uniqueKey=[],this.uniqueKeys=[],this.nonNull=[],this.rowConditions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.uniqueKey=a.emptyArray,t.prototype.uniqueKeys=a.emptyArray,t.prototype.nonNull=a.emptyArray,t.prototype.rowConditions=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.uniqueKey&&e.uniqueKey.length)for(var r=0;r<e.uniqueKey.length;++r)t.uint32(10).string(e.uniqueKey[r]);if(null!=e.uniqueKeys&&e.uniqueKeys.length)for(r=0;r<e.uniqueKeys.length;++r)s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.encode(e.uniqueKeys[r],t.uint32(18).fork()).ldelim();if(null!=e.nonNull&&e.nonNull.length)for(r=0;r<e.nonNull.length;++r)t.uint32(26).string(e.nonNull[r]);if(null!=e.rowConditions&&e.rowConditions.length)for(r=0;r<e.rowConditions.length;++r)t.uint32(34).string(e.rowConditions[r]);return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.TableAssertionsConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.uniqueKey&&n.uniqueKey.length||(n.uniqueKey=[]),n.uniqueKey.push(e.string());break;case 2:n.uniqueKeys&&n.uniqueKeys.length||(n.uniqueKeys=[]),n.uniqueKeys.push(s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.decode(e,e.uint32()));break;case 3:n.nonNull&&n.nonNull.length||(n.nonNull=[]),n.nonNull.push(e.string());break;case 4:n.rowConditions&&n.rowConditions.length||(n.rowConditions=[]),n.rowConditions.push(e.string());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.uniqueKey&&e.hasOwnProperty("uniqueKey")){if(!Array.isArray(e.uniqueKey))return"uniqueKey: array expected";for(var t=0;t<e.uniqueKey.length;++t)if(!a.isString(e.uniqueKey[t]))return"uniqueKey: string[] expected"}if(null!=e.uniqueKeys&&e.hasOwnProperty("uniqueKeys")){if(!Array.isArray(e.uniqueKeys))return"uniqueKeys: array expected";for(t=0;t<e.uniqueKeys.length;++t){var r=s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.verify(e.uniqueKeys[t]);if(r)return"uniqueKeys."+r}}if(null!=e.nonNull&&e.hasOwnProperty("nonNull")){if(!Array.isArray(e.nonNull))return"nonNull: array expected";for(t=0;t<e.nonNull.length;++t)if(!a.isString(e.nonNull[t]))return"nonNull: string[] expected"}if(null!=e.rowConditions&&e.hasOwnProperty("rowConditions")){if(!Array.isArray(e.rowConditions))return"rowConditions: array expected";for(t=0;t<e.rowConditions.length;++t)if(!a.isString(e.rowConditions[t]))return"rowConditions: string[] expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.TableAssertionsConfig)return e;var t=new s.dataform.ActionConfig.TableAssertionsConfig;if(e.uniqueKey){if(!Array.isArray(e.uniqueKey))throw TypeError(".dataform.ActionConfig.TableAssertionsConfig.uniqueKey: array expected");t.uniqueKey=[];for(var r=0;r<e.uniqueKey.length;++r)t.uniqueKey[r]=String(e.uniqueKey[r])}if(e.uniqueKeys){if(!Array.isArray(e.uniqueKeys))throw TypeError(".dataform.ActionConfig.TableAssertionsConfig.uniqueKeys: array expected");for(t.uniqueKeys=[],r=0;r<e.uniqueKeys.length;++r){if("object"!=typeof e.uniqueKeys[r])throw TypeError(".dataform.ActionConfig.TableAssertionsConfig.uniqueKeys: object expected");t.uniqueKeys[r]=s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.fromObject(e.uniqueKeys[r])}}if(e.nonNull){if(!Array.isArray(e.nonNull))throw TypeError(".dataform.ActionConfig.TableAssertionsConfig.nonNull: array expected");for(t.nonNull=[],r=0;r<e.nonNull.length;++r)t.nonNull[r]=String(e.nonNull[r])}if(e.rowConditions){if(!Array.isArray(e.rowConditions))throw TypeError(".dataform.ActionConfig.TableAssertionsConfig.rowConditions: array expected");for(t.rowConditions=[],r=0;r<e.rowConditions.length;++r)t.rowConditions[r]=String(e.rowConditions[r])}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.uniqueKey=[],r.uniqueKeys=[],r.nonNull=[],r.rowConditions=[]),e.uniqueKey&&e.uniqueKey.length){r.uniqueKey=[];for(var n=0;n<e.uniqueKey.length;++n)r.uniqueKey[n]=e.uniqueKey[n]}if(e.uniqueKeys&&e.uniqueKeys.length)for(r.uniqueKeys=[],n=0;n<e.uniqueKeys.length;++n)r.uniqueKeys[n]=s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.toObject(e.uniqueKeys[n],t);if(e.nonNull&&e.nonNull.length)for(r.nonNull=[],n=0;n<e.nonNull.length;++n)r.nonNull[n]=e.nonNull[n];if(e.rowConditions&&e.rowConditions.length)for(r.rowConditions=[],n=0;n<e.rowConditions.length;++n)r.rowConditions[n]=e.rowConditions[n];return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.TableAssertionsConfig"},t.UniqueKey=function(){function t(e){if(this.uniqueKey=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.uniqueKey=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.uniqueKey&&e.uniqueKey.length)for(var r=0;r<e.uniqueKey.length;++r)t.uint32(10).string(e.uniqueKey[r]);return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.uniqueKey&&n.uniqueKey.length||(n.uniqueKey=[]),n.uniqueKey.push(e.string());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.uniqueKey&&e.hasOwnProperty("uniqueKey")){if(!Array.isArray(e.uniqueKey))return"uniqueKey: array expected";for(var t=0;t<e.uniqueKey.length;++t)if(!a.isString(e.uniqueKey[t]))return"uniqueKey: string[] expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey)return e;var t=new s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey;if(e.uniqueKey){if(!Array.isArray(e.uniqueKey))throw TypeError(".dataform.ActionConfig.TableAssertionsConfig.UniqueKey.uniqueKey: array expected");t.uniqueKey=[];for(var r=0;r<e.uniqueKey.length;++r)t.uniqueKey[r]=String(e.uniqueKey[r])}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.uniqueKey=[]),e.uniqueKey&&e.uniqueKey.length){r.uniqueKey=[];for(var n=0;n<e.uniqueKey.length;++n)r.uniqueKey[n]=e.uniqueKey[n]}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.TableAssertionsConfig.UniqueKey"},t}(),t}(),t.TableConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],this.preOperations=[],this.postOperations=[],this.columns=[],this.clusterBy=[],this.labels={},this.additionalOptions={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.preOperations=a.emptyArray,t.prototype.postOperations=a.emptyArray,t.prototype.description="",t.prototype.columns=a.emptyArray,t.prototype.partitionBy="",t.prototype.partitionExpirationDays=0,t.prototype.requirePartitionFilter=!1,t.prototype.clusterBy=a.emptyArray,t.prototype.labels=a.emptyObject,t.prototype.additionalOptions=a.emptyObject,t.prototype.dependOnDependencyAssertions=!1,t.prototype.assertions=null,t.prototype.hermetic=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(42).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(50).string(e.tags[r]);if(null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.preOperations&&e.preOperations.length)for(r=0;r<e.preOperations.length;++r)t.uint32(66).string(e.preOperations[r]);if(null!=e.postOperations&&e.postOperations.length)for(r=0;r<e.postOperations.length;++r)t.uint32(74).string(e.postOperations[r]);if(null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(82).string(e.description),null!=e.columns&&e.columns.length)for(r=0;r<e.columns.length;++r)s.dataform.ActionConfig.ColumnDescriptor.encode(e.columns[r],t.uint32(90).fork()).ldelim();if(null!=e.partitionBy&&Object.hasOwnProperty.call(e,"partitionBy")&&t.uint32(98).string(e.partitionBy),null!=e.partitionExpirationDays&&Object.hasOwnProperty.call(e,"partitionExpirationDays")&&t.uint32(104).int32(e.partitionExpirationDays),null!=e.requirePartitionFilter&&Object.hasOwnProperty.call(e,"requirePartitionFilter")&&t.uint32(112).bool(e.requirePartitionFilter),null!=e.clusterBy&&e.clusterBy.length)for(r=0;r<e.clusterBy.length;++r)t.uint32(122).string(e.clusterBy[r]);if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.uint32(130).fork().uint32(10).string(n[r]).uint32(18).string(e.labels[n[r]]).ldelim()}if(null!=e.additionalOptions&&Object.hasOwnProperty.call(e,"additionalOptions"))for(n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.uint32(138).fork().uint32(10).string(n[r]).uint32(18).string(e.additionalOptions[n[r]]).ldelim();return null!=e.dependOnDependencyAssertions&&Object.hasOwnProperty.call(e,"dependOnDependencyAssertions")&&t.uint32(144).bool(e.dependOnDependencyAssertions),null!=e.assertions&&Object.hasOwnProperty.call(e,"assertions")&&s.dataform.ActionConfig.TableAssertionsConfig.encode(e.assertions,t.uint32(154).fork()).ldelim(),null!=e.hermetic&&Object.hasOwnProperty.call(e,"hermetic")&&t.uint32(160).bool(e.hermetic),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.ActionConfig.TableConfig;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.name=e.string();break;case 2:l.dataset=e.string();break;case 3:l.project=e.string();break;case 4:l.dependencyTargets&&l.dependencyTargets.length||(l.dependencyTargets=[]),l.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 5:l.filename=e.string();break;case 6:l.tags&&l.tags.length||(l.tags=[]),l.tags.push(e.string());break;case 7:l.disabled=e.bool();break;case 8:l.preOperations&&l.preOperations.length||(l.preOperations=[]),l.preOperations.push(e.string());break;case 9:l.postOperations&&l.postOperations.length||(l.postOperations=[]),l.postOperations.push(e.string());break;case 10:l.description=e.string();break;case 11:l.columns&&l.columns.length||(l.columns=[]),l.columns.push(s.dataform.ActionConfig.ColumnDescriptor.decode(e,e.uint32()));break;case 12:l.partitionBy=e.string();break;case 13:l.partitionExpirationDays=e.int32();break;case 14:l.requirePartitionFilter=e.bool();break;case 15:l.clusterBy&&l.clusterBy.length||(l.clusterBy=[]),l.clusterBy.push(e.string());break;case 16:l.labels===a.emptyObject&&(l.labels={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;)switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}l.labels[r]=n;break;case 17:for(l.additionalOptions===a.emptyObject&&(l.additionalOptions={}),u=e.uint32()+e.pos,r="",n="";e.pos<u;){var p;switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.additionalOptions[r]=n;break;case 18:l.dependOnDependencyAssertions=e.bool();break;case 19:l.assertions=s.dataform.ActionConfig.TableAssertionsConfig.decode(e,e.uint32());break;case 20:l.hermetic=e.bool();break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t)if(n=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+n}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.preOperations&&e.hasOwnProperty("preOperations")){if(!Array.isArray(e.preOperations))return"preOperations: array expected";for(t=0;t<e.preOperations.length;++t)if(!a.isString(e.preOperations[t]))return"preOperations: string[] expected"}if(null!=e.postOperations&&e.hasOwnProperty("postOperations")){if(!Array.isArray(e.postOperations))return"postOperations: array expected";for(t=0;t<e.postOperations.length;++t)if(!a.isString(e.postOperations[t]))return"postOperations: string[] expected"}if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.columns&&e.hasOwnProperty("columns")){if(!Array.isArray(e.columns))return"columns: array expected";for(t=0;t<e.columns.length;++t)if(n=s.dataform.ActionConfig.ColumnDescriptor.verify(e.columns[t]))return"columns."+n}if(null!=e.partitionBy&&e.hasOwnProperty("partitionBy")&&!a.isString(e.partitionBy))return"partitionBy: string expected";if(null!=e.partitionExpirationDays&&e.hasOwnProperty("partitionExpirationDays")&&!a.isInteger(e.partitionExpirationDays))return"partitionExpirationDays: integer expected";if(null!=e.requirePartitionFilter&&e.hasOwnProperty("requirePartitionFilter")&&"boolean"!=typeof e.requirePartitionFilter)return"requirePartitionFilter: boolean expected";if(null!=e.clusterBy&&e.hasOwnProperty("clusterBy")){if(!Array.isArray(e.clusterBy))return"clusterBy: array expected";for(t=0;t<e.clusterBy.length;++t)if(!a.isString(e.clusterBy[t]))return"clusterBy: string[] expected"}if(null!=e.labels&&e.hasOwnProperty("labels")){if(!a.isObject(e.labels))return"labels: object expected";var r=Object.keys(e.labels);for(t=0;t<r.length;++t)if(!a.isString(e.labels[r[t]]))return"labels: string{k:string} expected"}if(null!=e.additionalOptions&&e.hasOwnProperty("additionalOptions")){if(!a.isObject(e.additionalOptions))return"additionalOptions: object expected";for(r=Object.keys(e.additionalOptions),t=0;t<r.length;++t)if(!a.isString(e.additionalOptions[r[t]]))return"additionalOptions: string{k:string} expected"}return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&"boolean"!=typeof e.dependOnDependencyAssertions?"dependOnDependencyAssertions: boolean expected":null!=e.assertions&&e.hasOwnProperty("assertions")&&(n=s.dataform.ActionConfig.TableAssertionsConfig.verify(e.assertions))?"assertions."+n:null!=e.hermetic&&e.hasOwnProperty("hermetic")&&"boolean"!=typeof e.hermetic?"hermetic: boolean expected":null;var n},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.TableConfig)return e;var t=new s.dataform.ActionConfig.TableConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.TableConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.TableConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.TableConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),e.preOperations){if(!Array.isArray(e.preOperations))throw TypeError(".dataform.ActionConfig.TableConfig.preOperations: array expected");for(t.preOperations=[],r=0;r<e.preOperations.length;++r)t.preOperations[r]=String(e.preOperations[r])}if(e.postOperations){if(!Array.isArray(e.postOperations))throw TypeError(".dataform.ActionConfig.TableConfig.postOperations: array expected");for(t.postOperations=[],r=0;r<e.postOperations.length;++r)t.postOperations[r]=String(e.postOperations[r])}if(null!=e.description&&(t.description=String(e.description)),e.columns){if(!Array.isArray(e.columns))throw TypeError(".dataform.ActionConfig.TableConfig.columns: array expected");for(t.columns=[],r=0;r<e.columns.length;++r){if("object"!=typeof e.columns[r])throw TypeError(".dataform.ActionConfig.TableConfig.columns: object expected");t.columns[r]=s.dataform.ActionConfig.ColumnDescriptor.fromObject(e.columns[r])}}if(null!=e.partitionBy&&(t.partitionBy=String(e.partitionBy)),null!=e.partitionExpirationDays&&(t.partitionExpirationDays=0|e.partitionExpirationDays),null!=e.requirePartitionFilter&&(t.requirePartitionFilter=Boolean(e.requirePartitionFilter)),e.clusterBy){if(!Array.isArray(e.clusterBy))throw TypeError(".dataform.ActionConfig.TableConfig.clusterBy: array expected");for(t.clusterBy=[],r=0;r<e.clusterBy.length;++r)t.clusterBy[r]=String(e.clusterBy[r])}if(e.labels){if("object"!=typeof e.labels)throw TypeError(".dataform.ActionConfig.TableConfig.labels: object expected");t.labels={};var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.labels[n[r]]=String(e.labels[n[r]])}if(e.additionalOptions){if("object"!=typeof e.additionalOptions)throw TypeError(".dataform.ActionConfig.TableConfig.additionalOptions: object expected");for(t.additionalOptions={},n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.additionalOptions[n[r]]=String(e.additionalOptions[n[r]])}if(null!=e.dependOnDependencyAssertions&&(t.dependOnDependencyAssertions=Boolean(e.dependOnDependencyAssertions)),null!=e.assertions){if("object"!=typeof e.assertions)throw TypeError(".dataform.ActionConfig.TableConfig.assertions: object expected");t.assertions=s.dataform.ActionConfig.TableAssertionsConfig.fromObject(e.assertions)}return null!=e.hermetic&&(t.hermetic=Boolean(e.hermetic)),t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.arrays||t.defaults)&&(n.dependencyTargets=[],n.tags=[],n.preOperations=[],n.postOperations=[],n.columns=[],n.clusterBy=[]),(t.objects||t.defaults)&&(n.labels={},n.additionalOptions={}),t.defaults&&(n.name="",n.dataset="",n.project="",n.filename="",n.disabled=!1,n.description="",n.partitionBy="",n.partitionExpirationDays=0,n.requirePartitionFilter=!1,n.dependOnDependencyAssertions=!1,n.assertions=null,n.hermetic=!1),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(n.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(n.project=e.project),e.dependencyTargets&&e.dependencyTargets.length){n.dependencyTargets=[];for(var o=0;o<e.dependencyTargets.length;++o)n.dependencyTargets[o]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[o],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(n.filename=e.filename),e.tags&&e.tags.length)for(n.tags=[],o=0;o<e.tags.length;++o)n.tags[o]=e.tags[o];if(null!=e.disabled&&e.hasOwnProperty("disabled")&&(n.disabled=e.disabled),e.preOperations&&e.preOperations.length)for(n.preOperations=[],o=0;o<e.preOperations.length;++o)n.preOperations[o]=e.preOperations[o];if(e.postOperations&&e.postOperations.length)for(n.postOperations=[],o=0;o<e.postOperations.length;++o)n.postOperations[o]=e.postOperations[o];if(null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),e.columns&&e.columns.length)for(n.columns=[],o=0;o<e.columns.length;++o)n.columns[o]=s.dataform.ActionConfig.ColumnDescriptor.toObject(e.columns[o],t);if(null!=e.partitionBy&&e.hasOwnProperty("partitionBy")&&(n.partitionBy=e.partitionBy),null!=e.partitionExpirationDays&&e.hasOwnProperty("partitionExpirationDays")&&(n.partitionExpirationDays=e.partitionExpirationDays),null!=e.requirePartitionFilter&&e.hasOwnProperty("requirePartitionFilter")&&(n.requirePartitionFilter=e.requirePartitionFilter),e.clusterBy&&e.clusterBy.length)for(n.clusterBy=[],o=0;o<e.clusterBy.length;++o)n.clusterBy[o]=e.clusterBy[o];if(e.labels&&(r=Object.keys(e.labels)).length)for(n.labels={},o=0;o<r.length;++o)n.labels[r[o]]=e.labels[r[o]];if(e.additionalOptions&&(r=Object.keys(e.additionalOptions)).length)for(n.additionalOptions={},o=0;o<r.length;++o)n.additionalOptions[r[o]]=e.additionalOptions[r[o]];return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&(n.dependOnDependencyAssertions=e.dependOnDependencyAssertions),null!=e.assertions&&e.hasOwnProperty("assertions")&&(n.assertions=s.dataform.ActionConfig.TableAssertionsConfig.toObject(e.assertions,t)),null!=e.hermetic&&e.hasOwnProperty("hermetic")&&(n.hermetic=e.hermetic),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.TableConfig"},t}(),t.ViewConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],this.preOperations=[],this.postOperations=[],this.columns=[],this.labels={},this.additionalOptions={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.preOperations=a.emptyArray,t.prototype.postOperations=a.emptyArray,t.prototype.materialized=!1,t.prototype.description="",t.prototype.columns=a.emptyArray,t.prototype.labels=a.emptyObject,t.prototype.additionalOptions=a.emptyObject,t.prototype.dependOnDependencyAssertions=!1,t.prototype.hermetic=!1,t.prototype.assertions=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(42).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(50).string(e.tags[r]);if(null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.preOperations&&e.preOperations.length)for(r=0;r<e.preOperations.length;++r)t.uint32(66).string(e.preOperations[r]);if(null!=e.postOperations&&e.postOperations.length)for(r=0;r<e.postOperations.length;++r)t.uint32(74).string(e.postOperations[r]);if(null!=e.materialized&&Object.hasOwnProperty.call(e,"materialized")&&t.uint32(80).bool(e.materialized),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(90).string(e.description),null!=e.columns&&e.columns.length)for(r=0;r<e.columns.length;++r)s.dataform.ActionConfig.ColumnDescriptor.encode(e.columns[r],t.uint32(98).fork()).ldelim();if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.uint32(106).fork().uint32(10).string(n[r]).uint32(18).string(e.labels[n[r]]).ldelim()}if(null!=e.additionalOptions&&Object.hasOwnProperty.call(e,"additionalOptions"))for(n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.uint32(114).fork().uint32(10).string(n[r]).uint32(18).string(e.additionalOptions[n[r]]).ldelim();return null!=e.dependOnDependencyAssertions&&Object.hasOwnProperty.call(e,"dependOnDependencyAssertions")&&t.uint32(120).bool(e.dependOnDependencyAssertions),null!=e.hermetic&&Object.hasOwnProperty.call(e,"hermetic")&&t.uint32(128).bool(e.hermetic),null!=e.assertions&&Object.hasOwnProperty.call(e,"assertions")&&s.dataform.ActionConfig.TableAssertionsConfig.encode(e.assertions,t.uint32(138).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.ActionConfig.ViewConfig;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.name=e.string();break;case 2:l.dataset=e.string();break;case 3:l.project=e.string();break;case 4:l.dependencyTargets&&l.dependencyTargets.length||(l.dependencyTargets=[]),l.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 5:l.filename=e.string();break;case 6:l.tags&&l.tags.length||(l.tags=[]),l.tags.push(e.string());break;case 7:l.disabled=e.bool();break;case 8:l.preOperations&&l.preOperations.length||(l.preOperations=[]),l.preOperations.push(e.string());break;case 9:l.postOperations&&l.postOperations.length||(l.postOperations=[]),l.postOperations.push(e.string());break;case 10:l.materialized=e.bool();break;case 11:l.description=e.string();break;case 12:l.columns&&l.columns.length||(l.columns=[]),l.columns.push(s.dataform.ActionConfig.ColumnDescriptor.decode(e,e.uint32()));break;case 13:l.labels===a.emptyObject&&(l.labels={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;)switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}l.labels[r]=n;break;case 14:for(l.additionalOptions===a.emptyObject&&(l.additionalOptions={}),u=e.uint32()+e.pos,r="",n="";e.pos<u;){var p;switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.additionalOptions[r]=n;break;case 15:l.dependOnDependencyAssertions=e.bool();break;case 16:l.hermetic=e.bool();break;case 17:l.assertions=s.dataform.ActionConfig.TableAssertionsConfig.decode(e,e.uint32());break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t)if(n=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+n}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.preOperations&&e.hasOwnProperty("preOperations")){if(!Array.isArray(e.preOperations))return"preOperations: array expected";for(t=0;t<e.preOperations.length;++t)if(!a.isString(e.preOperations[t]))return"preOperations: string[] expected"}if(null!=e.postOperations&&e.hasOwnProperty("postOperations")){if(!Array.isArray(e.postOperations))return"postOperations: array expected";for(t=0;t<e.postOperations.length;++t)if(!a.isString(e.postOperations[t]))return"postOperations: string[] expected"}if(null!=e.materialized&&e.hasOwnProperty("materialized")&&"boolean"!=typeof e.materialized)return"materialized: boolean expected";if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.columns&&e.hasOwnProperty("columns")){if(!Array.isArray(e.columns))return"columns: array expected";for(t=0;t<e.columns.length;++t)if(n=s.dataform.ActionConfig.ColumnDescriptor.verify(e.columns[t]))return"columns."+n}if(null!=e.labels&&e.hasOwnProperty("labels")){if(!a.isObject(e.labels))return"labels: object expected";var r=Object.keys(e.labels);for(t=0;t<r.length;++t)if(!a.isString(e.labels[r[t]]))return"labels: string{k:string} expected"}if(null!=e.additionalOptions&&e.hasOwnProperty("additionalOptions")){if(!a.isObject(e.additionalOptions))return"additionalOptions: object expected";for(r=Object.keys(e.additionalOptions),t=0;t<r.length;++t)if(!a.isString(e.additionalOptions[r[t]]))return"additionalOptions: string{k:string} expected"}return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&"boolean"!=typeof e.dependOnDependencyAssertions?"dependOnDependencyAssertions: boolean expected":null!=e.hermetic&&e.hasOwnProperty("hermetic")&&"boolean"!=typeof e.hermetic?"hermetic: boolean expected":null!=e.assertions&&e.hasOwnProperty("assertions")&&(n=s.dataform.ActionConfig.TableAssertionsConfig.verify(e.assertions))?"assertions."+n:null;var n},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.ViewConfig)return e;var t=new s.dataform.ActionConfig.ViewConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.ViewConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.ViewConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.ViewConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),e.preOperations){if(!Array.isArray(e.preOperations))throw TypeError(".dataform.ActionConfig.ViewConfig.preOperations: array expected");for(t.preOperations=[],r=0;r<e.preOperations.length;++r)t.preOperations[r]=String(e.preOperations[r])}if(e.postOperations){if(!Array.isArray(e.postOperations))throw TypeError(".dataform.ActionConfig.ViewConfig.postOperations: array expected");for(t.postOperations=[],r=0;r<e.postOperations.length;++r)t.postOperations[r]=String(e.postOperations[r])}if(null!=e.materialized&&(t.materialized=Boolean(e.materialized)),null!=e.description&&(t.description=String(e.description)),e.columns){if(!Array.isArray(e.columns))throw TypeError(".dataform.ActionConfig.ViewConfig.columns: array expected");for(t.columns=[],r=0;r<e.columns.length;++r){if("object"!=typeof e.columns[r])throw TypeError(".dataform.ActionConfig.ViewConfig.columns: object expected");t.columns[r]=s.dataform.ActionConfig.ColumnDescriptor.fromObject(e.columns[r])}}if(e.labels){if("object"!=typeof e.labels)throw TypeError(".dataform.ActionConfig.ViewConfig.labels: object expected");t.labels={};var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.labels[n[r]]=String(e.labels[n[r]])}if(e.additionalOptions){if("object"!=typeof e.additionalOptions)throw TypeError(".dataform.ActionConfig.ViewConfig.additionalOptions: object expected");for(t.additionalOptions={},n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.additionalOptions[n[r]]=String(e.additionalOptions[n[r]])}if(null!=e.dependOnDependencyAssertions&&(t.dependOnDependencyAssertions=Boolean(e.dependOnDependencyAssertions)),null!=e.hermetic&&(t.hermetic=Boolean(e.hermetic)),null!=e.assertions){if("object"!=typeof e.assertions)throw TypeError(".dataform.ActionConfig.ViewConfig.assertions: object expected");t.assertions=s.dataform.ActionConfig.TableAssertionsConfig.fromObject(e.assertions)}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.arrays||t.defaults)&&(n.dependencyTargets=[],n.tags=[],n.preOperations=[],n.postOperations=[],n.columns=[]),(t.objects||t.defaults)&&(n.labels={},n.additionalOptions={}),t.defaults&&(n.name="",n.dataset="",n.project="",n.filename="",n.disabled=!1,n.materialized=!1,n.description="",n.dependOnDependencyAssertions=!1,n.hermetic=!1,n.assertions=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(n.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(n.project=e.project),e.dependencyTargets&&e.dependencyTargets.length){n.dependencyTargets=[];for(var o=0;o<e.dependencyTargets.length;++o)n.dependencyTargets[o]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[o],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(n.filename=e.filename),e.tags&&e.tags.length)for(n.tags=[],o=0;o<e.tags.length;++o)n.tags[o]=e.tags[o];if(null!=e.disabled&&e.hasOwnProperty("disabled")&&(n.disabled=e.disabled),e.preOperations&&e.preOperations.length)for(n.preOperations=[],o=0;o<e.preOperations.length;++o)n.preOperations[o]=e.preOperations[o];if(e.postOperations&&e.postOperations.length)for(n.postOperations=[],o=0;o<e.postOperations.length;++o)n.postOperations[o]=e.postOperations[o];if(null!=e.materialized&&e.hasOwnProperty("materialized")&&(n.materialized=e.materialized),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),e.columns&&e.columns.length)for(n.columns=[],o=0;o<e.columns.length;++o)n.columns[o]=s.dataform.ActionConfig.ColumnDescriptor.toObject(e.columns[o],t);if(e.labels&&(r=Object.keys(e.labels)).length)for(n.labels={},o=0;o<r.length;++o)n.labels[r[o]]=e.labels[r[o]];if(e.additionalOptions&&(r=Object.keys(e.additionalOptions)).length)for(n.additionalOptions={},o=0;o<r.length;++o)n.additionalOptions[r[o]]=e.additionalOptions[r[o]];return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&(n.dependOnDependencyAssertions=e.dependOnDependencyAssertions),null!=e.hermetic&&e.hasOwnProperty("hermetic")&&(n.hermetic=e.hermetic),null!=e.assertions&&e.hasOwnProperty("assertions")&&(n.assertions=s.dataform.ActionConfig.TableAssertionsConfig.toObject(e.assertions,t)),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.ViewConfig"},t}(),t.OnSchemaChange=(n={},(l=Object.create(n))[n[0]="IGNORE"]=0,l[n[1]="FAIL"]=1,l[n[2]="EXTEND"]=2,l[n[3]="SYNCHRONIZE"]=3,l),t.IncrementalTableConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],this.preOperations=[],this.postOperations=[],this.uniqueKey=[],this.columns=[],this.clusterBy=[],this.labels={},this.additionalOptions={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.preOperations=a.emptyArray,t.prototype.postOperations=a.emptyArray,t.prototype.protected=!1,t.prototype.uniqueKey=a.emptyArray,t.prototype.description="",t.prototype.columns=a.emptyArray,t.prototype.partitionBy="",t.prototype.partitionExpirationDays=0,t.prototype.requirePartitionFilter=!1,t.prototype.updatePartitionFilter="",t.prototype.clusterBy=a.emptyArray,t.prototype.labels=a.emptyObject,t.prototype.additionalOptions=a.emptyObject,t.prototype.dependOnDependencyAssertions=!1,t.prototype.assertions=null,t.prototype.hermetic=!1,t.prototype.onSchemaChange=0,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(42).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(50).string(e.tags[r]);if(null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.preOperations&&e.preOperations.length)for(r=0;r<e.preOperations.length;++r)t.uint32(66).string(e.preOperations[r]);if(null!=e.postOperations&&e.postOperations.length)for(r=0;r<e.postOperations.length;++r)t.uint32(74).string(e.postOperations[r]);if(null!=e.protected&&Object.hasOwnProperty.call(e,"protected")&&t.uint32(80).bool(e.protected),null!=e.uniqueKey&&e.uniqueKey.length)for(r=0;r<e.uniqueKey.length;++r)t.uint32(90).string(e.uniqueKey[r]);if(null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(98).string(e.description),null!=e.columns&&e.columns.length)for(r=0;r<e.columns.length;++r)s.dataform.ActionConfig.ColumnDescriptor.encode(e.columns[r],t.uint32(106).fork()).ldelim();if(null!=e.partitionBy&&Object.hasOwnProperty.call(e,"partitionBy")&&t.uint32(114).string(e.partitionBy),null!=e.partitionExpirationDays&&Object.hasOwnProperty.call(e,"partitionExpirationDays")&&t.uint32(120).int32(e.partitionExpirationDays),null!=e.requirePartitionFilter&&Object.hasOwnProperty.call(e,"requirePartitionFilter")&&t.uint32(128).bool(e.requirePartitionFilter),null!=e.updatePartitionFilter&&Object.hasOwnProperty.call(e,"updatePartitionFilter")&&t.uint32(138).string(e.updatePartitionFilter),null!=e.clusterBy&&e.clusterBy.length)for(r=0;r<e.clusterBy.length;++r)t.uint32(146).string(e.clusterBy[r]);if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.uint32(154).fork().uint32(10).string(n[r]).uint32(18).string(e.labels[n[r]]).ldelim()}if(null!=e.additionalOptions&&Object.hasOwnProperty.call(e,"additionalOptions"))for(n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.uint32(162).fork().uint32(10).string(n[r]).uint32(18).string(e.additionalOptions[n[r]]).ldelim();return null!=e.dependOnDependencyAssertions&&Object.hasOwnProperty.call(e,"dependOnDependencyAssertions")&&t.uint32(168).bool(e.dependOnDependencyAssertions),null!=e.assertions&&Object.hasOwnProperty.call(e,"assertions")&&s.dataform.ActionConfig.TableAssertionsConfig.encode(e.assertions,t.uint32(178).fork()).ldelim(),null!=e.hermetic&&Object.hasOwnProperty.call(e,"hermetic")&&t.uint32(184).bool(e.hermetic),null!=e.onSchemaChange&&Object.hasOwnProperty.call(e,"onSchemaChange")&&t.uint32(192).int32(e.onSchemaChange),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.ActionConfig.IncrementalTableConfig;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.name=e.string();break;case 2:l.dataset=e.string();break;case 3:l.project=e.string();break;case 4:l.dependencyTargets&&l.dependencyTargets.length||(l.dependencyTargets=[]),l.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 5:l.filename=e.string();break;case 6:l.tags&&l.tags.length||(l.tags=[]),l.tags.push(e.string());break;case 7:l.disabled=e.bool();break;case 8:l.preOperations&&l.preOperations.length||(l.preOperations=[]),l.preOperations.push(e.string());break;case 9:l.postOperations&&l.postOperations.length||(l.postOperations=[]),l.postOperations.push(e.string());break;case 10:l.protected=e.bool();break;case 11:l.uniqueKey&&l.uniqueKey.length||(l.uniqueKey=[]),l.uniqueKey.push(e.string());break;case 12:l.description=e.string();break;case 13:l.columns&&l.columns.length||(l.columns=[]),l.columns.push(s.dataform.ActionConfig.ColumnDescriptor.decode(e,e.uint32()));break;case 14:l.partitionBy=e.string();break;case 15:l.partitionExpirationDays=e.int32();break;case 16:l.requirePartitionFilter=e.bool();break;case 17:l.updatePartitionFilter=e.string();break;case 18:l.clusterBy&&l.clusterBy.length||(l.clusterBy=[]),l.clusterBy.push(e.string());break;case 19:l.labels===a.emptyObject&&(l.labels={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;)switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}l.labels[r]=n;break;case 20:for(l.additionalOptions===a.emptyObject&&(l.additionalOptions={}),u=e.uint32()+e.pos,r="",n="";e.pos<u;){var p;switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.additionalOptions[r]=n;break;case 21:l.dependOnDependencyAssertions=e.bool();break;case 22:l.assertions=s.dataform.ActionConfig.TableAssertionsConfig.decode(e,e.uint32());break;case 23:l.hermetic=e.bool();break;case 24:l.onSchemaChange=e.int32();break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t)if(n=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+n}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.preOperations&&e.hasOwnProperty("preOperations")){if(!Array.isArray(e.preOperations))return"preOperations: array expected";for(t=0;t<e.preOperations.length;++t)if(!a.isString(e.preOperations[t]))return"preOperations: string[] expected"}if(null!=e.postOperations&&e.hasOwnProperty("postOperations")){if(!Array.isArray(e.postOperations))return"postOperations: array expected";for(t=0;t<e.postOperations.length;++t)if(!a.isString(e.postOperations[t]))return"postOperations: string[] expected"}if(null!=e.protected&&e.hasOwnProperty("protected")&&"boolean"!=typeof e.protected)return"protected: boolean expected";if(null!=e.uniqueKey&&e.hasOwnProperty("uniqueKey")){if(!Array.isArray(e.uniqueKey))return"uniqueKey: array expected";for(t=0;t<e.uniqueKey.length;++t)if(!a.isString(e.uniqueKey[t]))return"uniqueKey: string[] expected"}if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.columns&&e.hasOwnProperty("columns")){if(!Array.isArray(e.columns))return"columns: array expected";for(t=0;t<e.columns.length;++t)if(n=s.dataform.ActionConfig.ColumnDescriptor.verify(e.columns[t]))return"columns."+n}if(null!=e.partitionBy&&e.hasOwnProperty("partitionBy")&&!a.isString(e.partitionBy))return"partitionBy: string expected";if(null!=e.partitionExpirationDays&&e.hasOwnProperty("partitionExpirationDays")&&!a.isInteger(e.partitionExpirationDays))return"partitionExpirationDays: integer expected";if(null!=e.requirePartitionFilter&&e.hasOwnProperty("requirePartitionFilter")&&"boolean"!=typeof e.requirePartitionFilter)return"requirePartitionFilter: boolean expected";if(null!=e.updatePartitionFilter&&e.hasOwnProperty("updatePartitionFilter")&&!a.isString(e.updatePartitionFilter))return"updatePartitionFilter: string expected";if(null!=e.clusterBy&&e.hasOwnProperty("clusterBy")){if(!Array.isArray(e.clusterBy))return"clusterBy: array expected";for(t=0;t<e.clusterBy.length;++t)if(!a.isString(e.clusterBy[t]))return"clusterBy: string[] expected"}if(null!=e.labels&&e.hasOwnProperty("labels")){if(!a.isObject(e.labels))return"labels: object expected";var r=Object.keys(e.labels);for(t=0;t<r.length;++t)if(!a.isString(e.labels[r[t]]))return"labels: string{k:string} expected"}if(null!=e.additionalOptions&&e.hasOwnProperty("additionalOptions")){if(!a.isObject(e.additionalOptions))return"additionalOptions: object expected";for(r=Object.keys(e.additionalOptions),t=0;t<r.length;++t)if(!a.isString(e.additionalOptions[r[t]]))return"additionalOptions: string{k:string} expected"}if(null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&"boolean"!=typeof e.dependOnDependencyAssertions)return"dependOnDependencyAssertions: boolean expected";var n;if(null!=e.assertions&&e.hasOwnProperty("assertions")&&(n=s.dataform.ActionConfig.TableAssertionsConfig.verify(e.assertions)))return"assertions."+n;if(null!=e.hermetic&&e.hasOwnProperty("hermetic")&&"boolean"!=typeof e.hermetic)return"hermetic: boolean expected";if(null!=e.onSchemaChange&&e.hasOwnProperty("onSchemaChange"))switch(e.onSchemaChange){default:return"onSchemaChange: enum value expected";case 0:case 1:case 2:case 3:}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.IncrementalTableConfig)return e;var t=new s.dataform.ActionConfig.IncrementalTableConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),e.preOperations){if(!Array.isArray(e.preOperations))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.preOperations: array expected");for(t.preOperations=[],r=0;r<e.preOperations.length;++r)t.preOperations[r]=String(e.preOperations[r])}if(e.postOperations){if(!Array.isArray(e.postOperations))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.postOperations: array expected");for(t.postOperations=[],r=0;r<e.postOperations.length;++r)t.postOperations[r]=String(e.postOperations[r])}if(null!=e.protected&&(t.protected=Boolean(e.protected)),e.uniqueKey){if(!Array.isArray(e.uniqueKey))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.uniqueKey: array expected");for(t.uniqueKey=[],r=0;r<e.uniqueKey.length;++r)t.uniqueKey[r]=String(e.uniqueKey[r])}if(null!=e.description&&(t.description=String(e.description)),e.columns){if(!Array.isArray(e.columns))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.columns: array expected");for(t.columns=[],r=0;r<e.columns.length;++r){if("object"!=typeof e.columns[r])throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.columns: object expected");t.columns[r]=s.dataform.ActionConfig.ColumnDescriptor.fromObject(e.columns[r])}}if(null!=e.partitionBy&&(t.partitionBy=String(e.partitionBy)),null!=e.partitionExpirationDays&&(t.partitionExpirationDays=0|e.partitionExpirationDays),null!=e.requirePartitionFilter&&(t.requirePartitionFilter=Boolean(e.requirePartitionFilter)),null!=e.updatePartitionFilter&&(t.updatePartitionFilter=String(e.updatePartitionFilter)),e.clusterBy){if(!Array.isArray(e.clusterBy))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.clusterBy: array expected");for(t.clusterBy=[],r=0;r<e.clusterBy.length;++r)t.clusterBy[r]=String(e.clusterBy[r])}if(e.labels){if("object"!=typeof e.labels)throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.labels: object expected");t.labels={};var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.labels[n[r]]=String(e.labels[n[r]])}if(e.additionalOptions){if("object"!=typeof e.additionalOptions)throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.additionalOptions: object expected");for(t.additionalOptions={},n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.additionalOptions[n[r]]=String(e.additionalOptions[n[r]])}if(null!=e.dependOnDependencyAssertions&&(t.dependOnDependencyAssertions=Boolean(e.dependOnDependencyAssertions)),null!=e.assertions){if("object"!=typeof e.assertions)throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.assertions: object expected");t.assertions=s.dataform.ActionConfig.TableAssertionsConfig.fromObject(e.assertions)}switch(null!=e.hermetic&&(t.hermetic=Boolean(e.hermetic)),e.onSchemaChange){default:if("number"==typeof e.onSchemaChange){t.onSchemaChange=e.onSchemaChange;break}break;case"IGNORE":case 0:t.onSchemaChange=0;break;case"FAIL":case 1:t.onSchemaChange=1;break;case"EXTEND":case 2:t.onSchemaChange=2;break;case"SYNCHRONIZE":case 3:t.onSchemaChange=3}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.arrays||t.defaults)&&(n.dependencyTargets=[],n.tags=[],n.preOperations=[],n.postOperations=[],n.uniqueKey=[],n.columns=[],n.clusterBy=[]),(t.objects||t.defaults)&&(n.labels={},n.additionalOptions={}),t.defaults&&(n.name="",n.dataset="",n.project="",n.filename="",n.disabled=!1,n.protected=!1,n.description="",n.partitionBy="",n.partitionExpirationDays=0,n.requirePartitionFilter=!1,n.updatePartitionFilter="",n.dependOnDependencyAssertions=!1,n.assertions=null,n.hermetic=!1,n.onSchemaChange=t.enums===String?"IGNORE":0),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(n.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(n.project=e.project),e.dependencyTargets&&e.dependencyTargets.length){n.dependencyTargets=[];for(var o=0;o<e.dependencyTargets.length;++o)n.dependencyTargets[o]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[o],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(n.filename=e.filename),e.tags&&e.tags.length)for(n.tags=[],o=0;o<e.tags.length;++o)n.tags[o]=e.tags[o];if(null!=e.disabled&&e.hasOwnProperty("disabled")&&(n.disabled=e.disabled),e.preOperations&&e.preOperations.length)for(n.preOperations=[],o=0;o<e.preOperations.length;++o)n.preOperations[o]=e.preOperations[o];if(e.postOperations&&e.postOperations.length)for(n.postOperations=[],o=0;o<e.postOperations.length;++o)n.postOperations[o]=e.postOperations[o];if(null!=e.protected&&e.hasOwnProperty("protected")&&(n.protected=e.protected),e.uniqueKey&&e.uniqueKey.length)for(n.uniqueKey=[],o=0;o<e.uniqueKey.length;++o)n.uniqueKey[o]=e.uniqueKey[o];if(null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),e.columns&&e.columns.length)for(n.columns=[],o=0;o<e.columns.length;++o)n.columns[o]=s.dataform.ActionConfig.ColumnDescriptor.toObject(e.columns[o],t);if(null!=e.partitionBy&&e.hasOwnProperty("partitionBy")&&(n.partitionBy=e.partitionBy),null!=e.partitionExpirationDays&&e.hasOwnProperty("partitionExpirationDays")&&(n.partitionExpirationDays=e.partitionExpirationDays),null!=e.requirePartitionFilter&&e.hasOwnProperty("requirePartitionFilter")&&(n.requirePartitionFilter=e.requirePartitionFilter),null!=e.updatePartitionFilter&&e.hasOwnProperty("updatePartitionFilter")&&(n.updatePartitionFilter=e.updatePartitionFilter),e.clusterBy&&e.clusterBy.length)for(n.clusterBy=[],o=0;o<e.clusterBy.length;++o)n.clusterBy[o]=e.clusterBy[o];if(e.labels&&(r=Object.keys(e.labels)).length)for(n.labels={},o=0;o<r.length;++o)n.labels[r[o]]=e.labels[r[o]];if(e.additionalOptions&&(r=Object.keys(e.additionalOptions)).length)for(n.additionalOptions={},o=0;o<r.length;++o)n.additionalOptions[r[o]]=e.additionalOptions[r[o]];return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&(n.dependOnDependencyAssertions=e.dependOnDependencyAssertions),null!=e.assertions&&e.hasOwnProperty("assertions")&&(n.assertions=s.dataform.ActionConfig.TableAssertionsConfig.toObject(e.assertions,t)),null!=e.hermetic&&e.hasOwnProperty("hermetic")&&(n.hermetic=e.hermetic),null!=e.onSchemaChange&&e.hasOwnProperty("onSchemaChange")&&(n.onSchemaChange=t.enums===String?void 0===s.dataform.ActionConfig.OnSchemaChange[e.onSchemaChange]?e.onSchemaChange:s.dataform.ActionConfig.OnSchemaChange[e.onSchemaChange]:e.onSchemaChange),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.IncrementalTableConfig"},t}(),t.AssertionConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.description="",t.prototype.hermetic=!1,t.prototype.dependOnDependencyAssertions=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(42).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(50).string(e.tags[r]);return null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(66).string(e.description),null!=e.hermetic&&Object.hasOwnProperty.call(e,"hermetic")&&t.uint32(72).bool(e.hermetic),null!=e.dependOnDependencyAssertions&&Object.hasOwnProperty.call(e,"dependOnDependencyAssertions")&&t.uint32(80).bool(e.dependOnDependencyAssertions),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.AssertionConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.dataset=e.string();break;case 3:n.project=e.string();break;case 4:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 5:n.filename=e.string();break;case 6:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 7:n.disabled=e.bool();break;case 8:n.description=e.string();break;case 9:n.hermetic=e.bool();break;case 10:n.dependOnDependencyAssertions=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t){var r=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]);if(r)return"dependencyTargets."+r}}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled?"disabled: boolean expected":null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description)?"description: string expected":null!=e.hermetic&&e.hasOwnProperty("hermetic")&&"boolean"!=typeof e.hermetic?"hermetic: boolean expected":null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&"boolean"!=typeof e.dependOnDependencyAssertions?"dependOnDependencyAssertions: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.AssertionConfig)return e;var t=new s.dataform.ActionConfig.AssertionConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.AssertionConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.AssertionConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.AssertionConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}return null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.description&&(t.description=String(e.description)),null!=e.hermetic&&(t.hermetic=Boolean(e.hermetic)),null!=e.dependOnDependencyAssertions&&(t.dependOnDependencyAssertions=Boolean(e.dependOnDependencyAssertions)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dependencyTargets=[],r.tags=[]),t.defaults&&(r.name="",r.dataset="",r.project="",r.filename="",r.disabled=!1,r.description="",r.hermetic=!1,r.dependOnDependencyAssertions=!1),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(r.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),e.dependencyTargets&&e.dependencyTargets.length){r.dependencyTargets=[];for(var n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[n],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(r.filename=e.filename),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];return null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),null!=e.hermetic&&e.hasOwnProperty("hermetic")&&(r.hermetic=e.hermetic),null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&(r.dependOnDependencyAssertions=e.dependOnDependencyAssertions),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.AssertionConfig"},t}(),t.OperationConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],this.columns=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.hasOutput=!1,t.prototype.description="",t.prototype.columns=a.emptyArray,t.prototype.dependOnDependencyAssertions=!1,t.prototype.hermetic=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(42).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(50).string(e.tags[r]);if(null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.hasOutput&&Object.hasOwnProperty.call(e,"hasOutput")&&t.uint32(64).bool(e.hasOutput),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(74).string(e.description),null!=e.columns&&e.columns.length)for(r=0;r<e.columns.length;++r)s.dataform.ActionConfig.ColumnDescriptor.encode(e.columns[r],t.uint32(82).fork()).ldelim();return null!=e.dependOnDependencyAssertions&&Object.hasOwnProperty.call(e,"dependOnDependencyAssertions")&&t.uint32(88).bool(e.dependOnDependencyAssertions),null!=e.hermetic&&Object.hasOwnProperty.call(e,"hermetic")&&t.uint32(96).bool(e.hermetic),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.OperationConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.dataset=e.string();break;case 3:n.project=e.string();break;case 4:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 5:n.filename=e.string();break;case 6:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 7:n.disabled=e.bool();break;case 8:n.hasOutput=e.bool();break;case 9:n.description=e.string();break;case 10:n.columns&&n.columns.length||(n.columns=[]),n.columns.push(s.dataform.ActionConfig.ColumnDescriptor.decode(e,e.uint32()));break;case 11:n.dependOnDependencyAssertions=e.bool();break;case 12:n.hermetic=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t)if(r=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.hasOutput&&e.hasOwnProperty("hasOutput")&&"boolean"!=typeof e.hasOutput)return"hasOutput: boolean expected";if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.columns&&e.hasOwnProperty("columns")){if(!Array.isArray(e.columns))return"columns: array expected";for(t=0;t<e.columns.length;++t){var r;if(r=s.dataform.ActionConfig.ColumnDescriptor.verify(e.columns[t]))return"columns."+r}}return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&"boolean"!=typeof e.dependOnDependencyAssertions?"dependOnDependencyAssertions: boolean expected":null!=e.hermetic&&e.hasOwnProperty("hermetic")&&"boolean"!=typeof e.hermetic?"hermetic: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.OperationConfig)return e;var t=new s.dataform.ActionConfig.OperationConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.OperationConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.OperationConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.OperationConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.hasOutput&&(t.hasOutput=Boolean(e.hasOutput)),null!=e.description&&(t.description=String(e.description)),e.columns){if(!Array.isArray(e.columns))throw TypeError(".dataform.ActionConfig.OperationConfig.columns: array expected");for(t.columns=[],r=0;r<e.columns.length;++r){if("object"!=typeof e.columns[r])throw TypeError(".dataform.ActionConfig.OperationConfig.columns: object expected");t.columns[r]=s.dataform.ActionConfig.ColumnDescriptor.fromObject(e.columns[r])}}return null!=e.dependOnDependencyAssertions&&(t.dependOnDependencyAssertions=Boolean(e.dependOnDependencyAssertions)),null!=e.hermetic&&(t.hermetic=Boolean(e.hermetic)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dependencyTargets=[],r.tags=[],r.columns=[]),t.defaults&&(r.name="",r.dataset="",r.project="",r.filename="",r.disabled=!1,r.hasOutput=!1,r.description="",r.dependOnDependencyAssertions=!1,r.hermetic=!1),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(r.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),e.dependencyTargets&&e.dependencyTargets.length){r.dependencyTargets=[];for(var n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[n],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(r.filename=e.filename),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];if(null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.hasOutput&&e.hasOwnProperty("hasOutput")&&(r.hasOutput=e.hasOutput),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),e.columns&&e.columns.length)for(r.columns=[],n=0;n<e.columns.length;++n)r.columns[n]=s.dataform.ActionConfig.ColumnDescriptor.toObject(e.columns[n],t);return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&(r.dependOnDependencyAssertions=e.dependOnDependencyAssertions),null!=e.hermetic&&e.hasOwnProperty("hermetic")&&(r.hermetic=e.hermetic),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.OperationConfig"},t}(),t.DeclarationConfig=function(){function t(e){if(this.columns=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.description="",t.prototype.columns=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(34).string(e.description),null!=e.columns&&e.columns.length)for(var r=0;r<e.columns.length;++r)s.dataform.ActionConfig.ColumnDescriptor.encode(e.columns[r],t.uint32(42).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.DeclarationConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.dataset=e.string();break;case 3:n.project=e.string();break;case 4:n.description=e.string();break;case 5:n.columns&&n.columns.length||(n.columns=[]),n.columns.push(s.dataform.ActionConfig.ColumnDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.columns&&e.hasOwnProperty("columns")){if(!Array.isArray(e.columns))return"columns: array expected";for(var t=0;t<e.columns.length;++t){var r=s.dataform.ActionConfig.ColumnDescriptor.verify(e.columns[t]);if(r)return"columns."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.DeclarationConfig)return e;var t=new s.dataform.ActionConfig.DeclarationConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),null!=e.description&&(t.description=String(e.description)),e.columns){if(!Array.isArray(e.columns))throw TypeError(".dataform.ActionConfig.DeclarationConfig.columns: array expected");t.columns=[];for(var r=0;r<e.columns.length;++r){if("object"!=typeof e.columns[r])throw TypeError(".dataform.ActionConfig.DeclarationConfig.columns: object expected");t.columns[r]=s.dataform.ActionConfig.ColumnDescriptor.fromObject(e.columns[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.columns=[]),t.defaults&&(r.name="",r.dataset="",r.project="",r.description=""),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(r.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),e.columns&&e.columns.length){r.columns=[];for(var n=0;n<e.columns.length;++n)r.columns[n]=s.dataform.ActionConfig.ColumnDescriptor.toObject(e.columns[n],t)}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.DeclarationConfig"},t}(),t.NotebookConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.location="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.description="",t.prototype.dependOnDependencyAssertions=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.location&&Object.hasOwnProperty.call(e,"location")&&t.uint32(18).string(e.location),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(42).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(50).string(e.tags[r]);return null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(66).string(e.description),null!=e.dependOnDependencyAssertions&&Object.hasOwnProperty.call(e,"dependOnDependencyAssertions")&&t.uint32(72).bool(e.dependOnDependencyAssertions),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.NotebookConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.location=e.string();break;case 3:n.project=e.string();break;case 4:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 5:n.filename=e.string();break;case 6:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 7:n.disabled=e.bool();break;case 8:n.description=e.string();break;case 9:n.dependOnDependencyAssertions=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.location&&e.hasOwnProperty("location")&&!a.isString(e.location))return"location: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t){var r=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]);if(r)return"dependencyTargets."+r}}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled?"disabled: boolean expected":null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description)?"description: string expected":null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&"boolean"!=typeof e.dependOnDependencyAssertions?"dependOnDependencyAssertions: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.NotebookConfig)return e;var t=new s.dataform.ActionConfig.NotebookConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.location&&(t.location=String(e.location)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.NotebookConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.NotebookConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.NotebookConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}return null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.description&&(t.description=String(e.description)),null!=e.dependOnDependencyAssertions&&(t.dependOnDependencyAssertions=Boolean(e.dependOnDependencyAssertions)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dependencyTargets=[],r.tags=[]),t.defaults&&(r.name="",r.location="",r.project="",r.filename="",r.disabled=!1,r.description="",r.dependOnDependencyAssertions=!1),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.location&&e.hasOwnProperty("location")&&(r.location=e.location),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),e.dependencyTargets&&e.dependencyTargets.length){r.dependencyTargets=[];for(var n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[n],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(r.filename=e.filename),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];return null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&(r.dependOnDependencyAssertions=e.dependOnDependencyAssertions),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.NotebookConfig"},t}(),t.DataPreparationConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.description="",t.prototype.errorTable=null,t.prototype.loadMode=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(18).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(26).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(34).string(e.tags[r]);return null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(66).string(e.description),null!=e.errorTable&&Object.hasOwnProperty.call(e,"errorTable")&&s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.encode(e.errorTable,t.uint32(90).fork()).ldelim(),null!=e.loadMode&&Object.hasOwnProperty.call(e,"loadMode")&&s.dataform.ActionConfig.LoadModeConfig.encode(e.loadMode,t.uint32(98).fork()).ldelim(),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(106).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(114).string(e.project),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.DataPreparationConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 13:n.dataset=e.string();break;case 14:n.project=e.string();break;case 2:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 3:n.filename=e.string();break;case 4:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 7:n.disabled=e.bool();break;case 8:n.description=e.string();break;case 11:n.errorTable=s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.decode(e,e.uint32());break;case 12:n.loadMode=s.dataform.ActionConfig.LoadModeConfig.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t)if(r=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled?"disabled: boolean expected":null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description)?"description: string expected":null!=e.errorTable&&e.hasOwnProperty("errorTable")&&(r=s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.verify(e.errorTable))?"errorTable."+r:null!=e.loadMode&&e.hasOwnProperty("loadMode")&&(r=s.dataform.ActionConfig.LoadModeConfig.verify(e.loadMode))?"loadMode."+r:null;var r},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.DataPreparationConfig)return e;var t=new s.dataform.ActionConfig.DataPreparationConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.DataPreparationConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.DataPreparationConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.DataPreparationConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.description&&(t.description=String(e.description)),null!=e.errorTable){if("object"!=typeof e.errorTable)throw TypeError(".dataform.ActionConfig.DataPreparationConfig.errorTable: object expected");t.errorTable=s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.fromObject(e.errorTable)}if(null!=e.loadMode){if("object"!=typeof e.loadMode)throw TypeError(".dataform.ActionConfig.DataPreparationConfig.loadMode: object expected");t.loadMode=s.dataform.ActionConfig.LoadModeConfig.fromObject(e.loadMode)}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dependencyTargets=[],r.tags=[]),t.defaults&&(r.name="",r.filename="",r.disabled=!1,r.description="",r.errorTable=null,r.loadMode=null,r.dataset="",r.project=""),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),e.dependencyTargets&&e.dependencyTargets.length){r.dependencyTargets=[];for(var n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[n],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(r.filename=e.filename),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];return null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),null!=e.errorTable&&e.hasOwnProperty("errorTable")&&(r.errorTable=s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.toObject(e.errorTable,t)),null!=e.loadMode&&e.hasOwnProperty("loadMode")&&(r.loadMode=s.dataform.ActionConfig.LoadModeConfig.toObject(e.loadMode,t)),null!=e.dataset&&e.hasOwnProperty("dataset")&&(r.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.DataPreparationConfig"},t.ErrorTableConfig=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.retentionDays=0,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.retentionDays&&Object.hasOwnProperty.call(e,"retentionDays")&&t.uint32(32).int32(e.retentionDays),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.dataset=e.string();break;case 3:n.project=e.string();break;case 4:n.retentionDays=e.int32();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name)?"name: string expected":null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset)?"dataset: string expected":null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project)?"project: string expected":null!=e.retentionDays&&e.hasOwnProperty("retentionDays")&&!a.isInteger(e.retentionDays)?"retentionDays: integer expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig)return e;var t=new s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig;return null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),null!=e.retentionDays&&(t.retentionDays=0|e.retentionDays),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.name="",r.dataset="",r.project="",r.retentionDays=0),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(r.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),null!=e.retentionDays&&e.hasOwnProperty("retentionDays")&&(r.retentionDays=e.retentionDays),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig"},t}(),t}(),t.LoadModeConfig=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.mode=0,t.prototype.incrementalColumn="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.mode&&Object.hasOwnProperty.call(e,"mode")&&t.uint32(8).int32(e.mode),null!=e.incrementalColumn&&Object.hasOwnProperty.call(e,"incrementalColumn")&&t.uint32(18).string(e.incrementalColumn),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.LoadModeConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.mode=e.int32();break;case 2:n.incrementalColumn=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.mode&&e.hasOwnProperty("mode"))switch(e.mode){default:return"mode: enum value expected";case 0:case 1:case 2:case 3:}return null!=e.incrementalColumn&&e.hasOwnProperty("incrementalColumn")&&!a.isString(e.incrementalColumn)?"incrementalColumn: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.LoadModeConfig)return e;var t=new s.dataform.ActionConfig.LoadModeConfig;switch(e.mode){default:if("number"==typeof e.mode){t.mode=e.mode;break}break;case"REPLACE_TABLE":case 0:t.mode=0;break;case"APPEND":case 1:t.mode=1;break;case"MAXIMUM":case 2:t.mode=2;break;case"UNIQUE":case 3:t.mode=3}return null!=e.incrementalColumn&&(t.incrementalColumn=String(e.incrementalColumn)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.mode=t.enums===String?"REPLACE_TABLE":0,r.incrementalColumn=""),null!=e.mode&&e.hasOwnProperty("mode")&&(r.mode=t.enums===String?void 0===s.dataform.ActionConfig.LoadMode[e.mode]?e.mode:s.dataform.ActionConfig.LoadMode[e.mode]:e.mode),null!=e.incrementalColumn&&e.hasOwnProperty("incrementalColumn")&&(r.incrementalColumn=e.incrementalColumn),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.LoadModeConfig"},t}(),t.LoadMode=function(){var e={},t=Object.create(e);return t[e[0]="REPLACE_TABLE"]=0,t[e[1]="APPEND"]=1,t[e[2]="MAXIMUM"]=2,t[e[3]="UNIQUE"]=3,t}(),t}(),n.NotebookRuntimeOptionsConfig=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.outputBucket=null,t.prototype.runtimeTemplateName="",Object.defineProperty(t.prototype,"outputSink",{get:a.oneOfGetter(r=["outputBucket"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.outputBucket&&Object.hasOwnProperty.call(e,"outputBucket")&&t.uint32(10).string(e.outputBucket),null!=e.runtimeTemplateName&&Object.hasOwnProperty.call(e,"runtimeTemplateName")&&t.uint32(18).string(e.runtimeTemplateName),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.NotebookRuntimeOptionsConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.outputBucket=e.string();break;case 2:n.runtimeTemplateName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.outputBucket&&e.hasOwnProperty("outputBucket")&&!a.isString(e.outputBucket)?"outputBucket: string expected":null!=e.runtimeTemplateName&&e.hasOwnProperty("runtimeTemplateName")&&!a.isString(e.runtimeTemplateName)?"runtimeTemplateName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.NotebookRuntimeOptionsConfig)return e;var t=new s.dataform.NotebookRuntimeOptionsConfig;return null!=e.outputBucket&&(t.outputBucket=String(e.outputBucket)),null!=e.runtimeTemplateName&&(t.runtimeTemplateName=String(e.runtimeTemplateName)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.runtimeTemplateName=""),null!=e.outputBucket&&e.hasOwnProperty("outputBucket")&&(r.outputBucket=e.outputBucket,t.oneofs&&(r.outputSink="outputBucket")),null!=e.runtimeTemplateName&&e.hasOwnProperty("runtimeTemplateName")&&(r.runtimeTemplateName=e.runtimeTemplateName),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.NotebookRuntimeOptionsConfig"},t}(),n.ProjectConfig=function(){function t(e){if(this.vars={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.warehouse="",t.prototype.defaultDatabase="",t.prototype.defaultSchema="",t.prototype.defaultLocation="",t.prototype.assertionSchema="",t.prototype.vars=a.emptyObject,t.prototype.databaseSuffix="",t.prototype.schemaSuffix="",t.prototype.tablePrefix="",t.prototype.defaultNotebookRuntimeOptions=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.warehouse&&Object.hasOwnProperty.call(e,"warehouse")&&t.uint32(10).string(e.warehouse),null!=e.defaultSchema&&Object.hasOwnProperty.call(e,"defaultSchema")&&t.uint32(18).string(e.defaultSchema),null!=e.assertionSchema&&Object.hasOwnProperty.call(e,"assertionSchema")&&t.uint32(42).string(e.assertionSchema),null!=e.schemaSuffix&&Object.hasOwnProperty.call(e,"schemaSuffix")&&t.uint32(58).string(e.schemaSuffix),null!=e.defaultDatabase&&Object.hasOwnProperty.call(e,"defaultDatabase")&&t.uint32(74).string(e.defaultDatabase),null!=e.tablePrefix&&Object.hasOwnProperty.call(e,"tablePrefix")&&t.uint32(90).string(e.tablePrefix),null!=e.vars&&Object.hasOwnProperty.call(e,"vars"))for(var r=Object.keys(e.vars),n=0;n<r.length;++n)t.uint32(114).fork().uint32(10).string(r[n]).uint32(18).string(e.vars[r[n]]).ldelim();return null!=e.databaseSuffix&&Object.hasOwnProperty.call(e,"databaseSuffix")&&t.uint32(122).string(e.databaseSuffix),null!=e.defaultLocation&&Object.hasOwnProperty.call(e,"defaultLocation")&&t.uint32(130).string(e.defaultLocation),null!=e.defaultNotebookRuntimeOptions&&Object.hasOwnProperty.call(e,"defaultNotebookRuntimeOptions")&&s.dataform.NotebookRuntimeOptions.encode(e.defaultNotebookRuntimeOptions,t.uint32(138).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.ProjectConfig;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.warehouse=e.string();break;case 9:l.defaultDatabase=e.string();break;case 2:l.defaultSchema=e.string();break;case 16:l.defaultLocation=e.string();break;case 5:l.assertionSchema=e.string();break;case 14:l.vars===a.emptyObject&&(l.vars={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;){var p=e.uint32();switch(p>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.vars[r]=n;break;case 15:l.databaseSuffix=e.string();break;case 7:l.schemaSuffix=e.string();break;case 11:l.tablePrefix=e.string();break;case 17:l.defaultNotebookRuntimeOptions=s.dataform.NotebookRuntimeOptions.decode(e,e.uint32());break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.warehouse&&e.hasOwnProperty("warehouse")&&!a.isString(e.warehouse))return"warehouse: string expected";if(null!=e.defaultDatabase&&e.hasOwnProperty("defaultDatabase")&&!a.isString(e.defaultDatabase))return"defaultDatabase: string expected";if(null!=e.defaultSchema&&e.hasOwnProperty("defaultSchema")&&!a.isString(e.defaultSchema))return"defaultSchema: string expected";if(null!=e.defaultLocation&&e.hasOwnProperty("defaultLocation")&&!a.isString(e.defaultLocation))return"defaultLocation: string expected";if(null!=e.assertionSchema&&e.hasOwnProperty("assertionSchema")&&!a.isString(e.assertionSchema))return"assertionSchema: string expected";if(null!=e.vars&&e.hasOwnProperty("vars")){if(!a.isObject(e.vars))return"vars: object expected";for(var t=Object.keys(e.vars),r=0;r<t.length;++r)if(!a.isString(e.vars[t[r]]))return"vars: string{k:string} expected"}if(null!=e.databaseSuffix&&e.hasOwnProperty("databaseSuffix")&&!a.isString(e.databaseSuffix))return"databaseSuffix: string expected";if(null!=e.schemaSuffix&&e.hasOwnProperty("schemaSuffix")&&!a.isString(e.schemaSuffix))return"schemaSuffix: string expected";if(null!=e.tablePrefix&&e.hasOwnProperty("tablePrefix")&&!a.isString(e.tablePrefix))return"tablePrefix: string expected";if(null!=e.defaultNotebookRuntimeOptions&&e.hasOwnProperty("defaultNotebookRuntimeOptions")){var n=s.dataform.NotebookRuntimeOptions.verify(e.defaultNotebookRuntimeOptions);if(n)return"defaultNotebookRuntimeOptions."+n}return null},t.fromObject=function(e){if(e instanceof s.dataform.ProjectConfig)return e;var t=new s.dataform.ProjectConfig;if(null!=e.warehouse&&(t.warehouse=String(e.warehouse)),null!=e.defaultDatabase&&(t.defaultDatabase=String(e.defaultDatabase)),null!=e.defaultSchema&&(t.defaultSchema=String(e.defaultSchema)),null!=e.defaultLocation&&(t.defaultLocation=String(e.defaultLocation)),null!=e.assertionSchema&&(t.assertionSchema=String(e.assertionSchema)),e.vars){if("object"!=typeof e.vars)throw TypeError(".dataform.ProjectConfig.vars: object expected");t.vars={};for(var r=Object.keys(e.vars),n=0;n<r.length;++n)t.vars[r[n]]=String(e.vars[r[n]])}if(null!=e.databaseSuffix&&(t.databaseSuffix=String(e.databaseSuffix)),null!=e.schemaSuffix&&(t.schemaSuffix=String(e.schemaSuffix)),null!=e.tablePrefix&&(t.tablePrefix=String(e.tablePrefix)),null!=e.defaultNotebookRuntimeOptions){if("object"!=typeof e.defaultNotebookRuntimeOptions)throw TypeError(".dataform.ProjectConfig.defaultNotebookRuntimeOptions: object expected");t.defaultNotebookRuntimeOptions=s.dataform.NotebookRuntimeOptions.fromObject(e.defaultNotebookRuntimeOptions)}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.objects||t.defaults)&&(n.vars={}),t.defaults&&(n.warehouse="",n.defaultSchema="",n.assertionSchema="",n.schemaSuffix="",n.defaultDatabase="",n.tablePrefix="",n.databaseSuffix="",n.defaultLocation="",n.defaultNotebookRuntimeOptions=null),null!=e.warehouse&&e.hasOwnProperty("warehouse")&&(n.warehouse=e.warehouse),null!=e.defaultSchema&&e.hasOwnProperty("defaultSchema")&&(n.defaultSchema=e.defaultSchema),null!=e.assertionSchema&&e.hasOwnProperty("assertionSchema")&&(n.assertionSchema=e.assertionSchema),null!=e.schemaSuffix&&e.hasOwnProperty("schemaSuffix")&&(n.schemaSuffix=e.schemaSuffix),null!=e.defaultDatabase&&e.hasOwnProperty("defaultDatabase")&&(n.defaultDatabase=e.defaultDatabase),null!=e.tablePrefix&&e.hasOwnProperty("tablePrefix")&&(n.tablePrefix=e.tablePrefix),e.vars&&(r=Object.keys(e.vars)).length){n.vars={};for(var o=0;o<r.length;++o)n.vars[r[o]]=e.vars[r[o]]}return null!=e.databaseSuffix&&e.hasOwnProperty("databaseSuffix")&&(n.databaseSuffix=e.databaseSuffix),null!=e.defaultLocation&&e.hasOwnProperty("defaultLocation")&&(n.defaultLocation=e.defaultLocation),null!=e.defaultNotebookRuntimeOptions&&e.hasOwnProperty("defaultNotebookRuntimeOptions")&&(n.defaultNotebookRuntimeOptions=s.dataform.NotebookRuntimeOptions.toObject(e.defaultNotebookRuntimeOptions,t)),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ProjectConfig"},t}(),n.CompileConfig=function(){function t(e){if(this.filePaths=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.projectDir="",t.prototype.filePaths=a.emptyArray,t.prototype.projectConfigOverride=null,t.prototype.timeoutMillis=0,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.projectDir&&Object.hasOwnProperty.call(e,"projectDir")&&t.uint32(10).string(e.projectDir),null!=e.projectConfigOverride&&Object.hasOwnProperty.call(e,"projectConfigOverride")&&s.dataform.ProjectConfig.encode(e.projectConfigOverride,t.uint32(26).fork()).ldelim(),null!=e.timeoutMillis&&Object.hasOwnProperty.call(e,"timeoutMillis")&&t.uint32(48).int32(e.timeoutMillis),null!=e.filePaths&&e.filePaths.length)for(var r=0;r<e.filePaths.length;++r)t.uint32(66).string(e.filePaths[r]);return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CompileConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.projectDir=e.string();break;case 8:n.filePaths&&n.filePaths.length||(n.filePaths=[]),n.filePaths.push(e.string());break;case 3:n.projectConfigOverride=s.dataform.ProjectConfig.decode(e,e.uint32());break;case 6:n.timeoutMillis=e.int32();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.projectDir&&e.hasOwnProperty("projectDir")&&!a.isString(e.projectDir))return"projectDir: string expected";if(null!=e.filePaths&&e.hasOwnProperty("filePaths")){if(!Array.isArray(e.filePaths))return"filePaths: array expected";for(var t=0;t<e.filePaths.length;++t)if(!a.isString(e.filePaths[t]))return"filePaths: string[] expected"}if(null!=e.projectConfigOverride&&e.hasOwnProperty("projectConfigOverride")){var r=s.dataform.ProjectConfig.verify(e.projectConfigOverride);if(r)return"projectConfigOverride."+r}return null!=e.timeoutMillis&&e.hasOwnProperty("timeoutMillis")&&!a.isInteger(e.timeoutMillis)?"timeoutMillis: integer expected":null},t.fromObject=function(e){if(e instanceof s.dataform.CompileConfig)return e;var t=new s.dataform.CompileConfig;if(null!=e.projectDir&&(t.projectDir=String(e.projectDir)),e.filePaths){if(!Array.isArray(e.filePaths))throw TypeError(".dataform.CompileConfig.filePaths: array expected");t.filePaths=[];for(var r=0;r<e.filePaths.length;++r)t.filePaths[r]=String(e.filePaths[r])}if(null!=e.projectConfigOverride){if("object"!=typeof e.projectConfigOverride)throw TypeError(".dataform.CompileConfig.projectConfigOverride: object expected");t.projectConfigOverride=s.dataform.ProjectConfig.fromObject(e.projectConfigOverride)}return null!=e.timeoutMillis&&(t.timeoutMillis=0|e.timeoutMillis),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.filePaths=[]),t.defaults&&(r.projectDir="",r.projectConfigOverride=null,r.timeoutMillis=0),null!=e.projectDir&&e.hasOwnProperty("projectDir")&&(r.projectDir=e.projectDir),null!=e.projectConfigOverride&&e.hasOwnProperty("projectConfigOverride")&&(r.projectConfigOverride=s.dataform.ProjectConfig.toObject(e.projectConfigOverride,t)),null!=e.timeoutMillis&&e.hasOwnProperty("timeoutMillis")&&(r.timeoutMillis=e.timeoutMillis),e.filePaths&&e.filePaths.length){r.filePaths=[];for(var n=0;n<e.filePaths.length;++n)r.filePaths[n]=e.filePaths[n]}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CompileConfig"},t}(),n.Target=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.database="",t.prototype.schema="",t.prototype.name="",t.prototype.includeDependentAssertions=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.schema&&Object.hasOwnProperty.call(e,"schema")&&t.uint32(10).string(e.schema),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(26).string(e.database),null!=e.includeDependentAssertions&&Object.hasOwnProperty.call(e,"includeDependentAssertions")&&t.uint32(32).bool(e.includeDependentAssertions),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Target;e.pos<r;){var i=e.uint32();switch(i>>>3){case 3:n.database=e.string();break;case 1:n.schema=e.string();break;case 2:n.name=e.string();break;case 4:n.includeDependentAssertions=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.database&&e.hasOwnProperty("database")&&!a.isString(e.database)?"database: string expected":null!=e.schema&&e.hasOwnProperty("schema")&&!a.isString(e.schema)?"schema: string expected":null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name)?"name: string expected":null!=e.includeDependentAssertions&&e.hasOwnProperty("includeDependentAssertions")&&"boolean"!=typeof e.includeDependentAssertions?"includeDependentAssertions: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Target)return e;var t=new s.dataform.Target;return null!=e.database&&(t.database=String(e.database)),null!=e.schema&&(t.schema=String(e.schema)),null!=e.name&&(t.name=String(e.name)),null!=e.includeDependentAssertions&&(t.includeDependentAssertions=Boolean(e.includeDependentAssertions)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.schema="",r.name="",r.database="",r.includeDependentAssertions=!1),null!=e.schema&&e.hasOwnProperty("schema")&&(r.schema=e.schema),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.database&&e.hasOwnProperty("database")&&(r.database=e.database),null!=e.includeDependentAssertions&&e.hasOwnProperty("includeDependentAssertions")&&(r.includeDependentAssertions=e.includeDependentAssertions),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Target"},t}(),n.BigQueryOptions=function(){function t(e){if(this.clusterBy=[],this.labels={},this.additionalOptions={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.partitionBy="",t.prototype.clusterBy=a.emptyArray,t.prototype.updatePartitionFilter="",t.prototype.labels=a.emptyObject,t.prototype.partitionExpirationDays=0,t.prototype.requirePartitionFilter=!1,t.prototype.additionalOptions=a.emptyObject,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.partitionBy&&Object.hasOwnProperty.call(e,"partitionBy")&&t.uint32(10).string(e.partitionBy),null!=e.clusterBy&&e.clusterBy.length)for(var r=0;r<e.clusterBy.length;++r)t.uint32(18).string(e.clusterBy[r]);if(null!=e.updatePartitionFilter&&Object.hasOwnProperty.call(e,"updatePartitionFilter")&&t.uint32(26).string(e.updatePartitionFilter),null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.uint32(34).fork().uint32(10).string(n[r]).uint32(18).string(e.labels[n[r]]).ldelim()}if(null!=e.partitionExpirationDays&&Object.hasOwnProperty.call(e,"partitionExpirationDays")&&t.uint32(40).int32(e.partitionExpirationDays),null!=e.requirePartitionFilter&&Object.hasOwnProperty.call(e,"requirePartitionFilter")&&t.uint32(48).bool(e.requirePartitionFilter),null!=e.additionalOptions&&Object.hasOwnProperty.call(e,"additionalOptions"))for(n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.uint32(58).fork().uint32(10).string(n[r]).uint32(18).string(e.additionalOptions[n[r]]).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.BigQueryOptions;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.partitionBy=e.string();break;case 2:l.clusterBy&&l.clusterBy.length||(l.clusterBy=[]),l.clusterBy.push(e.string());break;case 3:l.updatePartitionFilter=e.string();break;case 4:l.labels===a.emptyObject&&(l.labels={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;)switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}l.labels[r]=n;break;case 5:l.partitionExpirationDays=e.int32();break;case 6:l.requirePartitionFilter=e.bool();break;case 7:for(l.additionalOptions===a.emptyObject&&(l.additionalOptions={}),u=e.uint32()+e.pos,r="",n="";e.pos<u;){var p;switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.additionalOptions[r]=n;break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.partitionBy&&e.hasOwnProperty("partitionBy")&&!a.isString(e.partitionBy))return"partitionBy: string expected";if(null!=e.clusterBy&&e.hasOwnProperty("clusterBy")){if(!Array.isArray(e.clusterBy))return"clusterBy: array expected";for(var t=0;t<e.clusterBy.length;++t)if(!a.isString(e.clusterBy[t]))return"clusterBy: string[] expected"}if(null!=e.updatePartitionFilter&&e.hasOwnProperty("updatePartitionFilter")&&!a.isString(e.updatePartitionFilter))return"updatePartitionFilter: string expected";if(null!=e.labels&&e.hasOwnProperty("labels")){if(!a.isObject(e.labels))return"labels: object expected";var r=Object.keys(e.labels);for(t=0;t<r.length;++t)if(!a.isString(e.labels[r[t]]))return"labels: string{k:string} expected"}if(null!=e.partitionExpirationDays&&e.hasOwnProperty("partitionExpirationDays")&&!a.isInteger(e.partitionExpirationDays))return"partitionExpirationDays: integer expected";if(null!=e.requirePartitionFilter&&e.hasOwnProperty("requirePartitionFilter")&&"boolean"!=typeof e.requirePartitionFilter)return"requirePartitionFilter: boolean expected";if(null!=e.additionalOptions&&e.hasOwnProperty("additionalOptions")){if(!a.isObject(e.additionalOptions))return"additionalOptions: object expected";for(r=Object.keys(e.additionalOptions),t=0;t<r.length;++t)if(!a.isString(e.additionalOptions[r[t]]))return"additionalOptions: string{k:string} expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.BigQueryOptions)return e;var t=new s.dataform.BigQueryOptions;if(null!=e.partitionBy&&(t.partitionBy=String(e.partitionBy)),e.clusterBy){if(!Array.isArray(e.clusterBy))throw TypeError(".dataform.BigQueryOptions.clusterBy: array expected");t.clusterBy=[];for(var r=0;r<e.clusterBy.length;++r)t.clusterBy[r]=String(e.clusterBy[r])}if(null!=e.updatePartitionFilter&&(t.updatePartitionFilter=String(e.updatePartitionFilter)),e.labels){if("object"!=typeof e.labels)throw TypeError(".dataform.BigQueryOptions.labels: object expected");t.labels={};var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.labels[n[r]]=String(e.labels[n[r]])}if(null!=e.partitionExpirationDays&&(t.partitionExpirationDays=0|e.partitionExpirationDays),null!=e.requirePartitionFilter&&(t.requirePartitionFilter=Boolean(e.requirePartitionFilter)),e.additionalOptions){if("object"!=typeof e.additionalOptions)throw TypeError(".dataform.BigQueryOptions.additionalOptions: object expected");for(t.additionalOptions={},n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.additionalOptions[n[r]]=String(e.additionalOptions[n[r]])}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.arrays||t.defaults)&&(n.clusterBy=[]),(t.objects||t.defaults)&&(n.labels={},n.additionalOptions={}),t.defaults&&(n.partitionBy="",n.updatePartitionFilter="",n.partitionExpirationDays=0,n.requirePartitionFilter=!1),null!=e.partitionBy&&e.hasOwnProperty("partitionBy")&&(n.partitionBy=e.partitionBy),e.clusterBy&&e.clusterBy.length){n.clusterBy=[];for(var o=0;o<e.clusterBy.length;++o)n.clusterBy[o]=e.clusterBy[o]}if(null!=e.updatePartitionFilter&&e.hasOwnProperty("updatePartitionFilter")&&(n.updatePartitionFilter=e.updatePartitionFilter),e.labels&&(r=Object.keys(e.labels)).length)for(n.labels={},o=0;o<r.length;++o)n.labels[r[o]]=e.labels[r[o]];if(null!=e.partitionExpirationDays&&e.hasOwnProperty("partitionExpirationDays")&&(n.partitionExpirationDays=e.partitionExpirationDays),null!=e.requirePartitionFilter&&e.hasOwnProperty("requirePartitionFilter")&&(n.requirePartitionFilter=e.requirePartitionFilter),e.additionalOptions&&(r=Object.keys(e.additionalOptions)).length)for(n.additionalOptions={},o=0;o<r.length;++o)n.additionalOptions[r[o]]=e.additionalOptions[r[o]];return n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.BigQueryOptions"},t}(),n.GraphErrors=function(){function t(e){if(this.compilationErrors=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.compilationErrors=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.compilationErrors&&e.compilationErrors.length)for(var r=0;r<e.compilationErrors.length;++r)s.dataform.CompilationError.encode(e.compilationErrors[r],t.uint32(10).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.GraphErrors;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.compilationErrors&&n.compilationErrors.length||(n.compilationErrors=[]),n.compilationErrors.push(s.dataform.CompilationError.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.compilationErrors&&e.hasOwnProperty("compilationErrors")){if(!Array.isArray(e.compilationErrors))return"compilationErrors: array expected";for(var t=0;t<e.compilationErrors.length;++t){var r=s.dataform.CompilationError.verify(e.compilationErrors[t]);if(r)return"compilationErrors."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.GraphErrors)return e;var t=new s.dataform.GraphErrors;if(e.compilationErrors){if(!Array.isArray(e.compilationErrors))throw TypeError(".dataform.GraphErrors.compilationErrors: array expected");t.compilationErrors=[];for(var r=0;r<e.compilationErrors.length;++r){if("object"!=typeof e.compilationErrors[r])throw TypeError(".dataform.GraphErrors.compilationErrors: object expected");t.compilationErrors[r]=s.dataform.CompilationError.fromObject(e.compilationErrors[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.compilationErrors=[]),e.compilationErrors&&e.compilationErrors.length){r.compilationErrors=[];for(var n=0;n<e.compilationErrors.length;++n)r.compilationErrors[n]=s.dataform.CompilationError.toObject(e.compilationErrors[n],t)}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.GraphErrors"},t}(),n.CompilationError=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.fileName="",t.prototype.actionName="",t.prototype.actionTarget=null,t.prototype.message="",t.prototype.stack="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(10).string(e.fileName),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).string(e.message),null!=e.stack&&Object.hasOwnProperty.call(e,"stack")&&t.uint32(26).string(e.stack),null!=e.actionName&&Object.hasOwnProperty.call(e,"actionName")&&t.uint32(34).string(e.actionName),null!=e.actionTarget&&Object.hasOwnProperty.call(e,"actionTarget")&&s.dataform.Target.encode(e.actionTarget,t.uint32(42).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CompilationError;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.fileName=e.string();break;case 4:n.actionName=e.string();break;case 5:n.actionTarget=s.dataform.Target.decode(e,e.uint32());break;case 2:n.message=e.string();break;case 3:n.stack=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName))return"fileName: string expected";if(null!=e.actionName&&e.hasOwnProperty("actionName")&&!a.isString(e.actionName))return"actionName: string expected";if(null!=e.actionTarget&&e.hasOwnProperty("actionTarget")){var t=s.dataform.Target.verify(e.actionTarget);if(t)return"actionTarget."+t}return null!=e.message&&e.hasOwnProperty("message")&&!a.isString(e.message)?"message: string expected":null!=e.stack&&e.hasOwnProperty("stack")&&!a.isString(e.stack)?"stack: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.CompilationError)return e;var t=new s.dataform.CompilationError;if(null!=e.fileName&&(t.fileName=String(e.fileName)),null!=e.actionName&&(t.actionName=String(e.actionName)),null!=e.actionTarget){if("object"!=typeof e.actionTarget)throw TypeError(".dataform.CompilationError.actionTarget: object expected");t.actionTarget=s.dataform.Target.fromObject(e.actionTarget)}return null!=e.message&&(t.message=String(e.message)),null!=e.stack&&(t.stack=String(e.stack)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.fileName="",r.message="",r.stack="",r.actionName="",r.actionTarget=null),null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.message&&e.hasOwnProperty("message")&&(r.message=e.message),null!=e.stack&&e.hasOwnProperty("stack")&&(r.stack=e.stack),null!=e.actionName&&e.hasOwnProperty("actionName")&&(r.actionName=e.actionName),null!=e.actionTarget&&e.hasOwnProperty("actionTarget")&&(r.actionTarget=s.dataform.Target.toObject(e.actionTarget,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CompilationError"},t}(),n.ActionDescriptor=function(){function t(e){if(this.columns=[],this.bigqueryLabels={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.description="",t.prototype.columns=a.emptyArray,t.prototype.bigqueryLabels=a.emptyObject,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(10).string(e.description),null!=e.columns&&e.columns.length)for(var r=0;r<e.columns.length;++r)s.dataform.ColumnDescriptor.encode(e.columns[r],t.uint32(18).fork()).ldelim();if(null!=e.bigqueryLabels&&Object.hasOwnProperty.call(e,"bigqueryLabels")){var n=Object.keys(e.bigqueryLabels);for(r=0;r<n.length;++r)t.uint32(26).fork().uint32(10).string(n[r]).uint32(18).string(e.bigqueryLabels[n[r]]).ldelim()}return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.ActionDescriptor;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.description=e.string();break;case 2:l.columns&&l.columns.length||(l.columns=[]),l.columns.push(s.dataform.ColumnDescriptor.decode(e,e.uint32()));break;case 3:l.bigqueryLabels===a.emptyObject&&(l.bigqueryLabels={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;){var p=e.uint32();switch(p>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.bigqueryLabels[r]=n;break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.columns&&e.hasOwnProperty("columns")){if(!Array.isArray(e.columns))return"columns: array expected";for(var t=0;t<e.columns.length;++t){var r=s.dataform.ColumnDescriptor.verify(e.columns[t]);if(r)return"columns."+r}}if(null!=e.bigqueryLabels&&e.hasOwnProperty("bigqueryLabels")){if(!a.isObject(e.bigqueryLabels))return"bigqueryLabels: object expected";var n=Object.keys(e.bigqueryLabels);for(t=0;t<n.length;++t)if(!a.isString(e.bigqueryLabels[n[t]]))return"bigqueryLabels: string{k:string} expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionDescriptor)return e;var t=new s.dataform.ActionDescriptor;if(null!=e.description&&(t.description=String(e.description)),e.columns){if(!Array.isArray(e.columns))throw TypeError(".dataform.ActionDescriptor.columns: array expected");t.columns=[];for(var r=0;r<e.columns.length;++r){if("object"!=typeof e.columns[r])throw TypeError(".dataform.ActionDescriptor.columns: object expected");t.columns[r]=s.dataform.ColumnDescriptor.fromObject(e.columns[r])}}if(e.bigqueryLabels){if("object"!=typeof e.bigqueryLabels)throw TypeError(".dataform.ActionDescriptor.bigqueryLabels: object expected");t.bigqueryLabels={};var n=Object.keys(e.bigqueryLabels);for(r=0;r<n.length;++r)t.bigqueryLabels[n[r]]=String(e.bigqueryLabels[n[r]])}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.arrays||t.defaults)&&(n.columns=[]),(t.objects||t.defaults)&&(n.bigqueryLabels={}),t.defaults&&(n.description=""),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),e.columns&&e.columns.length){n.columns=[];for(var o=0;o<e.columns.length;++o)n.columns[o]=s.dataform.ColumnDescriptor.toObject(e.columns[o],t)}if(e.bigqueryLabels&&(r=Object.keys(e.bigqueryLabels)).length)for(n.bigqueryLabels={},o=0;o<r.length;++o)n.bigqueryLabels[r[o]]=e.bigqueryLabels[r[o]];return n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionDescriptor"},t}(),n.ColumnDescriptor=function(){function t(e){if(this.path=[],this.tags=[],this.bigqueryPolicyTags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.description="",t.prototype.path=a.emptyArray,t.prototype.displayName="",t.prototype.tags=a.emptyArray,t.prototype.bigqueryPolicyTags=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(10).string(e.description),null!=e.path&&e.path.length)for(var r=0;r<e.path.length;++r)t.uint32(18).string(e.path[r]);if(null!=e.displayName&&Object.hasOwnProperty.call(e,"displayName")&&t.uint32(26).string(e.displayName),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(58).string(e.tags[r]);if(null!=e.bigqueryPolicyTags&&e.bigqueryPolicyTags.length)for(r=0;r<e.bigqueryPolicyTags.length;++r)t.uint32(66).string(e.bigqueryPolicyTags[r]);return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ColumnDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.description=e.string();break;case 2:n.path&&n.path.length||(n.path=[]),n.path.push(e.string());break;case 3:n.displayName=e.string();break;case 7:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 8:n.bigqueryPolicyTags&&n.bigqueryPolicyTags.length||(n.bigqueryPolicyTags=[]),n.bigqueryPolicyTags.push(e.string());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var t=0;t<e.path.length;++t)if(!a.isString(e.path[t]))return"path: string[] expected"}if(null!=e.displayName&&e.hasOwnProperty("displayName")&&!a.isString(e.displayName))return"displayName: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.bigqueryPolicyTags&&e.hasOwnProperty("bigqueryPolicyTags")){if(!Array.isArray(e.bigqueryPolicyTags))return"bigqueryPolicyTags: array expected";for(t=0;t<e.bigqueryPolicyTags.length;++t)if(!a.isString(e.bigqueryPolicyTags[t]))return"bigqueryPolicyTags: string[] expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.ColumnDescriptor)return e;var t=new s.dataform.ColumnDescriptor;if(null!=e.description&&(t.description=String(e.description)),e.path){if(!Array.isArray(e.path))throw TypeError(".dataform.ColumnDescriptor.path: array expected");t.path=[];for(var r=0;r<e.path.length;++r)t.path[r]=String(e.path[r])}if(null!=e.displayName&&(t.displayName=String(e.displayName)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ColumnDescriptor.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(e.bigqueryPolicyTags){if(!Array.isArray(e.bigqueryPolicyTags))throw TypeError(".dataform.ColumnDescriptor.bigqueryPolicyTags: array expected");for(t.bigqueryPolicyTags=[],r=0;r<e.bigqueryPolicyTags.length;++r)t.bigqueryPolicyTags[r]=String(e.bigqueryPolicyTags[r])}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.path=[],r.tags=[],r.bigqueryPolicyTags=[]),t.defaults&&(r.description="",r.displayName=""),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),e.path&&e.path.length){r.path=[];for(var n=0;n<e.path.length;++n)r.path[n]=e.path[n]}if(null!=e.displayName&&e.hasOwnProperty("displayName")&&(r.displayName=e.displayName),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];if(e.bigqueryPolicyTags&&e.bigqueryPolicyTags.length)for(r.bigqueryPolicyTags=[],n=0;n<e.bigqueryPolicyTags.length;++n)r.bigqueryPolicyTags[n]=e.bigqueryPolicyTags[n];return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ColumnDescriptor"},t}(),n.TableType=(t={},(r=Object.create(t))[t[0]="UNKNOWN_TYPE"]=0,r[t[1]="TABLE"]=1,r[t[2]="INCREMENTAL"]=2,r[t[3]="VIEW"]=3,r),n.OnSchemaChange=function(){var e={},t=Object.create(e);return t[e[0]="IGNORE"]=0,t[e[1]="FAIL"]=1,t[e[2]="EXTEND"]=2,t[e[3]="SYNCHRONIZE"]=3,t}(),n.Table=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],this.uniqueKey=[],this.preOps=[],this.postOps=[],this.incrementalPreOps=[],this.incrementalPostOps=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.enumType=0,t.prototype.target=null,t.prototype.canonicalTarget=null,t.prototype.dependencyTargets=a.emptyArray,t.prototype.hermeticity=0,t.prototype.disabled=!1,t.prototype.type="",t.prototype.query="",t.prototype.protected=!1,t.prototype.materialized=!1,t.prototype.actionDescriptor=null,t.prototype.tags=a.emptyArray,t.prototype.where="",t.prototype.incrementalQuery="",t.prototype.uniqueKey=a.emptyArray,t.prototype.onSchemaChange=0,t.prototype.preOps=a.emptyArray,t.prototype.postOps=a.emptyArray,t.prototype.incrementalPreOps=a.emptyArray,t.prototype.incrementalPostOps=a.emptyArray,t.prototype.bigquery=null,t.prototype.fileName="",t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(26).string(e.type),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(34).fork()).ldelim(),null!=e.query&&Object.hasOwnProperty.call(e,"query")&&t.uint32(42).string(e.query),null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(48).bool(e.disabled),null!=e.where&&Object.hasOwnProperty.call(e,"where")&&t.uint32(66).string(e.where),null!=e.protected&&Object.hasOwnProperty.call(e,"protected")&&t.uint32(72).bool(e.protected),null!=e.preOps&&e.preOps.length)for(var r=0;r<e.preOps.length;++r)t.uint32(106).string(e.preOps[r]);if(null!=e.postOps&&e.postOps.length)for(r=0;r<e.postOps.length;++r)t.uint32(114).string(e.postOps[r]);if(null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(146).string(e.fileName),null!=e.bigquery&&Object.hasOwnProperty.call(e,"bigquery")&&s.dataform.BigQueryOptions.encode(e.bigquery,t.uint32(178).fork()).ldelim(),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(186).string(e.tags[r]);if(null!=e.actionDescriptor&&Object.hasOwnProperty.call(e,"actionDescriptor")&&s.dataform.ActionDescriptor.encode(e.actionDescriptor,t.uint32(194).fork()).ldelim(),null!=e.incrementalQuery&&Object.hasOwnProperty.call(e,"incrementalQuery")&&t.uint32(210).string(e.incrementalQuery),null!=e.dependencyTargets&&e.dependencyTargets.length)for(r=0;r<e.dependencyTargets.length;++r)s.dataform.Target.encode(e.dependencyTargets[r],t.uint32(218).fork()).ldelim();if(null!=e.incrementalPreOps&&e.incrementalPreOps.length)for(r=0;r<e.incrementalPreOps.length;++r)t.uint32(226).string(e.incrementalPreOps[r]);if(null!=e.incrementalPostOps&&e.incrementalPostOps.length)for(r=0;r<e.incrementalPostOps.length;++r)t.uint32(234).string(e.incrementalPostOps[r]);if(null!=e.uniqueKey&&e.uniqueKey.length)for(r=0;r<e.uniqueKey.length;++r)t.uint32(242).string(e.uniqueKey[r]);return null!=e.hermeticity&&Object.hasOwnProperty.call(e,"hermeticity")&&t.uint32(248).int32(e.hermeticity),null!=e.canonicalTarget&&Object.hasOwnProperty.call(e,"canonicalTarget")&&s.dataform.Target.encode(e.canonicalTarget,t.uint32(258).fork()).ldelim(),null!=e.materialized&&Object.hasOwnProperty.call(e,"materialized")&&t.uint32(280).bool(e.materialized),null!=e.enumType&&Object.hasOwnProperty.call(e,"enumType")&&t.uint32(288).int32(e.enumType),null!=e.onSchemaChange&&Object.hasOwnProperty.call(e,"onSchemaChange")&&t.uint32(296).int32(e.onSchemaChange),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Table;e.pos<r;){var i=e.uint32();switch(i>>>3){case 36:n.enumType=e.int32();break;case 4:n.target=s.dataform.Target.decode(e,e.uint32());break;case 32:n.canonicalTarget=s.dataform.Target.decode(e,e.uint32());break;case 27:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 31:n.hermeticity=e.int32();break;case 6:n.disabled=e.bool();break;case 3:n.type=e.string();break;case 5:n.query=e.string();break;case 9:n.protected=e.bool();break;case 35:n.materialized=e.bool();break;case 24:n.actionDescriptor=s.dataform.ActionDescriptor.decode(e,e.uint32());break;case 23:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 8:n.where=e.string();break;case 26:n.incrementalQuery=e.string();break;case 30:n.uniqueKey&&n.uniqueKey.length||(n.uniqueKey=[]),n.uniqueKey.push(e.string());break;case 37:n.onSchemaChange=e.int32();break;case 13:n.preOps&&n.preOps.length||(n.preOps=[]),n.preOps.push(e.string());break;case 14:n.postOps&&n.postOps.length||(n.postOps=[]),n.postOps.push(e.string());break;case 28:n.incrementalPreOps&&n.incrementalPreOps.length||(n.incrementalPreOps=[]),n.incrementalPreOps.push(e.string());break;case 29:n.incrementalPostOps&&n.incrementalPostOps.length||(n.incrementalPostOps=[]),n.incrementalPostOps.push(e.string());break;case 22:n.bigquery=s.dataform.BigQueryOptions.decode(e,e.uint32());break;case 18:n.fileName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.enumType&&e.hasOwnProperty("enumType"))switch(e.enumType){default:return"enumType: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r=s.dataform.Target.verify(e.canonicalTarget)))return"canonicalTarget."+r;if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t){var r;if(r=s.dataform.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}}if(null!=e.hermeticity&&e.hasOwnProperty("hermeticity"))switch(e.hermeticity){default:return"hermeticity: enum value expected";case 0:case 1:case 2:}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.type&&e.hasOwnProperty("type")&&!a.isString(e.type))return"type: string expected";if(null!=e.query&&e.hasOwnProperty("query")&&!a.isString(e.query))return"query: string expected";if(null!=e.protected&&e.hasOwnProperty("protected")&&"boolean"!=typeof e.protected)return"protected: boolean expected";if(null!=e.materialized&&e.hasOwnProperty("materialized")&&"boolean"!=typeof e.materialized)return"materialized: boolean expected";if(null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r=s.dataform.ActionDescriptor.verify(e.actionDescriptor)))return"actionDescriptor."+r;if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.where&&e.hasOwnProperty("where")&&!a.isString(e.where))return"where: string expected";if(null!=e.incrementalQuery&&e.hasOwnProperty("incrementalQuery")&&!a.isString(e.incrementalQuery))return"incrementalQuery: string expected";if(null!=e.uniqueKey&&e.hasOwnProperty("uniqueKey")){if(!Array.isArray(e.uniqueKey))return"uniqueKey: array expected";for(t=0;t<e.uniqueKey.length;++t)if(!a.isString(e.uniqueKey[t]))return"uniqueKey: string[] expected"}if(null!=e.onSchemaChange&&e.hasOwnProperty("onSchemaChange"))switch(e.onSchemaChange){default:return"onSchemaChange: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.preOps&&e.hasOwnProperty("preOps")){if(!Array.isArray(e.preOps))return"preOps: array expected";for(t=0;t<e.preOps.length;++t)if(!a.isString(e.preOps[t]))return"preOps: string[] expected"}if(null!=e.postOps&&e.hasOwnProperty("postOps")){if(!Array.isArray(e.postOps))return"postOps: array expected";for(t=0;t<e.postOps.length;++t)if(!a.isString(e.postOps[t]))return"postOps: string[] expected"}if(null!=e.incrementalPreOps&&e.hasOwnProperty("incrementalPreOps")){if(!Array.isArray(e.incrementalPreOps))return"incrementalPreOps: array expected";for(t=0;t<e.incrementalPreOps.length;++t)if(!a.isString(e.incrementalPreOps[t]))return"incrementalPreOps: string[] expected"}if(null!=e.incrementalPostOps&&e.hasOwnProperty("incrementalPostOps")){if(!Array.isArray(e.incrementalPostOps))return"incrementalPostOps: array expected";for(t=0;t<e.incrementalPostOps.length;++t)if(!a.isString(e.incrementalPostOps[t]))return"incrementalPostOps: string[] expected"}return null!=e.bigquery&&e.hasOwnProperty("bigquery")&&(r=s.dataform.BigQueryOptions.verify(e.bigquery))?"bigquery."+r:null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName)?"fileName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Table)return e;var t=new s.dataform.Table;switch(e.enumType){default:if("number"==typeof e.enumType){t.enumType=e.enumType;break}break;case"UNKNOWN_TYPE":case 0:t.enumType=0;break;case"TABLE":case 1:t.enumType=1;break;case"INCREMENTAL":case 2:t.enumType=2;break;case"VIEW":case 3:t.enumType=3}if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.Table.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.canonicalTarget){if("object"!=typeof e.canonicalTarget)throw TypeError(".dataform.Table.canonicalTarget: object expected");t.canonicalTarget=s.dataform.Target.fromObject(e.canonicalTarget)}if(e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.Table.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.Table.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.Target.fromObject(e.dependencyTargets[r])}}switch(e.hermeticity){default:if("number"==typeof e.hermeticity){t.hermeticity=e.hermeticity;break}break;case"UNKNOWN":case 0:t.hermeticity=0;break;case"HERMETIC":case 1:t.hermeticity=1;break;case"NON_HERMETIC":case 2:t.hermeticity=2}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.type&&(t.type=String(e.type)),null!=e.query&&(t.query=String(e.query)),null!=e.protected&&(t.protected=Boolean(e.protected)),null!=e.materialized&&(t.materialized=Boolean(e.materialized)),null!=e.actionDescriptor){if("object"!=typeof e.actionDescriptor)throw TypeError(".dataform.Table.actionDescriptor: object expected");t.actionDescriptor=s.dataform.ActionDescriptor.fromObject(e.actionDescriptor)}if(e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.Table.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.where&&(t.where=String(e.where)),null!=e.incrementalQuery&&(t.incrementalQuery=String(e.incrementalQuery)),e.uniqueKey){if(!Array.isArray(e.uniqueKey))throw TypeError(".dataform.Table.uniqueKey: array expected");for(t.uniqueKey=[],r=0;r<e.uniqueKey.length;++r)t.uniqueKey[r]=String(e.uniqueKey[r])}switch(e.onSchemaChange){default:if("number"==typeof e.onSchemaChange){t.onSchemaChange=e.onSchemaChange;break}break;case"IGNORE":case 0:t.onSchemaChange=0;break;case"FAIL":case 1:t.onSchemaChange=1;break;case"EXTEND":case 2:t.onSchemaChange=2;break;case"SYNCHRONIZE":case 3:t.onSchemaChange=3}if(e.preOps){if(!Array.isArray(e.preOps))throw TypeError(".dataform.Table.preOps: array expected");for(t.preOps=[],r=0;r<e.preOps.length;++r)t.preOps[r]=String(e.preOps[r])}if(e.postOps){if(!Array.isArray(e.postOps))throw TypeError(".dataform.Table.postOps: array expected");for(t.postOps=[],r=0;r<e.postOps.length;++r)t.postOps[r]=String(e.postOps[r])}if(e.incrementalPreOps){if(!Array.isArray(e.incrementalPreOps))throw TypeError(".dataform.Table.incrementalPreOps: array expected");for(t.incrementalPreOps=[],r=0;r<e.incrementalPreOps.length;++r)t.incrementalPreOps[r]=String(e.incrementalPreOps[r])}if(e.incrementalPostOps){if(!Array.isArray(e.incrementalPostOps))throw TypeError(".dataform.Table.incrementalPostOps: array expected");for(t.incrementalPostOps=[],r=0;r<e.incrementalPostOps.length;++r)t.incrementalPostOps[r]=String(e.incrementalPostOps[r])}if(null!=e.bigquery){if("object"!=typeof e.bigquery)throw TypeError(".dataform.Table.bigquery: object expected");t.bigquery=s.dataform.BigQueryOptions.fromObject(e.bigquery)}return null!=e.fileName&&(t.fileName=String(e.fileName)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.preOps=[],r.postOps=[],r.tags=[],r.dependencyTargets=[],r.incrementalPreOps=[],r.incrementalPostOps=[],r.uniqueKey=[]),t.defaults&&(r.type="",r.target=null,r.query="",r.disabled=!1,r.where="",r.protected=!1,r.fileName="",r.bigquery=null,r.actionDescriptor=null,r.incrementalQuery="",r.hermeticity=t.enums===String?"UNKNOWN":0,r.canonicalTarget=null,r.materialized=!1,r.enumType=t.enums===String?"UNKNOWN_TYPE":0,r.onSchemaChange=t.enums===String?"IGNORE":0),null!=e.type&&e.hasOwnProperty("type")&&(r.type=e.type),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),null!=e.query&&e.hasOwnProperty("query")&&(r.query=e.query),null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.where&&e.hasOwnProperty("where")&&(r.where=e.where),null!=e.protected&&e.hasOwnProperty("protected")&&(r.protected=e.protected),e.preOps&&e.preOps.length){r.preOps=[];for(var n=0;n<e.preOps.length;++n)r.preOps[n]=e.preOps[n]}if(e.postOps&&e.postOps.length)for(r.postOps=[],n=0;n<e.postOps.length;++n)r.postOps[n]=e.postOps[n];if(null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.bigquery&&e.hasOwnProperty("bigquery")&&(r.bigquery=s.dataform.BigQueryOptions.toObject(e.bigquery,t)),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];if(null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r.actionDescriptor=s.dataform.ActionDescriptor.toObject(e.actionDescriptor,t)),null!=e.incrementalQuery&&e.hasOwnProperty("incrementalQuery")&&(r.incrementalQuery=e.incrementalQuery),e.dependencyTargets&&e.dependencyTargets.length)for(r.dependencyTargets=[],n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.Target.toObject(e.dependencyTargets[n],t);if(e.incrementalPreOps&&e.incrementalPreOps.length)for(r.incrementalPreOps=[],n=0;n<e.incrementalPreOps.length;++n)r.incrementalPreOps[n]=e.incrementalPreOps[n];if(e.incrementalPostOps&&e.incrementalPostOps.length)for(r.incrementalPostOps=[],n=0;n<e.incrementalPostOps.length;++n)r.incrementalPostOps[n]=e.incrementalPostOps[n];if(e.uniqueKey&&e.uniqueKey.length)for(r.uniqueKey=[],n=0;n<e.uniqueKey.length;++n)r.uniqueKey[n]=e.uniqueKey[n];return null!=e.hermeticity&&e.hasOwnProperty("hermeticity")&&(r.hermeticity=t.enums===String?void 0===s.dataform.ActionHermeticity[e.hermeticity]?e.hermeticity:s.dataform.ActionHermeticity[e.hermeticity]:e.hermeticity),null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r.canonicalTarget=s.dataform.Target.toObject(e.canonicalTarget,t)),null!=e.materialized&&e.hasOwnProperty("materialized")&&(r.materialized=e.materialized),null!=e.enumType&&e.hasOwnProperty("enumType")&&(r.enumType=t.enums===String?void 0===s.dataform.TableType[e.enumType]?e.enumType:s.dataform.TableType[e.enumType]:e.enumType),null!=e.onSchemaChange&&e.hasOwnProperty("onSchemaChange")&&(r.onSchemaChange=t.enums===String?void 0===s.dataform.OnSchemaChange[e.onSchemaChange]?e.onSchemaChange:s.dataform.OnSchemaChange[e.onSchemaChange]:e.onSchemaChange),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Table"},t}(),n.Operation=function(){function t(e){if(this.dependencyTargets=[],this.queries=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.canonicalTarget=null,t.prototype.dependencyTargets=a.emptyArray,t.prototype.hermeticity=0,t.prototype.disabled=!1,t.prototype.queries=a.emptyArray,t.prototype.hasOutput=!1,t.prototype.tags=a.emptyArray,t.prototype.actionDescriptor=null,t.prototype.fileName="",t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(26).fork()).ldelim(),null!=e.queries&&e.queries.length)for(var r=0;r<e.queries.length;++r)t.uint32(50).string(e.queries[r]);if(null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(58).string(e.fileName),null!=e.hasOutput&&Object.hasOwnProperty.call(e,"hasOutput")&&t.uint32(64).bool(e.hasOutput),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(74).string(e.tags[r]);if(null!=e.actionDescriptor&&Object.hasOwnProperty.call(e,"actionDescriptor")&&s.dataform.ActionDescriptor.encode(e.actionDescriptor,t.uint32(82).fork()).ldelim(),null!=e.dependencyTargets&&e.dependencyTargets.length)for(r=0;r<e.dependencyTargets.length;++r)s.dataform.Target.encode(e.dependencyTargets[r],t.uint32(90).fork()).ldelim();return null!=e.hermeticity&&Object.hasOwnProperty.call(e,"hermeticity")&&t.uint32(96).int32(e.hermeticity),null!=e.canonicalTarget&&Object.hasOwnProperty.call(e,"canonicalTarget")&&s.dataform.Target.encode(e.canonicalTarget,t.uint32(106).fork()).ldelim(),null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(112).bool(e.disabled),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Operation;e.pos<r;){var i=e.uint32();switch(i>>>3){case 3:n.target=s.dataform.Target.decode(e,e.uint32());break;case 13:n.canonicalTarget=s.dataform.Target.decode(e,e.uint32());break;case 11:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 12:n.hermeticity=e.int32();break;case 14:n.disabled=e.bool();break;case 6:n.queries&&n.queries.length||(n.queries=[]),n.queries.push(e.string());break;case 8:n.hasOutput=e.bool();break;case 9:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 10:n.actionDescriptor=s.dataform.ActionDescriptor.decode(e,e.uint32());break;case 7:n.fileName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r=s.dataform.Target.verify(e.canonicalTarget)))return"canonicalTarget."+r;if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t){var r;if(r=s.dataform.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}}if(null!=e.hermeticity&&e.hasOwnProperty("hermeticity"))switch(e.hermeticity){default:return"hermeticity: enum value expected";case 0:case 1:case 2:}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.queries&&e.hasOwnProperty("queries")){if(!Array.isArray(e.queries))return"queries: array expected";for(t=0;t<e.queries.length;++t)if(!a.isString(e.queries[t]))return"queries: string[] expected"}if(null!=e.hasOutput&&e.hasOwnProperty("hasOutput")&&"boolean"!=typeof e.hasOutput)return"hasOutput: boolean expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r=s.dataform.ActionDescriptor.verify(e.actionDescriptor))?"actionDescriptor."+r:null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName)?"fileName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Operation)return e;var t=new s.dataform.Operation;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.Operation.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.canonicalTarget){if("object"!=typeof e.canonicalTarget)throw TypeError(".dataform.Operation.canonicalTarget: object expected");t.canonicalTarget=s.dataform.Target.fromObject(e.canonicalTarget)}if(e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.Operation.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.Operation.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.Target.fromObject(e.dependencyTargets[r])}}switch(e.hermeticity){default:if("number"==typeof e.hermeticity){t.hermeticity=e.hermeticity;break}break;case"UNKNOWN":case 0:t.hermeticity=0;break;case"HERMETIC":case 1:t.hermeticity=1;break;case"NON_HERMETIC":case 2:t.hermeticity=2}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),e.queries){if(!Array.isArray(e.queries))throw TypeError(".dataform.Operation.queries: array expected");for(t.queries=[],r=0;r<e.queries.length;++r)t.queries[r]=String(e.queries[r])}if(null!=e.hasOutput&&(t.hasOutput=Boolean(e.hasOutput)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.Operation.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.actionDescriptor){if("object"!=typeof e.actionDescriptor)throw TypeError(".dataform.Operation.actionDescriptor: object expected");t.actionDescriptor=s.dataform.ActionDescriptor.fromObject(e.actionDescriptor)}return null!=e.fileName&&(t.fileName=String(e.fileName)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.queries=[],r.tags=[],r.dependencyTargets=[]),t.defaults&&(r.target=null,r.fileName="",r.hasOutput=!1,r.actionDescriptor=null,r.hermeticity=t.enums===String?"UNKNOWN":0,r.canonicalTarget=null,r.disabled=!1),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),e.queries&&e.queries.length){r.queries=[];for(var n=0;n<e.queries.length;++n)r.queries[n]=e.queries[n]}if(null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.hasOutput&&e.hasOwnProperty("hasOutput")&&(r.hasOutput=e.hasOutput),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];if(null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r.actionDescriptor=s.dataform.ActionDescriptor.toObject(e.actionDescriptor,t)),e.dependencyTargets&&e.dependencyTargets.length)for(r.dependencyTargets=[],n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.Target.toObject(e.dependencyTargets[n],t);return null!=e.hermeticity&&e.hasOwnProperty("hermeticity")&&(r.hermeticity=t.enums===String?void 0===s.dataform.ActionHermeticity[e.hermeticity]?e.hermeticity:s.dataform.ActionHermeticity[e.hermeticity]:e.hermeticity),null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r.canonicalTarget=s.dataform.Target.toObject(e.canonicalTarget,t)),null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Operation"},t}(),n.Assertion=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.canonicalTarget=null,t.prototype.dependencyTargets=a.emptyArray,t.prototype.hermeticity=0,t.prototype.disabled=!1,t.prototype.query="",t.prototype.tags=a.emptyArray,t.prototype.actionDescriptor=null,t.prototype.parentAction=null,t.prototype.fileName="",t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.query&&Object.hasOwnProperty.call(e,"query")&&t.uint32(26).string(e.query),null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(58).string(e.fileName),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(66).fork()).ldelim(),null!=e.tags&&e.tags.length)for(var r=0;r<e.tags.length;++r)t.uint32(74).string(e.tags[r]);if(null!=e.actionDescriptor&&Object.hasOwnProperty.call(e,"actionDescriptor")&&s.dataform.ActionDescriptor.encode(e.actionDescriptor,t.uint32(82).fork()).ldelim(),null!=e.dependencyTargets&&e.dependencyTargets.length)for(r=0;r<e.dependencyTargets.length;++r)s.dataform.Target.encode(e.dependencyTargets[r],t.uint32(90).fork()).ldelim();return null!=e.hermeticity&&Object.hasOwnProperty.call(e,"hermeticity")&&t.uint32(96).int32(e.hermeticity),null!=e.canonicalTarget&&Object.hasOwnProperty.call(e,"canonicalTarget")&&s.dataform.Target.encode(e.canonicalTarget,t.uint32(106).fork()).ldelim(),null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(112).bool(e.disabled),null!=e.parentAction&&Object.hasOwnProperty.call(e,"parentAction")&&s.dataform.Target.encode(e.parentAction,t.uint32(122).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Assertion;e.pos<r;){var i=e.uint32();switch(i>>>3){case 8:n.target=s.dataform.Target.decode(e,e.uint32());break;case 13:n.canonicalTarget=s.dataform.Target.decode(e,e.uint32());break;case 11:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 12:n.hermeticity=e.int32();break;case 14:n.disabled=e.bool();break;case 3:n.query=e.string();break;case 9:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 10:n.actionDescriptor=s.dataform.ActionDescriptor.decode(e,e.uint32());break;case 15:n.parentAction=s.dataform.Target.decode(e,e.uint32());break;case 7:n.fileName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r=s.dataform.Target.verify(e.canonicalTarget)))return"canonicalTarget."+r;if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t){var r;if(r=s.dataform.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}}if(null!=e.hermeticity&&e.hasOwnProperty("hermeticity"))switch(e.hermeticity){default:return"hermeticity: enum value expected";case 0:case 1:case 2:}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.query&&e.hasOwnProperty("query")&&!a.isString(e.query))return"query: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r=s.dataform.ActionDescriptor.verify(e.actionDescriptor))?"actionDescriptor."+r:null!=e.parentAction&&e.hasOwnProperty("parentAction")&&(r=s.dataform.Target.verify(e.parentAction))?"parentAction."+r:null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName)?"fileName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Assertion)return e;var t=new s.dataform.Assertion;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.Assertion.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.canonicalTarget){if("object"!=typeof e.canonicalTarget)throw TypeError(".dataform.Assertion.canonicalTarget: object expected");t.canonicalTarget=s.dataform.Target.fromObject(e.canonicalTarget)}if(e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.Assertion.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.Assertion.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.Target.fromObject(e.dependencyTargets[r])}}switch(e.hermeticity){default:if("number"==typeof e.hermeticity){t.hermeticity=e.hermeticity;break}break;case"UNKNOWN":case 0:t.hermeticity=0;break;case"HERMETIC":case 1:t.hermeticity=1;break;case"NON_HERMETIC":case 2:t.hermeticity=2}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.query&&(t.query=String(e.query)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.Assertion.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.actionDescriptor){if("object"!=typeof e.actionDescriptor)throw TypeError(".dataform.Assertion.actionDescriptor: object expected");t.actionDescriptor=s.dataform.ActionDescriptor.fromObject(e.actionDescriptor)}if(null!=e.parentAction){if("object"!=typeof e.parentAction)throw TypeError(".dataform.Assertion.parentAction: object expected");t.parentAction=s.dataform.Target.fromObject(e.parentAction)}return null!=e.fileName&&(t.fileName=String(e.fileName)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.tags=[],r.dependencyTargets=[]),t.defaults&&(r.query="",r.fileName="",r.target=null,r.actionDescriptor=null,r.hermeticity=t.enums===String?"UNKNOWN":0,r.canonicalTarget=null,r.disabled=!1,r.parentAction=null),null!=e.query&&e.hasOwnProperty("query")&&(r.query=e.query),null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),e.tags&&e.tags.length){r.tags=[];for(var n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n]}if(null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r.actionDescriptor=s.dataform.ActionDescriptor.toObject(e.actionDescriptor,t)),e.dependencyTargets&&e.dependencyTargets.length)for(r.dependencyTargets=[],n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.Target.toObject(e.dependencyTargets[n],t);return null!=e.hermeticity&&e.hasOwnProperty("hermeticity")&&(r.hermeticity=t.enums===String?void 0===s.dataform.ActionHermeticity[e.hermeticity]?e.hermeticity:s.dataform.ActionHermeticity[e.hermeticity]:e.hermeticity),null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r.canonicalTarget=s.dataform.Target.toObject(e.canonicalTarget,t)),null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.parentAction&&e.hasOwnProperty("parentAction")&&(r.parentAction=s.dataform.Target.toObject(e.parentAction,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Assertion"},t}(),n.ActionHermeticity=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="HERMETIC"]=1,t[e[2]="NON_HERMETIC"]=2,t}(),n.Declaration=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.canonicalTarget=null,t.prototype.actionDescriptor=null,t.prototype.fileName="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(18).fork()).ldelim(),null!=e.actionDescriptor&&Object.hasOwnProperty.call(e,"actionDescriptor")&&s.dataform.ActionDescriptor.encode(e.actionDescriptor,t.uint32(26).fork()).ldelim(),null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(34).string(e.fileName),null!=e.canonicalTarget&&Object.hasOwnProperty.call(e,"canonicalTarget")&&s.dataform.Target.encode(e.canonicalTarget,t.uint32(42).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Declaration;e.pos<r;){var i=e.uint32();switch(i>>>3){case 2:n.target=s.dataform.Target.decode(e,e.uint32());break;case 5:n.canonicalTarget=s.dataform.Target.decode(e,e.uint32());break;case 3:n.actionDescriptor=s.dataform.ActionDescriptor.decode(e,e.uint32());break;case 4:n.fileName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.target&&e.hasOwnProperty("target")&&(t=s.dataform.Target.verify(e.target))?"target."+t:null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(t=s.dataform.Target.verify(e.canonicalTarget))?"canonicalTarget."+t:null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(t=s.dataform.ActionDescriptor.verify(e.actionDescriptor))?"actionDescriptor."+t:null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName)?"fileName: string expected":null;var t},t.fromObject=function(e){if(e instanceof s.dataform.Declaration)return e;var t=new s.dataform.Declaration;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.Declaration.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.canonicalTarget){if("object"!=typeof e.canonicalTarget)throw TypeError(".dataform.Declaration.canonicalTarget: object expected");t.canonicalTarget=s.dataform.Target.fromObject(e.canonicalTarget)}if(null!=e.actionDescriptor){if("object"!=typeof e.actionDescriptor)throw TypeError(".dataform.Declaration.actionDescriptor: object expected");t.actionDescriptor=s.dataform.ActionDescriptor.fromObject(e.actionDescriptor)}return null!=e.fileName&&(t.fileName=String(e.fileName)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.target=null,r.actionDescriptor=null,r.fileName="",r.canonicalTarget=null),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r.actionDescriptor=s.dataform.ActionDescriptor.toObject(e.actionDescriptor,t)),null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r.canonicalTarget=s.dataform.Target.toObject(e.canonicalTarget,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Declaration"},t}(),n.Test=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.testQuery="",t.prototype.expectedOutputQuery="",t.prototype.fileName="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.testQuery&&Object.hasOwnProperty.call(e,"testQuery")&&t.uint32(18).string(e.testQuery),null!=e.expectedOutputQuery&&Object.hasOwnProperty.call(e,"expectedOutputQuery")&&t.uint32(26).string(e.expectedOutputQuery),null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(34).string(e.fileName),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Test;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.testQuery=e.string();break;case 3:n.expectedOutputQuery=e.string();break;case 4:n.fileName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name)?"name: string expected":null!=e.testQuery&&e.hasOwnProperty("testQuery")&&!a.isString(e.testQuery)?"testQuery: string expected":null!=e.expectedOutputQuery&&e.hasOwnProperty("expectedOutputQuery")&&!a.isString(e.expectedOutputQuery)?"expectedOutputQuery: string expected":null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName)?"fileName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Test)return e;var t=new s.dataform.Test;return null!=e.name&&(t.name=String(e.name)),null!=e.testQuery&&(t.testQuery=String(e.testQuery)),null!=e.expectedOutputQuery&&(t.expectedOutputQuery=String(e.expectedOutputQuery)),null!=e.fileName&&(t.fileName=String(e.fileName)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.name="",r.testQuery="",r.expectedOutputQuery="",r.fileName=""),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.testQuery&&e.hasOwnProperty("testQuery")&&(r.testQuery=e.testQuery),null!=e.expectedOutputQuery&&e.hasOwnProperty("expectedOutputQuery")&&(r.expectedOutputQuery=e.expectedOutputQuery),null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Test"},t}(),n.Notebook=function(){function t(e){if(this.tags=[],this.dependencyTargets=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.canonicalTarget=null,t.prototype.tags=a.emptyArray,t.prototype.dependencyTargets=a.emptyArray,t.prototype.fileName="",t.prototype.disabled=!1,t.prototype.notebookContents="",t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(10).fork()).ldelim(),null!=e.canonicalTarget&&Object.hasOwnProperty.call(e,"canonicalTarget")&&s.dataform.Target.encode(e.canonicalTarget,t.uint32(18).fork()).ldelim(),null!=e.tags&&e.tags.length)for(var r=0;r<e.tags.length;++r)t.uint32(26).string(e.tags[r]);if(null!=e.dependencyTargets&&e.dependencyTargets.length)for(r=0;r<e.dependencyTargets.length;++r)s.dataform.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();return null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(42).string(e.fileName),null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(48).bool(e.disabled),null!=e.notebookContents&&Object.hasOwnProperty.call(e,"notebookContents")&&t.uint32(58).string(e.notebookContents),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Notebook;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.target=s.dataform.Target.decode(e,e.uint32());break;case 2:n.canonicalTarget=s.dataform.Target.decode(e,e.uint32());break;case 3:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 4:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 5:n.fileName=e.string();break;case 6:n.disabled=e.bool();break;case 7:n.notebookContents=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r=s.dataform.Target.verify(e.canonicalTarget)))return"canonicalTarget."+r;if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(var t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(t=0;t<e.dependencyTargets.length;++t){var r;if(r=s.dataform.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}}return null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName)?"fileName: string expected":null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled?"disabled: boolean expected":null!=e.notebookContents&&e.hasOwnProperty("notebookContents")&&!a.isString(e.notebookContents)?"notebookContents: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Notebook)return e;var t=new s.dataform.Notebook;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.Notebook.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.canonicalTarget){if("object"!=typeof e.canonicalTarget)throw TypeError(".dataform.Notebook.canonicalTarget: object expected");t.canonicalTarget=s.dataform.Target.fromObject(e.canonicalTarget)}if(e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.Notebook.tags: array expected");t.tags=[];for(var r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.Notebook.dependencyTargets: array expected");for(t.dependencyTargets=[],r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.Notebook.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.Target.fromObject(e.dependencyTargets[r])}}return null!=e.fileName&&(t.fileName=String(e.fileName)),null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.notebookContents&&(t.notebookContents=String(e.notebookContents)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.tags=[],r.dependencyTargets=[]),t.defaults&&(r.target=null,r.canonicalTarget=null,r.fileName="",r.disabled=!1,r.notebookContents=""),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r.canonicalTarget=s.dataform.Target.toObject(e.canonicalTarget,t)),e.tags&&e.tags.length){r.tags=[];for(var n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n]}if(e.dependencyTargets&&e.dependencyTargets.length)for(r.dependencyTargets=[],n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.Target.toObject(e.dependencyTargets[n],t);return null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.notebookContents&&e.hasOwnProperty("notebookContents")&&(r.notebookContents=e.notebookContents),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Notebook"},t}(),n.NotebookRuntimeOptions=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.outputBucket=null,t.prototype.runtimeTemplateName="",Object.defineProperty(t.prototype,"outputSink",{get:a.oneOfGetter(r=["outputBucket"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.outputBucket&&Object.hasOwnProperty.call(e,"outputBucket")&&t.uint32(10).string(e.outputBucket),null!=e.runtimeTemplateName&&Object.hasOwnProperty.call(e,"runtimeTemplateName")&&t.uint32(18).string(e.runtimeTemplateName),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.NotebookRuntimeOptions;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.outputBucket=e.string();break;case 2:n.runtimeTemplateName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.outputBucket&&e.hasOwnProperty("outputBucket")&&!a.isString(e.outputBucket)?"outputBucket: string expected":null!=e.runtimeTemplateName&&e.hasOwnProperty("runtimeTemplateName")&&!a.isString(e.runtimeTemplateName)?"runtimeTemplateName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.NotebookRuntimeOptions)return e;var t=new s.dataform.NotebookRuntimeOptions;return null!=e.outputBucket&&(t.outputBucket=String(e.outputBucket)),null!=e.runtimeTemplateName&&(t.runtimeTemplateName=String(e.runtimeTemplateName)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.runtimeTemplateName=""),null!=e.outputBucket&&e.hasOwnProperty("outputBucket")&&(r.outputBucket=e.outputBucket,t.oneofs&&(r.outputSink="outputBucket")),null!=e.runtimeTemplateName&&e.hasOwnProperty("runtimeTemplateName")&&(r.runtimeTemplateName=e.runtimeTemplateName),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.NotebookRuntimeOptions"},t}(),n.DataPreparation=function(){function t(e){if(this.targets=[],this.canonicalTargets=[],this.tags=[],this.dependencyTargets=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.target=null,t.prototype.canonicalTarget=null,t.prototype.targets=a.emptyArray,t.prototype.canonicalTargets=a.emptyArray,t.prototype.tags=a.emptyArray,t.prototype.dependencyTargets=a.emptyArray,t.prototype.fileName="",t.prototype.disabled=!1,t.prototype.dataPreparationYaml=null,t.prototype.query=null,t.prototype.errorTable=null,t.prototype.errorTableRetentionDays=0,t.prototype.load=null,Object.defineProperty(t.prototype,"definition",{get:a.oneOfGetter(r=["dataPreparationYaml","query"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.targets&&e.targets.length)for(var r=0;r<e.targets.length;++r)s.dataform.Target.encode(e.targets[r],t.uint32(10).fork()).ldelim();if(null!=e.canonicalTargets&&e.canonicalTargets.length)for(r=0;r<e.canonicalTargets.length;++r)s.dataform.Target.encode(e.canonicalTargets[r],t.uint32(18).fork()).ldelim();if(null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(26).string(e.tags[r]);if(null!=e.dependencyTargets&&e.dependencyTargets.length)for(r=0;r<e.dependencyTargets.length;++r)s.dataform.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();return null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(42).string(e.fileName),null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(48).bool(e.disabled),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(66).fork()).ldelim(),null!=e.canonicalTarget&&Object.hasOwnProperty.call(e,"canonicalTarget")&&s.dataform.Target.encode(e.canonicalTarget,t.uint32(74).fork()).ldelim(),null!=e.dataPreparationYaml&&Object.hasOwnProperty.call(e,"dataPreparationYaml")&&t.uint32(90).string(e.dataPreparationYaml),null!=e.errorTable&&Object.hasOwnProperty.call(e,"errorTable")&&s.dataform.Target.encode(e.errorTable,t.uint32(98).fork()).ldelim(),null!=e.errorTableRetentionDays&&Object.hasOwnProperty.call(e,"errorTableRetentionDays")&&t.uint32(104).int32(e.errorTableRetentionDays),null!=e.query&&Object.hasOwnProperty.call(e,"query")&&t.uint32(122).string(e.query),null!=e.load&&Object.hasOwnProperty.call(e,"load")&&s.dataform.LoadConfiguration.encode(e.load,t.uint32(130).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.DataPreparation;e.pos<r;){var i=e.uint32();switch(i>>>3){case 8:n.target=s.dataform.Target.decode(e,e.uint32());break;case 9:n.canonicalTarget=s.dataform.Target.decode(e,e.uint32());break;case 1:n.targets&&n.targets.length||(n.targets=[]),n.targets.push(s.dataform.Target.decode(e,e.uint32()));break;case 2:n.canonicalTargets&&n.canonicalTargets.length||(n.canonicalTargets=[]),n.canonicalTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 3:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 4:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 5:n.fileName=e.string();break;case 6:n.disabled=e.bool();break;case 11:n.dataPreparationYaml=e.string();break;case 15:n.query=e.string();break;case 12:n.errorTable=s.dataform.Target.decode(e,e.uint32());break;case 13:n.errorTableRetentionDays=e.int32();break;case 16:n.load=s.dataform.LoadConfiguration.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.target&&e.hasOwnProperty("target")&&(n=s.dataform.Target.verify(e.target)))return"target."+n;if(null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(n=s.dataform.Target.verify(e.canonicalTarget)))return"canonicalTarget."+n;if(null!=e.targets&&e.hasOwnProperty("targets")){if(!Array.isArray(e.targets))return"targets: array expected";for(var r=0;r<e.targets.length;++r)if(n=s.dataform.Target.verify(e.targets[r]))return"targets."+n}if(null!=e.canonicalTargets&&e.hasOwnProperty("canonicalTargets")){if(!Array.isArray(e.canonicalTargets))return"canonicalTargets: array expected";for(r=0;r<e.canonicalTargets.length;++r)if(n=s.dataform.Target.verify(e.canonicalTargets[r]))return"canonicalTargets."+n}if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(r=0;r<e.tags.length;++r)if(!a.isString(e.tags[r]))return"tags: string[] expected"}if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(r=0;r<e.dependencyTargets.length;++r){var n;if(n=s.dataform.Target.verify(e.dependencyTargets[r]))return"dependencyTargets."+n}}if(null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName))return"fileName: string expected";if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.dataPreparationYaml&&e.hasOwnProperty("dataPreparationYaml")&&(t.definition=1,!a.isString(e.dataPreparationYaml)))return"dataPreparationYaml: string expected";if(null!=e.query&&e.hasOwnProperty("query")){if(1===t.definition)return"definition: multiple values";if(t.definition=1,!a.isString(e.query))return"query: string expected"}return null!=e.errorTable&&e.hasOwnProperty("errorTable")&&(n=s.dataform.Target.verify(e.errorTable))?"errorTable."+n:null!=e.errorTableRetentionDays&&e.hasOwnProperty("errorTableRetentionDays")&&!a.isInteger(e.errorTableRetentionDays)?"errorTableRetentionDays: integer expected":null!=e.load&&e.hasOwnProperty("load")&&(n=s.dataform.LoadConfiguration.verify(e.load))?"load."+n:null},t.fromObject=function(e){if(e instanceof s.dataform.DataPreparation)return e;var t=new s.dataform.DataPreparation;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.DataPreparation.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.canonicalTarget){if("object"!=typeof e.canonicalTarget)throw TypeError(".dataform.DataPreparation.canonicalTarget: object expected");t.canonicalTarget=s.dataform.Target.fromObject(e.canonicalTarget)}if(e.targets){if(!Array.isArray(e.targets))throw TypeError(".dataform.DataPreparation.targets: array expected");t.targets=[];for(var r=0;r<e.targets.length;++r){if("object"!=typeof e.targets[r])throw TypeError(".dataform.DataPreparation.targets: object expected");t.targets[r]=s.dataform.Target.fromObject(e.targets[r])}}if(e.canonicalTargets){if(!Array.isArray(e.canonicalTargets))throw TypeError(".dataform.DataPreparation.canonicalTargets: array expected");for(t.canonicalTargets=[],r=0;r<e.canonicalTargets.length;++r){if("object"!=typeof e.canonicalTargets[r])throw TypeError(".dataform.DataPreparation.canonicalTargets: object expected");t.canonicalTargets[r]=s.dataform.Target.fromObject(e.canonicalTargets[r])}}if(e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.DataPreparation.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.DataPreparation.dependencyTargets: array expected");for(t.dependencyTargets=[],r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.DataPreparation.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.fileName&&(t.fileName=String(e.fileName)),null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.dataPreparationYaml&&(t.dataPreparationYaml=String(e.dataPreparationYaml)),null!=e.query&&(t.query=String(e.query)),null!=e.errorTable){if("object"!=typeof e.errorTable)throw TypeError(".dataform.DataPreparation.errorTable: object expected");t.errorTable=s.dataform.Target.fromObject(e.errorTable)}if(null!=e.errorTableRetentionDays&&(t.errorTableRetentionDays=0|e.errorTableRetentionDays),null!=e.load){if("object"!=typeof e.load)throw TypeError(".dataform.DataPreparation.load: object expected");t.load=s.dataform.LoadConfiguration.fromObject(e.load)}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.targets=[],r.canonicalTargets=[],r.tags=[],r.dependencyTargets=[]),t.defaults&&(r.fileName="",r.disabled=!1,r.target=null,r.canonicalTarget=null,r.errorTable=null,r.errorTableRetentionDays=0,r.load=null),e.targets&&e.targets.length){r.targets=[];for(var n=0;n<e.targets.length;++n)r.targets[n]=s.dataform.Target.toObject(e.targets[n],t)}if(e.canonicalTargets&&e.canonicalTargets.length)for(r.canonicalTargets=[],n=0;n<e.canonicalTargets.length;++n)r.canonicalTargets[n]=s.dataform.Target.toObject(e.canonicalTargets[n],t);if(e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];if(e.dependencyTargets&&e.dependencyTargets.length)for(r.dependencyTargets=[],n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.Target.toObject(e.dependencyTargets[n],t);return null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r.canonicalTarget=s.dataform.Target.toObject(e.canonicalTarget,t)),null!=e.dataPreparationYaml&&e.hasOwnProperty("dataPreparationYaml")&&(r.dataPreparationYaml=e.dataPreparationYaml,t.oneofs&&(r.definition="dataPreparationYaml")),null!=e.errorTable&&e.hasOwnProperty("errorTable")&&(r.errorTable=s.dataform.Target.toObject(e.errorTable,t)),null!=e.errorTableRetentionDays&&e.hasOwnProperty("errorTableRetentionDays")&&(r.errorTableRetentionDays=e.errorTableRetentionDays),null!=e.query&&e.hasOwnProperty("query")&&(r.query=e.query,t.oneofs&&(r.definition="query")),null!=e.load&&e.hasOwnProperty("load")&&(r.load=s.dataform.LoadConfiguration.toObject(e.load,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.DataPreparation"},t}(),n.LoadConfiguration=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.replace=null,t.prototype.append=null,t.prototype.maximum=null,t.prototype.unique=null,t.prototype.automatic=null,Object.defineProperty(t.prototype,"mode",{get:a.oneOfGetter(r=["replace","append","maximum","unique","automatic"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.replace&&Object.hasOwnProperty.call(e,"replace")&&s.dataform.SimpleLoadMode.encode(e.replace,t.uint32(10).fork()).ldelim(),null!=e.append&&Object.hasOwnProperty.call(e,"append")&&s.dataform.SimpleLoadMode.encode(e.append,t.uint32(18).fork()).ldelim(),null!=e.maximum&&Object.hasOwnProperty.call(e,"maximum")&&s.dataform.IncrementalLoadMode.encode(e.maximum,t.uint32(26).fork()).ldelim(),null!=e.unique&&Object.hasOwnProperty.call(e,"unique")&&s.dataform.IncrementalLoadMode.encode(e.unique,t.uint32(34).fork()).ldelim(),null!=e.automatic&&Object.hasOwnProperty.call(e,"automatic")&&s.dataform.IncrementalLoadMode.encode(e.automatic,t.uint32(42).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.LoadConfiguration;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.replace=s.dataform.SimpleLoadMode.decode(e,e.uint32());break;case 2:n.append=s.dataform.SimpleLoadMode.decode(e,e.uint32());break;case 3:n.maximum=s.dataform.IncrementalLoadMode.decode(e,e.uint32());break;case 4:n.unique=s.dataform.IncrementalLoadMode.decode(e,e.uint32());break;case 5:n.automatic=s.dataform.IncrementalLoadMode.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.replace&&e.hasOwnProperty("replace")&&(t.mode=1,r=s.dataform.SimpleLoadMode.verify(e.replace)))return"replace."+r;if(null!=e.append&&e.hasOwnProperty("append")){if(1===t.mode)return"mode: multiple values";if(t.mode=1,r=s.dataform.SimpleLoadMode.verify(e.append))return"append."+r}if(null!=e.maximum&&e.hasOwnProperty("maximum")){if(1===t.mode)return"mode: multiple values";if(t.mode=1,r=s.dataform.IncrementalLoadMode.verify(e.maximum))return"maximum."+r}if(null!=e.unique&&e.hasOwnProperty("unique")){if(1===t.mode)return"mode: multiple values";if(t.mode=1,r=s.dataform.IncrementalLoadMode.verify(e.unique))return"unique."+r}if(null!=e.automatic&&e.hasOwnProperty("automatic")){if(1===t.mode)return"mode: multiple values";var r;if(t.mode=1,r=s.dataform.IncrementalLoadMode.verify(e.automatic))return"automatic."+r}return null},t.fromObject=function(e){if(e instanceof s.dataform.LoadConfiguration)return e;var t=new s.dataform.LoadConfiguration;if(null!=e.replace){if("object"!=typeof e.replace)throw TypeError(".dataform.LoadConfiguration.replace: object expected");t.replace=s.dataform.SimpleLoadMode.fromObject(e.replace)}if(null!=e.append){if("object"!=typeof e.append)throw TypeError(".dataform.LoadConfiguration.append: object expected");t.append=s.dataform.SimpleLoadMode.fromObject(e.append)}if(null!=e.maximum){if("object"!=typeof e.maximum)throw TypeError(".dataform.LoadConfiguration.maximum: object expected");t.maximum=s.dataform.IncrementalLoadMode.fromObject(e.maximum)}if(null!=e.unique){if("object"!=typeof e.unique)throw TypeError(".dataform.LoadConfiguration.unique: object expected");t.unique=s.dataform.IncrementalLoadMode.fromObject(e.unique)}if(null!=e.automatic){if("object"!=typeof e.automatic)throw TypeError(".dataform.LoadConfiguration.automatic: object expected");t.automatic=s.dataform.IncrementalLoadMode.fromObject(e.automatic)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.replace&&e.hasOwnProperty("replace")&&(r.replace=s.dataform.SimpleLoadMode.toObject(e.replace,t),t.oneofs&&(r.mode="replace")),null!=e.append&&e.hasOwnProperty("append")&&(r.append=s.dataform.SimpleLoadMode.toObject(e.append,t),t.oneofs&&(r.mode="append")),null!=e.maximum&&e.hasOwnProperty("maximum")&&(r.maximum=s.dataform.IncrementalLoadMode.toObject(e.maximum,t),t.oneofs&&(r.mode="maximum")),null!=e.unique&&e.hasOwnProperty("unique")&&(r.unique=s.dataform.IncrementalLoadMode.toObject(e.unique,t),t.oneofs&&(r.mode="unique")),null!=e.automatic&&e.hasOwnProperty("automatic")&&(r.automatic=s.dataform.IncrementalLoadMode.toObject(e.automatic,t),t.oneofs&&(r.mode="automatic")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.LoadConfiguration"},t}(),n.SimpleLoadMode=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.SimpleLoadMode;e.pos<r;){var i=e.uint32();e.skipType(7&i)}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null},t.fromObject=function(e){return e instanceof s.dataform.SimpleLoadMode?e:new s.dataform.SimpleLoadMode},t.toObject=function(){return{}},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.SimpleLoadMode"},t}(),n.IncrementalLoadMode=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.columnName="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.columnName&&Object.hasOwnProperty.call(e,"columnName")&&t.uint32(10).string(e.columnName),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.IncrementalLoadMode;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.columnName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.columnName&&e.hasOwnProperty("columnName")&&!a.isString(e.columnName)?"columnName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.IncrementalLoadMode)return e;var t=new s.dataform.IncrementalLoadMode;return null!=e.columnName&&(t.columnName=String(e.columnName)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.columnName=""),null!=e.columnName&&e.hasOwnProperty("columnName")&&(r.columnName=e.columnName),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.IncrementalLoadMode"},t}(),n.CompiledGraph=function(){function t(e){if(this.tables=[],this.operations=[],this.assertions=[],this.declarations=[],this.tests=[],this.notebooks=[],this.dataPreparations=[],this.targets=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.projectConfig=null,t.prototype.tables=a.emptyArray,t.prototype.operations=a.emptyArray,t.prototype.assertions=a.emptyArray,t.prototype.declarations=a.emptyArray,t.prototype.tests=a.emptyArray,t.prototype.notebooks=a.emptyArray,t.prototype.dataPreparations=a.emptyArray,t.prototype.graphErrors=null,t.prototype.dataformCoreVersion="",t.prototype.targets=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.tables&&e.tables.length)for(var r=0;r<e.tables.length;++r)s.dataform.Table.encode(e.tables[r],t.uint32(10).fork()).ldelim();if(null!=e.operations&&e.operations.length)for(r=0;r<e.operations.length;++r)s.dataform.Operation.encode(e.operations[r],t.uint32(18).fork()).ldelim();if(null!=e.assertions&&e.assertions.length)for(r=0;r<e.assertions.length;++r)s.dataform.Assertion.encode(e.assertions[r],t.uint32(26).fork()).ldelim();if(null!=e.projectConfig&&Object.hasOwnProperty.call(e,"projectConfig")&&s.dataform.ProjectConfig.encode(e.projectConfig,t.uint32(34).fork()).ldelim(),null!=e.graphErrors&&Object.hasOwnProperty.call(e,"graphErrors")&&s.dataform.GraphErrors.encode(e.graphErrors,t.uint32(58).fork()).ldelim(),null!=e.tests&&e.tests.length)for(r=0;r<e.tests.length;++r)s.dataform.Test.encode(e.tests[r],t.uint32(66).fork()).ldelim();if(null!=e.declarations&&e.declarations.length)for(r=0;r<e.declarations.length;++r)s.dataform.Declaration.encode(e.declarations[r],t.uint32(74).fork()).ldelim();if(null!=e.dataformCoreVersion&&Object.hasOwnProperty.call(e,"dataformCoreVersion")&&t.uint32(82).string(e.dataformCoreVersion),null!=e.targets&&e.targets.length)for(r=0;r<e.targets.length;++r)s.dataform.Target.encode(e.targets[r],t.uint32(90).fork()).ldelim();if(null!=e.notebooks&&e.notebooks.length)for(r=0;r<e.notebooks.length;++r)s.dataform.Notebook.encode(e.notebooks[r],t.uint32(98).fork()).ldelim();if(null!=e.dataPreparations&&e.dataPreparations.length)for(r=0;r<e.dataPreparations.length;++r)s.dataform.DataPreparation.encode(e.dataPreparations[r],t.uint32(106).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CompiledGraph;e.pos<r;){var i=e.uint32();switch(i>>>3){case 4:n.projectConfig=s.dataform.ProjectConfig.decode(e,e.uint32());break;case 1:n.tables&&n.tables.length||(n.tables=[]),n.tables.push(s.dataform.Table.decode(e,e.uint32()));break;case 2:n.operations&&n.operations.length||(n.operations=[]),n.operations.push(s.dataform.Operation.decode(e,e.uint32()));break;case 3:n.assertions&&n.assertions.length||(n.assertions=[]),n.assertions.push(s.dataform.Assertion.decode(e,e.uint32()));break;case 9:n.declarations&&n.declarations.length||(n.declarations=[]),n.declarations.push(s.dataform.Declaration.decode(e,e.uint32()));break;case 8:n.tests&&n.tests.length||(n.tests=[]),n.tests.push(s.dataform.Test.decode(e,e.uint32()));break;case 12:n.notebooks&&n.notebooks.length||(n.notebooks=[]),n.notebooks.push(s.dataform.Notebook.decode(e,e.uint32()));break;case 13:n.dataPreparations&&n.dataPreparations.length||(n.dataPreparations=[]),n.dataPreparations.push(s.dataform.DataPreparation.decode(e,e.uint32()));break;case 7:n.graphErrors=s.dataform.GraphErrors.decode(e,e.uint32());break;case 10:n.dataformCoreVersion=e.string();break;case 11:n.targets&&n.targets.length||(n.targets=[]),n.targets.push(s.dataform.Target.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.projectConfig&&e.hasOwnProperty("projectConfig")&&(r=s.dataform.ProjectConfig.verify(e.projectConfig)))return"projectConfig."+r;if(null!=e.tables&&e.hasOwnProperty("tables")){if(!Array.isArray(e.tables))return"tables: array expected";for(var t=0;t<e.tables.length;++t)if(r=s.dataform.Table.verify(e.tables[t]))return"tables."+r}if(null!=e.operations&&e.hasOwnProperty("operations")){if(!Array.isArray(e.operations))return"operations: array expected";for(t=0;t<e.operations.length;++t)if(r=s.dataform.Operation.verify(e.operations[t]))return"operations."+r}if(null!=e.assertions&&e.hasOwnProperty("assertions")){if(!Array.isArray(e.assertions))return"assertions: array expected";for(t=0;t<e.assertions.length;++t)if(r=s.dataform.Assertion.verify(e.assertions[t]))return"assertions."+r}if(null!=e.declarations&&e.hasOwnProperty("declarations")){if(!Array.isArray(e.declarations))return"declarations: array expected";for(t=0;t<e.declarations.length;++t)if(r=s.dataform.Declaration.verify(e.declarations[t]))return"declarations."+r}if(null!=e.tests&&e.hasOwnProperty("tests")){if(!Array.isArray(e.tests))return"tests: array expected";for(t=0;t<e.tests.length;++t)if(r=s.dataform.Test.verify(e.tests[t]))return"tests."+r}if(null!=e.notebooks&&e.hasOwnProperty("notebooks")){if(!Array.isArray(e.notebooks))return"notebooks: array expected";for(t=0;t<e.notebooks.length;++t)if(r=s.dataform.Notebook.verify(e.notebooks[t]))return"notebooks."+r}if(null!=e.dataPreparations&&e.hasOwnProperty("dataPreparations")){if(!Array.isArray(e.dataPreparations))return"dataPreparations: array expected";for(t=0;t<e.dataPreparations.length;++t)if(r=s.dataform.DataPreparation.verify(e.dataPreparations[t]))return"dataPreparations."+r}if(null!=e.graphErrors&&e.hasOwnProperty("graphErrors")&&(r=s.dataform.GraphErrors.verify(e.graphErrors)))return"graphErrors."+r;if(null!=e.dataformCoreVersion&&e.hasOwnProperty("dataformCoreVersion")&&!a.isString(e.dataformCoreVersion))return"dataformCoreVersion: string expected";if(null!=e.targets&&e.hasOwnProperty("targets")){if(!Array.isArray(e.targets))return"targets: array expected";for(t=0;t<e.targets.length;++t){var r;if(r=s.dataform.Target.verify(e.targets[t]))return"targets."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.CompiledGraph)return e;var t=new s.dataform.CompiledGraph;if(null!=e.projectConfig){if("object"!=typeof e.projectConfig)throw TypeError(".dataform.CompiledGraph.projectConfig: object expected");t.projectConfig=s.dataform.ProjectConfig.fromObject(e.projectConfig)}if(e.tables){if(!Array.isArray(e.tables))throw TypeError(".dataform.CompiledGraph.tables: array expected");t.tables=[];for(var r=0;r<e.tables.length;++r){if("object"!=typeof e.tables[r])throw TypeError(".dataform.CompiledGraph.tables: object expected");t.tables[r]=s.dataform.Table.fromObject(e.tables[r])}}if(e.operations){if(!Array.isArray(e.operations))throw TypeError(".dataform.CompiledGraph.operations: array expected");for(t.operations=[],r=0;r<e.operations.length;++r){if("object"!=typeof e.operations[r])throw TypeError(".dataform.CompiledGraph.operations: object expected");t.operations[r]=s.dataform.Operation.fromObject(e.operations[r])}}if(e.assertions){if(!Array.isArray(e.assertions))throw TypeError(".dataform.CompiledGraph.assertions: array expected");for(t.assertions=[],r=0;r<e.assertions.length;++r){if("object"!=typeof e.assertions[r])throw TypeError(".dataform.CompiledGraph.assertions: object expected");t.assertions[r]=s.dataform.Assertion.fromObject(e.assertions[r])}}if(e.declarations){if(!Array.isArray(e.declarations))throw TypeError(".dataform.CompiledGraph.declarations: array expected");for(t.declarations=[],r=0;r<e.declarations.length;++r){if("object"!=typeof e.declarations[r])throw TypeError(".dataform.CompiledGraph.declarations: object expected");t.declarations[r]=s.dataform.Declaration.fromObject(e.declarations[r])}}if(e.tests){if(!Array.isArray(e.tests))throw TypeError(".dataform.CompiledGraph.tests: array expected");for(t.tests=[],r=0;r<e.tests.length;++r){if("object"!=typeof e.tests[r])throw TypeError(".dataform.CompiledGraph.tests: object expected");t.tests[r]=s.dataform.Test.fromObject(e.tests[r])}}if(e.notebooks){if(!Array.isArray(e.notebooks))throw TypeError(".dataform.CompiledGraph.notebooks: array expected");for(t.notebooks=[],r=0;r<e.notebooks.length;++r){if("object"!=typeof e.notebooks[r])throw TypeError(".dataform.CompiledGraph.notebooks: object expected");t.notebooks[r]=s.dataform.Notebook.fromObject(e.notebooks[r])}}if(e.dataPreparations){if(!Array.isArray(e.dataPreparations))throw TypeError(".dataform.CompiledGraph.dataPreparations: array expected");for(t.dataPreparations=[],r=0;r<e.dataPreparations.length;++r){if("object"!=typeof e.dataPreparations[r])throw TypeError(".dataform.CompiledGraph.dataPreparations: object expected");t.dataPreparations[r]=s.dataform.DataPreparation.fromObject(e.dataPreparations[r])}}if(null!=e.graphErrors){if("object"!=typeof e.graphErrors)throw TypeError(".dataform.CompiledGraph.graphErrors: object expected");t.graphErrors=s.dataform.GraphErrors.fromObject(e.graphErrors)}if(null!=e.dataformCoreVersion&&(t.dataformCoreVersion=String(e.dataformCoreVersion)),e.targets){if(!Array.isArray(e.targets))throw TypeError(".dataform.CompiledGraph.targets: array expected");for(t.targets=[],r=0;r<e.targets.length;++r){if("object"!=typeof e.targets[r])throw TypeError(".dataform.CompiledGraph.targets: object expected");t.targets[r]=s.dataform.Target.fromObject(e.targets[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.tables=[],r.operations=[],r.assertions=[],r.tests=[],r.declarations=[],r.targets=[],r.notebooks=[],r.dataPreparations=[]),t.defaults&&(r.projectConfig=null,r.graphErrors=null,r.dataformCoreVersion=""),e.tables&&e.tables.length){r.tables=[];for(var n=0;n<e.tables.length;++n)r.tables[n]=s.dataform.Table.toObject(e.tables[n],t)}if(e.operations&&e.operations.length)for(r.operations=[],n=0;n<e.operations.length;++n)r.operations[n]=s.dataform.Operation.toObject(e.operations[n],t);if(e.assertions&&e.assertions.length)for(r.assertions=[],n=0;n<e.assertions.length;++n)r.assertions[n]=s.dataform.Assertion.toObject(e.assertions[n],t);if(null!=e.projectConfig&&e.hasOwnProperty("projectConfig")&&(r.projectConfig=s.dataform.ProjectConfig.toObject(e.projectConfig,t)),null!=e.graphErrors&&e.hasOwnProperty("graphErrors")&&(r.graphErrors=s.dataform.GraphErrors.toObject(e.graphErrors,t)),e.tests&&e.tests.length)for(r.tests=[],n=0;n<e.tests.length;++n)r.tests[n]=s.dataform.Test.toObject(e.tests[n],t);if(e.declarations&&e.declarations.length)for(r.declarations=[],n=0;n<e.declarations.length;++n)r.declarations[n]=s.dataform.Declaration.toObject(e.declarations[n],t);if(null!=e.dataformCoreVersion&&e.hasOwnProperty("dataformCoreVersion")&&(r.dataformCoreVersion=e.dataformCoreVersion),e.targets&&e.targets.length)for(r.targets=[],n=0;n<e.targets.length;++n)r.targets[n]=s.dataform.Target.toObject(e.targets[n],t);if(e.notebooks&&e.notebooks.length)for(r.notebooks=[],n=0;n<e.notebooks.length;++n)r.notebooks[n]=s.dataform.Notebook.toObject(e.notebooks[n],t);if(e.dataPreparations&&e.dataPreparations.length)for(r.dataPreparations=[],n=0;n<e.dataPreparations.length;++n)r.dataPreparations[n]=s.dataform.DataPreparation.toObject(e.dataPreparations[n],t);return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CompiledGraph"},t}(),n.CoreExecutionRequest=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.compile=null,Object.defineProperty(t.prototype,"request",{get:a.oneOfGetter(r=["compile"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.compile&&Object.hasOwnProperty.call(e,"compile")&&s.dataform.CompileExecutionRequest.encode(e.compile,t.uint32(10).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CoreExecutionRequest;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.compile=s.dataform.CompileExecutionRequest.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.compile&&e.hasOwnProperty("compile")){var t=s.dataform.CompileExecutionRequest.verify(e.compile);if(t)return"compile."+t}return null},t.fromObject=function(e){if(e instanceof s.dataform.CoreExecutionRequest)return e;var t=new s.dataform.CoreExecutionRequest;if(null!=e.compile){if("object"!=typeof e.compile)throw TypeError(".dataform.CoreExecutionRequest.compile: object expected");t.compile=s.dataform.CompileExecutionRequest.fromObject(e.compile)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.compile&&e.hasOwnProperty("compile")&&(r.compile=s.dataform.CompileExecutionRequest.toObject(e.compile,t),t.oneofs&&(r.request="compile")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CoreExecutionRequest"},t}(),n.CoreExecutionResponse=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.compile=null,Object.defineProperty(t.prototype,"response",{get:a.oneOfGetter(r=["compile"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.compile&&Object.hasOwnProperty.call(e,"compile")&&s.dataform.CompileExecutionResponse.encode(e.compile,t.uint32(10).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CoreExecutionResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.compile=s.dataform.CompileExecutionResponse.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.compile&&e.hasOwnProperty("compile")){var t=s.dataform.CompileExecutionResponse.verify(e.compile);if(t)return"compile."+t}return null},t.fromObject=function(e){if(e instanceof s.dataform.CoreExecutionResponse)return e;var t=new s.dataform.CoreExecutionResponse;if(null!=e.compile){if("object"!=typeof e.compile)throw TypeError(".dataform.CoreExecutionResponse.compile: object expected");t.compile=s.dataform.CompileExecutionResponse.fromObject(e.compile)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.compile&&e.hasOwnProperty("compile")&&(r.compile=s.dataform.CompileExecutionResponse.toObject(e.compile,t),t.oneofs&&(r.response="compile")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CoreExecutionResponse"},t}(),n.CompileExecutionRequest=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.compileConfig=null,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.compileConfig&&Object.hasOwnProperty.call(e,"compileConfig")&&s.dataform.CompileConfig.encode(e.compileConfig,t.uint32(10).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CompileExecutionRequest;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.compileConfig=s.dataform.CompileConfig.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.compileConfig&&e.hasOwnProperty("compileConfig")){var t=s.dataform.CompileConfig.verify(e.compileConfig);if(t)return"compileConfig."+t}return null},t.fromObject=function(e){if(e instanceof s.dataform.CompileExecutionRequest)return e;var t=new s.dataform.CompileExecutionRequest;if(null!=e.compileConfig){if("object"!=typeof e.compileConfig)throw TypeError(".dataform.CompileExecutionRequest.compileConfig: object expected");t.compileConfig=s.dataform.CompileConfig.fromObject(e.compileConfig)}return t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.compileConfig=null),null!=e.compileConfig&&e.hasOwnProperty("compileConfig")&&(r.compileConfig=s.dataform.CompileConfig.toObject(e.compileConfig,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CompileExecutionRequest"},t}(),n.CompileExecutionResponse=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.compiledGraph=null,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.compiledGraph&&Object.hasOwnProperty.call(e,"compiledGraph")&&s.dataform.CompiledGraph.encode(e.compiledGraph,t.uint32(10).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CompileExecutionResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.compiledGraph=s.dataform.CompiledGraph.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.compiledGraph&&e.hasOwnProperty("compiledGraph")){var t=s.dataform.CompiledGraph.verify(e.compiledGraph);if(t)return"compiledGraph."+t}return null},t.fromObject=function(e){if(e instanceof s.dataform.CompileExecutionResponse)return e;var t=new s.dataform.CompileExecutionResponse;if(null!=e.compiledGraph){if("object"!=typeof e.compiledGraph)throw TypeError(".dataform.CompileExecutionResponse.compiledGraph: object expected");t.compiledGraph=s.dataform.CompiledGraph.fromObject(e.compiledGraph)}return t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.compiledGraph=null),null!=e.compiledGraph&&e.hasOwnProperty("compiledGraph")&&(r.compiledGraph=s.dataform.CompiledGraph.toObject(e.compiledGraph,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CompileExecutionResponse"},t}(),n.SupportedFeatures=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN_FEATURE"]=0,t[e[1]="ARRAY_BUFFER_IPC"]=1,t}(),n.QueryEvaluationError=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.message="",t.prototype.errorLocation=null,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(10).string(e.message),null!=e.errorLocation&&Object.hasOwnProperty.call(e,"errorLocation")&&s.dataform.QueryEvaluationError.ErrorLocation.encode(e.errorLocation,t.uint32(18).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.QueryEvaluationError;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.message=e.string();break;case 2:n.errorLocation=s.dataform.QueryEvaluationError.ErrorLocation.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.message&&e.hasOwnProperty("message")&&!a.isString(e.message))return"message: string expected";if(null!=e.errorLocation&&e.hasOwnProperty("errorLocation")){var t=s.dataform.QueryEvaluationError.ErrorLocation.verify(e.errorLocation);if(t)return"errorLocation."+t}return null},t.fromObject=function(e){if(e instanceof s.dataform.QueryEvaluationError)return e;var t=new s.dataform.QueryEvaluationError;if(null!=e.message&&(t.message=String(e.message)),null!=e.errorLocation){if("object"!=typeof e.errorLocation)throw TypeError(".dataform.QueryEvaluationError.errorLocation: object expected");t.errorLocation=s.dataform.QueryEvaluationError.ErrorLocation.fromObject(e.errorLocation)}return t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.message="",r.errorLocation=null),null!=e.message&&e.hasOwnProperty("message")&&(r.message=e.message),null!=e.errorLocation&&e.hasOwnProperty("errorLocation")&&(r.errorLocation=s.dataform.QueryEvaluationError.ErrorLocation.toObject(e.errorLocation,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.QueryEvaluationError"},t.ErrorLocation=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.line=0,t.prototype.column=0,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.line&&Object.hasOwnProperty.call(e,"line")&&t.uint32(8).int32(e.line),null!=e.column&&Object.hasOwnProperty.call(e,"column")&&t.uint32(16).int32(e.column),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.QueryEvaluationError.ErrorLocation;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.line=e.int32();break;case 2:n.column=e.int32();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.line&&e.hasOwnProperty("line")&&!a.isInteger(e.line)?"line: integer expected":null!=e.column&&e.hasOwnProperty("column")&&!a.isInteger(e.column)?"column: integer expected":null},t.fromObject=function(e){if(e instanceof s.dataform.QueryEvaluationError.ErrorLocation)return e;var t=new s.dataform.QueryEvaluationError.ErrorLocation;return null!=e.line&&(t.line=0|e.line),null!=e.column&&(t.column=0|e.column),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.line=0,r.column=0),null!=e.line&&e.hasOwnProperty("line")&&(r.line=e.line),null!=e.column&&e.hasOwnProperty("column")&&(r.column=e.column),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.QueryEvaluationError.ErrorLocation"},t}(),t}(),n.QueryEvaluation=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.status=0,t.prototype.error=null,t.prototype.incremental=!1,t.prototype.query="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(8).int32(e.status),null!=e.error&&Object.hasOwnProperty.call(e,"error")&&s.dataform.QueryEvaluationError.encode(e.error,t.uint32(18).fork()).ldelim(),null!=e.incremental&&Object.hasOwnProperty.call(e,"incremental")&&t.uint32(24).bool(e.incremental),null!=e.query&&Object.hasOwnProperty.call(e,"query")&&t.uint32(34).string(e.query),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.QueryEvaluation;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.status=e.int32();break;case 2:n.error=s.dataform.QueryEvaluationError.decode(e,e.uint32());break;case 3:n.incremental=e.bool();break;case 4:n.query=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.status&&e.hasOwnProperty("status"))switch(e.status){default:return"status: enum value expected";case 0:case 1:}if(null!=e.error&&e.hasOwnProperty("error")){var t=s.dataform.QueryEvaluationError.verify(e.error);if(t)return"error."+t}return null!=e.incremental&&e.hasOwnProperty("incremental")&&"boolean"!=typeof e.incremental?"incremental: boolean expected":null!=e.query&&e.hasOwnProperty("query")&&!a.isString(e.query)?"query: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.QueryEvaluation)return e;var t=new s.dataform.QueryEvaluation;switch(e.status){default:if("number"==typeof e.status){t.status=e.status;break}break;case"SUCCESS":case 0:t.status=0;break;case"FAILURE":case 1:t.status=1}if(null!=e.error){if("object"!=typeof e.error)throw TypeError(".dataform.QueryEvaluation.error: object expected");t.error=s.dataform.QueryEvaluationError.fromObject(e.error)}return null!=e.incremental&&(t.incremental=Boolean(e.incremental)),null!=e.query&&(t.query=String(e.query)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.status=t.enums===String?"SUCCESS":0,r.error=null,r.incremental=!1,r.query=""),null!=e.status&&e.hasOwnProperty("status")&&(r.status=t.enums===String?void 0===s.dataform.QueryEvaluation.QueryEvaluationStatus[e.status]?e.status:s.dataform.QueryEvaluation.QueryEvaluationStatus[e.status]:e.status),null!=e.error&&e.hasOwnProperty("error")&&(r.error=s.dataform.QueryEvaluationError.toObject(e.error,t)),null!=e.incremental&&e.hasOwnProperty("incremental")&&(r.incremental=e.incremental),null!=e.query&&e.hasOwnProperty("query")&&(r.query=e.query),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.QueryEvaluation"},t.QueryEvaluationStatus=function(){var e={},t=Object.create(e);return t[e[0]="SUCCESS"]=0,t[e[1]="FAILURE"]=1,t}(),t}(),n.RunConfig=function(){function t(e){if(this.actions=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.actions=a.emptyArray,t.prototype.tags=a.emptyArray,t.prototype.includeDependencies=!1,t.prototype.includeDependents=!1,t.prototype.fullRefresh=!1,t.prototype.timeoutMillis=0,t.prototype.disableSetMetadata=!1,t.prototype.useRunCache=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.actions&&e.actions.length)for(var r=0;r<e.actions.length;++r)t.uint32(10).string(e.actions[r]);if(null!=e.fullRefresh&&Object.hasOwnProperty.call(e,"fullRefresh")&&t.uint32(16).bool(e.fullRefresh),null!=e.includeDependencies&&Object.hasOwnProperty.call(e,"includeDependencies")&&t.uint32(24).bool(e.includeDependencies),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(42).string(e.tags[r]);return null!=e.timeoutMillis&&Object.hasOwnProperty.call(e,"timeoutMillis")&&t.uint32(56).int32(e.timeoutMillis),null!=e.useRunCache&&Object.hasOwnProperty.call(e,"useRunCache")&&t.uint32(64).bool(e.useRunCache),null!=e.disableSetMetadata&&Object.hasOwnProperty.call(e,"disableSetMetadata")&&t.uint32(72).bool(e.disableSetMetadata),null!=e.includeDependents&&Object.hasOwnProperty.call(e,"includeDependents")&&t.uint32(88).bool(e.includeDependents),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.RunConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.actions&&n.actions.length||(n.actions=[]),n.actions.push(e.string());break;case 5:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 3:n.includeDependencies=e.bool();break;case 11:n.includeDependents=e.bool();break;case 2:n.fullRefresh=e.bool();break;case 7:n.timeoutMillis=e.int32();break;case 9:n.disableSetMetadata=e.bool();break;case 8:n.useRunCache=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.actions&&e.hasOwnProperty("actions")){if(!Array.isArray(e.actions))return"actions: array expected";for(var t=0;t<e.actions.length;++t)if(!a.isString(e.actions[t]))return"actions: string[] expected"}if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null!=e.includeDependencies&&e.hasOwnProperty("includeDependencies")&&"boolean"!=typeof e.includeDependencies?"includeDependencies: boolean expected":null!=e.includeDependents&&e.hasOwnProperty("includeDependents")&&"boolean"!=typeof e.includeDependents?"includeDependents: boolean expected":null!=e.fullRefresh&&e.hasOwnProperty("fullRefresh")&&"boolean"!=typeof e.fullRefresh?"fullRefresh: boolean expected":null!=e.timeoutMillis&&e.hasOwnProperty("timeoutMillis")&&!a.isInteger(e.timeoutMillis)?"timeoutMillis: integer expected":null!=e.disableSetMetadata&&e.hasOwnProperty("disableSetMetadata")&&"boolean"!=typeof e.disableSetMetadata?"disableSetMetadata: boolean expected":null!=e.useRunCache&&e.hasOwnProperty("useRunCache")&&"boolean"!=typeof e.useRunCache?"useRunCache: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.RunConfig)return e;var t=new s.dataform.RunConfig;if(e.actions){if(!Array.isArray(e.actions))throw TypeError(".dataform.RunConfig.actions: array expected");t.actions=[];for(var r=0;r<e.actions.length;++r)t.actions[r]=String(e.actions[r])}if(e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.RunConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}return null!=e.includeDependencies&&(t.includeDependencies=Boolean(e.includeDependencies)),null!=e.includeDependents&&(t.includeDependents=Boolean(e.includeDependents)),null!=e.fullRefresh&&(t.fullRefresh=Boolean(e.fullRefresh)),null!=e.timeoutMillis&&(t.timeoutMillis=0|e.timeoutMillis),null!=e.disableSetMetadata&&(t.disableSetMetadata=Boolean(e.disableSetMetadata)),null!=e.useRunCache&&(t.useRunCache=Boolean(e.useRunCache)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.actions=[],r.tags=[]),t.defaults&&(r.fullRefresh=!1,r.includeDependencies=!1,r.timeoutMillis=0,r.useRunCache=!1,r.disableSetMetadata=!1,r.includeDependents=!1),e.actions&&e.actions.length){r.actions=[];for(var n=0;n<e.actions.length;++n)r.actions[n]=e.actions[n]}if(null!=e.fullRefresh&&e.hasOwnProperty("fullRefresh")&&(r.fullRefresh=e.fullRefresh),null!=e.includeDependencies&&e.hasOwnProperty("includeDependencies")&&(r.includeDependencies=e.includeDependencies),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];return null!=e.timeoutMillis&&e.hasOwnProperty("timeoutMillis")&&(r.timeoutMillis=e.timeoutMillis),null!=e.useRunCache&&e.hasOwnProperty("useRunCache")&&(r.useRunCache=e.useRunCache),null!=e.disableSetMetadata&&e.hasOwnProperty("disableSetMetadata")&&(r.disableSetMetadata=e.disableSetMetadata),null!=e.includeDependents&&e.hasOwnProperty("includeDependents")&&(r.includeDependents=e.includeDependents),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.RunConfig"},t}(),n.ExecutionTask=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.type="",t.prototype.statement="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(10).string(e.type),null!=e.statement&&Object.hasOwnProperty.call(e,"statement")&&t.uint32(18).string(e.statement),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ExecutionTask;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.type=e.string();break;case 2:n.statement=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&!a.isString(e.type)?"type: string expected":null!=e.statement&&e.hasOwnProperty("statement")&&!a.isString(e.statement)?"statement: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ExecutionTask)return e;var t=new s.dataform.ExecutionTask;return null!=e.type&&(t.type=String(e.type)),null!=e.statement&&(t.statement=String(e.statement)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.type="",r.statement=""),null!=e.type&&e.hasOwnProperty("type")&&(r.type=e.type),null!=e.statement&&e.hasOwnProperty("statement")&&(r.statement=e.statement),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ExecutionTask"},t}(),n.ExecutionAction=function(){function t(e){if(this.dependencyTargets=[],this.tasks=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.fileName="",t.prototype.type="",t.prototype.tableType="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.hermeticity=0,t.prototype.tasks=a.emptyArray,t.prototype.actionDescriptor=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.tasks&&e.tasks.length)for(var r=0;r<e.tasks.length;++r)s.dataform.ExecutionTask.encode(e.tasks[r],t.uint32(18).fork()).ldelim();if(null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(34).string(e.type),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(42).fork()).ldelim(),null!=e.tableType&&Object.hasOwnProperty.call(e,"tableType")&&t.uint32(50).string(e.tableType),null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(66).string(e.fileName),null!=e.actionDescriptor&&Object.hasOwnProperty.call(e,"actionDescriptor")&&s.dataform.ActionDescriptor.encode(e.actionDescriptor,t.uint32(74).fork()).ldelim(),null!=e.hermeticity&&Object.hasOwnProperty.call(e,"hermeticity")&&t.uint32(80).int32(e.hermeticity),null!=e.dependencyTargets&&e.dependencyTargets.length)for(r=0;r<e.dependencyTargets.length;++r)s.dataform.Target.encode(e.dependencyTargets[r],t.uint32(90).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ExecutionAction;e.pos<r;){var i=e.uint32();switch(i>>>3){case 5:n.target=s.dataform.Target.decode(e,e.uint32());break;case 8:n.fileName=e.string();break;case 4:n.type=e.string();break;case 6:n.tableType=e.string();break;case 11:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 10:n.hermeticity=e.int32();break;case 2:n.tasks&&n.tasks.length||(n.tasks=[]),n.tasks.push(s.dataform.ExecutionTask.decode(e,e.uint32()));break;case 9:n.actionDescriptor=s.dataform.ActionDescriptor.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName))return"fileName: string expected";if(null!=e.type&&e.hasOwnProperty("type")&&!a.isString(e.type))return"type: string expected";if(null!=e.tableType&&e.hasOwnProperty("tableType")&&!a.isString(e.tableType))return"tableType: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t)if(r=s.dataform.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}if(null!=e.hermeticity&&e.hasOwnProperty("hermeticity"))switch(e.hermeticity){default:return"hermeticity: enum value expected";case 0:case 1:case 2:}if(null!=e.tasks&&e.hasOwnProperty("tasks")){if(!Array.isArray(e.tasks))return"tasks: array expected";for(t=0;t<e.tasks.length;++t){var r;if(r=s.dataform.ExecutionTask.verify(e.tasks[t]))return"tasks."+r}}return null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r=s.dataform.ActionDescriptor.verify(e.actionDescriptor))?"actionDescriptor."+r:null},t.fromObject=function(e){if(e instanceof s.dataform.ExecutionAction)return e;var t=new s.dataform.ExecutionAction;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.ExecutionAction.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.fileName&&(t.fileName=String(e.fileName)),null!=e.type&&(t.type=String(e.type)),null!=e.tableType&&(t.tableType=String(e.tableType)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ExecutionAction.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ExecutionAction.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.Target.fromObject(e.dependencyTargets[r])}}switch(e.hermeticity){default:if("number"==typeof e.hermeticity){t.hermeticity=e.hermeticity;break}break;case"UNKNOWN":case 0:t.hermeticity=0;break;case"HERMETIC":case 1:t.hermeticity=1;break;case"NON_HERMETIC":case 2:t.hermeticity=2}if(e.tasks){if(!Array.isArray(e.tasks))throw TypeError(".dataform.ExecutionAction.tasks: array expected");for(t.tasks=[],r=0;r<e.tasks.length;++r){if("object"!=typeof e.tasks[r])throw TypeError(".dataform.ExecutionAction.tasks: object expected");t.tasks[r]=s.dataform.ExecutionTask.fromObject(e.tasks[r])}}if(null!=e.actionDescriptor){if("object"!=typeof e.actionDescriptor)throw TypeError(".dataform.ExecutionAction.actionDescriptor: object expected");t.actionDescriptor=s.dataform.ActionDescriptor.fromObject(e.actionDescriptor)}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.tasks=[],r.dependencyTargets=[]),t.defaults&&(r.type="",r.target=null,r.tableType="",r.fileName="",r.actionDescriptor=null,r.hermeticity=t.enums===String?"UNKNOWN":0),e.tasks&&e.tasks.length){r.tasks=[];for(var n=0;n<e.tasks.length;++n)r.tasks[n]=s.dataform.ExecutionTask.toObject(e.tasks[n],t)}if(null!=e.type&&e.hasOwnProperty("type")&&(r.type=e.type),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),null!=e.tableType&&e.hasOwnProperty("tableType")&&(r.tableType=e.tableType),null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r.actionDescriptor=s.dataform.ActionDescriptor.toObject(e.actionDescriptor,t)),null!=e.hermeticity&&e.hasOwnProperty("hermeticity")&&(r.hermeticity=t.enums===String?void 0===s.dataform.ActionHermeticity[e.hermeticity]?e.hermeticity:s.dataform.ActionHermeticity[e.hermeticity]:e.hermeticity),e.dependencyTargets&&e.dependencyTargets.length)for(r.dependencyTargets=[],n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.Target.toObject(e.dependencyTargets[n],t);return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ExecutionAction"},t}(),n.WarehouseState=function(){function t(e){if(this.tables=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.tables=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.tables&&e.tables.length)for(var r=0;r<e.tables.length;++r)s.dataform.TableMetadata.encode(e.tables[r],t.uint32(10).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.WarehouseState;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.tables&&n.tables.length||(n.tables=[]),n.tables.push(s.dataform.TableMetadata.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.tables&&e.hasOwnProperty("tables")){if(!Array.isArray(e.tables))return"tables: array expected";for(var t=0;t<e.tables.length;++t){var r=s.dataform.TableMetadata.verify(e.tables[t]);if(r)return"tables."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.WarehouseState)return e;var t=new s.dataform.WarehouseState;if(e.tables){if(!Array.isArray(e.tables))throw TypeError(".dataform.WarehouseState.tables: array expected");t.tables=[];for(var r=0;r<e.tables.length;++r){if("object"!=typeof e.tables[r])throw TypeError(".dataform.WarehouseState.tables: object expected");t.tables[r]=s.dataform.TableMetadata.fromObject(e.tables[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.tables=[]),e.tables&&e.tables.length){r.tables=[];for(var n=0;n<e.tables.length;++n)r.tables[n]=s.dataform.TableMetadata.toObject(e.tables[n],t)}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.WarehouseState"},t}(),n.ExecutionGraph=function(){function t(e){if(this.declarationTargets=[],this.actions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.projectConfig=null,t.prototype.runConfig=null,t.prototype.warehouseState=null,t.prototype.declarationTargets=a.emptyArray,t.prototype.actions=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.projectConfig&&Object.hasOwnProperty.call(e,"projectConfig")&&s.dataform.ProjectConfig.encode(e.projectConfig,t.uint32(10).fork()).ldelim(),null!=e.runConfig&&Object.hasOwnProperty.call(e,"runConfig")&&s.dataform.RunConfig.encode(e.runConfig,t.uint32(18).fork()).ldelim(),null!=e.actions&&e.actions.length)for(var r=0;r<e.actions.length;++r)s.dataform.ExecutionAction.encode(e.actions[r],t.uint32(26).fork()).ldelim();if(null!=e.warehouseState&&Object.hasOwnProperty.call(e,"warehouseState")&&s.dataform.WarehouseState.encode(e.warehouseState,t.uint32(34).fork()).ldelim(),null!=e.declarationTargets&&e.declarationTargets.length)for(r=0;r<e.declarationTargets.length;++r)s.dataform.Target.encode(e.declarationTargets[r],t.uint32(42).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ExecutionGraph;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.projectConfig=s.dataform.ProjectConfig.decode(e,e.uint32());break;case 2:n.runConfig=s.dataform.RunConfig.decode(e,e.uint32());break;case 4:n.warehouseState=s.dataform.WarehouseState.decode(e,e.uint32());break;case 5:n.declarationTargets&&n.declarationTargets.length||(n.declarationTargets=[]),n.declarationTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 3:n.actions&&n.actions.length||(n.actions=[]),n.actions.push(s.dataform.ExecutionAction.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.projectConfig&&e.hasOwnProperty("projectConfig")&&(r=s.dataform.ProjectConfig.verify(e.projectConfig)))return"projectConfig."+r;if(null!=e.runConfig&&e.hasOwnProperty("runConfig")&&(r=s.dataform.RunConfig.verify(e.runConfig)))return"runConfig."+r;if(null!=e.warehouseState&&e.hasOwnProperty("warehouseState")&&(r=s.dataform.WarehouseState.verify(e.warehouseState)))return"warehouseState."+r;if(null!=e.declarationTargets&&e.hasOwnProperty("declarationTargets")){if(!Array.isArray(e.declarationTargets))return"declarationTargets: array expected";for(var t=0;t<e.declarationTargets.length;++t)if(r=s.dataform.Target.verify(e.declarationTargets[t]))return"declarationTargets."+r}if(null!=e.actions&&e.hasOwnProperty("actions")){if(!Array.isArray(e.actions))return"actions: array expected";for(t=0;t<e.actions.length;++t){var r;if(r=s.dataform.ExecutionAction.verify(e.actions[t]))return"actions."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.ExecutionGraph)return e;var t=new s.dataform.ExecutionGraph;if(null!=e.projectConfig){if("object"!=typeof e.projectConfig)throw TypeError(".dataform.ExecutionGraph.projectConfig: object expected");t.projectConfig=s.dataform.ProjectConfig.fromObject(e.projectConfig)}if(null!=e.runConfig){if("object"!=typeof e.runConfig)throw TypeError(".dataform.ExecutionGraph.runConfig: object expected");t.runConfig=s.dataform.RunConfig.fromObject(e.runConfig)}if(null!=e.warehouseState){if("object"!=typeof e.warehouseState)throw TypeError(".dataform.ExecutionGraph.warehouseState: object expected");t.warehouseState=s.dataform.WarehouseState.fromObject(e.warehouseState)}if(e.declarationTargets){if(!Array.isArray(e.declarationTargets))throw TypeError(".dataform.ExecutionGraph.declarationTargets: array expected");t.declarationTargets=[];for(var r=0;r<e.declarationTargets.length;++r){if("object"!=typeof e.declarationTargets[r])throw TypeError(".dataform.ExecutionGraph.declarationTargets: object expected");t.declarationTargets[r]=s.dataform.Target.fromObject(e.declarationTargets[r])}}if(e.actions){if(!Array.isArray(e.actions))throw TypeError(".dataform.ExecutionGraph.actions: array expected");for(t.actions=[],r=0;r<e.actions.length;++r){if("object"!=typeof e.actions[r])throw TypeError(".dataform.ExecutionGraph.actions: object expected");t.actions[r]=s.dataform.ExecutionAction.fromObject(e.actions[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.actions=[],r.declarationTargets=[]),t.defaults&&(r.projectConfig=null,r.runConfig=null,r.warehouseState=null),null!=e.projectConfig&&e.hasOwnProperty("projectConfig")&&(r.projectConfig=s.dataform.ProjectConfig.toObject(e.projectConfig,t)),null!=e.runConfig&&e.hasOwnProperty("runConfig")&&(r.runConfig=s.dataform.RunConfig.toObject(e.runConfig,t)),e.actions&&e.actions.length){r.actions=[];for(var n=0;n<e.actions.length;++n)r.actions[n]=s.dataform.ExecutionAction.toObject(e.actions[n],t)}if(null!=e.warehouseState&&e.hasOwnProperty("warehouseState")&&(r.warehouseState=s.dataform.WarehouseState.toObject(e.warehouseState,t)),e.declarationTargets&&e.declarationTargets.length)for(r.declarationTargets=[],n=0;n<e.declarationTargets.length;++n)r.declarationTargets[n]=s.dataform.Target.toObject(e.declarationTargets[n],t);return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ExecutionGraph"},t}(),n.Timing=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.startTimeMillis=0,t.prototype.endTimeMillis=0,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.startTimeMillis&&Object.hasOwnProperty.call(e,"startTimeMillis")&&t.uint32(8).int64(e.startTimeMillis),null!=e.endTimeMillis&&Object.hasOwnProperty.call(e,"endTimeMillis")&&t.uint32(16).int64(e.endTimeMillis),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Timing;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.startTimeMillis=e.int64();break;case 2:n.endTimeMillis=e.int64();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.startTimeMillis&&e.hasOwnProperty("startTimeMillis")&&!(a.isInteger(e.startTimeMillis)||e.startTimeMillis&&a.isInteger(e.startTimeMillis.low)&&a.isInteger(e.startTimeMillis.high))?"startTimeMillis: integer|Long expected":null!=e.endTimeMillis&&e.hasOwnProperty("endTimeMillis")&&!(a.isInteger(e.endTimeMillis)||e.endTimeMillis&&a.isInteger(e.endTimeMillis.low)&&a.isInteger(e.endTimeMillis.high))?"endTimeMillis: integer|Long expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Timing)return e;var t=new s.dataform.Timing;return null!=e.startTimeMillis&&(a.Long?(t.startTimeMillis=a.Long.fromValue(e.startTimeMillis)).unsigned=!1:"string"==typeof e.startTimeMillis?t.startTimeMillis=parseInt(e.startTimeMillis,10):"number"==typeof e.startTimeMillis?t.startTimeMillis=e.startTimeMillis:"object"==typeof e.startTimeMillis&&(t.startTimeMillis=new a.LongBits(e.startTimeMillis.low>>>0,e.startTimeMillis.high>>>0).toNumber())),null!=e.endTimeMillis&&(a.Long?(t.endTimeMillis=a.Long.fromValue(e.endTimeMillis)).unsigned=!1:"string"==typeof e.endTimeMillis?t.endTimeMillis=parseInt(e.endTimeMillis,10):"number"==typeof e.endTimeMillis?t.endTimeMillis=e.endTimeMillis:"object"==typeof e.endTimeMillis&&(t.endTimeMillis=new a.LongBits(e.endTimeMillis.low>>>0,e.endTimeMillis.high>>>0).toNumber())),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.startTimeMillis=0,r.endTimeMillis=0),null!=e.startTimeMillis&&e.hasOwnProperty("startTimeMillis")&&("number"==typeof e.startTimeMillis?r.startTimeMillis=t.longs===String?String(e.startTimeMillis):e.startTimeMillis:r.startTimeMillis=t.longs===String?a.Long.prototype.toString.call(e.startTimeMillis):t.longs===Number?new a.LongBits(e.startTimeMillis.low>>>0,e.startTimeMillis.high>>>0).toNumber():e.startTimeMillis),null!=e.endTimeMillis&&e.hasOwnProperty("endTimeMillis")&&("number"==typeof e.endTimeMillis?r.endTimeMillis=t.longs===String?String(e.endTimeMillis):e.endTimeMillis:r.endTimeMillis=t.longs===String?a.Long.prototype.toString.call(e.endTimeMillis):t.longs===Number?new a.LongBits(e.endTimeMillis.low>>>0,e.endTimeMillis.high>>>0).toNumber():e.endTimeMillis),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Timing"},t}(),n.RunResult=function(){function t(e){if(this.actions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.status=0,t.prototype.actions=a.emptyArray,t.prototype.timing=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(8).int32(e.status),null!=e.actions&&e.actions.length)for(var r=0;r<e.actions.length;++r)s.dataform.ActionResult.encode(e.actions[r],t.uint32(18).fork()).ldelim();return null!=e.timing&&Object.hasOwnProperty.call(e,"timing")&&s.dataform.Timing.encode(e.timing,t.uint32(26).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.RunResult;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.status=e.int32();break;case 2:n.actions&&n.actions.length||(n.actions=[]),n.actions.push(s.dataform.ActionResult.decode(e,e.uint32()));break;case 3:n.timing=s.dataform.Timing.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.status&&e.hasOwnProperty("status"))switch(e.status){default:return"status: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}if(null!=e.actions&&e.hasOwnProperty("actions")){if(!Array.isArray(e.actions))return"actions: array expected";for(var t=0;t<e.actions.length;++t)if(r=s.dataform.ActionResult.verify(e.actions[t]))return"actions."+r}var r;return null!=e.timing&&e.hasOwnProperty("timing")&&(r=s.dataform.Timing.verify(e.timing))?"timing."+r:null},t.fromObject=function(e){if(e instanceof s.dataform.RunResult)return e;var t=new s.dataform.RunResult;switch(e.status){default:if("number"==typeof e.status){t.status=e.status;break}break;case"UNKNOWN":case 0:t.status=0;break;case"RUNNING":case 1:t.status=1;break;case"SUCCESSFUL":case 2:t.status=2;break;case"FAILED":case 3:t.status=3;break;case"CANCELLED":case 4:t.status=4;break;case"TIMED_OUT":case 5:t.status=5}if(e.actions){if(!Array.isArray(e.actions))throw TypeError(".dataform.RunResult.actions: array expected");t.actions=[];for(var r=0;r<e.actions.length;++r){if("object"!=typeof e.actions[r])throw TypeError(".dataform.RunResult.actions: object expected");t.actions[r]=s.dataform.ActionResult.fromObject(e.actions[r])}}if(null!=e.timing){if("object"!=typeof e.timing)throw TypeError(".dataform.RunResult.timing: object expected");t.timing=s.dataform.Timing.fromObject(e.timing)}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.actions=[]),t.defaults&&(r.status=t.enums===String?"UNKNOWN":0,r.timing=null),null!=e.status&&e.hasOwnProperty("status")&&(r.status=t.enums===String?void 0===s.dataform.RunResult.ExecutionStatus[e.status]?e.status:s.dataform.RunResult.ExecutionStatus[e.status]:e.status),e.actions&&e.actions.length){r.actions=[];for(var n=0;n<e.actions.length;++n)r.actions[n]=s.dataform.ActionResult.toObject(e.actions[n],t)}return null!=e.timing&&e.hasOwnProperty("timing")&&(r.timing=s.dataform.Timing.toObject(e.timing,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.RunResult"},t.ExecutionStatus=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="RUNNING"]=1,t[e[2]="SUCCESSFUL"]=2,t[e[3]="FAILED"]=3,t[e[4]="CANCELLED"]=4,t[e[5]="TIMED_OUT"]=5,t}(),t}(),n.ActionResult=function(){function t(e){if(this.tasks=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.status=0,t.prototype.tasks=a.emptyArray,t.prototype.timing=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(16).int32(e.status),null!=e.tasks&&e.tasks.length)for(var r=0;r<e.tasks.length;++r)s.dataform.TaskResult.encode(e.tasks[r],t.uint32(26).fork()).ldelim();return null!=e.timing&&Object.hasOwnProperty.call(e,"timing")&&s.dataform.Timing.encode(e.timing,t.uint32(34).fork()).ldelim(),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(42).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionResult;e.pos<r;){var i=e.uint32();switch(i>>>3){case 5:n.target=s.dataform.Target.decode(e,e.uint32());break;case 2:n.status=e.int32();break;case 3:n.tasks&&n.tasks.length||(n.tasks=[]),n.tasks.push(s.dataform.TaskResult.decode(e,e.uint32()));break;case 4:n.timing=s.dataform.Timing.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.status&&e.hasOwnProperty("status"))switch(e.status){default:return"status: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.tasks&&e.hasOwnProperty("tasks")){if(!Array.isArray(e.tasks))return"tasks: array expected";for(var t=0;t<e.tasks.length;++t){var r;if(r=s.dataform.TaskResult.verify(e.tasks[t]))return"tasks."+r}}return null!=e.timing&&e.hasOwnProperty("timing")&&(r=s.dataform.Timing.verify(e.timing))?"timing."+r:null},t.fromObject=function(e){if(e instanceof s.dataform.ActionResult)return e;var t=new s.dataform.ActionResult;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.ActionResult.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}switch(e.status){default:if("number"==typeof e.status){t.status=e.status;break}break;case"UNKNOWN":case 0:t.status=0;break;case"RUNNING":case 1:t.status=1;break;case"SUCCESSFUL":case 2:t.status=2;break;case"FAILED":case 3:t.status=3;break;case"SKIPPED":case 4:t.status=4;break;case"DISABLED":case 5:t.status=5;break;case"CANCELLED":case 6:t.status=6}if(e.tasks){if(!Array.isArray(e.tasks))throw TypeError(".dataform.ActionResult.tasks: array expected");t.tasks=[];for(var r=0;r<e.tasks.length;++r){if("object"!=typeof e.tasks[r])throw TypeError(".dataform.ActionResult.tasks: object expected");t.tasks[r]=s.dataform.TaskResult.fromObject(e.tasks[r])}}if(null!=e.timing){if("object"!=typeof e.timing)throw TypeError(".dataform.ActionResult.timing: object expected");t.timing=s.dataform.Timing.fromObject(e.timing)}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.tasks=[]),t.defaults&&(r.status=t.enums===String?"UNKNOWN":0,r.timing=null,r.target=null),null!=e.status&&e.hasOwnProperty("status")&&(r.status=t.enums===String?void 0===s.dataform.ActionResult.ExecutionStatus[e.status]?e.status:s.dataform.ActionResult.ExecutionStatus[e.status]:e.status),e.tasks&&e.tasks.length){r.tasks=[];for(var n=0;n<e.tasks.length;++n)r.tasks[n]=s.dataform.TaskResult.toObject(e.tasks[n],t)}return null!=e.timing&&e.hasOwnProperty("timing")&&(r.timing=s.dataform.Timing.toObject(e.timing,t)),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionResult"},t.ExecutionStatus=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="RUNNING"]=1,t[e[2]="SUCCESSFUL"]=2,t[e[3]="FAILED"]=3,t[e[4]="SKIPPED"]=4,t[e[5]="DISABLED"]=5,t[e[6]="CANCELLED"]=6,t}(),t}(),n.ExecutionMetadata=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.bigquery=null,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.bigquery&&Object.hasOwnProperty.call(e,"bigquery")&&s.dataform.ExecutionMetadata.BigqueryMetadata.encode(e.bigquery,t.uint32(10).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ExecutionMetadata;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.bigquery=s.dataform.ExecutionMetadata.BigqueryMetadata.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.bigquery&&e.hasOwnProperty("bigquery")){var t=s.dataform.ExecutionMetadata.BigqueryMetadata.verify(e.bigquery);if(t)return"bigquery."+t}return null},t.fromObject=function(e){if(e instanceof s.dataform.ExecutionMetadata)return e;var t=new s.dataform.ExecutionMetadata;if(null!=e.bigquery){if("object"!=typeof e.bigquery)throw TypeError(".dataform.ExecutionMetadata.bigquery: object expected");t.bigquery=s.dataform.ExecutionMetadata.BigqueryMetadata.fromObject(e.bigquery)}return t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.bigquery=null),null!=e.bigquery&&e.hasOwnProperty("bigquery")&&(r.bigquery=s.dataform.ExecutionMetadata.BigqueryMetadata.toObject(e.bigquery,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ExecutionMetadata"},t.BigqueryMetadata=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.jobId="",t.prototype.totalBytesProcessed=0,t.prototype.totalBytesBilled=0,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.jobId&&Object.hasOwnProperty.call(e,"jobId")&&t.uint32(10).string(e.jobId),null!=e.totalBytesProcessed&&Object.hasOwnProperty.call(e,"totalBytesProcessed")&&t.uint32(16).int64(e.totalBytesProcessed),null!=e.totalBytesBilled&&Object.hasOwnProperty.call(e,"totalBytesBilled")&&t.uint32(24).int64(e.totalBytesBilled),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ExecutionMetadata.BigqueryMetadata;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.jobId=e.string();break;case 2:n.totalBytesProcessed=e.int64();break;case 3:n.totalBytesBilled=e.int64();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.jobId&&e.hasOwnProperty("jobId")&&!a.isString(e.jobId)?"jobId: string expected":null!=e.totalBytesProcessed&&e.hasOwnProperty("totalBytesProcessed")&&!(a.isInteger(e.totalBytesProcessed)||e.totalBytesProcessed&&a.isInteger(e.totalBytesProcessed.low)&&a.isInteger(e.totalBytesProcessed.high))?"totalBytesProcessed: integer|Long expected":null!=e.totalBytesBilled&&e.hasOwnProperty("totalBytesBilled")&&!(a.isInteger(e.totalBytesBilled)||e.totalBytesBilled&&a.isInteger(e.totalBytesBilled.low)&&a.isInteger(e.totalBytesBilled.high))?"totalBytesBilled: integer|Long expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ExecutionMetadata.BigqueryMetadata)return e;var t=new s.dataform.ExecutionMetadata.BigqueryMetadata;return null!=e.jobId&&(t.jobId=String(e.jobId)),null!=e.totalBytesProcessed&&(a.Long?(t.totalBytesProcessed=a.Long.fromValue(e.totalBytesProcessed)).unsigned=!1:"string"==typeof e.totalBytesProcessed?t.totalBytesProcessed=parseInt(e.totalBytesProcessed,10):"number"==typeof e.totalBytesProcessed?t.totalBytesProcessed=e.totalBytesProcessed:"object"==typeof e.totalBytesProcessed&&(t.totalBytesProcessed=new a.LongBits(e.totalBytesProcessed.low>>>0,e.totalBytesProcessed.high>>>0).toNumber())),null!=e.totalBytesBilled&&(a.Long?(t.totalBytesBilled=a.Long.fromValue(e.totalBytesBilled)).unsigned=!1:"string"==typeof e.totalBytesBilled?t.totalBytesBilled=parseInt(e.totalBytesBilled,10):"number"==typeof e.totalBytesBilled?t.totalBytesBilled=e.totalBytesBilled:"object"==typeof e.totalBytesBilled&&(t.totalBytesBilled=new a.LongBits(e.totalBytesBilled.low>>>0,e.totalBytesBilled.high>>>0).toNumber())),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.jobId="",r.totalBytesProcessed=0,r.totalBytesBilled=0),null!=e.jobId&&e.hasOwnProperty("jobId")&&(r.jobId=e.jobId),null!=e.totalBytesProcessed&&e.hasOwnProperty("totalBytesProcessed")&&("number"==typeof e.totalBytesProcessed?r.totalBytesProcessed=t.longs===String?String(e.totalBytesProcessed):e.totalBytesProcessed:r.totalBytesProcessed=t.longs===String?a.Long.prototype.toString.call(e.totalBytesProcessed):t.longs===Number?new a.LongBits(e.totalBytesProcessed.low>>>0,e.totalBytesProcessed.high>>>0).toNumber():e.totalBytesProcessed),null!=e.totalBytesBilled&&e.hasOwnProperty("totalBytesBilled")&&("number"==typeof e.totalBytesBilled?r.totalBytesBilled=t.longs===String?String(e.totalBytesBilled):e.totalBytesBilled:r.totalBytesBilled=t.longs===String?a.Long.prototype.toString.call(e.totalBytesBilled):t.longs===Number?new a.LongBits(e.totalBytesBilled.low>>>0,e.totalBytesBilled.high>>>0).toNumber():e.totalBytesBilled),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ExecutionMetadata.BigqueryMetadata"},t}(),t}(),n.TaskResult=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.status=0,t.prototype.errorMessage="",t.prototype.timing=null,t.prototype.metadata=null,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(8).int32(e.status),null!=e.errorMessage&&Object.hasOwnProperty.call(e,"errorMessage")&&t.uint32(18).string(e.errorMessage),null!=e.timing&&Object.hasOwnProperty.call(e,"timing")&&s.dataform.Timing.encode(e.timing,t.uint32(26).fork()).ldelim(),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&s.dataform.ExecutionMetadata.encode(e.metadata,t.uint32(34).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.TaskResult;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.status=e.int32();break;case 2:n.errorMessage=e.string();break;case 3:n.timing=s.dataform.Timing.decode(e,e.uint32());break;case 4:n.metadata=s.dataform.ExecutionMetadata.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.status&&e.hasOwnProperty("status"))switch(e.status){default:return"status: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}return null!=e.errorMessage&&e.hasOwnProperty("errorMessage")&&!a.isString(e.errorMessage)?"errorMessage: string expected":null!=e.timing&&e.hasOwnProperty("timing")&&(t=s.dataform.Timing.verify(e.timing))?"timing."+t:null!=e.metadata&&e.hasOwnProperty("metadata")&&(t=s.dataform.ExecutionMetadata.verify(e.metadata))?"metadata."+t:null;var t},t.fromObject=function(e){if(e instanceof s.dataform.TaskResult)return e;var t=new s.dataform.TaskResult;switch(e.status){default:if("number"==typeof e.status){t.status=e.status;break}break;case"UNKNOWN":case 0:t.status=0;break;case"RUNNING":case 1:t.status=1;break;case"SUCCESSFUL":case 2:t.status=2;break;case"FAILED":case 3:t.status=3;break;case"SKIPPED":case 4:t.status=4;break;case"CANCELLED":case 5:t.status=5}if(null!=e.errorMessage&&(t.errorMessage=String(e.errorMessage)),null!=e.timing){if("object"!=typeof e.timing)throw TypeError(".dataform.TaskResult.timing: object expected");t.timing=s.dataform.Timing.fromObject(e.timing)}if(null!=e.metadata){if("object"!=typeof e.metadata)throw TypeError(".dataform.TaskResult.metadata: object expected");t.metadata=s.dataform.ExecutionMetadata.fromObject(e.metadata)}return t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.status=t.enums===String?"UNKNOWN":0,r.errorMessage="",r.timing=null,r.metadata=null),null!=e.status&&e.hasOwnProperty("status")&&(r.status=t.enums===String?void 0===s.dataform.TaskResult.ExecutionStatus[e.status]?e.status:s.dataform.TaskResult.ExecutionStatus[e.status]:e.status),null!=e.errorMessage&&e.hasOwnProperty("errorMessage")&&(r.errorMessage=e.errorMessage),null!=e.timing&&e.hasOwnProperty("timing")&&(r.timing=s.dataform.Timing.toObject(e.timing,t)),null!=e.metadata&&e.hasOwnProperty("metadata")&&(r.metadata=s.dataform.ExecutionMetadata.toObject(e.metadata,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.TaskResult"},t.ExecutionStatus=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="RUNNING"]=1,t[e[2]="SUCCESSFUL"]=2,t[e[3]="FAILED"]=3,t[e[4]="SKIPPED"]=4,t[e[5]="CANCELLED"]=5,t}(),t}(),n.TestResult=function(){function t(e){if(this.messages=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.successful=!1,t.prototype.messages=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.successful&&Object.hasOwnProperty.call(e,"successful")&&t.uint32(16).bool(e.successful),null!=e.messages&&e.messages.length)for(var r=0;r<e.messages.length;++r)t.uint32(26).string(e.messages[r]);return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.TestResult;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.successful=e.bool();break;case 3:n.messages&&n.messages.length||(n.messages=[]),n.messages.push(e.string());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.successful&&e.hasOwnProperty("successful")&&"boolean"!=typeof e.successful)return"successful: boolean expected";if(null!=e.messages&&e.hasOwnProperty("messages")){if(!Array.isArray(e.messages))return"messages: array expected";for(var t=0;t<e.messages.length;++t)if(!a.isString(e.messages[t]))return"messages: string[] expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.TestResult)return e;var t=new s.dataform.TestResult;if(null!=e.name&&(t.name=String(e.name)),null!=e.successful&&(t.successful=Boolean(e.successful)),e.messages){if(!Array.isArray(e.messages))throw TypeError(".dataform.TestResult.messages: array expected");t.messages=[];for(var r=0;r<e.messages.length;++r)t.messages[r]=String(e.messages[r])}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.messages=[]),t.defaults&&(r.name="",r.successful=!1),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.successful&&e.hasOwnProperty("successful")&&(r.successful=e.successful),e.messages&&e.messages.length){r.messages=[];for(var n=0;n<e.messages.length;++n)r.messages[n]=e.messages[n]}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.TestResult"},t}(),n.Field=function(){function t(e){if(this.flags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.name="",t.prototype.flags=a.emptyArray,t.prototype.primitive=null,t.prototype.struct=null,t.prototype.description="",Object.defineProperty(t.prototype,"type",{get:a.oneOfGetter(r=["primitive","struct"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.struct&&Object.hasOwnProperty.call(e,"struct")&&s.dataform.Fields.encode(e.struct,t.uint32(26).fork()).ldelim(),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(42).string(e.description),null!=e.flags&&e.flags.length){t.uint32(50).fork();for(var r=0;r<e.flags.length;++r)t.int32(e.flags[r]);t.ldelim()}return null!=e.primitive&&Object.hasOwnProperty.call(e,"primitive")&&t.uint32(56).int32(e.primitive),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Field;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 6:if(n.flags&&n.flags.length||(n.flags=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)n.flags.push(e.int32());else n.flags.push(e.int32());break;case 7:n.primitive=e.int32();break;case 3:n.struct=s.dataform.Fields.decode(e,e.uint32());break;case 5:n.description=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.flags&&e.hasOwnProperty("flags")){if(!Array.isArray(e.flags))return"flags: array expected";for(var r=0;r<e.flags.length;++r)switch(e.flags[r]){default:return"flags: enum value[] expected";case 0:case 1:}}if(null!=e.primitive&&e.hasOwnProperty("primitive"))switch(t.type=1,e.primitive){default:return"primitive: enum value expected";case 0:case 1:case 2:case 5:case 3:case 4:case 6:case 7:case 8:case 9:case 10:case 11:case 12:}if(null!=e.struct&&e.hasOwnProperty("struct")){if(1===t.type)return"type: multiple values";t.type=1;var n=s.dataform.Fields.verify(e.struct);if(n)return"struct."+n}return null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description)?"description: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Field)return e;var t=new s.dataform.Field;if(null!=e.name&&(t.name=String(e.name)),e.flags){if(!Array.isArray(e.flags))throw TypeError(".dataform.Field.flags: array expected");t.flags=[];for(var r=0;r<e.flags.length;++r)switch(e.flags[r]){default:if("number"==typeof e.flags[r]){t.flags[r]=e.flags[r];break}case"UNKNOWN_FLAG":case 0:t.flags[r]=0;break;case"REPEATED":case 1:t.flags[r]=1}}switch(e.primitive){default:if("number"==typeof e.primitive){t.primitive=e.primitive;break}break;case"UNKNOWN":case 0:t.primitive=0;break;case"INTEGER":case 1:t.primitive=1;break;case"FLOAT":case 2:t.primitive=2;break;case"NUMERIC":case 5:t.primitive=5;break;case"BOOLEAN":case 3:t.primitive=3;break;case"STRING":case 4:t.primitive=4;break;case"DATE":case 6:t.primitive=6;break;case"DATETIME":case 7:t.primitive=7;break;case"TIMESTAMP":case 8:t.primitive=8;break;case"TIME":case 9:t.primitive=9;break;case"BYTES":case 10:t.primitive=10;break;case"ANY":case 11:t.primitive=11;break;case"GEOGRAPHY":case 12:t.primitive=12}if(null!=e.struct){if("object"!=typeof e.struct)throw TypeError(".dataform.Field.struct: object expected");t.struct=s.dataform.Fields.fromObject(e.struct)}return null!=e.description&&(t.description=String(e.description)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.flags=[]),t.defaults&&(r.name="",r.description=""),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.struct&&e.hasOwnProperty("struct")&&(r.struct=s.dataform.Fields.toObject(e.struct,t),t.oneofs&&(r.type="struct")),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),e.flags&&e.flags.length){r.flags=[];for(var n=0;n<e.flags.length;++n)r.flags[n]=t.enums===String?void 0===s.dataform.Field.Flag[e.flags[n]]?e.flags[n]:s.dataform.Field.Flag[e.flags[n]]:e.flags[n]}return null!=e.primitive&&e.hasOwnProperty("primitive")&&(r.primitive=t.enums===String?void 0===s.dataform.Field.Primitive[e.primitive]?e.primitive:s.dataform.Field.Primitive[e.primitive]:e.primitive,t.oneofs&&(r.type="primitive")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Field"},t.Primitive=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="INTEGER"]=1,t[e[2]="FLOAT"]=2,t[e[5]="NUMERIC"]=5,t[e[3]="BOOLEAN"]=3,t[e[4]="STRING"]=4,t[e[6]="DATE"]=6,t[e[7]="DATETIME"]=7,t[e[8]="TIMESTAMP"]=8,t[e[9]="TIME"]=9,t[e[10]="BYTES"]=10,t[e[11]="ANY"]=11,t[e[12]="GEOGRAPHY"]=12,t}(),t.Flag=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN_FLAG"]=0,t[e[1]="REPEATED"]=1,t}(),t}(),n.Fields=function(){function t(e){if(this.fields=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.fields=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.fields&&e.fields.length)for(var r=0;r<e.fields.length;++r)s.dataform.Field.encode(e.fields[r],t.uint32(10).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Fields;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.fields&&n.fields.length||(n.fields=[]),n.fields.push(s.dataform.Field.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.fields&&e.hasOwnProperty("fields")){if(!Array.isArray(e.fields))return"fields: array expected";for(var t=0;t<e.fields.length;++t){var r=s.dataform.Field.verify(e.fields[t]);if(r)return"fields."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.Fields)return e;var t=new s.dataform.Fields;if(e.fields){if(!Array.isArray(e.fields))throw TypeError(".dataform.Fields.fields: array expected");t.fields=[];for(var r=0;r<e.fields.length;++r){if("object"!=typeof e.fields[r])throw TypeError(".dataform.Fields.fields: object expected");t.fields[r]=s.dataform.Field.fromObject(e.fields[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.fields=[]),e.fields&&e.fields.length){r.fields=[];for(var n=0;n<e.fields.length;++n)r.fields[n]=s.dataform.Field.toObject(e.fields[n],t)}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Fields"},t}(),n.TableMetadata=function(){function t(e){if(this.fields=[],this.labels={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.type=0,t.prototype.fields=a.emptyArray,t.prototype.description="",t.prototype.labels=a.emptyObject,t.prototype.lastUpdatedMillis=0,t.prototype.bigquery=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(10).fork()).ldelim(),null!=e.fields&&e.fields.length)for(var r=0;r<e.fields.length;++r)s.dataform.Field.encode(e.fields[r],t.uint32(26).fork()).ldelim();if(null!=e.lastUpdatedMillis&&Object.hasOwnProperty.call(e,"lastUpdatedMillis")&&t.uint32(32).int64(e.lastUpdatedMillis),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(42).string(e.description),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(48).int32(e.type),null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.uint32(58).fork().uint32(10).string(n[r]).uint32(18).string(e.labels[n[r]]).ldelim()}return null!=e.bigquery&&Object.hasOwnProperty.call(e,"bigquery")&&s.dataform.TableMetadata.BigQuery.encode(e.bigquery,t.uint32(66).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.TableMetadata;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.target=s.dataform.Target.decode(e,e.uint32());break;case 6:l.type=e.int32();break;case 3:l.fields&&l.fields.length||(l.fields=[]),l.fields.push(s.dataform.Field.decode(e,e.uint32()));break;case 5:l.description=e.string();break;case 7:l.labels===a.emptyObject&&(l.labels={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;){var p=e.uint32();switch(p>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.labels[r]=n;break;case 4:l.lastUpdatedMillis=e.int64();break;case 8:l.bigquery=s.dataform.TableMetadata.BigQuery.decode(e,e.uint32());break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:}if(null!=e.fields&&e.hasOwnProperty("fields")){if(!Array.isArray(e.fields))return"fields: array expected";for(var t=0;t<e.fields.length;++t){var r;if(r=s.dataform.Field.verify(e.fields[t]))return"fields."+r}}if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.labels&&e.hasOwnProperty("labels")){if(!a.isObject(e.labels))return"labels: object expected";var n=Object.keys(e.labels);for(t=0;t<n.length;++t)if(!a.isString(e.labels[n[t]]))return"labels: string{k:string} expected"}return null!=e.lastUpdatedMillis&&e.hasOwnProperty("lastUpdatedMillis")&&!(a.isInteger(e.lastUpdatedMillis)||e.lastUpdatedMillis&&a.isInteger(e.lastUpdatedMillis.low)&&a.isInteger(e.lastUpdatedMillis.high))?"lastUpdatedMillis: integer|Long expected":null!=e.bigquery&&e.hasOwnProperty("bigquery")&&(r=s.dataform.TableMetadata.BigQuery.verify(e.bigquery))?"bigquery."+r:null},t.fromObject=function(e){if(e instanceof s.dataform.TableMetadata)return e;var t=new s.dataform.TableMetadata;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.TableMetadata.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNKNOWN":case 0:t.type=0;break;case"TABLE":case 1:t.type=1;break;case"VIEW":case 2:t.type=2}if(e.fields){if(!Array.isArray(e.fields))throw TypeError(".dataform.TableMetadata.fields: array expected");t.fields=[];for(var r=0;r<e.fields.length;++r){if("object"!=typeof e.fields[r])throw TypeError(".dataform.TableMetadata.fields: object expected");t.fields[r]=s.dataform.Field.fromObject(e.fields[r])}}if(null!=e.description&&(t.description=String(e.description)),e.labels){if("object"!=typeof e.labels)throw TypeError(".dataform.TableMetadata.labels: object expected");t.labels={};var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.labels[n[r]]=String(e.labels[n[r]])}if(null!=e.lastUpdatedMillis&&(a.Long?(t.lastUpdatedMillis=a.Long.fromValue(e.lastUpdatedMillis)).unsigned=!1:"string"==typeof e.lastUpdatedMillis?t.lastUpdatedMillis=parseInt(e.lastUpdatedMillis,10):"number"==typeof e.lastUpdatedMillis?t.lastUpdatedMillis=e.lastUpdatedMillis:"object"==typeof e.lastUpdatedMillis&&(t.lastUpdatedMillis=new a.LongBits(e.lastUpdatedMillis.low>>>0,e.lastUpdatedMillis.high>>>0).toNumber())),null!=e.bigquery){if("object"!=typeof e.bigquery)throw TypeError(".dataform.TableMetadata.bigquery: object expected");t.bigquery=s.dataform.TableMetadata.BigQuery.fromObject(e.bigquery)}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.arrays||t.defaults)&&(n.fields=[]),(t.objects||t.defaults)&&(n.labels={}),t.defaults&&(n.target=null,n.lastUpdatedMillis=0,n.description="",n.type=t.enums===String?"UNKNOWN":0,n.bigquery=null),null!=e.target&&e.hasOwnProperty("target")&&(n.target=s.dataform.Target.toObject(e.target,t)),e.fields&&e.fields.length){n.fields=[];for(var o=0;o<e.fields.length;++o)n.fields[o]=s.dataform.Field.toObject(e.fields[o],t)}if(null!=e.lastUpdatedMillis&&e.hasOwnProperty("lastUpdatedMillis")&&("number"==typeof e.lastUpdatedMillis?n.lastUpdatedMillis=t.longs===String?String(e.lastUpdatedMillis):e.lastUpdatedMillis:n.lastUpdatedMillis=t.longs===String?a.Long.prototype.toString.call(e.lastUpdatedMillis):t.longs===Number?new a.LongBits(e.lastUpdatedMillis.low>>>0,e.lastUpdatedMillis.high>>>0).toNumber():e.lastUpdatedMillis),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===s.dataform.TableMetadata.Type[e.type]?e.type:s.dataform.TableMetadata.Type[e.type]:e.type),e.labels&&(r=Object.keys(e.labels)).length)for(n.labels={},o=0;o<r.length;++o)n.labels[r[o]]=e.labels[r[o]];return null!=e.bigquery&&e.hasOwnProperty("bigquery")&&(n.bigquery=s.dataform.TableMetadata.BigQuery.toObject(e.bigquery,t)),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.TableMetadata"},t.Type=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="TABLE"]=1,t[e[2]="VIEW"]=2,t}(),t.BigQuery=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.hasStreamingBuffer=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.hasStreamingBuffer&&Object.hasOwnProperty.call(e,"hasStreamingBuffer")&&t.uint32(8).bool(e.hasStreamingBuffer),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.TableMetadata.BigQuery;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.hasStreamingBuffer=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.hasStreamingBuffer&&e.hasOwnProperty("hasStreamingBuffer")&&"boolean"!=typeof e.hasStreamingBuffer?"hasStreamingBuffer: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.TableMetadata.BigQuery)return e;var t=new s.dataform.TableMetadata.BigQuery;return null!=e.hasStreamingBuffer&&(t.hasStreamingBuffer=Boolean(e.hasStreamingBuffer)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.hasStreamingBuffer=!1),null!=e.hasStreamingBuffer&&e.hasOwnProperty("hasStreamingBuffer")&&(r.hasStreamingBuffer=e.hasStreamingBuffer),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.TableMetadata.BigQuery"},t}(),t}(),n.BigQuery=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.projectId="",t.prototype.credentials="",t.prototype.location="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.projectId&&Object.hasOwnProperty.call(e,"projectId")&&t.uint32(10).string(e.projectId),null!=e.credentials&&Object.hasOwnProperty.call(e,"credentials")&&t.uint32(26).string(e.credentials),null!=e.location&&Object.hasOwnProperty.call(e,"location")&&t.uint32(34).string(e.location),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.BigQuery;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.projectId=e.string();break;case 3:n.credentials=e.string();break;case 4:n.location=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.projectId&&e.hasOwnProperty("projectId")&&!a.isString(e.projectId)?"projectId: string expected":null!=e.credentials&&e.hasOwnProperty("credentials")&&!a.isString(e.credentials)?"credentials: string expected":null!=e.location&&e.hasOwnProperty("location")&&!a.isString(e.location)?"location: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.BigQuery)return e;var t=new s.dataform.BigQuery;return null!=e.projectId&&(t.projectId=String(e.projectId)),null!=e.credentials&&(t.credentials=String(e.credentials)),null!=e.location&&(t.location=String(e.location)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.projectId="",r.credentials="",r.location=""),null!=e.projectId&&e.hasOwnProperty("projectId")&&(r.projectId=e.projectId),null!=e.credentials&&e.hasOwnProperty("credentials")&&(r.credentials=e.credentials),null!=e.location&&e.hasOwnProperty("location")&&(r.location=e.location),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.BigQuery"},t}(),n),s})?n.apply(t,o):n)||(e.exports=i)},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(26),i=n(r(4)),a=r(1);t.nativeRequire=require,t.matchPatterns=function(e,t){const r=[];return e.forEach(e=>{if(e.includes("."))t.includes(e)&&r.push(e);else{const n=t.filter(t=>e===t.split(".").slice(-1)[0]);if(0===n.length)return;if(n.length>1)throw new Error(u(e,n));r.push(n[0])}}),r},t.getCallerFile=function(e){let t;const r=function(){const e=Error.stackTraceLimit,t=Error.prepareStackTrace;try{return Error.stackTraceLimit=Number.POSITIVE_INFINITY,Error.prepareStackTrace=(e,t)=>t,(new Error).stack}finally{Error.stackTraceLimit=e,Error.prepareStackTrace=t}}();for(;r.length;){const n=r.shift().getFileName();if(n&&(n.includes(e)&&!n.includes("node_modules")&&(t=n,n.includes("definitions"+i.separator)||n.includes("models"+i.separator))))break}if(!t)throw new Error("Unable to find valid caller file; please report this issue.");return i.relativePath(t,e)},t.graphHasErrors=function(e){var t;return(null===(t=e.graphErrors)||void 0===t?void 0:t.compilationErrors.length)>0};const s="Invalid input. Accepted inputs include: a single object containing an (optional) 'database', (optional) 'schema', and 'name', or 1-3 inputs consisting of an (optional) database, (optional) schema, and 'name'.";function l(e){return"string"==typeof e?a.dataform.Target.create({name:e}):e instanceof a.dataform.ActionConfig.Target?a.dataform.Target.create({name:e.name,schema:e.dataset,database:e.project}):a.dataform.Target.create(e)}function c(e){return"string"==typeof e?e:JSON.stringify(e)}function u(e,t){const r="string"==typeof t[0]?t:t.map(e=>`${e.getTarget().schema}.${e.getTarget().name}`);return`Ambiguous Action name: ${c(e)}. Did you mean one of: ${r.join(", ")}.`}function p(e,t){switch(e){case"table":return a.dataform.TableType.TABLE;case"incremental":return a.dataform.TableType.INCREMENTAL;case"view":return a.dataform.TableType.VIEW;default:if(t)throw new Error("Unexpected table type: "+e);return a.dataform.TableType.UNKNOWN_TYPE}}function d(e){return a.dataform.TableType[e].toLowerCase()}t.toResolvable=function(e,t=[]){if(Array.isArray(e)&&t.length>0)throw new Error(s);if(0===t.length&&!Array.isArray(e))return e;const r=Array.isArray(e)?e.reverse():[e,...t].reverse();if(!function(e){if(e.some(e=>"string"!=typeof e))return!1;return e.length>0&&e.length<=3}(r))throw new Error(s);const[n,o,i]=r;return{database:i,schema:o,name:n}},t.resolvableAsTarget=l,t.stringifyResolvable=c,t.ambiguousActionNameMsg=u,t.target=function(e,t,r,n){return a.dataform.Target.create({name:t,schema:r||e.defaultSchema||void 0,database:n||e.defaultDatabase||void 0})},t.strictKeysOf=function(){return e=>e},t.checkExcessProperties=function(e,t,r,n){const o=Object.keys(t).filter(e=>!r.includes(e));o.length>0&&e(new Error(`Unexpected property "${o[0]}"${n?" in "+n:""}. Supported properties are: ${JSON.stringify(r)}`))},t.validateQueryString=function(e,t,r){";"===(null==t?void 0:t.trim().slice(-1))&&e.compileError(new Error("Semi-colons are not allowed at the end of SQL statements."),r)},t.tableTypeStringToEnum=p,t.tableTypeEnumToString=d,t.setOrValidateTableEnumType=function(e){let t=null;if(""!==e.type&&void 0!==e.type&&(t=p(e.type,!0)),e.enumType===a.dataform.TableType.UNKNOWN_TYPE||void 0===e.enumType)e.enumType=t;else if(null!==t&&e.enumType!==t)throw new Error(`Table str type "${e.type}" and enumType "${d(e.enumType)}" are not equivalent.`)},t.extractActionDetailsFromFileName=function(e){const t=i.basename(e);return{fileExtension:i.fileExtension(e),fileNameAsTargetName:t}},t.configTargetToCompiledGraphTarget=function(e){const t={name:e.name};return e.project&&(t.database=e.project),e.dataset&&(t.schema=e.dataset),e.hasOwnProperty("includeDependentAssertions")&&(t.includeDependentAssertions=e.includeDependentAssertions),a.dataform.Target.create(t)},t.actionConfigToCompiledGraphTarget=function(e){const t=a.dataform.Target.create({name:e.name});return"project"in e&&void 0!==e.project&&(t.database=e.project),"location"in e&&void 0!==e.location&&(t.schema=e.location),"dataset"in e&&void 0!==e.dataset&&(t.schema=e.dataset),t},t.resolveActionsConfigFilename=function(e,t){return i.normalize(i.join(i.dirName(t),e))},t.checkAssertionsForDependency=function(e,t){const r=l(t);r.hasOwnProperty("includeDependentAssertions")||e instanceof o.DataPreparation||(r.includeDependentAssertions=e.dependOnDependencyAssertions);const n=e.session.compilationSql().resolveTarget(r);if(!e.includeAssertionsForDependency.has(n)||e.includeAssertionsForDependency.get(n)===r.includeDependentAssertions)return e.includeAssertionsForDependency.set(n,r.includeDependentAssertions),r;e.session.compileError(`Conflicting "includeDependentAssertions" properties are not allowed. Dependency ${r.name} has different values set for this property.`,e.getFileName(),e.getTarget())}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(51);var o;function i(e,t){return e===o.SHOW_DOCS_LINK?` See https://dataform-co.github.io/dataform/docs/configs-reference#${t.getTypeUrl("").replace(/\./g,"-").replace(/\//,"")} for allowed properties.`:""}function a(e,t={}){return function(e){return n.util.base64.encode(e,0,e.length)}(e.encode(e.create(t)).finish())}!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.SUGGEST_REPORTING_TO_DATAFORM_TEAM=1]="SUGGEST_REPORTING_TO_DATAFORM_TEAM",e[e.SHOW_DOCS_LINK=2]="SHOW_DOCS_LINK"}(o=t.VerifyProtoErrorBehaviour||(t.VerifyProtoErrorBehaviour={})),t.verifyObjectMatchesProto=function(e,t,r=o.DEFAULT){if(Array.isArray(t))throw ReferenceError("Expected a top-level object, but found an array");const n=e.create(t);return function t(n,a){Object.entries(n).forEach(([n,s])=>{const l=a[n];if(typeof l!=typeof s){if(Array.isArray(s)&&0===s.length)return;if(!s)throw ReferenceError(`Unexpected empty value for "${n}".`+i(r,e));if("object"==typeof s&&0===Object.keys(s).length)return;if(r===o.SUGGEST_REPORTING_TO_DATAFORM_TEAM)throw ReferenceError(`Unexpected property "${n}" for "${e.getTypeUrl("").replace("/","")}", please report this to the Dataform team at https://github.com/dataform-co/dataform/issues.`);throw ReferenceError(`Unexpected property "${n}", or property value type of "${typeof s}" is incorrect.`+i(r,e))}"object"==typeof s&&t(s,l)})}(t,e.toObject(n)),n},t.encode64=a,t.decode64=function(e,t){return t?e.decode(function(e){const t=new Uint8Array(n.util.base64.length(e));return n.util.base64.decode(e,t,0),t}(t)):e.create()},t.equals=function(e,t,r){return a(e,t)===a(e,r)},t.deepClone=function(e,t){return e.fromObject(e.toObject(e.create(t)))}},function(e,t,r){"use strict";function n(e){return e.split(t.separator).slice(-1)[0]}function o(e){const t=n(e);return t.substring(0,t.lastIndexOf("."))}Object.defineProperty(t,"__esModule",{value:!0}),t.separator="undefined"!=typeof process&&"win32"===process.platform?"\\":"/",t.relativePath=function(e,r){if(0===r.length)return e;const n=e.substr(r.length);return n.startsWith(t.separator)?n.substr(1):n},t.filename=n,t.basename=o,t.dirName=function(e){return e.slice(0,e.lastIndexOf(t.separator))},t.join=function(...e){return e.map(e=>(e.startsWith(t.separator)&&(e=e.slice(1)),e.endsWith(t.separator)&&(e=e.slice(0,-1)),e)).join(t.separator)},t.escapedBasename=function(e){return o(e).replace(/\\/g,"\\\\")},t.fileExtension=function(e){return e.split(".").slice(-1)[0]},t.normalize=function(e){const t=[];let r=0;for(const n of e.split("/").filter(e=>!!e&&"."!==e))".."===n?0===t.length?r++:t.pop():t.push(n);if(e.startsWith("/")){if(0===t.length)return"/";t.unshift("")}else if(t.unshift(...new Array(r).fill("..")),0===t.length)return".";return t.join("/")}},function(e,t,r){"use strict";e.exports=a;var n=r(9);((a.prototype=Object.create(n.prototype)).constructor=a).className="Enum";var o=r(11),i=r(0);function a(e,t,r,o,i,a){if(n.call(this,e,r),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=i||{},this.valuesOptions=a,this.reserved=void 0,t)for(var s=Object.keys(t),l=0;l<s.length;++l)"number"==typeof t[s[l]]&&(this.valuesById[this.values[s[l]]=t[s[l]]]=s[l])}a.fromJSON=function(e,t){var r=new a(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},a.prototype.add=function(e,t,r,n){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return n&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=r||null,this},a.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this},a.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},a.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)}},function(e,t,r){"use strict";var n=t;function o(e,t,r){for(var n=Object.keys(t),o=0;o<n.length;++o)void 0!==e[n[o]]&&r||(e[n[o]]=t[n[o]]);return e}function i(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&o(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}n.asPromise=r(30),n.base64=r(54),n.EventEmitter=r(55),n.float=r(56),n.inquire=r(31),n.utf8=r(57),n.pool=r(58),n.LongBits=r(59),n.isNode=Boolean("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),n.global=n.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=o,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=i,n.ProtocolError=i("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1);t.ActionBuilder=class{constructor(e){this.includeAssertionsForDependency=new Map,this.session=e}applySessionToTarget(e,t,r,o){const i=(null==o?void 0:o.useDefaultAssertionDataset)&&t.assertionSchema||t.defaultSchema,a=n.dataform.Target.create({name:e.name,schema:e.schema||i||void 0,database:e.database||t.defaultDatabase||void 0});return(null==o?void 0:o.validateTarget)&&this.validateTarget(e,r),a}finalizeTarget(e){return n.dataform.Target.create({name:this.session.finalizeName(e.name),schema:e.schema?this.session.finalizeSchema(e.schema):void 0,database:e.database?this.session.finalizeDatabase(e.database):void 0})}generateInlineAssertions(e,t){var r,o,i;const a={uniqueKeyAssertions:[]};(null===(r=e.uniqueKey)||void 0===r?void 0:r.length)&&(null===(o=e.uniqueKeys)||void 0===o?void 0:o.length)&&this.session.compileError(new Error("Specify at most one of 'assertions.uniqueKey' and 'assertions.uniqueKeys'."));let s=e.uniqueKeys.map(e=>n.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.create(e));(null===(i=e.uniqueKey)||void 0===i?void 0:i.length)&&(s=[n.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.create({uniqueKey:e.uniqueKey})]),s&&s.forEach(({uniqueKey:e},r)=>{const o=this.session.assert(`${t.target.schema}_${t.target.name}_assertions_uniqueKey_${r}`,n.dataform.ActionConfig.AssertionConfig.create({filename:t.fileName})).query(r=>this.session.compilationSql().indexAssertion(r.ref(t.target),e));t.tags&&o.tags(t.tags),o.setParentAction(n.dataform.Target.create(t.target)),t.disabled&&o.disabled(),a.uniqueKeyAssertions.push(o)});const l=e.rowConditions||[];if(e.nonNull){("string"==typeof e.nonNull?[e.nonNull]:e.nonNull).forEach(e=>l.push(e+" IS NOT NULL"))}return l&&l.length>0&&(a.rowConditionsAssertion=this.session.assert(`${t.target.schema}_${t.target.name}_assertions_rowConditions`,{filename:t.fileName}).query(e=>this.session.compilationSql().rowConditionsAssertion(e.ref(t.target),l)),a.rowConditionsAssertion.setParentAction(n.dataform.Target.create(t.target)),t.disabled&&a.rowConditionsAssertion.disabled(),t.tags&&a.rowConditionsAssertion.tags(t.tags)),a}validateTarget(e,t){e.name.includes(".")&&this.session.compileError(new Error("Action target names cannot include '.'"),t,e),e.schema.includes(".")&&this.session.compileError(new Error("Action target datasets cannot include '.'"),t,e),e.database.includes(".")&&this.session.compileError(new Error("Action target projects cannot include '.'"),t,e)}},t.checkConfigAdditionalOptionsOverlap=function(e,t){const r=n.dataform.Target.create({database:e.project,schema:e.dataset,name:e.name});e.partitionExpirationDays&&e.additionalOptions.partition_expiration_days&&t.compileError("partitionExpirationDays has been declared twice",e.filename,r),e.requirePartitionFilter&&e.additionalOptions.require_partition_filter&&t.compileError("requirePartitionFilter has been declared twice",e.filename,r)},t.TableType=["table","view","incremental"];t.LegacyConfigConverter=class{static legacyConvertBigQueryOptions(e){let t={};return Object.entries(e).forEach(([e,r])=>{Array.isArray(r)&&0===r.length||"object"==typeof r&&0===Object.entries(r).length||r&&(t=Object.assign(Object.assign({},t),{[e]:r}))}),t}static insertLegacyInlineAssertionsToConfigProto(e){var t,r,o;const i=e;return(null==i?void 0:i.assertions)&&("string"==typeof(null===(t=i.assertions)||void 0===t?void 0:t.uniqueKey)&&(i.assertions.uniqueKey=[i.assertions.uniqueKey]),(null===(o=null===(r=i.assertions.uniqueKeys)||void 0===r?void 0:r[0])||void 0===o?void 0:o.length)>0&&(i.assertions.uniqueKeys=i.assertions.uniqueKeys.map(e=>n.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.create({uniqueKey:e}))),"string"==typeof i.assertions.nonNull&&(i.assertions.nonNull=[i.assertions.nonNull])),i}static insertLegacyBigQueryOptionsToConfigProto(e){const t=e;return(null==t?void 0:t.bigquery)?(t.bigquery.partitionBy&&(t.partitionBy=t.bigquery.partitionBy,delete t.bigquery.partitionBy),t.bigquery.clusterBy&&(t.clusterBy=t.bigquery.clusterBy,delete t.bigquery.clusterBy),t.bigquery.updatePartitionFilter&&(t.updatePartitionFilter=t.bigquery.updatePartitionFilter,delete t.bigquery.updatePartitionFilter),t.bigquery.labels&&(t.labels=t.bigquery.labels,delete t.bigquery.labels),t.bigquery.partitionExpirationDays&&(t.partitionExpirationDays=t.bigquery.partitionExpirationDays,delete t.bigquery.partitionExpirationDays),t.bigquery.requirePartitionFilter&&(t.requirePartitionFilter=t.bigquery.requirePartitionFilter,delete t.bigquery.requirePartitionFilter),t.bigquery.additionalOptions&&(t.additionalOptions=t.bigquery.additionalOptions,delete t.bigquery.additionalOptions),0===Object.keys(t.bigquery).length&&delete t.bigquery,t):t}}},function(e,t,r){"use strict";e.exports=c;var n=r(9);((c.prototype=Object.create(n.prototype)).constructor=c).className="Field";var o,i=r(5),a=r(10),s=r(0),l=/^required|optional|repeated$/;function c(e,t,r,o,i,c,u){if(s.isObject(o)?(u=i,c=o,o=i=void 0):s.isObject(i)&&(u=c,c=i,i=void 0),n.call(this,e,c),!s.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!s.isString(r))throw TypeError("type must be a string");if(void 0!==o&&!l.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!s.isString(i))throw TypeError("extend must be a string");"proto3_optional"===o&&(o="optional"),this.rule=o&&"optional"!==o?o:void 0,this.type=r,this.id=t,this.extend=i||void 0,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!s.Long&&void 0!==a.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=u}c.fromJSON=function(e,t){return new c(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(c.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),c.prototype.setOption=function(e,t,r){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,r)},c.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return s.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},c.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=a.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=s.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;s.base64.test(this.typeDefault)?s.base64.decode(this.typeDefault,e=s.newBuffer(s.base64.length(this.typeDefault)),0):s.utf8.write(this.typeDefault,e=s.newBuffer(s.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=s.emptyObject:this.repeated?this.defaultValue=s.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},c.d=function(e,t,r,n){return"function"==typeof t?t=s.decorateType(t).name:t&&"object"==typeof t&&(t=s.decorateEnum(t).name),function(o,i){s.decorateType(o.constructor).add(new c(i,e,t,r,{default:n}))}},c._configure=function(e){o=e}},function(e,t,r){"use strict";e.exports=i,i.className="ReflectionObject";var n,o=r(0);function i(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(r){var i=n.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var a=i[e];o.setProperty(a,r,t)}else(i={})[e]=o.setProperty({},r,t),n.push(i)}else{var s={};s[e]=t,n.push(s)}return this},i.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){n=e}},function(e,t,r){"use strict";var n=t,o=r(0),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function a(e,t){var r=0,n={};for(t|=0;r<e.length;)n[i[r+t]]=e[r++];return n}n.basic=a([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=a([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o.emptyArray,null]),n.long=a([0,0,0,1,1],7),n.mapKey=a([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=a([1,5,0,0,0,5,5,0,0,0,1,1,0])},function(e,t,r){"use strict";e.exports=p;var n=r(9);((p.prototype=Object.create(n.prototype)).constructor=p).className="Namespace";var o,i,a,s=r(8),l=r(0),c=r(12);function u(e,t){if(e&&e.length){for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON(t);return r}}function p(e,t){n.call(this,e,t),this.nested=void 0,this._nestedArray=null}function d(e){return e._nestedArray=null,e}p.fromJSON=function(e,t){return new p(e,t.options).addJSON(t.nested)},p.arrayToJSON=u,p.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},p.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(p.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=l.toArray(this.nested))}}),p.prototype.toJSON=function(e){return l.toObject(["options",this.options,"nested",u(this.nestedArray,e)])},p.prototype.addJSON=function(e){if(e)for(var t,r=Object.keys(e),n=0;n<r.length;++n)t=e[r[n]],this.add((void 0!==t.fields?o.fromJSON:void 0!==t.values?a.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?s.fromJSON:p.fromJSON)(r[n],t));return this},p.prototype.get=function(e){return this.nested&&this.nested[e]||null},p.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof a)return this.nested[e].values;throw Error("no such enum: "+e)},p.prototype.add=function(e){if(!(e instanceof s&&void 0!==e.extend||e instanceof o||e instanceof c||e instanceof a||e instanceof i||e instanceof p))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof p&&e instanceof p)||t instanceof o||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,n=0;n<r.length;++n)e.add(r[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),d(this)},p.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),d(this)},p.prototype.define=function(e,t){if(l.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof p))throw Error("path conflicts with non-namespace objects")}else r.add(r=new p(n))}return t&&r.addJSON(t),r},p.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof p?e[t++].resolveAll():e[t++].resolve();return this.resolve()},p.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),l.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);if(n){if(1===e.length){if(!t||t.indexOf(n.constructor)>-1)return n}else if(n instanceof p&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var o=0;o<this.nestedArray.length;++o)if(this._nestedArray[o]instanceof p&&(n=this._nestedArray[o].lookup(e,t,!0)))return n;return null===this.parent||r?null:this.parent.lookup(e,t)},p.prototype.lookupType=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such type: "+e);return t},p.prototype.lookupEnum=function(e){var t=this.lookup(e,[a]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},p.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[o,a]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},p.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},p._configure=function(e,t,r){o=e,i=t,a=r}},function(e,t,r){"use strict";e.exports=a;var n=r(9);((a.prototype=Object.create(n.prototype)).constructor=a).className="OneOf";var o=r(8),i=r(0);function a(e,t,r,o){if(Array.isArray(t)||(r=t,t=void 0),n.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function s(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}a.fromJSON=function(e,t){return new a(e,t.oneof,t.options,t.comment)},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},a.prototype.add=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,s(this),this},a.prototype.remove=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},a.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}s(this)},a.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);n.prototype.onRemove.call(this,e)},a.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){i.decorateType(t.constructor).add(new a(r,e)),Object.defineProperty(t,r,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(2)),i=r(1);t.IRecordDescriptorProperties=()=>o.strictKeysOf()(["description","columns","displayName","tags","bigqueryPolicyTags"]);class a{static mapConfigProtoToCompilationProto(e){return e.map(e=>i.dataform.ColumnDescriptor.create({path:e.path,description:e.description,tags:e.tags,bigqueryPolicyTags:e.bigqueryPolicyTags}))}static mapLegacyObjectToConfigProto(e){return Object.keys(e).map(t=>a.mapColumnDescriptionToProto([t],e[t])).flat()}static mapColumnDescriptionToProto(e,t){if("string"==typeof t)return[i.dataform.ColumnDescriptor.create({description:t,path:e})];const r=t?[i.dataform.ActionConfig.ColumnDescriptor.create({path:e,description:t.description,tags:"string"==typeof t.tags?[t.tags]:t.tags,bigqueryPolicyTags:"string"==typeof t.bigqueryPolicyTags?[t.bigqueryPolicyTags]:t.bigqueryPolicyTags})]:[],n=t.columns?Object.keys(t.columns):[];return r.concat(n.map(r=>a.mapColumnDescriptionToProto(e.concat([r]),t.columns[r])).flat())}}t.ColumnDescriptors=a;class s{static mapToColumnProtoArray(e,t){return Object.keys(e).map(r=>s.mapColumnDescriptionToProto([r],e[r],t)).flat()}static mapColumnDescriptionToProto(e,r,n){if("string"==typeof r)return[i.dataform.ColumnDescriptor.create({description:r,path:e})];o.checkExcessProperties(n,r,t.IRecordDescriptorProperties(),e.join(".")+" column descriptor");const a=r?[i.dataform.ColumnDescriptor.create({path:e,description:r.description,displayName:r.displayName,tags:"string"==typeof r.tags?[r.tags]:r.tags,bigqueryPolicyTags:"string"==typeof r.bigqueryPolicyTags?[r.bigqueryPolicyTags]:r.bigqueryPolicyTags})]:[],l=r.columns?Object.keys(r.columns):[];return a.concat(l.map(t=>s.mapColumnDescriptionToProto(e.concat([t]),r.columns[t],n)).flat())}}t.LegacyColumnDescriptors=s},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(7),a=r(15),s=r(16),l=r(13),c=n(r(4)),u=r(2),p=r(1);class d extends i.ActionBuilder{constructor(e,t,r){var n;if(super(e),this.dependOnDependencyAssertions=!1,this.contextablePreOps=[],this.contextablePostOps=[],this.proto=p.dataform.Table.create({type:"incremental",enumType:p.dataform.TableType.INCREMENTAL,disabled:!1,tags:[]}),this.uniqueKeyAssertions=[],this.session=e,this.configPath=r,this.unverifiedConfig=Object.assign({},t),!t)return;const o=this.verifyConfig(t);o.name||(o.name=c.basename(o.filename));const i=u.actionConfigToCompiledGraphTarget(o);return this.proto.target=this.applySessionToTarget(i,e.projectConfig,o.filename,{validateTarget:!0}),this.proto.canonicalTarget=this.applySessionToTarget(i,e.canonicalProjectConfig),r&&(o.filename=u.resolveActionsConfigFilename(o.filename,r),this.query(u.nativeRequire(o.filename).query)),o.filename&&(this.proto.fileName=o.filename),o.dependOnDependencyAssertions&&this.setDependOnDependencyAssertions(o.dependOnDependencyAssertions),o.dependencyTargets&&this.dependencies(o.dependencyTargets.map(e=>u.configTargetToCompiledGraphTarget(p.dataform.ActionConfig.Target.create(e)))),void 0!==o.hermetic&&this.hermetic(o.hermetic),o.disabled&&this.disabled(),o.tags&&this.tags(o.tags),o.description&&this.description(o.description),(null===(n=o.columns)||void 0===n?void 0:n.length)&&this.columns(o.columns.map(e=>p.dataform.ActionConfig.ColumnDescriptor.create(e))),o.project&&this.database(o.project),o.dataset&&this.schema(o.dataset),o.assertions&&this.assertions(p.dataform.ActionConfig.TableAssertionsConfig.create(o.assertions)),o.uniqueKey&&this.uniqueKey(o.uniqueKey),this.protected(o.protected),o.preOperations&&this.preOps(o.preOperations),o.postOperations&&this.postOps(o.postOperations),this.bigquery({partitionBy:o.partitionBy,clusterBy:o.clusterBy,updatePartitionFilter:o.updatePartitionFilter,labels:o.labels,partitionExpirationDays:o.partitionExpirationDays,requirePartitionFilter:o.requirePartitionFilter,additionalOptions:o.additionalOptions}),this.proto.onSchemaChange=this.mapOnSchemaChange(o.onSchemaChange),this}type(e){let t;switch(e){case"table":t=new a.Table(this.session,Object.assign(Object.assign({},this.unverifiedConfig),{type:"table"}),this.configPath);break;case"incremental":return this;case"view":t=new s.View(this.session,Object.assign(Object.assign({},this.unverifiedConfig),{type:"view"}),this.configPath);break;default:throw new Error("Unexpected table type: "+e)}const r=this.session.actions.indexOf(this);if(-1===r)throw Error("Expected pre-existing action, but none found. Please report this to the Dataform team.");this.session.actions[r]=t}query(e){return this.contextableQuery=e,this}where(e){return this.contextableWhere=e,this}preOps(e){return this.contextablePreOps.push(e),this}postOps(e){return this.contextablePostOps.push(e),this}disabled(e=!0){var t;return this.proto.disabled=e,this.uniqueKeyAssertions.forEach(t=>t.disabled(e)),null===(t=this.rowConditionsAssertion)||void 0===t||t.disabled(e),this}protected(e){return this.proto.protected=e,this}uniqueKey(e){this.proto.uniqueKey=e}bigquery(e){e.labels&&Object.keys(e.labels).length>0&&(this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.bigqueryLabels=e.labels);const t=i.LegacyConfigConverter.legacyConvertBigQueryOptions(e);return Object.values(t).length>0&&(this.proto.bigquery=p.dataform.BigQueryOptions.create(t)),this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>this.proto.dependencyTargets.push(u.checkAssertionsForDependency(this,e))),this}hermetic(e){this.proto.hermeticity=e?p.dataform.ActionHermeticity.HERMETIC:p.dataform.ActionHermeticity.NON_HERMETIC}tags(e){var t;return("string"==typeof e?[e]:e).forEach(e=>{this.proto.tags.push(e)}),this.uniqueKeyAssertions.forEach(t=>t.tags(e)),null===(t=this.rowConditionsAssertion)||void 0===t||t.tags(e),this}description(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.description=e,this}columns(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.columns=l.ColumnDescriptors.mapConfigProtoToCompilationProto(e),this}database(e){return this.proto.target=this.applySessionToTarget(p.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{database:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}schema(e){return this.proto.target=this.applySessionToTarget(p.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{schema:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}assertions(e){const t=this.generateInlineAssertions(e,this.proto);return this.uniqueKeyAssertions=t.uniqueKeyAssertions,this.rowConditionsAssertion=t.rowConditionsAssertion,this}setDependOnDependencyAssertions(e){return this.dependOnDependencyAssertions=e,this}getFileName(){return this.proto.fileName}getTarget(){return p.dataform.Target.create(this.proto.target)}compile(){const e=new f(this),t=new f(this,!0);return this.proto.query=e.apply(this.contextableQuery),this.proto.incrementalQuery=t.apply(this.contextableQuery),this.proto.incrementalPreOps=this.contextifyOps(this.contextablePreOps,t),this.proto.incrementalPostOps=this.contextifyOps(this.contextablePostOps,t),this.contextableWhere&&(this.proto.where=e.apply(this.contextableWhere)),this.proto.preOps=this.contextifyOps(this.contextablePreOps,e).filter(e=>!!e.trim()),this.proto.postOps=this.contextifyOps(this.contextablePostOps,e).filter(e=>!!e.trim()),u.validateQueryString(this.session,this.proto.query,this.proto.fileName),u.validateQueryString(this.session,this.proto.incrementalQuery,this.proto.fileName),o.verifyObjectMatchesProto(p.dataform.Table,this.proto,o.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}contextifyOps(e,t){let r=[];return e.forEach(e=>{const n=t.apply(e);r=r.concat("string"==typeof n?[n]:n)}),r}verifyConfig(e){e.type&&(delete e.type,e.dependencies&&(e.dependencyTargets=e.dependencies.map(e=>"string"==typeof e?{name:e}:e),delete e.dependencies),e.database&&(e.project=e.database,delete e.database),e.schema&&(e.dataset=e.schema,delete e.schema),e.fileName&&(e.filename=e.fileName,delete e.fileName),e.columns&&(e.columns=l.ColumnDescriptors.mapLegacyObjectToConfigProto(e.columns)),e=i.LegacyConfigConverter.insertLegacyInlineAssertionsToConfigProto(e),(e=i.LegacyConfigConverter.insertLegacyBigQueryOptionsToConfigProto(e)).bigquery&&u.checkExcessProperties(e=>{throw e},e.bigquery,u.strictKeysOf()(["partitionBy","clusterBy","updatePartitionFilter","labels","partitionExpirationDays","requirePartitionFilter","additionalOptions"]),"BigQuery table config"),void 0!==e.protected&&null!==e.protected||(e.protected=!0));const t=o.verifyObjectMatchesProto(p.dataform.ActionConfig.IncrementalTableConfig,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK);return t.additionalOptions&&i.checkConfigAdditionalOptionsOverlap(t,this.session),t}mapOnSchemaChange(e){if(!e)return p.dataform.OnSchemaChange.IGNORE;if("number"==typeof e)switch(e){case p.dataform.ActionConfig.OnSchemaChange.IGNORE:return p.dataform.OnSchemaChange.IGNORE;case p.dataform.ActionConfig.OnSchemaChange.FAIL:return p.dataform.OnSchemaChange.FAIL;case p.dataform.ActionConfig.OnSchemaChange.EXTEND:return p.dataform.OnSchemaChange.EXTEND;case p.dataform.ActionConfig.OnSchemaChange.SYNCHRONIZE:return p.dataform.OnSchemaChange.SYNCHRONIZE;default:throw new Error(`OnSchemaChange value "${e}" is not supported`)}switch(e.toString().toUpperCase()){case"IGNORE":return p.dataform.OnSchemaChange.IGNORE;case"FAIL":return p.dataform.OnSchemaChange.FAIL;case"EXTEND":return p.dataform.OnSchemaChange.EXTEND;case"SYNCHRONIZE":return p.dataform.OnSchemaChange.SYNCHRONIZE;default:throw new Error(`OnSchemaChange value "${e}" is not supported`)}}}t.IncrementalTable=d;class f{constructor(e,t=!1){this.incrementalTable=e,this.isIncremental=t}self(){return this.resolve(this.incrementalTable.getTarget())}name(){return this.incrementalTable.session.finalizeName(this.incrementalTable.getTarget().name)}ref(e,...t){return e=u.toResolvable(e,t),u.resolvableAsTarget(e)?(this.incrementalTable.dependencies(e),this.resolve(e)):(this.incrementalTable.session.compileError(new Error("Action name is not specified")),"")}resolve(e,...t){return this.incrementalTable.session.resolve(e,...t)}schema(){return this.incrementalTable.session.finalizeSchema(this.incrementalTable.getTarget().schema)}database(){return this.incrementalTable.getTarget().database?this.incrementalTable.session.finalizeDatabase(this.incrementalTable.getTarget().database):(this.incrementalTable.session.compileError(new Error("Warehouse does not support multiple databases")),"")}where(e){return this.incrementalTable.where(e),""}when(e,t,r=""){return e?t:r}incremental(){return!!this.isIncremental}preOps(e){return this.incrementalTable.preOps(e),""}postOps(e){return this.incrementalTable.postOps(e),""}disabled(){return this.incrementalTable.disabled(),""}bigquery(e){return this.incrementalTable.bigquery(e),""}dependencies(e){return this.incrementalTable.dependencies(e),""}apply(e){return"function"==typeof e?e(this):e}tags(e){return this.incrementalTable.tags(e),""}}t.IncrementalTableContext=f},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(7),a=r(14),s=r(16),l=r(13),c=n(r(4)),u=r(2),p=r(1);class d extends i.ActionBuilder{constructor(e,t,r){var n;if(super(e),this.dependOnDependencyAssertions=!1,this.contextablePreOps=[],this.contextablePostOps=[],this.proto=p.dataform.Table.create({type:"table",enumType:p.dataform.TableType.TABLE,disabled:!1,tags:[]}),this.uniqueKeyAssertions=[],this.session=e,this.configPath=r,this.unverifiedConfig=Object.assign({},t),!t)return;const o=this.verifyConfig(t);o.name||(o.name=c.basename(o.filename));const i=u.actionConfigToCompiledGraphTarget(o);return this.proto.target=this.applySessionToTarget(i,e.projectConfig,o.filename,{validateTarget:!0}),this.proto.canonicalTarget=this.applySessionToTarget(i,e.canonicalProjectConfig),r&&(o.filename=u.resolveActionsConfigFilename(o.filename,r),this.query(u.nativeRequire(o.filename).query)),o.filename&&(this.proto.fileName=o.filename),o.dependOnDependencyAssertions&&this.setDependOnDependencyAssertions(o.dependOnDependencyAssertions),o.dependencyTargets&&this.dependencies(o.dependencyTargets),void 0!==o.hermetic&&this.hermetic(o.hermetic),o.disabled&&this.disabled(),o.tags&&this.tags(o.tags),o.description&&this.description(o.description),(null===(n=o.columns)||void 0===n?void 0:n.length)&&this.columns(o.columns.map(e=>p.dataform.ActionConfig.ColumnDescriptor.create(e))),o.assertions&&this.assertions(p.dataform.ActionConfig.TableAssertionsConfig.create(o.assertions)),o.preOperations&&this.preOps(o.preOperations),o.postOperations&&this.postOps(o.postOperations),this.bigquery({partitionBy:o.partitionBy,clusterBy:o.clusterBy,labels:o.labels,partitionExpirationDays:o.partitionExpirationDays,requirePartitionFilter:o.requirePartitionFilter,additionalOptions:o.additionalOptions}),this}type(e){let t;switch(e){case"table":return this;case"incremental":t=new a.IncrementalTable(this.session,Object.assign(Object.assign({},this.unverifiedConfig),{type:"incremental"}),this.configPath);break;case"view":t=new s.View(this.session,Object.assign(Object.assign({},this.unverifiedConfig),{type:"view"}),this.configPath);break;default:throw new Error("Unexpected table type: "+e)}const r=this.session.actions.indexOf(this);if(-1===r)throw Error("Expected pre-existing action, but none found. Please report this to the Dataform team.");this.session.actions[r]=t}query(e){return this.contextableQuery=e,this}where(e){return this.contextableWhere=e,this}preOps(e){return this.contextablePreOps.push(e),this}postOps(e){return this.contextablePostOps.push(e),this}disabled(e=!0){var t;return this.proto.disabled=e,this.uniqueKeyAssertions.forEach(t=>t.disabled(e)),null===(t=this.rowConditionsAssertion)||void 0===t||t.disabled(e),this}bigquery(e){e.labels&&Object.keys(e.labels).length>0&&(this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.bigqueryLabels=e.labels);const t=i.LegacyConfigConverter.legacyConvertBigQueryOptions(e);return Object.values(t).length>0&&(this.proto.bigquery=p.dataform.BigQueryOptions.create(t)),this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>{const t=u.checkAssertionsForDependency(this,e);t&&this.proto.dependencyTargets.push(t)}),this}hermetic(e){this.proto.hermeticity=e?p.dataform.ActionHermeticity.HERMETIC:p.dataform.ActionHermeticity.NON_HERMETIC}tags(e){var t;return("string"==typeof e?[e]:e).forEach(e=>{this.proto.tags.push(e)}),this.uniqueKeyAssertions.forEach(t=>t.tags(e)),null===(t=this.rowConditionsAssertion)||void 0===t||t.tags(e),this}description(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.description=e,this}columns(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.columns=l.ColumnDescriptors.mapConfigProtoToCompilationProto(e),this}database(e){return this.proto.target=this.applySessionToTarget(p.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{database:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}schema(e){return this.proto.target=this.applySessionToTarget(p.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{schema:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}assertions(e){const t=this.generateInlineAssertions(e,this.proto);return this.uniqueKeyAssertions=t.uniqueKeyAssertions,this.rowConditionsAssertion=t.rowConditionsAssertion,this}setDependOnDependencyAssertions(e){return this.dependOnDependencyAssertions=e,this}getFileName(){return this.proto.fileName}getTarget(){return p.dataform.Target.create(this.proto.target)}compile(){const e=new f(this),t=new f(this,!0);return this.proto.query=e.apply(this.contextableQuery),this.proto.enumType===p.dataform.TableType.INCREMENTAL&&(this.proto.incrementalQuery=t.apply(this.contextableQuery),this.proto.incrementalPreOps=this.contextifyOps(this.contextablePreOps,t),this.proto.incrementalPostOps=this.contextifyOps(this.contextablePostOps,t)),this.contextableWhere&&(this.proto.where=e.apply(this.contextableWhere)),this.proto.preOps=this.contextifyOps(this.contextablePreOps,e).filter(e=>!!e.trim()),this.proto.postOps=this.contextifyOps(this.contextablePostOps,e).filter(e=>!!e.trim()),u.validateQueryString(this.session,this.proto.query,this.proto.fileName),u.validateQueryString(this.session,this.proto.incrementalQuery,this.proto.fileName),o.verifyObjectMatchesProto(p.dataform.Table,this.proto,o.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}contextifyOps(e,t){let r=[];return e.forEach(e=>{const n=t.apply(e);r=r.concat("string"==typeof n?[n]:n)}),r}verifyConfig(e){if(e.type){if("table"!==e.type)throw ReferenceError('Unexpected type for Table; want "table", got '+e.type);delete e.type,e.dependencies&&(e.dependencyTargets=e.dependencies.map(e=>"string"==typeof e?{name:e}:e),delete e.dependencies),e.database&&(e.project=e.database,delete e.database),e.schema&&(e.dataset=e.schema,delete e.schema),e.fileName&&(e.filename=e.fileName,delete e.fileName),e.columns&&(e.columns=l.ColumnDescriptors.mapLegacyObjectToConfigProto(e.columns)),e=i.LegacyConfigConverter.insertLegacyInlineAssertionsToConfigProto(e),(e=i.LegacyConfigConverter.insertLegacyBigQueryOptionsToConfigProto(e)).bigquery&&u.checkExcessProperties(e=>{throw e},e.bigquery,u.strictKeysOf()(["partitionBy","clusterBy","updatePartitionFilter","labels","partitionExpirationDays","requirePartitionFilter","additionalOptions"]),"BigQuery table config")}const t=o.verifyObjectMatchesProto(p.dataform.ActionConfig.TableConfig,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK);return t.partitionBy||!t.partitionExpirationDays&&!t.requirePartitionFilter||this.session.compileError("requirePartitionFilter/partitionExpirationDays are not valid for non partitioned BigQuery tables",t.filename,p.dataform.Target.create({database:t.project,schema:t.dataset,name:t.name})),t.additionalOptions&&i.checkConfigAdditionalOptionsOverlap(t,this.session),t}}t.Table=d;class f{constructor(e,t=!1){this.table=e,this.isIncremental=t}self(){return this.resolve(this.table.getTarget())}name(){return this.table.session.finalizeName(this.table.getTarget().name)}ref(e,...t){return e=u.toResolvable(e,t),u.resolvableAsTarget(e)?(this.table.dependencies(e),this.resolve(e)):(this.table.session.compileError(new Error("Action name is not specified")),"")}resolve(e,...t){return this.table.session.resolve(e,...t)}schema(){return this.table.session.finalizeSchema(this.table.getTarget().schema)}database(){return this.table.getTarget().database?this.table.session.finalizeDatabase(this.table.getTarget().database):(this.table.session.compileError(new Error("Warehouse does not support multiple databases")),"")}type(e){return this.table.type(e),""}where(e){return this.table.where(e),""}when(e,t,r=""){return e?t:r}incremental(){return!!this.isIncremental}preOps(e){return this.table.preOps(e),""}postOps(e){return this.table.postOps(e),""}disabled(){return this.table.disabled(),""}bigquery(e){return this.table.bigquery(e),""}dependencies(e){return this.table.dependencies(e),""}apply(e){return"function"==typeof e?e(this):e}tags(e){return this.table.tags(e),""}}t.TableContext=f},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(7),a=r(14),s=r(15),l=r(13),c=n(r(4)),u=r(2),p=r(1);class d extends i.ActionBuilder{constructor(e,t,r){var n;if(super(e),this.dependOnDependencyAssertions=!1,this.contextablePreOps=[],this.contextablePostOps=[],this.proto=p.dataform.Table.create({type:"view",enumType:p.dataform.TableType.VIEW,disabled:!1,tags:[]}),this.uniqueKeyAssertions=[],this.session=e,this.configPath=r,this.unverifiedConfig=Object.assign({},t),!t)return;const o=this.verifyConfig(t);o.name||(o.name=c.basename(o.filename));const i=u.actionConfigToCompiledGraphTarget(o);return this.proto.target=this.applySessionToTarget(i,e.projectConfig,o.filename,{validateTarget:!0}),this.proto.canonicalTarget=this.applySessionToTarget(i,e.canonicalProjectConfig),r&&(o.filename=u.resolveActionsConfigFilename(o.filename,r),this.query(u.nativeRequire(o.filename).query)),o.filename&&(this.proto.fileName=o.filename),o.dependOnDependencyAssertions&&this.setDependOnDependencyAssertions(o.dependOnDependencyAssertions),o.dependencyTargets&&this.dependencies(o.dependencyTargets.map(e=>u.configTargetToCompiledGraphTarget(p.dataform.ActionConfig.Target.create(e)))),void 0!==o.hermetic&&this.hermetic(o.hermetic),o.disabled&&this.disabled(),o.tags&&this.tags(o.tags),o.description&&this.description(o.description),(null===(n=o.columns)||void 0===n?void 0:n.length)&&this.columns(o.columns.map(e=>p.dataform.ActionConfig.ColumnDescriptor.create(e))),o.project&&this.database(o.project),o.dataset&&this.schema(o.dataset),o.assertions&&this.assertions(p.dataform.ActionConfig.TableAssertionsConfig.create(o.assertions)),o.materialized&&this.materialized(o.materialized),o.preOperations&&this.preOps(o.preOperations),o.postOperations&&this.postOps(o.postOperations),(Object.keys(o.labels).length||Object.keys(o.additionalOptions).length)&&this.bigquery({labels:o.labels,additionalOptions:o.additionalOptions}),this}type(e){let t;switch(e){case"table":t=new s.Table(this.session,Object.assign(Object.assign({},this.unverifiedConfig),{type:"table"}),this.configPath);break;case"incremental":t=new a.IncrementalTable(this.session,Object.assign(Object.assign({},this.unverifiedConfig),{type:"incremental"}),this.configPath);break;case"view":return this;default:throw new Error("Unexpected table type: "+e)}const r=this.session.actions.indexOf(this);if(-1===r)throw Error("Expected pre-existing action, but none found. Please report this to the Dataform team.");this.session.actions[r]=t}query(e){return this.contextableQuery=e,this}where(e){return this.contextableWhere=e,this}preOps(e){return this.contextablePreOps.push(e),this}postOps(e){return this.contextablePostOps.push(e),this}disabled(e=!0){var t;return this.proto.disabled=e,this.uniqueKeyAssertions.forEach(t=>t.disabled(e)),null===(t=this.rowConditionsAssertion)||void 0===t||t.disabled(e),this}materialized(e){this.proto.materialized=e}bigquery(e){return this.proto.bigquery=p.dataform.BigQueryOptions.create(e),e.labels&&(this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.bigqueryLabels=e.labels),this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>{const t=u.checkAssertionsForDependency(this,e);t&&this.proto.dependencyTargets.push(t)}),this}hermetic(e){this.proto.hermeticity=e?p.dataform.ActionHermeticity.HERMETIC:p.dataform.ActionHermeticity.NON_HERMETIC}tags(e){var t;return("string"==typeof e?[e]:e).forEach(e=>{this.proto.tags.push(e)}),this.uniqueKeyAssertions.forEach(t=>t.tags(e)),null===(t=this.rowConditionsAssertion)||void 0===t||t.tags(e),this}description(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.description=e,this}columns(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.columns=l.ColumnDescriptors.mapConfigProtoToCompilationProto(e),this}database(e){return this.proto.target=this.applySessionToTarget(p.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{database:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}schema(e){return this.proto.target=this.applySessionToTarget(p.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{schema:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}assertions(e){const t=this.generateInlineAssertions(e,this.proto);return this.uniqueKeyAssertions=t.uniqueKeyAssertions,this.rowConditionsAssertion=t.rowConditionsAssertion,this}setDependOnDependencyAssertions(e){return this.dependOnDependencyAssertions=e,this}getFileName(){return this.proto.fileName}getTarget(){return p.dataform.Target.create(this.proto.target)}compile(){const e=new f(this),t=new f(this,!0);return this.proto.query=e.apply(this.contextableQuery),this.proto.enumType===p.dataform.TableType.INCREMENTAL&&(this.proto.incrementalQuery=t.apply(this.contextableQuery),this.proto.incrementalPreOps=this.contextifyOps(this.contextablePreOps,t),this.proto.incrementalPostOps=this.contextifyOps(this.contextablePostOps,t)),this.contextableWhere&&(this.proto.where=e.apply(this.contextableWhere)),this.proto.preOps=this.contextifyOps(this.contextablePreOps,e).filter(e=>!!e.trim()),this.proto.postOps=this.contextifyOps(this.contextablePostOps,e).filter(e=>!!e.trim()),u.validateQueryString(this.session,this.proto.query,this.proto.fileName),u.validateQueryString(this.session,this.proto.incrementalQuery,this.proto.fileName),o.verifyObjectMatchesProto(p.dataform.Table,this.proto,o.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}contextifyOps(e,t){let r=[];return e.forEach(e=>{const n=t.apply(e);r=r.concat("string"==typeof n?[n]:n)}),r}verifyConfig(e){return e.type&&(delete e.type,e.dependencies&&(e.dependencyTargets=e.dependencies.map(e=>"string"==typeof e?{name:e}:e),delete e.dependencies),e.database&&(e.project=e.database,delete e.database),e.schema&&(e.dataset=e.schema,delete e.schema),e.fileName&&(e.filename=e.fileName,delete e.fileName),e.columns&&(e.columns=l.ColumnDescriptors.mapLegacyObjectToConfigProto(e.columns)),(null==(e=i.LegacyConfigConverter.insertLegacyInlineAssertionsToConfigProto(e))?void 0:e.bigquery)&&(e.bigquery.labels&&(e.labels=e.bigquery.labels,delete e.bigquery.labels),e.bigquery.additionalOptions&&(e.additionalOptions=e.bigquery.additionalOptions,delete e.bigquery.additionalOptions),u.checkExcessProperties(e=>{throw e},e.bigquery,u.strictKeysOf()(["labels","additionalOptions"]),"BigQuery view config"))),o.verifyObjectMatchesProto(p.dataform.ActionConfig.ViewConfig,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK)}}t.View=d;class f{constructor(e,t=!1){this.view=e,this.isIncremental=t}self(){return this.resolve(this.view.getTarget())}name(){return this.view.session.finalizeName(this.view.getTarget().name)}ref(e,...t){return e=u.toResolvable(e,t),u.resolvableAsTarget(e)?(this.view.dependencies(e),this.resolve(e)):(this.view.session.compileError(new Error("Action name is not specified")),"")}resolve(e,...t){return this.view.session.resolve(e,...t)}schema(){return this.view.session.finalizeSchema(this.view.getTarget().schema)}database(){return this.view.getTarget().database?this.view.session.finalizeDatabase(this.view.getTarget().database):(this.view.session.compileError(new Error("Warehouse does not support multiple databases")),"")}where(e){return this.view.where(e),""}when(e,t,r=""){return e?t:r}incremental(){return!!this.isIncremental}preOps(e){return this.view.preOps(e),""}postOps(e){return this.view.postOps(e),""}disabled(){return this.view.disabled(),""}bigquery(e){return this.view.bigquery(e),""}dependencies(e){return this.view.dependencies(e),""}apply(e){return"function"==typeof e?e(this):e}tags(e){return this.view.tags(e),""}}t.ViewContext=f},function(e,t,r){"use strict";
15
+ module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=45)}([function(e,t,r){"use strict";var n,o,i=e.exports=r(6),a=r(33);i.codegen=r(63),i.fetch=r(64),i.path=r(65),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},i.toObject=function(e){for(var t={},r=0;r<e.length;){var n=e[r++],o=e[r++];void 0!==o&&(t[n]=o)}return t};var s=/\\/g,l=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(s,"\\\\").replace(l,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var c=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(c,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;n||(n=r(20));var o=new n(t||e.name);return i.decorateRoot.add(o),o.ctor=e,Object.defineProperty(e,"$type",{value:o,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:o,enumerable:!1}),o};var u=0;i.decorateEnum=function(e){if(e.$type)return e.$type;o||(o=r(5));var t=new o("Enum"+u++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,r){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var o=r.shift();if("__proto__"===o||"prototype"===o)return t;if(r.length>0)t[o]=e(t[o]||{},r,n);else{var i=t[o];i&&(n=[].concat(i).concat(n)),t[o]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(i,"decorateRoot",{get:function(){return a.decorated||(a.decorated=new(r(25)))}})},function(e,t,r){var n,o,i;o=[r(68)],void 0===(i="function"==typeof(n=function(e){"use strict";var t,r,n,o=e.Reader,i=e.Writer,a=e.util,s=e.roots.default||(e.roots.default={});return s.dataform=((n={}).WorkflowSettings=function(){function t(e){if(this.vars={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.dataformCoreVersion="",t.prototype.defaultProject="",t.prototype.defaultDataset="",t.prototype.defaultLocation="",t.prototype.defaultAssertionDataset="",t.prototype.vars=a.emptyObject,t.prototype.projectSuffix="",t.prototype.datasetSuffix="",t.prototype.namePrefix="",t.prototype.defaultNotebookRuntimeOptions=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.dataformCoreVersion&&Object.hasOwnProperty.call(e,"dataformCoreVersion")&&t.uint32(10).string(e.dataformCoreVersion),null!=e.defaultProject&&Object.hasOwnProperty.call(e,"defaultProject")&&t.uint32(18).string(e.defaultProject),null!=e.defaultDataset&&Object.hasOwnProperty.call(e,"defaultDataset")&&t.uint32(26).string(e.defaultDataset),null!=e.defaultLocation&&Object.hasOwnProperty.call(e,"defaultLocation")&&t.uint32(34).string(e.defaultLocation),null!=e.defaultAssertionDataset&&Object.hasOwnProperty.call(e,"defaultAssertionDataset")&&t.uint32(42).string(e.defaultAssertionDataset),null!=e.vars&&Object.hasOwnProperty.call(e,"vars"))for(var r=Object.keys(e.vars),n=0;n<r.length;++n)t.uint32(50).fork().uint32(10).string(r[n]).uint32(18).string(e.vars[r[n]]).ldelim();return null!=e.projectSuffix&&Object.hasOwnProperty.call(e,"projectSuffix")&&t.uint32(58).string(e.projectSuffix),null!=e.datasetSuffix&&Object.hasOwnProperty.call(e,"datasetSuffix")&&t.uint32(66).string(e.datasetSuffix),null!=e.namePrefix&&Object.hasOwnProperty.call(e,"namePrefix")&&t.uint32(74).string(e.namePrefix),null!=e.defaultNotebookRuntimeOptions&&Object.hasOwnProperty.call(e,"defaultNotebookRuntimeOptions")&&s.dataform.NotebookRuntimeOptionsConfig.encode(e.defaultNotebookRuntimeOptions,t.uint32(82).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.WorkflowSettings;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.dataformCoreVersion=e.string();break;case 2:l.defaultProject=e.string();break;case 3:l.defaultDataset=e.string();break;case 4:l.defaultLocation=e.string();break;case 5:l.defaultAssertionDataset=e.string();break;case 6:l.vars===a.emptyObject&&(l.vars={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;){var p=e.uint32();switch(p>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.vars[r]=n;break;case 7:l.projectSuffix=e.string();break;case 8:l.datasetSuffix=e.string();break;case 9:l.namePrefix=e.string();break;case 10:l.defaultNotebookRuntimeOptions=s.dataform.NotebookRuntimeOptionsConfig.decode(e,e.uint32());break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.dataformCoreVersion&&e.hasOwnProperty("dataformCoreVersion")&&!a.isString(e.dataformCoreVersion))return"dataformCoreVersion: string expected";if(null!=e.defaultProject&&e.hasOwnProperty("defaultProject")&&!a.isString(e.defaultProject))return"defaultProject: string expected";if(null!=e.defaultDataset&&e.hasOwnProperty("defaultDataset")&&!a.isString(e.defaultDataset))return"defaultDataset: string expected";if(null!=e.defaultLocation&&e.hasOwnProperty("defaultLocation")&&!a.isString(e.defaultLocation))return"defaultLocation: string expected";if(null!=e.defaultAssertionDataset&&e.hasOwnProperty("defaultAssertionDataset")&&!a.isString(e.defaultAssertionDataset))return"defaultAssertionDataset: string expected";if(null!=e.vars&&e.hasOwnProperty("vars")){if(!a.isObject(e.vars))return"vars: object expected";for(var t=Object.keys(e.vars),r=0;r<t.length;++r)if(!a.isString(e.vars[t[r]]))return"vars: string{k:string} expected"}if(null!=e.projectSuffix&&e.hasOwnProperty("projectSuffix")&&!a.isString(e.projectSuffix))return"projectSuffix: string expected";if(null!=e.datasetSuffix&&e.hasOwnProperty("datasetSuffix")&&!a.isString(e.datasetSuffix))return"datasetSuffix: string expected";if(null!=e.namePrefix&&e.hasOwnProperty("namePrefix")&&!a.isString(e.namePrefix))return"namePrefix: string expected";if(null!=e.defaultNotebookRuntimeOptions&&e.hasOwnProperty("defaultNotebookRuntimeOptions")){var n=s.dataform.NotebookRuntimeOptionsConfig.verify(e.defaultNotebookRuntimeOptions);if(n)return"defaultNotebookRuntimeOptions."+n}return null},t.fromObject=function(e){if(e instanceof s.dataform.WorkflowSettings)return e;var t=new s.dataform.WorkflowSettings;if(null!=e.dataformCoreVersion&&(t.dataformCoreVersion=String(e.dataformCoreVersion)),null!=e.defaultProject&&(t.defaultProject=String(e.defaultProject)),null!=e.defaultDataset&&(t.defaultDataset=String(e.defaultDataset)),null!=e.defaultLocation&&(t.defaultLocation=String(e.defaultLocation)),null!=e.defaultAssertionDataset&&(t.defaultAssertionDataset=String(e.defaultAssertionDataset)),e.vars){if("object"!=typeof e.vars)throw TypeError(".dataform.WorkflowSettings.vars: object expected");t.vars={};for(var r=Object.keys(e.vars),n=0;n<r.length;++n)t.vars[r[n]]=String(e.vars[r[n]])}if(null!=e.projectSuffix&&(t.projectSuffix=String(e.projectSuffix)),null!=e.datasetSuffix&&(t.datasetSuffix=String(e.datasetSuffix)),null!=e.namePrefix&&(t.namePrefix=String(e.namePrefix)),null!=e.defaultNotebookRuntimeOptions){if("object"!=typeof e.defaultNotebookRuntimeOptions)throw TypeError(".dataform.WorkflowSettings.defaultNotebookRuntimeOptions: object expected");t.defaultNotebookRuntimeOptions=s.dataform.NotebookRuntimeOptionsConfig.fromObject(e.defaultNotebookRuntimeOptions)}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.objects||t.defaults)&&(n.vars={}),t.defaults&&(n.dataformCoreVersion="",n.defaultProject="",n.defaultDataset="",n.defaultLocation="",n.defaultAssertionDataset="",n.projectSuffix="",n.datasetSuffix="",n.namePrefix="",n.defaultNotebookRuntimeOptions=null),null!=e.dataformCoreVersion&&e.hasOwnProperty("dataformCoreVersion")&&(n.dataformCoreVersion=e.dataformCoreVersion),null!=e.defaultProject&&e.hasOwnProperty("defaultProject")&&(n.defaultProject=e.defaultProject),null!=e.defaultDataset&&e.hasOwnProperty("defaultDataset")&&(n.defaultDataset=e.defaultDataset),null!=e.defaultLocation&&e.hasOwnProperty("defaultLocation")&&(n.defaultLocation=e.defaultLocation),null!=e.defaultAssertionDataset&&e.hasOwnProperty("defaultAssertionDataset")&&(n.defaultAssertionDataset=e.defaultAssertionDataset),e.vars&&(r=Object.keys(e.vars)).length){n.vars={};for(var o=0;o<r.length;++o)n.vars[r[o]]=e.vars[r[o]]}return null!=e.projectSuffix&&e.hasOwnProperty("projectSuffix")&&(n.projectSuffix=e.projectSuffix),null!=e.datasetSuffix&&e.hasOwnProperty("datasetSuffix")&&(n.datasetSuffix=e.datasetSuffix),null!=e.namePrefix&&e.hasOwnProperty("namePrefix")&&(n.namePrefix=e.namePrefix),null!=e.defaultNotebookRuntimeOptions&&e.hasOwnProperty("defaultNotebookRuntimeOptions")&&(n.defaultNotebookRuntimeOptions=s.dataform.NotebookRuntimeOptionsConfig.toObject(e.defaultNotebookRuntimeOptions,t)),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.WorkflowSettings"},t}(),n.ActionConfigs=function(){function t(e){if(this.actions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.actions=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.actions&&e.actions.length)for(var r=0;r<e.actions.length;++r)s.dataform.ActionConfig.encode(e.actions[r],t.uint32(10).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfigs;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.actions&&n.actions.length||(n.actions=[]),n.actions.push(s.dataform.ActionConfig.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.actions&&e.hasOwnProperty("actions")){if(!Array.isArray(e.actions))return"actions: array expected";for(var t=0;t<e.actions.length;++t){var r=s.dataform.ActionConfig.verify(e.actions[t]);if(r)return"actions."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfigs)return e;var t=new s.dataform.ActionConfigs;if(e.actions){if(!Array.isArray(e.actions))throw TypeError(".dataform.ActionConfigs.actions: array expected");t.actions=[];for(var r=0;r<e.actions.length;++r){if("object"!=typeof e.actions[r])throw TypeError(".dataform.ActionConfigs.actions: object expected");t.actions[r]=s.dataform.ActionConfig.fromObject(e.actions[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.actions=[]),e.actions&&e.actions.length){r.actions=[];for(var n=0;n<e.actions.length;++n)r.actions[n]=s.dataform.ActionConfig.toObject(e.actions[n],t)}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfigs"},t}(),n.ActionConfig=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r,n,l;return t.prototype.table=null,t.prototype.view=null,t.prototype.incrementalTable=null,t.prototype.assertion=null,t.prototype.operation=null,t.prototype.declaration=null,t.prototype.notebook=null,t.prototype.dataPreparation=null,Object.defineProperty(t.prototype,"action",{get:a.oneOfGetter(r=["table","view","incrementalTable","assertion","operation","declaration","notebook","dataPreparation"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.table&&Object.hasOwnProperty.call(e,"table")&&s.dataform.ActionConfig.TableConfig.encode(e.table,t.uint32(10).fork()).ldelim(),null!=e.view&&Object.hasOwnProperty.call(e,"view")&&s.dataform.ActionConfig.ViewConfig.encode(e.view,t.uint32(18).fork()).ldelim(),null!=e.incrementalTable&&Object.hasOwnProperty.call(e,"incrementalTable")&&s.dataform.ActionConfig.IncrementalTableConfig.encode(e.incrementalTable,t.uint32(26).fork()).ldelim(),null!=e.assertion&&Object.hasOwnProperty.call(e,"assertion")&&s.dataform.ActionConfig.AssertionConfig.encode(e.assertion,t.uint32(34).fork()).ldelim(),null!=e.operation&&Object.hasOwnProperty.call(e,"operation")&&s.dataform.ActionConfig.OperationConfig.encode(e.operation,t.uint32(42).fork()).ldelim(),null!=e.declaration&&Object.hasOwnProperty.call(e,"declaration")&&s.dataform.ActionConfig.DeclarationConfig.encode(e.declaration,t.uint32(50).fork()).ldelim(),null!=e.notebook&&Object.hasOwnProperty.call(e,"notebook")&&s.dataform.ActionConfig.NotebookConfig.encode(e.notebook,t.uint32(58).fork()).ldelim(),null!=e.dataPreparation&&Object.hasOwnProperty.call(e,"dataPreparation")&&s.dataform.ActionConfig.DataPreparationConfig.encode(e.dataPreparation,t.uint32(66).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.table=s.dataform.ActionConfig.TableConfig.decode(e,e.uint32());break;case 2:n.view=s.dataform.ActionConfig.ViewConfig.decode(e,e.uint32());break;case 3:n.incrementalTable=s.dataform.ActionConfig.IncrementalTableConfig.decode(e,e.uint32());break;case 4:n.assertion=s.dataform.ActionConfig.AssertionConfig.decode(e,e.uint32());break;case 5:n.operation=s.dataform.ActionConfig.OperationConfig.decode(e,e.uint32());break;case 6:n.declaration=s.dataform.ActionConfig.DeclarationConfig.decode(e,e.uint32());break;case 7:n.notebook=s.dataform.ActionConfig.NotebookConfig.decode(e,e.uint32());break;case 8:n.dataPreparation=s.dataform.ActionConfig.DataPreparationConfig.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.table&&e.hasOwnProperty("table")&&(t.action=1,r=s.dataform.ActionConfig.TableConfig.verify(e.table)))return"table."+r;if(null!=e.view&&e.hasOwnProperty("view")){if(1===t.action)return"action: multiple values";if(t.action=1,r=s.dataform.ActionConfig.ViewConfig.verify(e.view))return"view."+r}if(null!=e.incrementalTable&&e.hasOwnProperty("incrementalTable")){if(1===t.action)return"action: multiple values";if(t.action=1,r=s.dataform.ActionConfig.IncrementalTableConfig.verify(e.incrementalTable))return"incrementalTable."+r}if(null!=e.assertion&&e.hasOwnProperty("assertion")){if(1===t.action)return"action: multiple values";if(t.action=1,r=s.dataform.ActionConfig.AssertionConfig.verify(e.assertion))return"assertion."+r}if(null!=e.operation&&e.hasOwnProperty("operation")){if(1===t.action)return"action: multiple values";if(t.action=1,r=s.dataform.ActionConfig.OperationConfig.verify(e.operation))return"operation."+r}if(null!=e.declaration&&e.hasOwnProperty("declaration")){if(1===t.action)return"action: multiple values";if(t.action=1,r=s.dataform.ActionConfig.DeclarationConfig.verify(e.declaration))return"declaration."+r}if(null!=e.notebook&&e.hasOwnProperty("notebook")){if(1===t.action)return"action: multiple values";if(t.action=1,r=s.dataform.ActionConfig.NotebookConfig.verify(e.notebook))return"notebook."+r}if(null!=e.dataPreparation&&e.hasOwnProperty("dataPreparation")){if(1===t.action)return"action: multiple values";var r;if(t.action=1,r=s.dataform.ActionConfig.DataPreparationConfig.verify(e.dataPreparation))return"dataPreparation."+r}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig)return e;var t=new s.dataform.ActionConfig;if(null!=e.table){if("object"!=typeof e.table)throw TypeError(".dataform.ActionConfig.table: object expected");t.table=s.dataform.ActionConfig.TableConfig.fromObject(e.table)}if(null!=e.view){if("object"!=typeof e.view)throw TypeError(".dataform.ActionConfig.view: object expected");t.view=s.dataform.ActionConfig.ViewConfig.fromObject(e.view)}if(null!=e.incrementalTable){if("object"!=typeof e.incrementalTable)throw TypeError(".dataform.ActionConfig.incrementalTable: object expected");t.incrementalTable=s.dataform.ActionConfig.IncrementalTableConfig.fromObject(e.incrementalTable)}if(null!=e.assertion){if("object"!=typeof e.assertion)throw TypeError(".dataform.ActionConfig.assertion: object expected");t.assertion=s.dataform.ActionConfig.AssertionConfig.fromObject(e.assertion)}if(null!=e.operation){if("object"!=typeof e.operation)throw TypeError(".dataform.ActionConfig.operation: object expected");t.operation=s.dataform.ActionConfig.OperationConfig.fromObject(e.operation)}if(null!=e.declaration){if("object"!=typeof e.declaration)throw TypeError(".dataform.ActionConfig.declaration: object expected");t.declaration=s.dataform.ActionConfig.DeclarationConfig.fromObject(e.declaration)}if(null!=e.notebook){if("object"!=typeof e.notebook)throw TypeError(".dataform.ActionConfig.notebook: object expected");t.notebook=s.dataform.ActionConfig.NotebookConfig.fromObject(e.notebook)}if(null!=e.dataPreparation){if("object"!=typeof e.dataPreparation)throw TypeError(".dataform.ActionConfig.dataPreparation: object expected");t.dataPreparation=s.dataform.ActionConfig.DataPreparationConfig.fromObject(e.dataPreparation)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.table&&e.hasOwnProperty("table")&&(r.table=s.dataform.ActionConfig.TableConfig.toObject(e.table,t),t.oneofs&&(r.action="table")),null!=e.view&&e.hasOwnProperty("view")&&(r.view=s.dataform.ActionConfig.ViewConfig.toObject(e.view,t),t.oneofs&&(r.action="view")),null!=e.incrementalTable&&e.hasOwnProperty("incrementalTable")&&(r.incrementalTable=s.dataform.ActionConfig.IncrementalTableConfig.toObject(e.incrementalTable,t),t.oneofs&&(r.action="incrementalTable")),null!=e.assertion&&e.hasOwnProperty("assertion")&&(r.assertion=s.dataform.ActionConfig.AssertionConfig.toObject(e.assertion,t),t.oneofs&&(r.action="assertion")),null!=e.operation&&e.hasOwnProperty("operation")&&(r.operation=s.dataform.ActionConfig.OperationConfig.toObject(e.operation,t),t.oneofs&&(r.action="operation")),null!=e.declaration&&e.hasOwnProperty("declaration")&&(r.declaration=s.dataform.ActionConfig.DeclarationConfig.toObject(e.declaration,t),t.oneofs&&(r.action="declaration")),null!=e.notebook&&e.hasOwnProperty("notebook")&&(r.notebook=s.dataform.ActionConfig.NotebookConfig.toObject(e.notebook,t),t.oneofs&&(r.action="notebook")),null!=e.dataPreparation&&e.hasOwnProperty("dataPreparation")&&(r.dataPreparation=s.dataform.ActionConfig.DataPreparationConfig.toObject(e.dataPreparation,t),t.oneofs&&(r.action="dataPreparation")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig"},t.Target=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.project="",t.prototype.dataset="",t.prototype.name="",t.prototype.includeDependentAssertions=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(10).string(e.project),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(34).string(e.name),null!=e.includeDependentAssertions&&Object.hasOwnProperty.call(e,"includeDependentAssertions")&&t.uint32(40).bool(e.includeDependentAssertions),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.Target;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.project=e.string();break;case 2:n.dataset=e.string();break;case 4:n.name=e.string();break;case 5:n.includeDependentAssertions=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project)?"project: string expected":null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset)?"dataset: string expected":null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name)?"name: string expected":null!=e.includeDependentAssertions&&e.hasOwnProperty("includeDependentAssertions")&&"boolean"!=typeof e.includeDependentAssertions?"includeDependentAssertions: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.Target)return e;var t=new s.dataform.ActionConfig.Target;return null!=e.project&&(t.project=String(e.project)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.name&&(t.name=String(e.name)),null!=e.includeDependentAssertions&&(t.includeDependentAssertions=Boolean(e.includeDependentAssertions)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.project="",r.dataset="",r.name="",r.includeDependentAssertions=!1),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),null!=e.dataset&&e.hasOwnProperty("dataset")&&(r.dataset=e.dataset),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.includeDependentAssertions&&e.hasOwnProperty("includeDependentAssertions")&&(r.includeDependentAssertions=e.includeDependentAssertions),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.Target"},t}(),t.ColumnDescriptor=function(){function t(e){if(this.path=[],this.bigqueryPolicyTags=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.path=a.emptyArray,t.prototype.description="",t.prototype.bigqueryPolicyTags=a.emptyArray,t.prototype.tags=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.path&&e.path.length)for(var r=0;r<e.path.length;++r)t.uint32(10).string(e.path[r]);if(null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(18).string(e.description),null!=e.bigqueryPolicyTags&&e.bigqueryPolicyTags.length)for(r=0;r<e.bigqueryPolicyTags.length;++r)t.uint32(26).string(e.bigqueryPolicyTags[r]);if(null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(34).string(e.tags[r]);return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.ColumnDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.path&&n.path.length||(n.path=[]),n.path.push(e.string());break;case 2:n.description=e.string();break;case 3:n.bigqueryPolicyTags&&n.bigqueryPolicyTags.length||(n.bigqueryPolicyTags=[]),n.bigqueryPolicyTags.push(e.string());break;case 4:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var t=0;t<e.path.length;++t)if(!a.isString(e.path[t]))return"path: string[] expected"}if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.bigqueryPolicyTags&&e.hasOwnProperty("bigqueryPolicyTags")){if(!Array.isArray(e.bigqueryPolicyTags))return"bigqueryPolicyTags: array expected";for(t=0;t<e.bigqueryPolicyTags.length;++t)if(!a.isString(e.bigqueryPolicyTags[t]))return"bigqueryPolicyTags: string[] expected"}if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.ColumnDescriptor)return e;var t=new s.dataform.ActionConfig.ColumnDescriptor;if(e.path){if(!Array.isArray(e.path))throw TypeError(".dataform.ActionConfig.ColumnDescriptor.path: array expected");t.path=[];for(var r=0;r<e.path.length;++r)t.path[r]=String(e.path[r])}if(null!=e.description&&(t.description=String(e.description)),e.bigqueryPolicyTags){if(!Array.isArray(e.bigqueryPolicyTags))throw TypeError(".dataform.ActionConfig.ColumnDescriptor.bigqueryPolicyTags: array expected");for(t.bigqueryPolicyTags=[],r=0;r<e.bigqueryPolicyTags.length;++r)t.bigqueryPolicyTags[r]=String(e.bigqueryPolicyTags[r])}if(e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.ColumnDescriptor.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.path=[],r.bigqueryPolicyTags=[],r.tags=[]),t.defaults&&(r.description=""),e.path&&e.path.length){r.path=[];for(var n=0;n<e.path.length;++n)r.path[n]=e.path[n]}if(null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),e.bigqueryPolicyTags&&e.bigqueryPolicyTags.length)for(r.bigqueryPolicyTags=[],n=0;n<e.bigqueryPolicyTags.length;++n)r.bigqueryPolicyTags[n]=e.bigqueryPolicyTags[n];if(e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.ColumnDescriptor"},t}(),t.TableAssertionsConfig=function(){function t(e){if(this.uniqueKey=[],this.uniqueKeys=[],this.nonNull=[],this.rowConditions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.uniqueKey=a.emptyArray,t.prototype.uniqueKeys=a.emptyArray,t.prototype.nonNull=a.emptyArray,t.prototype.rowConditions=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.uniqueKey&&e.uniqueKey.length)for(var r=0;r<e.uniqueKey.length;++r)t.uint32(10).string(e.uniqueKey[r]);if(null!=e.uniqueKeys&&e.uniqueKeys.length)for(r=0;r<e.uniqueKeys.length;++r)s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.encode(e.uniqueKeys[r],t.uint32(18).fork()).ldelim();if(null!=e.nonNull&&e.nonNull.length)for(r=0;r<e.nonNull.length;++r)t.uint32(26).string(e.nonNull[r]);if(null!=e.rowConditions&&e.rowConditions.length)for(r=0;r<e.rowConditions.length;++r)t.uint32(34).string(e.rowConditions[r]);return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.TableAssertionsConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.uniqueKey&&n.uniqueKey.length||(n.uniqueKey=[]),n.uniqueKey.push(e.string());break;case 2:n.uniqueKeys&&n.uniqueKeys.length||(n.uniqueKeys=[]),n.uniqueKeys.push(s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.decode(e,e.uint32()));break;case 3:n.nonNull&&n.nonNull.length||(n.nonNull=[]),n.nonNull.push(e.string());break;case 4:n.rowConditions&&n.rowConditions.length||(n.rowConditions=[]),n.rowConditions.push(e.string());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.uniqueKey&&e.hasOwnProperty("uniqueKey")){if(!Array.isArray(e.uniqueKey))return"uniqueKey: array expected";for(var t=0;t<e.uniqueKey.length;++t)if(!a.isString(e.uniqueKey[t]))return"uniqueKey: string[] expected"}if(null!=e.uniqueKeys&&e.hasOwnProperty("uniqueKeys")){if(!Array.isArray(e.uniqueKeys))return"uniqueKeys: array expected";for(t=0;t<e.uniqueKeys.length;++t){var r=s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.verify(e.uniqueKeys[t]);if(r)return"uniqueKeys."+r}}if(null!=e.nonNull&&e.hasOwnProperty("nonNull")){if(!Array.isArray(e.nonNull))return"nonNull: array expected";for(t=0;t<e.nonNull.length;++t)if(!a.isString(e.nonNull[t]))return"nonNull: string[] expected"}if(null!=e.rowConditions&&e.hasOwnProperty("rowConditions")){if(!Array.isArray(e.rowConditions))return"rowConditions: array expected";for(t=0;t<e.rowConditions.length;++t)if(!a.isString(e.rowConditions[t]))return"rowConditions: string[] expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.TableAssertionsConfig)return e;var t=new s.dataform.ActionConfig.TableAssertionsConfig;if(e.uniqueKey){if(!Array.isArray(e.uniqueKey))throw TypeError(".dataform.ActionConfig.TableAssertionsConfig.uniqueKey: array expected");t.uniqueKey=[];for(var r=0;r<e.uniqueKey.length;++r)t.uniqueKey[r]=String(e.uniqueKey[r])}if(e.uniqueKeys){if(!Array.isArray(e.uniqueKeys))throw TypeError(".dataform.ActionConfig.TableAssertionsConfig.uniqueKeys: array expected");for(t.uniqueKeys=[],r=0;r<e.uniqueKeys.length;++r){if("object"!=typeof e.uniqueKeys[r])throw TypeError(".dataform.ActionConfig.TableAssertionsConfig.uniqueKeys: object expected");t.uniqueKeys[r]=s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.fromObject(e.uniqueKeys[r])}}if(e.nonNull){if(!Array.isArray(e.nonNull))throw TypeError(".dataform.ActionConfig.TableAssertionsConfig.nonNull: array expected");for(t.nonNull=[],r=0;r<e.nonNull.length;++r)t.nonNull[r]=String(e.nonNull[r])}if(e.rowConditions){if(!Array.isArray(e.rowConditions))throw TypeError(".dataform.ActionConfig.TableAssertionsConfig.rowConditions: array expected");for(t.rowConditions=[],r=0;r<e.rowConditions.length;++r)t.rowConditions[r]=String(e.rowConditions[r])}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.uniqueKey=[],r.uniqueKeys=[],r.nonNull=[],r.rowConditions=[]),e.uniqueKey&&e.uniqueKey.length){r.uniqueKey=[];for(var n=0;n<e.uniqueKey.length;++n)r.uniqueKey[n]=e.uniqueKey[n]}if(e.uniqueKeys&&e.uniqueKeys.length)for(r.uniqueKeys=[],n=0;n<e.uniqueKeys.length;++n)r.uniqueKeys[n]=s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.toObject(e.uniqueKeys[n],t);if(e.nonNull&&e.nonNull.length)for(r.nonNull=[],n=0;n<e.nonNull.length;++n)r.nonNull[n]=e.nonNull[n];if(e.rowConditions&&e.rowConditions.length)for(r.rowConditions=[],n=0;n<e.rowConditions.length;++n)r.rowConditions[n]=e.rowConditions[n];return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.TableAssertionsConfig"},t.UniqueKey=function(){function t(e){if(this.uniqueKey=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.uniqueKey=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.uniqueKey&&e.uniqueKey.length)for(var r=0;r<e.uniqueKey.length;++r)t.uint32(10).string(e.uniqueKey[r]);return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.uniqueKey&&n.uniqueKey.length||(n.uniqueKey=[]),n.uniqueKey.push(e.string());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.uniqueKey&&e.hasOwnProperty("uniqueKey")){if(!Array.isArray(e.uniqueKey))return"uniqueKey: array expected";for(var t=0;t<e.uniqueKey.length;++t)if(!a.isString(e.uniqueKey[t]))return"uniqueKey: string[] expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey)return e;var t=new s.dataform.ActionConfig.TableAssertionsConfig.UniqueKey;if(e.uniqueKey){if(!Array.isArray(e.uniqueKey))throw TypeError(".dataform.ActionConfig.TableAssertionsConfig.UniqueKey.uniqueKey: array expected");t.uniqueKey=[];for(var r=0;r<e.uniqueKey.length;++r)t.uniqueKey[r]=String(e.uniqueKey[r])}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.uniqueKey=[]),e.uniqueKey&&e.uniqueKey.length){r.uniqueKey=[];for(var n=0;n<e.uniqueKey.length;++n)r.uniqueKey[n]=e.uniqueKey[n]}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.TableAssertionsConfig.UniqueKey"},t}(),t}(),t.TableConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],this.preOperations=[],this.postOperations=[],this.columns=[],this.clusterBy=[],this.labels={},this.additionalOptions={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.preOperations=a.emptyArray,t.prototype.postOperations=a.emptyArray,t.prototype.description="",t.prototype.columns=a.emptyArray,t.prototype.partitionBy="",t.prototype.partitionExpirationDays=0,t.prototype.requirePartitionFilter=!1,t.prototype.clusterBy=a.emptyArray,t.prototype.labels=a.emptyObject,t.prototype.additionalOptions=a.emptyObject,t.prototype.dependOnDependencyAssertions=!1,t.prototype.assertions=null,t.prototype.hermetic=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(42).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(50).string(e.tags[r]);if(null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.preOperations&&e.preOperations.length)for(r=0;r<e.preOperations.length;++r)t.uint32(66).string(e.preOperations[r]);if(null!=e.postOperations&&e.postOperations.length)for(r=0;r<e.postOperations.length;++r)t.uint32(74).string(e.postOperations[r]);if(null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(82).string(e.description),null!=e.columns&&e.columns.length)for(r=0;r<e.columns.length;++r)s.dataform.ActionConfig.ColumnDescriptor.encode(e.columns[r],t.uint32(90).fork()).ldelim();if(null!=e.partitionBy&&Object.hasOwnProperty.call(e,"partitionBy")&&t.uint32(98).string(e.partitionBy),null!=e.partitionExpirationDays&&Object.hasOwnProperty.call(e,"partitionExpirationDays")&&t.uint32(104).int32(e.partitionExpirationDays),null!=e.requirePartitionFilter&&Object.hasOwnProperty.call(e,"requirePartitionFilter")&&t.uint32(112).bool(e.requirePartitionFilter),null!=e.clusterBy&&e.clusterBy.length)for(r=0;r<e.clusterBy.length;++r)t.uint32(122).string(e.clusterBy[r]);if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.uint32(130).fork().uint32(10).string(n[r]).uint32(18).string(e.labels[n[r]]).ldelim()}if(null!=e.additionalOptions&&Object.hasOwnProperty.call(e,"additionalOptions"))for(n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.uint32(138).fork().uint32(10).string(n[r]).uint32(18).string(e.additionalOptions[n[r]]).ldelim();return null!=e.dependOnDependencyAssertions&&Object.hasOwnProperty.call(e,"dependOnDependencyAssertions")&&t.uint32(144).bool(e.dependOnDependencyAssertions),null!=e.assertions&&Object.hasOwnProperty.call(e,"assertions")&&s.dataform.ActionConfig.TableAssertionsConfig.encode(e.assertions,t.uint32(154).fork()).ldelim(),null!=e.hermetic&&Object.hasOwnProperty.call(e,"hermetic")&&t.uint32(160).bool(e.hermetic),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.ActionConfig.TableConfig;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.name=e.string();break;case 2:l.dataset=e.string();break;case 3:l.project=e.string();break;case 4:l.dependencyTargets&&l.dependencyTargets.length||(l.dependencyTargets=[]),l.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 5:l.filename=e.string();break;case 6:l.tags&&l.tags.length||(l.tags=[]),l.tags.push(e.string());break;case 7:l.disabled=e.bool();break;case 8:l.preOperations&&l.preOperations.length||(l.preOperations=[]),l.preOperations.push(e.string());break;case 9:l.postOperations&&l.postOperations.length||(l.postOperations=[]),l.postOperations.push(e.string());break;case 10:l.description=e.string();break;case 11:l.columns&&l.columns.length||(l.columns=[]),l.columns.push(s.dataform.ActionConfig.ColumnDescriptor.decode(e,e.uint32()));break;case 12:l.partitionBy=e.string();break;case 13:l.partitionExpirationDays=e.int32();break;case 14:l.requirePartitionFilter=e.bool();break;case 15:l.clusterBy&&l.clusterBy.length||(l.clusterBy=[]),l.clusterBy.push(e.string());break;case 16:l.labels===a.emptyObject&&(l.labels={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;)switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}l.labels[r]=n;break;case 17:for(l.additionalOptions===a.emptyObject&&(l.additionalOptions={}),u=e.uint32()+e.pos,r="",n="";e.pos<u;){var p;switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.additionalOptions[r]=n;break;case 18:l.dependOnDependencyAssertions=e.bool();break;case 19:l.assertions=s.dataform.ActionConfig.TableAssertionsConfig.decode(e,e.uint32());break;case 20:l.hermetic=e.bool();break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t)if(n=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+n}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.preOperations&&e.hasOwnProperty("preOperations")){if(!Array.isArray(e.preOperations))return"preOperations: array expected";for(t=0;t<e.preOperations.length;++t)if(!a.isString(e.preOperations[t]))return"preOperations: string[] expected"}if(null!=e.postOperations&&e.hasOwnProperty("postOperations")){if(!Array.isArray(e.postOperations))return"postOperations: array expected";for(t=0;t<e.postOperations.length;++t)if(!a.isString(e.postOperations[t]))return"postOperations: string[] expected"}if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.columns&&e.hasOwnProperty("columns")){if(!Array.isArray(e.columns))return"columns: array expected";for(t=0;t<e.columns.length;++t)if(n=s.dataform.ActionConfig.ColumnDescriptor.verify(e.columns[t]))return"columns."+n}if(null!=e.partitionBy&&e.hasOwnProperty("partitionBy")&&!a.isString(e.partitionBy))return"partitionBy: string expected";if(null!=e.partitionExpirationDays&&e.hasOwnProperty("partitionExpirationDays")&&!a.isInteger(e.partitionExpirationDays))return"partitionExpirationDays: integer expected";if(null!=e.requirePartitionFilter&&e.hasOwnProperty("requirePartitionFilter")&&"boolean"!=typeof e.requirePartitionFilter)return"requirePartitionFilter: boolean expected";if(null!=e.clusterBy&&e.hasOwnProperty("clusterBy")){if(!Array.isArray(e.clusterBy))return"clusterBy: array expected";for(t=0;t<e.clusterBy.length;++t)if(!a.isString(e.clusterBy[t]))return"clusterBy: string[] expected"}if(null!=e.labels&&e.hasOwnProperty("labels")){if(!a.isObject(e.labels))return"labels: object expected";var r=Object.keys(e.labels);for(t=0;t<r.length;++t)if(!a.isString(e.labels[r[t]]))return"labels: string{k:string} expected"}if(null!=e.additionalOptions&&e.hasOwnProperty("additionalOptions")){if(!a.isObject(e.additionalOptions))return"additionalOptions: object expected";for(r=Object.keys(e.additionalOptions),t=0;t<r.length;++t)if(!a.isString(e.additionalOptions[r[t]]))return"additionalOptions: string{k:string} expected"}return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&"boolean"!=typeof e.dependOnDependencyAssertions?"dependOnDependencyAssertions: boolean expected":null!=e.assertions&&e.hasOwnProperty("assertions")&&(n=s.dataform.ActionConfig.TableAssertionsConfig.verify(e.assertions))?"assertions."+n:null!=e.hermetic&&e.hasOwnProperty("hermetic")&&"boolean"!=typeof e.hermetic?"hermetic: boolean expected":null;var n},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.TableConfig)return e;var t=new s.dataform.ActionConfig.TableConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.TableConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.TableConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.TableConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),e.preOperations){if(!Array.isArray(e.preOperations))throw TypeError(".dataform.ActionConfig.TableConfig.preOperations: array expected");for(t.preOperations=[],r=0;r<e.preOperations.length;++r)t.preOperations[r]=String(e.preOperations[r])}if(e.postOperations){if(!Array.isArray(e.postOperations))throw TypeError(".dataform.ActionConfig.TableConfig.postOperations: array expected");for(t.postOperations=[],r=0;r<e.postOperations.length;++r)t.postOperations[r]=String(e.postOperations[r])}if(null!=e.description&&(t.description=String(e.description)),e.columns){if(!Array.isArray(e.columns))throw TypeError(".dataform.ActionConfig.TableConfig.columns: array expected");for(t.columns=[],r=0;r<e.columns.length;++r){if("object"!=typeof e.columns[r])throw TypeError(".dataform.ActionConfig.TableConfig.columns: object expected");t.columns[r]=s.dataform.ActionConfig.ColumnDescriptor.fromObject(e.columns[r])}}if(null!=e.partitionBy&&(t.partitionBy=String(e.partitionBy)),null!=e.partitionExpirationDays&&(t.partitionExpirationDays=0|e.partitionExpirationDays),null!=e.requirePartitionFilter&&(t.requirePartitionFilter=Boolean(e.requirePartitionFilter)),e.clusterBy){if(!Array.isArray(e.clusterBy))throw TypeError(".dataform.ActionConfig.TableConfig.clusterBy: array expected");for(t.clusterBy=[],r=0;r<e.clusterBy.length;++r)t.clusterBy[r]=String(e.clusterBy[r])}if(e.labels){if("object"!=typeof e.labels)throw TypeError(".dataform.ActionConfig.TableConfig.labels: object expected");t.labels={};var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.labels[n[r]]=String(e.labels[n[r]])}if(e.additionalOptions){if("object"!=typeof e.additionalOptions)throw TypeError(".dataform.ActionConfig.TableConfig.additionalOptions: object expected");for(t.additionalOptions={},n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.additionalOptions[n[r]]=String(e.additionalOptions[n[r]])}if(null!=e.dependOnDependencyAssertions&&(t.dependOnDependencyAssertions=Boolean(e.dependOnDependencyAssertions)),null!=e.assertions){if("object"!=typeof e.assertions)throw TypeError(".dataform.ActionConfig.TableConfig.assertions: object expected");t.assertions=s.dataform.ActionConfig.TableAssertionsConfig.fromObject(e.assertions)}return null!=e.hermetic&&(t.hermetic=Boolean(e.hermetic)),t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.arrays||t.defaults)&&(n.dependencyTargets=[],n.tags=[],n.preOperations=[],n.postOperations=[],n.columns=[],n.clusterBy=[]),(t.objects||t.defaults)&&(n.labels={},n.additionalOptions={}),t.defaults&&(n.name="",n.dataset="",n.project="",n.filename="",n.disabled=!1,n.description="",n.partitionBy="",n.partitionExpirationDays=0,n.requirePartitionFilter=!1,n.dependOnDependencyAssertions=!1,n.assertions=null,n.hermetic=!1),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(n.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(n.project=e.project),e.dependencyTargets&&e.dependencyTargets.length){n.dependencyTargets=[];for(var o=0;o<e.dependencyTargets.length;++o)n.dependencyTargets[o]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[o],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(n.filename=e.filename),e.tags&&e.tags.length)for(n.tags=[],o=0;o<e.tags.length;++o)n.tags[o]=e.tags[o];if(null!=e.disabled&&e.hasOwnProperty("disabled")&&(n.disabled=e.disabled),e.preOperations&&e.preOperations.length)for(n.preOperations=[],o=0;o<e.preOperations.length;++o)n.preOperations[o]=e.preOperations[o];if(e.postOperations&&e.postOperations.length)for(n.postOperations=[],o=0;o<e.postOperations.length;++o)n.postOperations[o]=e.postOperations[o];if(null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),e.columns&&e.columns.length)for(n.columns=[],o=0;o<e.columns.length;++o)n.columns[o]=s.dataform.ActionConfig.ColumnDescriptor.toObject(e.columns[o],t);if(null!=e.partitionBy&&e.hasOwnProperty("partitionBy")&&(n.partitionBy=e.partitionBy),null!=e.partitionExpirationDays&&e.hasOwnProperty("partitionExpirationDays")&&(n.partitionExpirationDays=e.partitionExpirationDays),null!=e.requirePartitionFilter&&e.hasOwnProperty("requirePartitionFilter")&&(n.requirePartitionFilter=e.requirePartitionFilter),e.clusterBy&&e.clusterBy.length)for(n.clusterBy=[],o=0;o<e.clusterBy.length;++o)n.clusterBy[o]=e.clusterBy[o];if(e.labels&&(r=Object.keys(e.labels)).length)for(n.labels={},o=0;o<r.length;++o)n.labels[r[o]]=e.labels[r[o]];if(e.additionalOptions&&(r=Object.keys(e.additionalOptions)).length)for(n.additionalOptions={},o=0;o<r.length;++o)n.additionalOptions[r[o]]=e.additionalOptions[r[o]];return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&(n.dependOnDependencyAssertions=e.dependOnDependencyAssertions),null!=e.assertions&&e.hasOwnProperty("assertions")&&(n.assertions=s.dataform.ActionConfig.TableAssertionsConfig.toObject(e.assertions,t)),null!=e.hermetic&&e.hasOwnProperty("hermetic")&&(n.hermetic=e.hermetic),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.TableConfig"},t}(),t.ViewConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],this.preOperations=[],this.postOperations=[],this.columns=[],this.labels={},this.additionalOptions={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.preOperations=a.emptyArray,t.prototype.postOperations=a.emptyArray,t.prototype.materialized=!1,t.prototype.description="",t.prototype.columns=a.emptyArray,t.prototype.labels=a.emptyObject,t.prototype.additionalOptions=a.emptyObject,t.prototype.dependOnDependencyAssertions=!1,t.prototype.hermetic=!1,t.prototype.assertions=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(42).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(50).string(e.tags[r]);if(null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.preOperations&&e.preOperations.length)for(r=0;r<e.preOperations.length;++r)t.uint32(66).string(e.preOperations[r]);if(null!=e.postOperations&&e.postOperations.length)for(r=0;r<e.postOperations.length;++r)t.uint32(74).string(e.postOperations[r]);if(null!=e.materialized&&Object.hasOwnProperty.call(e,"materialized")&&t.uint32(80).bool(e.materialized),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(90).string(e.description),null!=e.columns&&e.columns.length)for(r=0;r<e.columns.length;++r)s.dataform.ActionConfig.ColumnDescriptor.encode(e.columns[r],t.uint32(98).fork()).ldelim();if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.uint32(106).fork().uint32(10).string(n[r]).uint32(18).string(e.labels[n[r]]).ldelim()}if(null!=e.additionalOptions&&Object.hasOwnProperty.call(e,"additionalOptions"))for(n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.uint32(114).fork().uint32(10).string(n[r]).uint32(18).string(e.additionalOptions[n[r]]).ldelim();return null!=e.dependOnDependencyAssertions&&Object.hasOwnProperty.call(e,"dependOnDependencyAssertions")&&t.uint32(120).bool(e.dependOnDependencyAssertions),null!=e.hermetic&&Object.hasOwnProperty.call(e,"hermetic")&&t.uint32(128).bool(e.hermetic),null!=e.assertions&&Object.hasOwnProperty.call(e,"assertions")&&s.dataform.ActionConfig.TableAssertionsConfig.encode(e.assertions,t.uint32(138).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.ActionConfig.ViewConfig;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.name=e.string();break;case 2:l.dataset=e.string();break;case 3:l.project=e.string();break;case 4:l.dependencyTargets&&l.dependencyTargets.length||(l.dependencyTargets=[]),l.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 5:l.filename=e.string();break;case 6:l.tags&&l.tags.length||(l.tags=[]),l.tags.push(e.string());break;case 7:l.disabled=e.bool();break;case 8:l.preOperations&&l.preOperations.length||(l.preOperations=[]),l.preOperations.push(e.string());break;case 9:l.postOperations&&l.postOperations.length||(l.postOperations=[]),l.postOperations.push(e.string());break;case 10:l.materialized=e.bool();break;case 11:l.description=e.string();break;case 12:l.columns&&l.columns.length||(l.columns=[]),l.columns.push(s.dataform.ActionConfig.ColumnDescriptor.decode(e,e.uint32()));break;case 13:l.labels===a.emptyObject&&(l.labels={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;)switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}l.labels[r]=n;break;case 14:for(l.additionalOptions===a.emptyObject&&(l.additionalOptions={}),u=e.uint32()+e.pos,r="",n="";e.pos<u;){var p;switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.additionalOptions[r]=n;break;case 15:l.dependOnDependencyAssertions=e.bool();break;case 16:l.hermetic=e.bool();break;case 17:l.assertions=s.dataform.ActionConfig.TableAssertionsConfig.decode(e,e.uint32());break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t)if(n=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+n}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.preOperations&&e.hasOwnProperty("preOperations")){if(!Array.isArray(e.preOperations))return"preOperations: array expected";for(t=0;t<e.preOperations.length;++t)if(!a.isString(e.preOperations[t]))return"preOperations: string[] expected"}if(null!=e.postOperations&&e.hasOwnProperty("postOperations")){if(!Array.isArray(e.postOperations))return"postOperations: array expected";for(t=0;t<e.postOperations.length;++t)if(!a.isString(e.postOperations[t]))return"postOperations: string[] expected"}if(null!=e.materialized&&e.hasOwnProperty("materialized")&&"boolean"!=typeof e.materialized)return"materialized: boolean expected";if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.columns&&e.hasOwnProperty("columns")){if(!Array.isArray(e.columns))return"columns: array expected";for(t=0;t<e.columns.length;++t)if(n=s.dataform.ActionConfig.ColumnDescriptor.verify(e.columns[t]))return"columns."+n}if(null!=e.labels&&e.hasOwnProperty("labels")){if(!a.isObject(e.labels))return"labels: object expected";var r=Object.keys(e.labels);for(t=0;t<r.length;++t)if(!a.isString(e.labels[r[t]]))return"labels: string{k:string} expected"}if(null!=e.additionalOptions&&e.hasOwnProperty("additionalOptions")){if(!a.isObject(e.additionalOptions))return"additionalOptions: object expected";for(r=Object.keys(e.additionalOptions),t=0;t<r.length;++t)if(!a.isString(e.additionalOptions[r[t]]))return"additionalOptions: string{k:string} expected"}return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&"boolean"!=typeof e.dependOnDependencyAssertions?"dependOnDependencyAssertions: boolean expected":null!=e.hermetic&&e.hasOwnProperty("hermetic")&&"boolean"!=typeof e.hermetic?"hermetic: boolean expected":null!=e.assertions&&e.hasOwnProperty("assertions")&&(n=s.dataform.ActionConfig.TableAssertionsConfig.verify(e.assertions))?"assertions."+n:null;var n},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.ViewConfig)return e;var t=new s.dataform.ActionConfig.ViewConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.ViewConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.ViewConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.ViewConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),e.preOperations){if(!Array.isArray(e.preOperations))throw TypeError(".dataform.ActionConfig.ViewConfig.preOperations: array expected");for(t.preOperations=[],r=0;r<e.preOperations.length;++r)t.preOperations[r]=String(e.preOperations[r])}if(e.postOperations){if(!Array.isArray(e.postOperations))throw TypeError(".dataform.ActionConfig.ViewConfig.postOperations: array expected");for(t.postOperations=[],r=0;r<e.postOperations.length;++r)t.postOperations[r]=String(e.postOperations[r])}if(null!=e.materialized&&(t.materialized=Boolean(e.materialized)),null!=e.description&&(t.description=String(e.description)),e.columns){if(!Array.isArray(e.columns))throw TypeError(".dataform.ActionConfig.ViewConfig.columns: array expected");for(t.columns=[],r=0;r<e.columns.length;++r){if("object"!=typeof e.columns[r])throw TypeError(".dataform.ActionConfig.ViewConfig.columns: object expected");t.columns[r]=s.dataform.ActionConfig.ColumnDescriptor.fromObject(e.columns[r])}}if(e.labels){if("object"!=typeof e.labels)throw TypeError(".dataform.ActionConfig.ViewConfig.labels: object expected");t.labels={};var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.labels[n[r]]=String(e.labels[n[r]])}if(e.additionalOptions){if("object"!=typeof e.additionalOptions)throw TypeError(".dataform.ActionConfig.ViewConfig.additionalOptions: object expected");for(t.additionalOptions={},n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.additionalOptions[n[r]]=String(e.additionalOptions[n[r]])}if(null!=e.dependOnDependencyAssertions&&(t.dependOnDependencyAssertions=Boolean(e.dependOnDependencyAssertions)),null!=e.hermetic&&(t.hermetic=Boolean(e.hermetic)),null!=e.assertions){if("object"!=typeof e.assertions)throw TypeError(".dataform.ActionConfig.ViewConfig.assertions: object expected");t.assertions=s.dataform.ActionConfig.TableAssertionsConfig.fromObject(e.assertions)}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.arrays||t.defaults)&&(n.dependencyTargets=[],n.tags=[],n.preOperations=[],n.postOperations=[],n.columns=[]),(t.objects||t.defaults)&&(n.labels={},n.additionalOptions={}),t.defaults&&(n.name="",n.dataset="",n.project="",n.filename="",n.disabled=!1,n.materialized=!1,n.description="",n.dependOnDependencyAssertions=!1,n.hermetic=!1,n.assertions=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(n.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(n.project=e.project),e.dependencyTargets&&e.dependencyTargets.length){n.dependencyTargets=[];for(var o=0;o<e.dependencyTargets.length;++o)n.dependencyTargets[o]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[o],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(n.filename=e.filename),e.tags&&e.tags.length)for(n.tags=[],o=0;o<e.tags.length;++o)n.tags[o]=e.tags[o];if(null!=e.disabled&&e.hasOwnProperty("disabled")&&(n.disabled=e.disabled),e.preOperations&&e.preOperations.length)for(n.preOperations=[],o=0;o<e.preOperations.length;++o)n.preOperations[o]=e.preOperations[o];if(e.postOperations&&e.postOperations.length)for(n.postOperations=[],o=0;o<e.postOperations.length;++o)n.postOperations[o]=e.postOperations[o];if(null!=e.materialized&&e.hasOwnProperty("materialized")&&(n.materialized=e.materialized),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),e.columns&&e.columns.length)for(n.columns=[],o=0;o<e.columns.length;++o)n.columns[o]=s.dataform.ActionConfig.ColumnDescriptor.toObject(e.columns[o],t);if(e.labels&&(r=Object.keys(e.labels)).length)for(n.labels={},o=0;o<r.length;++o)n.labels[r[o]]=e.labels[r[o]];if(e.additionalOptions&&(r=Object.keys(e.additionalOptions)).length)for(n.additionalOptions={},o=0;o<r.length;++o)n.additionalOptions[r[o]]=e.additionalOptions[r[o]];return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&(n.dependOnDependencyAssertions=e.dependOnDependencyAssertions),null!=e.hermetic&&e.hasOwnProperty("hermetic")&&(n.hermetic=e.hermetic),null!=e.assertions&&e.hasOwnProperty("assertions")&&(n.assertions=s.dataform.ActionConfig.TableAssertionsConfig.toObject(e.assertions,t)),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.ViewConfig"},t}(),t.OnSchemaChange=(n={},(l=Object.create(n))[n[0]="IGNORE"]=0,l[n[1]="FAIL"]=1,l[n[2]="EXTEND"]=2,l[n[3]="SYNCHRONIZE"]=3,l),t.IncrementalTableConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],this.preOperations=[],this.postOperations=[],this.uniqueKey=[],this.columns=[],this.clusterBy=[],this.labels={},this.additionalOptions={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.preOperations=a.emptyArray,t.prototype.postOperations=a.emptyArray,t.prototype.protected=!1,t.prototype.uniqueKey=a.emptyArray,t.prototype.description="",t.prototype.columns=a.emptyArray,t.prototype.partitionBy="",t.prototype.partitionExpirationDays=0,t.prototype.requirePartitionFilter=!1,t.prototype.updatePartitionFilter="",t.prototype.clusterBy=a.emptyArray,t.prototype.labels=a.emptyObject,t.prototype.additionalOptions=a.emptyObject,t.prototype.dependOnDependencyAssertions=!1,t.prototype.assertions=null,t.prototype.hermetic=!1,t.prototype.onSchemaChange=0,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(42).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(50).string(e.tags[r]);if(null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.preOperations&&e.preOperations.length)for(r=0;r<e.preOperations.length;++r)t.uint32(66).string(e.preOperations[r]);if(null!=e.postOperations&&e.postOperations.length)for(r=0;r<e.postOperations.length;++r)t.uint32(74).string(e.postOperations[r]);if(null!=e.protected&&Object.hasOwnProperty.call(e,"protected")&&t.uint32(80).bool(e.protected),null!=e.uniqueKey&&e.uniqueKey.length)for(r=0;r<e.uniqueKey.length;++r)t.uint32(90).string(e.uniqueKey[r]);if(null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(98).string(e.description),null!=e.columns&&e.columns.length)for(r=0;r<e.columns.length;++r)s.dataform.ActionConfig.ColumnDescriptor.encode(e.columns[r],t.uint32(106).fork()).ldelim();if(null!=e.partitionBy&&Object.hasOwnProperty.call(e,"partitionBy")&&t.uint32(114).string(e.partitionBy),null!=e.partitionExpirationDays&&Object.hasOwnProperty.call(e,"partitionExpirationDays")&&t.uint32(120).int32(e.partitionExpirationDays),null!=e.requirePartitionFilter&&Object.hasOwnProperty.call(e,"requirePartitionFilter")&&t.uint32(128).bool(e.requirePartitionFilter),null!=e.updatePartitionFilter&&Object.hasOwnProperty.call(e,"updatePartitionFilter")&&t.uint32(138).string(e.updatePartitionFilter),null!=e.clusterBy&&e.clusterBy.length)for(r=0;r<e.clusterBy.length;++r)t.uint32(146).string(e.clusterBy[r]);if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.uint32(154).fork().uint32(10).string(n[r]).uint32(18).string(e.labels[n[r]]).ldelim()}if(null!=e.additionalOptions&&Object.hasOwnProperty.call(e,"additionalOptions"))for(n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.uint32(162).fork().uint32(10).string(n[r]).uint32(18).string(e.additionalOptions[n[r]]).ldelim();return null!=e.dependOnDependencyAssertions&&Object.hasOwnProperty.call(e,"dependOnDependencyAssertions")&&t.uint32(168).bool(e.dependOnDependencyAssertions),null!=e.assertions&&Object.hasOwnProperty.call(e,"assertions")&&s.dataform.ActionConfig.TableAssertionsConfig.encode(e.assertions,t.uint32(178).fork()).ldelim(),null!=e.hermetic&&Object.hasOwnProperty.call(e,"hermetic")&&t.uint32(184).bool(e.hermetic),null!=e.onSchemaChange&&Object.hasOwnProperty.call(e,"onSchemaChange")&&t.uint32(192).int32(e.onSchemaChange),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.ActionConfig.IncrementalTableConfig;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.name=e.string();break;case 2:l.dataset=e.string();break;case 3:l.project=e.string();break;case 4:l.dependencyTargets&&l.dependencyTargets.length||(l.dependencyTargets=[]),l.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 5:l.filename=e.string();break;case 6:l.tags&&l.tags.length||(l.tags=[]),l.tags.push(e.string());break;case 7:l.disabled=e.bool();break;case 8:l.preOperations&&l.preOperations.length||(l.preOperations=[]),l.preOperations.push(e.string());break;case 9:l.postOperations&&l.postOperations.length||(l.postOperations=[]),l.postOperations.push(e.string());break;case 10:l.protected=e.bool();break;case 11:l.uniqueKey&&l.uniqueKey.length||(l.uniqueKey=[]),l.uniqueKey.push(e.string());break;case 12:l.description=e.string();break;case 13:l.columns&&l.columns.length||(l.columns=[]),l.columns.push(s.dataform.ActionConfig.ColumnDescriptor.decode(e,e.uint32()));break;case 14:l.partitionBy=e.string();break;case 15:l.partitionExpirationDays=e.int32();break;case 16:l.requirePartitionFilter=e.bool();break;case 17:l.updatePartitionFilter=e.string();break;case 18:l.clusterBy&&l.clusterBy.length||(l.clusterBy=[]),l.clusterBy.push(e.string());break;case 19:l.labels===a.emptyObject&&(l.labels={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;)switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}l.labels[r]=n;break;case 20:for(l.additionalOptions===a.emptyObject&&(l.additionalOptions={}),u=e.uint32()+e.pos,r="",n="";e.pos<u;){var p;switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.additionalOptions[r]=n;break;case 21:l.dependOnDependencyAssertions=e.bool();break;case 22:l.assertions=s.dataform.ActionConfig.TableAssertionsConfig.decode(e,e.uint32());break;case 23:l.hermetic=e.bool();break;case 24:l.onSchemaChange=e.int32();break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t)if(n=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+n}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.preOperations&&e.hasOwnProperty("preOperations")){if(!Array.isArray(e.preOperations))return"preOperations: array expected";for(t=0;t<e.preOperations.length;++t)if(!a.isString(e.preOperations[t]))return"preOperations: string[] expected"}if(null!=e.postOperations&&e.hasOwnProperty("postOperations")){if(!Array.isArray(e.postOperations))return"postOperations: array expected";for(t=0;t<e.postOperations.length;++t)if(!a.isString(e.postOperations[t]))return"postOperations: string[] expected"}if(null!=e.protected&&e.hasOwnProperty("protected")&&"boolean"!=typeof e.protected)return"protected: boolean expected";if(null!=e.uniqueKey&&e.hasOwnProperty("uniqueKey")){if(!Array.isArray(e.uniqueKey))return"uniqueKey: array expected";for(t=0;t<e.uniqueKey.length;++t)if(!a.isString(e.uniqueKey[t]))return"uniqueKey: string[] expected"}if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.columns&&e.hasOwnProperty("columns")){if(!Array.isArray(e.columns))return"columns: array expected";for(t=0;t<e.columns.length;++t)if(n=s.dataform.ActionConfig.ColumnDescriptor.verify(e.columns[t]))return"columns."+n}if(null!=e.partitionBy&&e.hasOwnProperty("partitionBy")&&!a.isString(e.partitionBy))return"partitionBy: string expected";if(null!=e.partitionExpirationDays&&e.hasOwnProperty("partitionExpirationDays")&&!a.isInteger(e.partitionExpirationDays))return"partitionExpirationDays: integer expected";if(null!=e.requirePartitionFilter&&e.hasOwnProperty("requirePartitionFilter")&&"boolean"!=typeof e.requirePartitionFilter)return"requirePartitionFilter: boolean expected";if(null!=e.updatePartitionFilter&&e.hasOwnProperty("updatePartitionFilter")&&!a.isString(e.updatePartitionFilter))return"updatePartitionFilter: string expected";if(null!=e.clusterBy&&e.hasOwnProperty("clusterBy")){if(!Array.isArray(e.clusterBy))return"clusterBy: array expected";for(t=0;t<e.clusterBy.length;++t)if(!a.isString(e.clusterBy[t]))return"clusterBy: string[] expected"}if(null!=e.labels&&e.hasOwnProperty("labels")){if(!a.isObject(e.labels))return"labels: object expected";var r=Object.keys(e.labels);for(t=0;t<r.length;++t)if(!a.isString(e.labels[r[t]]))return"labels: string{k:string} expected"}if(null!=e.additionalOptions&&e.hasOwnProperty("additionalOptions")){if(!a.isObject(e.additionalOptions))return"additionalOptions: object expected";for(r=Object.keys(e.additionalOptions),t=0;t<r.length;++t)if(!a.isString(e.additionalOptions[r[t]]))return"additionalOptions: string{k:string} expected"}if(null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&"boolean"!=typeof e.dependOnDependencyAssertions)return"dependOnDependencyAssertions: boolean expected";var n;if(null!=e.assertions&&e.hasOwnProperty("assertions")&&(n=s.dataform.ActionConfig.TableAssertionsConfig.verify(e.assertions)))return"assertions."+n;if(null!=e.hermetic&&e.hasOwnProperty("hermetic")&&"boolean"!=typeof e.hermetic)return"hermetic: boolean expected";if(null!=e.onSchemaChange&&e.hasOwnProperty("onSchemaChange"))switch(e.onSchemaChange){default:return"onSchemaChange: enum value expected";case 0:case 1:case 2:case 3:}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.IncrementalTableConfig)return e;var t=new s.dataform.ActionConfig.IncrementalTableConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),e.preOperations){if(!Array.isArray(e.preOperations))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.preOperations: array expected");for(t.preOperations=[],r=0;r<e.preOperations.length;++r)t.preOperations[r]=String(e.preOperations[r])}if(e.postOperations){if(!Array.isArray(e.postOperations))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.postOperations: array expected");for(t.postOperations=[],r=0;r<e.postOperations.length;++r)t.postOperations[r]=String(e.postOperations[r])}if(null!=e.protected&&(t.protected=Boolean(e.protected)),e.uniqueKey){if(!Array.isArray(e.uniqueKey))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.uniqueKey: array expected");for(t.uniqueKey=[],r=0;r<e.uniqueKey.length;++r)t.uniqueKey[r]=String(e.uniqueKey[r])}if(null!=e.description&&(t.description=String(e.description)),e.columns){if(!Array.isArray(e.columns))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.columns: array expected");for(t.columns=[],r=0;r<e.columns.length;++r){if("object"!=typeof e.columns[r])throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.columns: object expected");t.columns[r]=s.dataform.ActionConfig.ColumnDescriptor.fromObject(e.columns[r])}}if(null!=e.partitionBy&&(t.partitionBy=String(e.partitionBy)),null!=e.partitionExpirationDays&&(t.partitionExpirationDays=0|e.partitionExpirationDays),null!=e.requirePartitionFilter&&(t.requirePartitionFilter=Boolean(e.requirePartitionFilter)),null!=e.updatePartitionFilter&&(t.updatePartitionFilter=String(e.updatePartitionFilter)),e.clusterBy){if(!Array.isArray(e.clusterBy))throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.clusterBy: array expected");for(t.clusterBy=[],r=0;r<e.clusterBy.length;++r)t.clusterBy[r]=String(e.clusterBy[r])}if(e.labels){if("object"!=typeof e.labels)throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.labels: object expected");t.labels={};var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.labels[n[r]]=String(e.labels[n[r]])}if(e.additionalOptions){if("object"!=typeof e.additionalOptions)throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.additionalOptions: object expected");for(t.additionalOptions={},n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.additionalOptions[n[r]]=String(e.additionalOptions[n[r]])}if(null!=e.dependOnDependencyAssertions&&(t.dependOnDependencyAssertions=Boolean(e.dependOnDependencyAssertions)),null!=e.assertions){if("object"!=typeof e.assertions)throw TypeError(".dataform.ActionConfig.IncrementalTableConfig.assertions: object expected");t.assertions=s.dataform.ActionConfig.TableAssertionsConfig.fromObject(e.assertions)}switch(null!=e.hermetic&&(t.hermetic=Boolean(e.hermetic)),e.onSchemaChange){default:if("number"==typeof e.onSchemaChange){t.onSchemaChange=e.onSchemaChange;break}break;case"IGNORE":case 0:t.onSchemaChange=0;break;case"FAIL":case 1:t.onSchemaChange=1;break;case"EXTEND":case 2:t.onSchemaChange=2;break;case"SYNCHRONIZE":case 3:t.onSchemaChange=3}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.arrays||t.defaults)&&(n.dependencyTargets=[],n.tags=[],n.preOperations=[],n.postOperations=[],n.uniqueKey=[],n.columns=[],n.clusterBy=[]),(t.objects||t.defaults)&&(n.labels={},n.additionalOptions={}),t.defaults&&(n.name="",n.dataset="",n.project="",n.filename="",n.disabled=!1,n.protected=!1,n.description="",n.partitionBy="",n.partitionExpirationDays=0,n.requirePartitionFilter=!1,n.updatePartitionFilter="",n.dependOnDependencyAssertions=!1,n.assertions=null,n.hermetic=!1,n.onSchemaChange=t.enums===String?"IGNORE":0),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(n.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(n.project=e.project),e.dependencyTargets&&e.dependencyTargets.length){n.dependencyTargets=[];for(var o=0;o<e.dependencyTargets.length;++o)n.dependencyTargets[o]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[o],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(n.filename=e.filename),e.tags&&e.tags.length)for(n.tags=[],o=0;o<e.tags.length;++o)n.tags[o]=e.tags[o];if(null!=e.disabled&&e.hasOwnProperty("disabled")&&(n.disabled=e.disabled),e.preOperations&&e.preOperations.length)for(n.preOperations=[],o=0;o<e.preOperations.length;++o)n.preOperations[o]=e.preOperations[o];if(e.postOperations&&e.postOperations.length)for(n.postOperations=[],o=0;o<e.postOperations.length;++o)n.postOperations[o]=e.postOperations[o];if(null!=e.protected&&e.hasOwnProperty("protected")&&(n.protected=e.protected),e.uniqueKey&&e.uniqueKey.length)for(n.uniqueKey=[],o=0;o<e.uniqueKey.length;++o)n.uniqueKey[o]=e.uniqueKey[o];if(null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),e.columns&&e.columns.length)for(n.columns=[],o=0;o<e.columns.length;++o)n.columns[o]=s.dataform.ActionConfig.ColumnDescriptor.toObject(e.columns[o],t);if(null!=e.partitionBy&&e.hasOwnProperty("partitionBy")&&(n.partitionBy=e.partitionBy),null!=e.partitionExpirationDays&&e.hasOwnProperty("partitionExpirationDays")&&(n.partitionExpirationDays=e.partitionExpirationDays),null!=e.requirePartitionFilter&&e.hasOwnProperty("requirePartitionFilter")&&(n.requirePartitionFilter=e.requirePartitionFilter),null!=e.updatePartitionFilter&&e.hasOwnProperty("updatePartitionFilter")&&(n.updatePartitionFilter=e.updatePartitionFilter),e.clusterBy&&e.clusterBy.length)for(n.clusterBy=[],o=0;o<e.clusterBy.length;++o)n.clusterBy[o]=e.clusterBy[o];if(e.labels&&(r=Object.keys(e.labels)).length)for(n.labels={},o=0;o<r.length;++o)n.labels[r[o]]=e.labels[r[o]];if(e.additionalOptions&&(r=Object.keys(e.additionalOptions)).length)for(n.additionalOptions={},o=0;o<r.length;++o)n.additionalOptions[r[o]]=e.additionalOptions[r[o]];return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&(n.dependOnDependencyAssertions=e.dependOnDependencyAssertions),null!=e.assertions&&e.hasOwnProperty("assertions")&&(n.assertions=s.dataform.ActionConfig.TableAssertionsConfig.toObject(e.assertions,t)),null!=e.hermetic&&e.hasOwnProperty("hermetic")&&(n.hermetic=e.hermetic),null!=e.onSchemaChange&&e.hasOwnProperty("onSchemaChange")&&(n.onSchemaChange=t.enums===String?void 0===s.dataform.ActionConfig.OnSchemaChange[e.onSchemaChange]?e.onSchemaChange:s.dataform.ActionConfig.OnSchemaChange[e.onSchemaChange]:e.onSchemaChange),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.IncrementalTableConfig"},t}(),t.AssertionConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.description="",t.prototype.hermetic=!1,t.prototype.dependOnDependencyAssertions=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(42).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(50).string(e.tags[r]);return null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(66).string(e.description),null!=e.hermetic&&Object.hasOwnProperty.call(e,"hermetic")&&t.uint32(72).bool(e.hermetic),null!=e.dependOnDependencyAssertions&&Object.hasOwnProperty.call(e,"dependOnDependencyAssertions")&&t.uint32(80).bool(e.dependOnDependencyAssertions),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.AssertionConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.dataset=e.string();break;case 3:n.project=e.string();break;case 4:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 5:n.filename=e.string();break;case 6:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 7:n.disabled=e.bool();break;case 8:n.description=e.string();break;case 9:n.hermetic=e.bool();break;case 10:n.dependOnDependencyAssertions=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t){var r=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]);if(r)return"dependencyTargets."+r}}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled?"disabled: boolean expected":null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description)?"description: string expected":null!=e.hermetic&&e.hasOwnProperty("hermetic")&&"boolean"!=typeof e.hermetic?"hermetic: boolean expected":null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&"boolean"!=typeof e.dependOnDependencyAssertions?"dependOnDependencyAssertions: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.AssertionConfig)return e;var t=new s.dataform.ActionConfig.AssertionConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.AssertionConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.AssertionConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.AssertionConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}return null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.description&&(t.description=String(e.description)),null!=e.hermetic&&(t.hermetic=Boolean(e.hermetic)),null!=e.dependOnDependencyAssertions&&(t.dependOnDependencyAssertions=Boolean(e.dependOnDependencyAssertions)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dependencyTargets=[],r.tags=[]),t.defaults&&(r.name="",r.dataset="",r.project="",r.filename="",r.disabled=!1,r.description="",r.hermetic=!1,r.dependOnDependencyAssertions=!1),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(r.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),e.dependencyTargets&&e.dependencyTargets.length){r.dependencyTargets=[];for(var n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[n],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(r.filename=e.filename),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];return null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),null!=e.hermetic&&e.hasOwnProperty("hermetic")&&(r.hermetic=e.hermetic),null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&(r.dependOnDependencyAssertions=e.dependOnDependencyAssertions),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.AssertionConfig"},t}(),t.OperationConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],this.columns=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.hasOutput=!1,t.prototype.description="",t.prototype.columns=a.emptyArray,t.prototype.dependOnDependencyAssertions=!1,t.prototype.hermetic=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(42).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(50).string(e.tags[r]);if(null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.hasOutput&&Object.hasOwnProperty.call(e,"hasOutput")&&t.uint32(64).bool(e.hasOutput),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(74).string(e.description),null!=e.columns&&e.columns.length)for(r=0;r<e.columns.length;++r)s.dataform.ActionConfig.ColumnDescriptor.encode(e.columns[r],t.uint32(82).fork()).ldelim();return null!=e.dependOnDependencyAssertions&&Object.hasOwnProperty.call(e,"dependOnDependencyAssertions")&&t.uint32(88).bool(e.dependOnDependencyAssertions),null!=e.hermetic&&Object.hasOwnProperty.call(e,"hermetic")&&t.uint32(96).bool(e.hermetic),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.OperationConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.dataset=e.string();break;case 3:n.project=e.string();break;case 4:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 5:n.filename=e.string();break;case 6:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 7:n.disabled=e.bool();break;case 8:n.hasOutput=e.bool();break;case 9:n.description=e.string();break;case 10:n.columns&&n.columns.length||(n.columns=[]),n.columns.push(s.dataform.ActionConfig.ColumnDescriptor.decode(e,e.uint32()));break;case 11:n.dependOnDependencyAssertions=e.bool();break;case 12:n.hermetic=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t)if(r=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.hasOutput&&e.hasOwnProperty("hasOutput")&&"boolean"!=typeof e.hasOutput)return"hasOutput: boolean expected";if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.columns&&e.hasOwnProperty("columns")){if(!Array.isArray(e.columns))return"columns: array expected";for(t=0;t<e.columns.length;++t){var r;if(r=s.dataform.ActionConfig.ColumnDescriptor.verify(e.columns[t]))return"columns."+r}}return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&"boolean"!=typeof e.dependOnDependencyAssertions?"dependOnDependencyAssertions: boolean expected":null!=e.hermetic&&e.hasOwnProperty("hermetic")&&"boolean"!=typeof e.hermetic?"hermetic: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.OperationConfig)return e;var t=new s.dataform.ActionConfig.OperationConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.OperationConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.OperationConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.OperationConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.hasOutput&&(t.hasOutput=Boolean(e.hasOutput)),null!=e.description&&(t.description=String(e.description)),e.columns){if(!Array.isArray(e.columns))throw TypeError(".dataform.ActionConfig.OperationConfig.columns: array expected");for(t.columns=[],r=0;r<e.columns.length;++r){if("object"!=typeof e.columns[r])throw TypeError(".dataform.ActionConfig.OperationConfig.columns: object expected");t.columns[r]=s.dataform.ActionConfig.ColumnDescriptor.fromObject(e.columns[r])}}return null!=e.dependOnDependencyAssertions&&(t.dependOnDependencyAssertions=Boolean(e.dependOnDependencyAssertions)),null!=e.hermetic&&(t.hermetic=Boolean(e.hermetic)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dependencyTargets=[],r.tags=[],r.columns=[]),t.defaults&&(r.name="",r.dataset="",r.project="",r.filename="",r.disabled=!1,r.hasOutput=!1,r.description="",r.dependOnDependencyAssertions=!1,r.hermetic=!1),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(r.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),e.dependencyTargets&&e.dependencyTargets.length){r.dependencyTargets=[];for(var n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[n],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(r.filename=e.filename),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];if(null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.hasOutput&&e.hasOwnProperty("hasOutput")&&(r.hasOutput=e.hasOutput),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),e.columns&&e.columns.length)for(r.columns=[],n=0;n<e.columns.length;++n)r.columns[n]=s.dataform.ActionConfig.ColumnDescriptor.toObject(e.columns[n],t);return null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&(r.dependOnDependencyAssertions=e.dependOnDependencyAssertions),null!=e.hermetic&&e.hasOwnProperty("hermetic")&&(r.hermetic=e.hermetic),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.OperationConfig"},t}(),t.DeclarationConfig=function(){function t(e){if(this.columns=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.description="",t.prototype.columns=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(34).string(e.description),null!=e.columns&&e.columns.length)for(var r=0;r<e.columns.length;++r)s.dataform.ActionConfig.ColumnDescriptor.encode(e.columns[r],t.uint32(42).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.DeclarationConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.dataset=e.string();break;case 3:n.project=e.string();break;case 4:n.description=e.string();break;case 5:n.columns&&n.columns.length||(n.columns=[]),n.columns.push(s.dataform.ActionConfig.ColumnDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.columns&&e.hasOwnProperty("columns")){if(!Array.isArray(e.columns))return"columns: array expected";for(var t=0;t<e.columns.length;++t){var r=s.dataform.ActionConfig.ColumnDescriptor.verify(e.columns[t]);if(r)return"columns."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.DeclarationConfig)return e;var t=new s.dataform.ActionConfig.DeclarationConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),null!=e.description&&(t.description=String(e.description)),e.columns){if(!Array.isArray(e.columns))throw TypeError(".dataform.ActionConfig.DeclarationConfig.columns: array expected");t.columns=[];for(var r=0;r<e.columns.length;++r){if("object"!=typeof e.columns[r])throw TypeError(".dataform.ActionConfig.DeclarationConfig.columns: object expected");t.columns[r]=s.dataform.ActionConfig.ColumnDescriptor.fromObject(e.columns[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.columns=[]),t.defaults&&(r.name="",r.dataset="",r.project="",r.description=""),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(r.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),e.columns&&e.columns.length){r.columns=[];for(var n=0;n<e.columns.length;++n)r.columns[n]=s.dataform.ActionConfig.ColumnDescriptor.toObject(e.columns[n],t)}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.DeclarationConfig"},t}(),t.NotebookConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.location="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.description="",t.prototype.dependOnDependencyAssertions=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.location&&Object.hasOwnProperty.call(e,"location")&&t.uint32(18).string(e.location),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(42).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(50).string(e.tags[r]);return null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(66).string(e.description),null!=e.dependOnDependencyAssertions&&Object.hasOwnProperty.call(e,"dependOnDependencyAssertions")&&t.uint32(72).bool(e.dependOnDependencyAssertions),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.NotebookConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.location=e.string();break;case 3:n.project=e.string();break;case 4:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 5:n.filename=e.string();break;case 6:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 7:n.disabled=e.bool();break;case 8:n.description=e.string();break;case 9:n.dependOnDependencyAssertions=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.location&&e.hasOwnProperty("location")&&!a.isString(e.location))return"location: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t){var r=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]);if(r)return"dependencyTargets."+r}}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled?"disabled: boolean expected":null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description)?"description: string expected":null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&"boolean"!=typeof e.dependOnDependencyAssertions?"dependOnDependencyAssertions: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.NotebookConfig)return e;var t=new s.dataform.ActionConfig.NotebookConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.location&&(t.location=String(e.location)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.NotebookConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.NotebookConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.NotebookConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}return null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.description&&(t.description=String(e.description)),null!=e.dependOnDependencyAssertions&&(t.dependOnDependencyAssertions=Boolean(e.dependOnDependencyAssertions)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dependencyTargets=[],r.tags=[]),t.defaults&&(r.name="",r.location="",r.project="",r.filename="",r.disabled=!1,r.description="",r.dependOnDependencyAssertions=!1),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.location&&e.hasOwnProperty("location")&&(r.location=e.location),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),e.dependencyTargets&&e.dependencyTargets.length){r.dependencyTargets=[];for(var n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[n],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(r.filename=e.filename),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];return null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),null!=e.dependOnDependencyAssertions&&e.hasOwnProperty("dependOnDependencyAssertions")&&(r.dependOnDependencyAssertions=e.dependOnDependencyAssertions),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.NotebookConfig"},t}(),t.DataPreparationConfig=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.filename="",t.prototype.tags=a.emptyArray,t.prototype.disabled=!1,t.prototype.description="",t.prototype.errorTable=null,t.prototype.loadMode=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dependencyTargets&&e.dependencyTargets.length)for(var r=0;r<e.dependencyTargets.length;++r)s.dataform.ActionConfig.Target.encode(e.dependencyTargets[r],t.uint32(18).fork()).ldelim();if(null!=e.filename&&Object.hasOwnProperty.call(e,"filename")&&t.uint32(26).string(e.filename),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(34).string(e.tags[r]);return null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(56).bool(e.disabled),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(66).string(e.description),null!=e.errorTable&&Object.hasOwnProperty.call(e,"errorTable")&&s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.encode(e.errorTable,t.uint32(90).fork()).ldelim(),null!=e.loadMode&&Object.hasOwnProperty.call(e,"loadMode")&&s.dataform.ActionConfig.LoadModeConfig.encode(e.loadMode,t.uint32(98).fork()).ldelim(),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(106).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(114).string(e.project),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.DataPreparationConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 13:n.dataset=e.string();break;case 14:n.project=e.string();break;case 2:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.ActionConfig.Target.decode(e,e.uint32()));break;case 3:n.filename=e.string();break;case 4:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 7:n.disabled=e.bool();break;case 8:n.description=e.string();break;case 11:n.errorTable=s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.decode(e,e.uint32());break;case 12:n.loadMode=s.dataform.ActionConfig.LoadModeConfig.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset))return"dataset: string expected";if(null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project))return"project: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t)if(r=s.dataform.ActionConfig.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}if(null!=e.filename&&e.hasOwnProperty("filename")&&!a.isString(e.filename))return"filename: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled?"disabled: boolean expected":null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description)?"description: string expected":null!=e.errorTable&&e.hasOwnProperty("errorTable")&&(r=s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.verify(e.errorTable))?"errorTable."+r:null!=e.loadMode&&e.hasOwnProperty("loadMode")&&(r=s.dataform.ActionConfig.LoadModeConfig.verify(e.loadMode))?"loadMode."+r:null;var r},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.DataPreparationConfig)return e;var t=new s.dataform.ActionConfig.DataPreparationConfig;if(null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ActionConfig.DataPreparationConfig.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ActionConfig.DataPreparationConfig.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.ActionConfig.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.filename&&(t.filename=String(e.filename)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ActionConfig.DataPreparationConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.description&&(t.description=String(e.description)),null!=e.errorTable){if("object"!=typeof e.errorTable)throw TypeError(".dataform.ActionConfig.DataPreparationConfig.errorTable: object expected");t.errorTable=s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.fromObject(e.errorTable)}if(null!=e.loadMode){if("object"!=typeof e.loadMode)throw TypeError(".dataform.ActionConfig.DataPreparationConfig.loadMode: object expected");t.loadMode=s.dataform.ActionConfig.LoadModeConfig.fromObject(e.loadMode)}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dependencyTargets=[],r.tags=[]),t.defaults&&(r.name="",r.filename="",r.disabled=!1,r.description="",r.errorTable=null,r.loadMode=null,r.dataset="",r.project=""),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),e.dependencyTargets&&e.dependencyTargets.length){r.dependencyTargets=[];for(var n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.ActionConfig.Target.toObject(e.dependencyTargets[n],t)}if(null!=e.filename&&e.hasOwnProperty("filename")&&(r.filename=e.filename),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];return null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),null!=e.errorTable&&e.hasOwnProperty("errorTable")&&(r.errorTable=s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.toObject(e.errorTable,t)),null!=e.loadMode&&e.hasOwnProperty("loadMode")&&(r.loadMode=s.dataform.ActionConfig.LoadModeConfig.toObject(e.loadMode,t)),null!=e.dataset&&e.hasOwnProperty("dataset")&&(r.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.DataPreparationConfig"},t.ErrorTableConfig=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.dataset="",t.prototype.project="",t.prototype.retentionDays=0,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.dataset&&Object.hasOwnProperty.call(e,"dataset")&&t.uint32(18).string(e.dataset),null!=e.project&&Object.hasOwnProperty.call(e,"project")&&t.uint32(26).string(e.project),null!=e.retentionDays&&Object.hasOwnProperty.call(e,"retentionDays")&&t.uint32(32).int32(e.retentionDays),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.dataset=e.string();break;case 3:n.project=e.string();break;case 4:n.retentionDays=e.int32();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name)?"name: string expected":null!=e.dataset&&e.hasOwnProperty("dataset")&&!a.isString(e.dataset)?"dataset: string expected":null!=e.project&&e.hasOwnProperty("project")&&!a.isString(e.project)?"project: string expected":null!=e.retentionDays&&e.hasOwnProperty("retentionDays")&&!a.isInteger(e.retentionDays)?"retentionDays: integer expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig)return e;var t=new s.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig;return null!=e.name&&(t.name=String(e.name)),null!=e.dataset&&(t.dataset=String(e.dataset)),null!=e.project&&(t.project=String(e.project)),null!=e.retentionDays&&(t.retentionDays=0|e.retentionDays),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.name="",r.dataset="",r.project="",r.retentionDays=0),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.dataset&&e.hasOwnProperty("dataset")&&(r.dataset=e.dataset),null!=e.project&&e.hasOwnProperty("project")&&(r.project=e.project),null!=e.retentionDays&&e.hasOwnProperty("retentionDays")&&(r.retentionDays=e.retentionDays),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig"},t}(),t}(),t.LoadModeConfig=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.mode=0,t.prototype.incrementalColumn="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.mode&&Object.hasOwnProperty.call(e,"mode")&&t.uint32(8).int32(e.mode),null!=e.incrementalColumn&&Object.hasOwnProperty.call(e,"incrementalColumn")&&t.uint32(18).string(e.incrementalColumn),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionConfig.LoadModeConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.mode=e.int32();break;case 2:n.incrementalColumn=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.mode&&e.hasOwnProperty("mode"))switch(e.mode){default:return"mode: enum value expected";case 0:case 1:case 2:case 3:}return null!=e.incrementalColumn&&e.hasOwnProperty("incrementalColumn")&&!a.isString(e.incrementalColumn)?"incrementalColumn: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ActionConfig.LoadModeConfig)return e;var t=new s.dataform.ActionConfig.LoadModeConfig;switch(e.mode){default:if("number"==typeof e.mode){t.mode=e.mode;break}break;case"REPLACE_TABLE":case 0:t.mode=0;break;case"APPEND":case 1:t.mode=1;break;case"MAXIMUM":case 2:t.mode=2;break;case"UNIQUE":case 3:t.mode=3}return null!=e.incrementalColumn&&(t.incrementalColumn=String(e.incrementalColumn)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.mode=t.enums===String?"REPLACE_TABLE":0,r.incrementalColumn=""),null!=e.mode&&e.hasOwnProperty("mode")&&(r.mode=t.enums===String?void 0===s.dataform.ActionConfig.LoadMode[e.mode]?e.mode:s.dataform.ActionConfig.LoadMode[e.mode]:e.mode),null!=e.incrementalColumn&&e.hasOwnProperty("incrementalColumn")&&(r.incrementalColumn=e.incrementalColumn),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionConfig.LoadModeConfig"},t}(),t.LoadMode=function(){var e={},t=Object.create(e);return t[e[0]="REPLACE_TABLE"]=0,t[e[1]="APPEND"]=1,t[e[2]="MAXIMUM"]=2,t[e[3]="UNIQUE"]=3,t}(),t}(),n.NotebookRuntimeOptionsConfig=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.outputBucket=null,t.prototype.runtimeTemplateName="",Object.defineProperty(t.prototype,"outputSink",{get:a.oneOfGetter(r=["outputBucket"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.outputBucket&&Object.hasOwnProperty.call(e,"outputBucket")&&t.uint32(10).string(e.outputBucket),null!=e.runtimeTemplateName&&Object.hasOwnProperty.call(e,"runtimeTemplateName")&&t.uint32(18).string(e.runtimeTemplateName),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.NotebookRuntimeOptionsConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.outputBucket=e.string();break;case 2:n.runtimeTemplateName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.outputBucket&&e.hasOwnProperty("outputBucket")&&!a.isString(e.outputBucket)?"outputBucket: string expected":null!=e.runtimeTemplateName&&e.hasOwnProperty("runtimeTemplateName")&&!a.isString(e.runtimeTemplateName)?"runtimeTemplateName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.NotebookRuntimeOptionsConfig)return e;var t=new s.dataform.NotebookRuntimeOptionsConfig;return null!=e.outputBucket&&(t.outputBucket=String(e.outputBucket)),null!=e.runtimeTemplateName&&(t.runtimeTemplateName=String(e.runtimeTemplateName)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.runtimeTemplateName=""),null!=e.outputBucket&&e.hasOwnProperty("outputBucket")&&(r.outputBucket=e.outputBucket,t.oneofs&&(r.outputSink="outputBucket")),null!=e.runtimeTemplateName&&e.hasOwnProperty("runtimeTemplateName")&&(r.runtimeTemplateName=e.runtimeTemplateName),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.NotebookRuntimeOptionsConfig"},t}(),n.ProjectConfig=function(){function t(e){if(this.vars={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.warehouse="",t.prototype.defaultDatabase="",t.prototype.defaultSchema="",t.prototype.defaultLocation="",t.prototype.assertionSchema="",t.prototype.vars=a.emptyObject,t.prototype.databaseSuffix="",t.prototype.schemaSuffix="",t.prototype.tablePrefix="",t.prototype.defaultNotebookRuntimeOptions=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.warehouse&&Object.hasOwnProperty.call(e,"warehouse")&&t.uint32(10).string(e.warehouse),null!=e.defaultSchema&&Object.hasOwnProperty.call(e,"defaultSchema")&&t.uint32(18).string(e.defaultSchema),null!=e.assertionSchema&&Object.hasOwnProperty.call(e,"assertionSchema")&&t.uint32(42).string(e.assertionSchema),null!=e.schemaSuffix&&Object.hasOwnProperty.call(e,"schemaSuffix")&&t.uint32(58).string(e.schemaSuffix),null!=e.defaultDatabase&&Object.hasOwnProperty.call(e,"defaultDatabase")&&t.uint32(74).string(e.defaultDatabase),null!=e.tablePrefix&&Object.hasOwnProperty.call(e,"tablePrefix")&&t.uint32(90).string(e.tablePrefix),null!=e.vars&&Object.hasOwnProperty.call(e,"vars"))for(var r=Object.keys(e.vars),n=0;n<r.length;++n)t.uint32(114).fork().uint32(10).string(r[n]).uint32(18).string(e.vars[r[n]]).ldelim();return null!=e.databaseSuffix&&Object.hasOwnProperty.call(e,"databaseSuffix")&&t.uint32(122).string(e.databaseSuffix),null!=e.defaultLocation&&Object.hasOwnProperty.call(e,"defaultLocation")&&t.uint32(130).string(e.defaultLocation),null!=e.defaultNotebookRuntimeOptions&&Object.hasOwnProperty.call(e,"defaultNotebookRuntimeOptions")&&s.dataform.NotebookRuntimeOptions.encode(e.defaultNotebookRuntimeOptions,t.uint32(138).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.ProjectConfig;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.warehouse=e.string();break;case 9:l.defaultDatabase=e.string();break;case 2:l.defaultSchema=e.string();break;case 16:l.defaultLocation=e.string();break;case 5:l.assertionSchema=e.string();break;case 14:l.vars===a.emptyObject&&(l.vars={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;){var p=e.uint32();switch(p>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.vars[r]=n;break;case 15:l.databaseSuffix=e.string();break;case 7:l.schemaSuffix=e.string();break;case 11:l.tablePrefix=e.string();break;case 17:l.defaultNotebookRuntimeOptions=s.dataform.NotebookRuntimeOptions.decode(e,e.uint32());break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.warehouse&&e.hasOwnProperty("warehouse")&&!a.isString(e.warehouse))return"warehouse: string expected";if(null!=e.defaultDatabase&&e.hasOwnProperty("defaultDatabase")&&!a.isString(e.defaultDatabase))return"defaultDatabase: string expected";if(null!=e.defaultSchema&&e.hasOwnProperty("defaultSchema")&&!a.isString(e.defaultSchema))return"defaultSchema: string expected";if(null!=e.defaultLocation&&e.hasOwnProperty("defaultLocation")&&!a.isString(e.defaultLocation))return"defaultLocation: string expected";if(null!=e.assertionSchema&&e.hasOwnProperty("assertionSchema")&&!a.isString(e.assertionSchema))return"assertionSchema: string expected";if(null!=e.vars&&e.hasOwnProperty("vars")){if(!a.isObject(e.vars))return"vars: object expected";for(var t=Object.keys(e.vars),r=0;r<t.length;++r)if(!a.isString(e.vars[t[r]]))return"vars: string{k:string} expected"}if(null!=e.databaseSuffix&&e.hasOwnProperty("databaseSuffix")&&!a.isString(e.databaseSuffix))return"databaseSuffix: string expected";if(null!=e.schemaSuffix&&e.hasOwnProperty("schemaSuffix")&&!a.isString(e.schemaSuffix))return"schemaSuffix: string expected";if(null!=e.tablePrefix&&e.hasOwnProperty("tablePrefix")&&!a.isString(e.tablePrefix))return"tablePrefix: string expected";if(null!=e.defaultNotebookRuntimeOptions&&e.hasOwnProperty("defaultNotebookRuntimeOptions")){var n=s.dataform.NotebookRuntimeOptions.verify(e.defaultNotebookRuntimeOptions);if(n)return"defaultNotebookRuntimeOptions."+n}return null},t.fromObject=function(e){if(e instanceof s.dataform.ProjectConfig)return e;var t=new s.dataform.ProjectConfig;if(null!=e.warehouse&&(t.warehouse=String(e.warehouse)),null!=e.defaultDatabase&&(t.defaultDatabase=String(e.defaultDatabase)),null!=e.defaultSchema&&(t.defaultSchema=String(e.defaultSchema)),null!=e.defaultLocation&&(t.defaultLocation=String(e.defaultLocation)),null!=e.assertionSchema&&(t.assertionSchema=String(e.assertionSchema)),e.vars){if("object"!=typeof e.vars)throw TypeError(".dataform.ProjectConfig.vars: object expected");t.vars={};for(var r=Object.keys(e.vars),n=0;n<r.length;++n)t.vars[r[n]]=String(e.vars[r[n]])}if(null!=e.databaseSuffix&&(t.databaseSuffix=String(e.databaseSuffix)),null!=e.schemaSuffix&&(t.schemaSuffix=String(e.schemaSuffix)),null!=e.tablePrefix&&(t.tablePrefix=String(e.tablePrefix)),null!=e.defaultNotebookRuntimeOptions){if("object"!=typeof e.defaultNotebookRuntimeOptions)throw TypeError(".dataform.ProjectConfig.defaultNotebookRuntimeOptions: object expected");t.defaultNotebookRuntimeOptions=s.dataform.NotebookRuntimeOptions.fromObject(e.defaultNotebookRuntimeOptions)}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.objects||t.defaults)&&(n.vars={}),t.defaults&&(n.warehouse="",n.defaultSchema="",n.assertionSchema="",n.schemaSuffix="",n.defaultDatabase="",n.tablePrefix="",n.databaseSuffix="",n.defaultLocation="",n.defaultNotebookRuntimeOptions=null),null!=e.warehouse&&e.hasOwnProperty("warehouse")&&(n.warehouse=e.warehouse),null!=e.defaultSchema&&e.hasOwnProperty("defaultSchema")&&(n.defaultSchema=e.defaultSchema),null!=e.assertionSchema&&e.hasOwnProperty("assertionSchema")&&(n.assertionSchema=e.assertionSchema),null!=e.schemaSuffix&&e.hasOwnProperty("schemaSuffix")&&(n.schemaSuffix=e.schemaSuffix),null!=e.defaultDatabase&&e.hasOwnProperty("defaultDatabase")&&(n.defaultDatabase=e.defaultDatabase),null!=e.tablePrefix&&e.hasOwnProperty("tablePrefix")&&(n.tablePrefix=e.tablePrefix),e.vars&&(r=Object.keys(e.vars)).length){n.vars={};for(var o=0;o<r.length;++o)n.vars[r[o]]=e.vars[r[o]]}return null!=e.databaseSuffix&&e.hasOwnProperty("databaseSuffix")&&(n.databaseSuffix=e.databaseSuffix),null!=e.defaultLocation&&e.hasOwnProperty("defaultLocation")&&(n.defaultLocation=e.defaultLocation),null!=e.defaultNotebookRuntimeOptions&&e.hasOwnProperty("defaultNotebookRuntimeOptions")&&(n.defaultNotebookRuntimeOptions=s.dataform.NotebookRuntimeOptions.toObject(e.defaultNotebookRuntimeOptions,t)),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ProjectConfig"},t}(),n.CompileConfig=function(){function t(e){if(this.filePaths=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.projectDir="",t.prototype.filePaths=a.emptyArray,t.prototype.projectConfigOverride=null,t.prototype.timeoutMillis=0,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.projectDir&&Object.hasOwnProperty.call(e,"projectDir")&&t.uint32(10).string(e.projectDir),null!=e.projectConfigOverride&&Object.hasOwnProperty.call(e,"projectConfigOverride")&&s.dataform.ProjectConfig.encode(e.projectConfigOverride,t.uint32(26).fork()).ldelim(),null!=e.timeoutMillis&&Object.hasOwnProperty.call(e,"timeoutMillis")&&t.uint32(48).int32(e.timeoutMillis),null!=e.filePaths&&e.filePaths.length)for(var r=0;r<e.filePaths.length;++r)t.uint32(66).string(e.filePaths[r]);return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CompileConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.projectDir=e.string();break;case 8:n.filePaths&&n.filePaths.length||(n.filePaths=[]),n.filePaths.push(e.string());break;case 3:n.projectConfigOverride=s.dataform.ProjectConfig.decode(e,e.uint32());break;case 6:n.timeoutMillis=e.int32();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.projectDir&&e.hasOwnProperty("projectDir")&&!a.isString(e.projectDir))return"projectDir: string expected";if(null!=e.filePaths&&e.hasOwnProperty("filePaths")){if(!Array.isArray(e.filePaths))return"filePaths: array expected";for(var t=0;t<e.filePaths.length;++t)if(!a.isString(e.filePaths[t]))return"filePaths: string[] expected"}if(null!=e.projectConfigOverride&&e.hasOwnProperty("projectConfigOverride")){var r=s.dataform.ProjectConfig.verify(e.projectConfigOverride);if(r)return"projectConfigOverride."+r}return null!=e.timeoutMillis&&e.hasOwnProperty("timeoutMillis")&&!a.isInteger(e.timeoutMillis)?"timeoutMillis: integer expected":null},t.fromObject=function(e){if(e instanceof s.dataform.CompileConfig)return e;var t=new s.dataform.CompileConfig;if(null!=e.projectDir&&(t.projectDir=String(e.projectDir)),e.filePaths){if(!Array.isArray(e.filePaths))throw TypeError(".dataform.CompileConfig.filePaths: array expected");t.filePaths=[];for(var r=0;r<e.filePaths.length;++r)t.filePaths[r]=String(e.filePaths[r])}if(null!=e.projectConfigOverride){if("object"!=typeof e.projectConfigOverride)throw TypeError(".dataform.CompileConfig.projectConfigOverride: object expected");t.projectConfigOverride=s.dataform.ProjectConfig.fromObject(e.projectConfigOverride)}return null!=e.timeoutMillis&&(t.timeoutMillis=0|e.timeoutMillis),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.filePaths=[]),t.defaults&&(r.projectDir="",r.projectConfigOverride=null,r.timeoutMillis=0),null!=e.projectDir&&e.hasOwnProperty("projectDir")&&(r.projectDir=e.projectDir),null!=e.projectConfigOverride&&e.hasOwnProperty("projectConfigOverride")&&(r.projectConfigOverride=s.dataform.ProjectConfig.toObject(e.projectConfigOverride,t)),null!=e.timeoutMillis&&e.hasOwnProperty("timeoutMillis")&&(r.timeoutMillis=e.timeoutMillis),e.filePaths&&e.filePaths.length){r.filePaths=[];for(var n=0;n<e.filePaths.length;++n)r.filePaths[n]=e.filePaths[n]}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CompileConfig"},t}(),n.Target=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.database="",t.prototype.schema="",t.prototype.name="",t.prototype.includeDependentAssertions=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.schema&&Object.hasOwnProperty.call(e,"schema")&&t.uint32(10).string(e.schema),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(26).string(e.database),null!=e.includeDependentAssertions&&Object.hasOwnProperty.call(e,"includeDependentAssertions")&&t.uint32(32).bool(e.includeDependentAssertions),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Target;e.pos<r;){var i=e.uint32();switch(i>>>3){case 3:n.database=e.string();break;case 1:n.schema=e.string();break;case 2:n.name=e.string();break;case 4:n.includeDependentAssertions=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.database&&e.hasOwnProperty("database")&&!a.isString(e.database)?"database: string expected":null!=e.schema&&e.hasOwnProperty("schema")&&!a.isString(e.schema)?"schema: string expected":null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name)?"name: string expected":null!=e.includeDependentAssertions&&e.hasOwnProperty("includeDependentAssertions")&&"boolean"!=typeof e.includeDependentAssertions?"includeDependentAssertions: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Target)return e;var t=new s.dataform.Target;return null!=e.database&&(t.database=String(e.database)),null!=e.schema&&(t.schema=String(e.schema)),null!=e.name&&(t.name=String(e.name)),null!=e.includeDependentAssertions&&(t.includeDependentAssertions=Boolean(e.includeDependentAssertions)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.schema="",r.name="",r.database="",r.includeDependentAssertions=!1),null!=e.schema&&e.hasOwnProperty("schema")&&(r.schema=e.schema),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.database&&e.hasOwnProperty("database")&&(r.database=e.database),null!=e.includeDependentAssertions&&e.hasOwnProperty("includeDependentAssertions")&&(r.includeDependentAssertions=e.includeDependentAssertions),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Target"},t}(),n.BigQueryOptions=function(){function t(e){if(this.clusterBy=[],this.labels={},this.additionalOptions={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.partitionBy="",t.prototype.clusterBy=a.emptyArray,t.prototype.updatePartitionFilter="",t.prototype.labels=a.emptyObject,t.prototype.partitionExpirationDays=0,t.prototype.requirePartitionFilter=!1,t.prototype.additionalOptions=a.emptyObject,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.partitionBy&&Object.hasOwnProperty.call(e,"partitionBy")&&t.uint32(10).string(e.partitionBy),null!=e.clusterBy&&e.clusterBy.length)for(var r=0;r<e.clusterBy.length;++r)t.uint32(18).string(e.clusterBy[r]);if(null!=e.updatePartitionFilter&&Object.hasOwnProperty.call(e,"updatePartitionFilter")&&t.uint32(26).string(e.updatePartitionFilter),null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.uint32(34).fork().uint32(10).string(n[r]).uint32(18).string(e.labels[n[r]]).ldelim()}if(null!=e.partitionExpirationDays&&Object.hasOwnProperty.call(e,"partitionExpirationDays")&&t.uint32(40).int32(e.partitionExpirationDays),null!=e.requirePartitionFilter&&Object.hasOwnProperty.call(e,"requirePartitionFilter")&&t.uint32(48).bool(e.requirePartitionFilter),null!=e.additionalOptions&&Object.hasOwnProperty.call(e,"additionalOptions"))for(n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.uint32(58).fork().uint32(10).string(n[r]).uint32(18).string(e.additionalOptions[n[r]]).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.BigQueryOptions;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.partitionBy=e.string();break;case 2:l.clusterBy&&l.clusterBy.length||(l.clusterBy=[]),l.clusterBy.push(e.string());break;case 3:l.updatePartitionFilter=e.string();break;case 4:l.labels===a.emptyObject&&(l.labels={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;)switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}l.labels[r]=n;break;case 5:l.partitionExpirationDays=e.int32();break;case 6:l.requirePartitionFilter=e.bool();break;case 7:for(l.additionalOptions===a.emptyObject&&(l.additionalOptions={}),u=e.uint32()+e.pos,r="",n="";e.pos<u;){var p;switch((p=e.uint32())>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.additionalOptions[r]=n;break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.partitionBy&&e.hasOwnProperty("partitionBy")&&!a.isString(e.partitionBy))return"partitionBy: string expected";if(null!=e.clusterBy&&e.hasOwnProperty("clusterBy")){if(!Array.isArray(e.clusterBy))return"clusterBy: array expected";for(var t=0;t<e.clusterBy.length;++t)if(!a.isString(e.clusterBy[t]))return"clusterBy: string[] expected"}if(null!=e.updatePartitionFilter&&e.hasOwnProperty("updatePartitionFilter")&&!a.isString(e.updatePartitionFilter))return"updatePartitionFilter: string expected";if(null!=e.labels&&e.hasOwnProperty("labels")){if(!a.isObject(e.labels))return"labels: object expected";var r=Object.keys(e.labels);for(t=0;t<r.length;++t)if(!a.isString(e.labels[r[t]]))return"labels: string{k:string} expected"}if(null!=e.partitionExpirationDays&&e.hasOwnProperty("partitionExpirationDays")&&!a.isInteger(e.partitionExpirationDays))return"partitionExpirationDays: integer expected";if(null!=e.requirePartitionFilter&&e.hasOwnProperty("requirePartitionFilter")&&"boolean"!=typeof e.requirePartitionFilter)return"requirePartitionFilter: boolean expected";if(null!=e.additionalOptions&&e.hasOwnProperty("additionalOptions")){if(!a.isObject(e.additionalOptions))return"additionalOptions: object expected";for(r=Object.keys(e.additionalOptions),t=0;t<r.length;++t)if(!a.isString(e.additionalOptions[r[t]]))return"additionalOptions: string{k:string} expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.BigQueryOptions)return e;var t=new s.dataform.BigQueryOptions;if(null!=e.partitionBy&&(t.partitionBy=String(e.partitionBy)),e.clusterBy){if(!Array.isArray(e.clusterBy))throw TypeError(".dataform.BigQueryOptions.clusterBy: array expected");t.clusterBy=[];for(var r=0;r<e.clusterBy.length;++r)t.clusterBy[r]=String(e.clusterBy[r])}if(null!=e.updatePartitionFilter&&(t.updatePartitionFilter=String(e.updatePartitionFilter)),e.labels){if("object"!=typeof e.labels)throw TypeError(".dataform.BigQueryOptions.labels: object expected");t.labels={};var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.labels[n[r]]=String(e.labels[n[r]])}if(null!=e.partitionExpirationDays&&(t.partitionExpirationDays=0|e.partitionExpirationDays),null!=e.requirePartitionFilter&&(t.requirePartitionFilter=Boolean(e.requirePartitionFilter)),e.additionalOptions){if("object"!=typeof e.additionalOptions)throw TypeError(".dataform.BigQueryOptions.additionalOptions: object expected");for(t.additionalOptions={},n=Object.keys(e.additionalOptions),r=0;r<n.length;++r)t.additionalOptions[n[r]]=String(e.additionalOptions[n[r]])}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.arrays||t.defaults)&&(n.clusterBy=[]),(t.objects||t.defaults)&&(n.labels={},n.additionalOptions={}),t.defaults&&(n.partitionBy="",n.updatePartitionFilter="",n.partitionExpirationDays=0,n.requirePartitionFilter=!1),null!=e.partitionBy&&e.hasOwnProperty("partitionBy")&&(n.partitionBy=e.partitionBy),e.clusterBy&&e.clusterBy.length){n.clusterBy=[];for(var o=0;o<e.clusterBy.length;++o)n.clusterBy[o]=e.clusterBy[o]}if(null!=e.updatePartitionFilter&&e.hasOwnProperty("updatePartitionFilter")&&(n.updatePartitionFilter=e.updatePartitionFilter),e.labels&&(r=Object.keys(e.labels)).length)for(n.labels={},o=0;o<r.length;++o)n.labels[r[o]]=e.labels[r[o]];if(null!=e.partitionExpirationDays&&e.hasOwnProperty("partitionExpirationDays")&&(n.partitionExpirationDays=e.partitionExpirationDays),null!=e.requirePartitionFilter&&e.hasOwnProperty("requirePartitionFilter")&&(n.requirePartitionFilter=e.requirePartitionFilter),e.additionalOptions&&(r=Object.keys(e.additionalOptions)).length)for(n.additionalOptions={},o=0;o<r.length;++o)n.additionalOptions[r[o]]=e.additionalOptions[r[o]];return n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.BigQueryOptions"},t}(),n.GraphErrors=function(){function t(e){if(this.compilationErrors=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.compilationErrors=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.compilationErrors&&e.compilationErrors.length)for(var r=0;r<e.compilationErrors.length;++r)s.dataform.CompilationError.encode(e.compilationErrors[r],t.uint32(10).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.GraphErrors;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.compilationErrors&&n.compilationErrors.length||(n.compilationErrors=[]),n.compilationErrors.push(s.dataform.CompilationError.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.compilationErrors&&e.hasOwnProperty("compilationErrors")){if(!Array.isArray(e.compilationErrors))return"compilationErrors: array expected";for(var t=0;t<e.compilationErrors.length;++t){var r=s.dataform.CompilationError.verify(e.compilationErrors[t]);if(r)return"compilationErrors."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.GraphErrors)return e;var t=new s.dataform.GraphErrors;if(e.compilationErrors){if(!Array.isArray(e.compilationErrors))throw TypeError(".dataform.GraphErrors.compilationErrors: array expected");t.compilationErrors=[];for(var r=0;r<e.compilationErrors.length;++r){if("object"!=typeof e.compilationErrors[r])throw TypeError(".dataform.GraphErrors.compilationErrors: object expected");t.compilationErrors[r]=s.dataform.CompilationError.fromObject(e.compilationErrors[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.compilationErrors=[]),e.compilationErrors&&e.compilationErrors.length){r.compilationErrors=[];for(var n=0;n<e.compilationErrors.length;++n)r.compilationErrors[n]=s.dataform.CompilationError.toObject(e.compilationErrors[n],t)}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.GraphErrors"},t}(),n.CompilationError=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.fileName="",t.prototype.actionName="",t.prototype.actionTarget=null,t.prototype.message="",t.prototype.stack="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(10).string(e.fileName),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).string(e.message),null!=e.stack&&Object.hasOwnProperty.call(e,"stack")&&t.uint32(26).string(e.stack),null!=e.actionName&&Object.hasOwnProperty.call(e,"actionName")&&t.uint32(34).string(e.actionName),null!=e.actionTarget&&Object.hasOwnProperty.call(e,"actionTarget")&&s.dataform.Target.encode(e.actionTarget,t.uint32(42).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CompilationError;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.fileName=e.string();break;case 4:n.actionName=e.string();break;case 5:n.actionTarget=s.dataform.Target.decode(e,e.uint32());break;case 2:n.message=e.string();break;case 3:n.stack=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName))return"fileName: string expected";if(null!=e.actionName&&e.hasOwnProperty("actionName")&&!a.isString(e.actionName))return"actionName: string expected";if(null!=e.actionTarget&&e.hasOwnProperty("actionTarget")){var t=s.dataform.Target.verify(e.actionTarget);if(t)return"actionTarget."+t}return null!=e.message&&e.hasOwnProperty("message")&&!a.isString(e.message)?"message: string expected":null!=e.stack&&e.hasOwnProperty("stack")&&!a.isString(e.stack)?"stack: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.CompilationError)return e;var t=new s.dataform.CompilationError;if(null!=e.fileName&&(t.fileName=String(e.fileName)),null!=e.actionName&&(t.actionName=String(e.actionName)),null!=e.actionTarget){if("object"!=typeof e.actionTarget)throw TypeError(".dataform.CompilationError.actionTarget: object expected");t.actionTarget=s.dataform.Target.fromObject(e.actionTarget)}return null!=e.message&&(t.message=String(e.message)),null!=e.stack&&(t.stack=String(e.stack)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.fileName="",r.message="",r.stack="",r.actionName="",r.actionTarget=null),null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.message&&e.hasOwnProperty("message")&&(r.message=e.message),null!=e.stack&&e.hasOwnProperty("stack")&&(r.stack=e.stack),null!=e.actionName&&e.hasOwnProperty("actionName")&&(r.actionName=e.actionName),null!=e.actionTarget&&e.hasOwnProperty("actionTarget")&&(r.actionTarget=s.dataform.Target.toObject(e.actionTarget,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CompilationError"},t}(),n.ActionDescriptor=function(){function t(e){if(this.columns=[],this.bigqueryLabels={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.description="",t.prototype.columns=a.emptyArray,t.prototype.bigqueryLabels=a.emptyObject,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(10).string(e.description),null!=e.columns&&e.columns.length)for(var r=0;r<e.columns.length;++r)s.dataform.ColumnDescriptor.encode(e.columns[r],t.uint32(18).fork()).ldelim();if(null!=e.bigqueryLabels&&Object.hasOwnProperty.call(e,"bigqueryLabels")){var n=Object.keys(e.bigqueryLabels);for(r=0;r<n.length;++r)t.uint32(26).fork().uint32(10).string(n[r]).uint32(18).string(e.bigqueryLabels[n[r]]).ldelim()}return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.ActionDescriptor;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.description=e.string();break;case 2:l.columns&&l.columns.length||(l.columns=[]),l.columns.push(s.dataform.ColumnDescriptor.decode(e,e.uint32()));break;case 3:l.bigqueryLabels===a.emptyObject&&(l.bigqueryLabels={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;){var p=e.uint32();switch(p>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.bigqueryLabels[r]=n;break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.columns&&e.hasOwnProperty("columns")){if(!Array.isArray(e.columns))return"columns: array expected";for(var t=0;t<e.columns.length;++t){var r=s.dataform.ColumnDescriptor.verify(e.columns[t]);if(r)return"columns."+r}}if(null!=e.bigqueryLabels&&e.hasOwnProperty("bigqueryLabels")){if(!a.isObject(e.bigqueryLabels))return"bigqueryLabels: object expected";var n=Object.keys(e.bigqueryLabels);for(t=0;t<n.length;++t)if(!a.isString(e.bigqueryLabels[n[t]]))return"bigqueryLabels: string{k:string} expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.ActionDescriptor)return e;var t=new s.dataform.ActionDescriptor;if(null!=e.description&&(t.description=String(e.description)),e.columns){if(!Array.isArray(e.columns))throw TypeError(".dataform.ActionDescriptor.columns: array expected");t.columns=[];for(var r=0;r<e.columns.length;++r){if("object"!=typeof e.columns[r])throw TypeError(".dataform.ActionDescriptor.columns: object expected");t.columns[r]=s.dataform.ColumnDescriptor.fromObject(e.columns[r])}}if(e.bigqueryLabels){if("object"!=typeof e.bigqueryLabels)throw TypeError(".dataform.ActionDescriptor.bigqueryLabels: object expected");t.bigqueryLabels={};var n=Object.keys(e.bigqueryLabels);for(r=0;r<n.length;++r)t.bigqueryLabels[n[r]]=String(e.bigqueryLabels[n[r]])}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.arrays||t.defaults)&&(n.columns=[]),(t.objects||t.defaults)&&(n.bigqueryLabels={}),t.defaults&&(n.description=""),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),e.columns&&e.columns.length){n.columns=[];for(var o=0;o<e.columns.length;++o)n.columns[o]=s.dataform.ColumnDescriptor.toObject(e.columns[o],t)}if(e.bigqueryLabels&&(r=Object.keys(e.bigqueryLabels)).length)for(n.bigqueryLabels={},o=0;o<r.length;++o)n.bigqueryLabels[r[o]]=e.bigqueryLabels[r[o]];return n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionDescriptor"},t}(),n.ColumnDescriptor=function(){function t(e){if(this.path=[],this.tags=[],this.bigqueryPolicyTags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.description="",t.prototype.path=a.emptyArray,t.prototype.displayName="",t.prototype.tags=a.emptyArray,t.prototype.bigqueryPolicyTags=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(10).string(e.description),null!=e.path&&e.path.length)for(var r=0;r<e.path.length;++r)t.uint32(18).string(e.path[r]);if(null!=e.displayName&&Object.hasOwnProperty.call(e,"displayName")&&t.uint32(26).string(e.displayName),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(58).string(e.tags[r]);if(null!=e.bigqueryPolicyTags&&e.bigqueryPolicyTags.length)for(r=0;r<e.bigqueryPolicyTags.length;++r)t.uint32(66).string(e.bigqueryPolicyTags[r]);return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ColumnDescriptor;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.description=e.string();break;case 2:n.path&&n.path.length||(n.path=[]),n.path.push(e.string());break;case 3:n.displayName=e.string();break;case 7:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 8:n.bigqueryPolicyTags&&n.bigqueryPolicyTags.length||(n.bigqueryPolicyTags=[]),n.bigqueryPolicyTags.push(e.string());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var t=0;t<e.path.length;++t)if(!a.isString(e.path[t]))return"path: string[] expected"}if(null!=e.displayName&&e.hasOwnProperty("displayName")&&!a.isString(e.displayName))return"displayName: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.bigqueryPolicyTags&&e.hasOwnProperty("bigqueryPolicyTags")){if(!Array.isArray(e.bigqueryPolicyTags))return"bigqueryPolicyTags: array expected";for(t=0;t<e.bigqueryPolicyTags.length;++t)if(!a.isString(e.bigqueryPolicyTags[t]))return"bigqueryPolicyTags: string[] expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.ColumnDescriptor)return e;var t=new s.dataform.ColumnDescriptor;if(null!=e.description&&(t.description=String(e.description)),e.path){if(!Array.isArray(e.path))throw TypeError(".dataform.ColumnDescriptor.path: array expected");t.path=[];for(var r=0;r<e.path.length;++r)t.path[r]=String(e.path[r])}if(null!=e.displayName&&(t.displayName=String(e.displayName)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.ColumnDescriptor.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(e.bigqueryPolicyTags){if(!Array.isArray(e.bigqueryPolicyTags))throw TypeError(".dataform.ColumnDescriptor.bigqueryPolicyTags: array expected");for(t.bigqueryPolicyTags=[],r=0;r<e.bigqueryPolicyTags.length;++r)t.bigqueryPolicyTags[r]=String(e.bigqueryPolicyTags[r])}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.path=[],r.tags=[],r.bigqueryPolicyTags=[]),t.defaults&&(r.description="",r.displayName=""),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),e.path&&e.path.length){r.path=[];for(var n=0;n<e.path.length;++n)r.path[n]=e.path[n]}if(null!=e.displayName&&e.hasOwnProperty("displayName")&&(r.displayName=e.displayName),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];if(e.bigqueryPolicyTags&&e.bigqueryPolicyTags.length)for(r.bigqueryPolicyTags=[],n=0;n<e.bigqueryPolicyTags.length;++n)r.bigqueryPolicyTags[n]=e.bigqueryPolicyTags[n];return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ColumnDescriptor"},t}(),n.TableType=(t={},(r=Object.create(t))[t[0]="UNKNOWN_TYPE"]=0,r[t[1]="TABLE"]=1,r[t[2]="INCREMENTAL"]=2,r[t[3]="VIEW"]=3,r),n.OnSchemaChange=function(){var e={},t=Object.create(e);return t[e[0]="IGNORE"]=0,t[e[1]="FAIL"]=1,t[e[2]="EXTEND"]=2,t[e[3]="SYNCHRONIZE"]=3,t}(),n.Table=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],this.uniqueKey=[],this.preOps=[],this.postOps=[],this.incrementalPreOps=[],this.incrementalPostOps=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.enumType=0,t.prototype.target=null,t.prototype.canonicalTarget=null,t.prototype.dependencyTargets=a.emptyArray,t.prototype.hermeticity=0,t.prototype.disabled=!1,t.prototype.type="",t.prototype.query="",t.prototype.protected=!1,t.prototype.materialized=!1,t.prototype.actionDescriptor=null,t.prototype.tags=a.emptyArray,t.prototype.where="",t.prototype.incrementalQuery="",t.prototype.uniqueKey=a.emptyArray,t.prototype.onSchemaChange=0,t.prototype.preOps=a.emptyArray,t.prototype.postOps=a.emptyArray,t.prototype.incrementalPreOps=a.emptyArray,t.prototype.incrementalPostOps=a.emptyArray,t.prototype.bigquery=null,t.prototype.fileName="",t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(26).string(e.type),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(34).fork()).ldelim(),null!=e.query&&Object.hasOwnProperty.call(e,"query")&&t.uint32(42).string(e.query),null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(48).bool(e.disabled),null!=e.where&&Object.hasOwnProperty.call(e,"where")&&t.uint32(66).string(e.where),null!=e.protected&&Object.hasOwnProperty.call(e,"protected")&&t.uint32(72).bool(e.protected),null!=e.preOps&&e.preOps.length)for(var r=0;r<e.preOps.length;++r)t.uint32(106).string(e.preOps[r]);if(null!=e.postOps&&e.postOps.length)for(r=0;r<e.postOps.length;++r)t.uint32(114).string(e.postOps[r]);if(null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(146).string(e.fileName),null!=e.bigquery&&Object.hasOwnProperty.call(e,"bigquery")&&s.dataform.BigQueryOptions.encode(e.bigquery,t.uint32(178).fork()).ldelim(),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(186).string(e.tags[r]);if(null!=e.actionDescriptor&&Object.hasOwnProperty.call(e,"actionDescriptor")&&s.dataform.ActionDescriptor.encode(e.actionDescriptor,t.uint32(194).fork()).ldelim(),null!=e.incrementalQuery&&Object.hasOwnProperty.call(e,"incrementalQuery")&&t.uint32(210).string(e.incrementalQuery),null!=e.dependencyTargets&&e.dependencyTargets.length)for(r=0;r<e.dependencyTargets.length;++r)s.dataform.Target.encode(e.dependencyTargets[r],t.uint32(218).fork()).ldelim();if(null!=e.incrementalPreOps&&e.incrementalPreOps.length)for(r=0;r<e.incrementalPreOps.length;++r)t.uint32(226).string(e.incrementalPreOps[r]);if(null!=e.incrementalPostOps&&e.incrementalPostOps.length)for(r=0;r<e.incrementalPostOps.length;++r)t.uint32(234).string(e.incrementalPostOps[r]);if(null!=e.uniqueKey&&e.uniqueKey.length)for(r=0;r<e.uniqueKey.length;++r)t.uint32(242).string(e.uniqueKey[r]);return null!=e.hermeticity&&Object.hasOwnProperty.call(e,"hermeticity")&&t.uint32(248).int32(e.hermeticity),null!=e.canonicalTarget&&Object.hasOwnProperty.call(e,"canonicalTarget")&&s.dataform.Target.encode(e.canonicalTarget,t.uint32(258).fork()).ldelim(),null!=e.materialized&&Object.hasOwnProperty.call(e,"materialized")&&t.uint32(280).bool(e.materialized),null!=e.enumType&&Object.hasOwnProperty.call(e,"enumType")&&t.uint32(288).int32(e.enumType),null!=e.onSchemaChange&&Object.hasOwnProperty.call(e,"onSchemaChange")&&t.uint32(296).int32(e.onSchemaChange),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Table;e.pos<r;){var i=e.uint32();switch(i>>>3){case 36:n.enumType=e.int32();break;case 4:n.target=s.dataform.Target.decode(e,e.uint32());break;case 32:n.canonicalTarget=s.dataform.Target.decode(e,e.uint32());break;case 27:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 31:n.hermeticity=e.int32();break;case 6:n.disabled=e.bool();break;case 3:n.type=e.string();break;case 5:n.query=e.string();break;case 9:n.protected=e.bool();break;case 35:n.materialized=e.bool();break;case 24:n.actionDescriptor=s.dataform.ActionDescriptor.decode(e,e.uint32());break;case 23:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 8:n.where=e.string();break;case 26:n.incrementalQuery=e.string();break;case 30:n.uniqueKey&&n.uniqueKey.length||(n.uniqueKey=[]),n.uniqueKey.push(e.string());break;case 37:n.onSchemaChange=e.int32();break;case 13:n.preOps&&n.preOps.length||(n.preOps=[]),n.preOps.push(e.string());break;case 14:n.postOps&&n.postOps.length||(n.postOps=[]),n.postOps.push(e.string());break;case 28:n.incrementalPreOps&&n.incrementalPreOps.length||(n.incrementalPreOps=[]),n.incrementalPreOps.push(e.string());break;case 29:n.incrementalPostOps&&n.incrementalPostOps.length||(n.incrementalPostOps=[]),n.incrementalPostOps.push(e.string());break;case 22:n.bigquery=s.dataform.BigQueryOptions.decode(e,e.uint32());break;case 18:n.fileName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.enumType&&e.hasOwnProperty("enumType"))switch(e.enumType){default:return"enumType: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r=s.dataform.Target.verify(e.canonicalTarget)))return"canonicalTarget."+r;if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t){var r;if(r=s.dataform.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}}if(null!=e.hermeticity&&e.hasOwnProperty("hermeticity"))switch(e.hermeticity){default:return"hermeticity: enum value expected";case 0:case 1:case 2:}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.type&&e.hasOwnProperty("type")&&!a.isString(e.type))return"type: string expected";if(null!=e.query&&e.hasOwnProperty("query")&&!a.isString(e.query))return"query: string expected";if(null!=e.protected&&e.hasOwnProperty("protected")&&"boolean"!=typeof e.protected)return"protected: boolean expected";if(null!=e.materialized&&e.hasOwnProperty("materialized")&&"boolean"!=typeof e.materialized)return"materialized: boolean expected";if(null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r=s.dataform.ActionDescriptor.verify(e.actionDescriptor)))return"actionDescriptor."+r;if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.where&&e.hasOwnProperty("where")&&!a.isString(e.where))return"where: string expected";if(null!=e.incrementalQuery&&e.hasOwnProperty("incrementalQuery")&&!a.isString(e.incrementalQuery))return"incrementalQuery: string expected";if(null!=e.uniqueKey&&e.hasOwnProperty("uniqueKey")){if(!Array.isArray(e.uniqueKey))return"uniqueKey: array expected";for(t=0;t<e.uniqueKey.length;++t)if(!a.isString(e.uniqueKey[t]))return"uniqueKey: string[] expected"}if(null!=e.onSchemaChange&&e.hasOwnProperty("onSchemaChange"))switch(e.onSchemaChange){default:return"onSchemaChange: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.preOps&&e.hasOwnProperty("preOps")){if(!Array.isArray(e.preOps))return"preOps: array expected";for(t=0;t<e.preOps.length;++t)if(!a.isString(e.preOps[t]))return"preOps: string[] expected"}if(null!=e.postOps&&e.hasOwnProperty("postOps")){if(!Array.isArray(e.postOps))return"postOps: array expected";for(t=0;t<e.postOps.length;++t)if(!a.isString(e.postOps[t]))return"postOps: string[] expected"}if(null!=e.incrementalPreOps&&e.hasOwnProperty("incrementalPreOps")){if(!Array.isArray(e.incrementalPreOps))return"incrementalPreOps: array expected";for(t=0;t<e.incrementalPreOps.length;++t)if(!a.isString(e.incrementalPreOps[t]))return"incrementalPreOps: string[] expected"}if(null!=e.incrementalPostOps&&e.hasOwnProperty("incrementalPostOps")){if(!Array.isArray(e.incrementalPostOps))return"incrementalPostOps: array expected";for(t=0;t<e.incrementalPostOps.length;++t)if(!a.isString(e.incrementalPostOps[t]))return"incrementalPostOps: string[] expected"}return null!=e.bigquery&&e.hasOwnProperty("bigquery")&&(r=s.dataform.BigQueryOptions.verify(e.bigquery))?"bigquery."+r:null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName)?"fileName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Table)return e;var t=new s.dataform.Table;switch(e.enumType){default:if("number"==typeof e.enumType){t.enumType=e.enumType;break}break;case"UNKNOWN_TYPE":case 0:t.enumType=0;break;case"TABLE":case 1:t.enumType=1;break;case"INCREMENTAL":case 2:t.enumType=2;break;case"VIEW":case 3:t.enumType=3}if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.Table.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.canonicalTarget){if("object"!=typeof e.canonicalTarget)throw TypeError(".dataform.Table.canonicalTarget: object expected");t.canonicalTarget=s.dataform.Target.fromObject(e.canonicalTarget)}if(e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.Table.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.Table.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.Target.fromObject(e.dependencyTargets[r])}}switch(e.hermeticity){default:if("number"==typeof e.hermeticity){t.hermeticity=e.hermeticity;break}break;case"UNKNOWN":case 0:t.hermeticity=0;break;case"HERMETIC":case 1:t.hermeticity=1;break;case"NON_HERMETIC":case 2:t.hermeticity=2}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.type&&(t.type=String(e.type)),null!=e.query&&(t.query=String(e.query)),null!=e.protected&&(t.protected=Boolean(e.protected)),null!=e.materialized&&(t.materialized=Boolean(e.materialized)),null!=e.actionDescriptor){if("object"!=typeof e.actionDescriptor)throw TypeError(".dataform.Table.actionDescriptor: object expected");t.actionDescriptor=s.dataform.ActionDescriptor.fromObject(e.actionDescriptor)}if(e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.Table.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.where&&(t.where=String(e.where)),null!=e.incrementalQuery&&(t.incrementalQuery=String(e.incrementalQuery)),e.uniqueKey){if(!Array.isArray(e.uniqueKey))throw TypeError(".dataform.Table.uniqueKey: array expected");for(t.uniqueKey=[],r=0;r<e.uniqueKey.length;++r)t.uniqueKey[r]=String(e.uniqueKey[r])}switch(e.onSchemaChange){default:if("number"==typeof e.onSchemaChange){t.onSchemaChange=e.onSchemaChange;break}break;case"IGNORE":case 0:t.onSchemaChange=0;break;case"FAIL":case 1:t.onSchemaChange=1;break;case"EXTEND":case 2:t.onSchemaChange=2;break;case"SYNCHRONIZE":case 3:t.onSchemaChange=3}if(e.preOps){if(!Array.isArray(e.preOps))throw TypeError(".dataform.Table.preOps: array expected");for(t.preOps=[],r=0;r<e.preOps.length;++r)t.preOps[r]=String(e.preOps[r])}if(e.postOps){if(!Array.isArray(e.postOps))throw TypeError(".dataform.Table.postOps: array expected");for(t.postOps=[],r=0;r<e.postOps.length;++r)t.postOps[r]=String(e.postOps[r])}if(e.incrementalPreOps){if(!Array.isArray(e.incrementalPreOps))throw TypeError(".dataform.Table.incrementalPreOps: array expected");for(t.incrementalPreOps=[],r=0;r<e.incrementalPreOps.length;++r)t.incrementalPreOps[r]=String(e.incrementalPreOps[r])}if(e.incrementalPostOps){if(!Array.isArray(e.incrementalPostOps))throw TypeError(".dataform.Table.incrementalPostOps: array expected");for(t.incrementalPostOps=[],r=0;r<e.incrementalPostOps.length;++r)t.incrementalPostOps[r]=String(e.incrementalPostOps[r])}if(null!=e.bigquery){if("object"!=typeof e.bigquery)throw TypeError(".dataform.Table.bigquery: object expected");t.bigquery=s.dataform.BigQueryOptions.fromObject(e.bigquery)}return null!=e.fileName&&(t.fileName=String(e.fileName)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.preOps=[],r.postOps=[],r.tags=[],r.dependencyTargets=[],r.incrementalPreOps=[],r.incrementalPostOps=[],r.uniqueKey=[]),t.defaults&&(r.type="",r.target=null,r.query="",r.disabled=!1,r.where="",r.protected=!1,r.fileName="",r.bigquery=null,r.actionDescriptor=null,r.incrementalQuery="",r.hermeticity=t.enums===String?"UNKNOWN":0,r.canonicalTarget=null,r.materialized=!1,r.enumType=t.enums===String?"UNKNOWN_TYPE":0,r.onSchemaChange=t.enums===String?"IGNORE":0),null!=e.type&&e.hasOwnProperty("type")&&(r.type=e.type),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),null!=e.query&&e.hasOwnProperty("query")&&(r.query=e.query),null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.where&&e.hasOwnProperty("where")&&(r.where=e.where),null!=e.protected&&e.hasOwnProperty("protected")&&(r.protected=e.protected),e.preOps&&e.preOps.length){r.preOps=[];for(var n=0;n<e.preOps.length;++n)r.preOps[n]=e.preOps[n]}if(e.postOps&&e.postOps.length)for(r.postOps=[],n=0;n<e.postOps.length;++n)r.postOps[n]=e.postOps[n];if(null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.bigquery&&e.hasOwnProperty("bigquery")&&(r.bigquery=s.dataform.BigQueryOptions.toObject(e.bigquery,t)),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];if(null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r.actionDescriptor=s.dataform.ActionDescriptor.toObject(e.actionDescriptor,t)),null!=e.incrementalQuery&&e.hasOwnProperty("incrementalQuery")&&(r.incrementalQuery=e.incrementalQuery),e.dependencyTargets&&e.dependencyTargets.length)for(r.dependencyTargets=[],n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.Target.toObject(e.dependencyTargets[n],t);if(e.incrementalPreOps&&e.incrementalPreOps.length)for(r.incrementalPreOps=[],n=0;n<e.incrementalPreOps.length;++n)r.incrementalPreOps[n]=e.incrementalPreOps[n];if(e.incrementalPostOps&&e.incrementalPostOps.length)for(r.incrementalPostOps=[],n=0;n<e.incrementalPostOps.length;++n)r.incrementalPostOps[n]=e.incrementalPostOps[n];if(e.uniqueKey&&e.uniqueKey.length)for(r.uniqueKey=[],n=0;n<e.uniqueKey.length;++n)r.uniqueKey[n]=e.uniqueKey[n];return null!=e.hermeticity&&e.hasOwnProperty("hermeticity")&&(r.hermeticity=t.enums===String?void 0===s.dataform.ActionHermeticity[e.hermeticity]?e.hermeticity:s.dataform.ActionHermeticity[e.hermeticity]:e.hermeticity),null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r.canonicalTarget=s.dataform.Target.toObject(e.canonicalTarget,t)),null!=e.materialized&&e.hasOwnProperty("materialized")&&(r.materialized=e.materialized),null!=e.enumType&&e.hasOwnProperty("enumType")&&(r.enumType=t.enums===String?void 0===s.dataform.TableType[e.enumType]?e.enumType:s.dataform.TableType[e.enumType]:e.enumType),null!=e.onSchemaChange&&e.hasOwnProperty("onSchemaChange")&&(r.onSchemaChange=t.enums===String?void 0===s.dataform.OnSchemaChange[e.onSchemaChange]?e.onSchemaChange:s.dataform.OnSchemaChange[e.onSchemaChange]:e.onSchemaChange),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Table"},t}(),n.Operation=function(){function t(e){if(this.dependencyTargets=[],this.queries=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.canonicalTarget=null,t.prototype.dependencyTargets=a.emptyArray,t.prototype.hermeticity=0,t.prototype.disabled=!1,t.prototype.queries=a.emptyArray,t.prototype.hasOutput=!1,t.prototype.tags=a.emptyArray,t.prototype.actionDescriptor=null,t.prototype.fileName="",t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(26).fork()).ldelim(),null!=e.queries&&e.queries.length)for(var r=0;r<e.queries.length;++r)t.uint32(50).string(e.queries[r]);if(null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(58).string(e.fileName),null!=e.hasOutput&&Object.hasOwnProperty.call(e,"hasOutput")&&t.uint32(64).bool(e.hasOutput),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(74).string(e.tags[r]);if(null!=e.actionDescriptor&&Object.hasOwnProperty.call(e,"actionDescriptor")&&s.dataform.ActionDescriptor.encode(e.actionDescriptor,t.uint32(82).fork()).ldelim(),null!=e.dependencyTargets&&e.dependencyTargets.length)for(r=0;r<e.dependencyTargets.length;++r)s.dataform.Target.encode(e.dependencyTargets[r],t.uint32(90).fork()).ldelim();return null!=e.hermeticity&&Object.hasOwnProperty.call(e,"hermeticity")&&t.uint32(96).int32(e.hermeticity),null!=e.canonicalTarget&&Object.hasOwnProperty.call(e,"canonicalTarget")&&s.dataform.Target.encode(e.canonicalTarget,t.uint32(106).fork()).ldelim(),null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(112).bool(e.disabled),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Operation;e.pos<r;){var i=e.uint32();switch(i>>>3){case 3:n.target=s.dataform.Target.decode(e,e.uint32());break;case 13:n.canonicalTarget=s.dataform.Target.decode(e,e.uint32());break;case 11:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 12:n.hermeticity=e.int32();break;case 14:n.disabled=e.bool();break;case 6:n.queries&&n.queries.length||(n.queries=[]),n.queries.push(e.string());break;case 8:n.hasOutput=e.bool();break;case 9:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 10:n.actionDescriptor=s.dataform.ActionDescriptor.decode(e,e.uint32());break;case 7:n.fileName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r=s.dataform.Target.verify(e.canonicalTarget)))return"canonicalTarget."+r;if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t){var r;if(r=s.dataform.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}}if(null!=e.hermeticity&&e.hasOwnProperty("hermeticity"))switch(e.hermeticity){default:return"hermeticity: enum value expected";case 0:case 1:case 2:}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.queries&&e.hasOwnProperty("queries")){if(!Array.isArray(e.queries))return"queries: array expected";for(t=0;t<e.queries.length;++t)if(!a.isString(e.queries[t]))return"queries: string[] expected"}if(null!=e.hasOutput&&e.hasOwnProperty("hasOutput")&&"boolean"!=typeof e.hasOutput)return"hasOutput: boolean expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r=s.dataform.ActionDescriptor.verify(e.actionDescriptor))?"actionDescriptor."+r:null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName)?"fileName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Operation)return e;var t=new s.dataform.Operation;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.Operation.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.canonicalTarget){if("object"!=typeof e.canonicalTarget)throw TypeError(".dataform.Operation.canonicalTarget: object expected");t.canonicalTarget=s.dataform.Target.fromObject(e.canonicalTarget)}if(e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.Operation.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.Operation.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.Target.fromObject(e.dependencyTargets[r])}}switch(e.hermeticity){default:if("number"==typeof e.hermeticity){t.hermeticity=e.hermeticity;break}break;case"UNKNOWN":case 0:t.hermeticity=0;break;case"HERMETIC":case 1:t.hermeticity=1;break;case"NON_HERMETIC":case 2:t.hermeticity=2}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),e.queries){if(!Array.isArray(e.queries))throw TypeError(".dataform.Operation.queries: array expected");for(t.queries=[],r=0;r<e.queries.length;++r)t.queries[r]=String(e.queries[r])}if(null!=e.hasOutput&&(t.hasOutput=Boolean(e.hasOutput)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.Operation.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.actionDescriptor){if("object"!=typeof e.actionDescriptor)throw TypeError(".dataform.Operation.actionDescriptor: object expected");t.actionDescriptor=s.dataform.ActionDescriptor.fromObject(e.actionDescriptor)}return null!=e.fileName&&(t.fileName=String(e.fileName)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.queries=[],r.tags=[],r.dependencyTargets=[]),t.defaults&&(r.target=null,r.fileName="",r.hasOutput=!1,r.actionDescriptor=null,r.hermeticity=t.enums===String?"UNKNOWN":0,r.canonicalTarget=null,r.disabled=!1),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),e.queries&&e.queries.length){r.queries=[];for(var n=0;n<e.queries.length;++n)r.queries[n]=e.queries[n]}if(null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.hasOutput&&e.hasOwnProperty("hasOutput")&&(r.hasOutput=e.hasOutput),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];if(null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r.actionDescriptor=s.dataform.ActionDescriptor.toObject(e.actionDescriptor,t)),e.dependencyTargets&&e.dependencyTargets.length)for(r.dependencyTargets=[],n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.Target.toObject(e.dependencyTargets[n],t);return null!=e.hermeticity&&e.hasOwnProperty("hermeticity")&&(r.hermeticity=t.enums===String?void 0===s.dataform.ActionHermeticity[e.hermeticity]?e.hermeticity:s.dataform.ActionHermeticity[e.hermeticity]:e.hermeticity),null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r.canonicalTarget=s.dataform.Target.toObject(e.canonicalTarget,t)),null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Operation"},t}(),n.Assertion=function(){function t(e){if(this.dependencyTargets=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.canonicalTarget=null,t.prototype.dependencyTargets=a.emptyArray,t.prototype.hermeticity=0,t.prototype.disabled=!1,t.prototype.query="",t.prototype.tags=a.emptyArray,t.prototype.actionDescriptor=null,t.prototype.parentAction=null,t.prototype.fileName="",t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.query&&Object.hasOwnProperty.call(e,"query")&&t.uint32(26).string(e.query),null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(58).string(e.fileName),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(66).fork()).ldelim(),null!=e.tags&&e.tags.length)for(var r=0;r<e.tags.length;++r)t.uint32(74).string(e.tags[r]);if(null!=e.actionDescriptor&&Object.hasOwnProperty.call(e,"actionDescriptor")&&s.dataform.ActionDescriptor.encode(e.actionDescriptor,t.uint32(82).fork()).ldelim(),null!=e.dependencyTargets&&e.dependencyTargets.length)for(r=0;r<e.dependencyTargets.length;++r)s.dataform.Target.encode(e.dependencyTargets[r],t.uint32(90).fork()).ldelim();return null!=e.hermeticity&&Object.hasOwnProperty.call(e,"hermeticity")&&t.uint32(96).int32(e.hermeticity),null!=e.canonicalTarget&&Object.hasOwnProperty.call(e,"canonicalTarget")&&s.dataform.Target.encode(e.canonicalTarget,t.uint32(106).fork()).ldelim(),null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(112).bool(e.disabled),null!=e.parentAction&&Object.hasOwnProperty.call(e,"parentAction")&&s.dataform.Target.encode(e.parentAction,t.uint32(122).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Assertion;e.pos<r;){var i=e.uint32();switch(i>>>3){case 8:n.target=s.dataform.Target.decode(e,e.uint32());break;case 13:n.canonicalTarget=s.dataform.Target.decode(e,e.uint32());break;case 11:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 12:n.hermeticity=e.int32();break;case 14:n.disabled=e.bool();break;case 3:n.query=e.string();break;case 9:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 10:n.actionDescriptor=s.dataform.ActionDescriptor.decode(e,e.uint32());break;case 15:n.parentAction=s.dataform.Target.decode(e,e.uint32());break;case 7:n.fileName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r=s.dataform.Target.verify(e.canonicalTarget)))return"canonicalTarget."+r;if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t){var r;if(r=s.dataform.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}}if(null!=e.hermeticity&&e.hasOwnProperty("hermeticity"))switch(e.hermeticity){default:return"hermeticity: enum value expected";case 0:case 1:case 2:}if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.query&&e.hasOwnProperty("query")&&!a.isString(e.query))return"query: string expected";if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r=s.dataform.ActionDescriptor.verify(e.actionDescriptor))?"actionDescriptor."+r:null!=e.parentAction&&e.hasOwnProperty("parentAction")&&(r=s.dataform.Target.verify(e.parentAction))?"parentAction."+r:null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName)?"fileName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Assertion)return e;var t=new s.dataform.Assertion;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.Assertion.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.canonicalTarget){if("object"!=typeof e.canonicalTarget)throw TypeError(".dataform.Assertion.canonicalTarget: object expected");t.canonicalTarget=s.dataform.Target.fromObject(e.canonicalTarget)}if(e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.Assertion.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.Assertion.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.Target.fromObject(e.dependencyTargets[r])}}switch(e.hermeticity){default:if("number"==typeof e.hermeticity){t.hermeticity=e.hermeticity;break}break;case"UNKNOWN":case 0:t.hermeticity=0;break;case"HERMETIC":case 1:t.hermeticity=1;break;case"NON_HERMETIC":case 2:t.hermeticity=2}if(null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.query&&(t.query=String(e.query)),e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.Assertion.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(null!=e.actionDescriptor){if("object"!=typeof e.actionDescriptor)throw TypeError(".dataform.Assertion.actionDescriptor: object expected");t.actionDescriptor=s.dataform.ActionDescriptor.fromObject(e.actionDescriptor)}if(null!=e.parentAction){if("object"!=typeof e.parentAction)throw TypeError(".dataform.Assertion.parentAction: object expected");t.parentAction=s.dataform.Target.fromObject(e.parentAction)}return null!=e.fileName&&(t.fileName=String(e.fileName)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.tags=[],r.dependencyTargets=[]),t.defaults&&(r.query="",r.fileName="",r.target=null,r.actionDescriptor=null,r.hermeticity=t.enums===String?"UNKNOWN":0,r.canonicalTarget=null,r.disabled=!1,r.parentAction=null),null!=e.query&&e.hasOwnProperty("query")&&(r.query=e.query),null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),e.tags&&e.tags.length){r.tags=[];for(var n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n]}if(null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r.actionDescriptor=s.dataform.ActionDescriptor.toObject(e.actionDescriptor,t)),e.dependencyTargets&&e.dependencyTargets.length)for(r.dependencyTargets=[],n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.Target.toObject(e.dependencyTargets[n],t);return null!=e.hermeticity&&e.hasOwnProperty("hermeticity")&&(r.hermeticity=t.enums===String?void 0===s.dataform.ActionHermeticity[e.hermeticity]?e.hermeticity:s.dataform.ActionHermeticity[e.hermeticity]:e.hermeticity),null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r.canonicalTarget=s.dataform.Target.toObject(e.canonicalTarget,t)),null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.parentAction&&e.hasOwnProperty("parentAction")&&(r.parentAction=s.dataform.Target.toObject(e.parentAction,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Assertion"},t}(),n.ActionHermeticity=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="HERMETIC"]=1,t[e[2]="NON_HERMETIC"]=2,t}(),n.Declaration=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.canonicalTarget=null,t.prototype.actionDescriptor=null,t.prototype.fileName="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(18).fork()).ldelim(),null!=e.actionDescriptor&&Object.hasOwnProperty.call(e,"actionDescriptor")&&s.dataform.ActionDescriptor.encode(e.actionDescriptor,t.uint32(26).fork()).ldelim(),null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(34).string(e.fileName),null!=e.canonicalTarget&&Object.hasOwnProperty.call(e,"canonicalTarget")&&s.dataform.Target.encode(e.canonicalTarget,t.uint32(42).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Declaration;e.pos<r;){var i=e.uint32();switch(i>>>3){case 2:n.target=s.dataform.Target.decode(e,e.uint32());break;case 5:n.canonicalTarget=s.dataform.Target.decode(e,e.uint32());break;case 3:n.actionDescriptor=s.dataform.ActionDescriptor.decode(e,e.uint32());break;case 4:n.fileName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.target&&e.hasOwnProperty("target")&&(t=s.dataform.Target.verify(e.target))?"target."+t:null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(t=s.dataform.Target.verify(e.canonicalTarget))?"canonicalTarget."+t:null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(t=s.dataform.ActionDescriptor.verify(e.actionDescriptor))?"actionDescriptor."+t:null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName)?"fileName: string expected":null;var t},t.fromObject=function(e){if(e instanceof s.dataform.Declaration)return e;var t=new s.dataform.Declaration;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.Declaration.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.canonicalTarget){if("object"!=typeof e.canonicalTarget)throw TypeError(".dataform.Declaration.canonicalTarget: object expected");t.canonicalTarget=s.dataform.Target.fromObject(e.canonicalTarget)}if(null!=e.actionDescriptor){if("object"!=typeof e.actionDescriptor)throw TypeError(".dataform.Declaration.actionDescriptor: object expected");t.actionDescriptor=s.dataform.ActionDescriptor.fromObject(e.actionDescriptor)}return null!=e.fileName&&(t.fileName=String(e.fileName)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.target=null,r.actionDescriptor=null,r.fileName="",r.canonicalTarget=null),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r.actionDescriptor=s.dataform.ActionDescriptor.toObject(e.actionDescriptor,t)),null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r.canonicalTarget=s.dataform.Target.toObject(e.canonicalTarget,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Declaration"},t}(),n.Test=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.testQuery="",t.prototype.expectedOutputQuery="",t.prototype.fileName="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.testQuery&&Object.hasOwnProperty.call(e,"testQuery")&&t.uint32(18).string(e.testQuery),null!=e.expectedOutputQuery&&Object.hasOwnProperty.call(e,"expectedOutputQuery")&&t.uint32(26).string(e.expectedOutputQuery),null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(34).string(e.fileName),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Test;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.testQuery=e.string();break;case 3:n.expectedOutputQuery=e.string();break;case 4:n.fileName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name)?"name: string expected":null!=e.testQuery&&e.hasOwnProperty("testQuery")&&!a.isString(e.testQuery)?"testQuery: string expected":null!=e.expectedOutputQuery&&e.hasOwnProperty("expectedOutputQuery")&&!a.isString(e.expectedOutputQuery)?"expectedOutputQuery: string expected":null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName)?"fileName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Test)return e;var t=new s.dataform.Test;return null!=e.name&&(t.name=String(e.name)),null!=e.testQuery&&(t.testQuery=String(e.testQuery)),null!=e.expectedOutputQuery&&(t.expectedOutputQuery=String(e.expectedOutputQuery)),null!=e.fileName&&(t.fileName=String(e.fileName)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.name="",r.testQuery="",r.expectedOutputQuery="",r.fileName=""),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.testQuery&&e.hasOwnProperty("testQuery")&&(r.testQuery=e.testQuery),null!=e.expectedOutputQuery&&e.hasOwnProperty("expectedOutputQuery")&&(r.expectedOutputQuery=e.expectedOutputQuery),null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Test"},t}(),n.Notebook=function(){function t(e){if(this.tags=[],this.dependencyTargets=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.canonicalTarget=null,t.prototype.tags=a.emptyArray,t.prototype.dependencyTargets=a.emptyArray,t.prototype.fileName="",t.prototype.disabled=!1,t.prototype.notebookContents="",t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(10).fork()).ldelim(),null!=e.canonicalTarget&&Object.hasOwnProperty.call(e,"canonicalTarget")&&s.dataform.Target.encode(e.canonicalTarget,t.uint32(18).fork()).ldelim(),null!=e.tags&&e.tags.length)for(var r=0;r<e.tags.length;++r)t.uint32(26).string(e.tags[r]);if(null!=e.dependencyTargets&&e.dependencyTargets.length)for(r=0;r<e.dependencyTargets.length;++r)s.dataform.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();return null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(42).string(e.fileName),null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(48).bool(e.disabled),null!=e.notebookContents&&Object.hasOwnProperty.call(e,"notebookContents")&&t.uint32(58).string(e.notebookContents),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Notebook;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.target=s.dataform.Target.decode(e,e.uint32());break;case 2:n.canonicalTarget=s.dataform.Target.decode(e,e.uint32());break;case 3:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 4:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 5:n.fileName=e.string();break;case 6:n.disabled=e.bool();break;case 7:n.notebookContents=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r=s.dataform.Target.verify(e.canonicalTarget)))return"canonicalTarget."+r;if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(var t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(t=0;t<e.dependencyTargets.length;++t){var r;if(r=s.dataform.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}}return null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName)?"fileName: string expected":null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled?"disabled: boolean expected":null!=e.notebookContents&&e.hasOwnProperty("notebookContents")&&!a.isString(e.notebookContents)?"notebookContents: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Notebook)return e;var t=new s.dataform.Notebook;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.Notebook.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.canonicalTarget){if("object"!=typeof e.canonicalTarget)throw TypeError(".dataform.Notebook.canonicalTarget: object expected");t.canonicalTarget=s.dataform.Target.fromObject(e.canonicalTarget)}if(e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.Notebook.tags: array expected");t.tags=[];for(var r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.Notebook.dependencyTargets: array expected");for(t.dependencyTargets=[],r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.Notebook.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.Target.fromObject(e.dependencyTargets[r])}}return null!=e.fileName&&(t.fileName=String(e.fileName)),null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.notebookContents&&(t.notebookContents=String(e.notebookContents)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.tags=[],r.dependencyTargets=[]),t.defaults&&(r.target=null,r.canonicalTarget=null,r.fileName="",r.disabled=!1,r.notebookContents=""),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r.canonicalTarget=s.dataform.Target.toObject(e.canonicalTarget,t)),e.tags&&e.tags.length){r.tags=[];for(var n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n]}if(e.dependencyTargets&&e.dependencyTargets.length)for(r.dependencyTargets=[],n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.Target.toObject(e.dependencyTargets[n],t);return null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.notebookContents&&e.hasOwnProperty("notebookContents")&&(r.notebookContents=e.notebookContents),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Notebook"},t}(),n.NotebookRuntimeOptions=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.outputBucket=null,t.prototype.runtimeTemplateName="",Object.defineProperty(t.prototype,"outputSink",{get:a.oneOfGetter(r=["outputBucket"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.outputBucket&&Object.hasOwnProperty.call(e,"outputBucket")&&t.uint32(10).string(e.outputBucket),null!=e.runtimeTemplateName&&Object.hasOwnProperty.call(e,"runtimeTemplateName")&&t.uint32(18).string(e.runtimeTemplateName),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.NotebookRuntimeOptions;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.outputBucket=e.string();break;case 2:n.runtimeTemplateName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.outputBucket&&e.hasOwnProperty("outputBucket")&&!a.isString(e.outputBucket)?"outputBucket: string expected":null!=e.runtimeTemplateName&&e.hasOwnProperty("runtimeTemplateName")&&!a.isString(e.runtimeTemplateName)?"runtimeTemplateName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.NotebookRuntimeOptions)return e;var t=new s.dataform.NotebookRuntimeOptions;return null!=e.outputBucket&&(t.outputBucket=String(e.outputBucket)),null!=e.runtimeTemplateName&&(t.runtimeTemplateName=String(e.runtimeTemplateName)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.runtimeTemplateName=""),null!=e.outputBucket&&e.hasOwnProperty("outputBucket")&&(r.outputBucket=e.outputBucket,t.oneofs&&(r.outputSink="outputBucket")),null!=e.runtimeTemplateName&&e.hasOwnProperty("runtimeTemplateName")&&(r.runtimeTemplateName=e.runtimeTemplateName),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.NotebookRuntimeOptions"},t}(),n.DataPreparation=function(){function t(e){if(this.targets=[],this.canonicalTargets=[],this.tags=[],this.dependencyTargets=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.target=null,t.prototype.canonicalTarget=null,t.prototype.targets=a.emptyArray,t.prototype.canonicalTargets=a.emptyArray,t.prototype.tags=a.emptyArray,t.prototype.dependencyTargets=a.emptyArray,t.prototype.fileName="",t.prototype.disabled=!1,t.prototype.dataPreparationYaml=null,t.prototype.query=null,t.prototype.errorTable=null,t.prototype.errorTableRetentionDays=0,t.prototype.load=null,Object.defineProperty(t.prototype,"definition",{get:a.oneOfGetter(r=["dataPreparationYaml","query"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.targets&&e.targets.length)for(var r=0;r<e.targets.length;++r)s.dataform.Target.encode(e.targets[r],t.uint32(10).fork()).ldelim();if(null!=e.canonicalTargets&&e.canonicalTargets.length)for(r=0;r<e.canonicalTargets.length;++r)s.dataform.Target.encode(e.canonicalTargets[r],t.uint32(18).fork()).ldelim();if(null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(26).string(e.tags[r]);if(null!=e.dependencyTargets&&e.dependencyTargets.length)for(r=0;r<e.dependencyTargets.length;++r)s.dataform.Target.encode(e.dependencyTargets[r],t.uint32(34).fork()).ldelim();return null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(42).string(e.fileName),null!=e.disabled&&Object.hasOwnProperty.call(e,"disabled")&&t.uint32(48).bool(e.disabled),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(66).fork()).ldelim(),null!=e.canonicalTarget&&Object.hasOwnProperty.call(e,"canonicalTarget")&&s.dataform.Target.encode(e.canonicalTarget,t.uint32(74).fork()).ldelim(),null!=e.dataPreparationYaml&&Object.hasOwnProperty.call(e,"dataPreparationYaml")&&t.uint32(90).string(e.dataPreparationYaml),null!=e.errorTable&&Object.hasOwnProperty.call(e,"errorTable")&&s.dataform.Target.encode(e.errorTable,t.uint32(98).fork()).ldelim(),null!=e.errorTableRetentionDays&&Object.hasOwnProperty.call(e,"errorTableRetentionDays")&&t.uint32(104).int32(e.errorTableRetentionDays),null!=e.query&&Object.hasOwnProperty.call(e,"query")&&t.uint32(122).string(e.query),null!=e.load&&Object.hasOwnProperty.call(e,"load")&&s.dataform.LoadConfiguration.encode(e.load,t.uint32(130).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.DataPreparation;e.pos<r;){var i=e.uint32();switch(i>>>3){case 8:n.target=s.dataform.Target.decode(e,e.uint32());break;case 9:n.canonicalTarget=s.dataform.Target.decode(e,e.uint32());break;case 1:n.targets&&n.targets.length||(n.targets=[]),n.targets.push(s.dataform.Target.decode(e,e.uint32()));break;case 2:n.canonicalTargets&&n.canonicalTargets.length||(n.canonicalTargets=[]),n.canonicalTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 3:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 4:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 5:n.fileName=e.string();break;case 6:n.disabled=e.bool();break;case 11:n.dataPreparationYaml=e.string();break;case 15:n.query=e.string();break;case 12:n.errorTable=s.dataform.Target.decode(e,e.uint32());break;case 13:n.errorTableRetentionDays=e.int32();break;case 16:n.load=s.dataform.LoadConfiguration.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.target&&e.hasOwnProperty("target")&&(n=s.dataform.Target.verify(e.target)))return"target."+n;if(null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(n=s.dataform.Target.verify(e.canonicalTarget)))return"canonicalTarget."+n;if(null!=e.targets&&e.hasOwnProperty("targets")){if(!Array.isArray(e.targets))return"targets: array expected";for(var r=0;r<e.targets.length;++r)if(n=s.dataform.Target.verify(e.targets[r]))return"targets."+n}if(null!=e.canonicalTargets&&e.hasOwnProperty("canonicalTargets")){if(!Array.isArray(e.canonicalTargets))return"canonicalTargets: array expected";for(r=0;r<e.canonicalTargets.length;++r)if(n=s.dataform.Target.verify(e.canonicalTargets[r]))return"canonicalTargets."+n}if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(r=0;r<e.tags.length;++r)if(!a.isString(e.tags[r]))return"tags: string[] expected"}if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(r=0;r<e.dependencyTargets.length;++r){var n;if(n=s.dataform.Target.verify(e.dependencyTargets[r]))return"dependencyTargets."+n}}if(null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName))return"fileName: string expected";if(null!=e.disabled&&e.hasOwnProperty("disabled")&&"boolean"!=typeof e.disabled)return"disabled: boolean expected";if(null!=e.dataPreparationYaml&&e.hasOwnProperty("dataPreparationYaml")&&(t.definition=1,!a.isString(e.dataPreparationYaml)))return"dataPreparationYaml: string expected";if(null!=e.query&&e.hasOwnProperty("query")){if(1===t.definition)return"definition: multiple values";if(t.definition=1,!a.isString(e.query))return"query: string expected"}return null!=e.errorTable&&e.hasOwnProperty("errorTable")&&(n=s.dataform.Target.verify(e.errorTable))?"errorTable."+n:null!=e.errorTableRetentionDays&&e.hasOwnProperty("errorTableRetentionDays")&&!a.isInteger(e.errorTableRetentionDays)?"errorTableRetentionDays: integer expected":null!=e.load&&e.hasOwnProperty("load")&&(n=s.dataform.LoadConfiguration.verify(e.load))?"load."+n:null},t.fromObject=function(e){if(e instanceof s.dataform.DataPreparation)return e;var t=new s.dataform.DataPreparation;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.DataPreparation.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.canonicalTarget){if("object"!=typeof e.canonicalTarget)throw TypeError(".dataform.DataPreparation.canonicalTarget: object expected");t.canonicalTarget=s.dataform.Target.fromObject(e.canonicalTarget)}if(e.targets){if(!Array.isArray(e.targets))throw TypeError(".dataform.DataPreparation.targets: array expected");t.targets=[];for(var r=0;r<e.targets.length;++r){if("object"!=typeof e.targets[r])throw TypeError(".dataform.DataPreparation.targets: object expected");t.targets[r]=s.dataform.Target.fromObject(e.targets[r])}}if(e.canonicalTargets){if(!Array.isArray(e.canonicalTargets))throw TypeError(".dataform.DataPreparation.canonicalTargets: array expected");for(t.canonicalTargets=[],r=0;r<e.canonicalTargets.length;++r){if("object"!=typeof e.canonicalTargets[r])throw TypeError(".dataform.DataPreparation.canonicalTargets: object expected");t.canonicalTargets[r]=s.dataform.Target.fromObject(e.canonicalTargets[r])}}if(e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.DataPreparation.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}if(e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.DataPreparation.dependencyTargets: array expected");for(t.dependencyTargets=[],r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.DataPreparation.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.Target.fromObject(e.dependencyTargets[r])}}if(null!=e.fileName&&(t.fileName=String(e.fileName)),null!=e.disabled&&(t.disabled=Boolean(e.disabled)),null!=e.dataPreparationYaml&&(t.dataPreparationYaml=String(e.dataPreparationYaml)),null!=e.query&&(t.query=String(e.query)),null!=e.errorTable){if("object"!=typeof e.errorTable)throw TypeError(".dataform.DataPreparation.errorTable: object expected");t.errorTable=s.dataform.Target.fromObject(e.errorTable)}if(null!=e.errorTableRetentionDays&&(t.errorTableRetentionDays=0|e.errorTableRetentionDays),null!=e.load){if("object"!=typeof e.load)throw TypeError(".dataform.DataPreparation.load: object expected");t.load=s.dataform.LoadConfiguration.fromObject(e.load)}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.targets=[],r.canonicalTargets=[],r.tags=[],r.dependencyTargets=[]),t.defaults&&(r.fileName="",r.disabled=!1,r.target=null,r.canonicalTarget=null,r.errorTable=null,r.errorTableRetentionDays=0,r.load=null),e.targets&&e.targets.length){r.targets=[];for(var n=0;n<e.targets.length;++n)r.targets[n]=s.dataform.Target.toObject(e.targets[n],t)}if(e.canonicalTargets&&e.canonicalTargets.length)for(r.canonicalTargets=[],n=0;n<e.canonicalTargets.length;++n)r.canonicalTargets[n]=s.dataform.Target.toObject(e.canonicalTargets[n],t);if(e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];if(e.dependencyTargets&&e.dependencyTargets.length)for(r.dependencyTargets=[],n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.Target.toObject(e.dependencyTargets[n],t);return null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.disabled&&e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),null!=e.canonicalTarget&&e.hasOwnProperty("canonicalTarget")&&(r.canonicalTarget=s.dataform.Target.toObject(e.canonicalTarget,t)),null!=e.dataPreparationYaml&&e.hasOwnProperty("dataPreparationYaml")&&(r.dataPreparationYaml=e.dataPreparationYaml,t.oneofs&&(r.definition="dataPreparationYaml")),null!=e.errorTable&&e.hasOwnProperty("errorTable")&&(r.errorTable=s.dataform.Target.toObject(e.errorTable,t)),null!=e.errorTableRetentionDays&&e.hasOwnProperty("errorTableRetentionDays")&&(r.errorTableRetentionDays=e.errorTableRetentionDays),null!=e.query&&e.hasOwnProperty("query")&&(r.query=e.query,t.oneofs&&(r.definition="query")),null!=e.load&&e.hasOwnProperty("load")&&(r.load=s.dataform.LoadConfiguration.toObject(e.load,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.DataPreparation"},t}(),n.LoadConfiguration=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.replace=null,t.prototype.append=null,t.prototype.maximum=null,t.prototype.unique=null,t.prototype.automatic=null,Object.defineProperty(t.prototype,"mode",{get:a.oneOfGetter(r=["replace","append","maximum","unique","automatic"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.replace&&Object.hasOwnProperty.call(e,"replace")&&s.dataform.SimpleLoadMode.encode(e.replace,t.uint32(10).fork()).ldelim(),null!=e.append&&Object.hasOwnProperty.call(e,"append")&&s.dataform.SimpleLoadMode.encode(e.append,t.uint32(18).fork()).ldelim(),null!=e.maximum&&Object.hasOwnProperty.call(e,"maximum")&&s.dataform.IncrementalLoadMode.encode(e.maximum,t.uint32(26).fork()).ldelim(),null!=e.unique&&Object.hasOwnProperty.call(e,"unique")&&s.dataform.IncrementalLoadMode.encode(e.unique,t.uint32(34).fork()).ldelim(),null!=e.automatic&&Object.hasOwnProperty.call(e,"automatic")&&s.dataform.IncrementalLoadMode.encode(e.automatic,t.uint32(42).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.LoadConfiguration;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.replace=s.dataform.SimpleLoadMode.decode(e,e.uint32());break;case 2:n.append=s.dataform.SimpleLoadMode.decode(e,e.uint32());break;case 3:n.maximum=s.dataform.IncrementalLoadMode.decode(e,e.uint32());break;case 4:n.unique=s.dataform.IncrementalLoadMode.decode(e,e.uint32());break;case 5:n.automatic=s.dataform.IncrementalLoadMode.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.replace&&e.hasOwnProperty("replace")&&(t.mode=1,r=s.dataform.SimpleLoadMode.verify(e.replace)))return"replace."+r;if(null!=e.append&&e.hasOwnProperty("append")){if(1===t.mode)return"mode: multiple values";if(t.mode=1,r=s.dataform.SimpleLoadMode.verify(e.append))return"append."+r}if(null!=e.maximum&&e.hasOwnProperty("maximum")){if(1===t.mode)return"mode: multiple values";if(t.mode=1,r=s.dataform.IncrementalLoadMode.verify(e.maximum))return"maximum."+r}if(null!=e.unique&&e.hasOwnProperty("unique")){if(1===t.mode)return"mode: multiple values";if(t.mode=1,r=s.dataform.IncrementalLoadMode.verify(e.unique))return"unique."+r}if(null!=e.automatic&&e.hasOwnProperty("automatic")){if(1===t.mode)return"mode: multiple values";var r;if(t.mode=1,r=s.dataform.IncrementalLoadMode.verify(e.automatic))return"automatic."+r}return null},t.fromObject=function(e){if(e instanceof s.dataform.LoadConfiguration)return e;var t=new s.dataform.LoadConfiguration;if(null!=e.replace){if("object"!=typeof e.replace)throw TypeError(".dataform.LoadConfiguration.replace: object expected");t.replace=s.dataform.SimpleLoadMode.fromObject(e.replace)}if(null!=e.append){if("object"!=typeof e.append)throw TypeError(".dataform.LoadConfiguration.append: object expected");t.append=s.dataform.SimpleLoadMode.fromObject(e.append)}if(null!=e.maximum){if("object"!=typeof e.maximum)throw TypeError(".dataform.LoadConfiguration.maximum: object expected");t.maximum=s.dataform.IncrementalLoadMode.fromObject(e.maximum)}if(null!=e.unique){if("object"!=typeof e.unique)throw TypeError(".dataform.LoadConfiguration.unique: object expected");t.unique=s.dataform.IncrementalLoadMode.fromObject(e.unique)}if(null!=e.automatic){if("object"!=typeof e.automatic)throw TypeError(".dataform.LoadConfiguration.automatic: object expected");t.automatic=s.dataform.IncrementalLoadMode.fromObject(e.automatic)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.replace&&e.hasOwnProperty("replace")&&(r.replace=s.dataform.SimpleLoadMode.toObject(e.replace,t),t.oneofs&&(r.mode="replace")),null!=e.append&&e.hasOwnProperty("append")&&(r.append=s.dataform.SimpleLoadMode.toObject(e.append,t),t.oneofs&&(r.mode="append")),null!=e.maximum&&e.hasOwnProperty("maximum")&&(r.maximum=s.dataform.IncrementalLoadMode.toObject(e.maximum,t),t.oneofs&&(r.mode="maximum")),null!=e.unique&&e.hasOwnProperty("unique")&&(r.unique=s.dataform.IncrementalLoadMode.toObject(e.unique,t),t.oneofs&&(r.mode="unique")),null!=e.automatic&&e.hasOwnProperty("automatic")&&(r.automatic=s.dataform.IncrementalLoadMode.toObject(e.automatic,t),t.oneofs&&(r.mode="automatic")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.LoadConfiguration"},t}(),n.SimpleLoadMode=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.SimpleLoadMode;e.pos<r;){var i=e.uint32();e.skipType(7&i)}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null},t.fromObject=function(e){return e instanceof s.dataform.SimpleLoadMode?e:new s.dataform.SimpleLoadMode},t.toObject=function(){return{}},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.SimpleLoadMode"},t}(),n.IncrementalLoadMode=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.columnName="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.columnName&&Object.hasOwnProperty.call(e,"columnName")&&t.uint32(10).string(e.columnName),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.IncrementalLoadMode;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.columnName=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.columnName&&e.hasOwnProperty("columnName")&&!a.isString(e.columnName)?"columnName: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.IncrementalLoadMode)return e;var t=new s.dataform.IncrementalLoadMode;return null!=e.columnName&&(t.columnName=String(e.columnName)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.columnName=""),null!=e.columnName&&e.hasOwnProperty("columnName")&&(r.columnName=e.columnName),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.IncrementalLoadMode"},t}(),n.CompiledGraph=function(){function t(e){if(this.tables=[],this.operations=[],this.assertions=[],this.declarations=[],this.tests=[],this.notebooks=[],this.dataPreparations=[],this.targets=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.projectConfig=null,t.prototype.tables=a.emptyArray,t.prototype.operations=a.emptyArray,t.prototype.assertions=a.emptyArray,t.prototype.declarations=a.emptyArray,t.prototype.tests=a.emptyArray,t.prototype.notebooks=a.emptyArray,t.prototype.dataPreparations=a.emptyArray,t.prototype.graphErrors=null,t.prototype.dataformCoreVersion="",t.prototype.targets=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.tables&&e.tables.length)for(var r=0;r<e.tables.length;++r)s.dataform.Table.encode(e.tables[r],t.uint32(10).fork()).ldelim();if(null!=e.operations&&e.operations.length)for(r=0;r<e.operations.length;++r)s.dataform.Operation.encode(e.operations[r],t.uint32(18).fork()).ldelim();if(null!=e.assertions&&e.assertions.length)for(r=0;r<e.assertions.length;++r)s.dataform.Assertion.encode(e.assertions[r],t.uint32(26).fork()).ldelim();if(null!=e.projectConfig&&Object.hasOwnProperty.call(e,"projectConfig")&&s.dataform.ProjectConfig.encode(e.projectConfig,t.uint32(34).fork()).ldelim(),null!=e.graphErrors&&Object.hasOwnProperty.call(e,"graphErrors")&&s.dataform.GraphErrors.encode(e.graphErrors,t.uint32(58).fork()).ldelim(),null!=e.tests&&e.tests.length)for(r=0;r<e.tests.length;++r)s.dataform.Test.encode(e.tests[r],t.uint32(66).fork()).ldelim();if(null!=e.declarations&&e.declarations.length)for(r=0;r<e.declarations.length;++r)s.dataform.Declaration.encode(e.declarations[r],t.uint32(74).fork()).ldelim();if(null!=e.dataformCoreVersion&&Object.hasOwnProperty.call(e,"dataformCoreVersion")&&t.uint32(82).string(e.dataformCoreVersion),null!=e.targets&&e.targets.length)for(r=0;r<e.targets.length;++r)s.dataform.Target.encode(e.targets[r],t.uint32(90).fork()).ldelim();if(null!=e.notebooks&&e.notebooks.length)for(r=0;r<e.notebooks.length;++r)s.dataform.Notebook.encode(e.notebooks[r],t.uint32(98).fork()).ldelim();if(null!=e.dataPreparations&&e.dataPreparations.length)for(r=0;r<e.dataPreparations.length;++r)s.dataform.DataPreparation.encode(e.dataPreparations[r],t.uint32(106).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CompiledGraph;e.pos<r;){var i=e.uint32();switch(i>>>3){case 4:n.projectConfig=s.dataform.ProjectConfig.decode(e,e.uint32());break;case 1:n.tables&&n.tables.length||(n.tables=[]),n.tables.push(s.dataform.Table.decode(e,e.uint32()));break;case 2:n.operations&&n.operations.length||(n.operations=[]),n.operations.push(s.dataform.Operation.decode(e,e.uint32()));break;case 3:n.assertions&&n.assertions.length||(n.assertions=[]),n.assertions.push(s.dataform.Assertion.decode(e,e.uint32()));break;case 9:n.declarations&&n.declarations.length||(n.declarations=[]),n.declarations.push(s.dataform.Declaration.decode(e,e.uint32()));break;case 8:n.tests&&n.tests.length||(n.tests=[]),n.tests.push(s.dataform.Test.decode(e,e.uint32()));break;case 12:n.notebooks&&n.notebooks.length||(n.notebooks=[]),n.notebooks.push(s.dataform.Notebook.decode(e,e.uint32()));break;case 13:n.dataPreparations&&n.dataPreparations.length||(n.dataPreparations=[]),n.dataPreparations.push(s.dataform.DataPreparation.decode(e,e.uint32()));break;case 7:n.graphErrors=s.dataform.GraphErrors.decode(e,e.uint32());break;case 10:n.dataformCoreVersion=e.string();break;case 11:n.targets&&n.targets.length||(n.targets=[]),n.targets.push(s.dataform.Target.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.projectConfig&&e.hasOwnProperty("projectConfig")&&(r=s.dataform.ProjectConfig.verify(e.projectConfig)))return"projectConfig."+r;if(null!=e.tables&&e.hasOwnProperty("tables")){if(!Array.isArray(e.tables))return"tables: array expected";for(var t=0;t<e.tables.length;++t)if(r=s.dataform.Table.verify(e.tables[t]))return"tables."+r}if(null!=e.operations&&e.hasOwnProperty("operations")){if(!Array.isArray(e.operations))return"operations: array expected";for(t=0;t<e.operations.length;++t)if(r=s.dataform.Operation.verify(e.operations[t]))return"operations."+r}if(null!=e.assertions&&e.hasOwnProperty("assertions")){if(!Array.isArray(e.assertions))return"assertions: array expected";for(t=0;t<e.assertions.length;++t)if(r=s.dataform.Assertion.verify(e.assertions[t]))return"assertions."+r}if(null!=e.declarations&&e.hasOwnProperty("declarations")){if(!Array.isArray(e.declarations))return"declarations: array expected";for(t=0;t<e.declarations.length;++t)if(r=s.dataform.Declaration.verify(e.declarations[t]))return"declarations."+r}if(null!=e.tests&&e.hasOwnProperty("tests")){if(!Array.isArray(e.tests))return"tests: array expected";for(t=0;t<e.tests.length;++t)if(r=s.dataform.Test.verify(e.tests[t]))return"tests."+r}if(null!=e.notebooks&&e.hasOwnProperty("notebooks")){if(!Array.isArray(e.notebooks))return"notebooks: array expected";for(t=0;t<e.notebooks.length;++t)if(r=s.dataform.Notebook.verify(e.notebooks[t]))return"notebooks."+r}if(null!=e.dataPreparations&&e.hasOwnProperty("dataPreparations")){if(!Array.isArray(e.dataPreparations))return"dataPreparations: array expected";for(t=0;t<e.dataPreparations.length;++t)if(r=s.dataform.DataPreparation.verify(e.dataPreparations[t]))return"dataPreparations."+r}if(null!=e.graphErrors&&e.hasOwnProperty("graphErrors")&&(r=s.dataform.GraphErrors.verify(e.graphErrors)))return"graphErrors."+r;if(null!=e.dataformCoreVersion&&e.hasOwnProperty("dataformCoreVersion")&&!a.isString(e.dataformCoreVersion))return"dataformCoreVersion: string expected";if(null!=e.targets&&e.hasOwnProperty("targets")){if(!Array.isArray(e.targets))return"targets: array expected";for(t=0;t<e.targets.length;++t){var r;if(r=s.dataform.Target.verify(e.targets[t]))return"targets."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.CompiledGraph)return e;var t=new s.dataform.CompiledGraph;if(null!=e.projectConfig){if("object"!=typeof e.projectConfig)throw TypeError(".dataform.CompiledGraph.projectConfig: object expected");t.projectConfig=s.dataform.ProjectConfig.fromObject(e.projectConfig)}if(e.tables){if(!Array.isArray(e.tables))throw TypeError(".dataform.CompiledGraph.tables: array expected");t.tables=[];for(var r=0;r<e.tables.length;++r){if("object"!=typeof e.tables[r])throw TypeError(".dataform.CompiledGraph.tables: object expected");t.tables[r]=s.dataform.Table.fromObject(e.tables[r])}}if(e.operations){if(!Array.isArray(e.operations))throw TypeError(".dataform.CompiledGraph.operations: array expected");for(t.operations=[],r=0;r<e.operations.length;++r){if("object"!=typeof e.operations[r])throw TypeError(".dataform.CompiledGraph.operations: object expected");t.operations[r]=s.dataform.Operation.fromObject(e.operations[r])}}if(e.assertions){if(!Array.isArray(e.assertions))throw TypeError(".dataform.CompiledGraph.assertions: array expected");for(t.assertions=[],r=0;r<e.assertions.length;++r){if("object"!=typeof e.assertions[r])throw TypeError(".dataform.CompiledGraph.assertions: object expected");t.assertions[r]=s.dataform.Assertion.fromObject(e.assertions[r])}}if(e.declarations){if(!Array.isArray(e.declarations))throw TypeError(".dataform.CompiledGraph.declarations: array expected");for(t.declarations=[],r=0;r<e.declarations.length;++r){if("object"!=typeof e.declarations[r])throw TypeError(".dataform.CompiledGraph.declarations: object expected");t.declarations[r]=s.dataform.Declaration.fromObject(e.declarations[r])}}if(e.tests){if(!Array.isArray(e.tests))throw TypeError(".dataform.CompiledGraph.tests: array expected");for(t.tests=[],r=0;r<e.tests.length;++r){if("object"!=typeof e.tests[r])throw TypeError(".dataform.CompiledGraph.tests: object expected");t.tests[r]=s.dataform.Test.fromObject(e.tests[r])}}if(e.notebooks){if(!Array.isArray(e.notebooks))throw TypeError(".dataform.CompiledGraph.notebooks: array expected");for(t.notebooks=[],r=0;r<e.notebooks.length;++r){if("object"!=typeof e.notebooks[r])throw TypeError(".dataform.CompiledGraph.notebooks: object expected");t.notebooks[r]=s.dataform.Notebook.fromObject(e.notebooks[r])}}if(e.dataPreparations){if(!Array.isArray(e.dataPreparations))throw TypeError(".dataform.CompiledGraph.dataPreparations: array expected");for(t.dataPreparations=[],r=0;r<e.dataPreparations.length;++r){if("object"!=typeof e.dataPreparations[r])throw TypeError(".dataform.CompiledGraph.dataPreparations: object expected");t.dataPreparations[r]=s.dataform.DataPreparation.fromObject(e.dataPreparations[r])}}if(null!=e.graphErrors){if("object"!=typeof e.graphErrors)throw TypeError(".dataform.CompiledGraph.graphErrors: object expected");t.graphErrors=s.dataform.GraphErrors.fromObject(e.graphErrors)}if(null!=e.dataformCoreVersion&&(t.dataformCoreVersion=String(e.dataformCoreVersion)),e.targets){if(!Array.isArray(e.targets))throw TypeError(".dataform.CompiledGraph.targets: array expected");for(t.targets=[],r=0;r<e.targets.length;++r){if("object"!=typeof e.targets[r])throw TypeError(".dataform.CompiledGraph.targets: object expected");t.targets[r]=s.dataform.Target.fromObject(e.targets[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.tables=[],r.operations=[],r.assertions=[],r.tests=[],r.declarations=[],r.targets=[],r.notebooks=[],r.dataPreparations=[]),t.defaults&&(r.projectConfig=null,r.graphErrors=null,r.dataformCoreVersion=""),e.tables&&e.tables.length){r.tables=[];for(var n=0;n<e.tables.length;++n)r.tables[n]=s.dataform.Table.toObject(e.tables[n],t)}if(e.operations&&e.operations.length)for(r.operations=[],n=0;n<e.operations.length;++n)r.operations[n]=s.dataform.Operation.toObject(e.operations[n],t);if(e.assertions&&e.assertions.length)for(r.assertions=[],n=0;n<e.assertions.length;++n)r.assertions[n]=s.dataform.Assertion.toObject(e.assertions[n],t);if(null!=e.projectConfig&&e.hasOwnProperty("projectConfig")&&(r.projectConfig=s.dataform.ProjectConfig.toObject(e.projectConfig,t)),null!=e.graphErrors&&e.hasOwnProperty("graphErrors")&&(r.graphErrors=s.dataform.GraphErrors.toObject(e.graphErrors,t)),e.tests&&e.tests.length)for(r.tests=[],n=0;n<e.tests.length;++n)r.tests[n]=s.dataform.Test.toObject(e.tests[n],t);if(e.declarations&&e.declarations.length)for(r.declarations=[],n=0;n<e.declarations.length;++n)r.declarations[n]=s.dataform.Declaration.toObject(e.declarations[n],t);if(null!=e.dataformCoreVersion&&e.hasOwnProperty("dataformCoreVersion")&&(r.dataformCoreVersion=e.dataformCoreVersion),e.targets&&e.targets.length)for(r.targets=[],n=0;n<e.targets.length;++n)r.targets[n]=s.dataform.Target.toObject(e.targets[n],t);if(e.notebooks&&e.notebooks.length)for(r.notebooks=[],n=0;n<e.notebooks.length;++n)r.notebooks[n]=s.dataform.Notebook.toObject(e.notebooks[n],t);if(e.dataPreparations&&e.dataPreparations.length)for(r.dataPreparations=[],n=0;n<e.dataPreparations.length;++n)r.dataPreparations[n]=s.dataform.DataPreparation.toObject(e.dataPreparations[n],t);return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CompiledGraph"},t}(),n.CoreExecutionRequest=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.compile=null,Object.defineProperty(t.prototype,"request",{get:a.oneOfGetter(r=["compile"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.compile&&Object.hasOwnProperty.call(e,"compile")&&s.dataform.CompileExecutionRequest.encode(e.compile,t.uint32(10).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CoreExecutionRequest;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.compile=s.dataform.CompileExecutionRequest.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.compile&&e.hasOwnProperty("compile")){var t=s.dataform.CompileExecutionRequest.verify(e.compile);if(t)return"compile."+t}return null},t.fromObject=function(e){if(e instanceof s.dataform.CoreExecutionRequest)return e;var t=new s.dataform.CoreExecutionRequest;if(null!=e.compile){if("object"!=typeof e.compile)throw TypeError(".dataform.CoreExecutionRequest.compile: object expected");t.compile=s.dataform.CompileExecutionRequest.fromObject(e.compile)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.compile&&e.hasOwnProperty("compile")&&(r.compile=s.dataform.CompileExecutionRequest.toObject(e.compile,t),t.oneofs&&(r.request="compile")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CoreExecutionRequest"},t}(),n.CoreExecutionResponse=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.compile=null,Object.defineProperty(t.prototype,"response",{get:a.oneOfGetter(r=["compile"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.compile&&Object.hasOwnProperty.call(e,"compile")&&s.dataform.CompileExecutionResponse.encode(e.compile,t.uint32(10).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CoreExecutionResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.compile=s.dataform.CompileExecutionResponse.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.compile&&e.hasOwnProperty("compile")){var t=s.dataform.CompileExecutionResponse.verify(e.compile);if(t)return"compile."+t}return null},t.fromObject=function(e){if(e instanceof s.dataform.CoreExecutionResponse)return e;var t=new s.dataform.CoreExecutionResponse;if(null!=e.compile){if("object"!=typeof e.compile)throw TypeError(".dataform.CoreExecutionResponse.compile: object expected");t.compile=s.dataform.CompileExecutionResponse.fromObject(e.compile)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.compile&&e.hasOwnProperty("compile")&&(r.compile=s.dataform.CompileExecutionResponse.toObject(e.compile,t),t.oneofs&&(r.response="compile")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CoreExecutionResponse"},t}(),n.CompileExecutionRequest=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.compileConfig=null,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.compileConfig&&Object.hasOwnProperty.call(e,"compileConfig")&&s.dataform.CompileConfig.encode(e.compileConfig,t.uint32(10).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CompileExecutionRequest;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.compileConfig=s.dataform.CompileConfig.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.compileConfig&&e.hasOwnProperty("compileConfig")){var t=s.dataform.CompileConfig.verify(e.compileConfig);if(t)return"compileConfig."+t}return null},t.fromObject=function(e){if(e instanceof s.dataform.CompileExecutionRequest)return e;var t=new s.dataform.CompileExecutionRequest;if(null!=e.compileConfig){if("object"!=typeof e.compileConfig)throw TypeError(".dataform.CompileExecutionRequest.compileConfig: object expected");t.compileConfig=s.dataform.CompileConfig.fromObject(e.compileConfig)}return t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.compileConfig=null),null!=e.compileConfig&&e.hasOwnProperty("compileConfig")&&(r.compileConfig=s.dataform.CompileConfig.toObject(e.compileConfig,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CompileExecutionRequest"},t}(),n.CompileExecutionResponse=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.compiledGraph=null,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.compiledGraph&&Object.hasOwnProperty.call(e,"compiledGraph")&&s.dataform.CompiledGraph.encode(e.compiledGraph,t.uint32(10).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.CompileExecutionResponse;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.compiledGraph=s.dataform.CompiledGraph.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.compiledGraph&&e.hasOwnProperty("compiledGraph")){var t=s.dataform.CompiledGraph.verify(e.compiledGraph);if(t)return"compiledGraph."+t}return null},t.fromObject=function(e){if(e instanceof s.dataform.CompileExecutionResponse)return e;var t=new s.dataform.CompileExecutionResponse;if(null!=e.compiledGraph){if("object"!=typeof e.compiledGraph)throw TypeError(".dataform.CompileExecutionResponse.compiledGraph: object expected");t.compiledGraph=s.dataform.CompiledGraph.fromObject(e.compiledGraph)}return t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.compiledGraph=null),null!=e.compiledGraph&&e.hasOwnProperty("compiledGraph")&&(r.compiledGraph=s.dataform.CompiledGraph.toObject(e.compiledGraph,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.CompileExecutionResponse"},t}(),n.SupportedFeatures=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN_FEATURE"]=0,t[e[1]="ARRAY_BUFFER_IPC"]=1,t}(),n.QueryEvaluationError=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.message="",t.prototype.errorLocation=null,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(10).string(e.message),null!=e.errorLocation&&Object.hasOwnProperty.call(e,"errorLocation")&&s.dataform.QueryEvaluationError.ErrorLocation.encode(e.errorLocation,t.uint32(18).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.QueryEvaluationError;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.message=e.string();break;case 2:n.errorLocation=s.dataform.QueryEvaluationError.ErrorLocation.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.message&&e.hasOwnProperty("message")&&!a.isString(e.message))return"message: string expected";if(null!=e.errorLocation&&e.hasOwnProperty("errorLocation")){var t=s.dataform.QueryEvaluationError.ErrorLocation.verify(e.errorLocation);if(t)return"errorLocation."+t}return null},t.fromObject=function(e){if(e instanceof s.dataform.QueryEvaluationError)return e;var t=new s.dataform.QueryEvaluationError;if(null!=e.message&&(t.message=String(e.message)),null!=e.errorLocation){if("object"!=typeof e.errorLocation)throw TypeError(".dataform.QueryEvaluationError.errorLocation: object expected");t.errorLocation=s.dataform.QueryEvaluationError.ErrorLocation.fromObject(e.errorLocation)}return t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.message="",r.errorLocation=null),null!=e.message&&e.hasOwnProperty("message")&&(r.message=e.message),null!=e.errorLocation&&e.hasOwnProperty("errorLocation")&&(r.errorLocation=s.dataform.QueryEvaluationError.ErrorLocation.toObject(e.errorLocation,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.QueryEvaluationError"},t.ErrorLocation=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.line=0,t.prototype.column=0,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.line&&Object.hasOwnProperty.call(e,"line")&&t.uint32(8).int32(e.line),null!=e.column&&Object.hasOwnProperty.call(e,"column")&&t.uint32(16).int32(e.column),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.QueryEvaluationError.ErrorLocation;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.line=e.int32();break;case 2:n.column=e.int32();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.line&&e.hasOwnProperty("line")&&!a.isInteger(e.line)?"line: integer expected":null!=e.column&&e.hasOwnProperty("column")&&!a.isInteger(e.column)?"column: integer expected":null},t.fromObject=function(e){if(e instanceof s.dataform.QueryEvaluationError.ErrorLocation)return e;var t=new s.dataform.QueryEvaluationError.ErrorLocation;return null!=e.line&&(t.line=0|e.line),null!=e.column&&(t.column=0|e.column),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.line=0,r.column=0),null!=e.line&&e.hasOwnProperty("line")&&(r.line=e.line),null!=e.column&&e.hasOwnProperty("column")&&(r.column=e.column),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.QueryEvaluationError.ErrorLocation"},t}(),t}(),n.QueryEvaluation=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.status=0,t.prototype.error=null,t.prototype.incremental=!1,t.prototype.query="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(8).int32(e.status),null!=e.error&&Object.hasOwnProperty.call(e,"error")&&s.dataform.QueryEvaluationError.encode(e.error,t.uint32(18).fork()).ldelim(),null!=e.incremental&&Object.hasOwnProperty.call(e,"incremental")&&t.uint32(24).bool(e.incremental),null!=e.query&&Object.hasOwnProperty.call(e,"query")&&t.uint32(34).string(e.query),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.QueryEvaluation;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.status=e.int32();break;case 2:n.error=s.dataform.QueryEvaluationError.decode(e,e.uint32());break;case 3:n.incremental=e.bool();break;case 4:n.query=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.status&&e.hasOwnProperty("status"))switch(e.status){default:return"status: enum value expected";case 0:case 1:}if(null!=e.error&&e.hasOwnProperty("error")){var t=s.dataform.QueryEvaluationError.verify(e.error);if(t)return"error."+t}return null!=e.incremental&&e.hasOwnProperty("incremental")&&"boolean"!=typeof e.incremental?"incremental: boolean expected":null!=e.query&&e.hasOwnProperty("query")&&!a.isString(e.query)?"query: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.QueryEvaluation)return e;var t=new s.dataform.QueryEvaluation;switch(e.status){default:if("number"==typeof e.status){t.status=e.status;break}break;case"SUCCESS":case 0:t.status=0;break;case"FAILURE":case 1:t.status=1}if(null!=e.error){if("object"!=typeof e.error)throw TypeError(".dataform.QueryEvaluation.error: object expected");t.error=s.dataform.QueryEvaluationError.fromObject(e.error)}return null!=e.incremental&&(t.incremental=Boolean(e.incremental)),null!=e.query&&(t.query=String(e.query)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.status=t.enums===String?"SUCCESS":0,r.error=null,r.incremental=!1,r.query=""),null!=e.status&&e.hasOwnProperty("status")&&(r.status=t.enums===String?void 0===s.dataform.QueryEvaluation.QueryEvaluationStatus[e.status]?e.status:s.dataform.QueryEvaluation.QueryEvaluationStatus[e.status]:e.status),null!=e.error&&e.hasOwnProperty("error")&&(r.error=s.dataform.QueryEvaluationError.toObject(e.error,t)),null!=e.incremental&&e.hasOwnProperty("incremental")&&(r.incremental=e.incremental),null!=e.query&&e.hasOwnProperty("query")&&(r.query=e.query),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.QueryEvaluation"},t.QueryEvaluationStatus=function(){var e={},t=Object.create(e);return t[e[0]="SUCCESS"]=0,t[e[1]="FAILURE"]=1,t}(),t}(),n.RunConfig=function(){function t(e){if(this.actions=[],this.tags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.actions=a.emptyArray,t.prototype.tags=a.emptyArray,t.prototype.includeDependencies=!1,t.prototype.includeDependents=!1,t.prototype.fullRefresh=!1,t.prototype.timeoutMillis=0,t.prototype.disableSetMetadata=!1,t.prototype.useRunCache=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.actions&&e.actions.length)for(var r=0;r<e.actions.length;++r)t.uint32(10).string(e.actions[r]);if(null!=e.fullRefresh&&Object.hasOwnProperty.call(e,"fullRefresh")&&t.uint32(16).bool(e.fullRefresh),null!=e.includeDependencies&&Object.hasOwnProperty.call(e,"includeDependencies")&&t.uint32(24).bool(e.includeDependencies),null!=e.tags&&e.tags.length)for(r=0;r<e.tags.length;++r)t.uint32(42).string(e.tags[r]);return null!=e.timeoutMillis&&Object.hasOwnProperty.call(e,"timeoutMillis")&&t.uint32(56).int32(e.timeoutMillis),null!=e.useRunCache&&Object.hasOwnProperty.call(e,"useRunCache")&&t.uint32(64).bool(e.useRunCache),null!=e.disableSetMetadata&&Object.hasOwnProperty.call(e,"disableSetMetadata")&&t.uint32(72).bool(e.disableSetMetadata),null!=e.includeDependents&&Object.hasOwnProperty.call(e,"includeDependents")&&t.uint32(88).bool(e.includeDependents),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.RunConfig;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.actions&&n.actions.length||(n.actions=[]),n.actions.push(e.string());break;case 5:n.tags&&n.tags.length||(n.tags=[]),n.tags.push(e.string());break;case 3:n.includeDependencies=e.bool();break;case 11:n.includeDependents=e.bool();break;case 2:n.fullRefresh=e.bool();break;case 7:n.timeoutMillis=e.int32();break;case 9:n.disableSetMetadata=e.bool();break;case 8:n.useRunCache=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.actions&&e.hasOwnProperty("actions")){if(!Array.isArray(e.actions))return"actions: array expected";for(var t=0;t<e.actions.length;++t)if(!a.isString(e.actions[t]))return"actions: string[] expected"}if(null!=e.tags&&e.hasOwnProperty("tags")){if(!Array.isArray(e.tags))return"tags: array expected";for(t=0;t<e.tags.length;++t)if(!a.isString(e.tags[t]))return"tags: string[] expected"}return null!=e.includeDependencies&&e.hasOwnProperty("includeDependencies")&&"boolean"!=typeof e.includeDependencies?"includeDependencies: boolean expected":null!=e.includeDependents&&e.hasOwnProperty("includeDependents")&&"boolean"!=typeof e.includeDependents?"includeDependents: boolean expected":null!=e.fullRefresh&&e.hasOwnProperty("fullRefresh")&&"boolean"!=typeof e.fullRefresh?"fullRefresh: boolean expected":null!=e.timeoutMillis&&e.hasOwnProperty("timeoutMillis")&&!a.isInteger(e.timeoutMillis)?"timeoutMillis: integer expected":null!=e.disableSetMetadata&&e.hasOwnProperty("disableSetMetadata")&&"boolean"!=typeof e.disableSetMetadata?"disableSetMetadata: boolean expected":null!=e.useRunCache&&e.hasOwnProperty("useRunCache")&&"boolean"!=typeof e.useRunCache?"useRunCache: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.RunConfig)return e;var t=new s.dataform.RunConfig;if(e.actions){if(!Array.isArray(e.actions))throw TypeError(".dataform.RunConfig.actions: array expected");t.actions=[];for(var r=0;r<e.actions.length;++r)t.actions[r]=String(e.actions[r])}if(e.tags){if(!Array.isArray(e.tags))throw TypeError(".dataform.RunConfig.tags: array expected");for(t.tags=[],r=0;r<e.tags.length;++r)t.tags[r]=String(e.tags[r])}return null!=e.includeDependencies&&(t.includeDependencies=Boolean(e.includeDependencies)),null!=e.includeDependents&&(t.includeDependents=Boolean(e.includeDependents)),null!=e.fullRefresh&&(t.fullRefresh=Boolean(e.fullRefresh)),null!=e.timeoutMillis&&(t.timeoutMillis=0|e.timeoutMillis),null!=e.disableSetMetadata&&(t.disableSetMetadata=Boolean(e.disableSetMetadata)),null!=e.useRunCache&&(t.useRunCache=Boolean(e.useRunCache)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.actions=[],r.tags=[]),t.defaults&&(r.fullRefresh=!1,r.includeDependencies=!1,r.timeoutMillis=0,r.useRunCache=!1,r.disableSetMetadata=!1,r.includeDependents=!1),e.actions&&e.actions.length){r.actions=[];for(var n=0;n<e.actions.length;++n)r.actions[n]=e.actions[n]}if(null!=e.fullRefresh&&e.hasOwnProperty("fullRefresh")&&(r.fullRefresh=e.fullRefresh),null!=e.includeDependencies&&e.hasOwnProperty("includeDependencies")&&(r.includeDependencies=e.includeDependencies),e.tags&&e.tags.length)for(r.tags=[],n=0;n<e.tags.length;++n)r.tags[n]=e.tags[n];return null!=e.timeoutMillis&&e.hasOwnProperty("timeoutMillis")&&(r.timeoutMillis=e.timeoutMillis),null!=e.useRunCache&&e.hasOwnProperty("useRunCache")&&(r.useRunCache=e.useRunCache),null!=e.disableSetMetadata&&e.hasOwnProperty("disableSetMetadata")&&(r.disableSetMetadata=e.disableSetMetadata),null!=e.includeDependents&&e.hasOwnProperty("includeDependents")&&(r.includeDependents=e.includeDependents),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.RunConfig"},t}(),n.ExecutionTask=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.type="",t.prototype.statement="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(10).string(e.type),null!=e.statement&&Object.hasOwnProperty.call(e,"statement")&&t.uint32(18).string(e.statement),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ExecutionTask;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.type=e.string();break;case 2:n.statement=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&!a.isString(e.type)?"type: string expected":null!=e.statement&&e.hasOwnProperty("statement")&&!a.isString(e.statement)?"statement: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ExecutionTask)return e;var t=new s.dataform.ExecutionTask;return null!=e.type&&(t.type=String(e.type)),null!=e.statement&&(t.statement=String(e.statement)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.type="",r.statement=""),null!=e.type&&e.hasOwnProperty("type")&&(r.type=e.type),null!=e.statement&&e.hasOwnProperty("statement")&&(r.statement=e.statement),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ExecutionTask"},t}(),n.ExecutionAction=function(){function t(e){if(this.dependencyTargets=[],this.tasks=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.fileName="",t.prototype.type="",t.prototype.tableType="",t.prototype.dependencyTargets=a.emptyArray,t.prototype.hermeticity=0,t.prototype.tasks=a.emptyArray,t.prototype.actionDescriptor=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.tasks&&e.tasks.length)for(var r=0;r<e.tasks.length;++r)s.dataform.ExecutionTask.encode(e.tasks[r],t.uint32(18).fork()).ldelim();if(null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(34).string(e.type),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(42).fork()).ldelim(),null!=e.tableType&&Object.hasOwnProperty.call(e,"tableType")&&t.uint32(50).string(e.tableType),null!=e.fileName&&Object.hasOwnProperty.call(e,"fileName")&&t.uint32(66).string(e.fileName),null!=e.actionDescriptor&&Object.hasOwnProperty.call(e,"actionDescriptor")&&s.dataform.ActionDescriptor.encode(e.actionDescriptor,t.uint32(74).fork()).ldelim(),null!=e.hermeticity&&Object.hasOwnProperty.call(e,"hermeticity")&&t.uint32(80).int32(e.hermeticity),null!=e.dependencyTargets&&e.dependencyTargets.length)for(r=0;r<e.dependencyTargets.length;++r)s.dataform.Target.encode(e.dependencyTargets[r],t.uint32(90).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ExecutionAction;e.pos<r;){var i=e.uint32();switch(i>>>3){case 5:n.target=s.dataform.Target.decode(e,e.uint32());break;case 8:n.fileName=e.string();break;case 4:n.type=e.string();break;case 6:n.tableType=e.string();break;case 11:n.dependencyTargets&&n.dependencyTargets.length||(n.dependencyTargets=[]),n.dependencyTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 10:n.hermeticity=e.int32();break;case 2:n.tasks&&n.tasks.length||(n.tasks=[]),n.tasks.push(s.dataform.ExecutionTask.decode(e,e.uint32()));break;case 9:n.actionDescriptor=s.dataform.ActionDescriptor.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.fileName&&e.hasOwnProperty("fileName")&&!a.isString(e.fileName))return"fileName: string expected";if(null!=e.type&&e.hasOwnProperty("type")&&!a.isString(e.type))return"type: string expected";if(null!=e.tableType&&e.hasOwnProperty("tableType")&&!a.isString(e.tableType))return"tableType: string expected";if(null!=e.dependencyTargets&&e.hasOwnProperty("dependencyTargets")){if(!Array.isArray(e.dependencyTargets))return"dependencyTargets: array expected";for(var t=0;t<e.dependencyTargets.length;++t)if(r=s.dataform.Target.verify(e.dependencyTargets[t]))return"dependencyTargets."+r}if(null!=e.hermeticity&&e.hasOwnProperty("hermeticity"))switch(e.hermeticity){default:return"hermeticity: enum value expected";case 0:case 1:case 2:}if(null!=e.tasks&&e.hasOwnProperty("tasks")){if(!Array.isArray(e.tasks))return"tasks: array expected";for(t=0;t<e.tasks.length;++t){var r;if(r=s.dataform.ExecutionTask.verify(e.tasks[t]))return"tasks."+r}}return null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r=s.dataform.ActionDescriptor.verify(e.actionDescriptor))?"actionDescriptor."+r:null},t.fromObject=function(e){if(e instanceof s.dataform.ExecutionAction)return e;var t=new s.dataform.ExecutionAction;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.ExecutionAction.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}if(null!=e.fileName&&(t.fileName=String(e.fileName)),null!=e.type&&(t.type=String(e.type)),null!=e.tableType&&(t.tableType=String(e.tableType)),e.dependencyTargets){if(!Array.isArray(e.dependencyTargets))throw TypeError(".dataform.ExecutionAction.dependencyTargets: array expected");t.dependencyTargets=[];for(var r=0;r<e.dependencyTargets.length;++r){if("object"!=typeof e.dependencyTargets[r])throw TypeError(".dataform.ExecutionAction.dependencyTargets: object expected");t.dependencyTargets[r]=s.dataform.Target.fromObject(e.dependencyTargets[r])}}switch(e.hermeticity){default:if("number"==typeof e.hermeticity){t.hermeticity=e.hermeticity;break}break;case"UNKNOWN":case 0:t.hermeticity=0;break;case"HERMETIC":case 1:t.hermeticity=1;break;case"NON_HERMETIC":case 2:t.hermeticity=2}if(e.tasks){if(!Array.isArray(e.tasks))throw TypeError(".dataform.ExecutionAction.tasks: array expected");for(t.tasks=[],r=0;r<e.tasks.length;++r){if("object"!=typeof e.tasks[r])throw TypeError(".dataform.ExecutionAction.tasks: object expected");t.tasks[r]=s.dataform.ExecutionTask.fromObject(e.tasks[r])}}if(null!=e.actionDescriptor){if("object"!=typeof e.actionDescriptor)throw TypeError(".dataform.ExecutionAction.actionDescriptor: object expected");t.actionDescriptor=s.dataform.ActionDescriptor.fromObject(e.actionDescriptor)}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.tasks=[],r.dependencyTargets=[]),t.defaults&&(r.type="",r.target=null,r.tableType="",r.fileName="",r.actionDescriptor=null,r.hermeticity=t.enums===String?"UNKNOWN":0),e.tasks&&e.tasks.length){r.tasks=[];for(var n=0;n<e.tasks.length;++n)r.tasks[n]=s.dataform.ExecutionTask.toObject(e.tasks[n],t)}if(null!=e.type&&e.hasOwnProperty("type")&&(r.type=e.type),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),null!=e.tableType&&e.hasOwnProperty("tableType")&&(r.tableType=e.tableType),null!=e.fileName&&e.hasOwnProperty("fileName")&&(r.fileName=e.fileName),null!=e.actionDescriptor&&e.hasOwnProperty("actionDescriptor")&&(r.actionDescriptor=s.dataform.ActionDescriptor.toObject(e.actionDescriptor,t)),null!=e.hermeticity&&e.hasOwnProperty("hermeticity")&&(r.hermeticity=t.enums===String?void 0===s.dataform.ActionHermeticity[e.hermeticity]?e.hermeticity:s.dataform.ActionHermeticity[e.hermeticity]:e.hermeticity),e.dependencyTargets&&e.dependencyTargets.length)for(r.dependencyTargets=[],n=0;n<e.dependencyTargets.length;++n)r.dependencyTargets[n]=s.dataform.Target.toObject(e.dependencyTargets[n],t);return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ExecutionAction"},t}(),n.WarehouseState=function(){function t(e){if(this.tables=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.tables=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.tables&&e.tables.length)for(var r=0;r<e.tables.length;++r)s.dataform.TableMetadata.encode(e.tables[r],t.uint32(10).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.WarehouseState;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.tables&&n.tables.length||(n.tables=[]),n.tables.push(s.dataform.TableMetadata.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.tables&&e.hasOwnProperty("tables")){if(!Array.isArray(e.tables))return"tables: array expected";for(var t=0;t<e.tables.length;++t){var r=s.dataform.TableMetadata.verify(e.tables[t]);if(r)return"tables."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.WarehouseState)return e;var t=new s.dataform.WarehouseState;if(e.tables){if(!Array.isArray(e.tables))throw TypeError(".dataform.WarehouseState.tables: array expected");t.tables=[];for(var r=0;r<e.tables.length;++r){if("object"!=typeof e.tables[r])throw TypeError(".dataform.WarehouseState.tables: object expected");t.tables[r]=s.dataform.TableMetadata.fromObject(e.tables[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.tables=[]),e.tables&&e.tables.length){r.tables=[];for(var n=0;n<e.tables.length;++n)r.tables[n]=s.dataform.TableMetadata.toObject(e.tables[n],t)}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.WarehouseState"},t}(),n.ExecutionGraph=function(){function t(e){if(this.declarationTargets=[],this.actions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.projectConfig=null,t.prototype.runConfig=null,t.prototype.warehouseState=null,t.prototype.declarationTargets=a.emptyArray,t.prototype.actions=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.projectConfig&&Object.hasOwnProperty.call(e,"projectConfig")&&s.dataform.ProjectConfig.encode(e.projectConfig,t.uint32(10).fork()).ldelim(),null!=e.runConfig&&Object.hasOwnProperty.call(e,"runConfig")&&s.dataform.RunConfig.encode(e.runConfig,t.uint32(18).fork()).ldelim(),null!=e.actions&&e.actions.length)for(var r=0;r<e.actions.length;++r)s.dataform.ExecutionAction.encode(e.actions[r],t.uint32(26).fork()).ldelim();if(null!=e.warehouseState&&Object.hasOwnProperty.call(e,"warehouseState")&&s.dataform.WarehouseState.encode(e.warehouseState,t.uint32(34).fork()).ldelim(),null!=e.declarationTargets&&e.declarationTargets.length)for(r=0;r<e.declarationTargets.length;++r)s.dataform.Target.encode(e.declarationTargets[r],t.uint32(42).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ExecutionGraph;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.projectConfig=s.dataform.ProjectConfig.decode(e,e.uint32());break;case 2:n.runConfig=s.dataform.RunConfig.decode(e,e.uint32());break;case 4:n.warehouseState=s.dataform.WarehouseState.decode(e,e.uint32());break;case 5:n.declarationTargets&&n.declarationTargets.length||(n.declarationTargets=[]),n.declarationTargets.push(s.dataform.Target.decode(e,e.uint32()));break;case 3:n.actions&&n.actions.length||(n.actions=[]),n.actions.push(s.dataform.ExecutionAction.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.projectConfig&&e.hasOwnProperty("projectConfig")&&(r=s.dataform.ProjectConfig.verify(e.projectConfig)))return"projectConfig."+r;if(null!=e.runConfig&&e.hasOwnProperty("runConfig")&&(r=s.dataform.RunConfig.verify(e.runConfig)))return"runConfig."+r;if(null!=e.warehouseState&&e.hasOwnProperty("warehouseState")&&(r=s.dataform.WarehouseState.verify(e.warehouseState)))return"warehouseState."+r;if(null!=e.declarationTargets&&e.hasOwnProperty("declarationTargets")){if(!Array.isArray(e.declarationTargets))return"declarationTargets: array expected";for(var t=0;t<e.declarationTargets.length;++t)if(r=s.dataform.Target.verify(e.declarationTargets[t]))return"declarationTargets."+r}if(null!=e.actions&&e.hasOwnProperty("actions")){if(!Array.isArray(e.actions))return"actions: array expected";for(t=0;t<e.actions.length;++t){var r;if(r=s.dataform.ExecutionAction.verify(e.actions[t]))return"actions."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.ExecutionGraph)return e;var t=new s.dataform.ExecutionGraph;if(null!=e.projectConfig){if("object"!=typeof e.projectConfig)throw TypeError(".dataform.ExecutionGraph.projectConfig: object expected");t.projectConfig=s.dataform.ProjectConfig.fromObject(e.projectConfig)}if(null!=e.runConfig){if("object"!=typeof e.runConfig)throw TypeError(".dataform.ExecutionGraph.runConfig: object expected");t.runConfig=s.dataform.RunConfig.fromObject(e.runConfig)}if(null!=e.warehouseState){if("object"!=typeof e.warehouseState)throw TypeError(".dataform.ExecutionGraph.warehouseState: object expected");t.warehouseState=s.dataform.WarehouseState.fromObject(e.warehouseState)}if(e.declarationTargets){if(!Array.isArray(e.declarationTargets))throw TypeError(".dataform.ExecutionGraph.declarationTargets: array expected");t.declarationTargets=[];for(var r=0;r<e.declarationTargets.length;++r){if("object"!=typeof e.declarationTargets[r])throw TypeError(".dataform.ExecutionGraph.declarationTargets: object expected");t.declarationTargets[r]=s.dataform.Target.fromObject(e.declarationTargets[r])}}if(e.actions){if(!Array.isArray(e.actions))throw TypeError(".dataform.ExecutionGraph.actions: array expected");for(t.actions=[],r=0;r<e.actions.length;++r){if("object"!=typeof e.actions[r])throw TypeError(".dataform.ExecutionGraph.actions: object expected");t.actions[r]=s.dataform.ExecutionAction.fromObject(e.actions[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.actions=[],r.declarationTargets=[]),t.defaults&&(r.projectConfig=null,r.runConfig=null,r.warehouseState=null),null!=e.projectConfig&&e.hasOwnProperty("projectConfig")&&(r.projectConfig=s.dataform.ProjectConfig.toObject(e.projectConfig,t)),null!=e.runConfig&&e.hasOwnProperty("runConfig")&&(r.runConfig=s.dataform.RunConfig.toObject(e.runConfig,t)),e.actions&&e.actions.length){r.actions=[];for(var n=0;n<e.actions.length;++n)r.actions[n]=s.dataform.ExecutionAction.toObject(e.actions[n],t)}if(null!=e.warehouseState&&e.hasOwnProperty("warehouseState")&&(r.warehouseState=s.dataform.WarehouseState.toObject(e.warehouseState,t)),e.declarationTargets&&e.declarationTargets.length)for(r.declarationTargets=[],n=0;n<e.declarationTargets.length;++n)r.declarationTargets[n]=s.dataform.Target.toObject(e.declarationTargets[n],t);return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ExecutionGraph"},t}(),n.Timing=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.startTimeMillis=0,t.prototype.endTimeMillis=0,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.startTimeMillis&&Object.hasOwnProperty.call(e,"startTimeMillis")&&t.uint32(8).int64(e.startTimeMillis),null!=e.endTimeMillis&&Object.hasOwnProperty.call(e,"endTimeMillis")&&t.uint32(16).int64(e.endTimeMillis),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Timing;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.startTimeMillis=e.int64();break;case 2:n.endTimeMillis=e.int64();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.startTimeMillis&&e.hasOwnProperty("startTimeMillis")&&!(a.isInteger(e.startTimeMillis)||e.startTimeMillis&&a.isInteger(e.startTimeMillis.low)&&a.isInteger(e.startTimeMillis.high))?"startTimeMillis: integer|Long expected":null!=e.endTimeMillis&&e.hasOwnProperty("endTimeMillis")&&!(a.isInteger(e.endTimeMillis)||e.endTimeMillis&&a.isInteger(e.endTimeMillis.low)&&a.isInteger(e.endTimeMillis.high))?"endTimeMillis: integer|Long expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Timing)return e;var t=new s.dataform.Timing;return null!=e.startTimeMillis&&(a.Long?(t.startTimeMillis=a.Long.fromValue(e.startTimeMillis)).unsigned=!1:"string"==typeof e.startTimeMillis?t.startTimeMillis=parseInt(e.startTimeMillis,10):"number"==typeof e.startTimeMillis?t.startTimeMillis=e.startTimeMillis:"object"==typeof e.startTimeMillis&&(t.startTimeMillis=new a.LongBits(e.startTimeMillis.low>>>0,e.startTimeMillis.high>>>0).toNumber())),null!=e.endTimeMillis&&(a.Long?(t.endTimeMillis=a.Long.fromValue(e.endTimeMillis)).unsigned=!1:"string"==typeof e.endTimeMillis?t.endTimeMillis=parseInt(e.endTimeMillis,10):"number"==typeof e.endTimeMillis?t.endTimeMillis=e.endTimeMillis:"object"==typeof e.endTimeMillis&&(t.endTimeMillis=new a.LongBits(e.endTimeMillis.low>>>0,e.endTimeMillis.high>>>0).toNumber())),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.startTimeMillis=0,r.endTimeMillis=0),null!=e.startTimeMillis&&e.hasOwnProperty("startTimeMillis")&&("number"==typeof e.startTimeMillis?r.startTimeMillis=t.longs===String?String(e.startTimeMillis):e.startTimeMillis:r.startTimeMillis=t.longs===String?a.Long.prototype.toString.call(e.startTimeMillis):t.longs===Number?new a.LongBits(e.startTimeMillis.low>>>0,e.startTimeMillis.high>>>0).toNumber():e.startTimeMillis),null!=e.endTimeMillis&&e.hasOwnProperty("endTimeMillis")&&("number"==typeof e.endTimeMillis?r.endTimeMillis=t.longs===String?String(e.endTimeMillis):e.endTimeMillis:r.endTimeMillis=t.longs===String?a.Long.prototype.toString.call(e.endTimeMillis):t.longs===Number?new a.LongBits(e.endTimeMillis.low>>>0,e.endTimeMillis.high>>>0).toNumber():e.endTimeMillis),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Timing"},t}(),n.RunResult=function(){function t(e){if(this.actions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.status=0,t.prototype.actions=a.emptyArray,t.prototype.timing=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(8).int32(e.status),null!=e.actions&&e.actions.length)for(var r=0;r<e.actions.length;++r)s.dataform.ActionResult.encode(e.actions[r],t.uint32(18).fork()).ldelim();return null!=e.timing&&Object.hasOwnProperty.call(e,"timing")&&s.dataform.Timing.encode(e.timing,t.uint32(26).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.RunResult;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.status=e.int32();break;case 2:n.actions&&n.actions.length||(n.actions=[]),n.actions.push(s.dataform.ActionResult.decode(e,e.uint32()));break;case 3:n.timing=s.dataform.Timing.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.status&&e.hasOwnProperty("status"))switch(e.status){default:return"status: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}if(null!=e.actions&&e.hasOwnProperty("actions")){if(!Array.isArray(e.actions))return"actions: array expected";for(var t=0;t<e.actions.length;++t)if(r=s.dataform.ActionResult.verify(e.actions[t]))return"actions."+r}var r;return null!=e.timing&&e.hasOwnProperty("timing")&&(r=s.dataform.Timing.verify(e.timing))?"timing."+r:null},t.fromObject=function(e){if(e instanceof s.dataform.RunResult)return e;var t=new s.dataform.RunResult;switch(e.status){default:if("number"==typeof e.status){t.status=e.status;break}break;case"UNKNOWN":case 0:t.status=0;break;case"RUNNING":case 1:t.status=1;break;case"SUCCESSFUL":case 2:t.status=2;break;case"FAILED":case 3:t.status=3;break;case"CANCELLED":case 4:t.status=4;break;case"TIMED_OUT":case 5:t.status=5}if(e.actions){if(!Array.isArray(e.actions))throw TypeError(".dataform.RunResult.actions: array expected");t.actions=[];for(var r=0;r<e.actions.length;++r){if("object"!=typeof e.actions[r])throw TypeError(".dataform.RunResult.actions: object expected");t.actions[r]=s.dataform.ActionResult.fromObject(e.actions[r])}}if(null!=e.timing){if("object"!=typeof e.timing)throw TypeError(".dataform.RunResult.timing: object expected");t.timing=s.dataform.Timing.fromObject(e.timing)}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.actions=[]),t.defaults&&(r.status=t.enums===String?"UNKNOWN":0,r.timing=null),null!=e.status&&e.hasOwnProperty("status")&&(r.status=t.enums===String?void 0===s.dataform.RunResult.ExecutionStatus[e.status]?e.status:s.dataform.RunResult.ExecutionStatus[e.status]:e.status),e.actions&&e.actions.length){r.actions=[];for(var n=0;n<e.actions.length;++n)r.actions[n]=s.dataform.ActionResult.toObject(e.actions[n],t)}return null!=e.timing&&e.hasOwnProperty("timing")&&(r.timing=s.dataform.Timing.toObject(e.timing,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.RunResult"},t.ExecutionStatus=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="RUNNING"]=1,t[e[2]="SUCCESSFUL"]=2,t[e[3]="FAILED"]=3,t[e[4]="CANCELLED"]=4,t[e[5]="TIMED_OUT"]=5,t}(),t}(),n.ActionResult=function(){function t(e){if(this.tasks=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.status=0,t.prototype.tasks=a.emptyArray,t.prototype.timing=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(16).int32(e.status),null!=e.tasks&&e.tasks.length)for(var r=0;r<e.tasks.length;++r)s.dataform.TaskResult.encode(e.tasks[r],t.uint32(26).fork()).ldelim();return null!=e.timing&&Object.hasOwnProperty.call(e,"timing")&&s.dataform.Timing.encode(e.timing,t.uint32(34).fork()).ldelim(),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(42).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ActionResult;e.pos<r;){var i=e.uint32();switch(i>>>3){case 5:n.target=s.dataform.Target.decode(e,e.uint32());break;case 2:n.status=e.int32();break;case 3:n.tasks&&n.tasks.length||(n.tasks=[]),n.tasks.push(s.dataform.TaskResult.decode(e,e.uint32()));break;case 4:n.timing=s.dataform.Timing.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.status&&e.hasOwnProperty("status"))switch(e.status){default:return"status: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.tasks&&e.hasOwnProperty("tasks")){if(!Array.isArray(e.tasks))return"tasks: array expected";for(var t=0;t<e.tasks.length;++t){var r;if(r=s.dataform.TaskResult.verify(e.tasks[t]))return"tasks."+r}}return null!=e.timing&&e.hasOwnProperty("timing")&&(r=s.dataform.Timing.verify(e.timing))?"timing."+r:null},t.fromObject=function(e){if(e instanceof s.dataform.ActionResult)return e;var t=new s.dataform.ActionResult;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.ActionResult.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}switch(e.status){default:if("number"==typeof e.status){t.status=e.status;break}break;case"UNKNOWN":case 0:t.status=0;break;case"RUNNING":case 1:t.status=1;break;case"SUCCESSFUL":case 2:t.status=2;break;case"FAILED":case 3:t.status=3;break;case"SKIPPED":case 4:t.status=4;break;case"DISABLED":case 5:t.status=5;break;case"CANCELLED":case 6:t.status=6}if(e.tasks){if(!Array.isArray(e.tasks))throw TypeError(".dataform.ActionResult.tasks: array expected");t.tasks=[];for(var r=0;r<e.tasks.length;++r){if("object"!=typeof e.tasks[r])throw TypeError(".dataform.ActionResult.tasks: object expected");t.tasks[r]=s.dataform.TaskResult.fromObject(e.tasks[r])}}if(null!=e.timing){if("object"!=typeof e.timing)throw TypeError(".dataform.ActionResult.timing: object expected");t.timing=s.dataform.Timing.fromObject(e.timing)}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.tasks=[]),t.defaults&&(r.status=t.enums===String?"UNKNOWN":0,r.timing=null,r.target=null),null!=e.status&&e.hasOwnProperty("status")&&(r.status=t.enums===String?void 0===s.dataform.ActionResult.ExecutionStatus[e.status]?e.status:s.dataform.ActionResult.ExecutionStatus[e.status]:e.status),e.tasks&&e.tasks.length){r.tasks=[];for(var n=0;n<e.tasks.length;++n)r.tasks[n]=s.dataform.TaskResult.toObject(e.tasks[n],t)}return null!=e.timing&&e.hasOwnProperty("timing")&&(r.timing=s.dataform.Timing.toObject(e.timing,t)),null!=e.target&&e.hasOwnProperty("target")&&(r.target=s.dataform.Target.toObject(e.target,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ActionResult"},t.ExecutionStatus=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="RUNNING"]=1,t[e[2]="SUCCESSFUL"]=2,t[e[3]="FAILED"]=3,t[e[4]="SKIPPED"]=4,t[e[5]="DISABLED"]=5,t[e[6]="CANCELLED"]=6,t}(),t}(),n.ExecutionMetadata=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.bigquery=null,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.bigquery&&Object.hasOwnProperty.call(e,"bigquery")&&s.dataform.ExecutionMetadata.BigqueryMetadata.encode(e.bigquery,t.uint32(10).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ExecutionMetadata;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.bigquery=s.dataform.ExecutionMetadata.BigqueryMetadata.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.bigquery&&e.hasOwnProperty("bigquery")){var t=s.dataform.ExecutionMetadata.BigqueryMetadata.verify(e.bigquery);if(t)return"bigquery."+t}return null},t.fromObject=function(e){if(e instanceof s.dataform.ExecutionMetadata)return e;var t=new s.dataform.ExecutionMetadata;if(null!=e.bigquery){if("object"!=typeof e.bigquery)throw TypeError(".dataform.ExecutionMetadata.bigquery: object expected");t.bigquery=s.dataform.ExecutionMetadata.BigqueryMetadata.fromObject(e.bigquery)}return t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.bigquery=null),null!=e.bigquery&&e.hasOwnProperty("bigquery")&&(r.bigquery=s.dataform.ExecutionMetadata.BigqueryMetadata.toObject(e.bigquery,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ExecutionMetadata"},t.BigqueryMetadata=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.jobId="",t.prototype.totalBytesProcessed=0,t.prototype.totalBytesBilled=0,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.jobId&&Object.hasOwnProperty.call(e,"jobId")&&t.uint32(10).string(e.jobId),null!=e.totalBytesProcessed&&Object.hasOwnProperty.call(e,"totalBytesProcessed")&&t.uint32(16).int64(e.totalBytesProcessed),null!=e.totalBytesBilled&&Object.hasOwnProperty.call(e,"totalBytesBilled")&&t.uint32(24).int64(e.totalBytesBilled),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.ExecutionMetadata.BigqueryMetadata;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.jobId=e.string();break;case 2:n.totalBytesProcessed=e.int64();break;case 3:n.totalBytesBilled=e.int64();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.jobId&&e.hasOwnProperty("jobId")&&!a.isString(e.jobId)?"jobId: string expected":null!=e.totalBytesProcessed&&e.hasOwnProperty("totalBytesProcessed")&&!(a.isInteger(e.totalBytesProcessed)||e.totalBytesProcessed&&a.isInteger(e.totalBytesProcessed.low)&&a.isInteger(e.totalBytesProcessed.high))?"totalBytesProcessed: integer|Long expected":null!=e.totalBytesBilled&&e.hasOwnProperty("totalBytesBilled")&&!(a.isInteger(e.totalBytesBilled)||e.totalBytesBilled&&a.isInteger(e.totalBytesBilled.low)&&a.isInteger(e.totalBytesBilled.high))?"totalBytesBilled: integer|Long expected":null},t.fromObject=function(e){if(e instanceof s.dataform.ExecutionMetadata.BigqueryMetadata)return e;var t=new s.dataform.ExecutionMetadata.BigqueryMetadata;return null!=e.jobId&&(t.jobId=String(e.jobId)),null!=e.totalBytesProcessed&&(a.Long?(t.totalBytesProcessed=a.Long.fromValue(e.totalBytesProcessed)).unsigned=!1:"string"==typeof e.totalBytesProcessed?t.totalBytesProcessed=parseInt(e.totalBytesProcessed,10):"number"==typeof e.totalBytesProcessed?t.totalBytesProcessed=e.totalBytesProcessed:"object"==typeof e.totalBytesProcessed&&(t.totalBytesProcessed=new a.LongBits(e.totalBytesProcessed.low>>>0,e.totalBytesProcessed.high>>>0).toNumber())),null!=e.totalBytesBilled&&(a.Long?(t.totalBytesBilled=a.Long.fromValue(e.totalBytesBilled)).unsigned=!1:"string"==typeof e.totalBytesBilled?t.totalBytesBilled=parseInt(e.totalBytesBilled,10):"number"==typeof e.totalBytesBilled?t.totalBytesBilled=e.totalBytesBilled:"object"==typeof e.totalBytesBilled&&(t.totalBytesBilled=new a.LongBits(e.totalBytesBilled.low>>>0,e.totalBytesBilled.high>>>0).toNumber())),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.jobId="",r.totalBytesProcessed=0,r.totalBytesBilled=0),null!=e.jobId&&e.hasOwnProperty("jobId")&&(r.jobId=e.jobId),null!=e.totalBytesProcessed&&e.hasOwnProperty("totalBytesProcessed")&&("number"==typeof e.totalBytesProcessed?r.totalBytesProcessed=t.longs===String?String(e.totalBytesProcessed):e.totalBytesProcessed:r.totalBytesProcessed=t.longs===String?a.Long.prototype.toString.call(e.totalBytesProcessed):t.longs===Number?new a.LongBits(e.totalBytesProcessed.low>>>0,e.totalBytesProcessed.high>>>0).toNumber():e.totalBytesProcessed),null!=e.totalBytesBilled&&e.hasOwnProperty("totalBytesBilled")&&("number"==typeof e.totalBytesBilled?r.totalBytesBilled=t.longs===String?String(e.totalBytesBilled):e.totalBytesBilled:r.totalBytesBilled=t.longs===String?a.Long.prototype.toString.call(e.totalBytesBilled):t.longs===Number?new a.LongBits(e.totalBytesBilled.low>>>0,e.totalBytesBilled.high>>>0).toNumber():e.totalBytesBilled),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.ExecutionMetadata.BigqueryMetadata"},t}(),t}(),n.TaskResult=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.status=0,t.prototype.errorMessage="",t.prototype.timing=null,t.prototype.metadata=null,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(8).int32(e.status),null!=e.errorMessage&&Object.hasOwnProperty.call(e,"errorMessage")&&t.uint32(18).string(e.errorMessage),null!=e.timing&&Object.hasOwnProperty.call(e,"timing")&&s.dataform.Timing.encode(e.timing,t.uint32(26).fork()).ldelim(),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&s.dataform.ExecutionMetadata.encode(e.metadata,t.uint32(34).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.TaskResult;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.status=e.int32();break;case 2:n.errorMessage=e.string();break;case 3:n.timing=s.dataform.Timing.decode(e,e.uint32());break;case 4:n.metadata=s.dataform.ExecutionMetadata.decode(e,e.uint32());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.status&&e.hasOwnProperty("status"))switch(e.status){default:return"status: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}return null!=e.errorMessage&&e.hasOwnProperty("errorMessage")&&!a.isString(e.errorMessage)?"errorMessage: string expected":null!=e.timing&&e.hasOwnProperty("timing")&&(t=s.dataform.Timing.verify(e.timing))?"timing."+t:null!=e.metadata&&e.hasOwnProperty("metadata")&&(t=s.dataform.ExecutionMetadata.verify(e.metadata))?"metadata."+t:null;var t},t.fromObject=function(e){if(e instanceof s.dataform.TaskResult)return e;var t=new s.dataform.TaskResult;switch(e.status){default:if("number"==typeof e.status){t.status=e.status;break}break;case"UNKNOWN":case 0:t.status=0;break;case"RUNNING":case 1:t.status=1;break;case"SUCCESSFUL":case 2:t.status=2;break;case"FAILED":case 3:t.status=3;break;case"SKIPPED":case 4:t.status=4;break;case"CANCELLED":case 5:t.status=5}if(null!=e.errorMessage&&(t.errorMessage=String(e.errorMessage)),null!=e.timing){if("object"!=typeof e.timing)throw TypeError(".dataform.TaskResult.timing: object expected");t.timing=s.dataform.Timing.fromObject(e.timing)}if(null!=e.metadata){if("object"!=typeof e.metadata)throw TypeError(".dataform.TaskResult.metadata: object expected");t.metadata=s.dataform.ExecutionMetadata.fromObject(e.metadata)}return t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.status=t.enums===String?"UNKNOWN":0,r.errorMessage="",r.timing=null,r.metadata=null),null!=e.status&&e.hasOwnProperty("status")&&(r.status=t.enums===String?void 0===s.dataform.TaskResult.ExecutionStatus[e.status]?e.status:s.dataform.TaskResult.ExecutionStatus[e.status]:e.status),null!=e.errorMessage&&e.hasOwnProperty("errorMessage")&&(r.errorMessage=e.errorMessage),null!=e.timing&&e.hasOwnProperty("timing")&&(r.timing=s.dataform.Timing.toObject(e.timing,t)),null!=e.metadata&&e.hasOwnProperty("metadata")&&(r.metadata=s.dataform.ExecutionMetadata.toObject(e.metadata,t)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.TaskResult"},t.ExecutionStatus=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="RUNNING"]=1,t[e[2]="SUCCESSFUL"]=2,t[e[3]="FAILED"]=3,t[e[4]="SKIPPED"]=4,t[e[5]="CANCELLED"]=5,t}(),t}(),n.TestResult=function(){function t(e){if(this.messages=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.name="",t.prototype.successful=!1,t.prototype.messages=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.successful&&Object.hasOwnProperty.call(e,"successful")&&t.uint32(16).bool(e.successful),null!=e.messages&&e.messages.length)for(var r=0;r<e.messages.length;++r)t.uint32(26).string(e.messages[r]);return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.TestResult;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 2:n.successful=e.bool();break;case 3:n.messages&&n.messages.length||(n.messages=[]),n.messages.push(e.string());break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.successful&&e.hasOwnProperty("successful")&&"boolean"!=typeof e.successful)return"successful: boolean expected";if(null!=e.messages&&e.hasOwnProperty("messages")){if(!Array.isArray(e.messages))return"messages: array expected";for(var t=0;t<e.messages.length;++t)if(!a.isString(e.messages[t]))return"messages: string[] expected"}return null},t.fromObject=function(e){if(e instanceof s.dataform.TestResult)return e;var t=new s.dataform.TestResult;if(null!=e.name&&(t.name=String(e.name)),null!=e.successful&&(t.successful=Boolean(e.successful)),e.messages){if(!Array.isArray(e.messages))throw TypeError(".dataform.TestResult.messages: array expected");t.messages=[];for(var r=0;r<e.messages.length;++r)t.messages[r]=String(e.messages[r])}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.messages=[]),t.defaults&&(r.name="",r.successful=!1),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.successful&&e.hasOwnProperty("successful")&&(r.successful=e.successful),e.messages&&e.messages.length){r.messages=[];for(var n=0;n<e.messages.length;++n)r.messages[n]=e.messages[n]}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.TestResult"},t}(),n.Field=function(){function t(e){if(this.flags=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var r;return t.prototype.name="",t.prototype.flags=a.emptyArray,t.prototype.primitive=null,t.prototype.struct=null,t.prototype.description="",Object.defineProperty(t.prototype,"type",{get:a.oneOfGetter(r=["primitive","struct"]),set:a.oneOfSetter(r)}),t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.struct&&Object.hasOwnProperty.call(e,"struct")&&s.dataform.Fields.encode(e.struct,t.uint32(26).fork()).ldelim(),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(42).string(e.description),null!=e.flags&&e.flags.length){t.uint32(50).fork();for(var r=0;r<e.flags.length;++r)t.int32(e.flags[r]);t.ldelim()}return null!=e.primitive&&Object.hasOwnProperty.call(e,"primitive")&&t.uint32(56).int32(e.primitive),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Field;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.name=e.string();break;case 6:if(n.flags&&n.flags.length||(n.flags=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)n.flags.push(e.int32());else n.flags.push(e.int32());break;case 7:n.primitive=e.int32();break;case 3:n.struct=s.dataform.Fields.decode(e,e.uint32());break;case 5:n.description=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.name&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(null!=e.flags&&e.hasOwnProperty("flags")){if(!Array.isArray(e.flags))return"flags: array expected";for(var r=0;r<e.flags.length;++r)switch(e.flags[r]){default:return"flags: enum value[] expected";case 0:case 1:}}if(null!=e.primitive&&e.hasOwnProperty("primitive"))switch(t.type=1,e.primitive){default:return"primitive: enum value expected";case 0:case 1:case 2:case 5:case 3:case 4:case 6:case 7:case 8:case 9:case 10:case 11:case 12:}if(null!=e.struct&&e.hasOwnProperty("struct")){if(1===t.type)return"type: multiple values";t.type=1;var n=s.dataform.Fields.verify(e.struct);if(n)return"struct."+n}return null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description)?"description: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.Field)return e;var t=new s.dataform.Field;if(null!=e.name&&(t.name=String(e.name)),e.flags){if(!Array.isArray(e.flags))throw TypeError(".dataform.Field.flags: array expected");t.flags=[];for(var r=0;r<e.flags.length;++r)switch(e.flags[r]){default:if("number"==typeof e.flags[r]){t.flags[r]=e.flags[r];break}case"UNKNOWN_FLAG":case 0:t.flags[r]=0;break;case"REPEATED":case 1:t.flags[r]=1}}switch(e.primitive){default:if("number"==typeof e.primitive){t.primitive=e.primitive;break}break;case"UNKNOWN":case 0:t.primitive=0;break;case"INTEGER":case 1:t.primitive=1;break;case"FLOAT":case 2:t.primitive=2;break;case"NUMERIC":case 5:t.primitive=5;break;case"BOOLEAN":case 3:t.primitive=3;break;case"STRING":case 4:t.primitive=4;break;case"DATE":case 6:t.primitive=6;break;case"DATETIME":case 7:t.primitive=7;break;case"TIMESTAMP":case 8:t.primitive=8;break;case"TIME":case 9:t.primitive=9;break;case"BYTES":case 10:t.primitive=10;break;case"ANY":case 11:t.primitive=11;break;case"GEOGRAPHY":case 12:t.primitive=12}if(null!=e.struct){if("object"!=typeof e.struct)throw TypeError(".dataform.Field.struct: object expected");t.struct=s.dataform.Fields.fromObject(e.struct)}return null!=e.description&&(t.description=String(e.description)),t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.flags=[]),t.defaults&&(r.name="",r.description=""),null!=e.name&&e.hasOwnProperty("name")&&(r.name=e.name),null!=e.struct&&e.hasOwnProperty("struct")&&(r.struct=s.dataform.Fields.toObject(e.struct,t),t.oneofs&&(r.type="struct")),null!=e.description&&e.hasOwnProperty("description")&&(r.description=e.description),e.flags&&e.flags.length){r.flags=[];for(var n=0;n<e.flags.length;++n)r.flags[n]=t.enums===String?void 0===s.dataform.Field.Flag[e.flags[n]]?e.flags[n]:s.dataform.Field.Flag[e.flags[n]]:e.flags[n]}return null!=e.primitive&&e.hasOwnProperty("primitive")&&(r.primitive=t.enums===String?void 0===s.dataform.Field.Primitive[e.primitive]?e.primitive:s.dataform.Field.Primitive[e.primitive]:e.primitive,t.oneofs&&(r.type="primitive")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Field"},t.Primitive=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="INTEGER"]=1,t[e[2]="FLOAT"]=2,t[e[5]="NUMERIC"]=5,t[e[3]="BOOLEAN"]=3,t[e[4]="STRING"]=4,t[e[6]="DATE"]=6,t[e[7]="DATETIME"]=7,t[e[8]="TIMESTAMP"]=8,t[e[9]="TIME"]=9,t[e[10]="BYTES"]=10,t[e[11]="ANY"]=11,t[e[12]="GEOGRAPHY"]=12,t}(),t.Flag=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN_FLAG"]=0,t[e[1]="REPEATED"]=1,t}(),t}(),n.Fields=function(){function t(e){if(this.fields=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.fields=a.emptyArray,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.fields&&e.fields.length)for(var r=0;r<e.fields.length;++r)s.dataform.Field.encode(e.fields[r],t.uint32(10).fork()).ldelim();return t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.Fields;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.fields&&n.fields.length||(n.fields=[]),n.fields.push(s.dataform.Field.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.fields&&e.hasOwnProperty("fields")){if(!Array.isArray(e.fields))return"fields: array expected";for(var t=0;t<e.fields.length;++t){var r=s.dataform.Field.verify(e.fields[t]);if(r)return"fields."+r}}return null},t.fromObject=function(e){if(e instanceof s.dataform.Fields)return e;var t=new s.dataform.Fields;if(e.fields){if(!Array.isArray(e.fields))throw TypeError(".dataform.Fields.fields: array expected");t.fields=[];for(var r=0;r<e.fields.length;++r){if("object"!=typeof e.fields[r])throw TypeError(".dataform.Fields.fields: object expected");t.fields[r]=s.dataform.Field.fromObject(e.fields[r])}}return t},t.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.fields=[]),e.fields&&e.fields.length){r.fields=[];for(var n=0;n<e.fields.length;++n)r.fields[n]=s.dataform.Field.toObject(e.fields[n],t)}return r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.Fields"},t}(),n.TableMetadata=function(){function t(e){if(this.fields=[],this.labels={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.target=null,t.prototype.type=0,t.prototype.fields=a.emptyArray,t.prototype.description="",t.prototype.labels=a.emptyObject,t.prototype.lastUpdatedMillis=0,t.prototype.bigquery=null,t.create=function(e){return new t(e)},t.encode=function(e,t){if(t||(t=i.create()),null!=e.target&&Object.hasOwnProperty.call(e,"target")&&s.dataform.Target.encode(e.target,t.uint32(10).fork()).ldelim(),null!=e.fields&&e.fields.length)for(var r=0;r<e.fields.length;++r)s.dataform.Field.encode(e.fields[r],t.uint32(26).fork()).ldelim();if(null!=e.lastUpdatedMillis&&Object.hasOwnProperty.call(e,"lastUpdatedMillis")&&t.uint32(32).int64(e.lastUpdatedMillis),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(42).string(e.description),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(48).int32(e.type),null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.uint32(58).fork().uint32(10).string(n[r]).uint32(18).string(e.labels[n[r]]).ldelim()}return null!=e.bigquery&&Object.hasOwnProperty.call(e,"bigquery")&&s.dataform.TableMetadata.BigQuery.encode(e.bigquery,t.uint32(66).fork()).ldelim(),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r,n,i=void 0===t?e.len:e.pos+t,l=new s.dataform.TableMetadata;e.pos<i;){var c=e.uint32();switch(c>>>3){case 1:l.target=s.dataform.Target.decode(e,e.uint32());break;case 6:l.type=e.int32();break;case 3:l.fields&&l.fields.length||(l.fields=[]),l.fields.push(s.dataform.Field.decode(e,e.uint32()));break;case 5:l.description=e.string();break;case 7:l.labels===a.emptyObject&&(l.labels={});var u=e.uint32()+e.pos;for(r="",n="";e.pos<u;){var p=e.uint32();switch(p>>>3){case 1:r=e.string();break;case 2:n=e.string();break;default:e.skipType(7&p)}}l.labels[r]=n;break;case 4:l.lastUpdatedMillis=e.int64();break;case 8:l.bigquery=s.dataform.TableMetadata.BigQuery.decode(e,e.uint32());break;default:e.skipType(7&c)}}return l},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.target&&e.hasOwnProperty("target")&&(r=s.dataform.Target.verify(e.target)))return"target."+r;if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:}if(null!=e.fields&&e.hasOwnProperty("fields")){if(!Array.isArray(e.fields))return"fields: array expected";for(var t=0;t<e.fields.length;++t){var r;if(r=s.dataform.Field.verify(e.fields[t]))return"fields."+r}}if(null!=e.description&&e.hasOwnProperty("description")&&!a.isString(e.description))return"description: string expected";if(null!=e.labels&&e.hasOwnProperty("labels")){if(!a.isObject(e.labels))return"labels: object expected";var n=Object.keys(e.labels);for(t=0;t<n.length;++t)if(!a.isString(e.labels[n[t]]))return"labels: string{k:string} expected"}return null!=e.lastUpdatedMillis&&e.hasOwnProperty("lastUpdatedMillis")&&!(a.isInteger(e.lastUpdatedMillis)||e.lastUpdatedMillis&&a.isInteger(e.lastUpdatedMillis.low)&&a.isInteger(e.lastUpdatedMillis.high))?"lastUpdatedMillis: integer|Long expected":null!=e.bigquery&&e.hasOwnProperty("bigquery")&&(r=s.dataform.TableMetadata.BigQuery.verify(e.bigquery))?"bigquery."+r:null},t.fromObject=function(e){if(e instanceof s.dataform.TableMetadata)return e;var t=new s.dataform.TableMetadata;if(null!=e.target){if("object"!=typeof e.target)throw TypeError(".dataform.TableMetadata.target: object expected");t.target=s.dataform.Target.fromObject(e.target)}switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNKNOWN":case 0:t.type=0;break;case"TABLE":case 1:t.type=1;break;case"VIEW":case 2:t.type=2}if(e.fields){if(!Array.isArray(e.fields))throw TypeError(".dataform.TableMetadata.fields: array expected");t.fields=[];for(var r=0;r<e.fields.length;++r){if("object"!=typeof e.fields[r])throw TypeError(".dataform.TableMetadata.fields: object expected");t.fields[r]=s.dataform.Field.fromObject(e.fields[r])}}if(null!=e.description&&(t.description=String(e.description)),e.labels){if("object"!=typeof e.labels)throw TypeError(".dataform.TableMetadata.labels: object expected");t.labels={};var n=Object.keys(e.labels);for(r=0;r<n.length;++r)t.labels[n[r]]=String(e.labels[n[r]])}if(null!=e.lastUpdatedMillis&&(a.Long?(t.lastUpdatedMillis=a.Long.fromValue(e.lastUpdatedMillis)).unsigned=!1:"string"==typeof e.lastUpdatedMillis?t.lastUpdatedMillis=parseInt(e.lastUpdatedMillis,10):"number"==typeof e.lastUpdatedMillis?t.lastUpdatedMillis=e.lastUpdatedMillis:"object"==typeof e.lastUpdatedMillis&&(t.lastUpdatedMillis=new a.LongBits(e.lastUpdatedMillis.low>>>0,e.lastUpdatedMillis.high>>>0).toNumber())),null!=e.bigquery){if("object"!=typeof e.bigquery)throw TypeError(".dataform.TableMetadata.bigquery: object expected");t.bigquery=s.dataform.TableMetadata.BigQuery.fromObject(e.bigquery)}return t},t.toObject=function(e,t){t||(t={});var r,n={};if((t.arrays||t.defaults)&&(n.fields=[]),(t.objects||t.defaults)&&(n.labels={}),t.defaults&&(n.target=null,n.lastUpdatedMillis=0,n.description="",n.type=t.enums===String?"UNKNOWN":0,n.bigquery=null),null!=e.target&&e.hasOwnProperty("target")&&(n.target=s.dataform.Target.toObject(e.target,t)),e.fields&&e.fields.length){n.fields=[];for(var o=0;o<e.fields.length;++o)n.fields[o]=s.dataform.Field.toObject(e.fields[o],t)}if(null!=e.lastUpdatedMillis&&e.hasOwnProperty("lastUpdatedMillis")&&("number"==typeof e.lastUpdatedMillis?n.lastUpdatedMillis=t.longs===String?String(e.lastUpdatedMillis):e.lastUpdatedMillis:n.lastUpdatedMillis=t.longs===String?a.Long.prototype.toString.call(e.lastUpdatedMillis):t.longs===Number?new a.LongBits(e.lastUpdatedMillis.low>>>0,e.lastUpdatedMillis.high>>>0).toNumber():e.lastUpdatedMillis),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===s.dataform.TableMetadata.Type[e.type]?e.type:s.dataform.TableMetadata.Type[e.type]:e.type),e.labels&&(r=Object.keys(e.labels)).length)for(n.labels={},o=0;o<r.length;++o)n.labels[r[o]]=e.labels[r[o]];return null!=e.bigquery&&e.hasOwnProperty("bigquery")&&(n.bigquery=s.dataform.TableMetadata.BigQuery.toObject(e.bigquery,t)),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.TableMetadata"},t.Type=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="TABLE"]=1,t[e[2]="VIEW"]=2,t}(),t.BigQuery=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.hasStreamingBuffer=!1,t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.hasStreamingBuffer&&Object.hasOwnProperty.call(e,"hasStreamingBuffer")&&t.uint32(8).bool(e.hasStreamingBuffer),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.TableMetadata.BigQuery;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.hasStreamingBuffer=e.bool();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.hasStreamingBuffer&&e.hasOwnProperty("hasStreamingBuffer")&&"boolean"!=typeof e.hasStreamingBuffer?"hasStreamingBuffer: boolean expected":null},t.fromObject=function(e){if(e instanceof s.dataform.TableMetadata.BigQuery)return e;var t=new s.dataform.TableMetadata.BigQuery;return null!=e.hasStreamingBuffer&&(t.hasStreamingBuffer=Boolean(e.hasStreamingBuffer)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.hasStreamingBuffer=!1),null!=e.hasStreamingBuffer&&e.hasOwnProperty("hasStreamingBuffer")&&(r.hasStreamingBuffer=e.hasStreamingBuffer),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.TableMetadata.BigQuery"},t}(),t}(),n.BigQuery=function(){function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return t.prototype.projectId="",t.prototype.credentials="",t.prototype.location="",t.create=function(e){return new t(e)},t.encode=function(e,t){return t||(t=i.create()),null!=e.projectId&&Object.hasOwnProperty.call(e,"projectId")&&t.uint32(10).string(e.projectId),null!=e.credentials&&Object.hasOwnProperty.call(e,"credentials")&&t.uint32(26).string(e.credentials),null!=e.location&&Object.hasOwnProperty.call(e,"location")&&t.uint32(34).string(e.location),t},t.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},t.decode=function(e,t){e instanceof o||(e=o.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.dataform.BigQuery;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.projectId=e.string();break;case 3:n.credentials=e.string();break;case 4:n.location=e.string();break;default:e.skipType(7&i)}}return n},t.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},t.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.projectId&&e.hasOwnProperty("projectId")&&!a.isString(e.projectId)?"projectId: string expected":null!=e.credentials&&e.hasOwnProperty("credentials")&&!a.isString(e.credentials)?"credentials: string expected":null!=e.location&&e.hasOwnProperty("location")&&!a.isString(e.location)?"location: string expected":null},t.fromObject=function(e){if(e instanceof s.dataform.BigQuery)return e;var t=new s.dataform.BigQuery;return null!=e.projectId&&(t.projectId=String(e.projectId)),null!=e.credentials&&(t.credentials=String(e.credentials)),null!=e.location&&(t.location=String(e.location)),t},t.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.projectId="",r.credentials="",r.location=""),null!=e.projectId&&e.hasOwnProperty("projectId")&&(r.projectId=e.projectId),null!=e.credentials&&e.hasOwnProperty("credentials")&&(r.credentials=e.credentials),null!=e.location&&e.hasOwnProperty("location")&&(r.location=e.location),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/dataform.BigQuery"},t}(),n),s})?n.apply(t,o):n)||(e.exports=i)},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(26),i=n(r(4)),a=r(1);t.nativeRequire=require,t.matchPatterns=function(e,t){const r=[];return e.forEach(e=>{if(e.includes("."))t.includes(e)&&r.push(e);else{const n=t.filter(t=>e===t.split(".").slice(-1)[0]);if(0===n.length)return;if(n.length>1)throw new Error(u(e,n));r.push(n[0])}}),r},t.getCallerFile=function(e){let t;const r=function(){const e=Error.stackTraceLimit,t=Error.prepareStackTrace;try{return Error.stackTraceLimit=Number.POSITIVE_INFINITY,Error.prepareStackTrace=(e,t)=>t,(new Error).stack}finally{Error.stackTraceLimit=e,Error.prepareStackTrace=t}}();for(;r.length;){const n=r.shift().getFileName();if(n&&(n.includes(e)&&!n.includes("node_modules")&&(t=n,n.includes("definitions"+i.separator)||n.includes("models"+i.separator))))break}if(!t)throw new Error("Unable to find valid caller file; please report this issue.");return i.relativePath(t,e)},t.graphHasErrors=function(e){var t;return(null===(t=e.graphErrors)||void 0===t?void 0:t.compilationErrors.length)>0};const s="Invalid input. Accepted inputs include: a single object containing an (optional) 'database', (optional) 'schema', and 'name', or 1-3 inputs consisting of an (optional) database, (optional) schema, and 'name'.";function l(e){return"string"==typeof e?a.dataform.Target.create({name:e}):e instanceof a.dataform.ActionConfig.Target?a.dataform.Target.create({name:e.name,schema:e.dataset,database:e.project}):a.dataform.Target.create(e)}function c(e){return"string"==typeof e?e:JSON.stringify(e)}function u(e,t){const r="string"==typeof t[0]?t:t.map(e=>`${e.getTarget().schema}.${e.getTarget().name}`);return`Ambiguous Action name: ${c(e)}. Did you mean one of: ${r.join(", ")}.`}function p(e,t){switch(e){case"table":return a.dataform.TableType.TABLE;case"incremental":return a.dataform.TableType.INCREMENTAL;case"view":return a.dataform.TableType.VIEW;default:if(t)throw new Error("Unexpected table type: "+e);return a.dataform.TableType.UNKNOWN_TYPE}}function d(e){return a.dataform.TableType[e].toLowerCase()}t.toResolvable=function(e,t=[]){if(Array.isArray(e)&&t.length>0)throw new Error(s);if(0===t.length&&!Array.isArray(e))return e;const r=Array.isArray(e)?e.reverse():[e,...t].reverse();if(!function(e){if(e.some(e=>"string"!=typeof e))return!1;return e.length>0&&e.length<=3}(r))throw new Error(s);const[n,o,i]=r;return{database:i,schema:o,name:n}},t.resolvableAsTarget=l,t.stringifyResolvable=c,t.ambiguousActionNameMsg=u,t.target=function(e,t,r,n){return a.dataform.Target.create({name:t,schema:r||e.defaultSchema||void 0,database:n||e.defaultDatabase||void 0})},t.strictKeysOf=function(){return e=>e},t.checkExcessProperties=function(e,t,r,n){const o=Object.keys(t).filter(e=>!r.includes(e));o.length>0&&e(new Error(`Unexpected property "${o[0]}"${n?" in "+n:""}. Supported properties are: ${JSON.stringify(r)}`))},t.validateQueryString=function(e,t,r){";"===(null==t?void 0:t.trim().slice(-1))&&e.compileError(new Error("Semi-colons are not allowed at the end of SQL statements."),r)},t.tableTypeStringToEnum=p,t.tableTypeEnumToString=d,t.setOrValidateTableEnumType=function(e){let t=null;if(""!==e.type&&void 0!==e.type&&(t=p(e.type,!0)),e.enumType===a.dataform.TableType.UNKNOWN_TYPE||void 0===e.enumType)e.enumType=t;else if(null!==t&&e.enumType!==t)throw new Error(`Table str type "${e.type}" and enumType "${d(e.enumType)}" are not equivalent.`)},t.extractActionDetailsFromFileName=function(e){const t=i.basename(e);return{fileExtension:i.fileExtension(e),fileNameAsTargetName:t}},t.configTargetToCompiledGraphTarget=function(e){const t={name:e.name};return e.project&&(t.database=e.project),e.dataset&&(t.schema=e.dataset),e.hasOwnProperty("includeDependentAssertions")&&(t.includeDependentAssertions=e.includeDependentAssertions),a.dataform.Target.create(t)},t.actionConfigToCompiledGraphTarget=function(e){const t=a.dataform.Target.create({name:e.name});return"project"in e&&void 0!==e.project&&(t.database=e.project),"location"in e&&void 0!==e.location&&(t.schema=e.location),"dataset"in e&&void 0!==e.dataset&&(t.schema=e.dataset),t},t.resolveActionsConfigFilename=function(e,t){return i.normalize(i.join(i.dirName(t),e))},t.checkAssertionsForDependency=function(e,t){const r=l(t);r.hasOwnProperty("includeDependentAssertions")||e instanceof o.DataPreparation||(r.includeDependentAssertions=e.dependOnDependencyAssertions);const n=e.session.compilationSql().resolveTarget(r);if(!e.includeAssertionsForDependency.has(n)||e.includeAssertionsForDependency.get(n)===r.includeDependentAssertions)return e.includeAssertionsForDependency.set(n,r.includeDependentAssertions),r;e.session.compileError(`Conflicting "includeDependentAssertions" properties are not allowed. Dependency ${r.name} has different values set for this property.`,e.getFileName(),e.getTarget())}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(51);var o;function i(e,t){return e===o.SHOW_DOCS_LINK?` See https://dataform-co.github.io/dataform/docs/configs-reference#${t.getTypeUrl("").replace(/\./g,"-").replace(/\//,"")} for allowed properties.`:""}function a(e,t={}){return function(e){return n.util.base64.encode(e,0,e.length)}(e.encode(e.create(t)).finish())}!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.SUGGEST_REPORTING_TO_DATAFORM_TEAM=1]="SUGGEST_REPORTING_TO_DATAFORM_TEAM",e[e.SHOW_DOCS_LINK=2]="SHOW_DOCS_LINK"}(o=t.VerifyProtoErrorBehaviour||(t.VerifyProtoErrorBehaviour={})),t.verifyObjectMatchesProto=function(e,t,r=o.DEFAULT){if(Array.isArray(t))throw ReferenceError("Expected a top-level object, but found an array");const n=e.create(t);return function t(n,a){Object.entries(n).forEach(([n,s])=>{const l=a[n];if(typeof l!=typeof s){if(Array.isArray(s)&&0===s.length)return;if(!s)throw ReferenceError(`Unexpected empty value for "${n}".`+i(r,e));if("object"==typeof s&&0===Object.keys(s).length)return;if(r===o.SUGGEST_REPORTING_TO_DATAFORM_TEAM)throw ReferenceError(`Unexpected property "${n}" for "${e.getTypeUrl("").replace("/","")}", please report this to the Dataform team at https://github.com/dataform-co/dataform/issues.`);throw ReferenceError(`Unexpected property "${n}", or property value type of "${typeof s}" is incorrect.`+i(r,e))}"object"==typeof s&&t(s,l)})}(t,e.toObject(n)),n},t.encode64=a,t.decode64=function(e,t){return t?e.decode(function(e){const t=new Uint8Array(n.util.base64.length(e));return n.util.base64.decode(e,t,0),t}(t)):e.create()},t.equals=function(e,t,r){return a(e,t)===a(e,r)},t.deepClone=function(e,t){return e.fromObject(e.toObject(e.create(t)))}},function(e,t,r){"use strict";function n(e){return e.split(t.separator).slice(-1)[0]}function o(e){const t=n(e);return t.substring(0,t.lastIndexOf("."))}Object.defineProperty(t,"__esModule",{value:!0}),t.separator="undefined"!=typeof process&&"win32"===process.platform?"\\":"/",t.relativePath=function(e,r){if(0===r.length)return e;const n=e.substr(r.length);return n.startsWith(t.separator)?n.substr(1):n},t.filename=n,t.basename=o,t.dirName=function(e){return e.slice(0,e.lastIndexOf(t.separator))},t.join=function(...e){return e.map(e=>(e.startsWith(t.separator)&&(e=e.slice(1)),e.endsWith(t.separator)&&(e=e.slice(0,-1)),e)).join(t.separator)},t.escapedBasename=function(e){return o(e).replace(/\\/g,"\\\\")},t.fileExtension=function(e){return e.split(".").slice(-1)[0]},t.normalize=function(e){const t=[];let r=0;for(const n of e.split("/").filter(e=>!!e&&"."!==e))".."===n?0===t.length?r++:t.pop():t.push(n);if(e.startsWith("/")){if(0===t.length)return"/";t.unshift("")}else if(t.unshift(...new Array(r).fill("..")),0===t.length)return".";return t.join("/")}},function(e,t,r){"use strict";e.exports=a;var n=r(9);((a.prototype=Object.create(n.prototype)).constructor=a).className="Enum";var o=r(11),i=r(0);function a(e,t,r,o,i,a){if(n.call(this,e,r),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=i||{},this.valuesOptions=a,this.reserved=void 0,t)for(var s=Object.keys(t),l=0;l<s.length;++l)"number"==typeof t[s[l]]&&(this.valuesById[this.values[s[l]]=t[s[l]]]=s[l])}a.fromJSON=function(e,t){var r=new a(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},a.prototype.add=function(e,t,r,n){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return n&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=r||null,this},a.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this},a.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},a.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)}},function(e,t,r){"use strict";var n=t;function o(e,t,r){for(var n=Object.keys(t),o=0;o<n.length;++o)void 0!==e[n[o]]&&r||(e[n[o]]=t[n[o]]);return e}function i(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&o(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}n.asPromise=r(30),n.base64=r(54),n.EventEmitter=r(55),n.float=r(56),n.inquire=r(31),n.utf8=r(57),n.pool=r(58),n.LongBits=r(59),n.isNode=Boolean("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),n.global=n.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=o,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=i,n.ProtocolError=i("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1);t.ActionBuilder=class{constructor(e){this.includeAssertionsForDependency=new Map,this.session=e}applySessionToTarget(e,t,r,o){const i=(null==o?void 0:o.useDefaultAssertionDataset)&&t.assertionSchema||t.defaultSchema,a=n.dataform.Target.create({name:e.name,schema:e.schema||i||void 0,database:e.database||t.defaultDatabase||void 0});return(null==o?void 0:o.validateTarget)&&this.validateTarget(e,r),a}finalizeTarget(e){return n.dataform.Target.create({name:this.session.finalizeName(e.name),schema:e.schema?this.session.finalizeSchema(e.schema):void 0,database:e.database?this.session.finalizeDatabase(e.database):void 0})}generateInlineAssertions(e,t){var r,o,i;const a={uniqueKeyAssertions:[]};(null===(r=e.uniqueKey)||void 0===r?void 0:r.length)&&(null===(o=e.uniqueKeys)||void 0===o?void 0:o.length)&&this.session.compileError(new Error("Specify at most one of 'assertions.uniqueKey' and 'assertions.uniqueKeys'."));let s=e.uniqueKeys.map(e=>n.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.create(e));(null===(i=e.uniqueKey)||void 0===i?void 0:i.length)&&(s=[n.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.create({uniqueKey:e.uniqueKey})]),s&&s.forEach(({uniqueKey:e},r)=>{const o=this.session.assert(`${t.target.schema}_${t.target.name}_assertions_uniqueKey_${r}`,n.dataform.ActionConfig.AssertionConfig.create({filename:t.fileName})).query(r=>this.session.compilationSql().indexAssertion(r.ref(t.target),e));t.tags&&o.tags(t.tags),o.setParentAction(n.dataform.Target.create(t.target)),t.disabled&&o.disabled(),a.uniqueKeyAssertions.push(o)});const l=e.rowConditions||[];if(e.nonNull){("string"==typeof e.nonNull?[e.nonNull]:e.nonNull).forEach(e=>l.push(e+" IS NOT NULL"))}return l&&l.length>0&&(a.rowConditionsAssertion=this.session.assert(`${t.target.schema}_${t.target.name}_assertions_rowConditions`,{filename:t.fileName}).query(e=>this.session.compilationSql().rowConditionsAssertion(e.ref(t.target),l)),a.rowConditionsAssertion.setParentAction(n.dataform.Target.create(t.target)),t.disabled&&a.rowConditionsAssertion.disabled(),t.tags&&a.rowConditionsAssertion.tags(t.tags)),a}validateTarget(e,t){e.name.includes(".")&&this.session.compileError(new Error("Action target names cannot include '.'"),t,e),e.schema.includes(".")&&this.session.compileError(new Error("Action target datasets cannot include '.'"),t,e),e.database.includes(".")&&this.session.compileError(new Error("Action target projects cannot include '.'"),t,e)}},t.checkConfigAdditionalOptionsOverlap=function(e,t){const r=n.dataform.Target.create({database:e.project,schema:e.dataset,name:e.name});e.partitionExpirationDays&&e.additionalOptions.partition_expiration_days&&t.compileError("partitionExpirationDays has been declared twice",e.filename,r),e.requirePartitionFilter&&e.additionalOptions.require_partition_filter&&t.compileError("requirePartitionFilter has been declared twice",e.filename,r)},t.TableType=["table","view","incremental"];t.LegacyConfigConverter=class{static legacyConvertBigQueryOptions(e){let t={};return Object.entries(e).forEach(([e,r])=>{Array.isArray(r)&&0===r.length||"object"==typeof r&&0===Object.entries(r).length||r&&(t=Object.assign(Object.assign({},t),{[e]:r}))}),t}static insertLegacyInlineAssertionsToConfigProto(e){var t,r,o;const i=e;return(null==i?void 0:i.assertions)&&("string"==typeof(null===(t=i.assertions)||void 0===t?void 0:t.uniqueKey)&&(i.assertions.uniqueKey=[i.assertions.uniqueKey]),(null===(o=null===(r=i.assertions.uniqueKeys)||void 0===r?void 0:r[0])||void 0===o?void 0:o.length)>0&&(i.assertions.uniqueKeys=i.assertions.uniqueKeys.map(e=>n.dataform.ActionConfig.TableAssertionsConfig.UniqueKey.create({uniqueKey:e}))),"string"==typeof i.assertions.nonNull&&(i.assertions.nonNull=[i.assertions.nonNull])),i}static insertLegacyBigQueryOptionsToConfigProto(e){const t=e;return(null==t?void 0:t.bigquery)?(t.bigquery.partitionBy&&(t.partitionBy=t.bigquery.partitionBy,delete t.bigquery.partitionBy),t.bigquery.clusterBy&&(t.clusterBy=t.bigquery.clusterBy,delete t.bigquery.clusterBy),t.bigquery.updatePartitionFilter&&(t.updatePartitionFilter=t.bigquery.updatePartitionFilter,delete t.bigquery.updatePartitionFilter),t.bigquery.labels&&(t.labels=t.bigquery.labels,delete t.bigquery.labels),t.bigquery.partitionExpirationDays&&(t.partitionExpirationDays=t.bigquery.partitionExpirationDays,delete t.bigquery.partitionExpirationDays),t.bigquery.requirePartitionFilter&&(t.requirePartitionFilter=t.bigquery.requirePartitionFilter,delete t.bigquery.requirePartitionFilter),t.bigquery.additionalOptions&&(t.additionalOptions=t.bigquery.additionalOptions,delete t.bigquery.additionalOptions),0===Object.keys(t.bigquery).length&&delete t.bigquery,t):t}}},function(e,t,r){"use strict";e.exports=c;var n=r(9);((c.prototype=Object.create(n.prototype)).constructor=c).className="Field";var o,i=r(5),a=r(10),s=r(0),l=/^required|optional|repeated$/;function c(e,t,r,o,i,c,u){if(s.isObject(o)?(u=i,c=o,o=i=void 0):s.isObject(i)&&(u=c,c=i,i=void 0),n.call(this,e,c),!s.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!s.isString(r))throw TypeError("type must be a string");if(void 0!==o&&!l.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!s.isString(i))throw TypeError("extend must be a string");"proto3_optional"===o&&(o="optional"),this.rule=o&&"optional"!==o?o:void 0,this.type=r,this.id=t,this.extend=i||void 0,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!s.Long&&void 0!==a.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=u}c.fromJSON=function(e,t){return new c(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(c.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),c.prototype.setOption=function(e,t,r){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,r)},c.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return s.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},c.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=a.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=s.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;s.base64.test(this.typeDefault)?s.base64.decode(this.typeDefault,e=s.newBuffer(s.base64.length(this.typeDefault)),0):s.utf8.write(this.typeDefault,e=s.newBuffer(s.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=s.emptyObject:this.repeated?this.defaultValue=s.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},c.d=function(e,t,r,n){return"function"==typeof t?t=s.decorateType(t).name:t&&"object"==typeof t&&(t=s.decorateEnum(t).name),function(o,i){s.decorateType(o.constructor).add(new c(i,e,t,r,{default:n}))}},c._configure=function(e){o=e}},function(e,t,r){"use strict";e.exports=i,i.className="ReflectionObject";var n,o=r(0);function i(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(r){var i=n.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var a=i[e];o.setProperty(a,r,t)}else(i={})[e]=o.setProperty({},r,t),n.push(i)}else{var s={};s[e]=t,n.push(s)}return this},i.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){n=e}},function(e,t,r){"use strict";var n=t,o=r(0),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function a(e,t){var r=0,n={};for(t|=0;r<e.length;)n[i[r+t]]=e[r++];return n}n.basic=a([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=a([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o.emptyArray,null]),n.long=a([0,0,0,1,1],7),n.mapKey=a([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=a([1,5,0,0,0,5,5,0,0,0,1,1,0])},function(e,t,r){"use strict";e.exports=p;var n=r(9);((p.prototype=Object.create(n.prototype)).constructor=p).className="Namespace";var o,i,a,s=r(8),l=r(0),c=r(12);function u(e,t){if(e&&e.length){for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON(t);return r}}function p(e,t){n.call(this,e,t),this.nested=void 0,this._nestedArray=null}function d(e){return e._nestedArray=null,e}p.fromJSON=function(e,t){return new p(e,t.options).addJSON(t.nested)},p.arrayToJSON=u,p.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},p.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(p.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=l.toArray(this.nested))}}),p.prototype.toJSON=function(e){return l.toObject(["options",this.options,"nested",u(this.nestedArray,e)])},p.prototype.addJSON=function(e){if(e)for(var t,r=Object.keys(e),n=0;n<r.length;++n)t=e[r[n]],this.add((void 0!==t.fields?o.fromJSON:void 0!==t.values?a.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?s.fromJSON:p.fromJSON)(r[n],t));return this},p.prototype.get=function(e){return this.nested&&this.nested[e]||null},p.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof a)return this.nested[e].values;throw Error("no such enum: "+e)},p.prototype.add=function(e){if(!(e instanceof s&&void 0!==e.extend||e instanceof o||e instanceof c||e instanceof a||e instanceof i||e instanceof p))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof p&&e instanceof p)||t instanceof o||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,n=0;n<r.length;++n)e.add(r[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),d(this)},p.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),d(this)},p.prototype.define=function(e,t){if(l.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof p))throw Error("path conflicts with non-namespace objects")}else r.add(r=new p(n))}return t&&r.addJSON(t),r},p.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof p?e[t++].resolveAll():e[t++].resolve();return this.resolve()},p.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),l.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);if(n){if(1===e.length){if(!t||t.indexOf(n.constructor)>-1)return n}else if(n instanceof p&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var o=0;o<this.nestedArray.length;++o)if(this._nestedArray[o]instanceof p&&(n=this._nestedArray[o].lookup(e,t,!0)))return n;return null===this.parent||r?null:this.parent.lookup(e,t)},p.prototype.lookupType=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such type: "+e);return t},p.prototype.lookupEnum=function(e){var t=this.lookup(e,[a]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},p.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[o,a]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},p.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},p._configure=function(e,t,r){o=e,i=t,a=r}},function(e,t,r){"use strict";e.exports=a;var n=r(9);((a.prototype=Object.create(n.prototype)).constructor=a).className="OneOf";var o=r(8),i=r(0);function a(e,t,r,o){if(Array.isArray(t)||(r=t,t=void 0),n.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function s(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}a.fromJSON=function(e,t){return new a(e,t.oneof,t.options,t.comment)},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},a.prototype.add=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,s(this),this},a.prototype.remove=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},a.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}s(this)},a.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);n.prototype.onRemove.call(this,e)},a.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){i.decorateType(t.constructor).add(new a(r,e)),Object.defineProperty(t,r,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(2)),i=r(1);t.IRecordDescriptorProperties=()=>o.strictKeysOf()(["description","columns","displayName","tags","bigqueryPolicyTags"]);class a{static mapConfigProtoToCompilationProto(e){return e.map(e=>i.dataform.ColumnDescriptor.create({path:e.path,description:e.description,tags:e.tags,bigqueryPolicyTags:e.bigqueryPolicyTags}))}static mapLegacyObjectToConfigProto(e){return Object.keys(e).map(t=>a.mapColumnDescriptionToProto([t],e[t])).flat()}static mapColumnDescriptionToProto(e,t){if("string"==typeof t)return[i.dataform.ColumnDescriptor.create({description:t,path:e})];const r=t?[i.dataform.ActionConfig.ColumnDescriptor.create({path:e,description:t.description,tags:"string"==typeof t.tags?[t.tags]:t.tags,bigqueryPolicyTags:"string"==typeof t.bigqueryPolicyTags?[t.bigqueryPolicyTags]:t.bigqueryPolicyTags})]:[],n=t.columns?Object.keys(t.columns):[];return r.concat(n.map(r=>a.mapColumnDescriptionToProto(e.concat([r]),t.columns[r])).flat())}}t.ColumnDescriptors=a;class s{static mapToColumnProtoArray(e,t){return Object.keys(e).map(r=>s.mapColumnDescriptionToProto([r],e[r],t)).flat()}static mapColumnDescriptionToProto(e,r,n){if("string"==typeof r)return[i.dataform.ColumnDescriptor.create({description:r,path:e})];o.checkExcessProperties(n,r,t.IRecordDescriptorProperties(),e.join(".")+" column descriptor");const a=r?[i.dataform.ColumnDescriptor.create({path:e,description:r.description,displayName:r.displayName,tags:"string"==typeof r.tags?[r.tags]:r.tags,bigqueryPolicyTags:"string"==typeof r.bigqueryPolicyTags?[r.bigqueryPolicyTags]:r.bigqueryPolicyTags})]:[],l=r.columns?Object.keys(r.columns):[];return a.concat(l.map(t=>s.mapColumnDescriptionToProto(e.concat([t]),r.columns[t],n)).flat())}}t.LegacyColumnDescriptors=s},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(7),a=r(15),s=r(16),l=r(13),c=n(r(4)),u=r(2),p=r(1);class d extends i.ActionBuilder{constructor(e,t,r){var n;if(super(e),this.dependOnDependencyAssertions=!1,this.contextablePreOps=[],this.contextablePostOps=[],this.proto=p.dataform.Table.create({type:"incremental",enumType:p.dataform.TableType.INCREMENTAL,disabled:!1,tags:[]}),this.uniqueKeyAssertions=[],this.session=e,this.configPath=r,this.unverifiedConfig=Object.assign({},t),!t)return;const o=this.verifyConfig(t);o.name||(o.name=c.basename(o.filename));const i=u.actionConfigToCompiledGraphTarget(o);return this.proto.target=this.applySessionToTarget(i,e.projectConfig,o.filename,{validateTarget:!0}),this.proto.canonicalTarget=this.applySessionToTarget(i,e.canonicalProjectConfig),r&&(o.filename=u.resolveActionsConfigFilename(o.filename,r),this.query(u.nativeRequire(o.filename).query)),o.filename&&(this.proto.fileName=o.filename),o.dependOnDependencyAssertions&&this.setDependOnDependencyAssertions(o.dependOnDependencyAssertions),o.dependencyTargets&&this.dependencies(o.dependencyTargets.map(e=>u.configTargetToCompiledGraphTarget(p.dataform.ActionConfig.Target.create(e)))),void 0!==o.hermetic&&this.hermetic(o.hermetic),o.disabled&&this.disabled(),o.tags&&this.tags(o.tags),o.description&&this.description(o.description),(null===(n=o.columns)||void 0===n?void 0:n.length)&&this.columns(o.columns.map(e=>p.dataform.ActionConfig.ColumnDescriptor.create(e))),o.project&&this.database(o.project),o.dataset&&this.schema(o.dataset),o.assertions&&this.assertions(p.dataform.ActionConfig.TableAssertionsConfig.create(o.assertions)),o.uniqueKey&&this.uniqueKey(o.uniqueKey),this.protected(o.protected),o.preOperations&&this.preOps(o.preOperations),o.postOperations&&this.postOps(o.postOperations),this.bigquery({partitionBy:o.partitionBy,clusterBy:o.clusterBy,updatePartitionFilter:o.updatePartitionFilter,labels:o.labels,partitionExpirationDays:o.partitionExpirationDays,requirePartitionFilter:o.requirePartitionFilter,additionalOptions:o.additionalOptions}),this.proto.onSchemaChange=this.mapOnSchemaChange(o.onSchemaChange),this}type(e){let t;switch(e){case"table":t=new a.Table(this.session,Object.assign(Object.assign({},this.unverifiedConfig),{type:"table"}),this.configPath);break;case"incremental":return this;case"view":t=new s.View(this.session,Object.assign(Object.assign({},this.unverifiedConfig),{type:"view"}),this.configPath);break;default:throw new Error("Unexpected table type: "+e)}const r=this.session.actions.indexOf(this);if(-1===r)throw Error("Expected pre-existing action, but none found. Please report this to the Dataform team.");this.session.actions[r]=t}query(e){return this.contextableQuery=e,this}where(e){return this.contextableWhere=e,this}preOps(e){return this.contextablePreOps.push(e),this}postOps(e){return this.contextablePostOps.push(e),this}disabled(e=!0){var t;return this.proto.disabled=e,this.uniqueKeyAssertions.forEach(t=>t.disabled(e)),null===(t=this.rowConditionsAssertion)||void 0===t||t.disabled(e),this}protected(e){return this.proto.protected=null==e||e,this}uniqueKey(e){this.proto.uniqueKey=e}bigquery(e){e.labels&&Object.keys(e.labels).length>0&&(this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.bigqueryLabels=e.labels);const t=i.LegacyConfigConverter.legacyConvertBigQueryOptions(e);return Object.values(t).length>0&&(this.proto.bigquery=p.dataform.BigQueryOptions.create(t)),this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>this.proto.dependencyTargets.push(u.checkAssertionsForDependency(this,e))),this}hermetic(e){this.proto.hermeticity=e?p.dataform.ActionHermeticity.HERMETIC:p.dataform.ActionHermeticity.NON_HERMETIC}tags(e){var t;return("string"==typeof e?[e]:e).forEach(e=>{this.proto.tags.push(e)}),this.uniqueKeyAssertions.forEach(t=>t.tags(e)),null===(t=this.rowConditionsAssertion)||void 0===t||t.tags(e),this}description(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.description=e,this}columns(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.columns=l.ColumnDescriptors.mapConfigProtoToCompilationProto(e),this}database(e){return this.proto.target=this.applySessionToTarget(p.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{database:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}schema(e){return this.proto.target=this.applySessionToTarget(p.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{schema:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}assertions(e){const t=this.generateInlineAssertions(e,this.proto);return this.uniqueKeyAssertions=t.uniqueKeyAssertions,this.rowConditionsAssertion=t.rowConditionsAssertion,this}setDependOnDependencyAssertions(e){return this.dependOnDependencyAssertions=e,this}getFileName(){return this.proto.fileName}getTarget(){return p.dataform.Target.create(this.proto.target)}compile(){const e=new f(this),t=new f(this,!0);return this.proto.query=e.apply(this.contextableQuery),this.proto.incrementalQuery=t.apply(this.contextableQuery),this.proto.incrementalPreOps=this.contextifyOps(this.contextablePreOps,t),this.proto.incrementalPostOps=this.contextifyOps(this.contextablePostOps,t),this.contextableWhere&&(this.proto.where=e.apply(this.contextableWhere)),this.proto.preOps=this.contextifyOps(this.contextablePreOps,e).filter(e=>!!e.trim()),this.proto.postOps=this.contextifyOps(this.contextablePostOps,e).filter(e=>!!e.trim()),u.validateQueryString(this.session,this.proto.query,this.proto.fileName),u.validateQueryString(this.session,this.proto.incrementalQuery,this.proto.fileName),o.verifyObjectMatchesProto(p.dataform.Table,this.proto,o.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}contextifyOps(e,t){let r=[];return e.forEach(e=>{const n=t.apply(e);r=r.concat("string"==typeof n?[n]:n)}),r}verifyConfig(e){e.type&&(delete e.type,e.dependencies&&(e.dependencyTargets=e.dependencies.map(e=>"string"==typeof e?{name:e}:e),delete e.dependencies),e.database&&(e.project=e.database,delete e.database),e.schema&&(e.dataset=e.schema,delete e.schema),e.fileName&&(e.filename=e.fileName,delete e.fileName),e.columns&&(e.columns=l.ColumnDescriptors.mapLegacyObjectToConfigProto(e.columns)),e=i.LegacyConfigConverter.insertLegacyInlineAssertionsToConfigProto(e),(e=i.LegacyConfigConverter.insertLegacyBigQueryOptionsToConfigProto(e)).bigquery&&u.checkExcessProperties(e=>{throw e},e.bigquery,u.strictKeysOf()(["partitionBy","clusterBy","updatePartitionFilter","labels","partitionExpirationDays","requirePartitionFilter","additionalOptions"]),"BigQuery table config"));const t=o.verifyObjectMatchesProto(p.dataform.ActionConfig.IncrementalTableConfig,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK);return t.additionalOptions&&i.checkConfigAdditionalOptionsOverlap(t,this.session),t}mapOnSchemaChange(e){if(!e)return p.dataform.OnSchemaChange.IGNORE;if("number"==typeof e)switch(e){case p.dataform.ActionConfig.OnSchemaChange.IGNORE:return p.dataform.OnSchemaChange.IGNORE;case p.dataform.ActionConfig.OnSchemaChange.FAIL:return p.dataform.OnSchemaChange.FAIL;case p.dataform.ActionConfig.OnSchemaChange.EXTEND:return p.dataform.OnSchemaChange.EXTEND;case p.dataform.ActionConfig.OnSchemaChange.SYNCHRONIZE:return p.dataform.OnSchemaChange.SYNCHRONIZE;default:throw new Error(`OnSchemaChange value "${e}" is not supported`)}switch(e.toString().toUpperCase()){case"IGNORE":return p.dataform.OnSchemaChange.IGNORE;case"FAIL":return p.dataform.OnSchemaChange.FAIL;case"EXTEND":return p.dataform.OnSchemaChange.EXTEND;case"SYNCHRONIZE":return p.dataform.OnSchemaChange.SYNCHRONIZE;default:throw new Error(`OnSchemaChange value "${e}" is not supported`)}}}t.IncrementalTable=d;class f{constructor(e,t=!1){this.incrementalTable=e,this.isIncremental=t}self(){return this.resolve(this.incrementalTable.getTarget())}name(){return this.incrementalTable.session.finalizeName(this.incrementalTable.getTarget().name)}ref(e,...t){return e=u.toResolvable(e,t),u.resolvableAsTarget(e)?(this.incrementalTable.dependencies(e),this.resolve(e)):(this.incrementalTable.session.compileError(new Error("Action name is not specified")),"")}resolve(e,...t){return this.incrementalTable.session.resolve(e,...t)}schema(){return this.incrementalTable.session.finalizeSchema(this.incrementalTable.getTarget().schema)}database(){return this.incrementalTable.getTarget().database?this.incrementalTable.session.finalizeDatabase(this.incrementalTable.getTarget().database):(this.incrementalTable.session.compileError(new Error("Warehouse does not support multiple databases")),"")}where(e){return this.incrementalTable.where(e),""}when(e,t,r=""){return e?t:r}incremental(){return!!this.isIncremental}preOps(e){return this.incrementalTable.preOps(e),""}postOps(e){return this.incrementalTable.postOps(e),""}disabled(){return this.incrementalTable.disabled(),""}bigquery(e){return this.incrementalTable.bigquery(e),""}dependencies(e){return this.incrementalTable.dependencies(e),""}apply(e){return"function"==typeof e?e(this):e}tags(e){return this.incrementalTable.tags(e),""}}t.IncrementalTableContext=f},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(7),a=r(14),s=r(16),l=r(13),c=n(r(4)),u=r(2),p=r(1);class d extends i.ActionBuilder{constructor(e,t,r){var n;if(super(e),this.dependOnDependencyAssertions=!1,this.contextablePreOps=[],this.contextablePostOps=[],this.proto=p.dataform.Table.create({type:"table",enumType:p.dataform.TableType.TABLE,disabled:!1,tags:[]}),this.uniqueKeyAssertions=[],this.session=e,this.configPath=r,this.unverifiedConfig=Object.assign({},t),!t)return;const o=this.verifyConfig(t);o.name||(o.name=c.basename(o.filename));const i=u.actionConfigToCompiledGraphTarget(o);return this.proto.target=this.applySessionToTarget(i,e.projectConfig,o.filename,{validateTarget:!0}),this.proto.canonicalTarget=this.applySessionToTarget(i,e.canonicalProjectConfig),r&&(o.filename=u.resolveActionsConfigFilename(o.filename,r),this.query(u.nativeRequire(o.filename).query)),o.filename&&(this.proto.fileName=o.filename),o.dependOnDependencyAssertions&&this.setDependOnDependencyAssertions(o.dependOnDependencyAssertions),o.dependencyTargets&&this.dependencies(o.dependencyTargets),void 0!==o.hermetic&&this.hermetic(o.hermetic),o.disabled&&this.disabled(),o.tags&&this.tags(o.tags),o.description&&this.description(o.description),(null===(n=o.columns)||void 0===n?void 0:n.length)&&this.columns(o.columns.map(e=>p.dataform.ActionConfig.ColumnDescriptor.create(e))),o.assertions&&this.assertions(p.dataform.ActionConfig.TableAssertionsConfig.create(o.assertions)),o.preOperations&&this.preOps(o.preOperations),o.postOperations&&this.postOps(o.postOperations),this.bigquery({partitionBy:o.partitionBy,clusterBy:o.clusterBy,labels:o.labels,partitionExpirationDays:o.partitionExpirationDays,requirePartitionFilter:o.requirePartitionFilter,additionalOptions:o.additionalOptions}),this}type(e){let t;switch(e){case"table":return this;case"incremental":t=new a.IncrementalTable(this.session,Object.assign(Object.assign({},this.unverifiedConfig),{type:"incremental"}),this.configPath);break;case"view":t=new s.View(this.session,Object.assign(Object.assign({},this.unverifiedConfig),{type:"view"}),this.configPath);break;default:throw new Error("Unexpected table type: "+e)}const r=this.session.actions.indexOf(this);if(-1===r)throw Error("Expected pre-existing action, but none found. Please report this to the Dataform team.");this.session.actions[r]=t}query(e){return this.contextableQuery=e,this}where(e){return this.contextableWhere=e,this}preOps(e){return this.contextablePreOps.push(e),this}postOps(e){return this.contextablePostOps.push(e),this}disabled(e=!0){var t;return this.proto.disabled=e,this.uniqueKeyAssertions.forEach(t=>t.disabled(e)),null===(t=this.rowConditionsAssertion)||void 0===t||t.disabled(e),this}bigquery(e){e.labels&&Object.keys(e.labels).length>0&&(this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.bigqueryLabels=e.labels);const t=i.LegacyConfigConverter.legacyConvertBigQueryOptions(e);return Object.values(t).length>0&&(this.proto.bigquery=p.dataform.BigQueryOptions.create(t)),this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>{const t=u.checkAssertionsForDependency(this,e);t&&this.proto.dependencyTargets.push(t)}),this}hermetic(e){this.proto.hermeticity=e?p.dataform.ActionHermeticity.HERMETIC:p.dataform.ActionHermeticity.NON_HERMETIC}tags(e){var t;return("string"==typeof e?[e]:e).forEach(e=>{this.proto.tags.push(e)}),this.uniqueKeyAssertions.forEach(t=>t.tags(e)),null===(t=this.rowConditionsAssertion)||void 0===t||t.tags(e),this}description(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.description=e,this}columns(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.columns=l.ColumnDescriptors.mapConfigProtoToCompilationProto(e),this}database(e){return this.proto.target=this.applySessionToTarget(p.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{database:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}schema(e){return this.proto.target=this.applySessionToTarget(p.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{schema:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}assertions(e){const t=this.generateInlineAssertions(e,this.proto);return this.uniqueKeyAssertions=t.uniqueKeyAssertions,this.rowConditionsAssertion=t.rowConditionsAssertion,this}setDependOnDependencyAssertions(e){return this.dependOnDependencyAssertions=e,this}getFileName(){return this.proto.fileName}getTarget(){return p.dataform.Target.create(this.proto.target)}compile(){const e=new f(this),t=new f(this,!0);return this.proto.query=e.apply(this.contextableQuery),this.proto.enumType===p.dataform.TableType.INCREMENTAL&&(this.proto.incrementalQuery=t.apply(this.contextableQuery),this.proto.incrementalPreOps=this.contextifyOps(this.contextablePreOps,t),this.proto.incrementalPostOps=this.contextifyOps(this.contextablePostOps,t)),this.contextableWhere&&(this.proto.where=e.apply(this.contextableWhere)),this.proto.preOps=this.contextifyOps(this.contextablePreOps,e).filter(e=>!!e.trim()),this.proto.postOps=this.contextifyOps(this.contextablePostOps,e).filter(e=>!!e.trim()),u.validateQueryString(this.session,this.proto.query,this.proto.fileName),u.validateQueryString(this.session,this.proto.incrementalQuery,this.proto.fileName),o.verifyObjectMatchesProto(p.dataform.Table,this.proto,o.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}contextifyOps(e,t){let r=[];return e.forEach(e=>{const n=t.apply(e);r=r.concat("string"==typeof n?[n]:n)}),r}verifyConfig(e){if(e.type){if("table"!==e.type)throw ReferenceError('Unexpected type for Table; want "table", got '+e.type);delete e.type,e.dependencies&&(e.dependencyTargets=e.dependencies.map(e=>"string"==typeof e?{name:e}:e),delete e.dependencies),e.database&&(e.project=e.database,delete e.database),e.schema&&(e.dataset=e.schema,delete e.schema),e.fileName&&(e.filename=e.fileName,delete e.fileName),e.columns&&(e.columns=l.ColumnDescriptors.mapLegacyObjectToConfigProto(e.columns)),e=i.LegacyConfigConverter.insertLegacyInlineAssertionsToConfigProto(e),(e=i.LegacyConfigConverter.insertLegacyBigQueryOptionsToConfigProto(e)).bigquery&&u.checkExcessProperties(e=>{throw e},e.bigquery,u.strictKeysOf()(["partitionBy","clusterBy","updatePartitionFilter","labels","partitionExpirationDays","requirePartitionFilter","additionalOptions"]),"BigQuery table config")}const t=o.verifyObjectMatchesProto(p.dataform.ActionConfig.TableConfig,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK);return t.partitionBy||!t.partitionExpirationDays&&!t.requirePartitionFilter||this.session.compileError("requirePartitionFilter/partitionExpirationDays are not valid for non partitioned BigQuery tables",t.filename,p.dataform.Target.create({database:t.project,schema:t.dataset,name:t.name})),t.additionalOptions&&i.checkConfigAdditionalOptionsOverlap(t,this.session),t}}t.Table=d;class f{constructor(e,t=!1){this.table=e,this.isIncremental=t}self(){return this.resolve(this.table.getTarget())}name(){return this.table.session.finalizeName(this.table.getTarget().name)}ref(e,...t){return e=u.toResolvable(e,t),u.resolvableAsTarget(e)?(this.table.dependencies(e),this.resolve(e)):(this.table.session.compileError(new Error("Action name is not specified")),"")}resolve(e,...t){return this.table.session.resolve(e,...t)}schema(){return this.table.session.finalizeSchema(this.table.getTarget().schema)}database(){return this.table.getTarget().database?this.table.session.finalizeDatabase(this.table.getTarget().database):(this.table.session.compileError(new Error("Warehouse does not support multiple databases")),"")}type(e){return this.table.type(e),""}where(e){return this.table.where(e),""}when(e,t,r=""){return e?t:r}incremental(){return!!this.isIncremental}preOps(e){return this.table.preOps(e),""}postOps(e){return this.table.postOps(e),""}disabled(){return this.table.disabled(),""}bigquery(e){return this.table.bigquery(e),""}dependencies(e){return this.table.dependencies(e),""}apply(e){return"function"==typeof e?e(this):e}tags(e){return this.table.tags(e),""}}t.TableContext=f},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(7),a=r(14),s=r(15),l=r(13),c=n(r(4)),u=r(2),p=r(1);class d extends i.ActionBuilder{constructor(e,t,r){var n;if(super(e),this.dependOnDependencyAssertions=!1,this.contextablePreOps=[],this.contextablePostOps=[],this.proto=p.dataform.Table.create({type:"view",enumType:p.dataform.TableType.VIEW,disabled:!1,tags:[]}),this.uniqueKeyAssertions=[],this.session=e,this.configPath=r,this.unverifiedConfig=Object.assign({},t),!t)return;const o=this.verifyConfig(t);o.name||(o.name=c.basename(o.filename));const i=u.actionConfigToCompiledGraphTarget(o);return this.proto.target=this.applySessionToTarget(i,e.projectConfig,o.filename,{validateTarget:!0}),this.proto.canonicalTarget=this.applySessionToTarget(i,e.canonicalProjectConfig),r&&(o.filename=u.resolveActionsConfigFilename(o.filename,r),this.query(u.nativeRequire(o.filename).query)),o.filename&&(this.proto.fileName=o.filename),o.dependOnDependencyAssertions&&this.setDependOnDependencyAssertions(o.dependOnDependencyAssertions),o.dependencyTargets&&this.dependencies(o.dependencyTargets.map(e=>u.configTargetToCompiledGraphTarget(p.dataform.ActionConfig.Target.create(e)))),void 0!==o.hermetic&&this.hermetic(o.hermetic),o.disabled&&this.disabled(),o.tags&&this.tags(o.tags),o.description&&this.description(o.description),(null===(n=o.columns)||void 0===n?void 0:n.length)&&this.columns(o.columns.map(e=>p.dataform.ActionConfig.ColumnDescriptor.create(e))),o.project&&this.database(o.project),o.dataset&&this.schema(o.dataset),o.assertions&&this.assertions(p.dataform.ActionConfig.TableAssertionsConfig.create(o.assertions)),o.materialized&&this.materialized(o.materialized),o.preOperations&&this.preOps(o.preOperations),o.postOperations&&this.postOps(o.postOperations),(Object.keys(o.labels).length||Object.keys(o.additionalOptions).length)&&this.bigquery({labels:o.labels,additionalOptions:o.additionalOptions}),this}type(e){let t;switch(e){case"table":t=new s.Table(this.session,Object.assign(Object.assign({},this.unverifiedConfig),{type:"table"}),this.configPath);break;case"incremental":t=new a.IncrementalTable(this.session,Object.assign(Object.assign({},this.unverifiedConfig),{type:"incremental"}),this.configPath);break;case"view":return this;default:throw new Error("Unexpected table type: "+e)}const r=this.session.actions.indexOf(this);if(-1===r)throw Error("Expected pre-existing action, but none found. Please report this to the Dataform team.");this.session.actions[r]=t}query(e){return this.contextableQuery=e,this}where(e){return this.contextableWhere=e,this}preOps(e){return this.contextablePreOps.push(e),this}postOps(e){return this.contextablePostOps.push(e),this}disabled(e=!0){var t;return this.proto.disabled=e,this.uniqueKeyAssertions.forEach(t=>t.disabled(e)),null===(t=this.rowConditionsAssertion)||void 0===t||t.disabled(e),this}materialized(e){this.proto.materialized=e}bigquery(e){return this.proto.bigquery=p.dataform.BigQueryOptions.create(e),e.labels&&(this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.bigqueryLabels=e.labels),this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>{const t=u.checkAssertionsForDependency(this,e);t&&this.proto.dependencyTargets.push(t)}),this}hermetic(e){this.proto.hermeticity=e?p.dataform.ActionHermeticity.HERMETIC:p.dataform.ActionHermeticity.NON_HERMETIC}tags(e){var t;return("string"==typeof e?[e]:e).forEach(e=>{this.proto.tags.push(e)}),this.uniqueKeyAssertions.forEach(t=>t.tags(e)),null===(t=this.rowConditionsAssertion)||void 0===t||t.tags(e),this}description(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.description=e,this}columns(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.columns=l.ColumnDescriptors.mapConfigProtoToCompilationProto(e),this}database(e){return this.proto.target=this.applySessionToTarget(p.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{database:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}schema(e){return this.proto.target=this.applySessionToTarget(p.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{schema:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}assertions(e){const t=this.generateInlineAssertions(e,this.proto);return this.uniqueKeyAssertions=t.uniqueKeyAssertions,this.rowConditionsAssertion=t.rowConditionsAssertion,this}setDependOnDependencyAssertions(e){return this.dependOnDependencyAssertions=e,this}getFileName(){return this.proto.fileName}getTarget(){return p.dataform.Target.create(this.proto.target)}compile(){const e=new f(this),t=new f(this,!0);return this.proto.query=e.apply(this.contextableQuery),this.proto.enumType===p.dataform.TableType.INCREMENTAL&&(this.proto.incrementalQuery=t.apply(this.contextableQuery),this.proto.incrementalPreOps=this.contextifyOps(this.contextablePreOps,t),this.proto.incrementalPostOps=this.contextifyOps(this.contextablePostOps,t)),this.contextableWhere&&(this.proto.where=e.apply(this.contextableWhere)),this.proto.preOps=this.contextifyOps(this.contextablePreOps,e).filter(e=>!!e.trim()),this.proto.postOps=this.contextifyOps(this.contextablePostOps,e).filter(e=>!!e.trim()),u.validateQueryString(this.session,this.proto.query,this.proto.fileName),u.validateQueryString(this.session,this.proto.incrementalQuery,this.proto.fileName),o.verifyObjectMatchesProto(p.dataform.Table,this.proto,o.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}contextifyOps(e,t){let r=[];return e.forEach(e=>{const n=t.apply(e);r=r.concat("string"==typeof n?[n]:n)}),r}verifyConfig(e){return e.type&&(delete e.type,e.dependencies&&(e.dependencyTargets=e.dependencies.map(e=>"string"==typeof e?{name:e}:e),delete e.dependencies),e.database&&(e.project=e.database,delete e.database),e.schema&&(e.dataset=e.schema,delete e.schema),e.fileName&&(e.filename=e.fileName,delete e.fileName),e.columns&&(e.columns=l.ColumnDescriptors.mapLegacyObjectToConfigProto(e.columns)),(null==(e=i.LegacyConfigConverter.insertLegacyInlineAssertionsToConfigProto(e))?void 0:e.bigquery)&&(e.bigquery.labels&&(e.labels=e.bigquery.labels,delete e.bigquery.labels),e.bigquery.additionalOptions&&(e.additionalOptions=e.bigquery.additionalOptions,delete e.bigquery.additionalOptions),u.checkExcessProperties(e=>{throw e},e.bigquery,u.strictKeysOf()(["labels","additionalOptions"]),"BigQuery view config"))),o.verifyObjectMatchesProto(p.dataform.ActionConfig.ViewConfig,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK)}}t.View=d;class f{constructor(e,t=!1){this.view=e,this.isIncremental=t}self(){return this.resolve(this.view.getTarget())}name(){return this.view.session.finalizeName(this.view.getTarget().name)}ref(e,...t){return e=u.toResolvable(e,t),u.resolvableAsTarget(e)?(this.view.dependencies(e),this.resolve(e)):(this.view.session.compileError(new Error("Action name is not specified")),"")}resolve(e,...t){return this.view.session.resolve(e,...t)}schema(){return this.view.session.finalizeSchema(this.view.getTarget().schema)}database(){return this.view.getTarget().database?this.view.session.finalizeDatabase(this.view.getTarget().database):(this.view.session.compileError(new Error("Warehouse does not support multiple databases")),"")}where(e){return this.view.where(e),""}when(e,t,r=""){return e?t:r}incremental(){return!!this.isIncremental}preOps(e){return this.view.preOps(e),""}postOps(e){return this.view.postOps(e),""}disabled(){return this.view.disabled(),""}bigquery(e){return this.view.bigquery(e),""}dependencies(e){return this.view.dependencies(e),""}apply(e){return"function"==typeof e?e(this):e}tags(e){return this.view.tags(e),""}}t.ViewContext=f},function(e,t,r){"use strict";
16
16
  /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
17
- function n(e){return null==e}r.r(t),r.d(t,"CORE_SCHEMA",(function(){return rt})),r.d(t,"DEFAULT_SCHEMA",(function(){return nt})),r.d(t,"FAILSAFE_SCHEMA",(function(){return et})),r.d(t,"JSON_SCHEMA",(function(){return tt})),r.d(t,"Schema",(function(){return Xe})),r.d(t,"Type",(function(){return Ze})),r.d(t,"YAMLException",(function(){return st})),r.d(t,"dump",(function(){return at})),r.d(t,"load",(function(){return ot})),r.d(t,"loadAll",(function(){return it})),r.d(t,"safeDump",(function(){return pt})),r.d(t,"safeLoad",(function(){return ct})),r.d(t,"safeLoadAll",(function(){return ut})),r.d(t,"types",(function(){return lt}));var o={isNothing:n,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:n(e)?[]:[e]},repeat:function(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var r,n,o,i;if(t)for(r=0,n=(i=Object.keys(t)).length;r<n;r+=1)e[o=i[r]]=t[o];return e}};function i(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+="\n\n"+e.mark.snippet),n+" "+r):n}function a(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=i(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,a.prototype.toString=function(e){return this.name+": "+i(this,e)};var s=a;function l(e,t,r,n,o){var i="",a="",s=Math.floor(o/2)-1;return n-t>s&&(t=n-s+(i=" ... ").length),r-n>s&&(r=n+s-(a=" ...").length),{str:i+e.slice(t,r).replace(/\t/g,"→")+a,pos:n-t+i.length}}function c(e,t){return o.repeat(" ",t-e.length)+e}var u=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],a=[],s=-1;r=n.exec(e.buffer);)a.push(r.index),i.push(r.index+r[0].length),e.position<=r.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var u,p,d="",f=Math.min(e.line+t.linesAfter,a.length).toString().length,h=t.maxLength-(t.indent+f+3);for(u=1;u<=t.linesBefore&&!(s-u<0);u++)p=l(e.buffer,i[s-u],a[s-u],e.position-(i[s]-i[s-u]),h),d=o.repeat(" ",t.indent)+c((e.line-u+1).toString(),f)+" | "+p.str+"\n"+d;for(p=l(e.buffer,i[s],a[s],e.position,h),d+=o.repeat(" ",t.indent)+c((e.line+1).toString(),f)+" | "+p.str+"\n",d+=o.repeat("-",t.indent+f+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(s+u>=a.length);u++)p=l(e.buffer,i[s+u],a[s+u],e.position-(i[s]-i[s+u]),h),d+=o.repeat(" ",t.indent)+c((e.line+u+1).toString(),f)+" | "+p.str+"\n";return d.replace(/\n$/,"")},p=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],d=["scalar","sequence","mapping"];var f=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===p.indexOf(t))throw new s('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))})),t}(t.styleAliases||null),-1===d.indexOf(this.kind))throw new s('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function h(e,t){var r=[];return e[t].forEach((function(e){var t=r.length;r.forEach((function(r,n){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=n)})),r[t]=e})),r}function g(e){return this.extend(e)}g.prototype.extend=function(e){var t=[],r=[];if(e instanceof f)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new s("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof f))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new s("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),r.forEach((function(e){if(!(e instanceof f))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var n=Object.create(g.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=h(n,"implicit"),n.compiledExplicit=h(n,"explicit"),n.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}(n.compiledImplicit,n.compiledExplicit),n};var y=g,m=new f("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),b=new f("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),O=new f("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),T=new y({explicit:[m,b,O]});var v=new f("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var w=new f("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function j(e){return 48<=e&&e<=55}function A(e){return 48<=e&&e<=57}var P=new f("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=e.length,o=0,i=!1;if(!n)return!1;if("-"!==(t=e[o])&&"+"!==t||(t=e[++o]),"0"===t){if(o+1===n)return!0;if("b"===(t=e[++o])){for(o++;o<n;o++)if("_"!==(t=e[o])){if("0"!==t&&"1"!==t)return!1;i=!0}return i&&"_"!==t}if("x"===t){for(o++;o<n;o++)if("_"!==(t=e[o])){if(!(48<=(r=e.charCodeAt(o))&&r<=57||65<=r&&r<=70||97<=r&&r<=102))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(o++;o<n;o++)if("_"!==(t=e[o])){if(!j(e.charCodeAt(o)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;o<n;o++)if("_"!==(t=e[o])){if(!A(e.charCodeAt(o)))return!1;i=!0}return!(!i||"_"===t)},construct:function(e){var t,r=e,n=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(n=-1),t=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===t){if("b"===r[1])return n*parseInt(r.slice(2),2);if("x"===r[1])return n*parseInt(r.slice(2),16);if("o"===r[1])return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!o.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),C=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var S=/^[-+]?[0-9]+e/;var E=new f("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!C.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||o.isNegativeZero(e))},represent:function(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(o.isNegativeZero(e))return"-0.0";return r=e.toString(10),S.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"}),k=T.extend({implicit:[v,w,P,E]}),x=k,N=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),D=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var _=new f("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==N.exec(e)||null!==D.exec(e))},construct:function(e){var t,r,n,o,i,a,s,l,c=0,u=null;if(null===(t=N.exec(e))&&(t=D.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,n,o));if(i=+t[4],a=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),l=new Date(Date.UTC(r,n,o,i,a,s,c)),u&&l.setTime(l.getTime()-u),l},instanceOf:Date,represent:function(e){return e.toISOString()}});var q=new f("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var R=new f("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=0,o=e.length,i=L;for(r=0;r<o;r++)if(!((t=i.indexOf(e.charAt(r)))>64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,i=L,a=0,s=[];for(t=0;t<o;t++)t%4==0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|i.indexOf(n.charAt(t));return 0===(r=o%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,r,n="",o=0,i=e.length,a=L;for(t=0;t<i;t++)t%3==0&&t&&(n+=a[o>>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]),o=(o<<8)+e[t];return 0===(r=i%3)?(n+=a[o>>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]):2===r?(n+=a[o>>10&63],n+=a[o>>4&63],n+=a[o<<2&63],n+=a[64]):1===r&&(n+=a[o>>2&63],n+=a[o<<4&63],n+=a[64],n+=a[64]),n}}),B=Object.prototype.hasOwnProperty,M=Object.prototype.toString;var I=new f("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,o,i,a=[],s=e;for(t=0,r=s.length;t<r;t+=1){if(n=s[t],i=!1,"[object Object]"!==M.call(n))return!1;for(o in n)if(B.call(n,o)){if(i)return!1;i=!0}if(!i)return!1;if(-1!==a.indexOf(o))return!1;a.push(o)}return!0},construct:function(e){return null!==e?e:[]}}),U=Object.prototype.toString;var F=new f("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,o,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(n=a[t],"[object Object]"!==U.call(n))return!1;if(1!==(o=Object.keys(n)).length)return!1;i[t]=[o[0],n[o[0]]]}return!0},construct:function(e){if(null===e)return[];var t,r,n,o,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],o=Object.keys(n),i[t]=[o[0],n[o[0]]];return i}}),K=Object.prototype.hasOwnProperty;var Q=new f("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,r=e;for(t in r)if(K.call(r,t)&&null!==r[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),G=x.extend({implicit:[_,q],explicit:[R,I,F,Q]}),J=Object.prototype.hasOwnProperty,$=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,V=/[\x85\u2028\u2029]/,W=/[,\[\]\{\}]/,H=/^(?:!|!!|![a-z\-]+!)$/i,z=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Y(e){return Object.prototype.toString.call(e)}function Z(e){return 10===e||13===e}function X(e){return 9===e||32===e}function ee(e){return 9===e||32===e||10===e||13===e}function te(e){return 44===e||91===e||93===e||123===e||125===e}function re(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function ne(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function oe(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var ie=new Array(256),ae=new Array(256),se=0;se<256;se++)ie[se]=ne(se)?1:0,ae[se]=ne(se);function le(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||G,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ce(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=u(r),new s(t,r)}function ue(e,t){throw ce(e,t)}function pe(e,t){e.onWarning&&e.onWarning.call(null,ce(e,t))}var de={YAML:function(e,t,r){var n,o,i;null!==e.version&&ue(e,"duplication of %YAML directive"),1!==r.length&&ue(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&ue(e,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),i=parseInt(n[2],10),1!==o&&ue(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&pe(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,o;2!==r.length&&ue(e,"TAG directive accepts exactly two arguments"),n=r[0],o=r[1],H.test(n)||ue(e,"ill-formed tag handle (first argument) of the TAG directive"),J.call(e.tagMap,n)&&ue(e,'there is a previously declared suffix for "'+n+'" tag handle'),z.test(o)||ue(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(t){ue(e,"tag prefix is malformed: "+o)}e.tagMap[n]=o}};function fe(e,t,r,n){var o,i,a,s;if(t<r){if(s=e.input.slice(t,r),n)for(o=0,i=s.length;o<i;o+=1)9===(a=s.charCodeAt(o))||32<=a&&a<=1114111||ue(e,"expected valid JSON character");else $.test(s)&&ue(e,"the stream contains non-printable characters");e.result+=s}}function he(e,t,r,n){var i,a,s,l;for(o.isObject(r)||ue(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,l=(i=Object.keys(r)).length;s<l;s+=1)a=i[s],J.call(t,a)||(t[a]=r[a],n[a]=!0)}function ge(e,t,r,n,o,i,a,s,l){var c,u;if(Array.isArray(o))for(c=0,u=(o=Array.prototype.slice.call(o)).length;c<u;c+=1)Array.isArray(o[c])&&ue(e,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===Y(o[c])&&(o[c]="[object Object]");if("object"==typeof o&&"[object Object]"===Y(o)&&(o="[object Object]"),o=String(o),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(i))for(c=0,u=i.length;c<u;c+=1)he(e,t,i[c],r);else he(e,t,i,r);else e.json||J.call(r,o)||!J.call(t,o)||(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,ue(e,"duplicated mapping key")),"__proto__"===o?Object.defineProperty(t,o,{configurable:!0,enumerable:!0,writable:!0,value:i}):t[o]=i,delete r[o];return t}function ye(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):ue(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function me(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);0!==o;){for(;X(o);)9===o&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!Z(o))break;for(ye(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&pe(e,"deficient indentation"),n}function be(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!ee(t)))}function Oe(e,t){1===t?e.result+=" ":t>1&&(e.result+=o.repeat("\n",t-1))}function Te(e,t){var r,n,o=e.tag,i=e.anchor,a=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ue(e,"tab characters must not be used in indentation")),45===n)&&ee(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,me(e,!0,-1)&&e.lineIndent<=t)a.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,je(e,t,3,!1,!0),a.push(e.result),me(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)ue(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=o,e.anchor=i,e.kind="sequence",e.result=a,!0)}function ve(e){var t,r,n,o,i=!1,a=!1;if(33!==(o=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&ue(e,"duplication of a tag property"),60===(o=e.input.charCodeAt(++e.position))?(i=!0,o=e.input.charCodeAt(++e.position)):33===o?(a=!0,r="!!",o=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&62!==o);e.position<e.length?(n=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):ue(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!ee(o);)33===o&&(a?ue(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),H.test(r)||ue(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),W.test(n)&&ue(e,"tag suffix cannot contain flow indicator characters")}n&&!z.test(n)&&ue(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(t){ue(e,"tag name is malformed: "+n)}return i?e.tag=n:J.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:ue(e,'undeclared tag handle "'+r+'"'),!0}function we(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&ue(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!ee(r)&&!te(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&ue(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function je(e,t,r,n,i){var a,s,l,c,u,p,d,f,h,g=1,y=!1,m=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=l=4===r||3===r,n&&me(e,!0,-1)&&(y=!0,e.lineIndent>t?g=1:e.lineIndent===t?g=0:e.lineIndent<t&&(g=-1)),1===g)for(;ve(e)||we(e);)me(e,!0,-1)?(y=!0,l=a,e.lineIndent>t?g=1:e.lineIndent===t?g=0:e.lineIndent<t&&(g=-1)):l=!1;if(l&&(l=y||i),1!==g&&4!==r||(f=1===r||2===r?t:t+1,h=e.position-e.lineStart,1===g?l&&(Te(e,h)||function(e,t,r){var n,o,i,a,s,l,c,u=e.tag,p=e.anchor,d={},f=Object.create(null),h=null,g=null,y=null,m=!1,b=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=d),c=e.input.charCodeAt(e.position);0!==c;){if(m||-1===e.firstTabInLine||(e.position=e.firstTabInLine,ue(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),i=e.line,63!==c&&58!==c||!ee(n)){if(a=e.line,s=e.lineStart,l=e.position,!je(e,r,2,!1,!0))break;if(e.line===i){for(c=e.input.charCodeAt(e.position);X(c);)c=e.input.charCodeAt(++e.position);if(58===c)ee(c=e.input.charCodeAt(++e.position))||ue(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(ge(e,d,f,h,g,null,a,s,l),h=g=y=null),b=!0,m=!1,o=!1,h=e.tag,g=e.result;else{if(!b)return e.tag=u,e.anchor=p,!0;ue(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=p,!0;ue(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(m&&(ge(e,d,f,h,g,null,a,s,l),h=g=y=null),b=!0,m=!0,o=!0):m?(m=!1,o=!0):ue(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=n;if((e.line===i||e.lineIndent>t)&&(m&&(a=e.line,s=e.lineStart,l=e.position),je(e,t,4,!0,o)&&(m?g=e.result:y=e.result),m||(ge(e,d,f,h,g,y,a,s,l),h=g=y=null),me(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&0!==c)ue(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&ge(e,d,f,h,g,null,a,s,l),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=d),b}(e,h,f))||function(e,t){var r,n,o,i,a,s,l,c,u,p,d,f,h=!0,g=e.tag,y=e.anchor,m=Object.create(null);if(91===(f=e.input.charCodeAt(e.position)))a=93,c=!1,i=[];else{if(123!==f)return!1;a=125,c=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),f=e.input.charCodeAt(++e.position);0!==f;){if(me(e,!0,t),(f=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=g,e.anchor=y,e.kind=c?"mapping":"sequence",e.result=i,!0;h?44===f&&ue(e,"expected the node content, but found ','"):ue(e,"missed comma between flow collection entries"),d=null,s=l=!1,63===f&&ee(e.input.charCodeAt(e.position+1))&&(s=l=!0,e.position++,me(e,!0,t)),r=e.line,n=e.lineStart,o=e.position,je(e,t,1,!1,!0),p=e.tag,u=e.result,me(e,!0,t),f=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==f||(s=!0,f=e.input.charCodeAt(++e.position),me(e,!0,t),je(e,t,1,!1,!0),d=e.result),c?ge(e,i,m,p,u,d,r,n,o):s?i.push(ge(e,null,m,p,u,d,r,n,o)):i.push(u),me(e,!0,t),44===(f=e.input.charCodeAt(e.position))?(h=!0,f=e.input.charCodeAt(++e.position)):h=!1}ue(e,"unexpected end of the stream within a flow collection")}(e,f)?m=!0:(s&&function(e,t){var r,n,i,a,s,l=1,c=!1,u=!1,p=t,d=0,f=!1;if(124===(a=e.input.charCodeAt(e.position)))n=!1;else{if(62!==a)return!1;n=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)1===l?l=43===a?3:2:ue(e,"repeat of a chomping mode identifier");else{if(!((i=48<=(s=a)&&s<=57?s-48:-1)>=0))break;0===i?ue(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?ue(e,"repeat of an indentation width identifier"):(p=t+i-1,u=!0)}if(X(a)){do{a=e.input.charCodeAt(++e.position)}while(X(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!Z(a)&&0!==a)}for(;0!==a;){for(ye(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndent<p)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>p&&(p=e.lineIndent),Z(a))d++;else{if(e.lineIndent<p){3===l?e.result+=o.repeat("\n",c?1+d:d):1===l&&c&&(e.result+="\n");break}for(n?X(a)?(f=!0,e.result+=o.repeat("\n",c?1+d:d)):f?(f=!1,e.result+=o.repeat("\n",d+1)):0===d?c&&(e.result+=" "):e.result+=o.repeat("\n",d):e.result+=o.repeat("\n",c?1+d:d),c=!0,u=!0,d=0,r=e.position;!Z(a)&&0!==a;)a=e.input.charCodeAt(++e.position);fe(e,r,e.position,!1)}}return!0}(e,f)||function(e,t){var r,n,o;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(fe(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,o=e.position}else Z(r)?(fe(e,n,o,!0),Oe(e,me(e,!1,t)),n=o=e.position):e.position===e.lineStart&&be(e)?ue(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);ue(e,"unexpected end of the stream within a single quoted scalar")}(e,f)||function(e,t){var r,n,o,i,a,s,l;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return fe(e,r,e.position,!0),e.position++,!0;if(92===s){if(fe(e,r,e.position,!0),Z(s=e.input.charCodeAt(++e.position)))me(e,!1,t);else if(s<256&&ie[s])e.result+=ae[s],e.position++;else if((a=120===(l=s)?2:117===l?4:85===l?8:0)>0){for(o=a,i=0;o>0;o--)(a=re(s=e.input.charCodeAt(++e.position)))>=0?i=(i<<4)+a:ue(e,"expected hexadecimal character");e.result+=oe(i),e.position++}else ue(e,"unknown escape sequence");r=n=e.position}else Z(s)?(fe(e,r,n,!0),Oe(e,me(e,!1,t)),r=n=e.position):e.position===e.lineStart&&be(e)?ue(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}ue(e,"unexpected end of the stream within a double quoted scalar")}(e,f)?m=!0:!function(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!ee(n)&&!te(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&ue(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),J.call(e.anchorMap,r)||ue(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],me(e,!0,-1),!0}(e)?function(e,t,r){var n,o,i,a,s,l,c,u,p=e.kind,d=e.result;if(ee(u=e.input.charCodeAt(e.position))||te(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(ee(n=e.input.charCodeAt(e.position+1))||r&&te(n)))return!1;for(e.kind="scalar",e.result="",o=i=e.position,a=!1;0!==u;){if(58===u){if(ee(n=e.input.charCodeAt(e.position+1))||r&&te(n))break}else if(35===u){if(ee(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&be(e)||r&&te(u))break;if(Z(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,me(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=i,e.line=s,e.lineStart=l,e.lineIndent=c;break}}a&&(fe(e,o,i,!1),Oe(e,e.line-s),o=i=e.position,a=!1),X(u)||(i=e.position+1),u=e.input.charCodeAt(++e.position)}return fe(e,o,i,!1),!!e.result||(e.kind=p,e.result=d,!1)}(e,f,1===r)&&(m=!0,null===e.tag&&(e.tag="?")):(m=!0,null===e.tag&&null===e.anchor||ue(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(m=l&&Te(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ue(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,u=e.implicitTypes.length;c<u;c+=1)if((d=e.implicitTypes[c]).resolve(e.result)){e.result=d.construct(e.result),e.tag=d.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(J.call(e.typeMap[e.kind||"fallback"],e.tag))d=e.typeMap[e.kind||"fallback"][e.tag];else for(d=null,c=0,u=(p=e.typeMap.multi[e.kind||"fallback"]).length;c<u;c+=1)if(e.tag.slice(0,p[c].tag.length)===p[c].tag){d=p[c];break}d||ue(e,"unknown tag !<"+e.tag+">"),null!==e.result&&d.kind!==e.kind&&ue(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ue(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||m}function Ae(e){var t,r,n,o,i=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(o=e.input.charCodeAt(e.position))&&(me(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!ee(o);)o=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&ue(e,"directive name must not be less than one character in length");0!==o;){for(;X(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!Z(o));break}if(Z(o))break;for(t=e.position;0!==o&&!ee(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==o&&ye(e),J.call(de,r)?de[r](e,r,n):pe(e,'unknown document directive "'+r+'"')}me(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,me(e,!0,-1)):a&&ue(e,"directives end mark is expected"),je(e,e.lineIndent-1,4,!1,!0),me(e,!0,-1),e.checkLineBreaks&&V.test(e.input.slice(i,e.position))&&pe(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&be(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,me(e,!0,-1)):e.position<e.length-1&&ue(e,"end of the stream or a document separator is expected")}function Pe(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new le(e,t),n=e.indexOf("\0");for(-1!==n&&(r.position=n,ue(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Ae(r);return r.documents}var Ce={loadAll:function(e,t,r){null!==t&&"object"==typeof t&&void 0===r&&(r=t,t=null);var n=Pe(e,r);if("function"!=typeof t)return n;for(var o=0,i=n.length;o<i;o+=1)t(n[o])},load:function(e,t){var r=Pe(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new s("expected a single document in the stream, but found more")}}},Se=Object.prototype.toString,Ee=Object.prototype.hasOwnProperty,ke={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},xe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Ne=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function De(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else{if(!(e<=4294967295))throw new s("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+o.repeat("0",n-t.length)+t}function _e(e){this.schema=e.schema||G,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=o.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var r,n,o,i,a,s,l;if(null===t)return{};for(r={},o=0,i=(n=Object.keys(t)).length;o<i;o+=1)a=n[o],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(l=e.compiledTypeMap.fallback[a])&&Ee.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[a]=s;return r}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function qe(e,t){for(var r,n=o.repeat(" ",t),i=0,a=-1,s="",l=e.length;i<l;)-1===(a=e.indexOf("\n",i))?(r=e.slice(i),i=l):(r=e.slice(i,a+1),i=a+1),r.length&&"\n"!==r&&(s+=n),s+=r;return s}function Le(e,t){return"\n"+o.repeat(" ",e.indent*t)}function Re(e){return 32===e||9===e}function Be(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function Me(e){return Be(e)&&65279!==e&&13!==e&&10!==e}function Ie(e,t,r){var n=Me(e),o=n&&!Re(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!o)||Me(t)&&!Re(t)&&35===e||58===t&&o}function Ue(e,t){var r,n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function Fe(e){return/^\n* /.test(e)}function Ke(e,t,r,n,o,i,a,s){var l,c,u=0,p=null,d=!1,f=!1,h=-1!==n,g=-1,y=Be(c=Ue(e,0))&&65279!==c&&!Re(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&function(e){return!Re(e)&&58!==e}(Ue(e,e.length-1));if(t||a)for(l=0;l<e.length;u>=65536?l+=2:l++){if(!Be(u=Ue(e,l)))return 5;y=y&&Ie(u,p,s),p=u}else{for(l=0;l<e.length;u>=65536?l+=2:l++){if(10===(u=Ue(e,l)))d=!0,h&&(f=f||l-g-1>n&&" "!==e[g+1],g=l);else if(!Be(u))return 5;y=y&&Ie(u,p,s),p=u}f=f||h&&l-g-1>n&&" "!==e[g+1]}return d||f?r>9&&Fe(e)?5:a?2===i?5:2:f?4:3:!y||a||o(e)?2===i?5:2:1}function Qe(e,t,r,n,o){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==xe.indexOf(t)||Ne.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,r),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),l=n||e.flowLevel>-1&&r>=e.flowLevel;switch(Ke(t,l,e.indent,a,(function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}(e,t)}),e.quotingType,e.forceQuotes&&!n,o)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+Ge(t,e.indent)+Je(qe(t,i));case 4:return">"+Ge(t,e.indent)+Je(qe(function(e,t){var r,n,o=/(\n+)([^\n]*)/g,i=(s=e.indexOf("\n"),s=-1!==s?s:e.length,o.lastIndex=s,$e(e.slice(0,s),t)),a="\n"===e[0]||" "===e[0];var s;for(;n=o.exec(e);){var l=n[1],c=n[2];r=" "===c[0],i+=l+(a||r||""===c?"":"\n")+$e(c,t),a=r}return i}(t,a),i));case 5:return'"'+function(e){for(var t,r="",n=0,o=0;o<e.length;n>=65536?o+=2:o++)n=Ue(e,o),!(t=ke[n])&&Be(n)?(r+=e[o],n>=65536&&(r+=e[o+1])):r+=t||De(n);return r}(t)+'"';default:throw new s("impossible error: invalid scalar style")}}()}function Ge(e,t){var r=Fe(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function Je(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function $e(e,t){if(""===e||" "===e[0])return e;for(var r,n,o=/ [^ ]/g,i=0,a=0,s=0,l="";r=o.exec(e);)(s=r.index)-i>t&&(n=a>i?a:s,l+="\n"+e.slice(i,n),i=n+1),a=s;return l+="\n",e.length-i>t&&a>i?l+=e.slice(i,a)+"\n"+e.slice(a+1):l+=e.slice(i),l.slice(1)}function Ve(e,t,r,n){var o,i,a,s="",l=e.tag;for(o=0,i=r.length;o<i;o+=1)a=r[o],e.replacer&&(a=e.replacer.call(r,String(o),a)),(He(e,t+1,a,!0,!0,!1,!0)||void 0===a&&He(e,t+1,null,!0,!0,!1,!0))&&(n&&""===s||(s+=Le(e,t)),e.dump&&10===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}function We(e,t,r){var n,o,i,a,l,c;for(i=0,a=(o=r?e.explicitTypes:e.implicitTypes).length;i<a;i+=1)if(((l=o[i]).instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof t&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(r?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(c=e.styleMap[l.tag]||l.defaultStyle,"[object Function]"===Se.call(l.represent))n=l.represent(t,c);else{if(!Ee.call(l.represent,c))throw new s("!<"+l.tag+'> tag resolver accepts not "'+c+'" style');n=l.represent[c](t,c)}e.dump=n}return!0}return!1}function He(e,t,r,n,o,i,a){e.tag=null,e.dump=r,We(e,r,!1)||We(e,r,!0);var l,c=Se.call(e.dump),u=n;n&&(n=e.flowLevel<0||e.flowLevel>t);var p,d,f="[object Object]"===c||"[object Array]"===c;if(f&&(d=-1!==(p=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||d||2!==e.indent&&t>0)&&(o=!1),d&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(f&&d&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===c)n&&0!==Object.keys(e.dump).length?(!function(e,t,r,n){var o,i,a,l,c,u,p="",d=e.tag,f=Object.keys(r);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new s("sortKeys must be a boolean or a function");for(o=0,i=f.length;o<i;o+=1)u="",n&&""===p||(u+=Le(e,t)),l=r[a=f[o]],e.replacer&&(l=e.replacer.call(r,a,l)),He(e,t+1,a,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,c&&(u+=Le(e,t)),He(e,t+1,l,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=d,e.dump=p||"{}"}(e,t,e.dump,o),d&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,r){var n,o,i,a,s,l="",c=e.tag,u=Object.keys(r);for(n=0,o=u.length;n<o;n+=1)s="",""!==l&&(s+=", "),e.condenseFlow&&(s+='"'),a=r[i=u[n]],e.replacer&&(a=e.replacer.call(r,i,a)),He(e,t,i,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),He(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,t,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===c)n&&0!==e.dump.length?(e.noArrayIndent&&!a&&t>0?Ve(e,t-1,e.dump,o):Ve(e,t,e.dump,o),d&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,r){var n,o,i,a="",s=e.tag;for(n=0,o=r.length;n<o;n+=1)i=r[n],e.replacer&&(i=e.replacer.call(r,String(n),i)),(He(e,t,i,!1,!1)||void 0===i&&He(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=s,e.dump="["+a+"]"}(e,t,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else{if("[object String]"!==c){if("[object Undefined]"===c)return!1;if(e.skipInvalid)return!1;throw new s("unacceptable kind of an object to dump "+c)}"?"!==e.tag&&Qe(e,e.dump,t,i,u)}null!==e.tag&&"?"!==e.tag&&(l=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),l="!"===e.tag[0]?"!"+l:"tag:yaml.org,2002:"===l.slice(0,18)?"!!"+l.slice(18):"!<"+l+">",e.dump=l+" "+e.dump)}return!0}function ze(e,t){var r,n,o=[],i=[];for(function e(t,r,n){var o,i,a;if(null!==t&&"object"==typeof t)if(-1!==(i=r.indexOf(t)))-1===n.indexOf(i)&&n.push(i);else if(r.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)e(t[i],r,n);else for(o=Object.keys(t),i=0,a=o.length;i<a;i+=1)e(t[o[i]],r,n)}(e,o,i),r=0,n=i.length;r<n;r+=1)t.duplicates.push(o[i[r]]);t.usedDuplicates=new Array(n)}function Ye(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var Ze=f,Xe=y,et=T,tt=k,rt=x,nt=G,ot=Ce.load,it=Ce.loadAll,at={dump:function(e,t){var r=new _e(t=t||{});r.noRefs||ze(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),He(r,0,n,!0,!0)?r.dump+"\n":""}}.dump,st=s,lt={binary:R,float:E,map:O,null:v,pairs:F,set:Q,timestamp:_,bool:w,int:P,merge:q,omap:I,seq:b,str:m},ct=Ye("safeLoad","load"),ut=Ye("safeLoadAll","loadAll"),pt=Ye("safeDump","dump"),dt={Type:Ze,Schema:Xe,FAILSAFE_SCHEMA:et,JSON_SCHEMA:tt,CORE_SCHEMA:rt,DEFAULT_SCHEMA:nt,load:ot,loadAll:it,dump:at,YAMLException:st,types:lt,safeLoad:ct,safeLoadAll:ut,safeDump:pt};t.default=dt},function(e,t,r){"use strict";e.exports=p;var n,o=r(6),i=o.LongBits,a=o.base64,s=o.utf8;function l(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function c(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function p(){this.len=0,this.head=new l(c,0,0),this.tail=this.head,this.states=null}var d=function(){return o.Buffer?function(){return(p.create=function(){return new n})()}:function(){return new p}};function f(e,t,r){t[r]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function y(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}p.create=d(),p.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(p.alloc=o.pool(p.alloc,o.Array.prototype.subarray)),p.prototype._push=function(e,t,r){return this.tail=this.tail.next=new l(e,t,r),this.len+=t,this},h.prototype=Object.create(l.prototype),h.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},p.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},p.prototype.int32=function(e){return e<0?this._push(g,10,i.fromNumber(e)):this.uint32(e)},p.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},p.prototype.uint64=function(e){var t=i.from(e);return this._push(g,t.length(),t)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(g,t.length(),t)},p.prototype.bool=function(e){return this._push(f,1,e?1:0)},p.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(e){var t=i.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},p.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var m=o.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};p.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(o.isString(e)){var r=p.alloc(t=a.length(e));a.decode(e,r,0),e=r}return this.uint32(t)._push(m,t,e)},p.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(f,1,0)},p.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new l(c,0,0),this.len=0,this},p.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(c,0,0),this.len=0),this},p.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},p.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},p._configure=function(e){n=e,p.create=d(),n._configure()}},function(e,t,r){"use strict";e.exports=l;var n,o=r(6),i=o.LongBits,a=o.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var c,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")},p=function(){return o.Buffer?function(e){return(l.create=function(e){return o.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u};function d(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw s(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}l.create=p(),l.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,l.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return c}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw s(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,r);if(t===r){var n=o.Buffer;return n?n.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,r)},l.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){n=e,l.create=p(),n._configure();var t=o.Long?"toLong":"toNumber";o.merge(l.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},function(e,t,r){"use strict";e.exports=b;var n=r(11);((b.prototype=Object.create(n.prototype)).constructor=b).className="Type";var o=r(5),i=r(12),a=r(8),s=r(21),l=r(22),c=r(24),u=r(19),p=r(18),d=r(0),f=r(34),h=r(35),g=r(36),y=r(37),m=r(38);function b(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function O(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(b.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this._fieldsById[n])throw Error("duplicate id "+n+" in "+this);this._fieldsById[n]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=d.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=d.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=b.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof c||((e.prototype=new c).constructor=e,d.merge(e.prototype,t)),e.$type=e.prototype.$type=this,d.merge(e,c,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this._oneofsArray[r].resolve().name]={get:d.oneOfGetter(this._oneofsArray[r].oneof),set:d.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),b.generateConstructor=function(e){for(var t,r=d.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e._fieldsArray[n]).map?r("this%s={}",d.safeProp(t.name)):t.repeated&&r("this%s=[]",d.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},b.fromJSON=function(e,t){var r=new b(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var c=Object.keys(t.fields),u=0;u<c.length;++u)r.add((void 0!==t.fields[c[u]].keyType?s.fromJSON:a.fromJSON)(c[u],t.fields[c[u]]));if(t.oneofs)for(c=Object.keys(t.oneofs),u=0;u<c.length;++u)r.add(i.fromJSON(c[u],t.oneofs[c[u]]));if(t.nested)for(c=Object.keys(t.nested),u=0;u<c.length;++u){var p=t.nested[c[u]];r.add((void 0!==p.id?a.fromJSON:void 0!==p.fields?b.fromJSON:void 0!==p.values?o.fromJSON:void 0!==p.methods?l.fromJSON:n.fromJSON)(c[u],p))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),r},b.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return d.toObject(["options",t&&t.options||void 0,"oneofs",n.arrayToJSON(this.oneofsArray,e),"fields",n.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},b.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return n.prototype.resolveAll.call(this)},b.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},b.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof a&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),O(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),O(this)):n.prototype.add.call(this,e)},b.prototype.remove=function(e){if(e instanceof a&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),O(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),O(this)}return n.prototype.remove.call(this,e)},b.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},b.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)},b.prototype.create=function(e){return new this.ctor(e)},b.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=f(this)({Writer:p,types:t,util:d}),this.decode=h(this)({Reader:u,types:t,util:d}),this.verify=g(this)({types:t,util:d}),this.fromObject=y.fromObject(this)({types:t,util:d}),this.toObject=y.toObject(this)({types:t,util:d});var n=m[e];if(n){var o=Object.create(this);o.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(o),o.toObject=this.toObject,this.toObject=n.toObject.bind(o)}return this},b.prototype.encode=function(e,t){return this.setup().encode(e,t)},b.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},b.prototype.decode=function(e,t){return this.setup().decode(e,t)},b.prototype.decodeDelimited=function(e){return e instanceof u||(e=u.create(e)),this.decode(e,e.uint32())},b.prototype.verify=function(e){return this.setup().verify(e)},b.prototype.fromObject=function(e){return this.setup().fromObject(e)},b.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},b.d=function(e){return function(t){d.decorateType(t,e)}}},function(e,t,r){"use strict";e.exports=a;var n=r(8);((a.prototype=Object.create(n.prototype)).constructor=a).className="MapField";var o=r(10),i=r(0);function a(e,t,r,o,a,s){if(n.call(this,e,t,o,void 0,void 0,a,s),!i.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}a.fromJSON=function(e,t){return new a(e,t.id,t.keyType,t.type,t.options,t.comment)},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},a.prototype.resolve=function(){if(this.resolved)return this;if(void 0===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},a.d=function(e,t,r){return"function"==typeof r?r=i.decorateType(r).name:r&&"object"==typeof r&&(r=i.decorateEnum(r).name),function(n,o){i.decorateType(n.constructor).add(new a(o,e,t,r))}}},function(e,t,r){"use strict";e.exports=s;var n=r(11);((s.prototype=Object.create(n.prototype)).constructor=s).className="Service";var o=r(23),i=r(0),a=r(32);function s(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function l(e){return e._methodsArray=null,e}s.fromJSON=function(e,t){var r=new s(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),i=0;i<n.length;++i)r.add(o.fromJSON(n[i],t.methods[n[i]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},s.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",n.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(s.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),s.prototype.get=function(e){return this.methods[e]||n.prototype.get.call(this,e)},s.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return n.prototype.resolve.call(this)},s.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof o?(this.methods[e.name]=e,e.parent=this,l(this)):n.prototype.add.call(this,e)},s.prototype.remove=function(e){if(e instanceof o){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,l(this)}return n.prototype.remove.call(this,e)},s.prototype.create=function(e,t,r){for(var n,o=new a.Service(e,t,r),s=0;s<this.methodsArray.length;++s){var l=i.lcFirst((n=this._methodsArray[s]).resolve().name).replace(/[^$\w_]/g,"");o[l]=i.codegen(["r","c"],i.isReserved(l)?l+"_":l)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return o}},function(e,t,r){"use strict";e.exports=i;var n=r(9);((i.prototype=Object.create(n.prototype)).constructor=i).className="Method";var o=r(0);function i(e,t,r,i,a,s,l,c,u){if(o.isObject(a)?(l=a,a=s=void 0):o.isObject(s)&&(l=s,s=void 0),void 0!==t&&!o.isString(t))throw TypeError("type must be a string");if(!o.isString(r))throw TypeError("requestType must be a string");if(!o.isString(i))throw TypeError("responseType must be a string");n.call(this,e,l),this.type=t||"rpc",this.requestType=r,this.requestStream=!!a||void 0,this.responseType=i,this.responseStream=!!s||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=c,this.parsedOptions=u}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},function(e,t,r){"use strict";e.exports=o;var n=r(6);function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}o.create=function(e){return this.$type.create(e)},o.encode=function(e,t){return this.$type.encode(e,t)},o.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},o.decode=function(e){return this.$type.decode(e)},o.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},o.verify=function(e){return this.$type.verify(e)},o.fromObject=function(e){return this.$type.fromObject(e)},o.toObject=function(e,t){return this.$type.toObject(e,t)},o.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},function(e,t,r){"use strict";e.exports=p;var n=r(11);((p.prototype=Object.create(n.prototype)).constructor=p).className="Root";var o,i,a,s=r(8),l=r(5),c=r(12),u=r(0);function p(e){n.call(this,"",e),this.deferred=[],this.files=[]}function d(){}p.fromJSON=function(e,t){return t||(t=new p),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},p.prototype.resolvePath=u.path.resolve,p.prototype.fetch=u.fetch,p.prototype.load=function e(t,r,n){"function"==typeof r&&(n=r,r=void 0);var o=this;if(!n)return u.asPromise(e,o,t,r);var s=n===d;function l(e,t){if(n){var r=n;if(n=null,s)throw e;r(e,t)}}function c(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in a)return r}return null}function p(e,t){try{if(u.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),u.isString(t)){i.filename=e;var n,a=i(t,o,r),p=0;if(a.imports)for(;p<a.imports.length;++p)(n=c(a.imports[p])||o.resolvePath(e,a.imports[p]))&&f(n);if(a.weakImports)for(p=0;p<a.weakImports.length;++p)(n=c(a.weakImports[p])||o.resolvePath(e,a.weakImports[p]))&&f(n,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){l(e)}s||h||l(null,o)}function f(e,t){if(e=c(e)||e,!(o.files.indexOf(e)>-1))if(o.files.push(e),e in a)s?p(e,a[e]):(++h,setTimeout((function(){--h,p(e,a[e])})));else if(s){var r;try{r=u.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||l(e))}p(e,r)}else++h,o.fetch(e,(function(r,i){--h,n&&(r?t?h||l(null,o):l(r):p(e,i))}))}var h=0;u.isString(t)&&(t=[t]);for(var g,y=0;y<t.length;++y)(g=o.resolvePath("",t[y]))&&f(g);if(s)return o;h||l(null,o)},p.prototype.loadSync=function(e,t){if(!u.isNode)throw Error("not supported");return this.load(e,t,d)},p.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return n.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function h(e,t){var r=t.parent.lookup(t.extend);if(r){var n=new s(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.get(n.name)||(n.declaringField=t,t.extensionField=n,r.add(n)),!0}return!1}p.prototype._handleAdd=function(e){if(e instanceof s)void 0===e.extend||e.extensionField||h(0,e)||this.deferred.push(e);else if(e instanceof l)f.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof c)){if(e instanceof o)for(var t=0;t<this.deferred.length;)h(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);f.test(e.name)&&(e.parent[e.name]=e)}},p.prototype._handleRemove=function(e){if(e instanceof s){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof l)f.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);f.test(e.name)&&delete e.parent[e.name]}},p._configure=function(e,t,r){o=e,i=t,a=r}},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(17),i=r(3),a=r(7),s=n(r(4)),l=r(2),c=r(1);class u extends a.ActionBuilder{constructor(e,t,r){if(super(e),this.proto=c.dataform.DataPreparation.create(),this.session=e,t.name)t.name.endsWith(".dp")&&t.filename.endsWith(".dp.sqlx")&&(t.name=t.name.slice(0,-3));else{const e=s.filename(t.filename);if(e.toLowerCase().endsWith(".dp.yaml")||e.toLowerCase().endsWith(".dp.sqlx"))t.name=e.slice(0,-8);else{if(!e.toLowerCase().endsWith(".yaml")&&!e.toLowerCase().endsWith(".sqlx"))throw new Error("Only YAML and SQLX files are supported");t.name=e.slice(0,-5)}}const n=s.fileExtension(t.filename);"yaml"===n?this.configureYaml(e,t,r):"sqlx"===n&&this.configureSqlx(e,t)}config(e){return e.database&&this.database(e.database),e.project&&this.database(e.project),e.schema&&this.schema(e.schema),e.dataset&&this.schema(e.dataset),this}query(e){return this.contextableQuery=e,this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>this.proto.dependencyTargets.push(l.checkAssertionsForDependency(this,e))),this}getFileName(){return this.proto.fileName}getTarget(){return c.dataform.Target.create(this.proto.target)}compile(){if(null!=this.contextableQuery){const e=new p(this);this.proto.query=e.apply(this.contextableQuery).trim(),l.validateQueryString(this.session,this.proto.query,this.proto.fileName)}return i.verifyObjectMatchesProto(c.dataform.DataPreparation,this.proto,i.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}database(e){return this.proto.target=this.applySessionToTarget(c.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{database:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}schema(e){return this.proto.target=this.applySessionToTarget(c.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{schema:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}configureYamlWithoutTargets(e,t,r){const n=c.dataform.Target.create({name:r.name});this.proto.target=this.finalizeTarget(this.applySessionToTarget(n,t.projectConfig,r.filename,{validateTarget:!0})),this.proto.targets=[this.proto.target],this.proto.canonicalTarget=this.applySessionToTarget(n,t.canonicalProjectConfig),this.proto.canonicalTargets=[this.proto.canonicalTarget];const i=this.applySessionToDataPreparationContents(e);this.proto.dataPreparationYaml=o.dump(i)}configureYamlWithTargets(e,t,r,n){const i=e.map(e=>this.applySessionToTarget(e,r.projectConfig,n.filename,{validateTarget:!0}));this.proto.targets=i.map(e=>this.finalizeTarget(e)),this.proto.canonicalTargets=e.map(e=>this.applySessionToTarget(e,r.canonicalProjectConfig));const a=this.applySessionToDataPreparationContents(t);this.proto.dataPreparationYaml=o.dump(a),this.proto.target=i[0],this.proto.canonicalTarget=this.proto.canonicalTargets[0]}applySessionToDataPreparationContents(e){var t;if(!e)return e;const r=null===(t=e.configuration)||void 0===t?void 0:t.errorTable;return r&&(e.configuration.errorTable=this.applySessionToTableReference(r)),e.nodes&&e.nodes.forEach((t,r)=>{var n,o;const i=null===(n=t.source)||void 0===n?void 0:n.table;i&&(e.nodes[r].source.table=this.applySessionToTableReference(i));const a=null===(o=t.destination)||void 0===o?void 0:o.table;a&&(e.nodes[r].destination.table=this.applySessionToTableReference(a))}),e}applySessionToTableReference(e){const t={database:e.project,schema:e.dataset,name:e.table},r=this.applySessionToTarget(c.dataform.Target.create(t),this.session.projectConfig);let n={table:this.session.finalizeName(r.name)};return r.schema&&(n=Object.assign({dataset:this.session.finalizeSchema(r.schema)},n)),r.database&&(n=Object.assign({project:this.session.finalizeDatabase(r.database)},n)),n}getTargets(e){const t=[];return e&&e.nodes&&e.nodes.forEach(e=>{var r;const n=null===(r=e.destination)||void 0===r?void 0:r.table;if(n){const e={database:n.project,schema:n.dataset,name:n.table};t.push(c.dataform.Target.create(e))}}),t}configureYaml(e,t,r){t.filename=l.resolveActionsConfigFilename(t.filename,r);const n=l.nativeRequire(t.filename).asJson,o=this.getTargets(n);o.length>0?this.configureYamlWithTargets(o,n,e,t):this.configureYamlWithoutTargets(n,e,t),this.proto.tags=t.tags,t.dependencyTargets&&this.dependencies(t.dependencyTargets.map(e=>l.configTargetToCompiledGraphTarget(c.dataform.ActionConfig.Target.create(e)))),this.proto.fileName=t.filename,t.disabled&&(this.proto.disabled=t.disabled)}configureSqlx(e,t){var r,n;const o=[];if(o.push(l.actionConfigToCompiledGraphTarget(t)),null!=t.errorTable){const e=c.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.create(t.errorTable),r=l.actionConfigToCompiledGraphTarget(e);this.proto.errorTableRetentionDays=e.retentionDays,o.push(r)}this.proto.load=this.mapLoadMode(null===(r=t.loadMode)||void 0===r?void 0:r.mode,null===(n=t.loadMode)||void 0===n?void 0:n.incrementalColumn),this.proto.targets=o.map(r=>this.applySessionToTarget(r,e.projectConfig,t.filename,{validateTarget:!0})).map(e=>this.finalizeTarget(e)),this.proto.target=this.proto.targets[0],this.proto.targets.length>1&&(this.proto.errorTable=this.proto.targets[1]),this.proto.canonicalTargets=o.map(t=>this.applySessionToTarget(t,e.canonicalProjectConfig)),this.proto.canonicalTarget=this.proto.canonicalTargets[0],t.dependencyTargets&&this.dependencies(t.dependencyTargets.map(e=>l.configTargetToCompiledGraphTarget(c.dataform.ActionConfig.Target.create(e)))),this.proto.tags=t.tags,this.proto.fileName=t.filename,t.disabled&&(this.proto.disabled=t.disabled),this.query(l.nativeRequire(t.filename).query)}mapLoadMode(e,t){if(!e)return c.dataform.LoadConfiguration.create({replace:{}});switch(e.toString().toUpperCase()){case"REPLACE_TABLE":return c.dataform.LoadConfiguration.create({replace:{}});case"APPEND":return c.dataform.LoadConfiguration.create({append:{}});case"MAXIMUM":return c.dataform.LoadConfiguration.create({maximum:{columnName:this.validateLoadModeColumnName(t)}});case"UNIQUE":return c.dataform.LoadConfiguration.create({unique:{columnName:this.validateLoadModeColumnName(t)}});default:throw new Error(`LoadMode value "${e}" is not supported`)}}validateLoadModeColumnName(e){if(!e||""===e)throw new Error("columnName is required for MAXIMUM and UNIQUE load modes.");return e}}t.DataPreparation=u;class p{constructor(e,t=!1){this.dataPreparation=e,this.isIncremental=t,this.EXPECT=" /* @@VALIDATION */ WHERE "}config(e){return this.dataPreparation.config(e),""}self(){return this.resolve(this.dataPreparation.getTarget())}name(){return this.dataPreparation.session.finalizeName(this.dataPreparation.getTarget().name)}ref(e,...t){return e=l.toResolvable(e,t),l.resolvableAsTarget(e)?(this.dataPreparation.dependencies(e),this.resolve(e)):(this.dataPreparation.session.compileError(new Error("Action name is not specified")),"")}resolve(e,...t){return this.dataPreparation.session.resolve(e,...t)}schema(){return this.dataPreparation.session.finalizeSchema(this.dataPreparation.getTarget().schema)}database(){return this.dataPreparation.getTarget().database?this.dataPreparation.session.finalizeDatabase(this.dataPreparation.getTarget().database):(this.dataPreparation.session.compileError(new Error("Warehouse does not support multiple databases")),"")}when(e,t,r=""){return e?t:r}incremental(){return!!this.isIncremental}dependencies(e){return this.dataPreparation.dependencies(e),""}apply(e){return"function"==typeof e?e(this):e}}t.DataPreparationContext=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version="3.0.16"},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(17),i=n(r(4)),a=r(48),s=["self","ref","resolve","name","when","incremental","schema","database"].map(e=>`const ${e} = ctx.${e} ? ctx.${e}.bind(ctx) : undefined;`).join("\n"),l=["EXPECT"].map(e=>`const ${e} = ctx.${e} ? ctx.${e} : undefined;`).join("\n");function c(e){const t=[""];return e.forEach(e=>{"string"==typeof e||e.type!==a.SyntaxTreeNodeType.SQL_STATEMENT_SEPARATOR?t[t.length-1]+=function(e){if("string"==typeof e)return u.get(a.SyntaxTreeNodeType.SQL_LITERAL_STRING)(e);return e.concatenate(u)}(e):t.push("")}),t}t.INVALID_YAML_ERROR_STRING="is not a valid YAML file",t.compile=function(e,r){if("sqlx"===i.fileExtension(r))return function(e,t){const{config:r,js:n,sql:o,incremental:u,preOperations:p,postOperations:d,inputs:f}=function(e){let t="",r="";e.children().filter(a.SyntaxTreeNode.isSyntaxTreeNode).filter(e=>e.type===a.SyntaxTreeNodeType.JAVASCRIPT).forEach(e=>{const n=e.concatenate();n.startsWith("config")?t=n.slice("config ".length):r+=n.slice("js {".length,-1*"}".length)});const n=c(e.children().filter(e=>"string"==typeof e||[a.SyntaxTreeNodeType.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER,a.SyntaxTreeNodeType.SQL_COMMENT,a.SyntaxTreeNodeType.SQL_LITERAL_STRING,a.SyntaxTreeNodeType.SQL_LITERAL_MULTILINE_STRING,a.SyntaxTreeNodeType.SQL_STATEMENT_SEPARATOR].includes(e.type)));let o="",i=[],s=[];const l=[];return e.children().filter(a.SyntaxTreeNode.isSyntaxTreeNode).filter(e=>e.type===a.SyntaxTreeNodeType.SQL).forEach(e=>{const t=e.children()[0],r=e.children().slice(-1)[0],n=c((1===e.children().length?new a.SyntaxTreeNode(a.SyntaxTreeNodeType.SQL,[t.slice(t.indexOf("{")+1,t.lastIndexOf("}"))]):new a.SyntaxTreeNode(a.SyntaxTreeNodeType.SQL,[t.slice(t.indexOf("{")+1),...e.children().slice(1,-1),r.slice(0,r.lastIndexOf("}"))])).children());if(t.startsWith("incremental_where")){if(n.length>1)throw new Error("'incremental_where' code blocks may only contain a single SQL statement.");o=n[0]}else if(t.startsWith("pre_operations"))i=n;else if(t.startsWith("post_operations"))s=n;else if(t.startsWith("input")){if(n.length>1)throw new Error("'input' code blocks may only contain a single SQL statement.");const e=t.slice(t.indexOf('"'),t.lastIndexOf('"')+1).split(",").map(e=>e.trim().slice(1,-1));l.push({labelParts:e,value:n[0]})}}),{config:t,js:r,sql:n,incremental:o,preOperations:i,postOperations:s,inputs:l}}(e);return`dataform.sqlxAction({\n sqlxConfig: {\n name: "${i.escapedBasename(t)}",\n type: "operations",\n ...${r||"{}"}\n },\n sqlStatementCount: ${o.length},\n sqlContextable: (ctx) => {\n ${s}\n ${l}\n ${n}\n return [${o.map(e=>`\`${e}\``)}];\n },\n incrementalWhereContextable: ${u?`(ctx) => {\n ${s}\n ${l}\n ${n}\n return \`${u}\`\n }`:"undefined"},\n preOperationsContextable: ${p.length>0?`(ctx) => {\n ${s}\n ${l}\n ${n}\n return [${p.map(e=>`\`${e}\``)}];\n }`:"undefined"},\n postOperationsContextable: ${d.length>0?`(ctx) => {\n ${s}\n ${l}\n ${n}\n return [${d.map(e=>`\`${e}\``)}];\n }`:"undefined"},\n inputContextables: [\n ${f.map(({labelParts:e,value:t})=>`{\n refName: [${e.map(e=>`"${e}"`).join(", ")}],\n contextable: (ctx) => {\n ${n}\n return \`${t}\`;\n }\n }`).join(",")}\n ]\n});\n`}(a.SyntaxTreeNode.create(e),r);if("yaml"===i.fileExtension(r))try{const t=o.load(e);return"exports.asJson = "+JSON.stringify(t)}catch(e){if(e instanceof o.YAMLException)throw new Error(`${r} ${t.INVALID_YAML_ERROR_STRING}: ${e}`);throw e}if("ipynb"===i.fileExtension(r)){let t={};try{t=JSON.parse(e)}catch(e){throw new Error(`Error parsing ${r} as JSON: ${e}`)}return"exports.asJson = "+JSON.stringify(t)}if("sql"===i.fileExtension(r)){return`exports.query = \`${e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\${/g,"\\${")}\`;`}return e},t.extractJsBlocks=function(e){const t=[];return{sql:e.replace(/^\s*\/\*[jJ][sS]\s*[\r\n]+((?:[^*]|[\r\n]|(?:\*+(?:[^*/]|[\r\n])))*)\*+\/|^\s*\-\-[jJ][sS]\s(.*)/gm,(e,r,n)=>(r&&t.push(r),n&&t.push(n),"")).replace(/([^\\])`/g,(e,t)=>t+"\\`").trim(),js:t.map(e=>e.trim()).join("\n")}};const u=new Map([[a.SyntaxTreeNodeType.SQL_COMMENT,e=>e.replace(/`/g,"\\`").replace(/\${/g,"\\${")],[a.SyntaxTreeNodeType.SQL_LITERAL_STRING,e=>e.replace(/\\/g,"\\\\").replace(/\`/g,"\\`")],[a.SyntaxTreeNodeType.SQL_LITERAL_MULTILINE_STRING,e=>e.replace(/\\/g,"\\\\").replace(/\`/g,"\\`")]])},function(e,t,r){"use strict";var n=t;function o(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(18),n.BufferWriter=r(60),n.Reader=r(19),n.BufferReader=r(61),n.util=r(6),n.rpc=r(32),n.roots=r(33),n.configure=o,o()},function(e,t,r){"use strict";e.exports=function(e,t){var r=new Array(arguments.length-1),n=0,o=2,i=!0;for(;o<arguments.length;)r[n++]=arguments[o++];return new Promise((function(o,a){r[n]=function(e){if(i)if(i=!1,e)a(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];o.apply(null,t)}};try{e.apply(t||null,r)}catch(e){i&&(i=!1,a(e))}}))}},function(module,exports,__webpack_require__){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},function(e,t,r){"use strict";t.Service=r(62)},function(e,t,r){"use strict";e.exports={}},function(e,t,r){"use strict";e.exports=function(e){for(var t,r=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),s=e.fieldsArray.slice().sort(i.compareFieldsById),l=0;l<s.length;++l){var c=s[l].resolve(),u=e._fieldsArray.indexOf(c),p=c.resolvedType instanceof n?"int32":c.type,d=o.basic[p];t="m"+i.safeProp(c.name),c.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,c.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(c.id<<3|2)>>>0,8|o.mapKey[c.keyType],c.keyType),void 0===d?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",u,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|d,p,t),r("}")("}")):c.repeated?(r("if(%s!=null&&%s.length){",t,t),c.packed&&void 0!==o.packed[p]?r("w.uint32(%i).fork()",(c.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",p,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===d?a(r,c,u,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(c.id<<3|d)>>>0,p,t)),r("}")):(c.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,c.name),void 0===d?a(r,c,u,t):r("w.uint32(%i).%s(%s)",(c.id<<3|d)>>>0,p,t))}return r("return w")};var n=r(5),o=r(10),i=r(0);function a(e,t,r,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}},function(e,t,r){"use strict";e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var r=0;r<e.fieldsArray.length;++r){var s=e._fieldsArray[r].resolve(),l=s.resolvedType instanceof n?"int32":s.type,c="m"+i.safeProp(s.name);t("case %i: {",s.id),s.map?(t("if(%s===util.emptyObject)",c)("%s={}",c)("var c2 = r.uint32()+r.pos"),void 0!==o.defaults[s.keyType]?t("k=%j",o.defaults[s.keyType]):t("k=null"),void 0!==o.defaults[l]?t("value=%j",o.defaults[l]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",s.keyType)("case 2:"),void 0===o.basic[l]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",l),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.long[s.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',c):t("%s[k]=value",c)):s.repeated?(t("if(!(%s&&%s.length))",c,c)("%s=[]",c),void 0!==o.packed[l]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",c,l)("}else"),void 0===o.basic[l]?t(s.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",c,r):t("%s.push(r.%s())",c,l)):void 0===o.basic[l]?t(s.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",c,r):t("%s=r.%s()",c,l),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var u=e._fieldsArray[r];u.required&&t("if(!m.hasOwnProperty(%j))",u.name)("throw util.ProtocolError(%j,{instance:m})",a(u))}return t("return m")};var n=r(5),o=r(10),i=r(0);function a(e){return"missing required '"+e.name+"'"}},function(e,t,r){"use strict";e.exports=function(e){var t=o.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r=e.oneofsArray,n={};r.length&&t("var p={}");for(var l=0;l<e.fieldsArray.length;++l){var c=e._fieldsArray[l].resolve(),u="m"+o.safeProp(c.name);if(c.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",u,c.name),c.map)t("if(!util.isObject(%s))",u)("return%j",i(c,"object"))("var k=Object.keys(%s)",u)("for(var i=0;i<k.length;++i){"),s(t,c,"k[i]"),a(t,c,l,u+"[k[i]]")("}");else if(c.repeated)t("if(!Array.isArray(%s))",u)("return%j",i(c,"array"))("for(var i=0;i<%s.length;++i){",u),a(t,c,l,u+"[i]")("}");else{if(c.partOf){var p=o.safeProp(c.partOf.name);1===n[c.partOf.name]&&t("if(p%s===1)",p)("return%j",c.partOf.name+": multiple values"),n[c.partOf.name]=1,t("p%s=1",p)}a(t,c,l,u)}c.optional&&t("}")}return t("return null")};var n=r(5),o=r(0);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function a(e,t,r,o){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(%s){",o)("default:")("return%j",i(t,"enum value"));for(var a=Object.keys(t.resolvedType.values),s=0;s<a.length;++s)e("case %i:",t.resolvedType.values[a[s]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,o)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",o)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',o)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',o)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",o)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",i(t,"buffer"))}return e}function s(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",i(t,"boolean key"))}return e}},function(e,t,r){"use strict";var n=t,o=r(5),i=r(0);function a(e,t,r,n){var i=!1;if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(d%s){",n);for(var a=t.resolvedType.values,s=Object.keys(a),l=0;l<s.length;++l)a[s[l]]!==t.typeDefault||i||(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',n,n,n),t.repeated||e("break"),i=!0),e("case%j:",s[l])("case %i:",a[s[l]])("m%s=%j",n,a[s[l]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var c=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,c)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length >= 0)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function s(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,r,n,n,r,n,n):e("d%s=types[%i].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,n,n,n,i?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}n.fromObject=function(e){var t=e.fieldsArray,r=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var n=0;n<t.length;++n){var s=t[n].resolve(),l=i.safeProp(s.name);s.map?(r("if(d%s){",l)('if(typeof d%s!=="object")',l)("throw TypeError(%j)",s.fullName+": object expected")("m%s={}",l)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",l),a(r,s,n,l+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",l)("if(!Array.isArray(d%s))",l)("throw TypeError(%j)",s.fullName+": array expected")("m%s=[]",l)("for(var i=0;i<d%s.length;++i){",l),a(r,s,n,l+"[i]")("}")("}")):(s.resolvedType instanceof o||r("if(d%s!=null){",l),a(r,s,n,l),s.resolvedType instanceof o||r("}"))}return r("return m")},n.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var r=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],a=[],l=[],c=0;c<t.length;++c)t[c].partOf||(t[c].resolve().repeated?n:t[c].map?a:l).push(t[c]);if(n.length){for(r("if(o.arrays||o.defaults){"),c=0;c<n.length;++c)r("d%s=[]",i.safeProp(n[c].name));r("}")}if(a.length){for(r("if(o.objects||o.defaults){"),c=0;c<a.length;++c)r("d%s={}",i.safeProp(a[c].name));r("}")}if(l.length){for(r("if(o.defaults){"),c=0;c<l.length;++c){var u=l[c],p=i.safeProp(u.name);if(u.resolvedType instanceof o)r("d%s=o.enums===String?%j:%j",p,u.resolvedType.valuesById[u.typeDefault],u.typeDefault);else if(u.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",u.typeDefault.low,u.typeDefault.high,u.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",p)("}else")("d%s=o.longs===String?%j:%i",p,u.typeDefault.toString(),u.typeDefault.toNumber());else if(u.bytes){var d="["+Array.prototype.slice.call(u.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",p,String.fromCharCode.apply(String,u.typeDefault))("else{")("d%s=%s",p,d)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",p,p)("}")}else r("d%s=%j",p,u.typeDefault)}r("}")}var f=!1;for(c=0;c<t.length;++c){u=t[c];var h=e._fieldsArray.indexOf(u);p=i.safeProp(u.name);u.map?(f||(f=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",p,p)("d%s={}",p)("for(var j=0;j<ks2.length;++j){"),s(r,u,h,p+"[ks2[j]]")("}")):u.repeated?(r("if(m%s&&m%s.length){",p,p)("d%s=[]",p)("for(var j=0;j<m%s.length;++j){",p),s(r,u,h,p+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",p,u.name),s(r,u,h,p),u.partOf&&r("if(o.oneofs)")("d%s=%j",i.safeProp(u.partOf.name),u.name)),r("}")}return r("return d")}},function(e,t,r){"use strict";var n=t,o=r(24);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var n="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="",n="";if(t&&t.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(n);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof o){var a=e.$type.toObject(e,t);return""===r&&(r="type.googleapis.com/"),n=r+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),a["@type"]=n,a}return this.toObject(e,t)}}},function(e,t,r){"use strict";e.exports=f;var n=/[\s{}=;:[\],'"()<>]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,i=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,a=/^ *[*/]+ */,s=/^\s*\*?\/*/,l=/\n/g,c=/\s/,u=/\\(.?)/g,p={0:"\0",r:"\r",n:"\n",t:"\t"};function d(e){return e.replace(u,(function(e,t){switch(t){case"\\":case"":return t;default:return p[t]||""}}))}function f(e,t){e=e.toString();var r=0,u=e.length,p=1,f=0,h={},g=[],y=null;function m(e){return Error("illegal "+e+" (line "+p+")")}function b(t){return e.charAt(t)}function O(r,n,o){var i,c={type:e.charAt(r++),lineEmpty:!1,leading:o},u=r-(t?2:3);do{if(--u<0||"\n"===(i=e.charAt(u))){c.lineEmpty=!0;break}}while(" "===i||"\t"===i);for(var d=e.substring(r,n).split(l),g=0;g<d.length;++g)d[g]=d[g].replace(t?s:a,"").trim();c.text=d.join("\n").trim(),h[p]=c,f=p}function T(t){var r=v(t),n=e.substring(t,r);return/^\s*\/\//.test(n)}function v(e){for(var t=e;t<u&&"\n"!==b(t);)t++;return t}function w(){if(g.length>0)return g.shift();if(y)return function(){var t="'"===y?i:o;t.lastIndex=r-1;var n=t.exec(e);if(!n)throw m("string");return r=t.lastIndex,j(y),y=null,d(n[1])}();var a,s,l,f,h,w=0===r;do{if(r===u)return null;for(a=!1;c.test(l=b(r));)if("\n"===l&&(w=!0,++p),++r===u)return null;if("/"===b(r)){if(++r===u)throw m("comment");if("/"===b(r))if(t){if(f=r,h=!1,T(r-1)){h=!0;do{if((r=v(r))===u)break;if(r++,!w)break}while(T(r))}else r=Math.min(u,v(r)+1);h&&(O(f,r,w),w=!0),p++,a=!0}else{for(h="/"===b(f=r+1);"\n"!==b(++r);)if(r===u)return null;++r,h&&(O(f,r-1,w),w=!0),++p,a=!0}else{if("*"!==(l=b(r)))return"/";f=r+1,h=t||"*"===b(f);do{if("\n"===l&&++p,++r===u)throw m("comment");s=l,l=b(r)}while("*"!==s||"/"!==l);++r,h&&(O(f,r-2,w),w=!0),a=!0}}}while(a);var A=r;if(n.lastIndex=0,!n.test(b(A++)))for(;A<u&&!n.test(b(A));)++A;var P=e.substring(r,r=A);return'"'!==P&&"'"!==P||(y=P),P}function j(e){g.push(e)}function A(){if(!g.length){var e=w();if(null===e)return null;j(e)}return g[0]}return Object.defineProperty({next:w,peek:A,push:j,skip:function(e,t){var r=A();if(r===e)return w(),!0;if(!t)throw m("token '"+r+"', '"+e+"' expected");return!1},cmnt:function(e){var r,n=null;return void 0===e?(r=h[p-1],delete h[p-1],r&&(t||"*"===r.type||r.lineEmpty)&&(n=r.leading?r.text:null)):(f<e&&A(),r=h[e],delete h[e],!r||r.lineEmpty||!t&&"/"!==r.type||(n=r.leading?null:r.text)),n}},"line",{get:function(){return p}})}f.unescape=d},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(7),a=n(r(4)),s=r(2),l=r(1);class c extends i.ActionBuilder{constructor(e,t,r){if(super(e),this.proto=l.dataform.Assertion.create(),this.session=e,!t)return;const n=this.verifyConfig(t);n.name||(n.name=a.basename(n.filename));const o=s.actionConfigToCompiledGraphTarget(n);return this.proto.target=this.applySessionToTarget(o,e.projectConfig,n.filename,{validateTarget:!0,useDefaultAssertionDataset:!0}),this.proto.canonicalTarget=this.applySessionToTarget(o,e.canonicalProjectConfig,void 0,{validateTarget:!1,useDefaultAssertionDataset:!0}),r&&(n.filename=s.resolveActionsConfigFilename(n.filename,r),this.query(s.nativeRequire(n.filename).query)),n.dependencyTargets&&this.dependencies(n.dependencyTargets.map(e=>s.configTargetToCompiledGraphTarget(l.dataform.ActionConfig.Target.create(e)))),n.hermetic&&this.hermetic(n.hermetic),n.disabled&&this.disabled(),n.tags&&this.tags(n.tags),n.description&&this.description(n.description),n.project&&this.database(n.project),n.dataset&&this.schema(n.dataset),n.filename&&(this.proto.fileName=n.filename),this}query(e){return this.contextableQuery=e,this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>{const t=s.resolvableAsTarget(e);this.session.actionAssertionMap.set(t,this),this.proto.dependencyTargets.push(t)}),this}hermetic(e){this.proto.hermeticity=e?l.dataform.ActionHermeticity.HERMETIC:l.dataform.ActionHermeticity.NON_HERMETIC}disabled(e=!0){return this.proto.disabled=e,this}tags(e){return("string"==typeof e?[e]:e).forEach(e=>{this.proto.tags.indexOf(e)<0&&this.proto.tags.push(e)}),this}description(e){return this.proto.actionDescriptor={description:e},this}database(e){return this.proto.target=this.applySessionToTarget(l.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{database:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0,useDefaultAssertionDataset:!0}),this}schema(e){return this.proto.target=this.applySessionToTarget(l.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{schema:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0,useDefaultAssertionDataset:!0}),this}getFileName(){return this.proto.fileName}getTarget(){return l.dataform.Target.create(this.proto.target)}getParentAction(){return l.dataform.Target.create(this.proto.parentAction)}setParentAction(e){this.proto.parentAction=e}compile(){const e=new u(this);return this.proto.query=e.apply(this.contextableQuery),s.validateQueryString(this.session,this.proto.query,this.proto.fileName),o.verifyObjectMatchesProto(l.dataform.Assertion,this.proto,o.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}verifyConfig(e){return e.dependencies&&(e.dependencyTargets=e.dependencies.map(e=>"string"==typeof e?{name:e}:e),delete e.dependencies),e.database&&(e.project=e.database,delete e.database),e.schema&&(e.dataset=e.schema,delete e.schema),e.fileName&&(e.filename=e.fileName,delete e.fileName),e.type&&delete e.type,o.verifyObjectMatchesProto(l.dataform.ActionConfig.AssertionConfig,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK)}}t.Assertion=c;class u{constructor(e){this.assertion=e}self(){return this.resolve(this.assertion.getTarget())}name(){return this.assertion.session.finalizeName(this.assertion.getTarget().name)}ref(e,...t){return e=s.toResolvable(e,t),s.resolvableAsTarget(e)?(this.assertion.dependencies(e),this.resolve(e)):(this.assertion.session.compileError(new Error("Action name is not specified")),"")}resolve(e,...t){return this.assertion.session.resolve(e,...t)}schema(){return this.assertion.session.finalizeSchema(this.assertion.getTarget().schema)}database(){return this.assertion.getTarget().database?this.assertion.session.finalizeDatabase(this.assertion.getTarget().database):(this.assertion.session.compileError(new Error("Warehouse does not support multiple databases")),"")}dependencies(e){return this.assertion.dependencies(e),""}tags(e){return this.assertion.tags(e),""}when(e,t,r=""){return e?t:r}apply(e){return"function"==typeof e?e(this):e}}t.AssertionContext=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3),o=r(7),i=r(13),a=r(2),s=r(1);class l extends o.ActionBuilder{constructor(e,t,r){var n;if(super(e),this.proto=s.dataform.Declaration.create(),this.session=e,!t)return;const o=this.verifyConfig(t);if(!o.name)throw Error("Declarations must have a populated 'name' field.");const i=a.actionConfigToCompiledGraphTarget(o);return this.proto.target=this.applySessionToTarget(i,e.projectConfig),this.proto.canonicalTarget=this.applySessionToTarget(i,e.canonicalProjectConfig),o.description&&this.description(o.description),(null===(n=o.columns)||void 0===n?void 0:n.length)&&this.columns(o.columns.map(e=>s.dataform.ActionConfig.ColumnDescriptor.create(e))),this.proto.fileName=r,this}description(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.description=e,this}columns(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.columns=i.ColumnDescriptors.mapConfigProtoToCompilationProto(e),this}getFileName(){return this.proto.fileName}getTarget(){return s.dataform.Target.create(this.proto.target)}compile(){return n.verifyObjectMatchesProto(s.dataform.Declaration,this.proto,n.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}verifyConfig(e){return e.database&&(e.project=e.database,delete e.database),e.schema&&(e.dataset=e.schema,delete e.schema),e.columns&&(e.columns=i.ColumnDescriptors.mapLegacyObjectToConfigProto(e.columns)),e.type&&delete e.type,n.verifyObjectMatchesProto(s.dataform.ActionConfig.DeclarationConfig,e,n.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK)}}t.Declaration=l},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(7),a=n(r(4)),s=r(2),l=r(1);class c extends i.ActionBuilder{constructor(e,t,r){super(e),this.dependOnDependencyAssertions=!1,this.proto=l.dataform.Notebook.create();const n=this.verifyConfig(t);n.name||(n.name=a.basename(n.filename));const o=s.actionConfigToCompiledGraphTarget(n);n.filename=s.resolveActionsConfigFilename(n.filename,r),this.session=e,this.proto.target=this.applySessionToTarget(o,e.projectConfig,n.filename,{validateTarget:!0}),this.proto.canonicalTarget=this.applySessionToTarget(o,e.canonicalProjectConfig),this.proto.tags=n.tags,this.dependOnDependencyAssertions=n.dependOnDependencyAssertions,n.dependencyTargets&&this.dependencies(n.dependencyTargets.map(e=>s.configTargetToCompiledGraphTarget(l.dataform.ActionConfig.Target.create(e)))),this.proto.fileName=n.filename,n.disabled&&(this.proto.disabled=n.disabled);const i=s.nativeRequire(n.filename).asJson;this.proto.notebookContents=JSON.stringify(function(e,t){if(!("cells"in e))throw new Error(`Notebook at ${t} is invalid: cells field not present`);return e.cells.forEach((t,r)=>{"outputs"in t&&(t.outputs=[],e.cells[r]=t)}),e}(i,n.filename))}ipynb(e){return this.proto.notebookContents=JSON.stringify(e),this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>{const t=s.checkAssertionsForDependency(this,e);t&&this.proto.dependencyTargets.push(t)}),this}getFileName(){return this.proto.fileName}getTarget(){return l.dataform.Target.create(this.proto.target)}compile(){return o.verifyObjectMatchesProto(l.dataform.Notebook,this.proto,o.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}verifyConfig(e){return o.verifyObjectMatchesProto(l.dataform.ActionConfig.NotebookConfig,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK)}}t.Notebook=c},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(7),a=r(13),s=n(r(4)),l=r(2),c=r(1);class u extends i.ActionBuilder{constructor(e,t,r){var n;if(super(e),this.dependOnDependencyAssertions=!1,this.proto=c.dataform.Operation.create(),this.session=e,!t)return;const o=this.verifyConfig(t);o.name||(o.name=s.basename(o.filename));const i=l.actionConfigToCompiledGraphTarget(o);return this.proto.target=this.applySessionToTarget(i,e.projectConfig,o.filename,{validateTarget:!0}),this.proto.canonicalTarget=this.applySessionToTarget(i,e.canonicalProjectConfig),r&&(o.filename=l.resolveActionsConfigFilename(o.filename,r),this.queries(l.nativeRequire(o.filename).query)),o.dependOnDependencyAssertions&&this.setDependOnDependencyAssertions(o.dependOnDependencyAssertions),o.dependencyTargets&&this.dependencies(o.dependencyTargets.map(e=>l.configTargetToCompiledGraphTarget(c.dataform.ActionConfig.Target.create(e)))),void 0!==o.hermetic&&this.hermetic(o.hermetic),o.disabled&&this.disabled(),o.tags&&this.tags(o.tags),o.hasOutput&&this.hasOutput(o.hasOutput),o.description&&this.description(o.description),(null===(n=o.columns)||void 0===n?void 0:n.length)&&this.columns(o.columns.map(e=>c.dataform.ActionConfig.ColumnDescriptor.create(e))),o.project&&this.database(o.project),o.dataset&&this.schema(o.dataset),o.filename&&(this.proto.fileName=o.filename),this}queries(e){return this.contextableQueries=e,this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>{const t=l.checkAssertionsForDependency(this,e);t&&this.proto.dependencyTargets.push(t)}),this}hermetic(e){this.proto.hermeticity=e?c.dataform.ActionHermeticity.HERMETIC:c.dataform.ActionHermeticity.NON_HERMETIC}disabled(e=!0){return this.proto.disabled=e,this}tags(e){return("string"==typeof e?[e]:e).forEach(e=>{this.proto.tags.indexOf(e)<0&&this.proto.tags.push(e)}),this}hasOutput(e){return this.proto.hasOutput=e,this}description(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.description=e,this}columns(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.columns=a.ColumnDescriptors.mapConfigProtoToCompilationProto(e),this}database(e){return this.proto.target=this.applySessionToTarget(c.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{database:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}schema(e){return this.proto.target=this.applySessionToTarget(c.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{schema:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}setDependOnDependencyAssertions(e){return this.dependOnDependencyAssertions=e,this}getFileName(){return this.proto.fileName}getTarget(){return c.dataform.Target.create(this.proto.target)}getHasOutput(){return this.proto.hasOutput}compile(){var e,t;(null===(t=null===(e=this.proto.actionDescriptor)||void 0===e?void 0:e.columns)||void 0===t?void 0:t.length)>0&&!this.proto.hasOutput&&this.session.compileError(new Error("Actions of type 'operations' may only describe columns if they specify 'hasOutput: true'."),this.proto.fileName);const r=new p(this).apply(this.contextableQueries);return this.proto.queries="string"==typeof r?[r]:r,o.verifyObjectMatchesProto(c.dataform.Operation,this.proto,o.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}verifyConfig(e){return e.type&&(delete e.type,e.dependencies&&(e.dependencyTargets=e.dependencies.map(e=>"string"==typeof e?{name:e}:e),delete e.dependencies),e.database&&(e.project=e.database,delete e.database),e.schema&&(e.dataset=e.schema,delete e.schema),e.fileName&&(e.filename=e.fileName,delete e.fileName),e.columns&&(e.columns=a.ColumnDescriptors.mapLegacyObjectToConfigProto(e.columns))),o.verifyObjectMatchesProto(c.dataform.ActionConfig.OperationConfig,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK)}}t.Operation=u;class p{constructor(e){this.operation=e}self(){return this.resolve(this.operation.getTarget())}name(){return this.operation.session.finalizeName(this.operation.getTarget().name)}ref(e,...t){return e=l.toResolvable(e,t),l.resolvableAsTarget(e)?(this.operation.dependencies(e),this.resolve(e)):(this.operation.session.compileError(new Error("Action name is not specified")),"")}resolve(e,...t){return this.operation.session.resolve(e,...t)}schema(){return this.operation.session.finalizeSchema(this.operation.getTarget().schema)}database(){return this.operation.getTarget().database?this.operation.session.finalizeDatabase(this.operation.getTarget().database):(this.operation.session.compileError(new Error("Warehouse does not support multiple databases")),"")}dependencies(e){return this.operation.dependencies(e),""}tags(e){return this.operation.tags(e),""}hasOutput(e){return this.operation.hasOutput(e),""}when(e,t,r=""){return e?t:r}apply(e){return"function"==typeof e?e(this):e}}t.OperationContext=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(73);t.targetStringifier=new n.JSONObjectStringifier,t.targetAsReadableString=function(e){const t=[e.name,e.schema];return e.database&&t.push(e.database),t.reverse().join(".")}},function(e,t,r){e.exports=r(46)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(47);t.compiler=n.compiler,t.indexFileGenerator=n.indexFileGenerator,t.main=n.main,t.session=n.session,t.supportedFeatures=n.supportedFeatures,t.version=n.version},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(28);t.compiler=n.compile;const o=r(50);t.main=o.main;const i=r(70),a=r(27);t.version=a.version;const s=r(1);const l=(global._DF_SESSION||(global._DF_SESSION=new i.Session),global._DF_SESSION);t.session=l;const c=[s.dataform.SupportedFeatures.ARRAY_BUFFER_IPC];t.supportedFeatures=c,t.indexFileGenerator=function(){throw new Error("@dataform/cli ^3.0.0 required.")}},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(49)),i="sql",a="jsBlock",s="jsTemplateString",l="innerSqlBlock",c="innerSingleQuote",u="innerDoubleQuote",p="innerTripleSingleQuote",d="innerTripleDoubleQuote",f={START_CONFIG:i+"_startConfig",START_JS:i+"_startJs",START_INCREMENTAL:i+"_startIncremental",START_PRE_OPERATIONS:i+"_startPreOperations",START_POST_OPERATIONS:i+"_startPostOperations",START_INPUT:i+"_startInput",STATEMENT_SEPERATOR:i+"_statementSeparator",SINGLE_LINE_COMMENT:i+"_singleLineComment",MULTI_LINE_COMMENT:i+"_multiLineComment",START_JS_PLACEHOLDER:i+"_startJsPlaceholder",BACKTICK:i+"_backtick",START_QUOTE_SINGLE:i+"_startQuoteSingle",START_QUOTE_DOUBLE:i+"_startQuoteDouble",START_TRIPLE_QUOTE_SINGLE:i+"_startTripleQuoteSingle",START_TRIPLE_QUOTE_DOUBLE:i+"_startTripleQuoteDouble",CAPTURE_EVERYTHING_ELSE:i+"_captureEverythingElse"},h={SINGLE_LINE_COMMENT:a+"_singleLineComment",MULTI_LINE_COMMENT:a+"_multiLineComment",SINGLE_QUOTE_STRING:a+"_singleQuoteString",DOUBLE_QUOTE_STRING:a+"_doubleQuoteString",START_JS_TEMPLATE_STRING:a+"_startJsTemplateString",START_JS_BLOCK:a+"_startJsBlock",CLOSE_BLOCK:a+"_closeBlock",CAPTURE_EVERYTHING_ELSE:a+"_captureEverythingElse"},g={ESCAPED_BACKSLASH:s+"_escapedBackslash",ESCAPED_DOLLAR_BRACE:s+"_escapedDollarBrace",START_JS_BLOCK:s+"_startJsBlock",CLOSE_STRING:s+"_closeString",CAPTURE_EVERYTHING_ELSE:s+"_captureEverythingElse"},y={STATEMENT_SEPERATOR:l+"_statementSeparator",SINGLE_LINE_COMMENT:l+"_singleLineComment",MULTI_LINE_COMMENT:l+"_multiLineComment",START_JS_PLACEHOLDER:l+"_startJsPlaceholder",CLOSE_BLOCK:l+"_closeBlock",BACKTICK:l+"_backtick",START_QUOTE_SINGLE:l+"_startQuoteSingle",START_QUOTE_DOUBLE:l+"_startQuoteDouble",START_TRIPLE_QUOTE_SINGLE:l+"_startTripleQuoteSingle",START_TRIPLE_QUOTE_DOUBLE:l+"_startTripleQuoteDouble",CAPTURE_EVERYTHING_ELSE:l+"_captureEverythingElse"},m={ESCAPED_BACKSLASH:c+"_escapedBackslash",ESCAPED_QUOTE:c+"_escapedQuoteSingle",START_JS_PLACEHOLDER:c+"_startJsPlaceholder",CLOSE_QUOTE:c+"_closeQuoteSingle",CAPTURE_EVERYTHING_ELSE:c+"_captureEverythingElse"},b={ESCAPED_BACKSLASH:u+"_escapedBackslash",ESCAPED_QUOTE:u+"_escapedQuoteDouble",START_JS_PLACEHOLDER:u+"_startJsPlaceholder",CLOSE_QUOTE:u+"_closeQuoteDouble",CAPTURE_EVERYTHING_ELSE:u+"_captureEverythingElse"},O={ESCAPED_BACKSLASH:p+"_escapedBackslash",START_JS_PLACEHOLDER:p+"_startJsPlaceholder",CLOSE_QUOTE:p+"_closeTripleQuoteSingle",CAPTURE_EVERYTHING_ELSE:p+"_captureEverythingElse"},T={ESCAPED_BACKSLASH:d+"_escapedBackslash",START_JS_PLACEHOLDER:d+"_startJsPlaceholder",CLOSE_QUOTE:d+"_closeTripleQuoteDouble",CAPTURE_EVERYTHING_ELSE:d+"_captureEverythingElse"},v=o.states(function(){const e={};e[f.START_CONFIG]={match:"config {",push:a},e[f.START_JS]={match:"js {",push:a},e[f.START_INCREMENTAL]={match:"incremental_where {",push:l},e[f.START_PRE_OPERATIONS]={match:"pre_operations {",push:l},e[f.START_POST_OPERATIONS]={match:"post_operations {",push:l},e[f.START_INPUT]={match:/input "[a-zA-Z0-9_-]+"(?:,\s*"[a-zA-Z0-9_-]+")* {/,push:l},e[f.STATEMENT_SEPERATOR]=/[^\S\r\n]*---[^\S\r\n]*$/,e[f.SINGLE_LINE_COMMENT]=/--.*?$/,e[f.MULTI_LINE_COMMENT]=/\/\*[\s\S]*?\*\//,e[f.START_JS_PLACEHOLDER]={match:"${",push:a},e[f.BACKTICK]="`",e[f.START_TRIPLE_QUOTE_SINGLE]={match:"'''",push:p},e[f.START_TRIPLE_QUOTE_DOUBLE]={match:'"""',push:d},e[f.START_QUOTE_SINGLE]={match:"'",push:c},e[f.START_QUOTE_DOUBLE]={match:'"',push:u},e[f.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const t={};t[h.SINGLE_LINE_COMMENT]=/\/\/.*?$/,t[h.MULTI_LINE_COMMENT]=/\/\*[\s\S]*?\*\//,t[h.SINGLE_QUOTE_STRING]=/'(?:\\['\\]|[^\n'\\])*'/,t[h.DOUBLE_QUOTE_STRING]=/"(?:\\["\\]|[^\n"\\])*"/,t[h.START_JS_TEMPLATE_STRING]={match:"`",push:s},t[h.START_JS_BLOCK]={match:"{",push:a},t[h.CLOSE_BLOCK]={match:"}",pop:1},t[h.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const r={};r[g.ESCAPED_BACKSLASH]=/\\\\/,r[g.ESCAPED_DOLLAR_BRACE]=/\\\${`/,r[g.START_JS_BLOCK]={match:"${",push:a},r[g.CLOSE_STRING]={match:"`",pop:1},r[g.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const n={};n[y.STATEMENT_SEPERATOR]=/[^\S\r\n]*---[^\S\r\n]*$/,n[y.SINGLE_LINE_COMMENT]=/--.*?$/,n[y.MULTI_LINE_COMMENT]=/\/\*[\s\S]*?\*\//,n[y.START_JS_PLACEHOLDER]={match:"${",push:a},n[y.CLOSE_BLOCK]={match:"}",pop:1},n[y.BACKTICK]="`",n[y.START_TRIPLE_QUOTE_SINGLE]={match:"'''",push:p},n[y.START_TRIPLE_QUOTE_DOUBLE]={match:'"""',push:d},n[y.START_QUOTE_SINGLE]={match:"'",push:c},n[y.START_QUOTE_DOUBLE]={match:'"',push:u},n[y.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const o={};o[m.ESCAPED_BACKSLASH]="\\\\",o[m.ESCAPED_QUOTE]="\\'",o[m.START_JS_PLACEHOLDER]={match:"${",push:a},o[m.CLOSE_QUOTE]={match:"'",pop:1},o[m.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const v={};v[b.ESCAPED_BACKSLASH]="\\\\",v[b.ESCAPED_QUOTE]={match:'\\"'},o[b.START_JS_PLACEHOLDER]={match:"${",push:a},v[b.CLOSE_QUOTE]={match:'"',pop:1},v[b.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const w={};w[O.ESCAPED_BACKSLASH]="\\\\",w[O.START_JS_PLACEHOLDER]={match:"${",push:a},w[O.CLOSE_QUOTE]={match:"'''",pop:1},w[O.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const j={};j[T.ESCAPED_BACKSLASH]="\\\\",j[T.START_JS_PLACEHOLDER]={match:"${",push:a},j[T.CLOSE_QUOTE]={match:'"""',pop:1},j[T.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const A={};return A[i]=e,A[a]=t,A[s]=r,A[l]=n,A[c]=o,A[u]=v,A[p]=w,A[d]=j,A}());var w;!function(e){e[e.JAVASCRIPT=0]="JAVASCRIPT",e[e.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER=1]="JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER",e[e.SQL=2]="SQL",e[e.SQL_COMMENT=3]="SQL_COMMENT",e[e.SQL_LITERAL_STRING=4]="SQL_LITERAL_STRING",e[e.SQL_LITERAL_MULTILINE_STRING=5]="SQL_LITERAL_MULTILINE_STRING",e[e.SQL_STATEMENT_SEPARATOR=6]="SQL_STATEMENT_SEPARATOR"}(w=t.SyntaxTreeNodeType||(t.SyntaxTreeNodeType={}));const j=new Map([[f.START_CONFIG,w.JAVASCRIPT],[f.START_INCREMENTAL,w.SQL],[f.START_INPUT,w.SQL],[f.START_JS,w.JAVASCRIPT],[f.START_JS_PLACEHOLDER,w.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER],[f.START_POST_OPERATIONS,w.SQL],[f.START_PRE_OPERATIONS,w.SQL],[f.START_QUOTE_SINGLE,w.SQL_LITERAL_STRING],[f.START_QUOTE_DOUBLE,w.SQL_LITERAL_STRING],[f.START_TRIPLE_QUOTE_SINGLE,w.SQL_LITERAL_MULTILINE_STRING],[f.START_TRIPLE_QUOTE_DOUBLE,w.SQL_LITERAL_MULTILINE_STRING],[h.START_JS_BLOCK,w.JAVASCRIPT],[g.START_JS_BLOCK,w.JAVASCRIPT],[y.START_JS_PLACEHOLDER,w.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER],[y.START_QUOTE_SINGLE,w.SQL_LITERAL_STRING],[y.START_QUOTE_DOUBLE,w.SQL_LITERAL_STRING],[y.START_TRIPLE_QUOTE_SINGLE,w.SQL_LITERAL_MULTILINE_STRING],[y.START_TRIPLE_QUOTE_DOUBLE,w.SQL_LITERAL_MULTILINE_STRING],[m.START_JS_PLACEHOLDER,w.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER],[b.START_JS_PLACEHOLDER,w.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER],[O.START_JS_PLACEHOLDER,w.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER],[T.START_JS_PLACEHOLDER,w.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER]]),A=new Set([h.CLOSE_BLOCK,y.CLOSE_BLOCK,m.CLOSE_QUOTE,b.CLOSE_QUOTE,O.CLOSE_QUOTE,T.CLOSE_QUOTE]),P=new Map([[f.MULTI_LINE_COMMENT,w.SQL_COMMENT],[f.SINGLE_LINE_COMMENT,w.SQL_COMMENT],[f.STATEMENT_SEPERATOR,w.SQL_STATEMENT_SEPARATOR],[y.MULTI_LINE_COMMENT,w.SQL_COMMENT],[y.SINGLE_LINE_COMMENT,w.SQL_COMMENT],[y.STATEMENT_SEPERATOR,w.SQL_STATEMENT_SEPARATOR]]);class C{constructor(e,t=[]){this.type=e,this.allChildren=t}static create(e){const t=new C(w.SQL);let r=t;const n=[r];v.reset(e);for(const e of v){if(!e.type)throw new Error("Undefined token type encountered.");if(j.has(e.type)){const t=j.get(e.type);if(t===w.SQL&&r.type!==w.SQL)throw new Error("SQL syntax tree nodes may only be children of other SQL nodes.");const o=new C(t,[e.value]);n.push(o),r.push(o),r=o}else A.has(e.type)?(r.push(e.value),n.pop(),r=n[n.length-1]):P.has(e.type)?r.push(new C(P.get(e.type)).push(e.value)):r.push(e.value)}return t}static isSyntaxTreeNode(e){return"string"!=typeof e}children(){return this.allChildren.slice()}concatenate(e){const t=(null==e?void 0:e.has(this.type))?e.get(this.type):e=>e;return this.allChildren.map(e=>"string"==typeof e?t(e):e.concatenate()).join("")}push(e){return this.allChildren.length>0&&"string"==typeof e&&"string"==typeof this.allChildren[this.allChildren.length-1]?(this.allChildren[this.allChildren.length-1]=this.allChildren[this.allChildren.length-1]+e,this):(this.allChildren.push(e),this)}equals(e){if(this.type!==e.type)return!1;if(this.allChildren.length!==e.children().length)return!1;return!this.allChildren.some((t,r)=>{return n=t,o=e.children()[r],!(typeof n==typeof o&&("string"==typeof n||"string"==typeof o?n===o:n.equals(o)));var n,o})}}t.SyntaxTreeNode=C},function(e,t,r){var n,o,i;o=[],void 0===(i="function"==typeof(n=function(){"use strict";var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r="boolean"==typeof(new RegExp).sticky;function n(e){return e&&"[object RegExp]"===t.call(e)}function o(e){return e&&"object"==typeof e&&!n(e)&&!Array.isArray(e)}function i(e){return"("+e+")"}function a(e){return e.length?"(?:"+e.map((function(e){return"(?:"+e+")"})).join("|")+")":"(?!)"}function s(e){if("string"==typeof e)return"(?:"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")";if(n(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function l(t,r){if(o(r)||(r={match:r}),r.include)throw new Error("Matching rules cannot also include states");var i={defaultType:t,lineBreaks:!!r.error||!!r.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var a in r)e.call(r,a)&&(i[a]=r[a]);if("string"==typeof i.type&&t!==i.type)throw new Error("Type transform cannot be a string (type '"+i.type+"' for token '"+t+"')");var s=i.match;return i.match=Array.isArray(s)?s:s?[s]:[],i.match.sort((function(e,t){return n(e)&&n(t)?0:n(t)?-1:n(e)?1:t.length-e.length})),i}function c(e){return Array.isArray(e)?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if(n.include)for(var o=[].concat(n.include),i=0;i<o.length;i++)t.push({include:o[i]});else{if(!n.type)throw new Error("Rule has no type: "+JSON.stringify(n));t.push(l(n.type,n))}}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),r=[],n=0;n<t.length;n++){var i=t[n],a=e[i],s=[].concat(a);if("include"!==i){var c=[];s.forEach((function(e){o(e)?(c.length&&r.push(l(i,c)),r.push(l(i,e)),c=[]):c.push(e)})),c.length&&r.push(l(i,c))}else for(var u=0;u<s.length;u++)r.push({include:s[u]})}return r}(e)}var u=l("error",{lineBreaks:!0,shouldThrow:!0});function p(e,t){for(var o=null,l=Object.create(null),c=!0,p=null,d=[],f=[],h=0;h<e.length;h++)e[h].fallback&&(c=!1);for(h=0;h<e.length;h++){var g=e[h];if(g.include)throw new Error("Inheritance is not allowed in stateless lexers");if(g.error||g.fallback){if(o)throw!g.fallback==!o.fallback?new Error("Multiple "+(g.fallback?"fallback":"error")+" rules not allowed (for token '"+g.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+g.defaultType+"')");o=g}var y=g.match.slice();if(c)for(;y.length&&"string"==typeof y[0]&&1===y[0].length;)l[y.shift().charCodeAt(0)]=g;if(g.pop||g.push||g.next){if(!t)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+g.defaultType+"')");if(g.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+g.defaultType+"')")}if(0!==y.length){c=!1,d.push(g);for(var m=0;m<y.length;m++){var b=y[m];if(n(b))if(null===p)p=b.unicode;else if(p!==b.unicode&&!1===g.fallback)throw new Error("If one rule is /u then all must be")}var O=a(y.map(s)),T=new RegExp(O);if(T.test(""))throw new Error("RegExp matches empty string: "+T);if(new RegExp("|"+O).exec("").length-1>0)throw new Error("RegExp has capture groups: "+T+"\nUse (?: … ) instead");if(!g.lineBreaks&&T.test("\n"))throw new Error("Rule should declare lineBreaks: "+T);f.push(i(O))}}var v=o&&o.fallback,w=r&&!v?"ym":"gm",j=r||v?"":"|";return!0===p&&(w+="u"),{regexp:new RegExp(a(f)+j,w),groups:d,fast:l,error:o||u}}function d(e,t,r){var n=e&&(e.push||e.next);if(n&&!r[n])throw new Error("Missing state '"+n+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var f=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};f.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},f.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedThrow:this.queuedThrow}},f.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},f.prototype.popState=function(){this.setState(this.stack.pop())},f.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var h=r?function(e,t){return e.exec(t)}:function(e,t){var r=e.exec(t);return 0===r[0].length?null:r};function g(){return this.value}if(f.prototype._getGroup=function(e){for(var t=this.groups.length,r=0;r<t;r++)if(void 0!==e[r+1])return this.groups[r];throw new Error("Cannot find token type for matched text")},f.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var r=this.buffer;if(e!==r.length){if(a=this.fast[r.charCodeAt(e)])return this._token(a,r.charAt(e),e);var n=this.re;n.lastIndex=e;var o=h(n,r),i=this.error;if(null==o)return this._token(i,r.slice(e,r.length),e);var a=this._getGroup(o),s=o[0];return i.fallback&&o.index!==e?(this.queuedGroup=a,this.queuedText=s,this._token(i,r.slice(e,o.index),e)):this._token(a,s,e)}},f.prototype._token=function(e,t,r){var n=0;if(e.lineBreaks){var o=/\n/g,i=1;if("\n"===t)n=1;else for(;o.exec(t);)n++,i=o.lastIndex}var a={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:g,offset:r,lineBreaks:n,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=n,0!==n?this.col=s-i+1:this.col+=s,e.shouldThrow)throw new Error(this.formatError(a,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),a},"undefined"!=typeof Symbol&&Symbol.iterator){var y=function(e){this.lexer=e};y.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},y.prototype[Symbol.iterator]=function(){return this},f.prototype[Symbol.iterator]=function(){return new y(this)}}return f.prototype.formatError=function(e,t){if(null==e){var r=this.buffer.slice(this.index);e={text:r,offset:this.index,lineBreaks:-1===r.indexOf("\n")?0:1,line:this.line,col:this.col}}var n=Math.max(0,e.offset-e.col+1),o=e.lineBreaks?e.text.indexOf("\n"):e.text.length,i=this.buffer.substring(n,e.offset+o);return t+=" at line "+e.line+" col "+e.col+":\n\n",t+=" "+i+"\n",t+=" "+Array(e.col).join(" ")+"^"},f.prototype.clone=function(){return new f(this.states,this.state)},f.prototype.has=function(e){return!0},{compile:function(e){var t=p(c(e));return new f({start:t},"start")},states:function(e,t){var r=e.$all?c(e.$all):[];delete e.$all;var n=Object.getOwnPropertyNames(e);t||(t=n[0]);for(var o=Object.create(null),i=0;i<n.length;i++){var a=n[i];o[a]=c(e[a]).concat(r)}for(i=0;i<n.length;i++){a=n[i];for(var s=o[a],l=Object.create(null),u=0;u<s.length;u++){var h=s[u];if(h.include){var g=[u,1];if(h.include!==a&&!l[h.include]){l[h.include]=!0;var y=o[h.include];if(!y)throw new Error("Cannot include nonexistent state '"+h.include+"' (in state '"+a+"')");for(var m=0;m<y.length;m++){var b=y[m];-1===s.indexOf(b)&&g.push(b)}}s.splice.apply(s,g),u--}}}var O=Object.create(null);for(i=0;i<n.length;i++)a=n[i],O[a]=p(o[a],!0);for(i=0;i<n.length;i++){var T=n[i],v=O[T],w=v.groups;for(u=0;u<w.length;u++)d(w[u],T,O);var j=Object.getOwnPropertyNames(v.fast);for(u=0;u<j.length;u++)d(v.fast[j[u]],T,O)}return new f(O,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t=Object.create(null),r=Object.create(null),n=Object.getOwnPropertyNames(e),o=0;o<n.length;o++){var i=n[o],a=e[i];(Array.isArray(a)?a:[a]).forEach((function(e){if((r[e.length]=r[e.length]||[]).push(e),"string"!=typeof e)throw new Error("keyword must be string (in keyword '"+i+"')");t[e]=i}))}function s(e){return JSON.stringify(e)}var l="";for(var c in l+="switch (value.length) {\n",r){var u=r[c];l+="case "+c+":\n",l+="switch (value) {\n",u.forEach((function(e){var r=t[e];l+="case "+s(e)+": return "+s(r)+"\n"})),l+="}\n"}return l+="}\n",Function("value",l)}}})?n.apply(t,o):n)||(e.exports=i)},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(40),a=r(26),s=r(41),l=r(14),c=r(42),u=r(43),p=r(15),d=r(16),f=n(r(4)),h=r(2),g=r(69),y=r(1);t.main=function(e){var t;const r=global;let n;n="string"==typeof e?o.decode64(y.dataform.CoreExecutionRequest,e):y.dataform.CoreExecutionRequest.decode(e);const m=n.compile;let b=g.readWorkflowSettings();const O=null!==(t=m.compileConfig.projectConfigOverride)&&void 0!==t?t:{};b=y.dataform.ProjectConfig.create(Object.assign(Object.assign(Object.assign({},b),O),{vars:Object.assign(Object.assign({},b.vars),O.vars)}));const T=h.nativeRequire("@dataform/core").session;T.init(m.compileConfig.projectDir,b,b),r.dataform=T;const v={};m.compileConfig.filePaths.filter(e=>e.startsWith("includes"+f.separator)).filter(e=>2===e.split(f.separator).length).filter(e=>"js"===f.fileExtension(e)).forEach(e=>{try{v[f.basename(e)]=h.nativeRequire(e)}catch(t){T.compileError(t,e)}}),Object.assign(r,v),r.publish=T.publish.bind(T),r.operate=T.operate.bind(T),r.assert=T.assert.bind(T),r.declare=T.declare.bind(T),r.notebook=T.notebook.bind(T),r.test=T.test.bind(T),function(e,t){t.filter(e=>e.startsWith("definitions"+f.separator)&&"actions"===f.basename(e)&&"yaml"===f.fileExtension(e)).sort().forEach(t=>{(function(e,t){let r={};try{r=h.nativeRequire(t).asJson}catch(r){e.compileError(r,t)}return o.verifyObjectMatchesProto(y.dataform.ActionConfigs,r,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK),y.dataform.ActionConfigs.fromObject(r)})(e,t).actions.forEach(r=>{const n=y.dataform.ActionConfig.create(r);if(n.table)e.actions.push(new p.Table(e,y.dataform.ActionConfig.TableConfig.create(n.table),t));else if(n.view)e.actions.push(new d.View(e,y.dataform.ActionConfig.ViewConfig.create(n.view),t));else if(n.incrementalTable)e.actions.push(new l.IncrementalTable(e,y.dataform.ActionConfig.IncrementalTableConfig.create(n.incrementalTable),t));else if(n.assertion)e.actions.push(new i.Assertion(e,y.dataform.ActionConfig.AssertionConfig.create(n.assertion),t));else if(n.operation)e.actions.push(new u.Operation(e,y.dataform.ActionConfig.OperationConfig.create(n.operation),t));else if(n.declaration)e.actions.push(new s.Declaration(e,y.dataform.ActionConfig.DeclarationConfig.create(n.declaration)));else if(n.notebook)e.actions.push(new c.Notebook(e,y.dataform.ActionConfig.NotebookConfig.create(n.notebook),t));else{if(!n.dataPreparation)throw Error("Empty action configs are not permitted.");e.actions.push(new a.DataPreparation(e,y.dataform.ActionConfig.DataPreparationConfig.create(n.dataPreparation),t))}})})}(T,m.compileConfig.filePaths),m.compileConfig.filePaths.filter(e=>e.startsWith("definitions"+f.separator)).filter(e=>"js"===f.fileExtension(e)||"sqlx"===f.fileExtension(e)).sort().forEach(e=>{try{h.nativeRequire(e)}catch(t){T.compileError(t,e)}});const w=y.dataform.CoreExecutionResponse.create({compile:{compiledGraph:T.compile()}});return"string"==typeof e?o.encode64(y.dataform.CoreExecutionResponse,w):y.dataform.CoreExecutionResponse.encode(w).finish()}},function(e,t,r){"use strict";e.exports=r(52)},function(e,t,r){"use strict";var n=e.exports=r(53);n.build="full",n.tokenize=r(39),n.parse=r(66),n.common=r(67),n.Root._configure(n.Type,n.parse,n.common)},function(e,t,r){"use strict";var n=e.exports=r(29);n.build="light",n.load=function(e,t,r){return"function"==typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)},n.loadSync=function(e,t){return t||(t=new n.Root),t.loadSync(e)},n.encoder=r(34),n.decoder=r(35),n.verifier=r(36),n.converter=r(37),n.ReflectionObject=r(9),n.Namespace=r(11),n.Root=r(25),n.Enum=r(5),n.Type=r(20),n.Field=r(8),n.OneOf=r(12),n.MapField=r(21),n.Service=r(22),n.Method=r(23),n.Message=r(24),n.wrappers=r(38),n.types=r(10),n.util=r(0),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},function(e,t,r){"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var o=new Array(64),i=new Array(123),a=0;a<64;)i[o[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;n.encode=function(e,t,r){for(var n,i=null,a=[],s=0,l=0;t<r;){var c=e[t++];switch(l){case 0:a[s++]=o[c>>2],n=(3&c)<<4,l=1;break;case 1:a[s++]=o[n|c>>4],n=(15&c)<<2,l=2;break;case 2:a[s++]=o[n|c>>6],a[s++]=o[63&c],l=0}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),s=0)}return l&&(a[s++]=o[n],a[s++]=61,1===l&&(a[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,a.slice(0,s))),i.join("")):String.fromCharCode.apply(String,a.slice(0,s))};n.decode=function(e,t,r){for(var n,o=r,a=0,s=0;s<e.length;){var l=e.charCodeAt(s++);if(61===l&&a>1)break;if(void 0===(l=i[l]))throw Error("invalid encoding");switch(a){case 0:n=l,a=1;break;case 1:t[r++]=n<<2|(48&l)>>4,n=l,a=2;break;case 2:t[r++]=(15&n)<<4|(60&l)>>2,n=l,a=3;break;case 3:t[r++]=(3&n)<<6|l,a=0}}if(1===a)throw Error("invalid encoding");return r-o},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},function(e,t,r){"use strict";function n(){this._listeners={}}e.exports=n,n.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},n.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},function(e,t,r){"use strict";function n(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3]}function i(e,n,o){t[0]=e,n[o]=r[3],n[o+1]=r[2],n[o+2]=r[1],n[o+3]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function s(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?o:i,e.writeFloatBE=n?i:o,e.readFloatLE=n?a:s,e.readFloatBE=n?s:a}():function(){function t(e,t,r,n){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,r,n)}}function r(e,t,r){var n=e(t,r),o=2*(n>>31)+1,i=n>>>23&255,a=8388607&n;return 255===i?a?NaN:o*(1/0):0===i?1401298464324817e-60*o*a:o*Math.pow(2,i-150)*(a+8388608)}e.writeFloatLE=t.bind(null,o),e.writeFloatBE=t.bind(null,i),e.readFloatLE=r.bind(null,a),e.readFloatBE=r.bind(null,s)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3],n[o+4]=r[4],n[o+5]=r[5],n[o+6]=r[6],n[o+7]=r[7]}function i(e,n,o){t[0]=e,n[o]=r[7],n[o+1]=r[6],n[o+2]=r[5],n[o+3]=r[4],n[o+4]=r[3],n[o+5]=r[2],n[o+6]=r[1],n[o+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?o:i,e.writeDoubleBE=n?i:o,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,o,i){var a=n<0?1:0;if(a&&(n=-n),0===n)e(0,o,i+t),e(1/n>0?0:2147483648,o,i+r);else if(isNaN(n))e(0,o,i+t),e(2146959360,o,i+r);else if(n>17976931348623157e292)e(0,o,i+t),e((a<<31|2146435072)>>>0,o,i+r);else{var s;if(n<22250738585072014e-324)e((s=n/5e-324)>>>0,o,i+t),e((a<<31|s/4294967296)>>>0,o,i+r);else{var l=Math.floor(Math.log(n)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(s=n*Math.pow(2,-l))>>>0,o,i+t),e((a<<31|l+1023<<20|1048576*s&1048575)>>>0,o,i+r)}}}function r(e,t,r,n,o){var i=e(n,o+t),a=e(n,o+r),s=2*(a>>31)+1,l=a>>>20&2047,c=4294967296*(1048575&a)+i;return 2047===l?c?NaN:s*(1/0):0===l?5e-324*s*c:s*Math.pow(2,l-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,o,0,4),e.writeDoubleBE=t.bind(null,i,4,0),e.readDoubleLE=r.bind(null,a,0,4),e.readDoubleBE=r.bind(null,s,4,0)}(),e}function o(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function i(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function a(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function s(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=n(n)},function(e,t,r){"use strict";var n=t;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){if(r-t<1)return"";for(var n,o=null,i=[],a=0;t<r;)(n=e[t++])<128?i[a++]=n:n>191&&n<224?i[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[a++]=55296+(n>>10),i[a++]=56320+(1023&n)):i[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0);return o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))},n.write=function(e,t,r){for(var n,o,i=r,a=0;a<e.length;++a)(n=e.charCodeAt(a))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(o=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&o),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n=r||8192,o=n>>>1,i=null,a=n;return function(r){if(r<1||r>o)return e(r);a+r>n&&(i=e(n),a=0);var s=t.call(i,a,a+=r);return 7&a&&(a=1+(7|a)),s}}},function(e,t,r){"use strict";e.exports=o;var n=r(6);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var a=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new o(r,n)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(n.isString(e)){if(!n.Long)return o.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;o.fromHash=function(e){return e===a?i:new o((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},function(e,t,r){"use strict";e.exports=i;var n=r(18);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(6);function i(){n.call(this)}function a(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},i.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},i._configure()},function(e,t,r){"use strict";e.exports=i;var n=r(19);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(6);function i(e){n.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},function(e,t,r){"use strict";e.exports=o;var n=r(6);function o(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(o.prototype=Object.create(n.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,r,o,i,a){if(!i)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,r,o,i);if(s.rpcImpl)try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,r){if(e)return s.emit("error",e,t),a(e);if(null!==r){if(!(r instanceof o))try{r=o[s.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",r,t),a(null,r)}s.end(!0)}))}catch(e){return s.emit("error",e,t),void setTimeout((function(){a(e)}),0)}else setTimeout((function(){a(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},function(e,t,r){"use strict";function n(e,t){"string"==typeof e&&(t=e,e=void 0);var r=[];function o(e){if("string"!=typeof e){var t=i();if(n.verbose&&console.log("codegen: "+t),t="return "+t,e){for(var a=Object.keys(e),s=new Array(a.length+1),l=new Array(a.length),c=0;c<a.length;)s[c]=a[c],l[c]=e[a[c++]];return s[c]=t,Function.apply(null,s).apply(null,l)}return Function(t)()}for(var u=new Array(arguments.length-1),p=0;p<u.length;)u[p]=arguments[++p];if(p=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var r=u[p++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"})),p!==u.length)throw Error("parameter count mismatch");return r.push(e),o}function i(n){return"function "+(n||t||"")+"("+(e&&e.join(",")||"")+"){\n "+r.join("\n ")+"\n}"}return o.toString=i,o}e.exports=n,n.verbose=!1},function(e,t,r){"use strict";e.exports=i;var n=r(30),o=r(31)("fs");function i(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&o&&o.readFile?o.readFile(e,(function(n,o){return n&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,r):n?r(n):r(null,t.binary?o:o.toString("utf8"))})):i.xhr(e,t,r):n(i,this,e,t)}i.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var o=0;o<n.responseText.length;++o)e.push(255&n.responseText.charCodeAt(o))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,n.responseText)}},t.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()}},function(e,t,r){"use strict";var n=t,o=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},i=n.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=o(e),n="";r&&(n=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0&&".."!==t[i-1]?t.splice(--i,2):r?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=i(t)),o(t)?t:(r||(e=i(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?i(e+"/"+t):t)}},function(e,t,r){"use strict";e.exports=A,A.filename=null,A.defaults={keepCase:!1};var n=r(39),o=r(25),i=r(20),a=r(8),s=r(21),l=r(12),c=r(5),u=r(22),p=r(23),d=r(10),f=r(0),h=/^[1-9][0-9]*$/,g=/^-?[1-9][0-9]*$/,y=/^0[x][0-9a-fA-F]+$/,m=/^-?0[x][0-9a-fA-F]+$/,b=/^0[0-7]+$/,O=/^-?0[0-7]+$/,T=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,v=/^[a-zA-Z_][a-zA-Z_0-9]*$/,w=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,j=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function A(e,t,r){t instanceof o||(r=t,t=new o),r||(r=A.defaults);var P,C,S,E,k,x=r.preferTrailingComment||!1,N=n(e,r.alternateCommentMode||!1),D=N.next,_=N.push,q=N.peek,L=N.skip,R=N.cmnt,B=!0,M=!1,I=t,U=r.keepCase?function(e){return e}:f.camelCase;function F(e,t,r){var n=A.filename;return r||(A.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+N.line+")")}function K(){var e,t=[];do{if('"'!==(e=D())&&"'"!==e)throw F(e);t.push(D()),L(e),e=q()}while('"'===e||"'"===e);return t.join("")}function Q(e){var t=D();switch(t){case"'":case'"':return _(t),K();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e,t){var r=1;"-"===e.charAt(0)&&(r=-1,e=e.substring(1));switch(e){case"inf":case"INF":case"Inf":return r*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(h.test(e))return r*parseInt(e,10);if(y.test(e))return r*parseInt(e,16);if(b.test(e))return r*parseInt(e,8);if(T.test(e))return r*parseFloat(e);throw F(e,"number",t)}(t,!0)}catch(r){if(e&&w.test(t))return t;throw F(t,"value")}}function G(e,t){var r,n;do{!t||'"'!==(r=q())&&"'"!==r?e.push([n=J(D()),L("to",!0)?J(D()):n]):e.push(K())}while(L(",",!0));L(";")}function J(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw F(e,"id");if(g.test(e))return parseInt(e,10);if(m.test(e))return parseInt(e,16);if(O.test(e))return parseInt(e,8);throw F(e,"id")}function $(){if(void 0!==P)throw F("package");if(P=D(),!w.test(P))throw F(P,"name");I=I.define(P),L(";")}function V(){var e,t=q();switch(t){case"weak":e=S||(S=[]),D();break;case"public":D();default:e=C||(C=[])}t=K(),L(";"),e.push(t)}function W(){if(L("="),E=K(),!(M="proto3"===E)&&"proto2"!==E)throw F(E,"syntax");L(";")}function H(e,t){switch(t){case"option":return ee(e,t),L(";"),!0;case"message":return Y(e,t),!0;case"enum":return X(e,t),!0;case"service":return function(e,t){if(!v.test(t=D()))throw F(t,"service name");var r=new u(t);z(r,(function(e){if(!H(r,e)){if("rpc"!==e)throw F(e);!function(e,t){var r=R(),n=t;if(!v.test(t=D()))throw F(t,"name");var o,i,a,s,l=t;L("("),L("stream",!0)&&(i=!0);if(!w.test(t=D()))throw F(t);o=t,L(")"),L("returns"),L("("),L("stream",!0)&&(s=!0);if(!w.test(t=D()))throw F(t);a=t,L(")");var c=new p(l,n,o,a,i,s);c.comment=r,z(c,(function(e){if("option"!==e)throw F(e);ee(c,e),L(";")})),e.add(c)}(r,e)}})),e.add(r)}(e,t),!0;case"extend":return function(e,t){if(!w.test(t=D()))throw F(t,"reference");var r=t;z(null,(function(t){switch(t){case"required":case"repeated":Z(e,t,r);break;case"optional":Z(e,M?"proto3_optional":"optional",r);break;default:if(!M||!w.test(t))throw F(t);_(t),Z(e,"optional",r)}}))}(e,t),!0}return!1}function z(e,t,r){var n=N.line;if(e&&("string"!=typeof e.comment&&(e.comment=R()),e.filename=A.filename),L("{",!0)){for(var o;"}"!==(o=D());)t(o);L(";",!0)}else r&&r(),L(";"),e&&("string"!=typeof e.comment||x)&&(e.comment=R(n)||e.comment)}function Y(e,t){if(!v.test(t=D()))throw F(t,"type name");var r=new i(t);z(r,(function(e){if(!H(r,e))switch(e){case"map":!function(e){L("<");var t=D();if(void 0===d.mapKey[t])throw F(t,"type");L(",");var r=D();if(!w.test(r))throw F(r,"type");L(">");var n=D();if(!v.test(n))throw F(n,"name");L("=");var o=new s(U(n),J(D()),t,r);z(o,(function(e){if("option"!==e)throw F(e);ee(o,e),L(";")}),(function(){ne(o)})),e.add(o)}(r);break;case"required":case"repeated":Z(r,e);break;case"optional":Z(r,M?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!v.test(t=D()))throw F(t,"name");var r=new l(U(t));z(r,(function(e){"option"===e?(ee(r,e),L(";")):(_(e),Z(r,"optional"))})),e.add(r)}(r,e);break;case"extensions":G(r.extensions||(r.extensions=[]));break;case"reserved":G(r.reserved||(r.reserved=[]),!0);break;default:if(!M||!w.test(e))throw F(e);_(e),Z(r,"optional")}})),e.add(r)}function Z(e,t,r){var n=D();if("group"!==n){for(;n.endsWith(".")||q().startsWith(".");)n+=D();if(!w.test(n))throw F(n,"type");var o=D();if(!v.test(o))throw F(o,"name");o=U(o),L("=");var s=new a(o,J(D()),n,t,r);if(z(s,(function(e){if("option"!==e)throw F(e);ee(s,e),L(";")}),(function(){ne(s)})),"proto3_optional"===t){var c=new l("_"+o);s.setOption("proto3_optional",!0),c.add(s),e.add(c)}else e.add(s);M||!s.repeated||void 0===d.packed[n]&&void 0!==d.basic[n]||s.setOption("packed",!1,!0)}else!function(e,t){var r=D();if(!v.test(r))throw F(r,"name");var n=f.lcFirst(r);r===n&&(r=f.ucFirst(r));L("=");var o=J(D()),s=new i(r);s.group=!0;var l=new a(n,o,r,t);l.filename=A.filename,z(s,(function(e){switch(e){case"option":ee(s,e),L(";");break;case"required":case"repeated":Z(s,e);break;case"optional":Z(s,M?"proto3_optional":"optional");break;case"message":Y(s,e);break;case"enum":X(s,e);break;default:throw F(e)}})),e.add(s).add(l)}(e,t)}function X(e,t){if(!v.test(t=D()))throw F(t,"name");var r=new c(t);z(r,(function(e){switch(e){case"option":ee(r,e),L(";");break;case"reserved":G(r.reserved||(r.reserved=[]),!0);break;default:!function(e,t){if(!v.test(t))throw F(t,"name");L("=");var r=J(D(),!0),n={options:void 0,setOption:function(e,t){void 0===this.options&&(this.options={}),this.options[e]=t}};z(n,(function(e){if("option"!==e)throw F(e);ee(n,e),L(";")}),(function(){ne(n)})),e.add(t,r,n.comment,n.options)}(r,e)}})),e.add(r)}function ee(e,t){var r=L("(",!0);if(!w.test(t=D()))throw F(t,"name");var n,o=t,i=o;r&&(L(")"),i=o="("+o+")",t=q(),j.test(t)&&(n=t.slice(1),o+=t,D())),L("="),function(e,t,r,n){e.setParsedOption&&e.setParsedOption(t,r,n)}(e,i,te(e,o),n)}function te(e,t){if(L("{",!0)){for(var r={};!L("}",!0);){if(!v.test(k=D()))throw F(k,"name");if(null===k)throw F(k,"end of input");var n,o=k;if(L(":",!0),"{"===q())n=te(e,t+"."+k);else if("["===q()){var i;if(n=[],L("[",!0)){do{i=Q(!0),n.push(i)}while(L(",",!0));L("]"),void 0!==i&&re(e,t+"."+k,i)}}else n=Q(!0),re(e,t+"."+k,n);var a=r[o];a&&(n=[].concat(a).concat(n)),r[o]=n,L(",",!0),L(";",!0)}return r}var s=Q(!0);return re(e,t,s),s}function re(e,t,r){e.setOption&&e.setOption(t,r)}function ne(e){if(L("[",!0)){do{ee(e,"option")}while(L(",",!0));L("]")}return e}for(;null!==(k=D());)switch(k){case"package":if(!B)throw F(k);$();break;case"import":if(!B)throw F(k);V();break;case"syntax":if(!B)throw F(k);W();break;case"option":ee(I,k),L(";");break;default:if(H(I,k)){B=!1;continue}throw F(k)}return A.filename=null,{package:P,imports:C,weakImports:S,syntax:E,root:t}}},function(e,t,r){"use strict";e.exports=i;var n,o=/\/|\./;function i(e,t){o.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),i[e]=t}i("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),i("duration",{Duration:n={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),i("timestamp",{Timestamp:n}),i("empty",{Empty:{fields:{}}}),i("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),i("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),i("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),i.get=function(e){return i[e]||null}},function(e,t,r){"use strict";e.exports=r(29)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(17),o=r(3),i=r(28),a=r(27),s=r(1),l=require;function c(e){var t;try{return l(e)}catch(e){if(e instanceof SyntaxError||e instanceof n.YAMLException)throw e;if(null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.includes(i.INVALID_YAML_ERROR_STRING))throw e;return}}function u(e){const t=s.dataform.ProjectConfig.create();return e.defaultProject&&(t.defaultDatabase=e.defaultProject),e.defaultDataset&&(t.defaultSchema=e.defaultDataset),e.defaultLocation&&(t.defaultLocation=e.defaultLocation),e.defaultAssertionDataset&&(t.assertionSchema=e.defaultAssertionDataset),e.vars&&(t.vars=e.vars),e.projectSuffix&&(t.databaseSuffix=e.projectSuffix),e.datasetSuffix&&(t.schemaSuffix=e.datasetSuffix),e.namePrefix&&(t.tablePrefix=e.namePrefix),e.defaultNotebookRuntimeOptions&&(t.defaultNotebookRuntimeOptions={},e.defaultNotebookRuntimeOptions.outputBucket&&(t.defaultNotebookRuntimeOptions.outputBucket=e.defaultNotebookRuntimeOptions.outputBucket),e.defaultNotebookRuntimeOptions.runtimeTemplateName&&(t.defaultNotebookRuntimeOptions.runtimeTemplateName=e.defaultNotebookRuntimeOptions.runtimeTemplateName)),t.warehouse="bigquery",t}t.readWorkflowSettings=function(){const e=c("workflow_settings.yaml"),t=c("dataform.json");if(e&&t)throw Error("dataform.json has been deprecated and cannot be defined alongside workflow_settings.yaml");if(e){const t=e.asJson;if(!t)throw Error("workflow_settings.yaml is invalid");return u(function(e){let t=s.dataform.WorkflowSettings.create();try{t=s.dataform.WorkflowSettings.create(o.verifyObjectMatchesProto(s.dataform.WorkflowSettings,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK))}catch(e){if(e instanceof ReferenceError)throw ReferenceError("Workflow settings error: "+e.message);throw e}if(t.dataformCoreVersion&&t.dataformCoreVersion!==a.version)throw Error("Version mismatch: workflow settings specifies version "+t.dataformCoreVersion+`, but ${a.version} was found`);return t}(t))}if(t)try{return s.dataform.ProjectConfig.create(o.verifyObjectMatchesProto(s.dataform.ProjectConfig,t))}catch(e){if(e instanceof ReferenceError)throw ReferenceError("Dataform json error: "+e.message);throw e}throw Error("Failed to resolve workflow_settings.yaml")},t.workflowSettingsAsProjectConfig=u},function(e,t,r){"use strict";(function(e){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(71)),a=r(3),s=r(40),l=r(26),c=r(41),u=r(14),p=r(42),d=r(43),f=r(15),h=r(72),g=r(16),y=r(74),m=r(44),b=o(r(2)),O=r(2),T=r(27),v=r(1),w={defaultSchema:"dataform",assertionSchema:"dataform_assertions"};function j(e){return"view"===e||"table"===e||"incremental"===e}t.Session=class{constructor(e,t,r){this.actionAssertionMap=new A([]),this.init(e,t,r)}init(e,t,r){this.rootDir=e,this.projectConfig=v.dataform.ProjectConfig.create(t||w),this.canonicalProjectConfig=function(e){return v.dataform.ProjectConfig.create({warehouse:e.warehouse,defaultSchema:e.defaultSchema,defaultDatabase:e.defaultDatabase,assertionSchema:e.assertionSchema})}(v.dataform.ProjectConfig.create(r||t||w)),this.actions=[],this.tests={},this.graphErrors={compilationErrors:[]}}compilationSql(){return new y.CompilationSql(this.projectConfig,T.version)}sqlxAction(e){const{sqlxConfig:t}=e,r=t.hasOwnProperty("type")?t.type:"operations";switch(e.sqlStatementCount>1&&"operations"!==r&&this.compileError("Actions may only contain more than one SQL statement if they are of type 'operations'."),t.hasOwnProperty("protected")&&"incremental"!==r&&this.compileError("Actions may only specify 'protected: true' if they are of type 'incremental'."),e.incrementalWhereContextable&&"incremental"!==r&&this.compileError("Actions may only include incremental_where if they are of type 'incremental'."),t.hasOwnProperty("schema")||"declaration"!==r||this.compileError("Actions of type 'declaration' must specify a value for 'schema'."),e.inputContextables.length>0&&"test"!==r&&this.compileError("Actions may only include input blocks if they are of type 'test'."),e.preOperationsContextable&&!j(r)&&this.compileError("Actions may only include pre_operations if they create a dataset."),e.postOperationsContextable&&!j(r)&&this.compileError("Actions may only include post_operations if they create a dataset."),r){case"view":t.filename=b.getCallerFile(this.rootDir);const r=new g.View(this,t).query(t=>e.sqlContextable(t)[0]);e.incrementalWhereContextable&&r.where(e.incrementalWhereContextable),e.preOperationsContextable&&r.preOps(e.preOperationsContextable),e.postOperationsContextable&&r.postOps(e.postOperationsContextable),this.actions.push(r);break;case"incremental":t.filename=b.getCallerFile(this.rootDir);const n=new u.IncrementalTable(this,t).query(t=>e.sqlContextable(t)[0]);e.incrementalWhereContextable&&n.where(e.incrementalWhereContextable),e.preOperationsContextable&&n.preOps(e.preOperationsContextable),e.postOperationsContextable&&n.postOps(e.postOperationsContextable),this.actions.push(n);break;case"table":t.filename=b.getCallerFile(this.rootDir);const o=new f.Table(this,t).query(t=>e.sqlContextable(t)[0]);e.incrementalWhereContextable&&o.where(e.incrementalWhereContextable),e.preOperationsContextable&&o.preOps(e.preOperationsContextable),e.postOperationsContextable&&o.postOps(e.postOperationsContextable),this.actions.push(o);break;case"assertion":t.filename=b.getCallerFile(this.rootDir),this.actions.push(new s.Assertion(this,t).query(t=>e.sqlContextable(t)[0]));break;case"dataPreparation":t.filename=b.getCallerFile(this.rootDir);const i=new l.DataPreparation(this,t).query(t=>e.sqlContextable(t)[0]);this.actions.push(i);break;case"operations":t.filename=b.getCallerFile(this.rootDir),this.actions.push(new d.Operation(this,t).queries(e.sqlContextable));break;case"declaration":const a=new c.Declaration(this,t,b.getCallerFile(this.rootDir));this.actions.push(a);break;case"test":const p=this.test(t.name).config(t).expect(t=>e.sqlContextable(t)[0]);e.inputContextables.forEach(({refName:e,contextable:t})=>{p.input(e,t)});break;default:throw new Error("Unrecognized action type: "+t.type)}}resolve(e,...t){e=O.toResolvable(e,t);const r=this.indexedActions.find(b.resolvableAsTarget(e));if(r.length>1)return this.compileError(new Error(b.ambiguousActionNameMsg(e,r))),"";const n=r.length>0?r[0]:void 0;return n&&n instanceof d.Operation&&!n.getHasOutput()?(this.compileError(new Error("Actions cannot resolve operations which do not produce output.")),""):n?n instanceof c.Declaration?this.compilationSql().resolveTarget(n.getTarget()):this.compilationSql().resolveTarget(Object.assign(Object.assign({},n.getTarget()),{database:n.getTarget().database&&this.finalizeDatabase(n.getTarget().database),schema:this.finalizeSchema(n.getTarget().schema),name:this.finalizeName(n.getTarget().name)})):(this.compileError(new Error("Could not resolve "+JSON.stringify(e))),"")}operate(e,t){const r=b.getCallerFile(this.rootDir);let n;return t&&"object"==typeof t?n=new d.Operation(this,Object.assign({name:e,filename:r},t)):(n=new d.Operation(this,{name:e,filename:r}),t&&n.queries(t)),this.actions.push(n),n}publish(e,t){const r=b.getCallerFile(this.rootDir);let n=new g.View(this,{type:"view",name:e,filename:r});if(t)if("object"==typeof t)if("view"===(null==t?void 0:t.type)||void 0===t.type)n=new g.View(this,Object.assign({type:"view",name:e,filename:r},t));else if("incremental"===(null==t?void 0:t.type))n=new u.IncrementalTable(this,Object.assign(Object.assign({type:"incremental",name:e},t),{filename:r}));else{if("table"!==(null==t?void 0:t.type))throw Error("Unrecognized table type: "+t.type);n=new f.Table(this,Object.assign({type:"table",name:e,filename:r},t))}else n.query(t);return this.actions.push(n),n}assert(e,t){const r=b.getCallerFile(this.rootDir);let n;return t&&"object"==typeof t?n=new s.Assertion(this,Object.assign({name:e,filename:r},t)):(n=new s.Assertion(this,{name:e,filename:r}),t&&n.query(t)),this.actions.push(n),n}declare(e){const t=new c.Declaration(this,e,b.getCallerFile(this.rootDir));return this.actions.push(t),t}test(e){const t=new h.Test(this,{name:e});return t.session=this,t.setFilename(b.getCallerFile(this.rootDir)),this.tests[e]=t,t}notebook(e){const t=b.getCallerFile(this.rootDir),r=new p.Notebook(this,e,t);return this.actions.push(r),r}compileError(t,r,n){const o=r||b.getCallerFile(this.rootDir)||e,i=v.dataform.CompilationError.create({fileName:o,actionName:n?m.targetAsReadableString(n):void 0,actionTarget:n});"string"==typeof t?i.message=t:(i.message=t.message,i.stack=t.stack),this.graphErrors.compilationErrors.push(i)}compile(){if(this.indexedActions=new A(this.actions),"bigquery"!==this.projectConfig.warehouse&&""!==this.projectConfig.warehouse||this.projectConfig.defaultLocation||this.compileError("A defaultLocation is required for BigQuery. This can be configured in workflow_settings.yaml.","workflow_settings.yaml"),this.projectConfig.vars&&!Object.values(this.projectConfig.vars).every(e=>"string"==typeof e))throw new Error("Custom variables defined in workflow settings can only be strings.");const e=v.dataform.CompiledGraph.create({projectConfig:this.projectConfig,tables:this.compileGraphChunk(this.actions.filter(e=>e instanceof f.Table||e instanceof g.View||e instanceof u.IncrementalTable)),operations:this.compileGraphChunk(this.actions.filter(e=>e instanceof d.Operation)),assertions:this.compileGraphChunk(this.actions.filter(e=>e instanceof s.Assertion)),declarations:this.compileGraphChunk(this.actions.filter(e=>e instanceof c.Declaration)),tests:this.compileGraphChunk(Object.values(this.tests)),notebooks:this.compileGraphChunk(this.actions.filter(e=>e instanceof p.Notebook)),dataPreparations:this.compileGraphChunk(this.actions.filter(e=>e instanceof l.DataPreparation)),graphErrors:this.graphErrors,dataformCoreVersion:T.version,targets:this.actions.map(e=>e.getTarget())});return this.fullyQualifyDependencies([].concat(e.tables,e.assertions,e.operations,e.notebooks,e.dataPreparations)),this.alterActionName([].concat(e.tables,e.assertions,e.operations,e.notebooks,e.dataPreparations),[].concat(e.declarations.map(e=>e.target))),this.removeNonUniqueActionsFromCompiledGraph(e),this.checkTestNameUniqueness(e.tests),this.checkCircularity([].concat(e.tables,e.assertions,e.operations,e.notebooks,e.dataPreparations)),a.verifyObjectMatchesProto(v.dataform.CompiledGraph,e,a.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM),e}compileToBase64(){return a.encode64(v.dataform.CompiledGraph,this.compile())}finalizeDatabase(e){return`${e}${this.getDatabaseSuffixWithUnderscore()}`}finalizeSchema(e){return`${e}${this.getSchemaSuffixWithUnderscore()}`}finalizeName(e){return`${this.getTablePrefixWithUnderscore()}${e}`}getDatabaseSuffixWithUnderscore(){return this.projectConfig.databaseSuffix?"_"+this.projectConfig.databaseSuffix:""}getSchemaSuffixWithUnderscore(){return this.projectConfig.schemaSuffix?"_"+this.projectConfig.schemaSuffix:""}getTablePrefixWithUnderscore(){return this.projectConfig.tablePrefix?this.projectConfig.tablePrefix+"_":""}compileGraphChunk(e){const t=[];return e.forEach(e=>{try{const r=e.compile();t.push(r)}catch(t){this.compileError(t,e.getFileName(),e.getTarget())}}),t}fullyQualifyDependencies(e){e.forEach(e=>{const t={};if(!(e instanceof v.dataform.Declaration)&&e.dependencyTargets){for(const r of e.dependencyTargets){const n=this.indexedActions.find(r);if(0===n.length)this.compileError(new Error(`Missing dependency detected: Action "${m.targetAsReadableString(e.target)}" depends on "${b.stringifyResolvable(r)}" which does not exist`),e.fileName,e.target);else if(1===n.length){const e=n[0].getTarget();t[m.targetAsReadableString(e)]=e,r.includeDependentAssertions&&this.actionAssertionMap.find(r).forEach(e=>t[m.targetAsReadableString(e.getTarget())]=e.getTarget())}else this.compileError(new Error(b.ambiguousActionNameMsg(r,n)),e.fileName,e.target)}e.dependencyTargets=Object.values(t)}})}alterActionName(e,t){const{tablePrefix:r,schemaSuffix:n,databaseSuffix:o}=this.projectConfig;if(!r&&!n&&!o)return;const i=new Map;t.forEach(e=>i.set(m.targetStringifier.stringify(e),e)),e.forEach(e=>{i.set(m.targetStringifier.stringify(e.target),Object.assign(Object.assign({},e.target),{database:e.target.database&&`${e.target.database}${this.getDatabaseSuffixWithUnderscore()}`,schema:`${e.target.schema}${this.getSchemaSuffixWithUnderscore()}`,name:`${this.getTablePrefixWithUnderscore()}${e.target.name}`})),e.target=i.get(m.targetStringifier.stringify(e.target))});const a=e=>i.has(m.targetStringifier.stringify(e))?i.get(m.targetStringifier.stringify(e)):e;e.forEach(e=>{e instanceof v.dataform.Declaration||(e.dependencyTargets=(e.dependencyTargets||[]).map(a)),e instanceof v.dataform.Assertion&&e.parentAction&&(e.parentAction=a(e.parentAction))})}checkTestNameUniqueness(e){const t=[];e.forEach(e=>{t.includes(e.name)&&this.compileError(new Error(`Duplicate test name detected: "${e.name}"`),e.fileName),t.push(e.name)})}checkCircularity(e){const t=new Map(e.map(e=>[m.targetStringifier.stringify(e.target),e])),r=new i.default;e.forEach(e=>{const n=(e instanceof v.dataform.Declaration||!e.dependencyTargets?[]:e.dependencyTargets).filter(e=>!!t.get(m.targetStringifier.stringify(e)));r.add(m.targetStringifier.stringify(e.target),n.map(e=>m.targetStringifier.stringify(e)))});r.getCycles().forEach(e=>{const r=t.get(e[0].name),n=`Circular dependency detected in chain: [${e.map(e=>e.name).join(" > ")} > ${m.targetAsReadableString(r.target)}]`;this.compileError(new Error(n),r.fileName,r.target)})}removeNonUniqueActionsFromCompiledGraph(e){function t(e){const t=new Set,r=new Set;return e.forEach(e=>{t.has(m.targetStringifier.stringify(e))&&r.add(m.targetStringifier.stringify(e)),t.add(m.targetStringifier.stringify(e))}),r}const r=[].concat(e.tables,e.assertions,e.operations,e.declarations,e.notebooks,e.dataPreparations),n=t(r.map(e=>e.target)),o=t(r.map(e=>e.canonicalTarget)),i=e=>{const t=n.has(m.targetStringifier.stringify(e.target)),r=o.has(m.targetStringifier.stringify(e.canonicalTarget));return t&&this.compileError(new Error(`Duplicate action name detected. Names within a schema must be unique across tables, declarations, assertions, and operations:\n"${JSON.stringify(e.target)}"`),e.fileName,e.target),r&&this.compileError(new Error(`Duplicate canonical target detected. Canonical targets must be unique across tables, declarations, assertions, and operations:\n"${JSON.stringify(e.canonicalTarget)}"`),e.fileName,e.target),!t&&!r};e.tables=e.tables.filter(i),e.operations=e.operations.filter(i),e.declarations=e.declarations.filter(i),e.assertions=e.assertions.filter(i),e.notebooks=e.notebooks.filter(i),e.dataPreparations=e.dataPreparations.filter(i)}};class A{constructor(e){this.byName=new Map,this.bySchemaAndName=new Map,this.byDatabaseAndName=new Map,this.byDatabaseSchemaAndName=new Map;for(const t of e)this.set(t.getTarget(),t)}set(e,t){if(this.setByNameLevel(this.byName,e.name,t),e.schema&&this.setBySchemaLevel(this.bySchemaAndName,e,t),e.database){this.byDatabaseAndName.has(e.database)||this.byDatabaseAndName.set(e.database,new Map);const r=this.byDatabaseAndName.get(e.database);if(this.setByNameLevel(r,e.name,t),e.schema){this.byDatabaseSchemaAndName.has(e.database)||this.byDatabaseSchemaAndName.set(e.database,new Map);const r=this.byDatabaseSchemaAndName.get(e.database);this.setBySchemaLevel(r,e,t)}}}find(e){var t,r,n,o;return e.database?e.schema?(null===(r=null===(t=this.byDatabaseSchemaAndName.get(e.database))||void 0===t?void 0:t.get(e.schema))||void 0===r?void 0:r.get(e.name))||[]:(null===(n=this.byDatabaseAndName.get(e.database))||void 0===n?void 0:n.get(e.name))||[]:e.schema?(null===(o=this.bySchemaAndName.get(e.schema))||void 0===o?void 0:o.get(e.name))||[]:this.byName.get(e.name)||[]}setByNameLevel(e,t,r){e.has(t)||e.set(t,[]),e.get(t).push(r)}setBySchemaLevel(e,t,r){e.has(t.schema)||e.set(t.schema,new Map);const n=e.get(t.schema);this.setByNameLevel(n,t.name,r)}}}).call(this,"/index.js")},function(e,t){class r{constructor(e,t){this.name=e,this.successors=t,this.reset()}reset(){this.index=-1,this.lowLink=-1,this.onStack=!1,this.visited=!1}}class n{constructor(){this.vertices={}}add(e,t){const n=(t=Array.isArray(t)?t:[t]).map(e=>(this.vertices[e]||(this.vertices[e]=new r(e,[])),this.vertices[e]));return this.vertices[e]||(this.vertices[e]=new r(e)),this.vertices[e].successors=n.concat([]).reverse(),this}reset(){Object.keys(this.vertices).forEach(e=>{this.vertices[e].reset()})}addAndVerify(e,t){this.add(e,t);const r=this.getCycles();if(r.length){let e=`Detected ${r.length} cycle${1===r.length?"":"s"}:`;e+="\n"+r.map(e=>{const t=e.map(e=>e.name);return` ${t.join(" -> ")} -> ${t[0]}`}).join("\n");const t=new Error(e);throw t.cycles=r,t}return this}dfs(e,t){this.reset();const r=[this.vertices[e]];let n;for(;n=r.pop();)n.visited||(t(n),n.visited=!0,n.successors.forEach(e=>r.push(e)))}getDescendants(e){const t=[];let r=!0;return this.dfs(e,e=>{r?r=!1:t.push(e.name)}),t}hasCycle(){return this.getCycles().length>0}getStronglyConnectedComponents(){const e=Object.keys(this.vertices).map(e=>(this.vertices[e].reset(),this.vertices[e]));let t=0;const r=[],n=[],o=e=>{if(e.index=t,e.lowLink=t,t++,r.push(e),e.onStack=!0,e.successors.forEach(t=>{t.index<0?(o(t),e.lowLink=Math.min(e.lowLink,t.lowLink)):t.onStack&&(e.lowLink=Math.min(e.lowLink,t.index))}),e.lowLink===e.index){const t=[];let o;do{o=r.pop(),o.onStack=!1,t.push(o)}while(o!==e);n.push(t)}};return e.forEach((function(e){e.index<0&&o(e)})),n}getCycles(){return this.getStronglyConnectedComponents().filter(e=>{if(e.length>1)return!0;const t=e[0];return t&&t.successors.some(e=>e===t)})}clone(){const e=new n;return Object.keys(this.vertices).forEach(t=>{const r=this.vertices[t];e.add(r.name,r.successors.map(e=>e.name))}),e}toDot(){const e=this.vertices,t=["digraph {"];return this.getCycles().forEach((e,r)=>{t.push(" subgraph cluster"+r+" {"),t.push(" color=red;"),t.push(" "+e.map(e=>e.name).join("; ")+";"),t.push(" }")}),Object.keys(e).forEach(r=>{const n=e[r];n.successors.length&&n.successors.forEach(e=>{t.push(` ${n.name} -> ${e.name}`)})}),t.push("}"),t.join("\n")+"\n"}}e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3),o=r(7),i=r(14),a=r(15),s=r(16),l=r(44),c=r(2),u=r(1),p=c.strictKeysOf()(["type","dataset","name"]);class d extends o.ActionBuilder{constructor(e,t){super(e),this.contextableInputs=new Map,this.proto=u.dataform.Test.create(),this.session=e,t&&this.config(t)}config(e){return c.checkExcessProperties(e=>this.session.compileError(e),e,p,"test config"),e.name&&(this.proto.name=e.name),e.dataset&&this.dataset(e.dataset),this}dataset(e){return this.datasetToTest=e,this}input(e,t){return this.contextableInputs.set(l.targetStringifier.stringify(c.resolvableAsTarget(c.toResolvable(e))),t),this}expect(e){return this.contextableQuery=e,this}getFileName(){return this.proto.fileName}getTarget(){}setFilename(e){this.proto.fileName=e}compile(){const e=new f(this);if(this.datasetToTest){const t=this.session.indexedActions.find(c.resolvableAsTarget(this.datasetToTest));t.length>1&&this.session.compileError(new Error(c.ambiguousActionNameMsg(this.datasetToTest,t)),this.proto.fileName);const r=t.length>0?t[0]:void 0;if(r&&(r instanceof a.Table||r instanceof s.View))if(r instanceof i.IncrementalTable)this.session.compileError(new Error("Running tests on incremental datasets is not yet supported."),this.proto.fileName);else{const t=new h(e);this.proto.testQuery=t.apply(r.contextableQuery)}else this.session.compileError(new Error(`Dataset ${c.stringifyResolvable(this.datasetToTest)} could not be found.`),this.proto.fileName)}else this.session.compileError(new Error("Tests must operate upon a specified dataset."),this.proto.fileName);return this.proto.expectedOutputQuery=e.apply(this.contextableQuery),n.verifyObjectMatchesProto(u.dataform.Test,this.proto,n.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}}t.Test=d;class f{constructor(e){this.test=e}apply(e){return"function"==typeof e?e(this):e}}t.TestContext=f;class h{constructor(e){this.testContext=e}ref(e,...t){return this.resolve(e,...t)}resolve(e,...t){const r=c.resolvableAsTarget(c.toResolvable(e,t));return this.testContext.test.contextableInputs.has(l.targetStringifier.stringify(r))?`(${this.testContext.apply(this.testContext.test.contextableInputs.get(l.targetStringifier.stringify(r)))})`:(this.testContext.test.session.compileError(new Error(`Input for dataset "${JSON.stringify(r)}" has not been provided. Provided inputs: ${Array.from(this.testContext.test.contextableInputs.keys()).map(e=>JSON.stringify(e))}`)),"")}apply(e){return"function"==typeof e?e(this):e}config(e){return""}self(){return""}name(){return""}type(e){return""}schema(){return""}database(){return""}where(e){return""}when(e,t,r=""){return e?t:r}incremental(){return!1}preOps(e){return""}postOps(e){return""}disabled(){return""}dependencies(e){return""}tags(e){return""}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.JSONObjectStringifier=class{stringify(e){return JSON.stringify(Object.keys(e).sort().reduce((t,r)=>Object.assign(Object.assign({},t),{[r]:e[r]}),{}))}parse(e){return JSON.parse(e)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CompilationSql=class{constructor(e,t){this.project=e,this.dataformCoreVersion=t}resolveTarget(e){const t=e.database||this.project.defaultDatabase;return t?`\`${t}.${e.schema||this.project.defaultSchema}.${e.name}\``:`\`${e.schema||this.project.defaultSchema}.${e.name}\``}sqlString(e){return`'${e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}indexAssertion(e,t){const r=t.join(", ");return`\nSELECT\n *\nFROM (\n SELECT\n ${r},\n COUNT(1) AS index_row_count\n FROM ${e}\n GROUP BY ${r}\n ) AS data\nWHERE index_row_count > 1\n`}rowConditionsAssertion(e,t){return t.map(t=>`\nSELECT\n ${this.sqlString(t)} AS failing_row_condition,\n *\nFROM ${e}\nWHERE NOT (${t})\n`).join("UNION ALL")}}}]);
17
+ function n(e){return null==e}r.r(t),r.d(t,"CORE_SCHEMA",(function(){return rt})),r.d(t,"DEFAULT_SCHEMA",(function(){return nt})),r.d(t,"FAILSAFE_SCHEMA",(function(){return et})),r.d(t,"JSON_SCHEMA",(function(){return tt})),r.d(t,"Schema",(function(){return Xe})),r.d(t,"Type",(function(){return Ze})),r.d(t,"YAMLException",(function(){return st})),r.d(t,"dump",(function(){return at})),r.d(t,"load",(function(){return ot})),r.d(t,"loadAll",(function(){return it})),r.d(t,"safeDump",(function(){return pt})),r.d(t,"safeLoad",(function(){return ct})),r.d(t,"safeLoadAll",(function(){return ut})),r.d(t,"types",(function(){return lt}));var o={isNothing:n,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:n(e)?[]:[e]},repeat:function(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var r,n,o,i;if(t)for(r=0,n=(i=Object.keys(t)).length;r<n;r+=1)e[o=i[r]]=t[o];return e}};function i(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+="\n\n"+e.mark.snippet),n+" "+r):n}function a(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=i(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,a.prototype.toString=function(e){return this.name+": "+i(this,e)};var s=a;function l(e,t,r,n,o){var i="",a="",s=Math.floor(o/2)-1;return n-t>s&&(t=n-s+(i=" ... ").length),r-n>s&&(r=n+s-(a=" ...").length),{str:i+e.slice(t,r).replace(/\t/g,"→")+a,pos:n-t+i.length}}function c(e,t){return o.repeat(" ",t-e.length)+e}var u=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],a=[],s=-1;r=n.exec(e.buffer);)a.push(r.index),i.push(r.index+r[0].length),e.position<=r.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var u,p,d="",f=Math.min(e.line+t.linesAfter,a.length).toString().length,h=t.maxLength-(t.indent+f+3);for(u=1;u<=t.linesBefore&&!(s-u<0);u++)p=l(e.buffer,i[s-u],a[s-u],e.position-(i[s]-i[s-u]),h),d=o.repeat(" ",t.indent)+c((e.line-u+1).toString(),f)+" | "+p.str+"\n"+d;for(p=l(e.buffer,i[s],a[s],e.position,h),d+=o.repeat(" ",t.indent)+c((e.line+1).toString(),f)+" | "+p.str+"\n",d+=o.repeat("-",t.indent+f+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(s+u>=a.length);u++)p=l(e.buffer,i[s+u],a[s+u],e.position-(i[s]-i[s+u]),h),d+=o.repeat(" ",t.indent)+c((e.line+u+1).toString(),f)+" | "+p.str+"\n";return d.replace(/\n$/,"")},p=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],d=["scalar","sequence","mapping"];var f=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===p.indexOf(t))throw new s('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))})),t}(t.styleAliases||null),-1===d.indexOf(this.kind))throw new s('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function h(e,t){var r=[];return e[t].forEach((function(e){var t=r.length;r.forEach((function(r,n){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=n)})),r[t]=e})),r}function g(e){return this.extend(e)}g.prototype.extend=function(e){var t=[],r=[];if(e instanceof f)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new s("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof f))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new s("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),r.forEach((function(e){if(!(e instanceof f))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var n=Object.create(g.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=h(n,"implicit"),n.compiledExplicit=h(n,"explicit"),n.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}(n.compiledImplicit,n.compiledExplicit),n};var y=g,m=new f("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),b=new f("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),O=new f("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),T=new y({explicit:[m,b,O]});var v=new f("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var w=new f("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function j(e){return 48<=e&&e<=55}function A(e){return 48<=e&&e<=57}var P=new f("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=e.length,o=0,i=!1;if(!n)return!1;if("-"!==(t=e[o])&&"+"!==t||(t=e[++o]),"0"===t){if(o+1===n)return!0;if("b"===(t=e[++o])){for(o++;o<n;o++)if("_"!==(t=e[o])){if("0"!==t&&"1"!==t)return!1;i=!0}return i&&"_"!==t}if("x"===t){for(o++;o<n;o++)if("_"!==(t=e[o])){if(!(48<=(r=e.charCodeAt(o))&&r<=57||65<=r&&r<=70||97<=r&&r<=102))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(o++;o<n;o++)if("_"!==(t=e[o])){if(!j(e.charCodeAt(o)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;o<n;o++)if("_"!==(t=e[o])){if(!A(e.charCodeAt(o)))return!1;i=!0}return!(!i||"_"===t)},construct:function(e){var t,r=e,n=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(n=-1),t=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===t){if("b"===r[1])return n*parseInt(r.slice(2),2);if("x"===r[1])return n*parseInt(r.slice(2),16);if("o"===r[1])return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!o.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),C=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var S=/^[-+]?[0-9]+e/;var E=new f("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!C.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||o.isNegativeZero(e))},represent:function(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(o.isNegativeZero(e))return"-0.0";return r=e.toString(10),S.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"}),k=T.extend({implicit:[v,w,P,E]}),x=k,N=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),D=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var _=new f("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==N.exec(e)||null!==D.exec(e))},construct:function(e){var t,r,n,o,i,a,s,l,c=0,u=null;if(null===(t=N.exec(e))&&(t=D.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,n,o));if(i=+t[4],a=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),l=new Date(Date.UTC(r,n,o,i,a,s,c)),u&&l.setTime(l.getTime()-u),l},instanceOf:Date,represent:function(e){return e.toISOString()}});var q=new f("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var R=new f("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=0,o=e.length,i=L;for(r=0;r<o;r++)if(!((t=i.indexOf(e.charAt(r)))>64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,i=L,a=0,s=[];for(t=0;t<o;t++)t%4==0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|i.indexOf(n.charAt(t));return 0===(r=o%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,r,n="",o=0,i=e.length,a=L;for(t=0;t<i;t++)t%3==0&&t&&(n+=a[o>>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]),o=(o<<8)+e[t];return 0===(r=i%3)?(n+=a[o>>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]):2===r?(n+=a[o>>10&63],n+=a[o>>4&63],n+=a[o<<2&63],n+=a[64]):1===r&&(n+=a[o>>2&63],n+=a[o<<4&63],n+=a[64],n+=a[64]),n}}),B=Object.prototype.hasOwnProperty,M=Object.prototype.toString;var I=new f("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,o,i,a=[],s=e;for(t=0,r=s.length;t<r;t+=1){if(n=s[t],i=!1,"[object Object]"!==M.call(n))return!1;for(o in n)if(B.call(n,o)){if(i)return!1;i=!0}if(!i)return!1;if(-1!==a.indexOf(o))return!1;a.push(o)}return!0},construct:function(e){return null!==e?e:[]}}),U=Object.prototype.toString;var F=new f("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,o,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(n=a[t],"[object Object]"!==U.call(n))return!1;if(1!==(o=Object.keys(n)).length)return!1;i[t]=[o[0],n[o[0]]]}return!0},construct:function(e){if(null===e)return[];var t,r,n,o,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],o=Object.keys(n),i[t]=[o[0],n[o[0]]];return i}}),K=Object.prototype.hasOwnProperty;var Q=new f("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,r=e;for(t in r)if(K.call(r,t)&&null!==r[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),G=x.extend({implicit:[_,q],explicit:[R,I,F,Q]}),J=Object.prototype.hasOwnProperty,$=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,V=/[\x85\u2028\u2029]/,W=/[,\[\]\{\}]/,H=/^(?:!|!!|![a-z\-]+!)$/i,z=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Y(e){return Object.prototype.toString.call(e)}function Z(e){return 10===e||13===e}function X(e){return 9===e||32===e}function ee(e){return 9===e||32===e||10===e||13===e}function te(e){return 44===e||91===e||93===e||123===e||125===e}function re(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function ne(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function oe(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var ie=new Array(256),ae=new Array(256),se=0;se<256;se++)ie[se]=ne(se)?1:0,ae[se]=ne(se);function le(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||G,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ce(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=u(r),new s(t,r)}function ue(e,t){throw ce(e,t)}function pe(e,t){e.onWarning&&e.onWarning.call(null,ce(e,t))}var de={YAML:function(e,t,r){var n,o,i;null!==e.version&&ue(e,"duplication of %YAML directive"),1!==r.length&&ue(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&ue(e,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),i=parseInt(n[2],10),1!==o&&ue(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&pe(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,o;2!==r.length&&ue(e,"TAG directive accepts exactly two arguments"),n=r[0],o=r[1],H.test(n)||ue(e,"ill-formed tag handle (first argument) of the TAG directive"),J.call(e.tagMap,n)&&ue(e,'there is a previously declared suffix for "'+n+'" tag handle'),z.test(o)||ue(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(t){ue(e,"tag prefix is malformed: "+o)}e.tagMap[n]=o}};function fe(e,t,r,n){var o,i,a,s;if(t<r){if(s=e.input.slice(t,r),n)for(o=0,i=s.length;o<i;o+=1)9===(a=s.charCodeAt(o))||32<=a&&a<=1114111||ue(e,"expected valid JSON character");else $.test(s)&&ue(e,"the stream contains non-printable characters");e.result+=s}}function he(e,t,r,n){var i,a,s,l;for(o.isObject(r)||ue(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,l=(i=Object.keys(r)).length;s<l;s+=1)a=i[s],J.call(t,a)||(t[a]=r[a],n[a]=!0)}function ge(e,t,r,n,o,i,a,s,l){var c,u;if(Array.isArray(o))for(c=0,u=(o=Array.prototype.slice.call(o)).length;c<u;c+=1)Array.isArray(o[c])&&ue(e,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===Y(o[c])&&(o[c]="[object Object]");if("object"==typeof o&&"[object Object]"===Y(o)&&(o="[object Object]"),o=String(o),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(i))for(c=0,u=i.length;c<u;c+=1)he(e,t,i[c],r);else he(e,t,i,r);else e.json||J.call(r,o)||!J.call(t,o)||(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,ue(e,"duplicated mapping key")),"__proto__"===o?Object.defineProperty(t,o,{configurable:!0,enumerable:!0,writable:!0,value:i}):t[o]=i,delete r[o];return t}function ye(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):ue(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function me(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);0!==o;){for(;X(o);)9===o&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!Z(o))break;for(ye(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&pe(e,"deficient indentation"),n}function be(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!ee(t)))}function Oe(e,t){1===t?e.result+=" ":t>1&&(e.result+=o.repeat("\n",t-1))}function Te(e,t){var r,n,o=e.tag,i=e.anchor,a=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ue(e,"tab characters must not be used in indentation")),45===n)&&ee(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,me(e,!0,-1)&&e.lineIndent<=t)a.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,je(e,t,3,!1,!0),a.push(e.result),me(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)ue(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=o,e.anchor=i,e.kind="sequence",e.result=a,!0)}function ve(e){var t,r,n,o,i=!1,a=!1;if(33!==(o=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&ue(e,"duplication of a tag property"),60===(o=e.input.charCodeAt(++e.position))?(i=!0,o=e.input.charCodeAt(++e.position)):33===o?(a=!0,r="!!",o=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&62!==o);e.position<e.length?(n=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):ue(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!ee(o);)33===o&&(a?ue(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),H.test(r)||ue(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),W.test(n)&&ue(e,"tag suffix cannot contain flow indicator characters")}n&&!z.test(n)&&ue(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(t){ue(e,"tag name is malformed: "+n)}return i?e.tag=n:J.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:ue(e,'undeclared tag handle "'+r+'"'),!0}function we(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&ue(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!ee(r)&&!te(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&ue(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function je(e,t,r,n,i){var a,s,l,c,u,p,d,f,h,g=1,y=!1,m=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=l=4===r||3===r,n&&me(e,!0,-1)&&(y=!0,e.lineIndent>t?g=1:e.lineIndent===t?g=0:e.lineIndent<t&&(g=-1)),1===g)for(;ve(e)||we(e);)me(e,!0,-1)?(y=!0,l=a,e.lineIndent>t?g=1:e.lineIndent===t?g=0:e.lineIndent<t&&(g=-1)):l=!1;if(l&&(l=y||i),1!==g&&4!==r||(f=1===r||2===r?t:t+1,h=e.position-e.lineStart,1===g?l&&(Te(e,h)||function(e,t,r){var n,o,i,a,s,l,c,u=e.tag,p=e.anchor,d={},f=Object.create(null),h=null,g=null,y=null,m=!1,b=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=d),c=e.input.charCodeAt(e.position);0!==c;){if(m||-1===e.firstTabInLine||(e.position=e.firstTabInLine,ue(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),i=e.line,63!==c&&58!==c||!ee(n)){if(a=e.line,s=e.lineStart,l=e.position,!je(e,r,2,!1,!0))break;if(e.line===i){for(c=e.input.charCodeAt(e.position);X(c);)c=e.input.charCodeAt(++e.position);if(58===c)ee(c=e.input.charCodeAt(++e.position))||ue(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(ge(e,d,f,h,g,null,a,s,l),h=g=y=null),b=!0,m=!1,o=!1,h=e.tag,g=e.result;else{if(!b)return e.tag=u,e.anchor=p,!0;ue(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=p,!0;ue(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(m&&(ge(e,d,f,h,g,null,a,s,l),h=g=y=null),b=!0,m=!0,o=!0):m?(m=!1,o=!0):ue(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=n;if((e.line===i||e.lineIndent>t)&&(m&&(a=e.line,s=e.lineStart,l=e.position),je(e,t,4,!0,o)&&(m?g=e.result:y=e.result),m||(ge(e,d,f,h,g,y,a,s,l),h=g=y=null),me(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&0!==c)ue(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&ge(e,d,f,h,g,null,a,s,l),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=d),b}(e,h,f))||function(e,t){var r,n,o,i,a,s,l,c,u,p,d,f,h=!0,g=e.tag,y=e.anchor,m=Object.create(null);if(91===(f=e.input.charCodeAt(e.position)))a=93,c=!1,i=[];else{if(123!==f)return!1;a=125,c=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),f=e.input.charCodeAt(++e.position);0!==f;){if(me(e,!0,t),(f=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=g,e.anchor=y,e.kind=c?"mapping":"sequence",e.result=i,!0;h?44===f&&ue(e,"expected the node content, but found ','"):ue(e,"missed comma between flow collection entries"),d=null,s=l=!1,63===f&&ee(e.input.charCodeAt(e.position+1))&&(s=l=!0,e.position++,me(e,!0,t)),r=e.line,n=e.lineStart,o=e.position,je(e,t,1,!1,!0),p=e.tag,u=e.result,me(e,!0,t),f=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==f||(s=!0,f=e.input.charCodeAt(++e.position),me(e,!0,t),je(e,t,1,!1,!0),d=e.result),c?ge(e,i,m,p,u,d,r,n,o):s?i.push(ge(e,null,m,p,u,d,r,n,o)):i.push(u),me(e,!0,t),44===(f=e.input.charCodeAt(e.position))?(h=!0,f=e.input.charCodeAt(++e.position)):h=!1}ue(e,"unexpected end of the stream within a flow collection")}(e,f)?m=!0:(s&&function(e,t){var r,n,i,a,s,l=1,c=!1,u=!1,p=t,d=0,f=!1;if(124===(a=e.input.charCodeAt(e.position)))n=!1;else{if(62!==a)return!1;n=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)1===l?l=43===a?3:2:ue(e,"repeat of a chomping mode identifier");else{if(!((i=48<=(s=a)&&s<=57?s-48:-1)>=0))break;0===i?ue(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?ue(e,"repeat of an indentation width identifier"):(p=t+i-1,u=!0)}if(X(a)){do{a=e.input.charCodeAt(++e.position)}while(X(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!Z(a)&&0!==a)}for(;0!==a;){for(ye(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndent<p)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>p&&(p=e.lineIndent),Z(a))d++;else{if(e.lineIndent<p){3===l?e.result+=o.repeat("\n",c?1+d:d):1===l&&c&&(e.result+="\n");break}for(n?X(a)?(f=!0,e.result+=o.repeat("\n",c?1+d:d)):f?(f=!1,e.result+=o.repeat("\n",d+1)):0===d?c&&(e.result+=" "):e.result+=o.repeat("\n",d):e.result+=o.repeat("\n",c?1+d:d),c=!0,u=!0,d=0,r=e.position;!Z(a)&&0!==a;)a=e.input.charCodeAt(++e.position);fe(e,r,e.position,!1)}}return!0}(e,f)||function(e,t){var r,n,o;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(fe(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,o=e.position}else Z(r)?(fe(e,n,o,!0),Oe(e,me(e,!1,t)),n=o=e.position):e.position===e.lineStart&&be(e)?ue(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);ue(e,"unexpected end of the stream within a single quoted scalar")}(e,f)||function(e,t){var r,n,o,i,a,s,l;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return fe(e,r,e.position,!0),e.position++,!0;if(92===s){if(fe(e,r,e.position,!0),Z(s=e.input.charCodeAt(++e.position)))me(e,!1,t);else if(s<256&&ie[s])e.result+=ae[s],e.position++;else if((a=120===(l=s)?2:117===l?4:85===l?8:0)>0){for(o=a,i=0;o>0;o--)(a=re(s=e.input.charCodeAt(++e.position)))>=0?i=(i<<4)+a:ue(e,"expected hexadecimal character");e.result+=oe(i),e.position++}else ue(e,"unknown escape sequence");r=n=e.position}else Z(s)?(fe(e,r,n,!0),Oe(e,me(e,!1,t)),r=n=e.position):e.position===e.lineStart&&be(e)?ue(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}ue(e,"unexpected end of the stream within a double quoted scalar")}(e,f)?m=!0:!function(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!ee(n)&&!te(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&ue(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),J.call(e.anchorMap,r)||ue(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],me(e,!0,-1),!0}(e)?function(e,t,r){var n,o,i,a,s,l,c,u,p=e.kind,d=e.result;if(ee(u=e.input.charCodeAt(e.position))||te(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(ee(n=e.input.charCodeAt(e.position+1))||r&&te(n)))return!1;for(e.kind="scalar",e.result="",o=i=e.position,a=!1;0!==u;){if(58===u){if(ee(n=e.input.charCodeAt(e.position+1))||r&&te(n))break}else if(35===u){if(ee(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&be(e)||r&&te(u))break;if(Z(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,me(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=i,e.line=s,e.lineStart=l,e.lineIndent=c;break}}a&&(fe(e,o,i,!1),Oe(e,e.line-s),o=i=e.position,a=!1),X(u)||(i=e.position+1),u=e.input.charCodeAt(++e.position)}return fe(e,o,i,!1),!!e.result||(e.kind=p,e.result=d,!1)}(e,f,1===r)&&(m=!0,null===e.tag&&(e.tag="?")):(m=!0,null===e.tag&&null===e.anchor||ue(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(m=l&&Te(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ue(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,u=e.implicitTypes.length;c<u;c+=1)if((d=e.implicitTypes[c]).resolve(e.result)){e.result=d.construct(e.result),e.tag=d.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(J.call(e.typeMap[e.kind||"fallback"],e.tag))d=e.typeMap[e.kind||"fallback"][e.tag];else for(d=null,c=0,u=(p=e.typeMap.multi[e.kind||"fallback"]).length;c<u;c+=1)if(e.tag.slice(0,p[c].tag.length)===p[c].tag){d=p[c];break}d||ue(e,"unknown tag !<"+e.tag+">"),null!==e.result&&d.kind!==e.kind&&ue(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ue(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||m}function Ae(e){var t,r,n,o,i=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(o=e.input.charCodeAt(e.position))&&(me(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!ee(o);)o=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&ue(e,"directive name must not be less than one character in length");0!==o;){for(;X(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!Z(o));break}if(Z(o))break;for(t=e.position;0!==o&&!ee(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==o&&ye(e),J.call(de,r)?de[r](e,r,n):pe(e,'unknown document directive "'+r+'"')}me(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,me(e,!0,-1)):a&&ue(e,"directives end mark is expected"),je(e,e.lineIndent-1,4,!1,!0),me(e,!0,-1),e.checkLineBreaks&&V.test(e.input.slice(i,e.position))&&pe(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&be(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,me(e,!0,-1)):e.position<e.length-1&&ue(e,"end of the stream or a document separator is expected")}function Pe(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new le(e,t),n=e.indexOf("\0");for(-1!==n&&(r.position=n,ue(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Ae(r);return r.documents}var Ce={loadAll:function(e,t,r){null!==t&&"object"==typeof t&&void 0===r&&(r=t,t=null);var n=Pe(e,r);if("function"!=typeof t)return n;for(var o=0,i=n.length;o<i;o+=1)t(n[o])},load:function(e,t){var r=Pe(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new s("expected a single document in the stream, but found more")}}},Se=Object.prototype.toString,Ee=Object.prototype.hasOwnProperty,ke={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},xe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Ne=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function De(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else{if(!(e<=4294967295))throw new s("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+o.repeat("0",n-t.length)+t}function _e(e){this.schema=e.schema||G,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=o.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var r,n,o,i,a,s,l;if(null===t)return{};for(r={},o=0,i=(n=Object.keys(t)).length;o<i;o+=1)a=n[o],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(l=e.compiledTypeMap.fallback[a])&&Ee.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[a]=s;return r}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function qe(e,t){for(var r,n=o.repeat(" ",t),i=0,a=-1,s="",l=e.length;i<l;)-1===(a=e.indexOf("\n",i))?(r=e.slice(i),i=l):(r=e.slice(i,a+1),i=a+1),r.length&&"\n"!==r&&(s+=n),s+=r;return s}function Le(e,t){return"\n"+o.repeat(" ",e.indent*t)}function Re(e){return 32===e||9===e}function Be(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function Me(e){return Be(e)&&65279!==e&&13!==e&&10!==e}function Ie(e,t,r){var n=Me(e),o=n&&!Re(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!o)||Me(t)&&!Re(t)&&35===e||58===t&&o}function Ue(e,t){var r,n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function Fe(e){return/^\n* /.test(e)}function Ke(e,t,r,n,o,i,a,s){var l,c,u=0,p=null,d=!1,f=!1,h=-1!==n,g=-1,y=Be(c=Ue(e,0))&&65279!==c&&!Re(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&function(e){return!Re(e)&&58!==e}(Ue(e,e.length-1));if(t||a)for(l=0;l<e.length;u>=65536?l+=2:l++){if(!Be(u=Ue(e,l)))return 5;y=y&&Ie(u,p,s),p=u}else{for(l=0;l<e.length;u>=65536?l+=2:l++){if(10===(u=Ue(e,l)))d=!0,h&&(f=f||l-g-1>n&&" "!==e[g+1],g=l);else if(!Be(u))return 5;y=y&&Ie(u,p,s),p=u}f=f||h&&l-g-1>n&&" "!==e[g+1]}return d||f?r>9&&Fe(e)?5:a?2===i?5:2:f?4:3:!y||a||o(e)?2===i?5:2:1}function Qe(e,t,r,n,o){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==xe.indexOf(t)||Ne.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,r),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),l=n||e.flowLevel>-1&&r>=e.flowLevel;switch(Ke(t,l,e.indent,a,(function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}(e,t)}),e.quotingType,e.forceQuotes&&!n,o)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+Ge(t,e.indent)+Je(qe(t,i));case 4:return">"+Ge(t,e.indent)+Je(qe(function(e,t){var r,n,o=/(\n+)([^\n]*)/g,i=(s=e.indexOf("\n"),s=-1!==s?s:e.length,o.lastIndex=s,$e(e.slice(0,s),t)),a="\n"===e[0]||" "===e[0];var s;for(;n=o.exec(e);){var l=n[1],c=n[2];r=" "===c[0],i+=l+(a||r||""===c?"":"\n")+$e(c,t),a=r}return i}(t,a),i));case 5:return'"'+function(e){for(var t,r="",n=0,o=0;o<e.length;n>=65536?o+=2:o++)n=Ue(e,o),!(t=ke[n])&&Be(n)?(r+=e[o],n>=65536&&(r+=e[o+1])):r+=t||De(n);return r}(t)+'"';default:throw new s("impossible error: invalid scalar style")}}()}function Ge(e,t){var r=Fe(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function Je(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function $e(e,t){if(""===e||" "===e[0])return e;for(var r,n,o=/ [^ ]/g,i=0,a=0,s=0,l="";r=o.exec(e);)(s=r.index)-i>t&&(n=a>i?a:s,l+="\n"+e.slice(i,n),i=n+1),a=s;return l+="\n",e.length-i>t&&a>i?l+=e.slice(i,a)+"\n"+e.slice(a+1):l+=e.slice(i),l.slice(1)}function Ve(e,t,r,n){var o,i,a,s="",l=e.tag;for(o=0,i=r.length;o<i;o+=1)a=r[o],e.replacer&&(a=e.replacer.call(r,String(o),a)),(He(e,t+1,a,!0,!0,!1,!0)||void 0===a&&He(e,t+1,null,!0,!0,!1,!0))&&(n&&""===s||(s+=Le(e,t)),e.dump&&10===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}function We(e,t,r){var n,o,i,a,l,c;for(i=0,a=(o=r?e.explicitTypes:e.implicitTypes).length;i<a;i+=1)if(((l=o[i]).instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof t&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(r?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(c=e.styleMap[l.tag]||l.defaultStyle,"[object Function]"===Se.call(l.represent))n=l.represent(t,c);else{if(!Ee.call(l.represent,c))throw new s("!<"+l.tag+'> tag resolver accepts not "'+c+'" style');n=l.represent[c](t,c)}e.dump=n}return!0}return!1}function He(e,t,r,n,o,i,a){e.tag=null,e.dump=r,We(e,r,!1)||We(e,r,!0);var l,c=Se.call(e.dump),u=n;n&&(n=e.flowLevel<0||e.flowLevel>t);var p,d,f="[object Object]"===c||"[object Array]"===c;if(f&&(d=-1!==(p=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||d||2!==e.indent&&t>0)&&(o=!1),d&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(f&&d&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===c)n&&0!==Object.keys(e.dump).length?(!function(e,t,r,n){var o,i,a,l,c,u,p="",d=e.tag,f=Object.keys(r);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new s("sortKeys must be a boolean or a function");for(o=0,i=f.length;o<i;o+=1)u="",n&&""===p||(u+=Le(e,t)),l=r[a=f[o]],e.replacer&&(l=e.replacer.call(r,a,l)),He(e,t+1,a,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,c&&(u+=Le(e,t)),He(e,t+1,l,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=d,e.dump=p||"{}"}(e,t,e.dump,o),d&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,r){var n,o,i,a,s,l="",c=e.tag,u=Object.keys(r);for(n=0,o=u.length;n<o;n+=1)s="",""!==l&&(s+=", "),e.condenseFlow&&(s+='"'),a=r[i=u[n]],e.replacer&&(a=e.replacer.call(r,i,a)),He(e,t,i,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),He(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,t,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===c)n&&0!==e.dump.length?(e.noArrayIndent&&!a&&t>0?Ve(e,t-1,e.dump,o):Ve(e,t,e.dump,o),d&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,r){var n,o,i,a="",s=e.tag;for(n=0,o=r.length;n<o;n+=1)i=r[n],e.replacer&&(i=e.replacer.call(r,String(n),i)),(He(e,t,i,!1,!1)||void 0===i&&He(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=s,e.dump="["+a+"]"}(e,t,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else{if("[object String]"!==c){if("[object Undefined]"===c)return!1;if(e.skipInvalid)return!1;throw new s("unacceptable kind of an object to dump "+c)}"?"!==e.tag&&Qe(e,e.dump,t,i,u)}null!==e.tag&&"?"!==e.tag&&(l=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),l="!"===e.tag[0]?"!"+l:"tag:yaml.org,2002:"===l.slice(0,18)?"!!"+l.slice(18):"!<"+l+">",e.dump=l+" "+e.dump)}return!0}function ze(e,t){var r,n,o=[],i=[];for(function e(t,r,n){var o,i,a;if(null!==t&&"object"==typeof t)if(-1!==(i=r.indexOf(t)))-1===n.indexOf(i)&&n.push(i);else if(r.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)e(t[i],r,n);else for(o=Object.keys(t),i=0,a=o.length;i<a;i+=1)e(t[o[i]],r,n)}(e,o,i),r=0,n=i.length;r<n;r+=1)t.duplicates.push(o[i[r]]);t.usedDuplicates=new Array(n)}function Ye(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var Ze=f,Xe=y,et=T,tt=k,rt=x,nt=G,ot=Ce.load,it=Ce.loadAll,at={dump:function(e,t){var r=new _e(t=t||{});r.noRefs||ze(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),He(r,0,n,!0,!0)?r.dump+"\n":""}}.dump,st=s,lt={binary:R,float:E,map:O,null:v,pairs:F,set:Q,timestamp:_,bool:w,int:P,merge:q,omap:I,seq:b,str:m},ct=Ye("safeLoad","load"),ut=Ye("safeLoadAll","loadAll"),pt=Ye("safeDump","dump"),dt={Type:Ze,Schema:Xe,FAILSAFE_SCHEMA:et,JSON_SCHEMA:tt,CORE_SCHEMA:rt,DEFAULT_SCHEMA:nt,load:ot,loadAll:it,dump:at,YAMLException:st,types:lt,safeLoad:ct,safeLoadAll:ut,safeDump:pt};t.default=dt},function(e,t,r){"use strict";e.exports=p;var n,o=r(6),i=o.LongBits,a=o.base64,s=o.utf8;function l(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function c(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function p(){this.len=0,this.head=new l(c,0,0),this.tail=this.head,this.states=null}var d=function(){return o.Buffer?function(){return(p.create=function(){return new n})()}:function(){return new p}};function f(e,t,r){t[r]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function y(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}p.create=d(),p.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(p.alloc=o.pool(p.alloc,o.Array.prototype.subarray)),p.prototype._push=function(e,t,r){return this.tail=this.tail.next=new l(e,t,r),this.len+=t,this},h.prototype=Object.create(l.prototype),h.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},p.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},p.prototype.int32=function(e){return e<0?this._push(g,10,i.fromNumber(e)):this.uint32(e)},p.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},p.prototype.uint64=function(e){var t=i.from(e);return this._push(g,t.length(),t)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(g,t.length(),t)},p.prototype.bool=function(e){return this._push(f,1,e?1:0)},p.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(e){var t=i.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},p.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var m=o.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};p.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(o.isString(e)){var r=p.alloc(t=a.length(e));a.decode(e,r,0),e=r}return this.uint32(t)._push(m,t,e)},p.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(f,1,0)},p.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new l(c,0,0),this.len=0,this},p.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(c,0,0),this.len=0),this},p.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},p.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},p._configure=function(e){n=e,p.create=d(),n._configure()}},function(e,t,r){"use strict";e.exports=l;var n,o=r(6),i=o.LongBits,a=o.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var c,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")},p=function(){return o.Buffer?function(e){return(l.create=function(e){return o.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u};function d(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw s(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}l.create=p(),l.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,l.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return c}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw s(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,r);if(t===r){var n=o.Buffer;return n?n.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,r)},l.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){n=e,l.create=p(),n._configure();var t=o.Long?"toLong":"toNumber";o.merge(l.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},function(e,t,r){"use strict";e.exports=b;var n=r(11);((b.prototype=Object.create(n.prototype)).constructor=b).className="Type";var o=r(5),i=r(12),a=r(8),s=r(21),l=r(22),c=r(24),u=r(19),p=r(18),d=r(0),f=r(34),h=r(35),g=r(36),y=r(37),m=r(38);function b(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function O(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(b.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this._fieldsById[n])throw Error("duplicate id "+n+" in "+this);this._fieldsById[n]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=d.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=d.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=b.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof c||((e.prototype=new c).constructor=e,d.merge(e.prototype,t)),e.$type=e.prototype.$type=this,d.merge(e,c,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this._oneofsArray[r].resolve().name]={get:d.oneOfGetter(this._oneofsArray[r].oneof),set:d.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),b.generateConstructor=function(e){for(var t,r=d.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e._fieldsArray[n]).map?r("this%s={}",d.safeProp(t.name)):t.repeated&&r("this%s=[]",d.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},b.fromJSON=function(e,t){var r=new b(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var c=Object.keys(t.fields),u=0;u<c.length;++u)r.add((void 0!==t.fields[c[u]].keyType?s.fromJSON:a.fromJSON)(c[u],t.fields[c[u]]));if(t.oneofs)for(c=Object.keys(t.oneofs),u=0;u<c.length;++u)r.add(i.fromJSON(c[u],t.oneofs[c[u]]));if(t.nested)for(c=Object.keys(t.nested),u=0;u<c.length;++u){var p=t.nested[c[u]];r.add((void 0!==p.id?a.fromJSON:void 0!==p.fields?b.fromJSON:void 0!==p.values?o.fromJSON:void 0!==p.methods?l.fromJSON:n.fromJSON)(c[u],p))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),r},b.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return d.toObject(["options",t&&t.options||void 0,"oneofs",n.arrayToJSON(this.oneofsArray,e),"fields",n.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},b.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return n.prototype.resolveAll.call(this)},b.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},b.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof a&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),O(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),O(this)):n.prototype.add.call(this,e)},b.prototype.remove=function(e){if(e instanceof a&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),O(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),O(this)}return n.prototype.remove.call(this,e)},b.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},b.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)},b.prototype.create=function(e){return new this.ctor(e)},b.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=f(this)({Writer:p,types:t,util:d}),this.decode=h(this)({Reader:u,types:t,util:d}),this.verify=g(this)({types:t,util:d}),this.fromObject=y.fromObject(this)({types:t,util:d}),this.toObject=y.toObject(this)({types:t,util:d});var n=m[e];if(n){var o=Object.create(this);o.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(o),o.toObject=this.toObject,this.toObject=n.toObject.bind(o)}return this},b.prototype.encode=function(e,t){return this.setup().encode(e,t)},b.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},b.prototype.decode=function(e,t){return this.setup().decode(e,t)},b.prototype.decodeDelimited=function(e){return e instanceof u||(e=u.create(e)),this.decode(e,e.uint32())},b.prototype.verify=function(e){return this.setup().verify(e)},b.prototype.fromObject=function(e){return this.setup().fromObject(e)},b.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},b.d=function(e){return function(t){d.decorateType(t,e)}}},function(e,t,r){"use strict";e.exports=a;var n=r(8);((a.prototype=Object.create(n.prototype)).constructor=a).className="MapField";var o=r(10),i=r(0);function a(e,t,r,o,a,s){if(n.call(this,e,t,o,void 0,void 0,a,s),!i.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}a.fromJSON=function(e,t){return new a(e,t.id,t.keyType,t.type,t.options,t.comment)},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},a.prototype.resolve=function(){if(this.resolved)return this;if(void 0===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},a.d=function(e,t,r){return"function"==typeof r?r=i.decorateType(r).name:r&&"object"==typeof r&&(r=i.decorateEnum(r).name),function(n,o){i.decorateType(n.constructor).add(new a(o,e,t,r))}}},function(e,t,r){"use strict";e.exports=s;var n=r(11);((s.prototype=Object.create(n.prototype)).constructor=s).className="Service";var o=r(23),i=r(0),a=r(32);function s(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function l(e){return e._methodsArray=null,e}s.fromJSON=function(e,t){var r=new s(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),i=0;i<n.length;++i)r.add(o.fromJSON(n[i],t.methods[n[i]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},s.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",n.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(s.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),s.prototype.get=function(e){return this.methods[e]||n.prototype.get.call(this,e)},s.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return n.prototype.resolve.call(this)},s.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof o?(this.methods[e.name]=e,e.parent=this,l(this)):n.prototype.add.call(this,e)},s.prototype.remove=function(e){if(e instanceof o){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,l(this)}return n.prototype.remove.call(this,e)},s.prototype.create=function(e,t,r){for(var n,o=new a.Service(e,t,r),s=0;s<this.methodsArray.length;++s){var l=i.lcFirst((n=this._methodsArray[s]).resolve().name).replace(/[^$\w_]/g,"");o[l]=i.codegen(["r","c"],i.isReserved(l)?l+"_":l)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return o}},function(e,t,r){"use strict";e.exports=i;var n=r(9);((i.prototype=Object.create(n.prototype)).constructor=i).className="Method";var o=r(0);function i(e,t,r,i,a,s,l,c,u){if(o.isObject(a)?(l=a,a=s=void 0):o.isObject(s)&&(l=s,s=void 0),void 0!==t&&!o.isString(t))throw TypeError("type must be a string");if(!o.isString(r))throw TypeError("requestType must be a string");if(!o.isString(i))throw TypeError("responseType must be a string");n.call(this,e,l),this.type=t||"rpc",this.requestType=r,this.requestStream=!!a||void 0,this.responseType=i,this.responseStream=!!s||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=c,this.parsedOptions=u}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},function(e,t,r){"use strict";e.exports=o;var n=r(6);function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}o.create=function(e){return this.$type.create(e)},o.encode=function(e,t){return this.$type.encode(e,t)},o.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},o.decode=function(e){return this.$type.decode(e)},o.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},o.verify=function(e){return this.$type.verify(e)},o.fromObject=function(e){return this.$type.fromObject(e)},o.toObject=function(e,t){return this.$type.toObject(e,t)},o.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},function(e,t,r){"use strict";e.exports=p;var n=r(11);((p.prototype=Object.create(n.prototype)).constructor=p).className="Root";var o,i,a,s=r(8),l=r(5),c=r(12),u=r(0);function p(e){n.call(this,"",e),this.deferred=[],this.files=[]}function d(){}p.fromJSON=function(e,t){return t||(t=new p),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},p.prototype.resolvePath=u.path.resolve,p.prototype.fetch=u.fetch,p.prototype.load=function e(t,r,n){"function"==typeof r&&(n=r,r=void 0);var o=this;if(!n)return u.asPromise(e,o,t,r);var s=n===d;function l(e,t){if(n){var r=n;if(n=null,s)throw e;r(e,t)}}function c(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in a)return r}return null}function p(e,t){try{if(u.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),u.isString(t)){i.filename=e;var n,a=i(t,o,r),p=0;if(a.imports)for(;p<a.imports.length;++p)(n=c(a.imports[p])||o.resolvePath(e,a.imports[p]))&&f(n);if(a.weakImports)for(p=0;p<a.weakImports.length;++p)(n=c(a.weakImports[p])||o.resolvePath(e,a.weakImports[p]))&&f(n,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){l(e)}s||h||l(null,o)}function f(e,t){if(e=c(e)||e,!(o.files.indexOf(e)>-1))if(o.files.push(e),e in a)s?p(e,a[e]):(++h,setTimeout((function(){--h,p(e,a[e])})));else if(s){var r;try{r=u.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||l(e))}p(e,r)}else++h,o.fetch(e,(function(r,i){--h,n&&(r?t?h||l(null,o):l(r):p(e,i))}))}var h=0;u.isString(t)&&(t=[t]);for(var g,y=0;y<t.length;++y)(g=o.resolvePath("",t[y]))&&f(g);if(s)return o;h||l(null,o)},p.prototype.loadSync=function(e,t){if(!u.isNode)throw Error("not supported");return this.load(e,t,d)},p.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return n.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function h(e,t){var r=t.parent.lookup(t.extend);if(r){var n=new s(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.get(n.name)||(n.declaringField=t,t.extensionField=n,r.add(n)),!0}return!1}p.prototype._handleAdd=function(e){if(e instanceof s)void 0===e.extend||e.extensionField||h(0,e)||this.deferred.push(e);else if(e instanceof l)f.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof c)){if(e instanceof o)for(var t=0;t<this.deferred.length;)h(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);f.test(e.name)&&(e.parent[e.name]=e)}},p.prototype._handleRemove=function(e){if(e instanceof s){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof l)f.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);f.test(e.name)&&delete e.parent[e.name]}},p._configure=function(e,t,r){o=e,i=t,a=r}},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(17),i=r(3),a=r(7),s=n(r(4)),l=r(2),c=r(1);class u extends a.ActionBuilder{constructor(e,t,r){if(super(e),this.proto=c.dataform.DataPreparation.create(),this.session=e,t.name)t.name.endsWith(".dp")&&t.filename.endsWith(".dp.sqlx")&&(t.name=t.name.slice(0,-3));else{const e=s.filename(t.filename);if(e.toLowerCase().endsWith(".dp.yaml")||e.toLowerCase().endsWith(".dp.sqlx"))t.name=e.slice(0,-8);else{if(!e.toLowerCase().endsWith(".yaml")&&!e.toLowerCase().endsWith(".sqlx"))throw new Error("Only YAML and SQLX files are supported");t.name=e.slice(0,-5)}}const n=s.fileExtension(t.filename);"yaml"===n?this.configureYaml(e,t,r):"sqlx"===n&&this.configureSqlx(e,t)}config(e){return e.database&&this.database(e.database),e.project&&this.database(e.project),e.schema&&this.schema(e.schema),e.dataset&&this.schema(e.dataset),this}query(e){return this.contextableQuery=e,this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>this.proto.dependencyTargets.push(l.checkAssertionsForDependency(this,e))),this}getFileName(){return this.proto.fileName}getTarget(){return c.dataform.Target.create(this.proto.target)}compile(){if(null!=this.contextableQuery){const e=new p(this);this.proto.query=e.apply(this.contextableQuery).trim(),l.validateQueryString(this.session,this.proto.query,this.proto.fileName)}return i.verifyObjectMatchesProto(c.dataform.DataPreparation,this.proto,i.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}database(e){return this.proto.target=this.applySessionToTarget(c.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{database:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}schema(e){return this.proto.target=this.applySessionToTarget(c.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{schema:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}configureYamlWithoutTargets(e,t,r){const n=c.dataform.Target.create({name:r.name});this.proto.target=this.finalizeTarget(this.applySessionToTarget(n,t.projectConfig,r.filename,{validateTarget:!0})),this.proto.targets=[this.proto.target],this.proto.canonicalTarget=this.applySessionToTarget(n,t.canonicalProjectConfig),this.proto.canonicalTargets=[this.proto.canonicalTarget];const i=this.applySessionToDataPreparationContents(e);this.proto.dataPreparationYaml=o.dump(i)}configureYamlWithTargets(e,t,r,n){const i=e.map(e=>this.applySessionToTarget(e,r.projectConfig,n.filename,{validateTarget:!0}));this.proto.targets=i.map(e=>this.finalizeTarget(e)),this.proto.canonicalTargets=e.map(e=>this.applySessionToTarget(e,r.canonicalProjectConfig));const a=this.applySessionToDataPreparationContents(t);this.proto.dataPreparationYaml=o.dump(a),this.proto.target=i[0],this.proto.canonicalTarget=this.proto.canonicalTargets[0]}applySessionToDataPreparationContents(e){var t;if(!e)return e;const r=null===(t=e.configuration)||void 0===t?void 0:t.errorTable;return r&&(e.configuration.errorTable=this.applySessionToTableReference(r)),e.nodes&&e.nodes.forEach((t,r)=>{var n,o;const i=null===(n=t.source)||void 0===n?void 0:n.table;i&&(e.nodes[r].source.table=this.applySessionToTableReference(i));const a=null===(o=t.destination)||void 0===o?void 0:o.table;a&&(e.nodes[r].destination.table=this.applySessionToTableReference(a))}),e}applySessionToTableReference(e){const t={database:e.project,schema:e.dataset,name:e.table},r=this.applySessionToTarget(c.dataform.Target.create(t),this.session.projectConfig);let n={table:this.session.finalizeName(r.name)};return r.schema&&(n=Object.assign({dataset:this.session.finalizeSchema(r.schema)},n)),r.database&&(n=Object.assign({project:this.session.finalizeDatabase(r.database)},n)),n}getTargets(e){const t=[];return e&&e.nodes&&e.nodes.forEach(e=>{var r;const n=null===(r=e.destination)||void 0===r?void 0:r.table;if(n){const e={database:n.project,schema:n.dataset,name:n.table};t.push(c.dataform.Target.create(e))}}),t}configureYaml(e,t,r){t.filename=l.resolveActionsConfigFilename(t.filename,r);const n=l.nativeRequire(t.filename).asJson,o=this.getTargets(n);o.length>0?this.configureYamlWithTargets(o,n,e,t):this.configureYamlWithoutTargets(n,e,t),this.proto.tags=t.tags,t.dependencyTargets&&this.dependencies(t.dependencyTargets.map(e=>l.configTargetToCompiledGraphTarget(c.dataform.ActionConfig.Target.create(e)))),this.proto.fileName=t.filename,t.disabled&&(this.proto.disabled=t.disabled)}configureSqlx(e,t){var r,n;const o=[];if(o.push(l.actionConfigToCompiledGraphTarget(t)),null!=t.errorTable){const e=c.dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.create(t.errorTable),r=l.actionConfigToCompiledGraphTarget(e);this.proto.errorTableRetentionDays=e.retentionDays,o.push(r)}this.proto.load=this.mapLoadMode(null===(r=t.loadMode)||void 0===r?void 0:r.mode,null===(n=t.loadMode)||void 0===n?void 0:n.incrementalColumn),this.proto.targets=o.map(r=>this.applySessionToTarget(r,e.projectConfig,t.filename,{validateTarget:!0})).map(e=>this.finalizeTarget(e)),this.proto.target=this.proto.targets[0],this.proto.targets.length>1&&(this.proto.errorTable=this.proto.targets[1]),this.proto.canonicalTargets=o.map(t=>this.applySessionToTarget(t,e.canonicalProjectConfig)),this.proto.canonicalTarget=this.proto.canonicalTargets[0],t.dependencyTargets&&this.dependencies(t.dependencyTargets.map(e=>l.configTargetToCompiledGraphTarget(c.dataform.ActionConfig.Target.create(e)))),this.proto.tags=t.tags,this.proto.fileName=t.filename,t.disabled&&(this.proto.disabled=t.disabled),this.query(l.nativeRequire(t.filename).query)}mapLoadMode(e,t){if(!e)return c.dataform.LoadConfiguration.create({replace:{}});switch(e.toString().toUpperCase()){case"REPLACE_TABLE":return c.dataform.LoadConfiguration.create({replace:{}});case"APPEND":return c.dataform.LoadConfiguration.create({append:{}});case"MAXIMUM":return c.dataform.LoadConfiguration.create({maximum:{columnName:this.validateLoadModeColumnName(t)}});case"UNIQUE":return c.dataform.LoadConfiguration.create({unique:{columnName:this.validateLoadModeColumnName(t)}});default:throw new Error(`LoadMode value "${e}" is not supported`)}}validateLoadModeColumnName(e){if(!e||""===e)throw new Error("columnName is required for MAXIMUM and UNIQUE load modes.");return e}}t.DataPreparation=u;class p{constructor(e,t=!1){this.dataPreparation=e,this.isIncremental=t,this.EXPECT=" /* @@VALIDATION */ WHERE "}config(e){return this.dataPreparation.config(e),""}self(){return this.resolve(this.dataPreparation.getTarget())}name(){return this.dataPreparation.session.finalizeName(this.dataPreparation.getTarget().name)}ref(e,...t){return e=l.toResolvable(e,t),l.resolvableAsTarget(e)?(this.dataPreparation.dependencies(e),this.resolve(e)):(this.dataPreparation.session.compileError(new Error("Action name is not specified")),"")}resolve(e,...t){return this.dataPreparation.session.resolve(e,...t)}schema(){return this.dataPreparation.session.finalizeSchema(this.dataPreparation.getTarget().schema)}database(){return this.dataPreparation.getTarget().database?this.dataPreparation.session.finalizeDatabase(this.dataPreparation.getTarget().database):(this.dataPreparation.session.compileError(new Error("Warehouse does not support multiple databases")),"")}when(e,t,r=""){return e?t:r}incremental(){return!!this.isIncremental}dependencies(e){return this.dataPreparation.dependencies(e),""}apply(e){return"function"==typeof e?e(this):e}}t.DataPreparationContext=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version="3.0.18"},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(17),i=n(r(4)),a=r(48),s=["self","ref","resolve","name","when","incremental","schema","database"].map(e=>`const ${e} = ctx.${e} ? ctx.${e}.bind(ctx) : undefined;`).join("\n"),l=["EXPECT"].map(e=>`const ${e} = ctx.${e} ? ctx.${e} : undefined;`).join("\n");function c(e){const t=[""];return e.forEach(e=>{"string"==typeof e||e.type!==a.SyntaxTreeNodeType.SQL_STATEMENT_SEPARATOR?t[t.length-1]+=function(e){if("string"==typeof e)return u.get(a.SyntaxTreeNodeType.SQL_LITERAL_STRING)(e);return e.concatenate(u)}(e):t.push("")}),t}t.INVALID_YAML_ERROR_STRING="is not a valid YAML file",t.compile=function(e,r){if("sqlx"===i.fileExtension(r))return function(e,t){const{config:r,js:n,sql:o,incremental:u,preOperations:p,postOperations:d,inputs:f}=function(e){let t="",r="";e.children().filter(a.SyntaxTreeNode.isSyntaxTreeNode).filter(e=>e.type===a.SyntaxTreeNodeType.JAVASCRIPT).forEach(e=>{const n=e.concatenate();n.startsWith("config")?t=n.slice("config ".length):r+=n.slice("js {".length,-1*"}".length)});const n=c(e.children().filter(e=>"string"==typeof e||[a.SyntaxTreeNodeType.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER,a.SyntaxTreeNodeType.SQL_COMMENT,a.SyntaxTreeNodeType.SQL_LITERAL_STRING,a.SyntaxTreeNodeType.SQL_LITERAL_MULTILINE_STRING,a.SyntaxTreeNodeType.SQL_STATEMENT_SEPARATOR].includes(e.type)));let o="",i=[],s=[];const l=[];return e.children().filter(a.SyntaxTreeNode.isSyntaxTreeNode).filter(e=>e.type===a.SyntaxTreeNodeType.SQL).forEach(e=>{const t=e.children()[0],r=e.children().slice(-1)[0],n=c((1===e.children().length?new a.SyntaxTreeNode(a.SyntaxTreeNodeType.SQL,[t.slice(t.indexOf("{")+1,t.lastIndexOf("}"))]):new a.SyntaxTreeNode(a.SyntaxTreeNodeType.SQL,[t.slice(t.indexOf("{")+1),...e.children().slice(1,-1),r.slice(0,r.lastIndexOf("}"))])).children());if(t.startsWith("incremental_where")){if(n.length>1)throw new Error("'incremental_where' code blocks may only contain a single SQL statement.");o=n[0]}else if(t.startsWith("pre_operations"))i=n;else if(t.startsWith("post_operations"))s=n;else if(t.startsWith("input")){if(n.length>1)throw new Error("'input' code blocks may only contain a single SQL statement.");const e=t.slice(t.indexOf('"'),t.lastIndexOf('"')+1).split(",").map(e=>e.trim().slice(1,-1));l.push({labelParts:e,value:n[0]})}}),{config:t,js:r,sql:n,incremental:o,preOperations:i,postOperations:s,inputs:l}}(e);return`dataform.sqlxAction({\n sqlxConfig: {\n name: "${i.escapedBasename(t)}",\n type: "operations",\n ...${r||"{}"}\n },\n sqlStatementCount: ${o.length},\n sqlContextable: (ctx) => {\n ${s}\n ${l}\n ${n}\n return [${o.map(e=>`\`${e}\``)}];\n },\n incrementalWhereContextable: ${u?`(ctx) => {\n ${s}\n ${l}\n ${n}\n return \`${u}\`\n }`:"undefined"},\n preOperationsContextable: ${p.length>0?`(ctx) => {\n ${s}\n ${l}\n ${n}\n return [${p.map(e=>`\`${e}\``)}];\n }`:"undefined"},\n postOperationsContextable: ${d.length>0?`(ctx) => {\n ${s}\n ${l}\n ${n}\n return [${d.map(e=>`\`${e}\``)}];\n }`:"undefined"},\n inputContextables: [\n ${f.map(({labelParts:e,value:t})=>`{\n refName: [${e.map(e=>`"${e}"`).join(", ")}],\n contextable: (ctx) => {\n ${n}\n return \`${t}\`;\n }\n }`).join(",")}\n ]\n});\n`}(a.SyntaxTreeNode.create(e),r);if("yaml"===i.fileExtension(r))try{const t=o.load(e);return"exports.asJson = "+JSON.stringify(t)}catch(e){if(e instanceof o.YAMLException)throw new Error(`${r} ${t.INVALID_YAML_ERROR_STRING}: ${e}`);throw e}if("ipynb"===i.fileExtension(r)){let t={};try{t=JSON.parse(e)}catch(e){throw new Error(`Error parsing ${r} as JSON: ${e}`)}return"exports.asJson = "+JSON.stringify(t)}if("sql"===i.fileExtension(r)){return`exports.query = \`${e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\${/g,"\\${")}\`;`}return e},t.extractJsBlocks=function(e){const t=[];return{sql:e.replace(/^\s*\/\*[jJ][sS]\s*[\r\n]+((?:[^*]|[\r\n]|(?:\*+(?:[^*/]|[\r\n])))*)\*+\/|^\s*\-\-[jJ][sS]\s(.*)/gm,(e,r,n)=>(r&&t.push(r),n&&t.push(n),"")).replace(/([^\\])`/g,(e,t)=>t+"\\`").trim(),js:t.map(e=>e.trim()).join("\n")}};const u=new Map([[a.SyntaxTreeNodeType.SQL_COMMENT,e=>e.replace(/`/g,"\\`").replace(/\${/g,"\\${")],[a.SyntaxTreeNodeType.SQL_LITERAL_STRING,e=>e.replace(/\\/g,"\\\\").replace(/\`/g,"\\`")],[a.SyntaxTreeNodeType.SQL_LITERAL_MULTILINE_STRING,e=>e.replace(/\\/g,"\\\\").replace(/\`/g,"\\`")]])},function(e,t,r){"use strict";var n=t;function o(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(18),n.BufferWriter=r(60),n.Reader=r(19),n.BufferReader=r(61),n.util=r(6),n.rpc=r(32),n.roots=r(33),n.configure=o,o()},function(e,t,r){"use strict";e.exports=function(e,t){var r=new Array(arguments.length-1),n=0,o=2,i=!0;for(;o<arguments.length;)r[n++]=arguments[o++];return new Promise((function(o,a){r[n]=function(e){if(i)if(i=!1,e)a(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];o.apply(null,t)}};try{e.apply(t||null,r)}catch(e){i&&(i=!1,a(e))}}))}},function(module,exports,__webpack_require__){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},function(e,t,r){"use strict";t.Service=r(62)},function(e,t,r){"use strict";e.exports={}},function(e,t,r){"use strict";e.exports=function(e){for(var t,r=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),s=e.fieldsArray.slice().sort(i.compareFieldsById),l=0;l<s.length;++l){var c=s[l].resolve(),u=e._fieldsArray.indexOf(c),p=c.resolvedType instanceof n?"int32":c.type,d=o.basic[p];t="m"+i.safeProp(c.name),c.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,c.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(c.id<<3|2)>>>0,8|o.mapKey[c.keyType],c.keyType),void 0===d?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",u,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|d,p,t),r("}")("}")):c.repeated?(r("if(%s!=null&&%s.length){",t,t),c.packed&&void 0!==o.packed[p]?r("w.uint32(%i).fork()",(c.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",p,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===d?a(r,c,u,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(c.id<<3|d)>>>0,p,t)),r("}")):(c.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,c.name),void 0===d?a(r,c,u,t):r("w.uint32(%i).%s(%s)",(c.id<<3|d)>>>0,p,t))}return r("return w")};var n=r(5),o=r(10),i=r(0);function a(e,t,r,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}},function(e,t,r){"use strict";e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var r=0;r<e.fieldsArray.length;++r){var s=e._fieldsArray[r].resolve(),l=s.resolvedType instanceof n?"int32":s.type,c="m"+i.safeProp(s.name);t("case %i: {",s.id),s.map?(t("if(%s===util.emptyObject)",c)("%s={}",c)("var c2 = r.uint32()+r.pos"),void 0!==o.defaults[s.keyType]?t("k=%j",o.defaults[s.keyType]):t("k=null"),void 0!==o.defaults[l]?t("value=%j",o.defaults[l]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",s.keyType)("case 2:"),void 0===o.basic[l]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",l),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.long[s.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',c):t("%s[k]=value",c)):s.repeated?(t("if(!(%s&&%s.length))",c,c)("%s=[]",c),void 0!==o.packed[l]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",c,l)("}else"),void 0===o.basic[l]?t(s.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",c,r):t("%s.push(r.%s())",c,l)):void 0===o.basic[l]?t(s.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",c,r):t("%s=r.%s()",c,l),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var u=e._fieldsArray[r];u.required&&t("if(!m.hasOwnProperty(%j))",u.name)("throw util.ProtocolError(%j,{instance:m})",a(u))}return t("return m")};var n=r(5),o=r(10),i=r(0);function a(e){return"missing required '"+e.name+"'"}},function(e,t,r){"use strict";e.exports=function(e){var t=o.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r=e.oneofsArray,n={};r.length&&t("var p={}");for(var l=0;l<e.fieldsArray.length;++l){var c=e._fieldsArray[l].resolve(),u="m"+o.safeProp(c.name);if(c.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",u,c.name),c.map)t("if(!util.isObject(%s))",u)("return%j",i(c,"object"))("var k=Object.keys(%s)",u)("for(var i=0;i<k.length;++i){"),s(t,c,"k[i]"),a(t,c,l,u+"[k[i]]")("}");else if(c.repeated)t("if(!Array.isArray(%s))",u)("return%j",i(c,"array"))("for(var i=0;i<%s.length;++i){",u),a(t,c,l,u+"[i]")("}");else{if(c.partOf){var p=o.safeProp(c.partOf.name);1===n[c.partOf.name]&&t("if(p%s===1)",p)("return%j",c.partOf.name+": multiple values"),n[c.partOf.name]=1,t("p%s=1",p)}a(t,c,l,u)}c.optional&&t("}")}return t("return null")};var n=r(5),o=r(0);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function a(e,t,r,o){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(%s){",o)("default:")("return%j",i(t,"enum value"));for(var a=Object.keys(t.resolvedType.values),s=0;s<a.length;++s)e("case %i:",t.resolvedType.values[a[s]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,o)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",o)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',o)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',o)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",o)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",i(t,"buffer"))}return e}function s(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",i(t,"boolean key"))}return e}},function(e,t,r){"use strict";var n=t,o=r(5),i=r(0);function a(e,t,r,n){var i=!1;if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(d%s){",n);for(var a=t.resolvedType.values,s=Object.keys(a),l=0;l<s.length;++l)a[s[l]]!==t.typeDefault||i||(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',n,n,n),t.repeated||e("break"),i=!0),e("case%j:",s[l])("case %i:",a[s[l]])("m%s=%j",n,a[s[l]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var c=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,c)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length >= 0)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function s(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,r,n,n,r,n,n):e("d%s=types[%i].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,n,n,n,i?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}n.fromObject=function(e){var t=e.fieldsArray,r=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var n=0;n<t.length;++n){var s=t[n].resolve(),l=i.safeProp(s.name);s.map?(r("if(d%s){",l)('if(typeof d%s!=="object")',l)("throw TypeError(%j)",s.fullName+": object expected")("m%s={}",l)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",l),a(r,s,n,l+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",l)("if(!Array.isArray(d%s))",l)("throw TypeError(%j)",s.fullName+": array expected")("m%s=[]",l)("for(var i=0;i<d%s.length;++i){",l),a(r,s,n,l+"[i]")("}")("}")):(s.resolvedType instanceof o||r("if(d%s!=null){",l),a(r,s,n,l),s.resolvedType instanceof o||r("}"))}return r("return m")},n.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var r=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],a=[],l=[],c=0;c<t.length;++c)t[c].partOf||(t[c].resolve().repeated?n:t[c].map?a:l).push(t[c]);if(n.length){for(r("if(o.arrays||o.defaults){"),c=0;c<n.length;++c)r("d%s=[]",i.safeProp(n[c].name));r("}")}if(a.length){for(r("if(o.objects||o.defaults){"),c=0;c<a.length;++c)r("d%s={}",i.safeProp(a[c].name));r("}")}if(l.length){for(r("if(o.defaults){"),c=0;c<l.length;++c){var u=l[c],p=i.safeProp(u.name);if(u.resolvedType instanceof o)r("d%s=o.enums===String?%j:%j",p,u.resolvedType.valuesById[u.typeDefault],u.typeDefault);else if(u.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",u.typeDefault.low,u.typeDefault.high,u.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",p)("}else")("d%s=o.longs===String?%j:%i",p,u.typeDefault.toString(),u.typeDefault.toNumber());else if(u.bytes){var d="["+Array.prototype.slice.call(u.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",p,String.fromCharCode.apply(String,u.typeDefault))("else{")("d%s=%s",p,d)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",p,p)("}")}else r("d%s=%j",p,u.typeDefault)}r("}")}var f=!1;for(c=0;c<t.length;++c){u=t[c];var h=e._fieldsArray.indexOf(u);p=i.safeProp(u.name);u.map?(f||(f=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",p,p)("d%s={}",p)("for(var j=0;j<ks2.length;++j){"),s(r,u,h,p+"[ks2[j]]")("}")):u.repeated?(r("if(m%s&&m%s.length){",p,p)("d%s=[]",p)("for(var j=0;j<m%s.length;++j){",p),s(r,u,h,p+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",p,u.name),s(r,u,h,p),u.partOf&&r("if(o.oneofs)")("d%s=%j",i.safeProp(u.partOf.name),u.name)),r("}")}return r("return d")}},function(e,t,r){"use strict";var n=t,o=r(24);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var n="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="",n="";if(t&&t.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(n);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof o){var a=e.$type.toObject(e,t);return""===r&&(r="type.googleapis.com/"),n=r+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),a["@type"]=n,a}return this.toObject(e,t)}}},function(e,t,r){"use strict";e.exports=f;var n=/[\s{}=;:[\],'"()<>]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,i=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,a=/^ *[*/]+ */,s=/^\s*\*?\/*/,l=/\n/g,c=/\s/,u=/\\(.?)/g,p={0:"\0",r:"\r",n:"\n",t:"\t"};function d(e){return e.replace(u,(function(e,t){switch(t){case"\\":case"":return t;default:return p[t]||""}}))}function f(e,t){e=e.toString();var r=0,u=e.length,p=1,f=0,h={},g=[],y=null;function m(e){return Error("illegal "+e+" (line "+p+")")}function b(t){return e.charAt(t)}function O(r,n,o){var i,c={type:e.charAt(r++),lineEmpty:!1,leading:o},u=r-(t?2:3);do{if(--u<0||"\n"===(i=e.charAt(u))){c.lineEmpty=!0;break}}while(" "===i||"\t"===i);for(var d=e.substring(r,n).split(l),g=0;g<d.length;++g)d[g]=d[g].replace(t?s:a,"").trim();c.text=d.join("\n").trim(),h[p]=c,f=p}function T(t){var r=v(t),n=e.substring(t,r);return/^\s*\/\//.test(n)}function v(e){for(var t=e;t<u&&"\n"!==b(t);)t++;return t}function w(){if(g.length>0)return g.shift();if(y)return function(){var t="'"===y?i:o;t.lastIndex=r-1;var n=t.exec(e);if(!n)throw m("string");return r=t.lastIndex,j(y),y=null,d(n[1])}();var a,s,l,f,h,w=0===r;do{if(r===u)return null;for(a=!1;c.test(l=b(r));)if("\n"===l&&(w=!0,++p),++r===u)return null;if("/"===b(r)){if(++r===u)throw m("comment");if("/"===b(r))if(t){if(f=r,h=!1,T(r-1)){h=!0;do{if((r=v(r))===u)break;if(r++,!w)break}while(T(r))}else r=Math.min(u,v(r)+1);h&&(O(f,r,w),w=!0),p++,a=!0}else{for(h="/"===b(f=r+1);"\n"!==b(++r);)if(r===u)return null;++r,h&&(O(f,r-1,w),w=!0),++p,a=!0}else{if("*"!==(l=b(r)))return"/";f=r+1,h=t||"*"===b(f);do{if("\n"===l&&++p,++r===u)throw m("comment");s=l,l=b(r)}while("*"!==s||"/"!==l);++r,h&&(O(f,r-2,w),w=!0),a=!0}}}while(a);var A=r;if(n.lastIndex=0,!n.test(b(A++)))for(;A<u&&!n.test(b(A));)++A;var P=e.substring(r,r=A);return'"'!==P&&"'"!==P||(y=P),P}function j(e){g.push(e)}function A(){if(!g.length){var e=w();if(null===e)return null;j(e)}return g[0]}return Object.defineProperty({next:w,peek:A,push:j,skip:function(e,t){var r=A();if(r===e)return w(),!0;if(!t)throw m("token '"+r+"', '"+e+"' expected");return!1},cmnt:function(e){var r,n=null;return void 0===e?(r=h[p-1],delete h[p-1],r&&(t||"*"===r.type||r.lineEmpty)&&(n=r.leading?r.text:null)):(f<e&&A(),r=h[e],delete h[e],!r||r.lineEmpty||!t&&"/"!==r.type||(n=r.leading?null:r.text)),n}},"line",{get:function(){return p}})}f.unescape=d},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(7),a=n(r(4)),s=r(2),l=r(1);class c extends i.ActionBuilder{constructor(e,t,r){if(super(e),this.proto=l.dataform.Assertion.create(),this.session=e,!t)return;const n=this.verifyConfig(t);n.name||(n.name=a.basename(n.filename));const o=s.actionConfigToCompiledGraphTarget(n);return this.proto.target=this.applySessionToTarget(o,e.projectConfig,n.filename,{validateTarget:!0,useDefaultAssertionDataset:!0}),this.proto.canonicalTarget=this.applySessionToTarget(o,e.canonicalProjectConfig,void 0,{validateTarget:!1,useDefaultAssertionDataset:!0}),r&&(n.filename=s.resolveActionsConfigFilename(n.filename,r),this.query(s.nativeRequire(n.filename).query)),n.dependencyTargets&&this.dependencies(n.dependencyTargets.map(e=>s.configTargetToCompiledGraphTarget(l.dataform.ActionConfig.Target.create(e)))),n.hermetic&&this.hermetic(n.hermetic),n.disabled&&this.disabled(),n.tags&&this.tags(n.tags),n.description&&this.description(n.description),n.project&&this.database(n.project),n.dataset&&this.schema(n.dataset),n.filename&&(this.proto.fileName=n.filename),this}query(e){return this.contextableQuery=e,this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>{const t=s.resolvableAsTarget(e);this.session.actionAssertionMap.set(t,this),this.proto.dependencyTargets.push(t)}),this}hermetic(e){this.proto.hermeticity=e?l.dataform.ActionHermeticity.HERMETIC:l.dataform.ActionHermeticity.NON_HERMETIC}disabled(e=!0){return this.proto.disabled=e,this}tags(e){return("string"==typeof e?[e]:e).forEach(e=>{this.proto.tags.indexOf(e)<0&&this.proto.tags.push(e)}),this}description(e){return this.proto.actionDescriptor={description:e},this}database(e){return this.proto.target=this.applySessionToTarget(l.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{database:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0,useDefaultAssertionDataset:!0}),this}schema(e){return this.proto.target=this.applySessionToTarget(l.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{schema:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0,useDefaultAssertionDataset:!0}),this}getFileName(){return this.proto.fileName}getTarget(){return l.dataform.Target.create(this.proto.target)}getParentAction(){return l.dataform.Target.create(this.proto.parentAction)}setParentAction(e){this.proto.parentAction=e}compile(){const e=new u(this);return this.proto.query=e.apply(this.contextableQuery),s.validateQueryString(this.session,this.proto.query,this.proto.fileName),o.verifyObjectMatchesProto(l.dataform.Assertion,this.proto,o.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}verifyConfig(e){return e.dependencies&&(e.dependencyTargets=e.dependencies.map(e=>"string"==typeof e?{name:e}:e),delete e.dependencies),e.database&&(e.project=e.database,delete e.database),e.schema&&(e.dataset=e.schema,delete e.schema),e.fileName&&(e.filename=e.fileName,delete e.fileName),e.type&&delete e.type,o.verifyObjectMatchesProto(l.dataform.ActionConfig.AssertionConfig,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK)}}t.Assertion=c;class u{constructor(e){this.assertion=e}self(){return this.resolve(this.assertion.getTarget())}name(){return this.assertion.session.finalizeName(this.assertion.getTarget().name)}ref(e,...t){return e=s.toResolvable(e,t),s.resolvableAsTarget(e)?(this.assertion.dependencies(e),this.resolve(e)):(this.assertion.session.compileError(new Error("Action name is not specified")),"")}resolve(e,...t){return this.assertion.session.resolve(e,...t)}schema(){return this.assertion.session.finalizeSchema(this.assertion.getTarget().schema)}database(){return this.assertion.getTarget().database?this.assertion.session.finalizeDatabase(this.assertion.getTarget().database):(this.assertion.session.compileError(new Error("Warehouse does not support multiple databases")),"")}dependencies(e){return this.assertion.dependencies(e),""}tags(e){return this.assertion.tags(e),""}when(e,t,r=""){return e?t:r}apply(e){return"function"==typeof e?e(this):e}}t.AssertionContext=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3),o=r(7),i=r(13),a=r(2),s=r(1);class l extends o.ActionBuilder{constructor(e,t,r){var n;if(super(e),this.proto=s.dataform.Declaration.create(),this.session=e,!t)return;const o=this.verifyConfig(t);if(!o.name)throw Error("Declarations must have a populated 'name' field.");const i=a.actionConfigToCompiledGraphTarget(o);return this.proto.target=this.applySessionToTarget(i,e.projectConfig),this.proto.canonicalTarget=this.applySessionToTarget(i,e.canonicalProjectConfig),o.description&&this.description(o.description),(null===(n=o.columns)||void 0===n?void 0:n.length)&&this.columns(o.columns.map(e=>s.dataform.ActionConfig.ColumnDescriptor.create(e))),this.proto.fileName=r,this}description(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.description=e,this}columns(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.columns=i.ColumnDescriptors.mapConfigProtoToCompilationProto(e),this}getFileName(){return this.proto.fileName}getTarget(){return s.dataform.Target.create(this.proto.target)}compile(){return n.verifyObjectMatchesProto(s.dataform.Declaration,this.proto,n.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}verifyConfig(e){return e.database&&(e.project=e.database,delete e.database),e.schema&&(e.dataset=e.schema,delete e.schema),e.columns&&(e.columns=i.ColumnDescriptors.mapLegacyObjectToConfigProto(e.columns)),e.type&&delete e.type,n.verifyObjectMatchesProto(s.dataform.ActionConfig.DeclarationConfig,e,n.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK)}}t.Declaration=l},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(7),a=n(r(4)),s=r(2),l=r(1);class c extends i.ActionBuilder{constructor(e,t,r){super(e),this.dependOnDependencyAssertions=!1,this.proto=l.dataform.Notebook.create();const n=this.verifyConfig(t);n.name||(n.name=a.basename(n.filename));const o=s.actionConfigToCompiledGraphTarget(n);n.filename=s.resolveActionsConfigFilename(n.filename,r),this.session=e,this.proto.target=this.applySessionToTarget(o,e.projectConfig,n.filename,{validateTarget:!0}),this.proto.canonicalTarget=this.applySessionToTarget(o,e.canonicalProjectConfig),this.proto.tags=n.tags,this.dependOnDependencyAssertions=n.dependOnDependencyAssertions,n.dependencyTargets&&this.dependencies(n.dependencyTargets.map(e=>s.configTargetToCompiledGraphTarget(l.dataform.ActionConfig.Target.create(e)))),this.proto.fileName=n.filename,n.disabled&&(this.proto.disabled=n.disabled);const i=s.nativeRequire(n.filename).asJson;this.proto.notebookContents=JSON.stringify(function(e,t){if(!("cells"in e))throw new Error(`Notebook at ${t} is invalid: cells field not present`);return e.cells.forEach((t,r)=>{"outputs"in t&&(t.outputs=[],e.cells[r]=t)}),e}(i,n.filename))}ipynb(e){return this.proto.notebookContents=JSON.stringify(e),this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>{const t=s.checkAssertionsForDependency(this,e);t&&this.proto.dependencyTargets.push(t)}),this}getFileName(){return this.proto.fileName}getTarget(){return l.dataform.Target.create(this.proto.target)}compile(){return o.verifyObjectMatchesProto(l.dataform.Notebook,this.proto,o.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}verifyConfig(e){return o.verifyObjectMatchesProto(l.dataform.ActionConfig.NotebookConfig,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK)}}t.Notebook=c},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(7),a=r(13),s=n(r(4)),l=r(2),c=r(1);class u extends i.ActionBuilder{constructor(e,t,r){var n;if(super(e),this.dependOnDependencyAssertions=!1,this.proto=c.dataform.Operation.create(),this.session=e,!t)return;const o=this.verifyConfig(t);o.name||(o.name=s.basename(o.filename));const i=l.actionConfigToCompiledGraphTarget(o);return this.proto.target=this.applySessionToTarget(i,e.projectConfig,o.filename,{validateTarget:!0}),this.proto.canonicalTarget=this.applySessionToTarget(i,e.canonicalProjectConfig),r&&(o.filename=l.resolveActionsConfigFilename(o.filename,r),this.queries(l.nativeRequire(o.filename).query)),o.dependOnDependencyAssertions&&this.setDependOnDependencyAssertions(o.dependOnDependencyAssertions),o.dependencyTargets&&this.dependencies(o.dependencyTargets.map(e=>l.configTargetToCompiledGraphTarget(c.dataform.ActionConfig.Target.create(e)))),void 0!==o.hermetic&&this.hermetic(o.hermetic),o.disabled&&this.disabled(),o.tags&&this.tags(o.tags),o.hasOutput&&this.hasOutput(o.hasOutput),o.description&&this.description(o.description),(null===(n=o.columns)||void 0===n?void 0:n.length)&&this.columns(o.columns.map(e=>c.dataform.ActionConfig.ColumnDescriptor.create(e))),o.project&&this.database(o.project),o.dataset&&this.schema(o.dataset),o.filename&&(this.proto.fileName=o.filename),this}queries(e){return this.contextableQueries=e,this}dependencies(e){return(Array.isArray(e)?e:[e]).forEach(e=>{const t=l.checkAssertionsForDependency(this,e);t&&this.proto.dependencyTargets.push(t)}),this}hermetic(e){this.proto.hermeticity=e?c.dataform.ActionHermeticity.HERMETIC:c.dataform.ActionHermeticity.NON_HERMETIC}disabled(e=!0){return this.proto.disabled=e,this}tags(e){return("string"==typeof e?[e]:e).forEach(e=>{this.proto.tags.indexOf(e)<0&&this.proto.tags.push(e)}),this}hasOutput(e){return this.proto.hasOutput=e,this}description(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.description=e,this}columns(e){return this.proto.actionDescriptor||(this.proto.actionDescriptor={}),this.proto.actionDescriptor.columns=a.ColumnDescriptors.mapConfigProtoToCompilationProto(e),this}database(e){return this.proto.target=this.applySessionToTarget(c.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{database:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}schema(e){return this.proto.target=this.applySessionToTarget(c.dataform.Target.create(Object.assign(Object.assign({},this.proto.target),{schema:e})),this.session.projectConfig,this.proto.fileName,{validateTarget:!0}),this}setDependOnDependencyAssertions(e){return this.dependOnDependencyAssertions=e,this}getFileName(){return this.proto.fileName}getTarget(){return c.dataform.Target.create(this.proto.target)}getHasOutput(){return this.proto.hasOutput}compile(){var e,t;(null===(t=null===(e=this.proto.actionDescriptor)||void 0===e?void 0:e.columns)||void 0===t?void 0:t.length)>0&&!this.proto.hasOutput&&this.session.compileError(new Error("Actions of type 'operations' may only describe columns if they specify 'hasOutput: true'."),this.proto.fileName);const r=new p(this).apply(this.contextableQueries);return this.proto.queries="string"==typeof r?[r]:r,o.verifyObjectMatchesProto(c.dataform.Operation,this.proto,o.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}verifyConfig(e){return e.type&&(delete e.type,e.dependencies&&(e.dependencyTargets=e.dependencies.map(e=>"string"==typeof e?{name:e}:e),delete e.dependencies),e.database&&(e.project=e.database,delete e.database),e.schema&&(e.dataset=e.schema,delete e.schema),e.fileName&&(e.filename=e.fileName,delete e.fileName),e.columns&&(e.columns=a.ColumnDescriptors.mapLegacyObjectToConfigProto(e.columns))),o.verifyObjectMatchesProto(c.dataform.ActionConfig.OperationConfig,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK)}}t.Operation=u;class p{constructor(e){this.operation=e}self(){return this.resolve(this.operation.getTarget())}name(){return this.operation.session.finalizeName(this.operation.getTarget().name)}ref(e,...t){return e=l.toResolvable(e,t),l.resolvableAsTarget(e)?(this.operation.dependencies(e),this.resolve(e)):(this.operation.session.compileError(new Error("Action name is not specified")),"")}resolve(e,...t){return this.operation.session.resolve(e,...t)}schema(){return this.operation.session.finalizeSchema(this.operation.getTarget().schema)}database(){return this.operation.getTarget().database?this.operation.session.finalizeDatabase(this.operation.getTarget().database):(this.operation.session.compileError(new Error("Warehouse does not support multiple databases")),"")}dependencies(e){return this.operation.dependencies(e),""}tags(e){return this.operation.tags(e),""}hasOutput(e){return this.operation.hasOutput(e),""}when(e,t,r=""){return e?t:r}apply(e){return"function"==typeof e?e(this):e}}t.OperationContext=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(73);t.targetStringifier=new n.JSONObjectStringifier,t.targetAsReadableString=function(e){const t=[e.name,e.schema];return e.database&&t.push(e.database),t.reverse().join(".")}},function(e,t,r){e.exports=r(46)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(47);t.compiler=n.compiler,t.indexFileGenerator=n.indexFileGenerator,t.main=n.main,t.session=n.session,t.supportedFeatures=n.supportedFeatures,t.version=n.version},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(28);t.compiler=n.compile;const o=r(50);t.main=o.main;const i=r(70),a=r(27);t.version=a.version;const s=r(1);const l=(global._DF_SESSION||(global._DF_SESSION=new i.Session),global._DF_SESSION);t.session=l;const c=[s.dataform.SupportedFeatures.ARRAY_BUFFER_IPC];t.supportedFeatures=c,t.indexFileGenerator=function(){throw new Error("@dataform/cli ^3.0.0 required.")}},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(49)),i="sql",a="jsBlock",s="jsTemplateString",l="innerSqlBlock",c="innerSingleQuote",u="innerDoubleQuote",p="innerTripleSingleQuote",d="innerTripleDoubleQuote",f={START_CONFIG:i+"_startConfig",START_JS:i+"_startJs",START_INCREMENTAL:i+"_startIncremental",START_PRE_OPERATIONS:i+"_startPreOperations",START_POST_OPERATIONS:i+"_startPostOperations",START_INPUT:i+"_startInput",STATEMENT_SEPERATOR:i+"_statementSeparator",SINGLE_LINE_COMMENT:i+"_singleLineComment",MULTI_LINE_COMMENT:i+"_multiLineComment",START_JS_PLACEHOLDER:i+"_startJsPlaceholder",BACKTICK:i+"_backtick",START_QUOTE_SINGLE:i+"_startQuoteSingle",START_QUOTE_DOUBLE:i+"_startQuoteDouble",START_TRIPLE_QUOTE_SINGLE:i+"_startTripleQuoteSingle",START_TRIPLE_QUOTE_DOUBLE:i+"_startTripleQuoteDouble",CAPTURE_EVERYTHING_ELSE:i+"_captureEverythingElse"},h={SINGLE_LINE_COMMENT:a+"_singleLineComment",MULTI_LINE_COMMENT:a+"_multiLineComment",SINGLE_QUOTE_STRING:a+"_singleQuoteString",DOUBLE_QUOTE_STRING:a+"_doubleQuoteString",START_JS_TEMPLATE_STRING:a+"_startJsTemplateString",START_JS_BLOCK:a+"_startJsBlock",CLOSE_BLOCK:a+"_closeBlock",CAPTURE_EVERYTHING_ELSE:a+"_captureEverythingElse"},g={ESCAPED_BACKSLASH:s+"_escapedBackslash",ESCAPED_DOLLAR_BRACE:s+"_escapedDollarBrace",START_JS_BLOCK:s+"_startJsBlock",CLOSE_STRING:s+"_closeString",CAPTURE_EVERYTHING_ELSE:s+"_captureEverythingElse"},y={STATEMENT_SEPERATOR:l+"_statementSeparator",SINGLE_LINE_COMMENT:l+"_singleLineComment",MULTI_LINE_COMMENT:l+"_multiLineComment",START_JS_PLACEHOLDER:l+"_startJsPlaceholder",CLOSE_BLOCK:l+"_closeBlock",BACKTICK:l+"_backtick",START_QUOTE_SINGLE:l+"_startQuoteSingle",START_QUOTE_DOUBLE:l+"_startQuoteDouble",START_TRIPLE_QUOTE_SINGLE:l+"_startTripleQuoteSingle",START_TRIPLE_QUOTE_DOUBLE:l+"_startTripleQuoteDouble",CAPTURE_EVERYTHING_ELSE:l+"_captureEverythingElse"},m={ESCAPED_BACKSLASH:c+"_escapedBackslash",ESCAPED_QUOTE:c+"_escapedQuoteSingle",START_JS_PLACEHOLDER:c+"_startJsPlaceholder",CLOSE_QUOTE:c+"_closeQuoteSingle",CAPTURE_EVERYTHING_ELSE:c+"_captureEverythingElse"},b={ESCAPED_BACKSLASH:u+"_escapedBackslash",ESCAPED_QUOTE:u+"_escapedQuoteDouble",START_JS_PLACEHOLDER:u+"_startJsPlaceholder",CLOSE_QUOTE:u+"_closeQuoteDouble",CAPTURE_EVERYTHING_ELSE:u+"_captureEverythingElse"},O={ESCAPED_BACKSLASH:p+"_escapedBackslash",START_JS_PLACEHOLDER:p+"_startJsPlaceholder",CLOSE_QUOTE:p+"_closeTripleQuoteSingle",CAPTURE_EVERYTHING_ELSE:p+"_captureEverythingElse"},T={ESCAPED_BACKSLASH:d+"_escapedBackslash",START_JS_PLACEHOLDER:d+"_startJsPlaceholder",CLOSE_QUOTE:d+"_closeTripleQuoteDouble",CAPTURE_EVERYTHING_ELSE:d+"_captureEverythingElse"},v=o.states(function(){const e={};e[f.START_CONFIG]={match:"config {",push:a},e[f.START_JS]={match:"js {",push:a},e[f.START_INCREMENTAL]={match:"incremental_where {",push:l},e[f.START_PRE_OPERATIONS]={match:"pre_operations {",push:l},e[f.START_POST_OPERATIONS]={match:"post_operations {",push:l},e[f.START_INPUT]={match:/input "[a-zA-Z0-9_-]+"(?:,\s*"[a-zA-Z0-9_-]+")* {/,push:l},e[f.STATEMENT_SEPERATOR]=/[^\S\r\n]*---[^\S\r\n]*$/,e[f.SINGLE_LINE_COMMENT]=/--.*?$/,e[f.MULTI_LINE_COMMENT]=/\/\*[\s\S]*?\*\//,e[f.START_JS_PLACEHOLDER]={match:"${",push:a},e[f.BACKTICK]="`",e[f.START_TRIPLE_QUOTE_SINGLE]={match:"'''",push:p},e[f.START_TRIPLE_QUOTE_DOUBLE]={match:'"""',push:d},e[f.START_QUOTE_SINGLE]={match:"'",push:c},e[f.START_QUOTE_DOUBLE]={match:'"',push:u},e[f.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const t={};t[h.SINGLE_LINE_COMMENT]=/\/\/.*?$/,t[h.MULTI_LINE_COMMENT]=/\/\*[\s\S]*?\*\//,t[h.SINGLE_QUOTE_STRING]=/'(?:\\['\\]|[^\n'\\])*'/,t[h.DOUBLE_QUOTE_STRING]=/"(?:\\["\\]|[^\n"\\])*"/,t[h.START_JS_TEMPLATE_STRING]={match:"`",push:s},t[h.START_JS_BLOCK]={match:"{",push:a},t[h.CLOSE_BLOCK]={match:"}",pop:1},t[h.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const r={};r[g.ESCAPED_BACKSLASH]=/\\\\/,r[g.ESCAPED_DOLLAR_BRACE]=/\\\${`/,r[g.START_JS_BLOCK]={match:"${",push:a},r[g.CLOSE_STRING]={match:"`",pop:1},r[g.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const n={};n[y.STATEMENT_SEPERATOR]=/[^\S\r\n]*---[^\S\r\n]*$/,n[y.SINGLE_LINE_COMMENT]=/--.*?$/,n[y.MULTI_LINE_COMMENT]=/\/\*[\s\S]*?\*\//,n[y.START_JS_PLACEHOLDER]={match:"${",push:a},n[y.CLOSE_BLOCK]={match:"}",pop:1},n[y.BACKTICK]="`",n[y.START_TRIPLE_QUOTE_SINGLE]={match:"'''",push:p},n[y.START_TRIPLE_QUOTE_DOUBLE]={match:'"""',push:d},n[y.START_QUOTE_SINGLE]={match:"'",push:c},n[y.START_QUOTE_DOUBLE]={match:'"',push:u},n[y.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const o={};o[m.ESCAPED_BACKSLASH]="\\\\",o[m.ESCAPED_QUOTE]="\\'",o[m.START_JS_PLACEHOLDER]={match:"${",push:a},o[m.CLOSE_QUOTE]={match:"'",pop:1},o[m.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const v={};v[b.ESCAPED_BACKSLASH]="\\\\",v[b.ESCAPED_QUOTE]={match:'\\"'},o[b.START_JS_PLACEHOLDER]={match:"${",push:a},v[b.CLOSE_QUOTE]={match:'"',pop:1},v[b.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const w={};w[O.ESCAPED_BACKSLASH]="\\\\",w[O.START_JS_PLACEHOLDER]={match:"${",push:a},w[O.CLOSE_QUOTE]={match:"'''",pop:1},w[O.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const j={};j[T.ESCAPED_BACKSLASH]="\\\\",j[T.START_JS_PLACEHOLDER]={match:"${",push:a},j[T.CLOSE_QUOTE]={match:'"""',pop:1},j[T.CAPTURE_EVERYTHING_ELSE]={match:/[\s\S]+?/,lineBreaks:!0};const A={};return A[i]=e,A[a]=t,A[s]=r,A[l]=n,A[c]=o,A[u]=v,A[p]=w,A[d]=j,A}());var w;!function(e){e[e.JAVASCRIPT=0]="JAVASCRIPT",e[e.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER=1]="JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER",e[e.SQL=2]="SQL",e[e.SQL_COMMENT=3]="SQL_COMMENT",e[e.SQL_LITERAL_STRING=4]="SQL_LITERAL_STRING",e[e.SQL_LITERAL_MULTILINE_STRING=5]="SQL_LITERAL_MULTILINE_STRING",e[e.SQL_STATEMENT_SEPARATOR=6]="SQL_STATEMENT_SEPARATOR"}(w=t.SyntaxTreeNodeType||(t.SyntaxTreeNodeType={}));const j=new Map([[f.START_CONFIG,w.JAVASCRIPT],[f.START_INCREMENTAL,w.SQL],[f.START_INPUT,w.SQL],[f.START_JS,w.JAVASCRIPT],[f.START_JS_PLACEHOLDER,w.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER],[f.START_POST_OPERATIONS,w.SQL],[f.START_PRE_OPERATIONS,w.SQL],[f.START_QUOTE_SINGLE,w.SQL_LITERAL_STRING],[f.START_QUOTE_DOUBLE,w.SQL_LITERAL_STRING],[f.START_TRIPLE_QUOTE_SINGLE,w.SQL_LITERAL_MULTILINE_STRING],[f.START_TRIPLE_QUOTE_DOUBLE,w.SQL_LITERAL_MULTILINE_STRING],[h.START_JS_BLOCK,w.JAVASCRIPT],[g.START_JS_BLOCK,w.JAVASCRIPT],[y.START_JS_PLACEHOLDER,w.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER],[y.START_QUOTE_SINGLE,w.SQL_LITERAL_STRING],[y.START_QUOTE_DOUBLE,w.SQL_LITERAL_STRING],[y.START_TRIPLE_QUOTE_SINGLE,w.SQL_LITERAL_MULTILINE_STRING],[y.START_TRIPLE_QUOTE_DOUBLE,w.SQL_LITERAL_MULTILINE_STRING],[m.START_JS_PLACEHOLDER,w.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER],[b.START_JS_PLACEHOLDER,w.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER],[O.START_JS_PLACEHOLDER,w.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER],[T.START_JS_PLACEHOLDER,w.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER]]),A=new Set([h.CLOSE_BLOCK,y.CLOSE_BLOCK,m.CLOSE_QUOTE,b.CLOSE_QUOTE,O.CLOSE_QUOTE,T.CLOSE_QUOTE]),P=new Map([[f.MULTI_LINE_COMMENT,w.SQL_COMMENT],[f.SINGLE_LINE_COMMENT,w.SQL_COMMENT],[f.STATEMENT_SEPERATOR,w.SQL_STATEMENT_SEPARATOR],[y.MULTI_LINE_COMMENT,w.SQL_COMMENT],[y.SINGLE_LINE_COMMENT,w.SQL_COMMENT],[y.STATEMENT_SEPERATOR,w.SQL_STATEMENT_SEPARATOR]]);class C{constructor(e,t=[]){this.type=e,this.allChildren=t}static create(e){const t=new C(w.SQL);let r=t;const n=[r];v.reset(e);for(const e of v){if(!e.type)throw new Error("Undefined token type encountered.");if(j.has(e.type)){const t=j.get(e.type);if(t===w.SQL&&r.type!==w.SQL)throw new Error("SQL syntax tree nodes may only be children of other SQL nodes.");const o=new C(t,[e.value]);n.push(o),r.push(o),r=o}else A.has(e.type)?(r.push(e.value),n.pop(),r=n[n.length-1]):P.has(e.type)?r.push(new C(P.get(e.type)).push(e.value)):r.push(e.value)}return t}static isSyntaxTreeNode(e){return"string"!=typeof e}children(){return this.allChildren.slice()}concatenate(e){const t=(null==e?void 0:e.has(this.type))?e.get(this.type):e=>e;return this.allChildren.map(e=>"string"==typeof e?t(e):e.concatenate()).join("")}push(e){return this.allChildren.length>0&&"string"==typeof e&&"string"==typeof this.allChildren[this.allChildren.length-1]?(this.allChildren[this.allChildren.length-1]=this.allChildren[this.allChildren.length-1]+e,this):(this.allChildren.push(e),this)}equals(e){if(this.type!==e.type)return!1;if(this.allChildren.length!==e.children().length)return!1;return!this.allChildren.some((t,r)=>{return n=t,o=e.children()[r],!(typeof n==typeof o&&("string"==typeof n||"string"==typeof o?n===o:n.equals(o)));var n,o})}}t.SyntaxTreeNode=C},function(e,t,r){var n,o,i;o=[],void 0===(i="function"==typeof(n=function(){"use strict";var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r="boolean"==typeof(new RegExp).sticky;function n(e){return e&&"[object RegExp]"===t.call(e)}function o(e){return e&&"object"==typeof e&&!n(e)&&!Array.isArray(e)}function i(e){return"("+e+")"}function a(e){return e.length?"(?:"+e.map((function(e){return"(?:"+e+")"})).join("|")+")":"(?!)"}function s(e){if("string"==typeof e)return"(?:"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")";if(n(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function l(t,r){if(o(r)||(r={match:r}),r.include)throw new Error("Matching rules cannot also include states");var i={defaultType:t,lineBreaks:!!r.error||!!r.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var a in r)e.call(r,a)&&(i[a]=r[a]);if("string"==typeof i.type&&t!==i.type)throw new Error("Type transform cannot be a string (type '"+i.type+"' for token '"+t+"')");var s=i.match;return i.match=Array.isArray(s)?s:s?[s]:[],i.match.sort((function(e,t){return n(e)&&n(t)?0:n(t)?-1:n(e)?1:t.length-e.length})),i}function c(e){return Array.isArray(e)?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if(n.include)for(var o=[].concat(n.include),i=0;i<o.length;i++)t.push({include:o[i]});else{if(!n.type)throw new Error("Rule has no type: "+JSON.stringify(n));t.push(l(n.type,n))}}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),r=[],n=0;n<t.length;n++){var i=t[n],a=e[i],s=[].concat(a);if("include"!==i){var c=[];s.forEach((function(e){o(e)?(c.length&&r.push(l(i,c)),r.push(l(i,e)),c=[]):c.push(e)})),c.length&&r.push(l(i,c))}else for(var u=0;u<s.length;u++)r.push({include:s[u]})}return r}(e)}var u=l("error",{lineBreaks:!0,shouldThrow:!0});function p(e,t){for(var o=null,l=Object.create(null),c=!0,p=null,d=[],f=[],h=0;h<e.length;h++)e[h].fallback&&(c=!1);for(h=0;h<e.length;h++){var g=e[h];if(g.include)throw new Error("Inheritance is not allowed in stateless lexers");if(g.error||g.fallback){if(o)throw!g.fallback==!o.fallback?new Error("Multiple "+(g.fallback?"fallback":"error")+" rules not allowed (for token '"+g.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+g.defaultType+"')");o=g}var y=g.match.slice();if(c)for(;y.length&&"string"==typeof y[0]&&1===y[0].length;)l[y.shift().charCodeAt(0)]=g;if(g.pop||g.push||g.next){if(!t)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+g.defaultType+"')");if(g.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+g.defaultType+"')")}if(0!==y.length){c=!1,d.push(g);for(var m=0;m<y.length;m++){var b=y[m];if(n(b))if(null===p)p=b.unicode;else if(p!==b.unicode&&!1===g.fallback)throw new Error("If one rule is /u then all must be")}var O=a(y.map(s)),T=new RegExp(O);if(T.test(""))throw new Error("RegExp matches empty string: "+T);if(new RegExp("|"+O).exec("").length-1>0)throw new Error("RegExp has capture groups: "+T+"\nUse (?: … ) instead");if(!g.lineBreaks&&T.test("\n"))throw new Error("Rule should declare lineBreaks: "+T);f.push(i(O))}}var v=o&&o.fallback,w=r&&!v?"ym":"gm",j=r||v?"":"|";return!0===p&&(w+="u"),{regexp:new RegExp(a(f)+j,w),groups:d,fast:l,error:o||u}}function d(e,t,r){var n=e&&(e.push||e.next);if(n&&!r[n])throw new Error("Missing state '"+n+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var f=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};f.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},f.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedThrow:this.queuedThrow}},f.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},f.prototype.popState=function(){this.setState(this.stack.pop())},f.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var h=r?function(e,t){return e.exec(t)}:function(e,t){var r=e.exec(t);return 0===r[0].length?null:r};function g(){return this.value}if(f.prototype._getGroup=function(e){for(var t=this.groups.length,r=0;r<t;r++)if(void 0!==e[r+1])return this.groups[r];throw new Error("Cannot find token type for matched text")},f.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var r=this.buffer;if(e!==r.length){if(a=this.fast[r.charCodeAt(e)])return this._token(a,r.charAt(e),e);var n=this.re;n.lastIndex=e;var o=h(n,r),i=this.error;if(null==o)return this._token(i,r.slice(e,r.length),e);var a=this._getGroup(o),s=o[0];return i.fallback&&o.index!==e?(this.queuedGroup=a,this.queuedText=s,this._token(i,r.slice(e,o.index),e)):this._token(a,s,e)}},f.prototype._token=function(e,t,r){var n=0;if(e.lineBreaks){var o=/\n/g,i=1;if("\n"===t)n=1;else for(;o.exec(t);)n++,i=o.lastIndex}var a={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:g,offset:r,lineBreaks:n,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=n,0!==n?this.col=s-i+1:this.col+=s,e.shouldThrow)throw new Error(this.formatError(a,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),a},"undefined"!=typeof Symbol&&Symbol.iterator){var y=function(e){this.lexer=e};y.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},y.prototype[Symbol.iterator]=function(){return this},f.prototype[Symbol.iterator]=function(){return new y(this)}}return f.prototype.formatError=function(e,t){if(null==e){var r=this.buffer.slice(this.index);e={text:r,offset:this.index,lineBreaks:-1===r.indexOf("\n")?0:1,line:this.line,col:this.col}}var n=Math.max(0,e.offset-e.col+1),o=e.lineBreaks?e.text.indexOf("\n"):e.text.length,i=this.buffer.substring(n,e.offset+o);return t+=" at line "+e.line+" col "+e.col+":\n\n",t+=" "+i+"\n",t+=" "+Array(e.col).join(" ")+"^"},f.prototype.clone=function(){return new f(this.states,this.state)},f.prototype.has=function(e){return!0},{compile:function(e){var t=p(c(e));return new f({start:t},"start")},states:function(e,t){var r=e.$all?c(e.$all):[];delete e.$all;var n=Object.getOwnPropertyNames(e);t||(t=n[0]);for(var o=Object.create(null),i=0;i<n.length;i++){var a=n[i];o[a]=c(e[a]).concat(r)}for(i=0;i<n.length;i++){a=n[i];for(var s=o[a],l=Object.create(null),u=0;u<s.length;u++){var h=s[u];if(h.include){var g=[u,1];if(h.include!==a&&!l[h.include]){l[h.include]=!0;var y=o[h.include];if(!y)throw new Error("Cannot include nonexistent state '"+h.include+"' (in state '"+a+"')");for(var m=0;m<y.length;m++){var b=y[m];-1===s.indexOf(b)&&g.push(b)}}s.splice.apply(s,g),u--}}}var O=Object.create(null);for(i=0;i<n.length;i++)a=n[i],O[a]=p(o[a],!0);for(i=0;i<n.length;i++){var T=n[i],v=O[T],w=v.groups;for(u=0;u<w.length;u++)d(w[u],T,O);var j=Object.getOwnPropertyNames(v.fast);for(u=0;u<j.length;u++)d(v.fast[j[u]],T,O)}return new f(O,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t=Object.create(null),r=Object.create(null),n=Object.getOwnPropertyNames(e),o=0;o<n.length;o++){var i=n[o],a=e[i];(Array.isArray(a)?a:[a]).forEach((function(e){if((r[e.length]=r[e.length]||[]).push(e),"string"!=typeof e)throw new Error("keyword must be string (in keyword '"+i+"')");t[e]=i}))}function s(e){return JSON.stringify(e)}var l="";for(var c in l+="switch (value.length) {\n",r){var u=r[c];l+="case "+c+":\n",l+="switch (value) {\n",u.forEach((function(e){var r=t[e];l+="case "+s(e)+": return "+s(r)+"\n"})),l+="}\n"}return l+="}\n",Function("value",l)}}})?n.apply(t,o):n)||(e.exports=i)},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const o=r(3),i=r(40),a=r(26),s=r(41),l=r(14),c=r(42),u=r(43),p=r(15),d=r(16),f=n(r(4)),h=r(2),g=r(69),y=r(1);t.main=function(e){var t;const r=global;let n;n="string"==typeof e?o.decode64(y.dataform.CoreExecutionRequest,e):y.dataform.CoreExecutionRequest.decode(e);const m=n.compile;let b=g.readWorkflowSettings();const O=null!==(t=m.compileConfig.projectConfigOverride)&&void 0!==t?t:{};b=y.dataform.ProjectConfig.create(Object.assign(Object.assign(Object.assign({},b),O),{vars:Object.assign(Object.assign({},b.vars),O.vars)}));const T=h.nativeRequire("@dataform/core").session;T.init(m.compileConfig.projectDir,b,b),r.dataform=T;const v={};m.compileConfig.filePaths.filter(e=>e.startsWith("includes"+f.separator)).filter(e=>2===e.split(f.separator).length).filter(e=>"js"===f.fileExtension(e)).forEach(e=>{try{v[f.basename(e)]=h.nativeRequire(e)}catch(t){T.compileError(t,e)}}),Object.assign(r,v),r.publish=T.publish.bind(T),r.operate=T.operate.bind(T),r.assert=T.assert.bind(T),r.declare=T.declare.bind(T),r.notebook=T.notebook.bind(T),r.test=T.test.bind(T),function(e,t){t.filter(e=>e.startsWith("definitions"+f.separator)&&"actions"===f.basename(e)&&"yaml"===f.fileExtension(e)).sort().forEach(t=>{(function(e,t){let r={};try{r=h.nativeRequire(t).asJson}catch(r){e.compileError(r,t)}return o.verifyObjectMatchesProto(y.dataform.ActionConfigs,r,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK),y.dataform.ActionConfigs.fromObject(r)})(e,t).actions.forEach(r=>{const n=y.dataform.ActionConfig.create(r);if(n.table)e.actions.push(new p.Table(e,y.dataform.ActionConfig.TableConfig.create(n.table),t));else if(n.view)e.actions.push(new d.View(e,y.dataform.ActionConfig.ViewConfig.create(n.view),t));else if(n.incrementalTable)e.actions.push(new l.IncrementalTable(e,y.dataform.ActionConfig.IncrementalTableConfig.create(n.incrementalTable),t));else if(n.assertion)e.actions.push(new i.Assertion(e,y.dataform.ActionConfig.AssertionConfig.create(n.assertion),t));else if(n.operation)e.actions.push(new u.Operation(e,y.dataform.ActionConfig.OperationConfig.create(n.operation),t));else if(n.declaration)e.actions.push(new s.Declaration(e,y.dataform.ActionConfig.DeclarationConfig.create(n.declaration)));else if(n.notebook)e.actions.push(new c.Notebook(e,y.dataform.ActionConfig.NotebookConfig.create(n.notebook),t));else{if(!n.dataPreparation)throw Error("Empty action configs are not permitted.");e.actions.push(new a.DataPreparation(e,y.dataform.ActionConfig.DataPreparationConfig.create(n.dataPreparation),t))}})})}(T,m.compileConfig.filePaths),m.compileConfig.filePaths.filter(e=>e.startsWith("definitions"+f.separator)).filter(e=>"js"===f.fileExtension(e)||"sqlx"===f.fileExtension(e)).sort().forEach(e=>{try{h.nativeRequire(e)}catch(t){T.compileError(t,e)}});const w=y.dataform.CoreExecutionResponse.create({compile:{compiledGraph:T.compile()}});return"string"==typeof e?o.encode64(y.dataform.CoreExecutionResponse,w):y.dataform.CoreExecutionResponse.encode(w).finish()}},function(e,t,r){"use strict";e.exports=r(52)},function(e,t,r){"use strict";var n=e.exports=r(53);n.build="full",n.tokenize=r(39),n.parse=r(66),n.common=r(67),n.Root._configure(n.Type,n.parse,n.common)},function(e,t,r){"use strict";var n=e.exports=r(29);n.build="light",n.load=function(e,t,r){return"function"==typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)},n.loadSync=function(e,t){return t||(t=new n.Root),t.loadSync(e)},n.encoder=r(34),n.decoder=r(35),n.verifier=r(36),n.converter=r(37),n.ReflectionObject=r(9),n.Namespace=r(11),n.Root=r(25),n.Enum=r(5),n.Type=r(20),n.Field=r(8),n.OneOf=r(12),n.MapField=r(21),n.Service=r(22),n.Method=r(23),n.Message=r(24),n.wrappers=r(38),n.types=r(10),n.util=r(0),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},function(e,t,r){"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var o=new Array(64),i=new Array(123),a=0;a<64;)i[o[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;n.encode=function(e,t,r){for(var n,i=null,a=[],s=0,l=0;t<r;){var c=e[t++];switch(l){case 0:a[s++]=o[c>>2],n=(3&c)<<4,l=1;break;case 1:a[s++]=o[n|c>>4],n=(15&c)<<2,l=2;break;case 2:a[s++]=o[n|c>>6],a[s++]=o[63&c],l=0}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),s=0)}return l&&(a[s++]=o[n],a[s++]=61,1===l&&(a[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,a.slice(0,s))),i.join("")):String.fromCharCode.apply(String,a.slice(0,s))};n.decode=function(e,t,r){for(var n,o=r,a=0,s=0;s<e.length;){var l=e.charCodeAt(s++);if(61===l&&a>1)break;if(void 0===(l=i[l]))throw Error("invalid encoding");switch(a){case 0:n=l,a=1;break;case 1:t[r++]=n<<2|(48&l)>>4,n=l,a=2;break;case 2:t[r++]=(15&n)<<4|(60&l)>>2,n=l,a=3;break;case 3:t[r++]=(3&n)<<6|l,a=0}}if(1===a)throw Error("invalid encoding");return r-o},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},function(e,t,r){"use strict";function n(){this._listeners={}}e.exports=n,n.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},n.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},function(e,t,r){"use strict";function n(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3]}function i(e,n,o){t[0]=e,n[o]=r[3],n[o+1]=r[2],n[o+2]=r[1],n[o+3]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function s(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?o:i,e.writeFloatBE=n?i:o,e.readFloatLE=n?a:s,e.readFloatBE=n?s:a}():function(){function t(e,t,r,n){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,r,n)}}function r(e,t,r){var n=e(t,r),o=2*(n>>31)+1,i=n>>>23&255,a=8388607&n;return 255===i?a?NaN:o*(1/0):0===i?1401298464324817e-60*o*a:o*Math.pow(2,i-150)*(a+8388608)}e.writeFloatLE=t.bind(null,o),e.writeFloatBE=t.bind(null,i),e.readFloatLE=r.bind(null,a),e.readFloatBE=r.bind(null,s)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3],n[o+4]=r[4],n[o+5]=r[5],n[o+6]=r[6],n[o+7]=r[7]}function i(e,n,o){t[0]=e,n[o]=r[7],n[o+1]=r[6],n[o+2]=r[5],n[o+3]=r[4],n[o+4]=r[3],n[o+5]=r[2],n[o+6]=r[1],n[o+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?o:i,e.writeDoubleBE=n?i:o,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,o,i){var a=n<0?1:0;if(a&&(n=-n),0===n)e(0,o,i+t),e(1/n>0?0:2147483648,o,i+r);else if(isNaN(n))e(0,o,i+t),e(2146959360,o,i+r);else if(n>17976931348623157e292)e(0,o,i+t),e((a<<31|2146435072)>>>0,o,i+r);else{var s;if(n<22250738585072014e-324)e((s=n/5e-324)>>>0,o,i+t),e((a<<31|s/4294967296)>>>0,o,i+r);else{var l=Math.floor(Math.log(n)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(s=n*Math.pow(2,-l))>>>0,o,i+t),e((a<<31|l+1023<<20|1048576*s&1048575)>>>0,o,i+r)}}}function r(e,t,r,n,o){var i=e(n,o+t),a=e(n,o+r),s=2*(a>>31)+1,l=a>>>20&2047,c=4294967296*(1048575&a)+i;return 2047===l?c?NaN:s*(1/0):0===l?5e-324*s*c:s*Math.pow(2,l-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,o,0,4),e.writeDoubleBE=t.bind(null,i,4,0),e.readDoubleLE=r.bind(null,a,0,4),e.readDoubleBE=r.bind(null,s,4,0)}(),e}function o(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function i(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function a(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function s(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=n(n)},function(e,t,r){"use strict";var n=t;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){if(r-t<1)return"";for(var n,o=null,i=[],a=0;t<r;)(n=e[t++])<128?i[a++]=n:n>191&&n<224?i[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[a++]=55296+(n>>10),i[a++]=56320+(1023&n)):i[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0);return o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))},n.write=function(e,t,r){for(var n,o,i=r,a=0;a<e.length;++a)(n=e.charCodeAt(a))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(o=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&o),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n=r||8192,o=n>>>1,i=null,a=n;return function(r){if(r<1||r>o)return e(r);a+r>n&&(i=e(n),a=0);var s=t.call(i,a,a+=r);return 7&a&&(a=1+(7|a)),s}}},function(e,t,r){"use strict";e.exports=o;var n=r(6);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var a=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new o(r,n)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(n.isString(e)){if(!n.Long)return o.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;o.fromHash=function(e){return e===a?i:new o((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},function(e,t,r){"use strict";e.exports=i;var n=r(18);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(6);function i(){n.call(this)}function a(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},i.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},i._configure()},function(e,t,r){"use strict";e.exports=i;var n=r(19);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(6);function i(e){n.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},function(e,t,r){"use strict";e.exports=o;var n=r(6);function o(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(o.prototype=Object.create(n.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,r,o,i,a){if(!i)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,r,o,i);if(s.rpcImpl)try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,r){if(e)return s.emit("error",e,t),a(e);if(null!==r){if(!(r instanceof o))try{r=o[s.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",r,t),a(null,r)}s.end(!0)}))}catch(e){return s.emit("error",e,t),void setTimeout((function(){a(e)}),0)}else setTimeout((function(){a(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},function(e,t,r){"use strict";function n(e,t){"string"==typeof e&&(t=e,e=void 0);var r=[];function o(e){if("string"!=typeof e){var t=i();if(n.verbose&&console.log("codegen: "+t),t="return "+t,e){for(var a=Object.keys(e),s=new Array(a.length+1),l=new Array(a.length),c=0;c<a.length;)s[c]=a[c],l[c]=e[a[c++]];return s[c]=t,Function.apply(null,s).apply(null,l)}return Function(t)()}for(var u=new Array(arguments.length-1),p=0;p<u.length;)u[p]=arguments[++p];if(p=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var r=u[p++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"})),p!==u.length)throw Error("parameter count mismatch");return r.push(e),o}function i(n){return"function "+(n||t||"")+"("+(e&&e.join(",")||"")+"){\n "+r.join("\n ")+"\n}"}return o.toString=i,o}e.exports=n,n.verbose=!1},function(e,t,r){"use strict";e.exports=i;var n=r(30),o=r(31)("fs");function i(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&o&&o.readFile?o.readFile(e,(function(n,o){return n&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,r):n?r(n):r(null,t.binary?o:o.toString("utf8"))})):i.xhr(e,t,r):n(i,this,e,t)}i.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var o=0;o<n.responseText.length;++o)e.push(255&n.responseText.charCodeAt(o))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,n.responseText)}},t.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()}},function(e,t,r){"use strict";var n=t,o=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},i=n.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=o(e),n="";r&&(n=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0&&".."!==t[i-1]?t.splice(--i,2):r?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=i(t)),o(t)?t:(r||(e=i(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?i(e+"/"+t):t)}},function(e,t,r){"use strict";e.exports=A,A.filename=null,A.defaults={keepCase:!1};var n=r(39),o=r(25),i=r(20),a=r(8),s=r(21),l=r(12),c=r(5),u=r(22),p=r(23),d=r(10),f=r(0),h=/^[1-9][0-9]*$/,g=/^-?[1-9][0-9]*$/,y=/^0[x][0-9a-fA-F]+$/,m=/^-?0[x][0-9a-fA-F]+$/,b=/^0[0-7]+$/,O=/^-?0[0-7]+$/,T=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,v=/^[a-zA-Z_][a-zA-Z_0-9]*$/,w=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,j=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function A(e,t,r){t instanceof o||(r=t,t=new o),r||(r=A.defaults);var P,C,S,E,k,x=r.preferTrailingComment||!1,N=n(e,r.alternateCommentMode||!1),D=N.next,_=N.push,q=N.peek,L=N.skip,R=N.cmnt,B=!0,M=!1,I=t,U=r.keepCase?function(e){return e}:f.camelCase;function F(e,t,r){var n=A.filename;return r||(A.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+N.line+")")}function K(){var e,t=[];do{if('"'!==(e=D())&&"'"!==e)throw F(e);t.push(D()),L(e),e=q()}while('"'===e||"'"===e);return t.join("")}function Q(e){var t=D();switch(t){case"'":case'"':return _(t),K();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e,t){var r=1;"-"===e.charAt(0)&&(r=-1,e=e.substring(1));switch(e){case"inf":case"INF":case"Inf":return r*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(h.test(e))return r*parseInt(e,10);if(y.test(e))return r*parseInt(e,16);if(b.test(e))return r*parseInt(e,8);if(T.test(e))return r*parseFloat(e);throw F(e,"number",t)}(t,!0)}catch(r){if(e&&w.test(t))return t;throw F(t,"value")}}function G(e,t){var r,n;do{!t||'"'!==(r=q())&&"'"!==r?e.push([n=J(D()),L("to",!0)?J(D()):n]):e.push(K())}while(L(",",!0));L(";")}function J(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw F(e,"id");if(g.test(e))return parseInt(e,10);if(m.test(e))return parseInt(e,16);if(O.test(e))return parseInt(e,8);throw F(e,"id")}function $(){if(void 0!==P)throw F("package");if(P=D(),!w.test(P))throw F(P,"name");I=I.define(P),L(";")}function V(){var e,t=q();switch(t){case"weak":e=S||(S=[]),D();break;case"public":D();default:e=C||(C=[])}t=K(),L(";"),e.push(t)}function W(){if(L("="),E=K(),!(M="proto3"===E)&&"proto2"!==E)throw F(E,"syntax");L(";")}function H(e,t){switch(t){case"option":return ee(e,t),L(";"),!0;case"message":return Y(e,t),!0;case"enum":return X(e,t),!0;case"service":return function(e,t){if(!v.test(t=D()))throw F(t,"service name");var r=new u(t);z(r,(function(e){if(!H(r,e)){if("rpc"!==e)throw F(e);!function(e,t){var r=R(),n=t;if(!v.test(t=D()))throw F(t,"name");var o,i,a,s,l=t;L("("),L("stream",!0)&&(i=!0);if(!w.test(t=D()))throw F(t);o=t,L(")"),L("returns"),L("("),L("stream",!0)&&(s=!0);if(!w.test(t=D()))throw F(t);a=t,L(")");var c=new p(l,n,o,a,i,s);c.comment=r,z(c,(function(e){if("option"!==e)throw F(e);ee(c,e),L(";")})),e.add(c)}(r,e)}})),e.add(r)}(e,t),!0;case"extend":return function(e,t){if(!w.test(t=D()))throw F(t,"reference");var r=t;z(null,(function(t){switch(t){case"required":case"repeated":Z(e,t,r);break;case"optional":Z(e,M?"proto3_optional":"optional",r);break;default:if(!M||!w.test(t))throw F(t);_(t),Z(e,"optional",r)}}))}(e,t),!0}return!1}function z(e,t,r){var n=N.line;if(e&&("string"!=typeof e.comment&&(e.comment=R()),e.filename=A.filename),L("{",!0)){for(var o;"}"!==(o=D());)t(o);L(";",!0)}else r&&r(),L(";"),e&&("string"!=typeof e.comment||x)&&(e.comment=R(n)||e.comment)}function Y(e,t){if(!v.test(t=D()))throw F(t,"type name");var r=new i(t);z(r,(function(e){if(!H(r,e))switch(e){case"map":!function(e){L("<");var t=D();if(void 0===d.mapKey[t])throw F(t,"type");L(",");var r=D();if(!w.test(r))throw F(r,"type");L(">");var n=D();if(!v.test(n))throw F(n,"name");L("=");var o=new s(U(n),J(D()),t,r);z(o,(function(e){if("option"!==e)throw F(e);ee(o,e),L(";")}),(function(){ne(o)})),e.add(o)}(r);break;case"required":case"repeated":Z(r,e);break;case"optional":Z(r,M?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!v.test(t=D()))throw F(t,"name");var r=new l(U(t));z(r,(function(e){"option"===e?(ee(r,e),L(";")):(_(e),Z(r,"optional"))})),e.add(r)}(r,e);break;case"extensions":G(r.extensions||(r.extensions=[]));break;case"reserved":G(r.reserved||(r.reserved=[]),!0);break;default:if(!M||!w.test(e))throw F(e);_(e),Z(r,"optional")}})),e.add(r)}function Z(e,t,r){var n=D();if("group"!==n){for(;n.endsWith(".")||q().startsWith(".");)n+=D();if(!w.test(n))throw F(n,"type");var o=D();if(!v.test(o))throw F(o,"name");o=U(o),L("=");var s=new a(o,J(D()),n,t,r);if(z(s,(function(e){if("option"!==e)throw F(e);ee(s,e),L(";")}),(function(){ne(s)})),"proto3_optional"===t){var c=new l("_"+o);s.setOption("proto3_optional",!0),c.add(s),e.add(c)}else e.add(s);M||!s.repeated||void 0===d.packed[n]&&void 0!==d.basic[n]||s.setOption("packed",!1,!0)}else!function(e,t){var r=D();if(!v.test(r))throw F(r,"name");var n=f.lcFirst(r);r===n&&(r=f.ucFirst(r));L("=");var o=J(D()),s=new i(r);s.group=!0;var l=new a(n,o,r,t);l.filename=A.filename,z(s,(function(e){switch(e){case"option":ee(s,e),L(";");break;case"required":case"repeated":Z(s,e);break;case"optional":Z(s,M?"proto3_optional":"optional");break;case"message":Y(s,e);break;case"enum":X(s,e);break;default:throw F(e)}})),e.add(s).add(l)}(e,t)}function X(e,t){if(!v.test(t=D()))throw F(t,"name");var r=new c(t);z(r,(function(e){switch(e){case"option":ee(r,e),L(";");break;case"reserved":G(r.reserved||(r.reserved=[]),!0);break;default:!function(e,t){if(!v.test(t))throw F(t,"name");L("=");var r=J(D(),!0),n={options:void 0,setOption:function(e,t){void 0===this.options&&(this.options={}),this.options[e]=t}};z(n,(function(e){if("option"!==e)throw F(e);ee(n,e),L(";")}),(function(){ne(n)})),e.add(t,r,n.comment,n.options)}(r,e)}})),e.add(r)}function ee(e,t){var r=L("(",!0);if(!w.test(t=D()))throw F(t,"name");var n,o=t,i=o;r&&(L(")"),i=o="("+o+")",t=q(),j.test(t)&&(n=t.slice(1),o+=t,D())),L("="),function(e,t,r,n){e.setParsedOption&&e.setParsedOption(t,r,n)}(e,i,te(e,o),n)}function te(e,t){if(L("{",!0)){for(var r={};!L("}",!0);){if(!v.test(k=D()))throw F(k,"name");if(null===k)throw F(k,"end of input");var n,o=k;if(L(":",!0),"{"===q())n=te(e,t+"."+k);else if("["===q()){var i;if(n=[],L("[",!0)){do{i=Q(!0),n.push(i)}while(L(",",!0));L("]"),void 0!==i&&re(e,t+"."+k,i)}}else n=Q(!0),re(e,t+"."+k,n);var a=r[o];a&&(n=[].concat(a).concat(n)),r[o]=n,L(",",!0),L(";",!0)}return r}var s=Q(!0);return re(e,t,s),s}function re(e,t,r){e.setOption&&e.setOption(t,r)}function ne(e){if(L("[",!0)){do{ee(e,"option")}while(L(",",!0));L("]")}return e}for(;null!==(k=D());)switch(k){case"package":if(!B)throw F(k);$();break;case"import":if(!B)throw F(k);V();break;case"syntax":if(!B)throw F(k);W();break;case"option":ee(I,k),L(";");break;default:if(H(I,k)){B=!1;continue}throw F(k)}return A.filename=null,{package:P,imports:C,weakImports:S,syntax:E,root:t}}},function(e,t,r){"use strict";e.exports=i;var n,o=/\/|\./;function i(e,t){o.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),i[e]=t}i("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),i("duration",{Duration:n={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),i("timestamp",{Timestamp:n}),i("empty",{Empty:{fields:{}}}),i("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),i("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),i("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),i.get=function(e){return i[e]||null}},function(e,t,r){"use strict";e.exports=r(29)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(17),o=r(3),i=r(28),a=r(27),s=r(1),l=require;function c(e){var t;try{return l(e)}catch(e){if(e instanceof SyntaxError||e instanceof n.YAMLException)throw e;if(null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.includes(i.INVALID_YAML_ERROR_STRING))throw e;return}}function u(e){const t=s.dataform.ProjectConfig.create();return e.defaultProject&&(t.defaultDatabase=e.defaultProject),e.defaultDataset&&(t.defaultSchema=e.defaultDataset),e.defaultLocation&&(t.defaultLocation=e.defaultLocation),e.defaultAssertionDataset&&(t.assertionSchema=e.defaultAssertionDataset),e.vars&&(t.vars=e.vars),e.projectSuffix&&(t.databaseSuffix=e.projectSuffix),e.datasetSuffix&&(t.schemaSuffix=e.datasetSuffix),e.namePrefix&&(t.tablePrefix=e.namePrefix),e.defaultNotebookRuntimeOptions&&(t.defaultNotebookRuntimeOptions={},e.defaultNotebookRuntimeOptions.outputBucket&&(t.defaultNotebookRuntimeOptions.outputBucket=e.defaultNotebookRuntimeOptions.outputBucket),e.defaultNotebookRuntimeOptions.runtimeTemplateName&&(t.defaultNotebookRuntimeOptions.runtimeTemplateName=e.defaultNotebookRuntimeOptions.runtimeTemplateName)),t.warehouse="bigquery",t}t.readWorkflowSettings=function(){const e=c("workflow_settings.yaml"),t=c("dataform.json");if(e&&t)throw Error("dataform.json has been deprecated and cannot be defined alongside workflow_settings.yaml");if(e){const t=e.asJson;if(!t)throw Error("workflow_settings.yaml is invalid");return u(function(e){let t=s.dataform.WorkflowSettings.create();try{t=s.dataform.WorkflowSettings.create(o.verifyObjectMatchesProto(s.dataform.WorkflowSettings,e,o.VerifyProtoErrorBehaviour.SHOW_DOCS_LINK))}catch(e){if(e instanceof ReferenceError)throw ReferenceError("Workflow settings error: "+e.message);throw e}if(t.dataformCoreVersion&&t.dataformCoreVersion!==a.version)throw Error("Version mismatch: workflow settings specifies version "+t.dataformCoreVersion+`, but ${a.version} was found`);return t}(t))}if(t)try{return s.dataform.ProjectConfig.create(o.verifyObjectMatchesProto(s.dataform.ProjectConfig,t))}catch(e){if(e instanceof ReferenceError)throw ReferenceError("Dataform json error: "+e.message);throw e}throw Error("Failed to resolve workflow_settings.yaml")},t.workflowSettingsAsProjectConfig=u},function(e,t,r){"use strict";(function(e){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(71)),a=r(3),s=r(40),l=r(26),c=r(41),u=r(14),p=r(42),d=r(43),f=r(15),h=r(72),g=r(16),y=r(74),m=r(44),b=o(r(2)),O=r(2),T=r(27),v=r(1),w={defaultSchema:"dataform",assertionSchema:"dataform_assertions"};function j(e){return"view"===e||"table"===e||"incremental"===e}t.Session=class{constructor(e,t,r){this.actionAssertionMap=new A([]),this.init(e,t,r)}init(e,t,r){this.rootDir=e,this.projectConfig=v.dataform.ProjectConfig.create(t||w),this.canonicalProjectConfig=function(e){return v.dataform.ProjectConfig.create({warehouse:e.warehouse,defaultSchema:e.defaultSchema,defaultDatabase:e.defaultDatabase,assertionSchema:e.assertionSchema})}(v.dataform.ProjectConfig.create(r||t||w)),this.actions=[],this.tests={},this.graphErrors={compilationErrors:[]}}compilationSql(){return new y.CompilationSql(this.projectConfig,T.version)}sqlxAction(e){const{sqlxConfig:t}=e,r=t.hasOwnProperty("type")?t.type:"operations";switch(e.sqlStatementCount>1&&"operations"!==r&&this.compileError("Actions may only contain more than one SQL statement if they are of type 'operations'."),t.hasOwnProperty("protected")&&"incremental"!==r&&this.compileError("Actions may only specify 'protected: true' if they are of type 'incremental'."),e.incrementalWhereContextable&&"incremental"!==r&&this.compileError("Actions may only include incremental_where if they are of type 'incremental'."),t.hasOwnProperty("schema")||"declaration"!==r||this.compileError("Actions of type 'declaration' must specify a value for 'schema'."),e.inputContextables.length>0&&"test"!==r&&this.compileError("Actions may only include input blocks if they are of type 'test'."),e.preOperationsContextable&&!j(r)&&this.compileError("Actions may only include pre_operations if they create a dataset."),e.postOperationsContextable&&!j(r)&&this.compileError("Actions may only include post_operations if they create a dataset."),r){case"view":t.filename=b.getCallerFile(this.rootDir);const r=new g.View(this,t).query(t=>e.sqlContextable(t)[0]);e.incrementalWhereContextable&&r.where(e.incrementalWhereContextable),e.preOperationsContextable&&r.preOps(e.preOperationsContextable),e.postOperationsContextable&&r.postOps(e.postOperationsContextable),this.actions.push(r);break;case"incremental":t.filename=b.getCallerFile(this.rootDir);const n=new u.IncrementalTable(this,t).query(t=>e.sqlContextable(t)[0]);e.incrementalWhereContextable&&n.where(e.incrementalWhereContextable),e.preOperationsContextable&&n.preOps(e.preOperationsContextable),e.postOperationsContextable&&n.postOps(e.postOperationsContextable),this.actions.push(n);break;case"table":t.filename=b.getCallerFile(this.rootDir);const o=new f.Table(this,t).query(t=>e.sqlContextable(t)[0]);e.incrementalWhereContextable&&o.where(e.incrementalWhereContextable),e.preOperationsContextable&&o.preOps(e.preOperationsContextable),e.postOperationsContextable&&o.postOps(e.postOperationsContextable),this.actions.push(o);break;case"assertion":t.filename=b.getCallerFile(this.rootDir),this.actions.push(new s.Assertion(this,t).query(t=>e.sqlContextable(t)[0]));break;case"dataPreparation":t.filename=b.getCallerFile(this.rootDir);const i=new l.DataPreparation(this,t).query(t=>e.sqlContextable(t)[0]);this.actions.push(i);break;case"operations":t.filename=b.getCallerFile(this.rootDir),this.actions.push(new d.Operation(this,t).queries(e.sqlContextable));break;case"declaration":const a=new c.Declaration(this,t,b.getCallerFile(this.rootDir));this.actions.push(a);break;case"test":const p=this.test(t.name).config(t).expect(t=>e.sqlContextable(t)[0]);e.inputContextables.forEach(({refName:e,contextable:t})=>{p.input(e,t)});break;default:throw new Error("Unrecognized action type: "+t.type)}}resolve(e,...t){e=O.toResolvable(e,t);const r=this.indexedActions.find(b.resolvableAsTarget(e));if(r.length>1)return this.compileError(new Error(b.ambiguousActionNameMsg(e,r))),"";const n=r.length>0?r[0]:void 0;return n&&n instanceof d.Operation&&!n.getHasOutput()?(this.compileError(new Error("Actions cannot resolve operations which do not produce output.")),""):n?n instanceof c.Declaration?this.compilationSql().resolveTarget(n.getTarget()):this.compilationSql().resolveTarget(Object.assign(Object.assign({},n.getTarget()),{database:n.getTarget().database&&this.finalizeDatabase(n.getTarget().database),schema:this.finalizeSchema(n.getTarget().schema),name:this.finalizeName(n.getTarget().name)})):(this.compileError(new Error("Could not resolve "+JSON.stringify(e))),"")}operate(e,t){const r=b.getCallerFile(this.rootDir);let n;return t&&"object"==typeof t?n=new d.Operation(this,Object.assign({name:e,filename:r},t)):(n=new d.Operation(this,{name:e,filename:r}),t&&n.queries(t)),this.actions.push(n),n}publish(e,t){const r=b.getCallerFile(this.rootDir);let n=new g.View(this,{type:"view",name:e,filename:r});if(t)if("object"==typeof t)if("view"===(null==t?void 0:t.type)||void 0===t.type)n=new g.View(this,Object.assign({type:"view",name:e,filename:r},t));else if("incremental"===(null==t?void 0:t.type))n=new u.IncrementalTable(this,Object.assign(Object.assign({type:"incremental",name:e},t),{filename:r}));else{if("table"!==(null==t?void 0:t.type))throw Error("Unrecognized table type: "+t.type);n=new f.Table(this,Object.assign({type:"table",name:e,filename:r},t))}else n.query(t);return this.actions.push(n),n}assert(e,t){const r=b.getCallerFile(this.rootDir);let n;return t&&"object"==typeof t?n=new s.Assertion(this,Object.assign({name:e,filename:r},t)):(n=new s.Assertion(this,{name:e,filename:r}),t&&n.query(t)),this.actions.push(n),n}declare(e){const t=new c.Declaration(this,e,b.getCallerFile(this.rootDir));return this.actions.push(t),t}test(e){const t=new h.Test(this,{name:e});return t.session=this,t.setFilename(b.getCallerFile(this.rootDir)),this.tests[e]=t,t}notebook(e){const t=b.getCallerFile(this.rootDir),r=new p.Notebook(this,e,t);return this.actions.push(r),r}compileError(t,r,n){const o=r||b.getCallerFile(this.rootDir)||e,i=v.dataform.CompilationError.create({fileName:o,actionName:n?m.targetAsReadableString(n):void 0,actionTarget:n});"string"==typeof t?i.message=t:(i.message=t.message,i.stack=t.stack),this.graphErrors.compilationErrors.push(i)}compile(){if(this.indexedActions=new A(this.actions),"bigquery"!==this.projectConfig.warehouse&&""!==this.projectConfig.warehouse||this.projectConfig.defaultLocation||this.compileError("A defaultLocation is required for BigQuery. This can be configured in workflow_settings.yaml.","workflow_settings.yaml"),this.projectConfig.vars&&!Object.values(this.projectConfig.vars).every(e=>"string"==typeof e))throw new Error("Custom variables defined in workflow settings can only be strings.");const e=v.dataform.CompiledGraph.create({projectConfig:this.projectConfig,tables:this.compileGraphChunk(this.actions.filter(e=>e instanceof f.Table||e instanceof g.View||e instanceof u.IncrementalTable)),operations:this.compileGraphChunk(this.actions.filter(e=>e instanceof d.Operation)),assertions:this.compileGraphChunk(this.actions.filter(e=>e instanceof s.Assertion)),declarations:this.compileGraphChunk(this.actions.filter(e=>e instanceof c.Declaration)),tests:this.compileGraphChunk(Object.values(this.tests)),notebooks:this.compileGraphChunk(this.actions.filter(e=>e instanceof p.Notebook)),dataPreparations:this.compileGraphChunk(this.actions.filter(e=>e instanceof l.DataPreparation)),graphErrors:this.graphErrors,dataformCoreVersion:T.version,targets:this.actions.map(e=>e.getTarget())});return this.fullyQualifyDependencies([].concat(e.tables,e.assertions,e.operations,e.notebooks,e.dataPreparations)),this.alterActionName([].concat(e.tables,e.assertions,e.operations,e.notebooks,e.dataPreparations),[].concat(e.declarations.map(e=>e.target))),this.removeNonUniqueActionsFromCompiledGraph(e),this.checkTestNameUniqueness(e.tests),this.checkCircularity([].concat(e.tables,e.assertions,e.operations,e.notebooks,e.dataPreparations)),a.verifyObjectMatchesProto(v.dataform.CompiledGraph,e,a.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM),e}compileToBase64(){return a.encode64(v.dataform.CompiledGraph,this.compile())}finalizeDatabase(e){return`${e}${this.getDatabaseSuffixWithUnderscore()}`}finalizeSchema(e){return`${e}${this.getSchemaSuffixWithUnderscore()}`}finalizeName(e){return`${this.getTablePrefixWithUnderscore()}${e}`}getDatabaseSuffixWithUnderscore(){return this.projectConfig.databaseSuffix?"_"+this.projectConfig.databaseSuffix:""}getSchemaSuffixWithUnderscore(){return this.projectConfig.schemaSuffix?"_"+this.projectConfig.schemaSuffix:""}getTablePrefixWithUnderscore(){return this.projectConfig.tablePrefix?this.projectConfig.tablePrefix+"_":""}compileGraphChunk(e){const t=[];return e.forEach(e=>{try{const r=e.compile();t.push(r)}catch(t){this.compileError(t,e.getFileName(),e.getTarget())}}),t}fullyQualifyDependencies(e){e.forEach(e=>{const t={};if(!(e instanceof v.dataform.Declaration)&&e.dependencyTargets){for(const r of e.dependencyTargets){const n=this.indexedActions.find(r);if(0===n.length)this.compileError(new Error(`Missing dependency detected: Action "${m.targetAsReadableString(e.target)}" depends on "${b.stringifyResolvable(r)}" which does not exist`),e.fileName,e.target);else if(1===n.length){const e=n[0].getTarget();t[m.targetAsReadableString(e)]=e,r.includeDependentAssertions&&this.actionAssertionMap.find(r).forEach(e=>t[m.targetAsReadableString(e.getTarget())]=e.getTarget())}else this.compileError(new Error(b.ambiguousActionNameMsg(r,n)),e.fileName,e.target)}e.dependencyTargets=Object.values(t)}})}alterActionName(e,t){const{tablePrefix:r,schemaSuffix:n,databaseSuffix:o}=this.projectConfig;if(!r&&!n&&!o)return;const i=new Map;t.forEach(e=>i.set(m.targetStringifier.stringify(e),e)),e.forEach(e=>{i.set(m.targetStringifier.stringify(e.target),Object.assign(Object.assign({},e.target),{database:e.target.database&&`${e.target.database}${this.getDatabaseSuffixWithUnderscore()}`,schema:`${e.target.schema}${this.getSchemaSuffixWithUnderscore()}`,name:`${this.getTablePrefixWithUnderscore()}${e.target.name}`})),e.target=i.get(m.targetStringifier.stringify(e.target))});const a=e=>i.has(m.targetStringifier.stringify(e))?i.get(m.targetStringifier.stringify(e)):e;e.forEach(e=>{e instanceof v.dataform.Declaration||(e.dependencyTargets=(e.dependencyTargets||[]).map(a)),e instanceof v.dataform.Assertion&&e.parentAction&&(e.parentAction=a(e.parentAction))})}checkTestNameUniqueness(e){const t=[];e.forEach(e=>{t.includes(e.name)&&this.compileError(new Error(`Duplicate test name detected: "${e.name}"`),e.fileName),t.push(e.name)})}checkCircularity(e){const t=new Map(e.map(e=>[m.targetStringifier.stringify(e.target),e])),r=new i.default;e.forEach(e=>{const n=(e instanceof v.dataform.Declaration||!e.dependencyTargets?[]:e.dependencyTargets).filter(e=>!!t.get(m.targetStringifier.stringify(e)));r.add(m.targetStringifier.stringify(e.target),n.map(e=>m.targetStringifier.stringify(e)))});r.getCycles().forEach(e=>{const r=t.get(e[0].name),n=`Circular dependency detected in chain: [${e.map(e=>e.name).join(" > ")} > ${m.targetAsReadableString(r.target)}]`;this.compileError(new Error(n),r.fileName,r.target)})}removeNonUniqueActionsFromCompiledGraph(e){function t(e){const t=new Set,r=new Set;return e.forEach(e=>{t.has(m.targetStringifier.stringify(e))&&r.add(m.targetStringifier.stringify(e)),t.add(m.targetStringifier.stringify(e))}),r}const r=[].concat(e.tables,e.assertions,e.operations,e.declarations,e.notebooks,e.dataPreparations),n=t(r.map(e=>e.target)),o=t(r.map(e=>e.canonicalTarget)),i=e=>{const t=n.has(m.targetStringifier.stringify(e.target)),r=o.has(m.targetStringifier.stringify(e.canonicalTarget));return t&&this.compileError(new Error(`Duplicate action name detected. Names within a schema must be unique across tables, declarations, assertions, and operations:\n"${JSON.stringify(e.target)}"`),e.fileName,e.target),r&&this.compileError(new Error(`Duplicate canonical target detected. Canonical targets must be unique across tables, declarations, assertions, and operations:\n"${JSON.stringify(e.canonicalTarget)}"`),e.fileName,e.target),!t&&!r};e.tables=e.tables.filter(i),e.operations=e.operations.filter(i),e.declarations=e.declarations.filter(i),e.assertions=e.assertions.filter(i),e.notebooks=e.notebooks.filter(i),e.dataPreparations=e.dataPreparations.filter(i)}};class A{constructor(e){this.byName=new Map,this.bySchemaAndName=new Map,this.byDatabaseAndName=new Map,this.byDatabaseSchemaAndName=new Map;for(const t of e)this.set(t.getTarget(),t)}set(e,t){if(this.setByNameLevel(this.byName,e.name,t),e.schema&&this.setBySchemaLevel(this.bySchemaAndName,e,t),e.database){this.byDatabaseAndName.has(e.database)||this.byDatabaseAndName.set(e.database,new Map);const r=this.byDatabaseAndName.get(e.database);if(this.setByNameLevel(r,e.name,t),e.schema){this.byDatabaseSchemaAndName.has(e.database)||this.byDatabaseSchemaAndName.set(e.database,new Map);const r=this.byDatabaseSchemaAndName.get(e.database);this.setBySchemaLevel(r,e,t)}}}find(e){var t,r,n,o;return e.database?e.schema?(null===(r=null===(t=this.byDatabaseSchemaAndName.get(e.database))||void 0===t?void 0:t.get(e.schema))||void 0===r?void 0:r.get(e.name))||[]:(null===(n=this.byDatabaseAndName.get(e.database))||void 0===n?void 0:n.get(e.name))||[]:e.schema?(null===(o=this.bySchemaAndName.get(e.schema))||void 0===o?void 0:o.get(e.name))||[]:this.byName.get(e.name)||[]}setByNameLevel(e,t,r){e.has(t)||e.set(t,[]),e.get(t).push(r)}setBySchemaLevel(e,t,r){e.has(t.schema)||e.set(t.schema,new Map);const n=e.get(t.schema);this.setByNameLevel(n,t.name,r)}}}).call(this,"/index.js")},function(e,t){class r{constructor(e,t){this.name=e,this.successors=t,this.reset()}reset(){this.index=-1,this.lowLink=-1,this.onStack=!1,this.visited=!1}}class n{constructor(){this.vertices={}}add(e,t){const n=(t=Array.isArray(t)?t:[t]).map(e=>(this.vertices[e]||(this.vertices[e]=new r(e,[])),this.vertices[e]));return this.vertices[e]||(this.vertices[e]=new r(e)),this.vertices[e].successors=n.concat([]).reverse(),this}reset(){Object.keys(this.vertices).forEach(e=>{this.vertices[e].reset()})}addAndVerify(e,t){this.add(e,t);const r=this.getCycles();if(r.length){let e=`Detected ${r.length} cycle${1===r.length?"":"s"}:`;e+="\n"+r.map(e=>{const t=e.map(e=>e.name);return` ${t.join(" -> ")} -> ${t[0]}`}).join("\n");const t=new Error(e);throw t.cycles=r,t}return this}dfs(e,t){this.reset();const r=[this.vertices[e]];let n;for(;n=r.pop();)n.visited||(t(n),n.visited=!0,n.successors.forEach(e=>r.push(e)))}getDescendants(e){const t=[];let r=!0;return this.dfs(e,e=>{r?r=!1:t.push(e.name)}),t}hasCycle(){return this.getCycles().length>0}getStronglyConnectedComponents(){const e=Object.keys(this.vertices).map(e=>(this.vertices[e].reset(),this.vertices[e]));let t=0;const r=[],n=[],o=e=>{if(e.index=t,e.lowLink=t,t++,r.push(e),e.onStack=!0,e.successors.forEach(t=>{t.index<0?(o(t),e.lowLink=Math.min(e.lowLink,t.lowLink)):t.onStack&&(e.lowLink=Math.min(e.lowLink,t.index))}),e.lowLink===e.index){const t=[];let o;do{o=r.pop(),o.onStack=!1,t.push(o)}while(o!==e);n.push(t)}};return e.forEach((function(e){e.index<0&&o(e)})),n}getCycles(){return this.getStronglyConnectedComponents().filter(e=>{if(e.length>1)return!0;const t=e[0];return t&&t.successors.some(e=>e===t)})}clone(){const e=new n;return Object.keys(this.vertices).forEach(t=>{const r=this.vertices[t];e.add(r.name,r.successors.map(e=>e.name))}),e}toDot(){const e=this.vertices,t=["digraph {"];return this.getCycles().forEach((e,r)=>{t.push(" subgraph cluster"+r+" {"),t.push(" color=red;"),t.push(" "+e.map(e=>e.name).join("; ")+";"),t.push(" }")}),Object.keys(e).forEach(r=>{const n=e[r];n.successors.length&&n.successors.forEach(e=>{t.push(` ${n.name} -> ${e.name}`)})}),t.push("}"),t.join("\n")+"\n"}}e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3),o=r(7),i=r(14),a=r(15),s=r(16),l=r(44),c=r(2),u=r(1),p=c.strictKeysOf()(["type","dataset","name"]);class d extends o.ActionBuilder{constructor(e,t){super(e),this.contextableInputs=new Map,this.proto=u.dataform.Test.create(),this.session=e,t&&this.config(t)}config(e){return c.checkExcessProperties(e=>this.session.compileError(e),e,p,"test config"),e.name&&(this.proto.name=e.name),e.dataset&&this.dataset(e.dataset),this}dataset(e){return this.datasetToTest=e,this}input(e,t){return this.contextableInputs.set(l.targetStringifier.stringify(c.resolvableAsTarget(c.toResolvable(e))),t),this}expect(e){return this.contextableQuery=e,this}getFileName(){return this.proto.fileName}getTarget(){}setFilename(e){this.proto.fileName=e}compile(){const e=new f(this);if(this.datasetToTest){const t=this.session.indexedActions.find(c.resolvableAsTarget(this.datasetToTest));t.length>1&&this.session.compileError(new Error(c.ambiguousActionNameMsg(this.datasetToTest,t)),this.proto.fileName);const r=t.length>0?t[0]:void 0;if(r&&(r instanceof a.Table||r instanceof s.View))if(r instanceof i.IncrementalTable)this.session.compileError(new Error("Running tests on incremental datasets is not yet supported."),this.proto.fileName);else{const t=new h(e);this.proto.testQuery=t.apply(r.contextableQuery)}else this.session.compileError(new Error(`Dataset ${c.stringifyResolvable(this.datasetToTest)} could not be found.`),this.proto.fileName)}else this.session.compileError(new Error("Tests must operate upon a specified dataset."),this.proto.fileName);return this.proto.expectedOutputQuery=e.apply(this.contextableQuery),n.verifyObjectMatchesProto(u.dataform.Test,this.proto,n.VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM)}}t.Test=d;class f{constructor(e){this.test=e}apply(e){return"function"==typeof e?e(this):e}}t.TestContext=f;class h{constructor(e){this.testContext=e}ref(e,...t){return this.resolve(e,...t)}resolve(e,...t){const r=c.resolvableAsTarget(c.toResolvable(e,t));return this.testContext.test.contextableInputs.has(l.targetStringifier.stringify(r))?`(${this.testContext.apply(this.testContext.test.contextableInputs.get(l.targetStringifier.stringify(r)))})`:(this.testContext.test.session.compileError(new Error(`Input for dataset "${JSON.stringify(r)}" has not been provided. Provided inputs: ${Array.from(this.testContext.test.contextableInputs.keys()).map(e=>JSON.stringify(e))}`)),"")}apply(e){return"function"==typeof e?e(this):e}config(e){return""}self(){return""}name(){return""}type(e){return""}schema(){return""}database(){return""}where(e){return""}when(e,t,r=""){return e?t:r}incremental(){return!1}preOps(e){return""}postOps(e){return""}disabled(){return""}dependencies(e){return""}tags(e){return""}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.JSONObjectStringifier=class{stringify(e){return JSON.stringify(Object.keys(e).sort().reduce((t,r)=>Object.assign(Object.assign({},t),{[r]:e[r]}),{}))}parse(e){return JSON.parse(e)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CompilationSql=class{constructor(e,t){this.project=e,this.dataformCoreVersion=t}resolveTarget(e){const t=e.database||this.project.defaultDatabase;return t?`\`${t}.${e.schema||this.project.defaultSchema}.${e.name}\``:`\`${e.schema||this.project.defaultSchema}.${e.name}\``}sqlString(e){return`'${e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}indexAssertion(e,t){const r=t.join(", ");return`\nSELECT\n *\nFROM (\n SELECT\n ${r},\n COUNT(1) AS index_row_count\n FROM ${e}\n GROUP BY ${r}\n ) AS data\nWHERE index_row_count > 1\n`}rowConditionsAssertion(e,t){return t.map(t=>`\nSELECT\n ${this.sqlString(t)} AS failing_row_condition,\n *\nFROM ${e}\nWHERE NOT (${t})\n`).join("UNION ALL")}}}]);