(opts) => {
      if (
        (opts.url as string).indexOf(
          `/_api/web/getfilebyserverrelativeurl('/sites/team-a/SitePages/page.aspx')?$expand=ListItemAllFields/ClientSideApplicationId`
        ) > -1
      ) {
        return Promise.resolve({
          ListItemAllFields: {
            CommentsDisabled: false,
            FileSystemObjectType: 0,
            Id: 1,
            ServerRedirectedEmbedUri: null,
            ServerRedirectedEmbedUrl: '',
            ContentTypeId: '0x0101009D1CB255DA76424F860D91F20E6C41180062FDF2882AB3F745ACB63105A3C623C9',
            FileLeafRef: 'Home.aspx',
            ComplianceAssetId: null,
            WikiField: null,
            Title: 'Home',
            ClientSideApplicationId: 'b6917cb1-93a0-4b97-a84d-7cf49975d4ec',
            PageLayoutType: 'Home',
            CanvasContent1:
              '

',
            BannerImageUrl: {
              Description: '/_layouts/15/images/sitepagethumbnail.png',
              Url: 'https://contoso.sharepoint.com/_layouts/15/images/sitepagethumbnail.png'
            },
            Description: 'Lorem ipsum Dolor samet Lorem ipsum',
            PromotedState: null,
            FirstPublishedDate: null,
            LayoutWebpartsContent: null,
            AuthorsId: null,
            AuthorsStringId: null,
            OriginalSourceUrl: null,
            ID: 1,
            Created: '2018-01-20T09:54:41',
            AuthorId: 1073741823,
            Modified: '2018-04-12T12:42:47',
            EditorId: 12,
            OData__CopySource: null,
            CheckoutUserId: null,
            OData__UIVersionString: '7.0',
            GUID: 'edaab907-e729-48dd-9e73-26487c0cf592'
          },
          CheckInComment: '',
          CheckOutType: 2,
          ContentTag: '{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25,1',
          CustomizedPageStatus: 1,
          ETag: '"{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25"',
          Exists: true,
          IrmEnabled: false,
          Length: '805',
          Level: 1,
          LinkingUri: null,
          LinkingUrl: '',
          MajorVersion: 7,
          MinorVersion: 0,
          Name: 'home.aspx',
          ServerRelativeUrl: '/sites/team-a/SitePages/home.aspx',
          TimeCreated: '2018-01-20T08:54:41Z',
          TimeLastModified: '2018-04-12T10:42:46Z',
          Title: 'Home',
          UIVersion: 3584,
          UIVersionLabel: '7.0',
          UniqueId: 'e82a21d1-ca2c-4854-98f2-012ac0e7fa09'
        });
      }

      return Promise.reject('Invalid request');
    }


(opts) => {
      if ((opts.url as string).indexOf(`/_api/web/getfilebyserverrelativeurl('/sites/team-a/SitePages/page.aspx')/ListItemAllFields`) > -1 &&
        JSON.stringify(opts.data).endsWith(`position":{"controlIndex":1,"sectionFactor":12,"sectionIndex":1,"zoneIndex":1}}\">

Hello world

`)) {
        return Promise.resolve({});
      }

      return Promise.reject('Invalid request');
    }


(done) => {
    sinon.stub(request, 'get').callsFake((opts) => {
      if ((opts.url as string).indexOf(`/_api/web/getfilebyserverrelativeurl('/sites/team-a/SitePages/foo.aspx')?$expand=ListItemAllFields/ClientSideApplicationId`) > -1) {
        return Promise.reject({ error: { 'odata.error': { message: { value: 'The file /sites/team-a/SitePages/foo.aspx does not exist' } } } });
      }

      return Promise.reject('Invalid request');
    });

    command.action(logger,
      {
        options: {
          debug: false,
          pageName: 'foo.aspx',
          webUrl: 'https://contoso.sharepoint.com/sites/team-a',
          text: 'Hello world'
        }
      },
      (err?: any) => {
        try {
          assert.strictEqual(JSON.stringify(err), JSON.stringify(new CommandError('The file /sites/team-a/SitePages/foo.aspx does not exist')));
          done();
        } catch (e) {
          done(e);
        }
      }
    );
  }


(opts) => {
      if ((opts.url as string).indexOf(`/_api/web/getfilebyserverrelativeurl('/sites/team-a/SitePages/foo.aspx')?$expand=ListItemAllFields/ClientSideApplicationId`) > -1) {
        return Promise.reject({ error: { 'odata.error': { message: { value: 'The file /sites/team-a/SitePages/foo.aspx does not exist' } } } });
      }

      return Promise.reject('Invalid request');
    }


(err?: any) => {
        try {
          assert.strictEqual(JSON.stringify(err), JSON.stringify(new CommandError('The file /sites/team-a/SitePages/foo.aspx does not exist')));
          done();
        } catch (e) {
          done(e);
        }
      }


(done) => {
    sinon.stub(request, 'get').callsFake((opts) => {
      if ((opts.url as string).indexOf(`/_api/web/getfilebyserverrelativeurl('/sites/team-a/SitePages/page.aspx')?$expand=ListItemAllFields/ClientSideApplicationId`) > -1) {
        return Promise.resolve({
          ListItemAllFields: {
            CommentsDisabled: false,
            FileSystemObjectType: 0,
            Id: 1,
            ServerRedirectedEmbedUri: null,
            ServerRedirectedEmbedUrl: '',
            ContentTypeId: '0x0101009D1CB255DA76424F860D91F20E6C41180062FDF2882AB3F745ACB63105A3C623C9',
            FileLeafRef: 'page.aspx',
            ComplianceAssetId: null,
            WikiField: null,
            Title: 'Page',
            ClientSideApplicationId: 'b6917cb1-93a0-4b97-a84d-7cf49975d4ec',
            PageLayoutType: 'Article',
            CanvasContent1:
              '

',
            BannerImageUrl: {
              Description: '/_layouts/15/images/sitepagethumbnail.png',
              Url: 'https://contoso.sharepoint.com/_layouts/15/images/sitepagethumbnail.png'
            },
            Description: 'Lorem ipsum Dolor samet Lorem ipsum',
            PromotedState: null,
            FirstPublishedDate: null,
            LayoutWebpartsContent: null,
            AuthorsId: null,
            AuthorsStringId: null,
            OriginalSourceUrl: null,
            ID: 1,
            Created: '2018-01-20T09:54:41',
            AuthorId: 1073741823,
            Modified: '2018-04-12T12:42:47',
            EditorId: 12,
            OData__CopySource: null,
            CheckoutUserId: null,
            OData__UIVersionString: '7.0',
            GUID: 'edaab907-e729-48dd-9e73-26487c0cf592'
          },
          CheckInComment: '',
          CheckOutType: 2,
          ContentTag: '{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25,1',
          CustomizedPageStatus: 1,
          ETag: '"{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25"',
          Exists: true,
          IrmEnabled: false,
          Length: '805',
          Level: 1,
          LinkingUri: null,
          LinkingUrl: '',
          MajorVersion: 7,
          MinorVersion: 0,
          Name: 'home.aspx',
          ServerRelativeUrl: '/sites/team-a/SitePages/page.aspx',
          TimeCreated: '2018-01-20T08:54:41Z',
          TimeLastModified: '2018-04-12T10:42:46Z',
          Title: 'Home',
          UIVersion: 3584,
          UIVersionLabel: '7.0',
          UniqueId: 'e82a21d1-ca2c-4854-98f2-012ac0e7fa09'
        });
      }

      return Promise.reject('Invalid request');
    });

    sinon.stub(request, 'post').callsFake((opts) => {
      return Promise.reject({ error: { 'odata.error': { message: { value: 'An error has occurred' } } } });
    });

    command.action(logger,
      {
        options: {
          debug: false,
          pageName: 'page.aspx',
          webUrl: 'https://contoso.sharepoint.com/sites/team-a',
          text: 'Hello world'
        }
      },
      (err?: any) => {
        try {
          assert.strictEqual(JSON.stringify(err), JSON.stringify(new CommandError('An error has occurred')));
          done();
        } catch (e) {
          done(e);
        }
      }
    );
  }


(opts) => {
      if ((opts.url as string).indexOf(`/_api/web/getfilebyserverrelativeurl('/sites/team-a/SitePages/page.aspx')?$expand=ListItemAllFields/ClientSideApplicationId`) > -1) {
        return Promise.resolve({
          ListItemAllFields: {
            CommentsDisabled: false,
            FileSystemObjectType: 0,
            Id: 1,
            ServerRedirectedEmbedUri: null,
            ServerRedirectedEmbedUrl: '',
            ContentTypeId: '0x0101009D1CB255DA76424F860D91F20E6C41180062FDF2882AB3F745ACB63105A3C623C9',
            FileLeafRef: 'page.aspx',
            ComplianceAssetId: null,
            WikiField: null,
            Title: 'Page',
            ClientSideApplicationId: 'b6917cb1-93a0-4b97-a84d-7cf49975d4ec',
            PageLayoutType: 'Article',
            CanvasContent1:
              '

',
            BannerImageUrl: {
              Description: '/_layouts/15/images/sitepagethumbnail.png',
              Url: 'https://contoso.sharepoint.com/_layouts/15/images/sitepagethumbnail.png'
            },
            Description: 'Lorem ipsum Dolor samet Lorem ipsum',
            PromotedState: null,
            FirstPublishedDate: null,
            LayoutWebpartsContent: null,
            AuthorsId: null,
            AuthorsStringId: null,
            OriginalSourceUrl: null,
            ID: 1,
            Created: '2018-01-20T09:54:41',
            AuthorId: 1073741823,
            Modified: '2018-04-12T12:42:47',
            EditorId: 12,
            OData__CopySource: null,
            CheckoutUserId: null,
            OData__UIVersionString: '7.0',
            GUID: 'edaab907-e729-48dd-9e73-26487c0cf592'
          },
          CheckInComment: '',
          CheckOutType: 2,
          ContentTag: '{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25,1',
          CustomizedPageStatus: 1,
          ETag: '"{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25"',
          Exists: true,
          IrmEnabled: false,
          Length: '805',
          Level: 1,
          LinkingUri: null,
          LinkingUrl: '',
          MajorVersion: 7,
          MinorVersion: 0,
          Name: 'home.aspx',
          ServerRelativeUrl: '/sites/team-a/SitePages/page.aspx',
          TimeCreated: '2018-01-20T08:54:41Z',
          TimeLastModified: '2018-04-12T10:42:46Z',
          Title: 'Home',
          UIVersion: 3584,
          UIVersionLabel: '7.0',
          UniqueId: 'e82a21d1-ca2c-4854-98f2-012ac0e7fa09'
        });
      }

      return Promise.reject('Invalid request');
    }


(opts) => {
      return Promise.reject({ error: { 'odata.error': { message: { value: 'An error has occurred' } } } });
    }


(err?: any) => {
        try {
          assert.strictEqual(JSON.stringify(err), JSON.stringify(new CommandError('An error has occurred')));
          done();
        } catch (e) {
          done(e);
        }
      }


(done) => {
    sinon.stub(request, 'get').callsFake((opts) => {
      if ((opts.url as string).indexOf(`/_api/web/getfilebyserverrelativeurl('/sites/team-a/SitePages/page.aspx')?$expand=ListItemAllFields/ClientSideApplicationId`) > -1) {
        return Promise.resolve({
          ListItemAllFields: {
            CommentsDisabled: false,
            FileSystemObjectType: 0,
            Id: 1,
            ServerRedirectedEmbedUri: null,
            ServerRedirectedEmbedUrl: '',
            ContentTypeId: '0x0101009D1CB255DA76424F860D91F20E6C41180062FDF2882AB3F745ACB63105A3C623C9',
            FileLeafRef: 'Page.aspx',
            ComplianceAssetId: null,
            WikiField: null,
            Title: 'Page',
            Description: 'Lorem ipsum Dolor samet Lorem ipsum',
            PromotedState: null,
            FirstPublishedDate: null,
            LayoutWebpartsContent: null,
            AuthorsId: null,
            AuthorsStringId: null,
            OriginalSourceUrl: null,
            ID: 1,
            Created: '2018-01-20T09:54:41',
            AuthorId: 1073741823,
            Modified: '2018-04-12T12:42:47',
            EditorId: 12,
            OData__CopySource: null,
            CheckoutUserId: null,
            OData__UIVersionString: '7.0',
            GUID: 'edaab907-e729-48dd-9e73-26487c0cf592'
          },
          CheckInComment: '',
          CheckOutType: 2,
          ContentTag: '{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25,1',
          CustomizedPageStatus: 1,
          ETag: '"{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25"',
          Exists: true,
          IrmEnabled: false,
          Length: '805',
          Level: 1,
          LinkingUri: null,
          LinkingUrl: '',
          MajorVersion: 7,
          MinorVersion: 0,
          Name: 'home.aspx',
          ServerRelativeUrl: '/sites/team-a/SitePages/page.aspx',
          TimeCreated: '2018-01-20T08:54:41Z',
          TimeLastModified: '2018-04-12T10:42:46Z',
          Title: 'Home',
          UIVersion: 3584,
          UIVersionLabel: '7.0',
          UniqueId: 'e82a21d1-ca2c-4854-98f2-012ac0e7fa09'
        });
      }

      return Promise.reject('Invalid request');
    });

    command.action(logger,
      {
        options: {
          debug: false,
          pageName: 'page.aspx',
          webUrl: 'https://contoso.sharepoint.com/sites/team-a',
          text: 'Hello world'
        }
      },
      (err?: any) => {
        try {
          assert.strictEqual(JSON.stringify(err), JSON.stringify(new CommandError(`Page page.aspx is not a modern page.`)));
          done();
        } catch (e) {
          done(e);
        }
      }
    );
  }


(opts) => {
      if ((opts.url as string).indexOf(`/_api/web/getfilebyserverrelativeurl('/sites/team-a/SitePages/page.aspx')?$expand=ListItemAllFields/ClientSideApplicationId`) > -1) {
        return Promise.resolve({
          ListItemAllFields: {
            CommentsDisabled: false,
            FileSystemObjectType: 0,
            Id: 1,
            ServerRedirectedEmbedUri: null,
            ServerRedirectedEmbedUrl: '',
            ContentTypeId: '0x0101009D1CB255DA76424F860D91F20E6C41180062FDF2882AB3F745ACB63105A3C623C9',
            FileLeafRef: 'Page.aspx',
            ComplianceAssetId: null,
            WikiField: null,
            Title: 'Page',
            Description: 'Lorem ipsum Dolor samet Lorem ipsum',
            PromotedState: null,
            FirstPublishedDate: null,
            LayoutWebpartsContent: null,
            AuthorsId: null,
            AuthorsStringId: null,
            OriginalSourceUrl: null,
            ID: 1,
            Created: '2018-01-20T09:54:41',
            AuthorId: 1073741823,
            Modified: '2018-04-12T12:42:47',
            EditorId: 12,
            OData__CopySource: null,
            CheckoutUserId: null,
            OData__UIVersionString: '7.0',
            GUID: 'edaab907-e729-48dd-9e73-26487c0cf592'
          },
          CheckInComment: '',
          CheckOutType: 2,
          ContentTag: '{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25,1',
          CustomizedPageStatus: 1,
          ETag: '"{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25"',
          Exists: true,
          IrmEnabled: false,
          Length: '805',
          Level: 1,
          LinkingUri: null,
          LinkingUrl: '',
          MajorVersion: 7,
          MinorVersion: 0,
          Name: 'home.aspx',
          ServerRelativeUrl: '/sites/team-a/SitePages/page.aspx',
          TimeCreated: '2018-01-20T08:54:41Z',
          TimeLastModified: '2018-04-12T10:42:46Z',
          Title: 'Home',
          UIVersion: 3584,
          UIVersionLabel: '7.0',
          UniqueId: 'e82a21d1-ca2c-4854-98f2-012ac0e7fa09'
        });
      }

      return Promise.reject('Invalid request');
    }


(err?: any) => {
        try {
          assert.strictEqual(JSON.stringify(err), JSON.stringify(new CommandError(`Page page.aspx is not a modern page.`)));
          done();
        } catch (e) {
          done(e);
        }
      }


(done) => {
    sinon.stub(request, 'get').callsFake((opts) => {
      if ((opts.url as string).indexOf(`/_api/web/getfilebyserverrelativeurl('/sites/team-a/SitePages/page.aspx')?$expand=ListItemAllFields/ClientSideApplicationId`) > -1) {
        return Promise.resolve({
          ListItemAllFields: {
            CommentsDisabled: false,
            FileSystemObjectType: 0,
            Id: 1,
            ServerRedirectedEmbedUri: null,
            ServerRedirectedEmbedUrl: '',
            ContentTypeId: '0x0101009D1CB255DA76424F860D91F20E6C41180062FDF2882AB3F745ACB63105A3C623C9',
            FileLeafRef: 'page.aspx',
            ComplianceAssetId: null,
            WikiField: null,
            Title: 'Page',
            ClientSideApplicationId: 'b6917cb1-93a0-4b97-a84d-7cf49975d4ec',
            PageLayoutType: 'Article',
            CanvasContent1:
              '

',
            BannerImageUrl: {
              Description: '/_layouts/15/images/sitepagethumbnail.png',
              Url: 'https://contoso.sharepoint.com/_layouts/15/images/sitepagethumbnail.png'
            },
            Description: 'Lorem ipsum Dolor samet Lorem ipsum',
            PromotedState: null,
            FirstPublishedDate: null,
            LayoutWebpartsContent: null,
            AuthorsId: null,
            AuthorsStringId: null,
            OriginalSourceUrl: null,
            ID: 1,
            Created: '2018-01-20T09:54:41',
            AuthorId: 1073741823,
            Modified: '2018-04-12T12:42:47',
            EditorId: 12,
            OData__CopySource: null,
            CheckoutUserId: null,
            OData__UIVersionString: '7.0',
            GUID: 'edaab907-e729-48dd-9e73-26487c0cf592'
          },
          CheckInComment: '',
          CheckOutType: 2,
          ContentTag: '{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25,1',
          CustomizedPageStatus: 1,
          ETag: '"{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25"',
          Exists: true,
          IrmEnabled: false,
          Length: '805',
          Level: 1,
          LinkingUri: null,
          LinkingUrl: '',
          MajorVersion: 7,
          MinorVersion: 0,
          Name: 'home.aspx',
          ServerRelativeUrl: '/sites/team-a/SitePages/page.aspx',
          TimeCreated: '2018-01-20T08:54:41Z',
          TimeLastModified: '2018-04-12T10:42:46Z',
          Title: 'Home',
          UIVersion: 3584,
          UIVersionLabel: '7.0',
          UniqueId: 'e82a21d1-ca2c-4854-98f2-012ac0e7fa09'
        });
      }

      return Promise.reject('Invalid request');
    });

    command.action(logger,
      {
        options: {
          debug: false,
          pageName: 'page.aspx',
          webUrl: 'https://contoso.sharepoint.com/sites/team-a',
          text: 'Hello world',
          section: 8
        }
      },
      (err?: any) => {
        try {
          assert.strictEqual(JSON.stringify(err), JSON.stringify(new CommandError("Invalid section '8'")));
          done();
        } catch (e) {
          done(e);
        }
      }
    );
  }


(err?: any) => {
        try {
          assert.strictEqual(JSON.stringify(err), JSON.stringify(new CommandError("Invalid section '8'")));
          done();
        } catch (e) {
          done(e);
        }
      }


(done) => {
    sinon.stub(request, 'get').callsFake((opts) => {
      if ((opts.url as string).indexOf(`/_api/web/getfilebyserverrelativeurl('/sites/team-a/SitePages/page.aspx')?$expand=ListItemAllFields/ClientSideApplicationId`) > -1) {
        return Promise.resolve({
          ListItemAllFields: {
            CommentsDisabled: false,
            FileSystemObjectType: 0,
            Id: 1,
            ServerRedirectedEmbedUri: null,
            ServerRedirectedEmbedUrl: '',
            ContentTypeId: '0x0101009D1CB255DA76424F860D91F20E6C41180062FDF2882AB3F745ACB63105A3C623C9',
            FileLeafRef: 'page.aspx',
            ComplianceAssetId: null,
            WikiField: null,
            Title: 'Page',
            ClientSideApplicationId: 'b6917cb1-93a0-4b97-a84d-7cf49975d4ec',
            PageLayoutType: 'Article',
            CanvasContent1:
              '

',
            BannerImageUrl: {
              Description: '/_layouts/15/images/sitepagethumbnail.png',
              Url: 'https://contoso.sharepoint.com/_layouts/15/images/sitepagethumbnail.png'
            },
            Description: 'Lorem ipsum Dolor samet Lorem ipsum',
            PromotedState: null,
            FirstPublishedDate: null,
            LayoutWebpartsContent: null,
            AuthorsId: null,
            AuthorsStringId: null,
            OriginalSourceUrl: null,
            ID: 1,
            Created: '2018-01-20T09:54:41',
            AuthorId: 1073741823,
            Modified: '2018-04-12T12:42:47',
            EditorId: 12,
            OData__CopySource: null,
            CheckoutUserId: null,
            OData__UIVersionString: '7.0',
            GUID: 'edaab907-e729-48dd-9e73-26487c0cf592'
          },
          CheckInComment: '',
          CheckOutType: 2,
          ContentTag: '{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25,1',
          CustomizedPageStatus: 1,
          ETag: '"{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25"',
          Exists: true,
          IrmEnabled: false,
          Length: '805',
          Level: 1,
          LinkingUri: null,
          LinkingUrl: '',
          MajorVersion: 7,
          MinorVersion: 0,
          Name: 'home.aspx',
          ServerRelativeUrl: '/sites/team-a/SitePages/page.aspx',
          TimeCreated: '2018-01-20T08:54:41Z',
          TimeLastModified: '2018-04-12T10:42:46Z',
          Title: 'Home',
          UIVersion: 3584,
          UIVersionLabel: '7.0',
          UniqueId: 'e82a21d1-ca2c-4854-98f2-012ac0e7fa09'
        });
      }

      return Promise.reject('Invalid request');
    });

    command.action(logger,
      {
        options: {
          debug: false,
          pageName: 'page.aspx',
          webUrl: 'https://contoso.sharepoint.com/sites/team-a',
          text: 'Hello world',
          section: 1,
          column: 7
        }
      },
      (err?: any) => {
        try {
          assert.strictEqual(JSON.stringify(err), JSON.stringify(new CommandError("Invalid column '7'")));
          done();
        } catch (e) {
          done(e);
        }
      }
    );
  }


(err?: any) => {
        try {
          assert.strictEqual(JSON.stringify(err), JSON.stringify(new CommandError("Invalid column '7'")));
          done();
        } catch (e) {
          done(e);
        }
      }


(done) => {
    sinon.stub(request, 'get').callsFake((opts) => {
      if ((opts.url as string).indexOf(`/_api/web/getfilebyserverrelativeurl('/sites/team-a/SitePages/page.aspx')?$expand=ListItemAllFields/ClientSideApplicationId`) > -1) {
        return Promise.resolve({
          ListItemAllFields: {
            CommentsDisabled: false,
            FileSystemObjectType: 0,
            Id: 1,
            ServerRedirectedEmbedUri: null,
            ServerRedirectedEmbedUrl: '',
            ContentTypeId: '0x0101009D1CB255DA76424F860D91F20E6C41180062FDF2882AB3F745ACB63105A3C623C9',
            FileLeafRef: 'page.aspx',
            ComplianceAssetId: null,
            WikiField: null,
            Title: 'Page',
            ClientSideApplicationId: 'b6917cb1-93a0-4b97-a84d-7cf49975d4ec',
            PageLayoutType: 'Article',
            CanvasContent1:
              '

',
            BannerImageUrl: {
              Description: '/_layouts/15/images/sitepagethumbnail.png',
              Url: 'https://contoso.sharepoint.com/_layouts/15/images/sitepagethumbnail.png'
            },
            Description: 'Lorem ipsum Dolor samet Lorem ipsum',
            PromotedState: null,
            FirstPublishedDate: null,
            LayoutWebpartsContent: null,
            AuthorsId: null,
            AuthorsStringId: null,
            OriginalSourceUrl: null,
            ID: 1,
            Created: '2018-01-20T09:54:41',
            AuthorId: 1073741823,
            Modified: '2018-04-12T12:42:47',
            EditorId: 12,
            OData__CopySource: null,
            CheckoutUserId: null,
            OData__UIVersionString: '7.0',
            GUID: 'edaab907-e729-48dd-9e73-26487c0cf592'
          },
          CheckInComment: '',
          CheckOutType: 2,
          ContentTag: '{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25,1',
          CustomizedPageStatus: 1,
          ETag: '"{E82A21D1-CA2C-4854-98F2-012AC0E7FA09},25"',
          Exists: true,
          IrmEnabled: false,
          Length: '805',
          Level: 1,
          LinkingUri: null,
          LinkingUrl: '',
          MajorVersion: 7,
          MinorVersion: 0,
          Name: 'home.aspx',
          ServerRelativeUrl: '/sites/team-a/SitePages/page.aspx',
          TimeCreated: '2018-01-20T08:54:41Z',
          TimeLastModified: '2018-04-12T10:42:46Z',
          Title: 'Home',
          UIVersion: 3584,
          UIVersionLabel: '7.0',
          UniqueId: 'e82a21d1-ca2c-4854-98f2-012ac0e7fa09'
        });
      }

      return Promise.reject('Invalid request');
    });

    command.action(logger,
      {
        options: {
          debug: false,
          pageName: 'page.aspx',
          webUrl: 'https://contoso.sharepoint.com/sites/team-a',
          text: 'Hello world',
          section: 1,
          column: 1
        }
      },
      (err?: any) => {
        try {
          assert.strictEqual(JSON.stringify(new CommandError("Unexpected end of JSON input")), JSON.stringify(err));
          done();
        } catch (e) {
          done(e);
        }
      }
    );
  }


(err?: any) => {
        try {
          assert.strictEqual(JSON.stringify(new CommandError("Unexpected end of JSON input")), JSON.stringify(err));
          done();
        } catch (e) {
          done(e);
        }
      }


() => {
    const options = command.options() as CommandOption[];
    let containsOption = false;
    options.forEach((o) => {
      if (o.option === '--debug') {
        containsOption = true;
      }
    });
    assert(containsOption);
  }


(o) => {
      if (o.option === '--debug') {
        containsOption = true;
      }
    }


() => {
    const options = command.options() as CommandOption[];
    let containsOption = false;
    options.forEach((o) => {
      if (o.option === '--verbose') {
        containsOption = true;
      }
    });
    assert(containsOption);
  }


(o) => {
      if (o.option === '--verbose') {
        containsOption = true;
      }
    }


() => {
    const options = command.options() as CommandOption[];
    let containsOption = false;
    options.forEach((o) => {
      if (o.option.indexOf('--pageName') > -1) {
        containsOption = true;
      }
    });
    assert(containsOption);
  }


(o) => {
      if (o.option.indexOf('--pageName') > -1) {
        containsOption = true;
      }
    }


() => {
    const options = command.options() as CommandOption[];
    let containsOption = false;
    options.forEach((o) => {
      if (o.option.indexOf('--webUrl') > -1) {
        containsOption = true;
      }
    });
    assert(containsOption);
  }


(o) => {
      if (o.option.indexOf('--webUrl') > -1) {
        containsOption = true;
      }
    }


() => {
    const options = command.options() as CommandOption[];
    let containsOption = false;
    options.forEach((o) => {
      if (o.option.indexOf('--section') > -1) {
        containsOption = true;
      }
    });
    assert(containsOption);
  }


(o) => {
      if (o.option.indexOf('--section') > -1) {
        containsOption = true;
      }
    }


() => {
    const options = command.options() as CommandOption[];
    let containsOption = false;
    options.forEach((o) => {
      if (o.option.indexOf('--column') > -1) {
        containsOption = true;
      }
    });
    assert(containsOption);
  }


(o) => {
      if (o.option.indexOf('--column') > -1) {
        containsOption = true;
      }
    }


() => {
    const options = command.options() as CommandOption[];
    let containsOption = false;
    options.forEach((o) => {
      if (o.option.indexOf('--order') > -1) {
        containsOption = true;
      }
    });
    assert(containsOption);
  }


(o) => {
      if (o.option.indexOf('--order') > -1) {
        containsOption = true;
      }
    }


() => {
    const actual = command.validate({
      options: { pageName: 'page.aspx', webUrl: 'foo', text: 'Hello world' }
    });
    assert.notStrictEqual(actual, true);
  }


() => {
    const actual = command.validate({
      options: {
        pageName: 'page.aspx',
        webUrl: 'http://foo',
        text: 'Hello world'
      }
    });
    assert.notStrictEqual(actual, true);
  }


() => {
    const actual = command.validate({
      options: {
        pageName: 'page.aspx',
        webUrl: 'https://contoso.sharepoint.com',
        text: 'Hello world'
      }
    });
    assert.strictEqual(actual, true);
  }


() => {
    const actual = command.validate({
      options: {
        pageName: 'page',
        webUrl: 'https://contoso.sharepoint.com',
        text: 'Hello world'
      }
    });
    assert.strictEqual(actual, true);
  }


() => {
    const actual = command.validate({
      options: {
        pageName: 'page.aspx',
        webUrl: 'https://contoso.sharepoint.com',
        text: 'Hello world',
        section: -1
      }
    });
    assert.notStrictEqual(actual, true);
  }


() => {
    const actual = command.validate({
      options: {
        pageName: 'page.aspx',
        webUrl: 'https://contoso.sharepoint.com',
        text: 'Hello world',
        section: 'foobar'
      }
    });
    assert.notStrictEqual(actual, true);
  }


() => {
    const actual = command.validate({
      options: {
        pageName: 'page.aspx',
        webUrl: 'https://contoso.sharepoint.com',
        text: 'Hello world',
        column: -1
      }
    });
    assert.notStrictEqual(actual, true);
  }


() => {
    const actual = command.validate({
      options: {
        pageName: 'page.aspx',
        webUrl: 'https://contoso.sharepoint.com',
        text: 'Hello world',
        column: 'foobar'
      }
    });
    assert.notStrictEqual(actual, true);
  }


() => {
  describe('No values provided', () => {
    let data: GetSurveyProprietorData;

    before(() => {
      data = new GetSurveyProprietorData(null);
    });

    it('sets proprietor_type_name', () => {
      expect(data.proprietary_data_category_name).to.equal('');
    });

    it('sets first_nations_name', () => {
      expect(data.first_nations_name).to.equal('');
    });

    it('sets category_rationale', () => {
      expect(data.category_rationale).to.equal('');
    });

    it('sets proprietor_name', () => {
      expect(data.proprietor_name).to.equal('');
    });

    it('sets data_sharing_agreement_required', () => {
      expect(data.data_sharing_agreement_required).to.equal('false');
    });
  });

  describe('All values provided', () => {
    let data: GetSurveyProprietorData;

    const proprietorData = {
      proprietor_type_name: 'type',
      first_nations_name: 'fn name',
      category_rationale: 'rationale',
      proprietor_name: 'name',
      disa_required: true
    };

    before(() => {
      data = new GetSurveyProprietorData(proprietorData);
    });

    it('sets proprietary_data_category_name', () => {
      expect(data.proprietary_data_category_name).to.equal(proprietorData.proprietor_type_name);
    });

    it('sets first_nations_name', () => {
      expect(data.first_nations_name).to.equal(proprietorData.first_nations_name);
    });

    it('sets category_rationale', () => {
      expect(data.category_rationale).to.equal(proprietorData.category_rationale);
    });

    it('sets proprietor_name', () => {
      expect(data.proprietor_name).to.equal(proprietorData.proprietor_name);
    });

    it('sets data_sharing_agreement_required', () => {
      expect(data.data_sharing_agreement_required).to.equal('true');
    });
  });
}


() => {
    let data: GetSurveyProprietorData;

    before(() => {
      data = new GetSurveyProprietorData(null);
    });

    it('sets proprietor_type_name', () => {
      expect(data.proprietary_data_category_name).to.equal('');
    });

    it('sets first_nations_name', () => {
      expect(data.first_nations_name).to.equal('');
    });

    it('sets category_rationale', () => {
      expect(data.category_rationale).to.equal('');
    });

    it('sets proprietor_name', () => {
      expect(data.proprietor_name).to.equal('');
    });

    it('sets data_sharing_agreement_required', () => {
      expect(data.data_sharing_agreement_required).to.equal('false');
    });
  }


() => {
      data = new GetSurveyProprietorData(null);
    }


() => {
      expect(data.proprietary_data_category_name).to.equal('');
    }


() => {
      expect(data.first_nations_name).to.equal('');
    }


() => {
      expect(data.category_rationale).to.equal('');
    }


() => {
      expect(data.proprietor_name).to.equal('');
    }


() => {
      expect(data.data_sharing_agreement_required).to.equal('false');
    }


() => {
    let data: GetSurveyProprietorData;

    const proprietorData = {
      proprietor_type_name: 'type',
      first_nations_name: 'fn name',
      category_rationale: 'rationale',
      proprietor_name: 'name',
      disa_required: true
    };

    before(() => {
      data = new GetSurveyProprietorData(proprietorData);
    });

    it('sets proprietary_data_category_name', () => {
      expect(data.proprietary_data_category_name).to.equal(proprietorData.proprietor_type_name);
    });

    it('sets first_nations_name', () => {
      expect(data.first_nations_name).to.equal(proprietorData.first_nations_name);
    });

    it('sets category_rationale', () => {
      expect(data.category_rationale).to.equal(proprietorData.category_rationale);
    });

    it('sets proprietor_name', () => {
      expect(data.proprietor_name).to.equal(proprietorData.proprietor_name);
    });

    it('sets data_sharing_agreement_required', () => {
      expect(data.data_sharing_agreement_required).to.equal('true');
    });
  }


() => {
      data = new GetSurveyProprietorData(proprietorData);
    }


() => {
      expect(data.proprietary_data_category_name).to.equal(proprietorData.proprietor_type_name);
    }


() => {
      expect(data.first_nations_name).to.equal(proprietorData.first_nations_name);
    }


() => {
      expect(data.category_rationale).to.equal(proprietorData.category_rationale);
    }


() => {
      expect(data.proprietor_name).to.equal(proprietorData.proprietor_name);
    }


() => {
      expect(data.data_sharing_agreement_required).to.equal('true');
    }


function get(route: string, next: Function) {
    this.createRoute("GET", route, next);
}


@Component({
  selector: 'app-new-arrivals',
  templateUrl: './new-arrivals.component.html',
  styleUrls: ['./new-arrivals.component.css']
})
export class NewArrivalsComponent implements OnInit {

  constructor() { }

  ngOnInit(): void {
  }

}


() => this.pagination.serialize(writer)


() => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)


item => Validator.fromObject(item)


(item: Validator) => item.toObject()


(item: Validator) => item.serialize(writer)


() => pb_1.Message.addToRepeatedWrapperField(message, 2, Validator.deserialize(reader), Validator)


() => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)


() => this.pub_key.serialize(writer)


() => message.pub_key = dependency_1.google.protobuf.Any.deserialize(reader)


() => this.block_id.serialize(writer)


() => this.block.serialize(writer)


() => message.block_id = dependency_5.tendermint.types.BlockID.deserialize(reader)


() => message.block = dependency_4.tendermint.types.Block.deserialize(reader)


() => this.default_node_info.serialize(writer)


() => this.application_version.serialize(writer)


() => message.default_node_info = dependency_3.tendermint.p2p.DefaultNodeInfo.deserialize(reader)


() => message.application_version = VersionInfo.deserialize(reader)


item => Module.fromObject(item)


(item: Module) => item.toObject()


(item: Module) => item.serialize(writer)


() => pb_1.Message.addToRepeatedWrapperField(message, 7, Module.deserialize(reader), Module)


export class GetValidatorSetByHeightRequest extends pb_1.Message {
        constructor(data?: any[] | {
            height?: number;
            pagination?: dependency_6.cosmos.base.query.v1beta1.PageRequest;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("height" in data && data.height != undefined) {
                    this.height = data.height;
                }
                if ("pagination" in data && data.pagination != undefined) {
                    this.pagination = data.pagination;
                }
            }
        }
        get height() {
            return pb_1.Message.getField(this, 1) as number;
        }
        set height(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get pagination() {
            return pb_1.Message.getWrapperField(this, dependency_6.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_6.cosmos.base.query.v1beta1.PageRequest;
        }
        set pagination(value: dependency_6.cosmos.base.query.v1beta1.PageRequest) {
            pb_1.Message.setWrapperField(this, 2, value);
        }
        static fromObject(data: {
            height?: number;
            pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
        }) {
            const message = new GetValidatorSetByHeightRequest({});
            if (data.height != null) {
                message.height = data.height;
            }
            if (data.pagination != null) {
                message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination);
            }
            return message;
        }
        toObject() {
            const data: {
                height?: number;
                pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
            } = {};
            if (this.height != null) {
                data.height = this.height;
            }
            if (this.pagination != null) {
                data.pagination = this.pagination.toObject();
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.height !== undefined)
                writer.writeInt64(1, this.height);
            if (this.pagination !== undefined)
                writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetValidatorSetByHeightRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetValidatorSetByHeightRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.height = reader.readInt64();
                        break;
                    case 2:
                        reader.readMessage(message.pagination, () => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.deserialize(reader));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): GetValidatorSetByHeightRequest {
            return GetValidatorSetByHeightRequest.deserialize(bytes);
        }
    }


export class GetValidatorSetByHeightResponse extends pb_1.Message {
        constructor(data?: any[] | {
            block_height?: number;
            validators?: Validator[];
            pagination?: dependency_6.cosmos.base.query.v1beta1.PageResponse;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], []);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("block_height" in data && data.block_height != undefined) {
                    this.block_height = data.block_height;
                }
                if ("validators" in data && data.validators != undefined) {
                    this.validators = data.validators;
                }
                if ("pagination" in data && data.pagination != undefined) {
                    this.pagination = data.pagination;
                }
            }
        }
        get block_height() {
            return pb_1.Message.getField(this, 1) as number;
        }
        set block_height(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get validators() {
            return pb_1.Message.getRepeatedWrapperField(this, Validator, 2) as Validator[];
        }
        set validators(value: Validator[]) {
            pb_1.Message.setRepeatedWrapperField(this, 2, value);
        }
        get pagination() {
            return pb_1.Message.getWrapperField(this, dependency_6.cosmos.base.query.v1beta1.PageResponse, 3) as dependency_6.cosmos.base.query.v1beta1.PageResponse;
        }
        set pagination(value: dependency_6.cosmos.base.query.v1beta1.PageResponse) {
            pb_1.Message.setWrapperField(this, 3, value);
        }
        static fromObject(data: {
            block_height?: number;
            validators?: ReturnType<typeof Validator.prototype.toObject>[];
            pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
        }) {
            const message = new GetValidatorSetByHeightResponse({});
            if (data.block_height != null) {
                message.block_height = data.block_height;
            }
            if (data.validators != null) {
                message.validators = data.validators.map(item => Validator.fromObject(item));
            }
            if (data.pagination != null) {
                message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination);
            }
            return message;
        }
        toObject() {
            const data: {
                block_height?: number;
                validators?: ReturnType<typeof Validator.prototype.toObject>[];
                pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
            } = {};
            if (this.block_height != null) {
                data.block_height = this.block_height;
            }
            if (this.validators != null) {
                data.validators = this.validators.map((item: Validator) => item.toObject());
            }
            if (this.pagination != null) {
                data.pagination = this.pagination.toObject();
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.block_height !== undefined)
                writer.writeInt64(1, this.block_height);
            if (this.validators !== undefined)
                writer.writeRepeatedMessage(2, this.validators, (item: Validator) => item.serialize(writer));
            if (this.pagination !== undefined)
                writer.writeMessage(3, this.pagination, () => this.pagination.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetValidatorSetByHeightResponse {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetValidatorSetByHeightResponse();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.block_height = reader.readInt64();
                        break;
                    case 2:
                        reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Validator.deserialize(reader), Validator));
                        break;
                    case 3:
                        reader.readMessage(message.pagination, () => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.deserialize(reader));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): GetValidatorSetByHeightResponse {
            return GetValidatorSetByHeightResponse.deserialize(bytes);
        }
    }


export class GetLatestValidatorSetRequest extends pb_1.Message {
        constructor(data?: any[] | {
            pagination?: dependency_6.cosmos.base.query.v1beta1.PageRequest;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("pagination" in data && data.pagination != undefined) {
                    this.pagination = data.pagination;
                }
            }
        }
        get pagination() {
            return pb_1.Message.getWrapperField(this, dependency_6.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_6.cosmos.base.query.v1beta1.PageRequest;
        }
        set pagination(value: dependency_6.cosmos.base.query.v1beta1.PageRequest) {
            pb_1.Message.setWrapperField(this, 1, value);
        }
        static fromObject(data: {
            pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
        }) {
            const message = new GetLatestValidatorSetRequest({});
            if (data.pagination != null) {
                message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination);
            }
            return message;
        }
        toObject() {
            const data: {
                pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
            } = {};
            if (this.pagination != null) {
                data.pagination = this.pagination.toObject();
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.pagination !== undefined)
                writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetLatestValidatorSetRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetLatestValidatorSetRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        reader.readMessage(message.pagination, () => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.deserialize(reader));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): GetLatestValidatorSetRequest {
            return GetLatestValidatorSetRequest.deserialize(bytes);
        }
    }


export class GetLatestValidatorSetResponse extends pb_1.Message {
        constructor(data?: any[] | {
            block_height?: number;
            validators?: Validator[];
            pagination?: dependency_6.cosmos.base.query.v1beta1.PageResponse;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], []);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("block_height" in data && data.block_height != undefined) {
                    this.block_height = data.block_height;
                }
                if ("validators" in data && data.validators != undefined) {
                    this.validators = data.validators;
                }
                if ("pagination" in data && data.pagination != undefined) {
                    this.pagination = data.pagination;
                }
            }
        }
        get block_height() {
            return pb_1.Message.getField(this, 1) as number;
        }
        set block_height(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get validators() {
            return pb_1.Message.getRepeatedWrapperField(this, Validator, 2) as Validator[];
        }
        set validators(value: Validator[]) {
            pb_1.Message.setRepeatedWrapperField(this, 2, value);
        }
        get pagination() {
            return pb_1.Message.getWrapperField(this, dependency_6.cosmos.base.query.v1beta1.PageResponse, 3) as dependency_6.cosmos.base.query.v1beta1.PageResponse;
        }
        set pagination(value: dependency_6.cosmos.base.query.v1beta1.PageResponse) {
            pb_1.Message.setWrapperField(this, 3, value);
        }
        static fromObject(data: {
            block_height?: number;
            validators?: ReturnType<typeof Validator.prototype.toObject>[];
            pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
        }) {
            const message = new GetLatestValidatorSetResponse({});
            if (data.block_height != null) {
                message.block_height = data.block_height;
            }
            if (data.validators != null) {
                message.validators = data.validators.map(item => Validator.fromObject(item));
            }
            if (data.pagination != null) {
                message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination);
            }
            return message;
        }
        toObject() {
            const data: {
                block_height?: number;
                validators?: ReturnType<typeof Validator.prototype.toObject>[];
                pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
            } = {};
            if (this.block_height != null) {
                data.block_height = this.block_height;
            }
            if (this.validators != null) {
                data.validators = this.validators.map((item: Validator) => item.toObject());
            }
            if (this.pagination != null) {
                data.pagination = this.pagination.toObject();
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.block_height !== undefined)
                writer.writeInt64(1, this.block_height);
            if (this.validators !== undefined)
                writer.writeRepeatedMessage(2, this.validators, (item: Validator) => item.serialize(writer));
            if (this.pagination !== undefined)
                writer.writeMessage(3, this.pagination, () => this.pagination.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetLatestValidatorSetResponse {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetLatestValidatorSetResponse();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.block_height = reader.readInt64();
                        break;
                    case 2:
                        reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Validator.deserialize(reader), Validator));
                        break;
                    case 3:
                        reader.readMessage(message.pagination, () => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.deserialize(reader));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): GetLatestValidatorSetResponse {
            return GetLatestValidatorSetResponse.deserialize(bytes);
        }
    }


export class Validator extends pb_1.Message {
        constructor(data?: any[] | {
            address?: string;
            pub_key?: dependency_1.google.protobuf.Any;
            voting_power?: number;
            proposer_priority?: number;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("address" in data && data.address != undefined) {
                    this.address = data.address;
                }
                if ("pub_key" in data && data.pub_key != undefined) {
                    this.pub_key = data.pub_key;
                }
                if ("voting_power" in data && data.voting_power != undefined) {
                    this.voting_power = data.voting_power;
                }
                if ("proposer_priority" in data && data.proposer_priority != undefined) {
                    this.proposer_priority = data.proposer_priority;
                }
            }
        }
        get address() {
            return pb_1.Message.getField(this, 1) as string;
        }
        set address(value: string) {
            pb_1.Message.setField(this, 1, value);
        }
        get pub_key() {
            return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 2) as dependency_1.google.protobuf.Any;
        }
        set pub_key(value: dependency_1.google.protobuf.Any) {
            pb_1.Message.setWrapperField(this, 2, value);
        }
        get voting_power() {
            return pb_1.Message.getField(this, 3) as number;
        }
        set voting_power(value: number) {
            pb_1.Message.setField(this, 3, value);
        }
        get proposer_priority() {
            return pb_1.Message.getField(this, 4) as number;
        }
        set proposer_priority(value: number) {
            pb_1.Message.setField(this, 4, value);
        }
        static fromObject(data: {
            address?: string;
            pub_key?: ReturnType<typeof dependency_1.google.protobuf.Any.prototype.toObject>;
            voting_power?: number;
            proposer_priority?: number;
        }) {
            const message = new Validator({});
            if (data.address != null) {
                message.address = data.address;
            }
            if (data.pub_key != null) {
                message.pub_key = dependency_1.google.protobuf.Any.fromObject(data.pub_key);
            }
            if (data.voting_power != null) {
                message.voting_power = data.voting_power;
            }
            if (data.proposer_priority != null) {
                message.proposer_priority = data.proposer_priority;
            }
            return message;
        }
        toObject() {
            const data: {
                address?: string;
                pub_key?: ReturnType<typeof dependency_1.google.protobuf.Any.prototype.toObject>;
                voting_power?: number;
                proposer_priority?: number;
            } = {};
            if (this.address != null) {
                data.address = this.address;
            }
            if (this.pub_key != null) {
                data.pub_key = this.pub_key.toObject();
            }
            if (this.voting_power != null) {
                data.voting_power = this.voting_power;
            }
            if (this.proposer_priority != null) {
                data.proposer_priority = this.proposer_priority;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (typeof this.address === "string" && this.address.length)
                writer.writeString(1, this.address);
            if (this.pub_key !== undefined)
                writer.writeMessage(2, this.pub_key, () => this.pub_key.serialize(writer));
            if (this.voting_power !== undefined)
                writer.writeInt64(3, this.voting_power);
            if (this.proposer_priority !== undefined)
                writer.writeInt64(4, this.proposer_priority);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Validator {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Validator();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.address = reader.readString();
                        break;
                    case 2:
                        reader.readMessage(message.pub_key, () => message.pub_key = dependency_1.google.protobuf.Any.deserialize(reader));
                        break;
                    case 3:
                        message.voting_power = reader.readInt64();
                        break;
                    case 4:
                        message.proposer_priority = reader.readInt64();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): Validator {
            return Validator.deserialize(bytes);
        }
    }


export class GetBlockByHeightRequest extends pb_1.Message {
        constructor(data?: any[] | {
            height?: number;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("height" in data && data.height != undefined) {
                    this.height = data.height;
                }
            }
        }
        get height() {
            return pb_1.Message.getField(this, 1) as number;
        }
        set height(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        static fromObject(data: {
            height?: number;
        }) {
            const message = new GetBlockByHeightRequest({});
            if (data.height != null) {
                message.height = data.height;
            }
            return message;
        }
        toObject() {
            const data: {
                height?: number;
            } = {};
            if (this.height != null) {
                data.height = this.height;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.height !== undefined)
                writer.writeInt64(1, this.height);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockByHeightRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBlockByHeightRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.height = reader.readInt64();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): GetBlockByHeightRequest {
            return GetBlockByHeightRequest.deserialize(bytes);
        }
    }


export class GetBlockByHeightResponse extends pb_1.Message {
        constructor(data?: any[] | {
            block_id?: dependency_5.tendermint.types.BlockID;
            block?: dependency_4.tendermint.types.Block;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("block_id" in data && data.block_id != undefined) {
                    this.block_id = data.block_id;
                }
                if ("block" in data && data.block != undefined) {
                    this.block = data.block;
                }
            }
        }
        get block_id() {
            return pb_1.Message.getWrapperField(this, dependency_5.tendermint.types.BlockID, 1) as dependency_5.tendermint.types.BlockID;
        }
        set block_id(value: dependency_5.tendermint.types.BlockID) {
            pb_1.Message.setWrapperField(this, 1, value);
        }
        get block() {
            return pb_1.Message.getWrapperField(this, dependency_4.tendermint.types.Block, 2) as dependency_4.tendermint.types.Block;
        }
        set block(value: dependency_4.tendermint.types.Block) {
            pb_1.Message.setWrapperField(this, 2, value);
        }
        static fromObject(data: {
            block_id?: ReturnType<typeof dependency_5.tendermint.types.BlockID.prototype.toObject>;
            block?: ReturnType<typeof dependency_4.tendermint.types.Block.prototype.toObject>;
        }) {
            const message = new GetBlockByHeightResponse({});
            if (data.block_id != null) {
                message.block_id = dependency_5.tendermint.types.BlockID.fromObject(data.block_id);
            }
            if (data.block != null) {
                message.block = dependency_4.tendermint.types.Block.fromObject(data.block);
            }
            return message;
        }
        toObject() {
            const data: {
                block_id?: ReturnType<typeof dependency_5.tendermint.types.BlockID.prototype.toObject>;
                block?: ReturnType<typeof dependency_4.tendermint.types.Block.prototype.toObject>;
            } = {};
            if (this.block_id != null) {
                data.block_id = this.block_id.toObject();
            }
            if (this.block != null) {
                data.block = this.block.toObject();
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.block_id !== undefined)
                writer.writeMessage(1, this.block_id, () => this.block_id.serialize(writer));
            if (this.block !== undefined)
                writer.writeMessage(2, this.block, () => this.block.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockByHeightResponse {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBlockByHeightResponse();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        reader.readMessage(message.block_id, () => message.block_id = dependency_5.tendermint.types.BlockID.deserialize(reader));
                        break;
                    case 2:
                        reader.readMessage(message.block, () => message.block = dependency_4.tendermint.types.Block.deserialize(reader));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): GetBlockByHeightResponse {
            return GetBlockByHeightResponse.deserialize(bytes);
        }
    }


export class GetLatestBlockRequest extends pb_1.Message {
        constructor(data?: any[] | {}) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
            if (!Array.isArray(data) && typeof data == "object") { }
        }
        static fromObject(data: {}) {
            const message = new GetLatestBlockRequest({});
            return message;
        }
        toObject() {
            const data: {} = {};
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetLatestBlockRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetLatestBlockRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): GetLatestBlockRequest {
            return GetLatestBlockRequest.deserialize(bytes);
        }
    }


export class GetLatestBlockResponse extends pb_1.Message {
        constructor(data?: any[] | {
            block_id?: dependency_5.tendermint.types.BlockID;
            block?: dependency_4.tendermint.types.Block;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("block_id" in data && data.block_id != undefined) {
                    this.block_id = data.block_id;
                }
                if ("block" in data && data.block != undefined) {
                    this.block = data.block;
                }
            }
        }
        get block_id() {
            return pb_1.Message.getWrapperField(this, dependency_5.tendermint.types.BlockID, 1) as dependency_5.tendermint.types.BlockID;
        }
        set block_id(value: dependency_5.tendermint.types.BlockID) {
            pb_1.Message.setWrapperField(this, 1, value);
        }
        get block() {
            return pb_1.Message.getWrapperField(this, dependency_4.tendermint.types.Block, 2) as dependency_4.tendermint.types.Block;
        }
        set block(value: dependency_4.tendermint.types.Block) {
            pb_1.Message.setWrapperField(this, 2, value);
        }
        static fromObject(data: {
            block_id?: ReturnType<typeof dependency_5.tendermint.types.BlockID.prototype.toObject>;
            block?: ReturnType<typeof dependency_4.tendermint.types.Block.prototype.toObject>;
        }) {
            const message = new GetLatestBlockResponse({});
            if (data.block_id != null) {
                message.block_id = dependency_5.tendermint.types.BlockID.fromObject(data.block_id);
            }
            if (data.block != null) {
                message.block = dependency_4.tendermint.types.Block.fromObject(data.block);
            }
            return message;
        }
        toObject() {
            const data: {
                block_id?: ReturnType<typeof dependency_5.tendermint.types.BlockID.prototype.toObject>;
                block?: ReturnType<typeof dependency_4.tendermint.types.Block.prototype.toObject>;
            } = {};
            if (this.block_id != null) {
                data.block_id = this.block_id.toObject();
            }
            if (this.block != null) {
                data.block = this.block.toObject();
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.block_id !== undefined)
                writer.writeMessage(1, this.block_id, () => this.block_id.serialize(writer));
            if (this.block !== undefined)
                writer.writeMessage(2, this.block, () => this.block.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetLatestBlockResponse {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetLatestBlockResponse();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        reader.readMessage(message.block_id, () => message.block_id = dependency_5.tendermint.types.BlockID.deserialize(reader));
                        break;
                    case 2:
                        reader.readMessage(message.block, () => message.block = dependency_4.tendermint.types.Block.deserialize(reader));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): GetLatestBlockResponse {
            return GetLatestBlockResponse.deserialize(bytes);
        }
    }


export class GetSyncingRequest extends pb_1.Message {
        constructor(data?: any[] | {}) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
            if (!Array.isArray(data) && typeof data == "object") { }
        }
        static fromObject(data: {}) {
            const message = new GetSyncingRequest({});
            return message;
        }
        toObject() {
            const data: {} = {};
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetSyncingRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetSyncingRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): GetSyncingRequest {
            return GetSyncingRequest.deserialize(bytes);
        }
    }


export class GetSyncingResponse extends pb_1.Message {
        constructor(data?: any[] | {
            syncing?: boolean;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("syncing" in data && data.syncing != undefined) {
                    this.syncing = data.syncing;
                }
            }
        }
        get syncing() {
            return pb_1.Message.getField(this, 1) as boolean;
        }
        set syncing(value: boolean) {
            pb_1.Message.setField(this, 1, value);
        }
        static fromObject(data: {
            syncing?: boolean;
        }) {
            const message = new GetSyncingResponse({});
            if (data.syncing != null) {
                message.syncing = data.syncing;
            }
            return message;
        }
        toObject() {
            const data: {
                syncing?: boolean;
            } = {};
            if (this.syncing != null) {
                data.syncing = this.syncing;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.syncing !== undefined)
                writer.writeBool(1, this.syncing);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetSyncingResponse {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetSyncingResponse();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.syncing = reader.readBool();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): GetSyncingResponse {
            return GetSyncingResponse.deserialize(bytes);
        }
    }


export class GetNodeInfoRequest extends pb_1.Message {
        constructor(data?: any[] | {}) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
            if (!Array.isArray(data) && typeof data == "object") { }
        }
        static fromObject(data: {}) {
            const message = new GetNodeInfoRequest({});
            return message;
        }
        toObject() {
            const data: {} = {};
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetNodeInfoRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetNodeInfoRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): GetNodeInfoRequest {
            return GetNodeInfoRequest.deserialize(bytes);
        }
    }


export class GetNodeInfoResponse extends pb_1.Message {
        constructor(data?: any[] | {
            default_node_info?: dependency_3.tendermint.p2p.DefaultNodeInfo;
            application_version?: VersionInfo;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("default_node_info" in data && data.default_node_info != undefined) {
                    this.default_node_info = data.default_node_info;
                }
                if ("application_version" in data && data.application_version != undefined) {
                    this.application_version = data.application_version;
                }
            }
        }
        get default_node_info() {
            return pb_1.Message.getWrapperField(this, dependency_3.tendermint.p2p.DefaultNodeInfo, 1) as dependency_3.tendermint.p2p.DefaultNodeInfo;
        }
        set default_node_info(value: dependency_3.tendermint.p2p.DefaultNodeInfo) {
            pb_1.Message.setWrapperField(this, 1, value);
        }
        get application_version() {
            return pb_1.Message.getWrapperField(this, VersionInfo, 2) as VersionInfo;
        }
        set application_version(value: VersionInfo) {
            pb_1.Message.setWrapperField(this, 2, value);
        }
        static fromObject(data: {
            default_node_info?: ReturnType<typeof dependency_3.tendermint.p2p.DefaultNodeInfo.prototype.toObject>;
            application_version?: ReturnType<typeof VersionInfo.prototype.toObject>;
        }) {
            const message = new GetNodeInfoResponse({});
            if (data.default_node_info != null) {
                message.default_node_info = dependency_3.tendermint.p2p.DefaultNodeInfo.fromObject(data.default_node_info);
            }
            if (data.application_version != null) {
                message.application_version = VersionInfo.fromObject(data.application_version);
            }
            return message;
        }
        toObject() {
            const data: {
                default_node_info?: ReturnType<typeof dependency_3.tendermint.p2p.DefaultNodeInfo.prototype.toObject>;
                application_version?: ReturnType<typeof VersionInfo.prototype.toObject>;
            } = {};
            if (this.default_node_info != null) {
                data.default_node_info = this.default_node_info.toObject();
            }
            if (this.application_version != null) {
                data.application_version = this.application_version.toObject();
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.default_node_info !== undefined)
                writer.writeMessage(1, this.default_node_info, () => this.default_node_info.serialize(writer));
            if (this.application_version !== undefined)
                writer.writeMessage(2, this.application_version, () => this.application_version.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetNodeInfoResponse {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetNodeInfoResponse();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        reader.readMessage(message.default_node_info, () => message.default_node_info = dependency_3.tendermint.p2p.DefaultNodeInfo.deserialize(reader));
                        break;
                    case 2:
                        reader.readMessage(message.application_version, () => message.application_version = VersionInfo.deserialize(reader));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): GetNodeInfoResponse {
            return GetNodeInfoResponse.deserialize(bytes);
        }
    }


export class Module extends pb_1.Message {
        constructor(data?: any[] | {
            path?: string;
            version?: string;
            sum?: string;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("path" in data && data.path != undefined) {
                    this.path = data.path;
                }
                if ("version" in data && data.version != undefined) {
                    this.version = data.version;
                }
                if ("sum" in data && data.sum != undefined) {
                    this.sum = data.sum;
                }
            }
        }
        get path() {
            return pb_1.Message.getField(this, 1) as string;
        }
        set path(value: string) {
            pb_1.Message.setField(this, 1, value);
        }
        get version() {
            return pb_1.Message.getField(this, 2) as string;
        }
        set version(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get sum() {
            return pb_1.Message.getField(this, 3) as string;
        }
        set sum(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        static fromObject(data: {
            path?: string;
            version?: string;
            sum?: string;
        }) {
            const message = new Module({});
            if (data.path != null) {
                message.path = data.path;
            }
            if (data.version != null) {
                message.version = data.version;
            }
            if (data.sum != null) {
                message.sum = data.sum;
            }
            return message;
        }
        toObject() {
            const data: {
                path?: string;
                version?: string;
                sum?: string;
            } = {};
            if (this.path != null) {
                data.path = this.path;
            }
            if (this.version != null) {
                data.version = this.version;
            }
            if (this.sum != null) {
                data.sum = this.sum;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (typeof this.path === "string" && this.path.length)
                writer.writeString(1, this.path);
            if (typeof this.version === "string" && this.version.length)
                writer.writeString(2, this.version);
            if (typeof this.sum === "string" && this.sum.length)
                writer.writeString(3, this.sum);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Module {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Module();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.path = reader.readString();
                        break;
                    case 2:
                        message.version = reader.readString();
                        break;
                    case 3:
                        message.sum = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): Module {
            return Module.deserialize(bytes);
        }
    }


static fromObject(data: {
            height?: number;
            pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
        }) {
            const message = new GetValidatorSetByHeightRequest({});
            if (data.height != null) {
                message.height = data.height;
            }
            if (data.pagination != null) {
                message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination);
            }
            return message;
        }


toObject() {
            const data: {
                height?: number;
                pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
            } = {};
            if (this.height != null) {
                data.height = this.height;
            }
            if (this.pagination != null) {
                data.pagination = this.pagination.toObject();
            }
            return data;
        }


serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.height !== undefined)
                writer.writeInt64(1, this.height);
            if (this.pagination !== undefined)
                writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }


static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetValidatorSetByHeightRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetValidatorSetByHeightRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.height = reader.readInt64();
                        break;
                    case 2:
                        reader.readMessage(message.pagination, () => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.deserialize(reader));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }


serializeBinary(): Uint8Array {
            return this.serialize();
        }


static deserializeBinary(bytes: Uint8Array): GetValidatorSetByHeightRequest {
            return GetValidatorSetByHeightRequest.deserialize(bytes);
        }


static fromObject(data: {
            block_height?: number;
            validators?: ReturnType<typeof Validator.prototype.toObject>[];
            pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
        }) {
            const message = new GetValidatorSetByHeightResponse({});
            if (data.block_height != null) {
                message.block_height = data.block_height;
            }
            if (data.validators != null) {
                message.validators = data.validators.map(item => Validator.fromObject(item));
            }
            if (data.pagination != null) {
                message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination);
            }
            return message;
        }


toObject() {
            const data: {
                block_height?: number;
                validators?: ReturnType<typeof Validator.prototype.toObject>[];
                pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
            } = {};
            if (this.block_height != null) {
                data.block_height = this.block_height;
            }
            if (this.validators != null) {
                data.validators = this.validators.map((item: Validator) => item.toObject());
            }
            if (this.pagination != null) {
                data.pagination = this.pagination.toObject();
            }
            return data;
        }


serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.block_height !== undefined)
                writer.writeInt64(1, this.block_height);
            if (this.validators !== undefined)
                writer.writeRepeatedMessage(2, this.validators, (item: Validator) => item.serialize(writer));
            if (this.pagination !== undefined)
                writer.writeMessage(3, this.pagination, () => this.pagination.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }


static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetValidatorSetByHeightResponse {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetValidatorSetByHeightResponse();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.block_height = reader.readInt64();
                        break;
                    case 2:
                        reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Validator.deserialize(reader), Validator));
                        break;
                    case 3:
                        reader.readMessage(message.pagination, () => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.deserialize(reader));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }


static deserializeBinary(bytes: Uint8Array): GetValidatorSetByHeightResponse {
            return GetValidatorSetByHeightResponse.deserialize(bytes);
        }


static fromObject(data: {
            pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
        }) {
            const message = new GetLatestValidatorSetRequest({});
            if (data.pagination != null) {
                message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination);
            }
            return message;
        }


toObject() {
            const data: {
                pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
            } = {};
            if (this.pagination != null) {
                data.pagination = this.pagination.toObject();
            }
            return data;
        }


serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.pagination !== undefined)
                writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }


static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetLatestValidatorSetRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetLatestValidatorSetRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        reader.readMessage(message.pagination, () => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageRequest.deserialize(reader));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }


static deserializeBinary(bytes: Uint8Array): GetLatestValidatorSetRequest {
            return GetLatestValidatorSetRequest.deserialize(bytes);
        }


static fromObject(data: {
            block_height?: number;
            validators?: ReturnType<typeof Validator.prototype.toObject>[];
            pagination?: ReturnType<typeof dependency_6.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
        }) {
            const message = new GetLatestValidatorSetResponse({});
            if (data.block_height != null) {
                message.block_height = data.block_height;
            }
            if (data.validators != null) {
                message.validators = data.validators.map(item => Validator.fromObject(item));
            }
            if (data.pagination != null) {
                message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination);
            }
            return message;
        }


static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetLatestValidatorSetResponse {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetLatestValidatorSetResponse();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.block_height = reader.readInt64();
                        break;
                    case 2:
                        reader.readMessage(message.validators, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Validator.deserialize(reader), Validator));
                        break;
                    case 3:
                        reader.readMessage(message.pagination, () => message.pagination = dependency_6.cosmos.base.query.v1beta1.PageResponse.deserialize(reader));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }


static deserializeBinary(bytes: Uint8Array): GetLatestValidatorSetResponse {
            return GetLatestValidatorSetResponse.deserialize(bytes);
        }


static fromObject(data: {
            address?: string;
            pub_key?: ReturnType<typeof dependency_1.google.protobuf.Any.prototype.toObject>;
            voting_power?: number;
            proposer_priority?: number;
        }) {
            const message = new Validator({});
            if (data.address != null) {
                message.address = data.address;
            }
            if (data.pub_key != null) {
                message.pub_key = dependency_1.google.protobuf.Any.fromObject(data.pub_key);
            }
            if (data.voting_power != null) {
                message.voting_power = data.voting_power;
            }
            if (data.proposer_priority != null) {
                message.proposer_priority = data.proposer_priority;
            }
            return message;
        }


toObject() {
            const data: {
                address?: string;
                pub_key?: ReturnType<typeof dependency_1.google.protobuf.Any.prototype.toObject>;
                voting_power?: number;
                proposer_priority?: number;
            } = {};
            if (this.address != null) {
                data.address = this.address;
            }
            if (this.pub_key != null) {
                data.pub_key = this.pub_key.toObject();
            }
            if (this.voting_power != null) {
                data.voting_power = this.voting_power;
            }
            if (this.proposer_priority != null) {
                data.proposer_priority = this.proposer_priority;
            }
            return data;
        }


serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (typeof this.address === "string" && this.address.length)
                writer.writeString(1, this.address);
            if (this.pub_key !== undefined)
                writer.writeMessage(2, this.pub_key, () => this.pub_key.serialize(writer));
            if (this.voting_power !== undefined)
                writer.writeInt64(3, this.voting_power);
            if (this.proposer_priority !== undefined)
                writer.writeInt64(4, this.proposer_priority);
            if (!w)
                return writer.getResultBuffer();
        }


static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Validator {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Validator();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.address = reader.readString();
                        break;
                    case 2:
                        reader.readMessage(message.pub_key, () => message.pub_key = dependency_1.google.protobuf.Any.deserialize(reader));
                        break;
                    case 3:
                        message.voting_power = reader.readInt64();
                        break;
                    case 4:
                        message.proposer_priority = reader.readInt64();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }


static deserializeBinary(bytes: Uint8Array): Validator {
            return Validator.deserialize(bytes);
        }


static fromObject(data: {
            height?: number;
        }) {
            const message = new GetBlockByHeightRequest({});
            if (data.height != null) {
                message.height = data.height;
            }
            return message;
        }


toObject() {
            const data: {
                height?: number;
            } = {};
            if (this.height != null) {
                data.height = this.height;
            }
            return data;
        }


serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.height !== undefined)
                writer.writeInt64(1, this.height);
            if (!w)
                return writer.getResultBuffer();
        }