Compare commits

...

200 Commits

Author SHA1 Message Date
Danny Adams
39111b1040 Merge branch 'sharepoint-restore-selectors' into restore-page-flow-4 2023-01-28 15:41:58 -05:00
Danny Adams
c80dce034e Merge branch 'restore-page-flow-3' into restore-page-flow-4 2023-01-28 15:39:39 -05:00
Danny Adams
34a88dffa5 Merge branch 'backup-page-flow-3' into backup-page-flow-3-cliPicked 2023-01-28 15:38:42 -05:00
Danny
c439ffd74c
Update src/internal/connector/sharepoint/restore.go
Update for logging error.

Co-authored-by: Keepers <ryanfkeepers@gmail.com>
2023-01-28 15:16:25 -05:00
Danny
c6fcc4f1d7
Merge branch 'restore-page-flow-2' into restore-page-flow-3 2023-01-28 15:14:57 -05:00
Danny Adams
b349d9ed2e Updates made /sharepoint/restore.go
Variable assignment removed to accomodate website-linting failure.
2023-01-28 15:07:05 -05:00
Danny Adams
e77fd9c0d8 Updates to internal/connecto/sharepoint/restore.go
Error messages updated for clarity.
2023-01-28 14:43:38 -05:00
Danny Adams
e789b0d287 Merge branch 'restore-page-flow-1' into restore-page-flow-2 2023-01-28 14:22:44 -05:00
Danny Adams
0340ce67fa Updates to /support/m365Support.go
PR Suggestion: Error messages updated for clarity.
2023-01-28 14:13:01 -05:00
Danny Adams
3d807a1304 GOFMT: wsl 2023-01-28 14:01:37 -05:00
Danny Adams
78676e4754 Merge branch 'backup-page-flow' into restore-page-flow-1 2023-01-28 13:59:46 -05:00
Danny Adams
f84e4e9239 Updates to sharepoint/collection.go
Changes to troubleshoot Issue #2257
2023-01-28 13:40:08 -05:00
Danny Adams
99c45f2f92 Merge branch 'backup-page-flow-3' into backup-page-flow-3-cliPicked 2023-01-27 17:34:46 -05:00
Danny Adams
9799add342 Updates to /connector/sharepoint/data_collections*
Changes to accept credentials from DataCollection.
Tests updated to receive new params.
2023-01-27 16:54:11 -05:00
Danny Adams
6a5b2780c7 Updates to /connector/ddata_collections_test.go.
Adds credentials for test framework.
2023-01-27 16:52:17 -05:00
Danny Adams
0cd7df9869 Update to /connector/data_collections.go
Return provides credentials for SharePoint types.
2023-01-27 16:51:26 -05:00
Danny Adams
6c53c66fb5 Update to /connector/sharepoint.data_collections.go
Updates the Adapter back to being recreated with credentials. Credentials need to come from the DataCollection call.
2023-01-27 16:30:34 -05:00
Danny Adams
9e947d8951 Merge branch 'backup-page-flow-2' into backup-page-flow-3 2023-01-27 15:59:50 -05:00
Danny Adams
bd5a893db7 Updates to /connector/sharepoint/collection_test.go
Tests to changed to conform with Test CI implementation.
2023-01-27 15:46:49 -05:00
Danny Adams
8b831d34f0 Updates /connector/sharepoint/data_collections.go and data_collections_test.go
Lint ignore removed. collectPages() method updated --> Scope not necessary
Test Suite adds test for functionality.
2023-01-27 15:40:25 -05:00
Danny Adams
5ca341eb56 Update to /connector/sharepoint/helper_test.go
Creates a test update function for the package.
2023-01-27 15:33:13 -05:00
Danny Adams
978acf187d GOFMT: unused annotation change. 2023-01-27 14:10:56 -05:00
Danny Adams
656bc14d24 GOFMT: wsl changes. 2023-01-27 14:09:19 -05:00
Danny Adams
47a927c141 Updates to /connector/sharepoint/collection_test.go 2023-01-27 14:07:03 -05:00
Danny Adams
2cc3c22c4c Updates /connector/sharepoint/site_page_test.go
Updates call for GetSitePages()
2023-01-27 13:41:58 -05:00
Danny Adams
9e0393e1d2 Updates to /connector/sharepoint/collection_test.go
betaService fields tested for the collection.
2023-01-27 13:41:22 -05:00
Danny Adams
c7044f1fa0 Merge branch 'backup-page-flow' into backup-page-flow-2 2023-01-27 13:34:40 -05:00
Danny Adams
b7b7029ec3 Updates to /connector/sharepoint/site_page_test.go
Updates from helper_test.go for service creation.
2023-01-27 13:25:39 -05:00
Danny Adams
9035881bc5 Updates to /connector/sharepoint/site_page.go
method to accept betaService in place of graph.Service
2023-01-27 13:23:58 -05:00
Danny Adams
560531a56c Updates to /connector/sharepoint/data_collections.go
CollectPages() method updated to create BetaService and to store service within collection.
2023-01-27 13:20:42 -05:00
Danny Adams
1aebe933ea Updates to /connector/sharepoint/list_test.go
Updates call for createTestService().
2023-01-27 13:16:43 -05:00
Danny Adams
02f85a5614 Updates to /connector/sharepoint/collection_test.go
Updates to test service creation call and return methods.
2023-01-27 13:15:43 -05:00
Danny Adams
1357974ccb Updates /connector/sharepoint/collection.go
BetaService field added to collection.
2023-01-27 13:14:08 -05:00
Danny Adams
a7ea30e109 Updates to /connector/sharepoint/helper_test.go
Updates to createTestService method.
Creates createTestBetaService().
2023-01-27 13:12:18 -05:00
Danny
30ce9cafc9
Merge branch 'beta-library-service' into backup-page-flow 2023-01-27 12:26:13 -05:00
Danny Adams
de5bc553d0 Updates to /graph/betasdk/beta_service.go
Addition of constructor and serialize function.
2023-01-27 12:08:21 -05:00
Danny Adams
97c6d631b5 Updates to /graph/betasdk/beta_client_test.go
Verifies service functionality.
2023-01-27 12:07:32 -05:00
Danny Adams
deaca98a4d stash. 2023-01-27 11:40:38 -05:00
Danny Adams
7bac82cdba Updates to /connector/sharepoint/collection.go
betaSDK service become a field within SharePoint Collection.
2023-01-27 11:39:59 -05:00
Danny Adams
b2ce209eee Updates /connector/sharepoint/site_page.go
Updates dependencies to betasdk.
2023-01-27 11:38:29 -05:00
Danny
afe8f04a45
Merge branch 'beta-library-service' into backup-page-flow 2023-01-27 11:02:10 -05:00
Danny Adams
946767edcc Add file /graph/betasdk/beta_service.go 2023-01-27 10:50:46 -05:00
Danny Adams
3228bfbe1e Updates to /graph/betasdk/beta_client.go
Comments updated for clarity on package setup.
2023-01-27 10:37:42 -05:00
Danny Adams
447ae1f3bb Updates to /graph/betasdk/kiota-lock.json
Key/Value pair added for Beta version.
2023-01-27 10:35:52 -05:00
Danny Adams
2133cc41f1 Update to /graph/betasdk/kiota-lock.json
Changes to JSON fields for compliance with parsing.
2023-01-27 10:23:00 -05:00
Danny
9deb1ce9a2
GC: Backup: SharePoint: Test Fetch/Get Functions (#2182)
## Description
Tests the functionality of GC's retrieval functions
2023-01-27 09:40:32 -05:00
Danny
9aa7c1b667
Merge branch 'beta-library-switch' into backup-page-flow 2023-01-27 09:34:40 -05:00
Danny Adams
d7e077ad72 Merge branch 'beta-library-switch' of github.com:alcionai/corso into beta-library-switch 2023-01-26 17:58:54 -05:00
Danny Adams
db9a91fb87 Updates to /betasdk/sites/kiota-lock.json
Details the required files for the subdirectories of models and sites.
2023-01-26 17:58:40 -05:00
Danny
aca2fd2bfb
Merge branch 'beta-library-switch' into sharepoint-restore-selectors 2023-01-26 17:17:31 -05:00
Danny
57ce0be82a
Merge branch 'main' into beta-library-switch 2023-01-26 17:17:00 -05:00
Danny Adams
b3aec1b40f Updates /graph/beasdk/beta_service_test.go
File renamed to beta_client_test.go.
Comments updated.
2023-01-26 16:16:43 -05:00
Danny Adams
f8d65d66de Updates to /graph/betasdk/beta_client.go
Registers serializers for connector.
Adds explicit comments on connector usage and patterns.
Removes Sites() call from supported commands.
2023-01-26 16:08:25 -05:00
Danny Adams
817a7a2bc6 UPdates to /graph/betasdk/sites package
Final sweep to bring src files down to bare minimum for Site Page management.
2023-01-26 15:51:39 -05:00
Danny Adams
2839d8d6e3 ci.yml --> remove swap space. 2023-01-26 14:09:00 -05:00
Danny Adams
05c3216f08 Removal of beta library package from system. 2023-01-26 14:03:49 -05:00
Danny Adams
8a474af189 Revert back to msgraph-sdk-go library for /support/errors.go 2023-01-26 14:02:55 -05:00
Danny Adams
b7b2de096b Revert back to msgraph-sdk-go package for /connector/graph/errors.go 2023-01-26 14:02:15 -05:00
Danny Adams
03ec1dd2e9 Updates to remove beta library from operations/backup_integration_test.go 2023-01-26 14:01:24 -05:00
Danny Adams
7bc080305d Update to exclude betasdk from linting. 2023-01-26 13:56:31 -05:00
Danny Adams
28ddbca41e Merge branch 'beta-library-switch' of github.com:alcionai/corso into beta-library-switch 2023-01-26 11:53:16 -05:00
Danny Adams
263197bbab Updates to /betasdk/sites/ for GOFMT:
Fixes for linter failures --> ignore statements.
2023-01-26 11:39:37 -05:00
Danny
4e3f15f357
Update ci.yml
Update to 12
2023-01-26 10:01:32 -05:00
Danny Adams
68f7ac9cff Updates to the .yml for additional space. 2023-01-26 09:55:41 -05:00
Danny Adams
bcd379f596 Updates to betasdk/sites package
Dependencies updated and minimal files supplied.
2023-01-26 08:24:09 -05:00
Danny Adams
aca2eb5d65 Updates to betasdk/sites package
Package only to support SitePageable objects. Process begun to removal
of queries that do not support these operations.
2023-01-25 21:34:36 -05:00
Danny Adams
2f02efe489 Reduction to /graph/betasdk/models/package
Referenced models from v1.0 and retained minimial for Page retrieval.
2023-01-25 20:52:07 -05:00
Danny Adams
3e4fae6a56 Removal of odataerrors withing betasdk.
Files are present in main package.
2023-01-25 20:16:49 -05:00
Danny Adams
775f5ce4e3 Updates to /connector/graph/betasdk/sites
Removal of Async calls and file permissions for adapter compatibility.
2023-01-25 17:57:11 -05:00
Danny Adams
a31fe596af Update go.mod
mod tidy removes incorrectly applied test suite.
2023-01-25 17:27:35 -05:00
Danny Adams
f33167d765 Updates to .github/workflows/ci.yml
Removal of swap space from ci workflow.
2023-01-25 17:21:47 -05:00
Danny Adams
8f22c4f776 Non-Page files removed. 2023-01-25 17:18:46 -05:00
Danny Adams
9dc487b39f Test file created. 2023-01-25 16:39:28 -05:00
Danny Adams
9bbb479fa3 Changes to /connector/discovery/api/users_test.go
Reverts library back to msgraph-sdk-go.
2023-01-25 15:30:50 -05:00
Danny Adams
dc09508821 Updates to /pkg/services/m365 package
Reverts the package back to msgraph-sdk-go.
2023-01-25 14:45:36 -05:00
Danny Adams
918fd835ad Updates library to use betasdk package. 2023-01-25 14:33:11 -05:00
Danny Adams
42a9499b71 Add file to /graph/betasdk/kiota-lock.json
File shows how app.kiota generator created the minimal SDK.
2023-01-25 14:31:16 -05:00
Danny Adams
740c8dc3e2 Updates to /graph/betasdk/beta_client.go
Removes the admin and groups properties for minimal beta connector.
2023-01-25 14:12:34 -05:00
Danny Adams
d2fb427146 Hydrate sites command directory. 2023-01-25 14:07:06 -05:00
Danny Adams
4fdd165afd Hydrate model directory. 2023-01-25 14:06:41 -05:00
Danny Adams
76cc59348a Go.mod: Update to libraries. 2023-01-25 14:04:51 -05:00
Danny Adams
9a0dd673c6 Kiota library mismatch from preview. 2023-01-25 13:13:10 -05:00
Danny Adams
b4118627a6 Kiota library mismatch from preview. 2023-01-25 13:12:37 -05:00
Danny Adams
a51b6e8444 Kiota library mismatch from preview. 2023-01-25 13:11:03 -05:00
Danny Adams
1acc6b9e18 Hydrate sites package. 2023-01-25 09:51:12 -05:00
Danny Adams
9a6d58b18c Inflate admin package. 2023-01-25 09:50:15 -05:00
Danny Adams
b27ce3d0e2 Inflate Models package. 2023-01-25 09:46:34 -05:00
Danny Adams
f5d514470d Inflate admin package. 2023-01-25 09:44:25 -05:00
Danny Adams
0a1e0d249f Package configuration. 2023-01-25 09:34:15 -05:00
Danny Adams
b1f7ab51e9 beta_client beta client formatting. 2023-01-25 09:23:13 -05:00
Danny Adams
b13f5b6fb6 Update shuffle. 2023-01-25 09:21:18 -05:00
Danny Adams
e51f654e46 Delete /betaSDK/sites package. 2023-01-25 09:02:25 -05:00
Danny Adams
50da437421 Updates package name for betasdk package. 2023-01-25 08:47:45 -05:00
Danny Adams
1d13f7d2df Updates betaSDK/groups package
Removes backing store from model.
2023-01-25 08:36:04 -05:00
Danny Adams
e9371379a6 Updates beta_client..go
Removal of backing store from model.
2023-01-25 08:34:27 -05:00
Danny Adams
ae69293fa6 Updates kiota-lock.json: Removal of backing store. 2023-01-25 08:31:40 -05:00
Danny Adams
66e560987e Adds Kiota-lock.json to betaSDK package. 2023-01-25 08:18:53 -05:00
Danny Adams
c3fd313a82 Adds betaSDK/sites package. Temp 2023-01-25 08:17:44 -05:00
Danny Adams
2d73ed3a6b Adds group package temporarily. 2023-01-25 08:17:11 -05:00
Danny Adams
988962c06e Adds admin file. Temp. 2023-01-25 08:16:35 -05:00
Danny Adams
5368cd38cf Issue #2174: Adds Beta Client to package from generator. 2023-01-25 08:16:09 -05:00
Danny Adams
2a93dc9caf Updates to graph_connector component and helper_test files.
Reverts back to msgraph-sdk-go.
2023-01-25 07:59:09 -05:00
Danny Adams
ea70fa6eee Updates to /connector/sharepoint package
Reverts sharepoint package to msgraph-sdk-go
2023-01-25 07:57:42 -05:00
Danny Adams
c7828db7d6 Merge branch 'main' into sharepoint-restore-selectors 2023-01-25 07:50:47 -05:00
Danny Adams
a090bed081 Update to /mockconnector/mock_data_collection_test.go
Package reverted back to msgraph-sdk-go
2023-01-25 07:45:10 -05:00
Danny Adams
702ec7f234 Updates to /connector/exchange package
Package reverted back to msgraph-sdk-go
2023-01-25 07:43:44 -05:00
Danny Adams
c221d388b1 Update to /connector/mockconnector/mock_data_list.go
Package reverted back to msgraph-sdk-go
2023-01-25 07:40:58 -05:00
Danny Adams
4853d6c0ce Updates to /connector/support package.
Package reverted back to msgraph-sdk-go
2023-01-25 06:47:32 -05:00
Danny Adams
2f9f61b4a6 Updates to /connector/graph/cache_container.go
Package reverted back to msgraph-sdk-go
2023-01-25 06:46:24 -05:00
Danny Adams
a22803e077 Updates ../connector/exchange/api package update
Package reverted back to msgraph-sdk-go
2023-01-25 06:44:59 -05:00
Danny Adams
10c605d02b Updates to /connector/onedrive package
Package reverted back to msgraph-sdk-go.
2023-01-25 06:33:44 -05:00
Danny Adams
63d2d7f4d8 /connector/graph package reverted back from beta packages. 2023-01-25 06:31:47 -05:00
Danny Adams
2fc8b36070 Update to go.mod & go.sum 2023-01-25 06:26:25 -05:00
Danny Adams
ec87d58078 Merge branch 'main' into beta-library-switch 2023-01-25 06:22:01 -05:00
Danny Adams
5414c71581 Updates to cli package per PR Request.
Flags changed to page-folders and pages respectively.
2023-01-25 05:49:29 -05:00
Danny
0e31de9ef9
Merge branch 'backup-page-flow-3' into backup-page-flow-3-cliPicked 2023-01-23 13:32:44 -05:00
Danny
ed23af6be6
Merge branch 'backup-page-flow-2' into backup-page-flow-3 2023-01-23 13:32:10 -05:00
Danny
802515f6de
Merge branch 'backup-page-flow' into backup-page-flow-2 2023-01-23 13:30:22 -05:00
Danny Adams
4a9e634d3f Updates /connector/sharepoint/site_page.go
Adds expansion call to retrieve relationship information.
2023-01-23 13:18:33 -05:00
Danny Adams
156e01b8dd Updates to /cli/restore/sharepoint.go
Issue #2218: Connects CLI for SharePoint restore.
2023-01-22 02:12:21 -05:00
Danny Adams
51ad7458b4 Updates /connector/sharepoint/restore.go
Issue #2169: Connects the restore pipeline for sharepoint pages. Comments also updated for SharePoint Pages.
2023-01-22 01:31:59 -05:00
Danny Adams
018a57cb30 GOFMT: white space removed 2023-01-22 01:14:02 -05:00
Danny Adams
22c070885b Updates to /connector/sharepoint/restore.go
Issue #2169: Restore Collection logic added.
2023-01-22 00:58:33 -05:00
Danny Adams
09f92fabc6 Updates to /connector/sharepoint/collection_test.go
Issue #2169: Checks restore logic for site page.
2023-01-21 23:37:33 -05:00
Danny Adams
9ea6e2921b Update to /connector/sharepoint/restore.go
Issue #2169: Adds logic to append destination name to file name. Title is not altered.
2023-01-21 23:36:08 -05:00
Danny Adams
d16b13bd64 Update to /connector/sharepoint/site_page.go
Issue #2169: Delete API added for SharePoint Page.
2023-01-21 23:34:48 -05:00
Danny Adams
ca641e0116 Updates to /connector/sharepoint/restore.go
Issue #2169: Publish API added to restore of Page Item.
2023-01-21 21:25:34 -05:00
Danny Adams
607ca83177 Updates to /connector/sharepoint/restore.go
Issue #2169: Restore logic for sharepoint page.
2023-01-21 20:52:35 -05:00
Danny Adams
b3cb8fec46 Updates to /conector/support/m365Support_test.go
Use of constant for repeating test names.
2023-01-21 20:05:58 -05:00
Danny Adams
d38ccb1cfc Update /internal/connector/support/m365Support_test.go
Adds testing for SitePage creation.
2023-01-21 19:56:25 -05:00
Danny Adams
da2d0d1779 Update /internal/connector/support/m365Support.go
Issue #2169: Serialization logic for SitePageable data types.
2023-01-21 19:54:37 -05:00
Danny Adams
0b7d22581b Update to pkg/selectors/sharepoint_test.go
Use of constant for literal.
2023-01-21 18:30:15 -05:00
Danny Adams
d22d943bef Updates to pkg/selectors/sharepoint_test.go
Adds tests to ensure  function is checked for details command.
2023-01-21 18:07:06 -05:00
Danny Adams
8f556c59a4 Update to /pkg/selectors/sharepoint.go
Bug fix: SharePoint selector misalignmet that causes panic on details command.
2023-01-21 17:41:21 -05:00
Danny Adams
e6c7bbbb9e Update pkg/selectors/sharepoint.go
Bug Fix: Carried forward into package. Allows for display of backed up data within details.
2023-01-21 17:36:30 -05:00
Danny Adams
7fbb06a69f Troubleshooting complete. 2023-01-21 17:35:37 -05:00
Danny Adams
13c9a847e2 Merge branch 'backup-page-flow-3' into backup-page-flow-3-cliPicked 2023-01-21 02:13:44 -05:00
Danny Adams
4b67bb4684 Bug Fix: Initialize value at 0 2023-01-21 02:13:16 -05:00
Danny Adams
f036d9dfb8 Updated to /connector/sharepoint/data_collections.go
Control.Options added to NewCollection() calls.
2023-01-21 02:08:29 -05:00
Danny Adams
f9e3a57ec3 Updates to /internal/connector/sharepoint/collection_test.go
Control option added to NewCollection() calls within tests.
2023-01-21 02:07:34 -05:00
Danny Adams
a0ea09e9a1 Update to /connector/sharepoint/collection.go
Ctrl option added to Collection Constructor.
2023-01-21 02:06:03 -05:00
Danny Adams
226ce05637 Linter Fix: Wording for documentation. 2023-01-21 01:19:13 -05:00
Danny Adams
806b4d3a86 Updates to /cli/backup/sharepoint.go
PR Suggestions applied.
2023-01-21 01:19:01 -05:00
Danny Adams
04f22b6070 Updates to /cli/backup/sharepoint.go
Adds PageItem option option.
2023-01-21 01:18:48 -05:00
Danny Adams
7076bc0e7f Updates /cli/backup/sharepoint_test.go
Test suite expanded to include sharePoint data selection.
2023-01-21 01:18:25 -05:00
Danny Adams
5abc237ac6 Updates to /cli/backup/sharepoint.go
Adds functionality for Selecting SharePoint Page as a data selector.
2023-01-21 01:18:07 -05:00
Danny Adams
0f16e5768f Update to /connector/sharepoint/data_collections.go
Finalize the backup workflow for SharePoint.Pages.
2023-01-21 00:40:33 -05:00
Danny Adams
3c7c156e72 Updates to /connector/sharepoint/collection_test.go TestSharePointPageCollection_Populate() added. Ensures serialization of single page completes without issue. 2023-01-20 23:57:15 -05:00
Danny Adams
d2c5ad45bf Update /internal/connector/sharepoint/collection.go
Logic for serialization of models.Pages completed.
2023-01-20 22:49:27 -05:00
Danny Adams
1b4d3c2b08 GOFMT: Name update. 2023-01-20 22:47:51 -05:00
Danny Adams
e153c43811 Updates to /internal/connector/sharepoint/collection.go
Abstraction applied to pipeline to dynamically populate List objects. Page objects are currently stubbed out.
2023-01-20 22:15:41 -05:00
Danny Adams
10ae8fd102 Merge branch 'backup-page-flow-2' of github.com:alcionai/corso into backup-page-flow-2 2023-01-20 22:03:34 -05:00
Danny Adams
d5e0801219 Updates to abstraction model. 2023-01-20 21:33:17 -05:00
Danny
b192f9866c
Merge branch 'backup-page-flow' into backup-page-flow-2 2023-01-20 20:47:27 -05:00
Danny
10efa650c7
Merge branch 'beta-library-switch' into backup-page-flow 2023-01-20 13:59:01 -05:00
Danny Adams
f44607ca73 Additonal swap space required for CI compilation. 2023-01-20 11:40:39 -05:00
Danny Adams
898191f9a9 Removal of whitespace. 2023-01-20 11:23:08 -05:00
Danny Adams
c0112d917e Revert back to original ci.yml. 2023-01-20 11:21:35 -05:00
Danny Adams
f425d24364 Update support library to beta. 2023-01-20 11:11:11 -05:00
Danny Adams
585ce939ed Merge branch 'beta-library-switch' into backup-page-flow 2023-01-20 10:39:57 -05:00
Danny Adams
2f125d44a6 Merge branch 'main' into beta-library-switch 2023-01-20 09:40:57 -05:00
Danny Adams
2cd64c4775 Updates to internal/connector/graph_connector_helper_test.go
git status
2023-01-20 09:31:14 -05:00
Danny Adams
b4eae746c4 Update to /pkg/services/m365/m365.go
Change to msgraph beta library.
2023-01-20 09:27:43 -05:00
Danny Adams
9b30a03c31 File added in error. 2023-01-20 09:26:48 -05:00
Danny Adams
77c3b3b7d7 Update /internal/operations package
Beta Library replaces msgraph v1.0
2023-01-20 09:25:44 -05:00
Danny Adams
4009a5c2d4 Update /connector/ package
Beta Library replaces msgraph v1.0
2023-01-20 09:25:03 -05:00
Danny Adams
4687b134ef Update /connector/support package
Beta Library replaces msgraph v1.0
2023-01-20 09:24:11 -05:00
Danny Adams
2929c9f25e Update /connector/sharepoint package
Beta Library replaces msgraph v1.0
2023-01-20 09:23:41 -05:00
Danny Adams
7404c4c8b0 Update /connector/onedrive package
Beta Library replaces msgraph v1.0
2023-01-20 09:22:40 -05:00
Danny Adams
135c07a41a Update /connector/exchange package
Beta Library replaces msgraph v1.0
2023-01-20 09:22:15 -05:00
Danny Adams
3ccdda8ef0 Update /connector/mockconnector package
Change to Beta library.
2023-01-20 09:21:08 -05:00
Danny Adams
4952b81333 Update /connector/graph package
Change to Beta library.
2023-01-20 09:20:31 -05:00
Danny Adams
b82a6349f4 Update /connector/exchange/api package
Change to Beta library.
2023-01-20 09:19:38 -05:00
Danny Adams
519a449b2f Update /connector/discovery package
Change to Beta library.
2023-01-20 09:18:49 -05:00
Danny Adams
97ca692168 Change to msgraph-sdk-beta. 2023-01-20 09:14:51 -05:00
Danny Adams
7ef73b866a Update for Beta Connector. 2023-01-19 16:41:32 -05:00
Danny Adams
613de30664 Updates to error response. Test to verify time for cache. 2023-01-19 16:23:39 -05:00
Danny Adams
19446b85e5 Updates to /sharepoint/data_collections.go
Adds new identifier to NewCollection() call
2023-01-19 12:56:01 -05:00
Danny Adams
dd57457b10 Updates to /sharepoint/collection_test.go
Adds new identifier to NewCollection() call
2023-01-19 12:55:34 -05:00
Danny Adams
ee2e47f9ee Updates to /sharepoint/collection.go
Adds abstraction to the backup process.
2023-01-19 12:54:56 -05:00
Danny
0802e97d56
Update ci.yml
Troubleshooting passed 8 GB.
2023-01-19 10:53:49 -05:00
Danny
d661d45671
Update ci.yml
Troubleshooting
2023-01-19 10:17:52 -05:00
Danny Adams
0cf21f6b2c Incremental increase of swap space. 2023-01-19 09:48:06 -05:00
Danny Adams
4c000c816d Adjust to swap space. 2023-01-19 09:42:30 -05:00
Danny Adams
29bb06e779 Updates to ci.yml
Increases swap space for build.
2023-01-19 09:37:49 -05:00
Danny Adams
a1fb36cfd4 Merge branch 'beta-page-connector' into backup-page-flow 2023-01-19 01:35:16 -05:00
Danny Adams
6b1e84732e Merge branch 'main' into beta-page-connector 2023-01-19 01:34:33 -05:00
Danny Adams
bbf3370879 Update to /connector/sharepoint/collection.go
Adds field to hold Beta service within struct for populate method.
2023-01-19 01:32:45 -05:00
Danny Adams
f5326c0304 Update /sharepoint/data_collections.g
Adds function collectPages() to logic of dataCollections.
2023-01-19 01:32:01 -05:00
Danny Adams
ec613b636d Updates to /sharepoint/site_page.go
Adds logic for fetching Page M365 IDs.
2023-01-19 01:31:13 -05:00
Danny Adams
764909e6e9 Updates to site_page.go
Removes minimal definition of SitePages from page.
2023-01-19 00:36:37 -05:00
Danny Adams
0c83eab068 Updates tests to reflect pageInfo library. 2023-01-19 00:33:49 -05:00
Danny Adams
1ac4922c80 Updates pageInfo.go
Uses Beta library for pages.
2023-01-19 00:33:19 -05:00
Danny Adams
7d9d7bc02b Merge branch 'main' into backup-page-flow 2023-01-19 00:29:16 -05:00
Danny Adams
b92da54fb2 Logic added to retrieve site Pages from M365 back store. 2023-01-19 00:19:56 -05:00
Danny Adams
39155c68fa Updates to msgraph-sdk-go to comply with abstraction changes brought in
via Beta.
2023-01-18 23:49:06 -05:00
Danny Adams
287dcd6930 Testing for new struct added. 2023-01-18 23:35:20 -05:00
Danny Adams
a9421d7195 Beta Servicer created. 2023-01-18 23:34:58 -05:00
Danny Adams
0a111cd9df Updates to the change log to address build times. 2023-01-18 23:33:18 -05:00
Danny Adams
58ad917d4c Beta packages updated. 2023-01-18 22:55:33 -05:00
122 changed files with 10671 additions and 298 deletions

View File

@ -634,4 +634,4 @@ jobs:
steps: steps:
- name: Validate docs - name: Validate docs
run: | run: |
curl https://corsobackup.io/docs/quickstart/ | grep https://github.com/alcionai/corso/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Linux_x86_64.tar.gz curl https://corsobackup.io/docs/quickstart/ | grep https://github.com/alcionai/corso/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Linux_x86_64.tar.gz

View File

@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Check if the user specified for an exchange backup operation has a mailbox. - Check if the user specified for an exchange backup operation has a mailbox.
### Changed
- msgraph-beta-sdk-go replaces msgraph-sdk-go for new features. This can lead to long build times.
- Handle case where user's drive has not been initialized - Handle case where user's drive has not been initialized
- Inline attachments (e.g. copy/paste ) are discovered and backed up correctly ([#2163](https://github.com/alcionai/corso/issues/2163)) - Inline attachments (e.g. copy/paste ) are discovered and backed up correctly ([#2163](https://github.com/alcionai/corso/issues/2163))
- Guest and External users (for cloud accounts) and non-on-premise users (for systems that use on-prem AD syncs) are now excluded from backup and restore operations. - Guest and External users (for cloud accounts) and non-on-premise users (for systems that use on-prem AD syncs) are now excluded from backup and restore operations.

View File

@ -3,7 +3,6 @@ run:
linters: linters:
enable: enable:
- gci
- gofmt - gofmt
- gofumpt - gofumpt
- errcheck - errcheck
@ -106,3 +105,14 @@ issues:
linters: linters:
- forbidigo - forbidigo
text: "context.(Background|TODO)" text: "context.(Background|TODO)"
- path: internal/connector/graph/betasdk
linters:
- wsl
- revive
- gci
- lll
- gofmt
- gofumpt
- misspell
- errcheck

View File

@ -32,6 +32,8 @@ import (
var ( var (
libraryItems []string libraryItems []string
libraryPaths []string libraryPaths []string
listPaths []string
listItems []string
pageFolders []string pageFolders []string
page []string page []string
site []string site []string
@ -130,6 +132,18 @@ func addSharePointCommands(cmd *cobra.Command) *cobra.Command {
utils.LibraryItemFN, nil, utils.LibraryItemFN, nil,
"Select backup details by library item name or ID.") "Select backup details by library item name or ID.")
fs.StringSliceVar(
&listPaths,
utils.ListFN, nil,
"Select backup details by site name.",
)
fs.StringSliceVar(
&listItems,
utils.ListItemFN, nil,
"Select backup details by list name or ID.",
)
fs.StringArrayVar(&site, fs.StringArrayVar(&site,
utils.SiteFN, nil, utils.SiteFN, nil,
"Select backup details by site ID; accepts '"+utils.Wildcard+"' to select all sites.") "Select backup details by site ID; accepts '"+utils.Wildcard+"' to select all sites.")
@ -140,12 +154,12 @@ func addSharePointCommands(cmd *cobra.Command) *cobra.Command {
fs.StringSliceVar( fs.StringSliceVar(
&pageFolders, &pageFolders,
utils.PageFN, nil, utils.PageFolderFN, nil,
"Select backup data by site ID; accepts '"+utils.Wildcard+"' to select all sites.") "Select backup data by site ID; accepts '"+utils.Wildcard+"' to select all sites.")
fs.StringSliceVar( fs.StringSliceVar(
&page, &page,
utils.PageItemFN, nil, utils.PagesFN, nil,
"Select backup data by file name; accepts '"+utils.Wildcard+"' to select all pages within the site.", "Select backup data by file name; accepts '"+utils.Wildcard+"' to select all pages within the site.",
) )
@ -517,6 +531,7 @@ func runDetailsSharePointCmd(
} }
sel := utils.IncludeSharePointRestoreDataSelectors(opts) sel := utils.IncludeSharePointRestoreDataSelectors(opts)
// Filters not available
utils.FilterSharePointRestoreInfoSelectors(sel, opts) utils.FilterSharePointRestoreInfoSelectors(sel, opts)
return sel.Reduce(ctx, d), nil return sel.Reduce(ctx, d), nil

View File

@ -18,6 +18,8 @@ import (
var ( var (
listItems []string listItems []string
listPaths []string listPaths []string
pageFolders []string
pages []string
libraryItems []string libraryItems []string
libraryPaths []string libraryPaths []string
site []string site []string
@ -76,6 +78,18 @@ func addSharePointCommands(cmd *cobra.Command) *cobra.Command {
utils.ListItemFN, nil, utils.ListItemFN, nil,
"Restore list items by ID") "Restore list items by ID")
fs.StringSliceVar(
&pageFolders,
utils.PageFolderFN, nil,
"Restore Site pages by SharePoint Site ID",
)
fs.StringSliceVar(
&pages,
utils.PagesFN, nil,
"Restore site pages by file name(s)",
)
// sharepoint info flags // sharepoint info flags
// fs.StringVar( // fs.StringVar(
@ -131,6 +145,8 @@ func restoreSharePointCmd(cmd *cobra.Command, args []string) error {
ListPaths: listPaths, ListPaths: listPaths,
LibraryItems: libraryItems, LibraryItems: libraryItems,
LibraryPaths: libraryPaths, LibraryPaths: libraryPaths,
PageFolders: pageFolders,
Pages: pages,
Sites: site, Sites: site,
WebURLs: weburl, WebURLs: weburl,
// FileCreatedAfter: fileCreatedAfter, // FileCreatedAfter: fileCreatedAfter,

View File

@ -11,8 +11,8 @@ const (
LibraryFN = "library" LibraryFN = "library"
ListItemFN = "list-item" ListItemFN = "list-item"
ListFN = "list" ListFN = "list"
PageFN = "page" PageFolderFN = "page-folders"
PageItemFN = "page-item" PagesFN = "pages"
WebURLFN = "web-url" WebURLFN = "web-url"
) )

View File

@ -10,12 +10,12 @@ require (
github.com/google/uuid v1.3.0 github.com/google/uuid v1.3.0
github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-multierror v1.1.1
github.com/kopia/kopia v0.12.2-0.20230123092305-e5387cec0acb github.com/kopia/kopia v0.12.2-0.20230123092305-e5387cec0acb
github.com/microsoft/kiota-abstractions-go v0.15.2 github.com/microsoft/kiota-abstractions-go v0.16.0
github.com/microsoft/kiota-authentication-azure-go v0.5.0 github.com/microsoft/kiota-authentication-azure-go v0.6.0
github.com/microsoft/kiota-http-go v0.11.0 github.com/microsoft/kiota-http-go v0.13.0
github.com/microsoft/kiota-serialization-json-go v0.7.2 github.com/microsoft/kiota-serialization-json-go v0.7.2
github.com/microsoftgraph/msgraph-sdk-go v0.50.0 github.com/microsoftgraph/msgraph-sdk-go v0.53.0
github.com/microsoftgraph/msgraph-sdk-go-core v0.31.1 github.com/microsoftgraph/msgraph-sdk-go-core v0.33.0
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
github.com/rudderlabs/analytics-go v3.3.3+incompatible github.com/rudderlabs/analytics-go v3.3.3+incompatible
github.com/spatialcurrent/go-lazy v0.0.0-20211115014721-47315cc003d1 github.com/spatialcurrent/go-lazy v0.0.0-20211115014721-47315cc003d1
@ -53,8 +53,8 @@ require (
) )
require ( require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.3.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect

View File

@ -36,12 +36,12 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.2.0 h1:sVW/AFBTGyJxDaMYlq0ct3jUXTtj12tQ6zE2GZUgVQw= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.3.0 h1:VuHAcMq8pU1IWNT/m5yRaGqbK0BiQKHT8X4DTp9CHdI=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.2.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.3.0/go.mod h1:tZoQYdDZNOiIjdSn0dVWVfl0NEPGOJqVLzSrcFk4Is0=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 h1:t/W5MYAuQy81cvM8VUNfRLzhtKpXhVUAN7Cd7KVbTyc= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 h1:t/W5MYAuQy81cvM8VUNfRLzhtKpXhVUAN7Cd7KVbTyc=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0/go.mod h1:NBanQUfSWiWn3QEpWDTCU0IjBECKOYvl2R8xdRtMtiM= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0/go.mod h1:NBanQUfSWiWn3QEpWDTCU0IjBECKOYvl2R8xdRtMtiM=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 h1:XUNQ4mw+zJmaA2KXzP9JlQiecy1SI+Eog7xVkPiqIbg= github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2 h1:+5VZ72z0Qan5Bog5C+ZkgSqUbeVUd9wgtHOrIKuc5b8=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w=
github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 h1:VgSJlZH5u0k2qxSpqyghcFQKmvYckj46uymKK5XzkBM= github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 h1:VgSJlZH5u0k2qxSpqyghcFQKmvYckj46uymKK5XzkBM=
github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0/go.mod h1:BDJ5qMFKx9DugEg3+uQSDCdbYPr5s9vBTrL9P8TpqOU= github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0/go.mod h1:BDJ5qMFKx9DugEg3+uQSDCdbYPr5s9vBTrL9P8TpqOU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
@ -269,22 +269,22 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09
github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/microsoft/kiota-abstractions-go v0.15.2 h1:Pp78BbqPvkF2mAMH0Ph37ymwfSH7uF9iYfY1fZ8g630= github.com/microsoft/kiota-abstractions-go v0.16.0 h1:DZ1L4YsRsQw39iPGnVq2fQkqLXMsazdPwmWsnaH4EZg=
github.com/microsoft/kiota-abstractions-go v0.15.2/go.mod h1:RT/s9sCzg49i4iO7e2qhyWmX+DlJDgC0P+Wp8fKQQfo= github.com/microsoft/kiota-abstractions-go v0.16.0/go.mod h1:RT/s9sCzg49i4iO7e2qhyWmX+DlJDgC0P+Wp8fKQQfo=
github.com/microsoft/kiota-authentication-azure-go v0.5.0 h1:RVA/tTgMnDIN3u4qPZtvYvVRsQDOFkd3yvi6KXjZJko= github.com/microsoft/kiota-authentication-azure-go v0.6.0 h1:Il9bLO34J6D8DY89xYAXoGh9muvlphayqG4eihyT6B8=
github.com/microsoft/kiota-authentication-azure-go v0.5.0/go.mod h1:1Io6h+88FlDRmrajdjSnXPz8oyObUVjNuQZLhrF9kQk= github.com/microsoft/kiota-authentication-azure-go v0.6.0/go.mod h1:EJCHiLWLXW1/mSgX7lYReAhVO37MzRT5Xi2mcPTwCRQ=
github.com/microsoft/kiota-http-go v0.11.0 h1:0K0y/wZcTvEEX2Xdj5tngJqknqYQpArLdtjB/fo88Dc= github.com/microsoft/kiota-http-go v0.13.0 h1:CZSC+UrBSwjIvLlVh+AEPsDbD0c17AWd/QPRHIljd8k=
github.com/microsoft/kiota-http-go v0.11.0/go.mod h1:4D6vMjT7jQ3IRAJrpFoaDtfS9eMaSjQKHY6ETSV2cc0= github.com/microsoft/kiota-http-go v0.13.0/go.mod h1:aWtBlFhCetH0JmouvN3hiSaJoqCEdVHPqlrcLYExs3k=
github.com/microsoft/kiota-serialization-form-go v0.2.0 h1:jgPE+8DtrWhL+KwnAwRm13HnMNydbelC/NP9wRGwDUo= github.com/microsoft/kiota-serialization-form-go v0.2.0 h1:jgPE+8DtrWhL+KwnAwRm13HnMNydbelC/NP9wRGwDUo=
github.com/microsoft/kiota-serialization-form-go v0.2.0/go.mod h1:chOuh09tO7IrNtubAumdlG5wnrcYdMkjV7joVVGDyGs= github.com/microsoft/kiota-serialization-form-go v0.2.0/go.mod h1:chOuh09tO7IrNtubAumdlG5wnrcYdMkjV7joVVGDyGs=
github.com/microsoft/kiota-serialization-json-go v0.7.2 h1:DSb4fNDi5O+DqJwrHo+vRy2kSvfxG5VtN6m1EHzn5Vw= github.com/microsoft/kiota-serialization-json-go v0.7.2 h1:DSb4fNDi5O+DqJwrHo+vRy2kSvfxG5VtN6m1EHzn5Vw=
github.com/microsoft/kiota-serialization-json-go v0.7.2/go.mod h1:Ojum5prlijopyCOZ2XctRcVlE2pU8h+43r3tMdiWoDU= github.com/microsoft/kiota-serialization-json-go v0.7.2/go.mod h1:Ojum5prlijopyCOZ2XctRcVlE2pU8h+43r3tMdiWoDU=
github.com/microsoft/kiota-serialization-text-go v0.6.0 h1:3N2vftYZlwKdog69AN7ha+FZT0QxPG7xp/hLv0/W2OQ= github.com/microsoft/kiota-serialization-text-go v0.6.0 h1:3N2vftYZlwKdog69AN7ha+FZT0QxPG7xp/hLv0/W2OQ=
github.com/microsoft/kiota-serialization-text-go v0.6.0/go.mod h1:OUA4dNH+f6afiJUs+rQAatJos7QVF5PJkyrqoD89lx4= github.com/microsoft/kiota-serialization-text-go v0.6.0/go.mod h1:OUA4dNH+f6afiJUs+rQAatJos7QVF5PJkyrqoD89lx4=
github.com/microsoftgraph/msgraph-sdk-go v0.50.0 h1:yfPBDr7+tSdq8jKiNCvY5XzQji1kZzOHXvxQ9XxQ4E4= github.com/microsoftgraph/msgraph-sdk-go v0.53.0 h1:HpQd1Nvr8yQNeqhDuiVSbqn1fkHsFbRFDmnuhhXJXOQ=
github.com/microsoftgraph/msgraph-sdk-go v0.50.0/go.mod h1:XoTT9lzRSersVV4/lsFup3sOLfOLEf2dMsLckiAAKq8= github.com/microsoftgraph/msgraph-sdk-go v0.53.0/go.mod h1:BZLyon4n4T4EuLIAlX+kJ5JgneFTXVQDah1AJuq3FRY=
github.com/microsoftgraph/msgraph-sdk-go-core v0.31.1 h1:aVvnO5l8qLCEcvELc5n9grt7UXhAVtpog1QeQKLMlTE= github.com/microsoftgraph/msgraph-sdk-go-core v0.33.0 h1:cDL3ov/IZ2ZarUJdGGPsdR+46ALdd3CRAiDBIylLCoA=
github.com/microsoftgraph/msgraph-sdk-go-core v0.31.1/go.mod h1:RE4F2qGCTehGtQGc9Txafc4l+XMpbjYuO4amDLFgOWE= github.com/microsoftgraph/msgraph-sdk-go-core v0.33.0/go.mod h1:d0mU3PQAWnN/C4CwPJEZz2QhesrnR5UDnqRu2ODWPkI=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
github.com/minio/minio-go/v7 v7.0.45 h1:g4IeM9M9pW/Lo8AGGNOjBZYlvmtlE1N5TQEYWXRWzIs= github.com/minio/minio-go/v7 v7.0.45 h1:g4IeM9M9pW/Lo8AGGNOjBZYlvmtlE1N5TQEYWXRWzIs=

View File

@ -89,7 +89,7 @@ func (gc *GraphConnector) DataCollections(
ctx, ctx,
gc.itemClient, gc.itemClient,
sels, sels,
gc.credentials.AzureTenantID, gc.credentials,
gc.Service, gc.Service,
gc, gc,
ctrlOpts) ctrlOpts)

View File

@ -246,7 +246,7 @@ func (suite *ConnectorDataCollectionIntegrationSuite) TestSharePointDataCollecti
ctx, ctx,
graph.LargeItemClient(), graph.LargeItemClient(),
test.getSelector(), test.getSelector(),
connector.credentials.AzureTenantID, connector.credentials,
connector.Service, connector.Service,
connector, connector,
control.Options{}) control.Options{})

View File

@ -278,7 +278,8 @@ func (c Mail) Serialize(
if retriesErr != nil { if retriesErr != nil {
logger.Ctx(ctx).Debug("exceeded maximum retries") logger.Ctx(ctx).Debug("exceeded maximum retries")
return nil, support.WrapAndAppend(itemID, errors.Wrap(retriesErr, "attachment failed"), nil) return nil, support.WrapAndAppend(itemID,
support.ConnectorStackErrorTraceWrap(retriesErr, "attachment Failed"), nil)
} }
} }

View File

@ -0,0 +1,86 @@
package betasdk
import (
i1a3c1a5501c5e41b7fd169f2d4c768dce9b096ac28fb5431bf02afcc57295411 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/sites"
absser "github.com/microsoft/kiota-abstractions-go"
kioser "github.com/microsoft/kiota-abstractions-go/serialization"
kform "github.com/microsoft/kiota-serialization-form-go"
kw "github.com/microsoft/kiota-serialization-json-go"
ktext "github.com/microsoft/kiota-serialization-text-go"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
)
// BetaClient the main entry point of the SDK, exposes the configuration and the fluent API.
// Minimal Beta Connector:
// Details on how the Code was generated is present in `kioter-lock.json`.
// NOTE: kiota gen file is altered to indicate what files are included in the created
//
// Changes to Sites Directory:
// Access files send requests with an adapter's with ASync() support.
// This feature is not enabled in v1.0. Manually changed in remaining files.
// Additionally, only calls that begin as client.SitesBy(siteID).Pages() have an endpoint.
//
// The use case specific to Pages(). All other requests should be routed to the /internal/connector/graph.Servicer
// Specifics on `betaClient.SitesById(siteID).Pages` are located: sites/site_item_request_builder.go
//
// Required model files are identified as `modelFiles` in kiota-lock.json. Directory -> betasdk/models
// Required access files are identified as `sitesFiles` in kiota-lock.json. Directory -> betasdk/sites
//
// BetaClient minimal msgraph-beta-sdk-go for connecting to msgraph-beta-sdk-go
// for retrieving `SharePoint.Pages`. Code is generated from kiota.dev.
// requestAdapter is registered with the following the serializers:
// -- "Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory",
// -- "Microsoft.Kiota.Serialization.Text.TextParseNodeFactory",
// -- "Microsoft.Kiota.Serialization.Form.FormParseNodeFactory"
type BetaClient struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter *msgraphsdk.GraphRequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// NewBetaClient instantiates a new BetaClient and sets the default values.
// func NewBetaClient(requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BetaClient) {
func NewBetaClient(requestAdapter *msgraphsdk.GraphRequestAdapter) *BetaClient {
m := &BetaClient{}
m.pathParameters = make(map[string]string)
m.urlTemplate = "{+baseurl}"
m.requestAdapter = requestAdapter
absser.RegisterDefaultSerializer(func() kioser.SerializationWriterFactory {
return kw.NewJsonSerializationWriterFactory()
})
absser.RegisterDefaultSerializer(func() kioser.SerializationWriterFactory {
return ktext.NewTextSerializationWriterFactory()
})
absser.RegisterDefaultSerializer(func() kioser.SerializationWriterFactory {
return kform.NewFormSerializationWriterFactory()
})
absser.RegisterDefaultDeserializer(func() kioser.ParseNodeFactory {
return kw.NewJsonParseNodeFactory()
})
absser.RegisterDefaultDeserializer(func() kioser.ParseNodeFactory {
return ktext.NewTextParseNodeFactory()
})
absser.RegisterDefaultDeserializer(func() kioser.ParseNodeFactory {
return kform.NewFormParseNodeFactory()
})
if m.requestAdapter.GetBaseUrl() == "" {
m.requestAdapter.SetBaseUrl("https://graph.microsoft.com/beta")
}
return m
}
// SitesById provides operations to manage the collection of site entities.
func (m *BetaClient) SitesById(id string) *i1a3c1a5501c5e41b7fd169f2d4c768dce9b096ac28fb5431bf02afcc57295411.SiteItemRequestBuilder {
urlTplParams := make(map[string]string)
for idx, item := range m.pathParameters {
urlTplParams[idx] = item
}
if id != "" {
urlTplParams["site%2Did"] = id
}
return i1a3c1a5501c5e41b7fd169f2d4c768dce9b096ac28fb5431bf02afcc57295411.NewSiteItemRequestBuilderInternal(urlTplParams, m.requestAdapter)
}

View File

@ -0,0 +1,107 @@
package betasdk
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/alcionai/corso/src/internal/connector/graph"
"github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
"github.com/alcionai/corso/src/internal/tester"
"github.com/alcionai/corso/src/pkg/account"
)
type BetaClientSuite struct {
suite.Suite
credentials account.M365Config
}
func TestBetaClientSuite(t *testing.T) {
suite.Run(t, new(BetaClientSuite))
}
func (suite *BetaClientSuite) SetupSuite() {
t := suite.T()
a := tester.NewM365Account(t)
m365, err := a.M365Config()
require.NoError(t, err)
suite.credentials = m365
}
func (suite *BetaClientSuite) TestCreateBetaClient() {
t := suite.T()
adpt, err := graph.CreateAdapter(
suite.credentials.AzureTenantID,
suite.credentials.AzureClientID,
suite.credentials.AzureClientSecret,
)
require.NoError(t, err)
client := NewBetaClient(adpt)
assert.NotNil(t, client)
}
// TestBasicClientGetFunctionality. Tests that adapter is able
// to parse retrieved Site Page. Additional tests should
// be handled within the /internal/connector/sharepoint when
// additional features are added.
func (suite *BetaClientSuite) TestBasicClientGetFunctionality() {
ctx, flush := tester.NewContext()
defer flush()
t := suite.T()
adpt, err := graph.CreateAdapter(
suite.credentials.AzureTenantID,
suite.credentials.AzureClientID,
suite.credentials.AzureClientSecret,
)
require.NoError(t, err)
client := NewBetaClient(adpt)
require.NotNil(t, client)
siteID := tester.M365SiteID(t)
// TODO(dadams39) document allowable calls in main
collection, err := client.SitesById(siteID).Pages().Get(ctx, nil)
// Ensures that the client is able to receive data from beta
// Not Registered Error: content type application/json does not have a factory registered to be parsed
require.NoError(t, err)
for _, page := range collection.GetValue() {
assert.NotNil(t, page, "betasdk call for page does not return value.")
if page != nil {
t.Logf("Page :%s ", *page.GetName())
assert.NotNil(t, page.GetId())
}
}
}
func (suite *BetaClientSuite) TestServiceRequirements() {
t := suite.T()
adpt, err := graph.CreateAdapter(
suite.credentials.AzureTenantID,
suite.credentials.AzureClientID,
suite.credentials.AzureClientSecret,
)
require.NoError(t, err)
service := NewService(adpt)
require.NotNil(t, service)
testPage := models.NewSitePage()
name := "testFile"
desc := "working with parsing"
testPage.SetName(&name)
testPage.SetDescription(&desc)
byteArray, err := service.Serialize(testPage)
assert.NotEmpty(t, byteArray)
assert.NoError(t, err)
}

View File

@ -0,0 +1,44 @@
package betasdk
import (
absser "github.com/microsoft/kiota-abstractions-go/serialization"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
"github.com/pkg/errors"
)
// Service wraps BetaClient's functionality.
// Abstraction created to comply loosely with graph.Servicer
// methods for ease of switching between v1.0 and beta connnectors
type Service struct {
client *BetaClient
}
func (s Service) Adapter() *msgraphsdk.GraphRequestAdapter {
return s.client.requestAdapter
}
func (s Service) Client() *BetaClient {
return s.client
}
func NewService(adpt *msgraphsdk.GraphRequestAdapter) *Service {
return &Service{
client: NewBetaClient(adpt),
}
}
// Seraialize writes an M365 parsable object into a byte array using the built-in
// application/json writer within the adapter.
func (s Service) Serialize(object absser.Parsable) ([]byte, error) {
writer, err := s.Adapter().GetSerializationWriterFactory().GetSerializationWriter("application/json")
if err != nil || writer == nil {
return nil, errors.Wrap(err, "creating json serialization writer")
}
err = writer.WriteObjectValue("", object)
if err != nil {
return nil, errors.Wrap(err, "writeObjecValue serialization")
}
return writer.GetSerializedContent()
}

View File

@ -0,0 +1,131 @@
{
"lockFileVersion": "1.0.0",
"kiotaVersion": "0.10.0.0",
"clientClassName": "BetaClient",
"clientNamespaceName": "github.com/alcionai/corso/src/internal/connector/graph/betasdk",
"language": "Go",
"betaVersion": "0.53.0",
"usesBackingStore": false,
"includeAdditionalData": true,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
"Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",
"Microsoft.Kiota.Serialization.Form.FormSerializationWriterFactory"
],
"deserializers": [
"Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory",
"Microsoft.Kiota.Serialization.Text.TextParseNodeFactory",
"Microsoft.Kiota.Serialization.Form.FormParseNodeFactory"
],
"structuredMimeTypes": [
"application/json",
"text/plain",
"application/x-www-form-urlencoded"
],
"includePatterns": [
"**/sites/**"
],
"excludePatterns": [
"**/admin/**",
"**/users/**",
"**/groups/**",
"**/onenote/**"
],
"sitesFiles": [
"count_request_builder.go",
"item_pages_count_request_builder.go",
"item_pages_item_canvas_layout_horizontal_sections_count_request_builder.go",
"item_pages_item_canvas_layout_horizontal_sections_horizontal_section_item_request_builder.go",
"item_pages_item_canvas_layout_horizontal_sections_item_columns_count_request_builder.go",
"item_pages_item_canvas_layout_horizontal_sections_item_columns_horizontal_section_column_item_request_builder.go",
"item_pages_item_canvas_layout_horizontal_sections_item_columns_item_webparts_count_request_builder.go",
"item_pages_item_canvas_layout_horizontal_sections_item_columns_item_webparts_item_get_position_of_web_part_request_builder.go",
"item_pages_item_canvas_layout_horizontal_sections_item_columns_item_webparts_request_builder.go",
"item_pages_item_canvas_layout_horizontal_sections_item_columns_item_webparts_web_part_item_request_builder.go",
"item_pages_item_canvas_layout_horizontal_sections_item_columns_request_builder.go",
"item_pages_item_canvas_layout_horizontal_sections_request_builder.go",
"item_pages_item_canvas_layout_request_builder.go",
"item_pages_item_canvas_layout_vertical_section_request_builder.go",
"item_pages_item_canvas_layout_vertical_section_webparts_count_request_builder.go",
"item_pages_item_canvas_layout_vertical_section_webparts_item_get_position_of_web_part_request_builder.go",
"item_pages_item_canvas_layout_vertical_section_webparts_request_builder.go",
"item_pages_item_canvas_layout_vertical_section_webparts_web_part_item_request_builder.go",
"item_pages_item_get_web_parts_by_position_post_request_body.go",
"item_pages_item_get_web_parts_by_position_post_request_bodyable.go",
"item_pages_item_get_web_parts_by_position_request_builder.go",
"item_pages_item_get_web_parts_by_position_response.go",
"item_pages_item_get_web_parts_by_position_responseable.go",
"item_pages_item_publish_request_builder.go",
"item_pages_item_web_parts_count_request_builder.go",
"item_pages_item_web_parts_item_get_position_of_web_part_request_builder.go",
"item_pages_item_web_parts_request_builder.go",
"item_pages_item_web_parts_web_part_item_request_builder.go",
"item_pages_request_builder.go",
"item_pages_site_page_item_request_builder.go",
"item_sites_count_request_builder.go",
"item_sites_site_item_request_builder.go",
"site_item_request_builder.go"
],
"modelFiles":[
"base_item.go",
"page_layout_type.go",
"standard_web_partable.go",
"canvas_layout.go",
"page_promotion_type.go",
"text_web_part.go",
"canvas_layoutable.go",
"publication_facet.go",
"text_web_part_collection_response.go",
"horizontal_section.go",
"publication_facetable.go",
"text_web_part_collection_responseable.go",
"horizontal_section_collection_response.go",
"reactions_facet.go",
"text_web_partable.go",
"horizontal_section_collection_responseable.go",
"reactions_facetable.go",
"title_area.go",
"horizontal_section_column.go",
"section_emphasis_type.go",
"title_area_layout_type.go",
"horizontal_section_column_collection_response.go",
"server_processed_content.go",
"title_area_text_alignment_type.go",
"horizontal_section_column_collection_responseable.go",
"server_processed_contentable.go",
"title_areaable.go",
"horizontal_section_columnable.go",
"site_access_type.go",
"vertical_section.go",
"horizontal_section_layout_type.go",
"site_page.go",
"vertical_sectionable.go",
"horizontal_sectionable.go",
"site_page_collection_response.go",
"web_part.go",
"meta_data_key_string_pair.go",
"site_page_collection_responseable.go",
"web_part_collection_response.go",
"meta_data_key_string_pair_collection_response.go",
"site_pageable.go",
"web_part_collection_responseable.go",
"meta_data_key_string_pair_collection_responseable.go",
"site_security_level.go",
"web_part_data.go",
"meta_data_key_string_pairable.go",
"site_settings.go",
"web_part_dataable.go",
"meta_data_key_value_pair.go",
"site_settingsable.go",
"web_part_position.go",
"meta_data_key_value_pair_collection_response.go",
"standard_web_part.go",
"web_part_positionable.go",
"meta_data_key_value_pair_collection_responseable.go",
"standard_web_part_collection_response.go",
"web_partable.go",
"meta_data_key_value_pairable.go",
"standard_web_part_collection_responseable.go"
],
"disabledValidationRules": []
}

View File

@ -0,0 +1,379 @@
package models
import (
i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time"
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// BaseItem
type BaseItem struct {
msmodel.Entity
// Identity of the user, device, or application which created the item. Read-only.
createdBy msmodel.IdentitySetable
// The createdByUser property
createdByUser msmodel.Userable
// Date and time of item creation. Read-only.
createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
// The description property
description *string
// ETag for the item. Read-only.
eTag *string
// Identity of the user, device, and application which last modified the item. Read-only.
lastModifiedBy msmodel.IdentitySetable
// The lastModifiedByUser property
lastModifiedByUser msmodel.Userable
// Date and time the item was last modified. Read-only.
lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
// The name of the item. Read-write.
name *string
// Parent information, if the item has a parent. Read-write.
parentReference msmodel.ItemReferenceable
// URL that displays the resource in the browser. Read-only.
webUrl *string
}
// NewBaseItem instantiates a new baseItem and sets the default values.
func NewBaseItem() *BaseItem {
m := &BaseItem{
Entity: *msmodel.NewEntity(),
}
return m
}
// CreateBaseItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateBaseItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
if parseNode != nil {
mappingValueNode, err := parseNode.GetChildNode("@odata.type")
if err != nil {
return nil, err
}
if mappingValueNode != nil {
mappingValue, err := mappingValueNode.GetStringValue()
if err != nil {
return nil, err
}
if mappingValue != nil {
switch *mappingValue {
case "#microsoft.graph.drive":
return msmodel.NewDrive(), nil
case "#microsoft.graph.driveItem":
return msmodel.NewDriveItem(), nil
case "#microsoft.graph.list":
return msmodel.NewList(), nil
case "#microsoft.graph.listItem":
return msmodel.NewListItem(), nil
case "#microsoft.graph.sharedDriveItem":
return msmodel.NewSharedDriveItem(), nil
case "#microsoft.graph.site":
return msmodel.NewSite(), nil
case "#microsoft.graph.sitePage":
return NewSitePage(), nil
}
}
}
}
return NewBaseItem(), nil
}
// GetCreatedBy gets the createdBy property value. Identity of the user, device, or application which created the item. Read-only.
func (m *BaseItem) GetCreatedBy() msmodel.IdentitySetable {
return m.createdBy
}
// GetCreatedByUser gets the createdByUser property value. The createdByUser property
func (m *BaseItem) GetCreatedByUser() msmodel.Userable {
return m.createdByUser
}
// GetCreatedDateTime gets the createdDateTime property value. Date and time of item creation. Read-only.
func (m *BaseItem) GetCreatedDateTime() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time {
return m.createdDateTime
}
// GetDescription gets the description property value. The description property
func (m *BaseItem) GetDescription() *string {
return m.description
}
// GetETag gets the eTag property value. ETag for the item. Read-only.
func (m *BaseItem) GetETag() *string {
return m.eTag
}
// GetFieldDeserializers the deserialization information for the current model
func (m *BaseItem) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.Entity.GetFieldDeserializers()
res["createdBy"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(msmodel.CreateIdentitySetFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetCreatedBy(val.(msmodel.IdentitySetable))
}
return nil
}
res["createdByUser"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(msmodel.CreateUserFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetCreatedByUser(val.(msmodel.Userable))
}
return nil
}
res["createdDateTime"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetCreatedDateTime(val)
}
return nil
}
res["description"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetDescription(val)
}
return nil
}
res["eTag"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetETag(val)
}
return nil
}
res["lastModifiedBy"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(msmodel.CreateIdentitySetFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetLastModifiedBy(val.(msmodel.IdentitySetable))
}
return nil
}
res["lastModifiedByUser"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(msmodel.CreateUserFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetLastModifiedByUser(val.(msmodel.Userable))
}
return nil
}
res["lastModifiedDateTime"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetLastModifiedDateTime(val)
}
return nil
}
res["name"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetName(val)
}
return nil
}
res["parentReference"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(msmodel.CreateItemReferenceFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetParentReference(val.(msmodel.ItemReferenceable))
}
return nil
}
res["webUrl"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetWebUrl(val)
}
return nil
}
return res
}
// GetLastModifiedBy gets the lastModifiedBy property value. Identity of the user, device, and application which last modified the item. Read-only.
func (m *BaseItem) GetLastModifiedBy() msmodel.IdentitySetable {
return m.lastModifiedBy
}
// GetLastModifiedByUser gets the lastModifiedByUser property value. The lastModifiedByUser property
func (m *BaseItem) GetLastModifiedByUser() msmodel.Userable {
return m.lastModifiedByUser
}
// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Date and time the item was last modified. Read-only.
func (m *BaseItem) GetLastModifiedDateTime() *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time {
return m.lastModifiedDateTime
}
// GetName gets the name property value. The name of the item. Read-write.
func (m *BaseItem) GetName() *string {
return m.name
}
// GetParentReference gets the parentReference property value. Parent information, if the item has a parent. Read-write.
func (m *BaseItem) GetParentReference() msmodel.ItemReferenceable {
return m.parentReference
}
// GetWebUrl gets the webUrl property value. URL that displays the resource in the browser. Read-only.
func (m *BaseItem) GetWebUrl() *string {
return m.webUrl
}
// Serialize serializes information the current object
func (m *BaseItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteObjectValue("createdBy", m.GetCreatedBy())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("createdByUser", m.GetCreatedByUser())
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("description", m.GetDescription())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("eTag", m.GetETag())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("lastModifiedByUser", m.GetLastModifiedByUser())
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("name", m.GetName())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("parentReference", m.GetParentReference())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("webUrl", m.GetWebUrl())
if err != nil {
return err
}
}
return nil
}
// SetCreatedBy sets the createdBy property value. Identity of the user, device, or application which created the item. Read-only.
func (m *BaseItem) SetCreatedBy(value msmodel.IdentitySetable) {
m.createdBy = value
}
// SetCreatedByUser sets the createdByUser property value. The createdByUser property
func (m *BaseItem) SetCreatedByUser(value msmodel.Userable) {
m.createdByUser = value
}
// SetCreatedDateTime sets the createdDateTime property value. Date and time of item creation. Read-only.
func (m *BaseItem) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
m.createdDateTime = value
}
// SetDescription sets the description property value. The description property
func (m *BaseItem) SetDescription(value *string) {
m.description = value
}
// SetETag sets the eTag property value. ETag for the item. Read-only.
func (m *BaseItem) SetETag(value *string) {
m.eTag = value
}
// SetLastModifiedBy sets the lastModifiedBy property value. Identity of the user, device, and application which last modified the item. Read-only.
func (m *BaseItem) SetLastModifiedBy(value msmodel.IdentitySetable) {
m.lastModifiedBy = value
}
// SetLastModifiedByUser sets the lastModifiedByUser property value. The lastModifiedByUser property
func (m *BaseItem) SetLastModifiedByUser(value msmodel.Userable) {
m.lastModifiedByUser = value
}
// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Date and time the item was last modified. Read-only.
func (m *BaseItem) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
m.lastModifiedDateTime = value
}
// SetName sets the name property value. The name of the item. Read-write.
func (m *BaseItem) SetName(value *string) {
m.name = value
}
// SetParentReference sets the parentReference property value. Parent information, if the item has a parent. Read-write.
func (m *BaseItem) SetParentReference(value msmodel.ItemReferenceable) {
m.parentReference = value
}
// SetWebUrl sets the webUrl property value. URL that displays the resource in the browser. Read-only.
func (m *BaseItem) SetWebUrl(value *string) {
m.webUrl = value
}

View File

@ -0,0 +1,103 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// CanvasLayout
type CanvasLayout struct {
msmodel.Entity
// Collection of horizontal sections on the SharePoint page.
horizontalSections []HorizontalSectionable
// Vertical section on the SharePoint page.
verticalSection VerticalSectionable
}
// NewCanvasLayout instantiates a new canvasLayout and sets the default values.
func NewCanvasLayout() *CanvasLayout {
m := &CanvasLayout{
Entity: *msmodel.NewEntity(),
}
return m
}
// CreateCanvasLayoutFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateCanvasLayoutFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewCanvasLayout(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *CanvasLayout) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.Entity.GetFieldDeserializers()
res["horizontalSections"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateHorizontalSectionFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]HorizontalSectionable, len(val))
for i, v := range val {
res[i] = v.(HorizontalSectionable)
}
m.SetHorizontalSections(res)
}
return nil
}
res["verticalSection"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateVerticalSectionFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetVerticalSection(val.(VerticalSectionable))
}
return nil
}
return res
}
// GetHorizontalSections gets the horizontalSections property value. Collection of horizontal sections on the SharePoint page.
func (m *CanvasLayout) GetHorizontalSections() []HorizontalSectionable {
return m.horizontalSections
}
// GetVerticalSection gets the verticalSection property value. Vertical section on the SharePoint page.
func (m *CanvasLayout) GetVerticalSection() VerticalSectionable {
return m.verticalSection
}
// Serialize serializes information the current object
func (m *CanvasLayout) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
if m.GetHorizontalSections() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHorizontalSections()))
for i, v := range m.GetHorizontalSections() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("horizontalSections", cast)
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("verticalSection", m.GetVerticalSection())
if err != nil {
return err
}
}
return nil
}
// SetHorizontalSections sets the horizontalSections property value. Collection of horizontal sections on the SharePoint page.
func (m *CanvasLayout) SetHorizontalSections(value []HorizontalSectionable) {
m.horizontalSections = value
}
// SetVerticalSection sets the verticalSection property value. Vertical section on the SharePoint page.
func (m *CanvasLayout) SetVerticalSection(value VerticalSectionable) {
m.verticalSection = value
}

View File

@ -0,0 +1,16 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// CanvasLayoutable
type CanvasLayoutable interface {
msmodel.Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetHorizontalSections() []HorizontalSectionable
GetVerticalSection() VerticalSectionable
SetHorizontalSections(value []HorizontalSectionable)
SetVerticalSection(value VerticalSectionable)
}

View File

@ -0,0 +1,133 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// HorizontalSection provides operations to call the remove method.
type HorizontalSection struct {
msmodel.Entity
// The set of vertical columns in this section.
columns []HorizontalSectionColumnable
// Enumeration value that indicates the emphasis of the section background. The possible values are: none, netural, soft, strong, unknownFutureValue.
emphasis *SectionEmphasisType
// Layout type of the section. The possible values are: none, oneColumn, twoColumns, threeColumns, oneThirdLeftColumn, oneThirdRightColumn, fullWidth, unknownFutureValue.
layout *HorizontalSectionLayoutType
}
// NewHorizontalSection instantiates a new horizontalSection and sets the default values.
func NewHorizontalSection() *HorizontalSection {
m := &HorizontalSection{
Entity: *msmodel.NewEntity(),
}
return m
}
// CreateHorizontalSectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateHorizontalSectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewHorizontalSection(), nil
}
// GetColumns gets the columns property value. The set of vertical columns in this section.
func (m *HorizontalSection) GetColumns() []HorizontalSectionColumnable {
return m.columns
}
// GetEmphasis gets the emphasis property value. Enumeration value that indicates the emphasis of the section background. The possible values are: none, netural, soft, strong, unknownFutureValue.
func (m *HorizontalSection) GetEmphasis() *SectionEmphasisType {
return m.emphasis
}
// GetFieldDeserializers the deserialization information for the current model
func (m *HorizontalSection) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.Entity.GetFieldDeserializers()
res["columns"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateHorizontalSectionColumnFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]HorizontalSectionColumnable, len(val))
for i, v := range val {
res[i] = v.(HorizontalSectionColumnable)
}
m.SetColumns(res)
}
return nil
}
res["emphasis"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseSectionEmphasisType)
if err != nil {
return err
}
if val != nil {
m.SetEmphasis(val.(*SectionEmphasisType))
}
return nil
}
res["layout"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseHorizontalSectionLayoutType)
if err != nil {
return err
}
if val != nil {
m.SetLayout(val.(*HorizontalSectionLayoutType))
}
return nil
}
return res
}
// GetLayout gets the layout property value. Layout type of the section. The possible values are: none, oneColumn, twoColumns, threeColumns, oneThirdLeftColumn, oneThirdRightColumn, fullWidth, unknownFutureValue.
func (m *HorizontalSection) GetLayout() *HorizontalSectionLayoutType {
return m.layout
}
// Serialize serializes information the current object
func (m *HorizontalSection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
if m.GetColumns() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetColumns()))
for i, v := range m.GetColumns() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("columns", cast)
if err != nil {
return err
}
}
if m.GetEmphasis() != nil {
cast := (*m.GetEmphasis()).String()
err = writer.WriteStringValue("emphasis", &cast)
if err != nil {
return err
}
}
if m.GetLayout() != nil {
cast := (*m.GetLayout()).String()
err = writer.WriteStringValue("layout", &cast)
if err != nil {
return err
}
}
return nil
}
// SetColumns sets the columns property value. The set of vertical columns in this section.
func (m *HorizontalSection) SetColumns(value []HorizontalSectionColumnable) {
m.columns = value
}
// SetEmphasis sets the emphasis property value. Enumeration value that indicates the emphasis of the section background. The possible values are: none, netural, soft, strong, unknownFutureValue.
func (m *HorizontalSection) SetEmphasis(value *SectionEmphasisType) {
m.emphasis = value
}
// SetLayout sets the layout property value. Layout type of the section. The possible values are: none, oneColumn, twoColumns, threeColumns, oneThirdLeftColumn, oneThirdRightColumn, fullWidth, unknownFutureValue.
func (m *HorizontalSection) SetLayout(value *HorizontalSectionLayoutType) {
m.layout = value
}

View File

@ -0,0 +1,75 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// HorizontalSectionCollectionResponse
type HorizontalSectionCollectionResponse struct {
msmodel.BaseCollectionPaginationCountResponse
// The value property
value []HorizontalSectionable
}
// NewHorizontalSectionCollectionResponse instantiates a new HorizontalSectionCollectionResponse and sets the default values.
func NewHorizontalSectionCollectionResponse() *HorizontalSectionCollectionResponse {
m := &HorizontalSectionCollectionResponse{
BaseCollectionPaginationCountResponse: *msmodel.NewBaseCollectionPaginationCountResponse(),
}
return m
}
// CreateHorizontalSectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateHorizontalSectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewHorizontalSectionCollectionResponse(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *HorizontalSectionCollectionResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateHorizontalSectionFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]HorizontalSectionable, len(val))
for i, v := range val {
res[i] = v.(HorizontalSectionable)
}
m.SetValue(res)
}
return nil
}
return res
}
// GetValue gets the value property value. The value property
func (m *HorizontalSectionCollectionResponse) GetValue() []HorizontalSectionable {
return m.value
}
// Serialize serializes information the current object
func (m *HorizontalSectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.BaseCollectionPaginationCountResponse.Serialize(writer)
if err != nil {
return err
}
if m.GetValue() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue()))
for i, v := range m.GetValue() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("value", cast)
if err != nil {
return err
}
}
return nil
}
// SetValue sets the value property value. The value property
func (m *HorizontalSectionCollectionResponse) SetValue(value []HorizontalSectionable) {
m.value = value
}

View File

@ -0,0 +1,14 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// HorizontalSectionCollectionResponseable
type HorizontalSectionCollectionResponseable interface {
msmodel.BaseCollectionPaginationCountResponseable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetValue() []HorizontalSectionable
SetValue(value []HorizontalSectionable)
}

View File

@ -0,0 +1,103 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// HorizontalSectionColumn provides operations to call the remove method.
type HorizontalSectionColumn struct {
msmodel.Entity
// The collection of WebParts in this column.
webparts []WebPartable
// Width of the column. A horizontal section is divided into 12 grids. A column should have a value of 1-12 to represent its range spans. For example, there can be two columns both have a width of 6 in a section.
width *int32
}
// NewHorizontalSectionColumn instantiates a new horizontalSectionColumn and sets the default values.
func NewHorizontalSectionColumn() *HorizontalSectionColumn {
m := &HorizontalSectionColumn{
Entity: *msmodel.NewEntity(),
}
return m
}
// CreateHorizontalSectionColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateHorizontalSectionColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewHorizontalSectionColumn(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *HorizontalSectionColumn) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.Entity.GetFieldDeserializers()
res["webparts"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateWebPartFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]WebPartable, len(val))
for i, v := range val {
res[i] = v.(WebPartable)
}
m.SetWebparts(res)
}
return nil
}
res["width"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetWidth(val)
}
return nil
}
return res
}
// GetWebparts gets the webparts property value. The collection of WebParts in this column.
func (m *HorizontalSectionColumn) GetWebparts() []WebPartable {
return m.webparts
}
// GetWidth gets the width property value. Width of the column. A horizontal section is divided into 12 grids. A column should have a value of 1-12 to represent its range spans. For example, there can be two columns both have a width of 6 in a section.
func (m *HorizontalSectionColumn) GetWidth() *int32 {
return m.width
}
// Serialize serializes information the current object
func (m *HorizontalSectionColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
if m.GetWebparts() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWebparts()))
for i, v := range m.GetWebparts() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("webparts", cast)
if err != nil {
return err
}
}
{
err = writer.WriteInt32Value("width", m.GetWidth())
if err != nil {
return err
}
}
return nil
}
// SetWebparts sets the webparts property value. The collection of WebParts in this column.
func (m *HorizontalSectionColumn) SetWebparts(value []WebPartable) {
m.webparts = value
}
// SetWidth sets the width property value. Width of the column. A horizontal section is divided into 12 grids. A column should have a value of 1-12 to represent its range spans. For example, there can be two columns both have a width of 6 in a section.
func (m *HorizontalSectionColumn) SetWidth(value *int32) {
m.width = value
}

View File

@ -0,0 +1,75 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// HorizontalSectionColumnCollectionResponse
type HorizontalSectionColumnCollectionResponse struct {
msmodel.BaseCollectionPaginationCountResponse
// The value property
value []HorizontalSectionColumnable
}
// NewHorizontalSectionColumnCollectionResponse instantiates a new HorizontalSectionColumnCollectionResponse and sets the default values.
func NewHorizontalSectionColumnCollectionResponse() *HorizontalSectionColumnCollectionResponse {
m := &HorizontalSectionColumnCollectionResponse{
BaseCollectionPaginationCountResponse: *msmodel.NewBaseCollectionPaginationCountResponse(),
}
return m
}
// CreateHorizontalSectionColumnCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateHorizontalSectionColumnCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewHorizontalSectionColumnCollectionResponse(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *HorizontalSectionColumnCollectionResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateHorizontalSectionColumnFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]HorizontalSectionColumnable, len(val))
for i, v := range val {
res[i] = v.(HorizontalSectionColumnable)
}
m.SetValue(res)
}
return nil
}
return res
}
// GetValue gets the value property value. The value property
func (m *HorizontalSectionColumnCollectionResponse) GetValue() []HorizontalSectionColumnable {
return m.value
}
// Serialize serializes information the current object
func (m *HorizontalSectionColumnCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.BaseCollectionPaginationCountResponse.Serialize(writer)
if err != nil {
return err
}
if m.GetValue() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue()))
for i, v := range m.GetValue() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("value", cast)
if err != nil {
return err
}
}
return nil
}
// SetValue sets the value property value. The value property
func (m *HorizontalSectionColumnCollectionResponse) SetValue(value []HorizontalSectionColumnable) {
m.value = value
}

View File

@ -0,0 +1,14 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// HorizontalSectionColumnCollectionResponseable
type HorizontalSectionColumnCollectionResponseable interface {
msmodel.BaseCollectionPaginationCountResponseable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetValue() []HorizontalSectionColumnable
SetValue(value []HorizontalSectionColumnable)
}

View File

@ -0,0 +1,16 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// HorizontalSectionColumnable
type HorizontalSectionColumnable interface {
msmodel.Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetWebparts() []WebPartable
GetWidth() *int32
SetWebparts(value []WebPartable)
SetWidth(value *int32)
}

View File

@ -0,0 +1,52 @@
package models
import (
"errors"
)
// Provides operations to call the remove method.
type HorizontalSectionLayoutType int
const (
NONE_HORIZONTALSECTIONLAYOUTTYPE HorizontalSectionLayoutType = iota
ONECOLUMN_HORIZONTALSECTIONLAYOUTTYPE
TWOCOLUMNS_HORIZONTALSECTIONLAYOUTTYPE
THREECOLUMNS_HORIZONTALSECTIONLAYOUTTYPE
ONETHIRDLEFTCOLUMN_HORIZONTALSECTIONLAYOUTTYPE
ONETHIRDRIGHTCOLUMN_HORIZONTALSECTIONLAYOUTTYPE
FULLWIDTH_HORIZONTALSECTIONLAYOUTTYPE
UNKNOWNFUTUREVALUE_HORIZONTALSECTIONLAYOUTTYPE
)
func (i HorizontalSectionLayoutType) String() string {
return []string{"none", "oneColumn", "twoColumns", "threeColumns", "oneThirdLeftColumn", "oneThirdRightColumn", "fullWidth", "unknownFutureValue"}[i]
}
func ParseHorizontalSectionLayoutType(v string) (interface{}, error) {
result := NONE_HORIZONTALSECTIONLAYOUTTYPE
switch v {
case "none":
result = NONE_HORIZONTALSECTIONLAYOUTTYPE
case "oneColumn":
result = ONECOLUMN_HORIZONTALSECTIONLAYOUTTYPE
case "twoColumns":
result = TWOCOLUMNS_HORIZONTALSECTIONLAYOUTTYPE
case "threeColumns":
result = THREECOLUMNS_HORIZONTALSECTIONLAYOUTTYPE
case "oneThirdLeftColumn":
result = ONETHIRDLEFTCOLUMN_HORIZONTALSECTIONLAYOUTTYPE
case "oneThirdRightColumn":
result = ONETHIRDRIGHTCOLUMN_HORIZONTALSECTIONLAYOUTTYPE
case "fullWidth":
result = FULLWIDTH_HORIZONTALSECTIONLAYOUTTYPE
case "unknownFutureValue":
result = UNKNOWNFUTUREVALUE_HORIZONTALSECTIONLAYOUTTYPE
default:
return 0, errors.New("Unknown HorizontalSectionLayoutType value: " + v)
}
return &result, nil
}
func SerializeHorizontalSectionLayoutType(values []HorizontalSectionLayoutType) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}

View File

@ -0,0 +1,18 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// HorizontalSectionable
type HorizontalSectionable interface {
msmodel.Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetColumns() []HorizontalSectionColumnable
GetEmphasis() *SectionEmphasisType
GetLayout() *HorizontalSectionLayoutType
SetColumns(value []HorizontalSectionColumnable)
SetEmphasis(value *SectionEmphasisType)
SetLayout(value *HorizontalSectionLayoutType)
}

View File

@ -0,0 +1,123 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// MetaDataKeyStringPair
type MetaDataKeyStringPair struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]interface{}
// Key of the meta data.
key *string
// The OdataType property
odataType *string
// Value of the meta data.
value *string
}
// NewMetaDataKeyStringPair instantiates a new metaDataKeyStringPair and sets the default values.
func NewMetaDataKeyStringPair()(*MetaDataKeyStringPair) {
m := &MetaDataKeyStringPair{
}
m.SetAdditionalData(make(map[string]interface{}));
return m
}
// CreateMetaDataKeyStringPairFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateMetaDataKeyStringPairFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewMetaDataKeyStringPair(), nil
}
// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *MetaDataKeyStringPair) GetAdditionalData()(map[string]interface{}) {
return m.additionalData
}
// GetFieldDeserializers the deserialization information for the current model
func (m *MetaDataKeyStringPair) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetKey(val)
}
return nil
}
res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOdataType(val)
}
return nil
}
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetValue(val)
}
return nil
}
return res
}
// GetKey gets the key property value. Key of the meta data.
func (m *MetaDataKeyStringPair) GetKey()(*string) {
return m.key
}
// GetOdataType gets the @odata.type property value. The OdataType property
func (m *MetaDataKeyStringPair) GetOdataType()(*string) {
return m.odataType
}
// GetValue gets the value property value. Value of the meta data.
func (m *MetaDataKeyStringPair) GetValue()(*string) {
return m.value
}
// Serialize serializes information the current object
func (m *MetaDataKeyStringPair) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteStringValue("key", m.GetKey())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("@odata.type", m.GetOdataType())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("value", m.GetValue())
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
return err
}
}
return nil
}
// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *MetaDataKeyStringPair) SetAdditionalData(value map[string]interface{})() {
m.additionalData = value
}
// SetKey sets the key property value. Key of the meta data.
func (m *MetaDataKeyStringPair) SetKey(value *string)() {
m.key = value
}
// SetOdataType sets the @odata.type property value. The OdataType property
func (m *MetaDataKeyStringPair) SetOdataType(value *string)() {
m.odataType = value
}
// SetValue sets the value property value. Value of the meta data.
func (m *MetaDataKeyStringPair) SetValue(value *string)() {
m.value = value
}

View File

@ -0,0 +1,75 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// MetaDataKeyStringPairCollectionResponse
type MetaDataKeyStringPairCollectionResponse struct {
msmodel.BaseCollectionPaginationCountResponse
// The value property
value []MetaDataKeyStringPairable
}
// NewMetaDataKeyStringPairCollectionResponse instantiates a new MetaDataKeyStringPairCollectionResponse and sets the default values.
func NewMetaDataKeyStringPairCollectionResponse() *MetaDataKeyStringPairCollectionResponse {
m := &MetaDataKeyStringPairCollectionResponse{
BaseCollectionPaginationCountResponse: *msmodel.NewBaseCollectionPaginationCountResponse(),
}
return m
}
// CreateMetaDataKeyStringPairCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateMetaDataKeyStringPairCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewMetaDataKeyStringPairCollectionResponse(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *MetaDataKeyStringPairCollectionResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyStringPairFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]MetaDataKeyStringPairable, len(val))
for i, v := range val {
res[i] = v.(MetaDataKeyStringPairable)
}
m.SetValue(res)
}
return nil
}
return res
}
// GetValue gets the value property value. The value property
func (m *MetaDataKeyStringPairCollectionResponse) GetValue() []MetaDataKeyStringPairable {
return m.value
}
// Serialize serializes information the current object
func (m *MetaDataKeyStringPairCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.BaseCollectionPaginationCountResponse.Serialize(writer)
if err != nil {
return err
}
if m.GetValue() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue()))
for i, v := range m.GetValue() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("value", cast)
if err != nil {
return err
}
}
return nil
}
// SetValue sets the value property value. The value property
func (m *MetaDataKeyStringPairCollectionResponse) SetValue(value []MetaDataKeyStringPairable) {
m.value = value
}

View File

@ -0,0 +1,14 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// MetaDataKeyStringPairCollectionResponseable
type MetaDataKeyStringPairCollectionResponseable interface {
msmodel.BaseCollectionPaginationCountResponseable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetValue() []MetaDataKeyStringPairable
SetValue(value []MetaDataKeyStringPairable)
}

View File

@ -0,0 +1,17 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// MetaDataKeyStringPairable
type MetaDataKeyStringPairable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetKey()(*string)
GetOdataType()(*string)
GetValue()(*string)
SetKey(value *string)()
SetOdataType(value *string)()
SetValue(value *string)()
}

View File

@ -0,0 +1,135 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// MetaDataKeyValuePair
type MetaDataKeyValuePair struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]interface{}
// Key of the metadata.
key *string
// The OdataType property
odataType *string
// Value of the metadata. Should be an object.
value msmodel.Jsonable
}
// NewMetaDataKeyValuePair instantiates a new metaDataKeyValuePair and sets the default values.
func NewMetaDataKeyValuePair() *MetaDataKeyValuePair {
m := &MetaDataKeyValuePair{}
m.SetAdditionalData(make(map[string]interface{}))
return m
}
// CreateMetaDataKeyValuePairFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateMetaDataKeyValuePairFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewMetaDataKeyValuePair(), nil
}
// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *MetaDataKeyValuePair) GetAdditionalData() map[string]interface{} {
return m.additionalData
}
// GetFieldDeserializers the deserialization information for the current model
func (m *MetaDataKeyValuePair) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error)
res["key"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetKey(val)
}
return nil
}
res["@odata.type"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOdataType(val)
}
return nil
}
res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(msmodel.CreateJsonFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetValue(val.(msmodel.Jsonable))
}
return nil
}
return res
}
// GetKey gets the key property value. Key of the metadata.
func (m *MetaDataKeyValuePair) GetKey() *string {
return m.key
}
// GetOdataType gets the @odata.type property value. The OdataType property
func (m *MetaDataKeyValuePair) GetOdataType() *string {
return m.odataType
}
// GetValue gets the value property value. Value of the metadata. Should be an object.
func (m *MetaDataKeyValuePair) GetValue() msmodel.Jsonable {
return m.value
}
// Serialize serializes information the current object
func (m *MetaDataKeyValuePair) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
{
err := writer.WriteStringValue("key", m.GetKey())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("@odata.type", m.GetOdataType())
if err != nil {
return err
}
}
{
err := writer.WriteObjectValue("value", m.GetValue())
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
return err
}
}
return nil
}
// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *MetaDataKeyValuePair) SetAdditionalData(value map[string]interface{}) {
m.additionalData = value
}
// SetKey sets the key property value. Key of the metadata.
func (m *MetaDataKeyValuePair) SetKey(value *string) {
m.key = value
}
// SetOdataType sets the @odata.type property value. The OdataType property
func (m *MetaDataKeyValuePair) SetOdataType(value *string) {
m.odataType = value
}
// SetValue sets the value property value. Value of the metadata. Should be an object.
func (m *MetaDataKeyValuePair) SetValue(value msmodel.Jsonable) {
m.value = value
}

View File

@ -0,0 +1,75 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// MetaDataKeyValuePairCollectionResponse
type MetaDataKeyValuePairCollectionResponse struct {
msmodel.BaseCollectionPaginationCountResponse
// The value property
value []MetaDataKeyValuePairable
}
// NewMetaDataKeyValuePairCollectionResponse instantiates a new MetaDataKeyValuePairCollectionResponse and sets the default values.
func NewMetaDataKeyValuePairCollectionResponse() *MetaDataKeyValuePairCollectionResponse {
m := &MetaDataKeyValuePairCollectionResponse{
BaseCollectionPaginationCountResponse: *msmodel.NewBaseCollectionPaginationCountResponse(),
}
return m
}
// CreateMetaDataKeyValuePairCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateMetaDataKeyValuePairCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewMetaDataKeyValuePairCollectionResponse(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *MetaDataKeyValuePairCollectionResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyValuePairFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]MetaDataKeyValuePairable, len(val))
for i, v := range val {
res[i] = v.(MetaDataKeyValuePairable)
}
m.SetValue(res)
}
return nil
}
return res
}
// GetValue gets the value property value. The value property
func (m *MetaDataKeyValuePairCollectionResponse) GetValue() []MetaDataKeyValuePairable {
return m.value
}
// Serialize serializes information the current object
func (m *MetaDataKeyValuePairCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.BaseCollectionPaginationCountResponse.Serialize(writer)
if err != nil {
return err
}
if m.GetValue() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue()))
for i, v := range m.GetValue() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("value", cast)
if err != nil {
return err
}
}
return nil
}
// SetValue sets the value property value. The value property
func (m *MetaDataKeyValuePairCollectionResponse) SetValue(value []MetaDataKeyValuePairable) {
m.value = value
}

View File

@ -0,0 +1,14 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// MetaDataKeyValuePairCollectionResponseable
type MetaDataKeyValuePairCollectionResponseable interface {
msmodel.BaseCollectionPaginationCountResponseable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetValue() []MetaDataKeyValuePairable
SetValue(value []MetaDataKeyValuePairable)
}

View File

@ -0,0 +1,18 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// MetaDataKeyValuePairable
type MetaDataKeyValuePairable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetKey() *string
GetOdataType() *string
GetValue() msmodel.Jsonable
SetKey(value *string)
SetOdataType(value *string)
SetValue(value msmodel.Jsonable)
}

View File

@ -0,0 +1,40 @@
package models
import (
"errors"
)
// Provides operations to call the remove method.
type PageLayoutType int
const (
MICROSOFTRESERVED_PAGELAYOUTTYPE PageLayoutType = iota
ARTICLE_PAGELAYOUTTYPE
HOME_PAGELAYOUTTYPE
UNKNOWNFUTUREVALUE_PAGELAYOUTTYPE
)
func (i PageLayoutType) String() string {
return []string{"microsoftReserved", "article", "home", "unknownFutureValue"}[i]
}
func ParsePageLayoutType(v string) (interface{}, error) {
result := MICROSOFTRESERVED_PAGELAYOUTTYPE
switch v {
case "microsoftReserved":
result = MICROSOFTRESERVED_PAGELAYOUTTYPE
case "article":
result = ARTICLE_PAGELAYOUTTYPE
case "home":
result = HOME_PAGELAYOUTTYPE
case "unknownFutureValue":
result = UNKNOWNFUTUREVALUE_PAGELAYOUTTYPE
default:
return 0, errors.New("Unknown PageLayoutType value: " + v)
}
return &result, nil
}
func SerializePageLayoutType(values []PageLayoutType) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}

View File

@ -0,0 +1,40 @@
package models
import (
"errors"
)
// Provides operations to call the remove method.
type PagePromotionType int
const (
MICROSOFTRESERVED_PAGEPROMOTIONTYPE PagePromotionType = iota
PAGE_PAGEPROMOTIONTYPE
NEWSPOST_PAGEPROMOTIONTYPE
UNKNOWNFUTUREVALUE_PAGEPROMOTIONTYPE
)
func (i PagePromotionType) String() string {
return []string{"microsoftReserved", "page", "newsPost", "unknownFutureValue"}[i]
}
func ParsePagePromotionType(v string) (interface{}, error) {
result := MICROSOFTRESERVED_PAGEPROMOTIONTYPE
switch v {
case "microsoftReserved":
result = MICROSOFTRESERVED_PAGEPROMOTIONTYPE
case "page":
result = PAGE_PAGEPROMOTIONTYPE
case "newsPost":
result = NEWSPOST_PAGEPROMOTIONTYPE
case "unknownFutureValue":
result = UNKNOWNFUTUREVALUE_PAGEPROMOTIONTYPE
default:
return 0, errors.New("Unknown PagePromotionType value: " + v)
}
return &result, nil
}
func SerializePagePromotionType(values []PagePromotionType) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}

View File

@ -0,0 +1,123 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// PublicationFacet
type PublicationFacet struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]interface{}
// The state of publication for this document. Either published or checkout. Read-only.
level *string
// The OdataType property
odataType *string
// The unique identifier for the version that is visible to the current caller. Read-only.
versionId *string
}
// NewPublicationFacet instantiates a new publicationFacet and sets the default values.
func NewPublicationFacet()(*PublicationFacet) {
m := &PublicationFacet{
}
m.SetAdditionalData(make(map[string]interface{}));
return m
}
// CreatePublicationFacetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreatePublicationFacetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewPublicationFacet(), nil
}
// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *PublicationFacet) GetAdditionalData()(map[string]interface{}) {
return m.additionalData
}
// GetFieldDeserializers the deserialization information for the current model
func (m *PublicationFacet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["level"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetLevel(val)
}
return nil
}
res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOdataType(val)
}
return nil
}
res["versionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetVersionId(val)
}
return nil
}
return res
}
// GetLevel gets the level property value. The state of publication for this document. Either published or checkout. Read-only.
func (m *PublicationFacet) GetLevel()(*string) {
return m.level
}
// GetOdataType gets the @odata.type property value. The OdataType property
func (m *PublicationFacet) GetOdataType()(*string) {
return m.odataType
}
// GetVersionId gets the versionId property value. The unique identifier for the version that is visible to the current caller. Read-only.
func (m *PublicationFacet) GetVersionId()(*string) {
return m.versionId
}
// Serialize serializes information the current object
func (m *PublicationFacet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteStringValue("level", m.GetLevel())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("@odata.type", m.GetOdataType())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("versionId", m.GetVersionId())
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
return err
}
}
return nil
}
// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *PublicationFacet) SetAdditionalData(value map[string]interface{})() {
m.additionalData = value
}
// SetLevel sets the level property value. The state of publication for this document. Either published or checkout. Read-only.
func (m *PublicationFacet) SetLevel(value *string)() {
m.level = value
}
// SetOdataType sets the @odata.type property value. The OdataType property
func (m *PublicationFacet) SetOdataType(value *string)() {
m.odataType = value
}
// SetVersionId sets the versionId property value. The unique identifier for the version that is visible to the current caller. Read-only.
func (m *PublicationFacet) SetVersionId(value *string)() {
m.versionId = value
}

View File

@ -0,0 +1,17 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// PublicationFacetable
type PublicationFacetable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetLevel()(*string)
GetOdataType()(*string)
GetVersionId()(*string)
SetLevel(value *string)()
SetOdataType(value *string)()
SetVersionId(value *string)()
}

View File

@ -0,0 +1,149 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// ReactionsFacet
type ReactionsFacet struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]interface{}
// Count of comments.
commentCount *int32
// Count of likes.
likeCount *int32
// The OdataType property
odataType *string
// Count of shares.
shareCount *int32
}
// NewReactionsFacet instantiates a new reactionsFacet and sets the default values.
func NewReactionsFacet()(*ReactionsFacet) {
m := &ReactionsFacet{
}
m.SetAdditionalData(make(map[string]interface{}));
return m
}
// CreateReactionsFacetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateReactionsFacetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewReactionsFacet(), nil
}
// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *ReactionsFacet) GetAdditionalData()(map[string]interface{}) {
return m.additionalData
}
// GetCommentCount gets the commentCount property value. Count of comments.
func (m *ReactionsFacet) GetCommentCount()(*int32) {
return m.commentCount
}
// GetFieldDeserializers the deserialization information for the current model
func (m *ReactionsFacet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["commentCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetCommentCount(val)
}
return nil
}
res["likeCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetLikeCount(val)
}
return nil
}
res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOdataType(val)
}
return nil
}
res["shareCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetShareCount(val)
}
return nil
}
return res
}
// GetLikeCount gets the likeCount property value. Count of likes.
func (m *ReactionsFacet) GetLikeCount()(*int32) {
return m.likeCount
}
// GetOdataType gets the @odata.type property value. The OdataType property
func (m *ReactionsFacet) GetOdataType()(*string) {
return m.odataType
}
// GetShareCount gets the shareCount property value. Count of shares.
func (m *ReactionsFacet) GetShareCount()(*int32) {
return m.shareCount
}
// Serialize serializes information the current object
func (m *ReactionsFacet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteInt32Value("commentCount", m.GetCommentCount())
if err != nil {
return err
}
}
{
err := writer.WriteInt32Value("likeCount", m.GetLikeCount())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("@odata.type", m.GetOdataType())
if err != nil {
return err
}
}
{
err := writer.WriteInt32Value("shareCount", m.GetShareCount())
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
return err
}
}
return nil
}
// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *ReactionsFacet) SetAdditionalData(value map[string]interface{})() {
m.additionalData = value
}
// SetCommentCount sets the commentCount property value. Count of comments.
func (m *ReactionsFacet) SetCommentCount(value *int32)() {
m.commentCount = value
}
// SetLikeCount sets the likeCount property value. Count of likes.
func (m *ReactionsFacet) SetLikeCount(value *int32)() {
m.likeCount = value
}
// SetOdataType sets the @odata.type property value. The OdataType property
func (m *ReactionsFacet) SetOdataType(value *string)() {
m.odataType = value
}
// SetShareCount sets the shareCount property value. Count of shares.
func (m *ReactionsFacet) SetShareCount(value *int32)() {
m.shareCount = value
}

View File

@ -0,0 +1,19 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// ReactionsFacetable
type ReactionsFacetable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetCommentCount()(*int32)
GetLikeCount()(*int32)
GetOdataType()(*string)
GetShareCount()(*int32)
SetCommentCount(value *int32)()
SetLikeCount(value *int32)()
SetOdataType(value *string)()
SetShareCount(value *int32)()
}

View File

@ -0,0 +1,43 @@
package models
import (
"errors"
)
// Provides operations to call the remove method.
type SectionEmphasisType int
const (
NONE_SECTIONEMPHASISTYPE SectionEmphasisType = iota
NEUTRAL_SECTIONEMPHASISTYPE
SOFT_SECTIONEMPHASISTYPE
STRONG_SECTIONEMPHASISTYPE
UNKNOWNFUTUREVALUE_SECTIONEMPHASISTYPE
)
func (i SectionEmphasisType) String() string {
return []string{"none", "neutral", "soft", "strong", "unknownFutureValue"}[i]
}
func ParseSectionEmphasisType(v string) (interface{}, error) {
result := NONE_SECTIONEMPHASISTYPE
switch v {
case "none":
result = NONE_SECTIONEMPHASISTYPE
case "neutral":
result = NEUTRAL_SECTIONEMPHASISTYPE
case "soft":
result = SOFT_SECTIONEMPHASISTYPE
case "strong":
result = STRONG_SECTIONEMPHASISTYPE
case "unknownFutureValue":
result = UNKNOWNFUTUREVALUE_SECTIONEMPHASISTYPE
default:
return 0, errors.New("Unknown SectionEmphasisType value: " + v)
}
return &result, nil
}
func SerializeSectionEmphasisType(values []SectionEmphasisType) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}

View File

@ -0,0 +1,294 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// ServerProcessedContent
type ServerProcessedContent struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]interface{}
// A key-value map where keys are string identifiers and values are component ids. SharePoint servers might decide to use this hint to preload the script for corresponding components for performance boost.
componentDependencies []MetaDataKeyStringPairable
// A key-value map where keys are string identifier and values are object of custom key-value pair.
customMetadata []MetaDataKeyValuePairable
// A key-value map where keys are string identifiers and values are rich text with HTML format. SharePoint servers treat the values as HTML content and run services like safety checks, search index and link fixup on them.
htmlStrings []MetaDataKeyStringPairable
// A key-value map where keys are string identifiers and values are image sources. SharePoint servers treat the values as image sources and run services like search index and link fixup on them.
imageSources []MetaDataKeyStringPairable
// A key-value map where keys are string identifiers and values are links. SharePoint servers treat the values as links and run services like link fixup on them.
links []MetaDataKeyStringPairable
// The OdataType property
odataType *string
// A key-value map where keys are string identifiers and values are strings that should be search indexed.
searchablePlainTexts []MetaDataKeyStringPairable
}
// NewServerProcessedContent instantiates a new serverProcessedContent and sets the default values.
func NewServerProcessedContent() *ServerProcessedContent {
m := &ServerProcessedContent{}
m.SetAdditionalData(make(map[string]interface{}))
return m
}
// CreateServerProcessedContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateServerProcessedContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewServerProcessedContent(), nil
}
// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *ServerProcessedContent) GetAdditionalData() map[string]interface{} {
return m.additionalData
}
// GetComponentDependencies gets the componentDependencies property value. A key-value map where keys are string identifiers and values are component ids. SharePoint servers might decide to use this hint to preload the script for corresponding components for performance boost.
func (m *ServerProcessedContent) GetComponentDependencies() []MetaDataKeyStringPairable {
return m.componentDependencies
}
// GetCustomMetadata gets the customMetadata property value. A key-value map where keys are string identifier and values are object of custom key-value pair.
func (m *ServerProcessedContent) GetCustomMetadata() []MetaDataKeyValuePairable {
return m.customMetadata
}
// GetFieldDeserializers the deserialization information for the current model
func (m *ServerProcessedContent) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error)
res["componentDependencies"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyStringPairFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]MetaDataKeyStringPairable, len(val))
for i, v := range val {
res[i] = v.(MetaDataKeyStringPairable)
}
m.SetComponentDependencies(res)
}
return nil
}
res["customMetadata"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyValuePairFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]MetaDataKeyValuePairable, len(val))
for i, v := range val {
res[i] = v.(MetaDataKeyValuePairable)
}
m.SetCustomMetadata(res)
}
return nil
}
res["htmlStrings"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyStringPairFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]MetaDataKeyStringPairable, len(val))
for i, v := range val {
res[i] = v.(MetaDataKeyStringPairable)
}
m.SetHtmlStrings(res)
}
return nil
}
res["imageSources"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyStringPairFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]MetaDataKeyStringPairable, len(val))
for i, v := range val {
res[i] = v.(MetaDataKeyStringPairable)
}
m.SetImageSources(res)
}
return nil
}
res["links"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyStringPairFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]MetaDataKeyStringPairable, len(val))
for i, v := range val {
res[i] = v.(MetaDataKeyStringPairable)
}
m.SetLinks(res)
}
return nil
}
res["@odata.type"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOdataType(val)
}
return nil
}
res["searchablePlainTexts"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyStringPairFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]MetaDataKeyStringPairable, len(val))
for i, v := range val {
res[i] = v.(MetaDataKeyStringPairable)
}
m.SetSearchablePlainTexts(res)
}
return nil
}
return res
}
// GetHtmlStrings gets the htmlStrings property value. A key-value map where keys are string identifiers and values are rich text with HTML format. SharePoint servers treat the values as HTML content and run services like safety checks, search index and link fixup on them.
func (m *ServerProcessedContent) GetHtmlStrings() []MetaDataKeyStringPairable {
return m.htmlStrings
}
// GetImageSources gets the imageSources property value. A key-value map where keys are string identifiers and values are image sources. SharePoint servers treat the values as image sources and run services like search index and link fixup on them.
func (m *ServerProcessedContent) GetImageSources() []MetaDataKeyStringPairable {
return m.imageSources
}
// GetLinks gets the links property value. A key-value map where keys are string identifiers and values are links. SharePoint servers treat the values as links and run services like link fixup on them.
func (m *ServerProcessedContent) GetLinks() []MetaDataKeyStringPairable {
return m.links
}
// GetOdataType gets the @odata.type property value. The OdataType property
func (m *ServerProcessedContent) GetOdataType() *string {
return m.odataType
}
// GetSearchablePlainTexts gets the searchablePlainTexts property value. A key-value map where keys are string identifiers and values are strings that should be search indexed.
func (m *ServerProcessedContent) GetSearchablePlainTexts() []MetaDataKeyStringPairable {
return m.searchablePlainTexts
}
// Serialize serializes information the current object
func (m *ServerProcessedContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
if m.GetComponentDependencies() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComponentDependencies()))
for i, v := range m.GetComponentDependencies() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err := writer.WriteCollectionOfObjectValues("componentDependencies", cast)
if err != nil {
return err
}
}
if m.GetCustomMetadata() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomMetadata()))
for i, v := range m.GetCustomMetadata() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err := writer.WriteCollectionOfObjectValues("customMetadata", cast)
if err != nil {
return err
}
}
if m.GetHtmlStrings() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHtmlStrings()))
for i, v := range m.GetHtmlStrings() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err := writer.WriteCollectionOfObjectValues("htmlStrings", cast)
if err != nil {
return err
}
}
if m.GetImageSources() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetImageSources()))
for i, v := range m.GetImageSources() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err := writer.WriteCollectionOfObjectValues("imageSources", cast)
if err != nil {
return err
}
}
if m.GetLinks() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLinks()))
for i, v := range m.GetLinks() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err := writer.WriteCollectionOfObjectValues("links", cast)
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("@odata.type", m.GetOdataType())
if err != nil {
return err
}
}
if m.GetSearchablePlainTexts() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSearchablePlainTexts()))
for i, v := range m.GetSearchablePlainTexts() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err := writer.WriteCollectionOfObjectValues("searchablePlainTexts", cast)
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
return err
}
}
return nil
}
// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *ServerProcessedContent) SetAdditionalData(value map[string]interface{}) {
m.additionalData = value
}
// SetComponentDependencies sets the componentDependencies property value. A key-value map where keys are string identifiers and values are component ids. SharePoint servers might decide to use this hint to preload the script for corresponding components for performance boost.
func (m *ServerProcessedContent) SetComponentDependencies(value []MetaDataKeyStringPairable) {
m.componentDependencies = value
}
// SetCustomMetadata sets the customMetadata property value. A key-value map where keys are string identifier and values are object of custom key-value pair.
func (m *ServerProcessedContent) SetCustomMetadata(value []MetaDataKeyValuePairable) {
m.customMetadata = value
}
// SetHtmlStrings sets the htmlStrings property value. A key-value map where keys are string identifiers and values are rich text with HTML format. SharePoint servers treat the values as HTML content and run services like safety checks, search index and link fixup on them.
func (m *ServerProcessedContent) SetHtmlStrings(value []MetaDataKeyStringPairable) {
m.htmlStrings = value
}
// SetImageSources sets the imageSources property value. A key-value map where keys are string identifiers and values are image sources. SharePoint servers treat the values as image sources and run services like search index and link fixup on them.
func (m *ServerProcessedContent) SetImageSources(value []MetaDataKeyStringPairable) {
m.imageSources = value
}
// SetLinks sets the links property value. A key-value map where keys are string identifiers and values are links. SharePoint servers treat the values as links and run services like link fixup on them.
func (m *ServerProcessedContent) SetLinks(value []MetaDataKeyStringPairable) {
m.links = value
}
// SetOdataType sets the @odata.type property value. The OdataType property
func (m *ServerProcessedContent) SetOdataType(value *string) {
m.odataType = value
}
// SetSearchablePlainTexts sets the searchablePlainTexts property value. A key-value map where keys are string identifiers and values are strings that should be search indexed.
func (m *ServerProcessedContent) SetSearchablePlainTexts(value []MetaDataKeyStringPairable) {
m.searchablePlainTexts = value
}

View File

@ -0,0 +1,25 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// ServerProcessedContentable
type ServerProcessedContentable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetComponentDependencies() []MetaDataKeyStringPairable
GetCustomMetadata() []MetaDataKeyValuePairable
GetHtmlStrings() []MetaDataKeyStringPairable
GetImageSources() []MetaDataKeyStringPairable
GetLinks() []MetaDataKeyStringPairable
GetOdataType() *string
GetSearchablePlainTexts() []MetaDataKeyStringPairable
SetComponentDependencies(value []MetaDataKeyStringPairable)
SetCustomMetadata(value []MetaDataKeyValuePairable)
SetHtmlStrings(value []MetaDataKeyStringPairable)
SetImageSources(value []MetaDataKeyStringPairable)
SetLinks(value []MetaDataKeyStringPairable)
SetOdataType(value *string)
SetSearchablePlainTexts(value []MetaDataKeyStringPairable)
}

View File

@ -0,0 +1,37 @@
package models
import (
"errors"
)
// Provides operations to call the remove method.
type SiteAccessType int
const (
BLOCK_SITEACCESSTYPE SiteAccessType = iota
FULL_SITEACCESSTYPE
LIMITED_SITEACCESSTYPE
)
func (i SiteAccessType) String() string {
return []string{"block", "full", "limited"}[i]
}
func ParseSiteAccessType(v string) (interface{}, error) {
result := BLOCK_SITEACCESSTYPE
switch v {
case "block":
result = BLOCK_SITEACCESSTYPE
case "full":
result = FULL_SITEACCESSTYPE
case "limited":
result = LIMITED_SITEACCESSTYPE
default:
return 0, errors.New("Unknown SiteAccessType value: " + v)
}
return &result, nil
}
func SerializeSiteAccessType(values []SiteAccessType) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}

View File

@ -0,0 +1,387 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// SitePage provides operations to call the remove method.
type SitePage struct {
BaseItem
// Indicates the layout of the content in a given SharePoint page, including horizontal sections and vertical section
canvasLayout CanvasLayoutable
// Inherited from baseItem.
contentType msmodel.ContentTypeInfoable
// The name of the page layout of the page. The possible values are: microsoftReserved, article, home, unknownFutureValue.
pageLayout *PageLayoutType
// Indicates the promotion kind of the sitePage. The possible values are: microsoftReserved, page, newsPost, unknownFutureValue.
promotionKind *PagePromotionType
// The publishing status and the MM.mm version of the page.
publishingState PublicationFacetable
// Reactions information for the page.
reactions ReactionsFacetable
// Determines whether or not to show comments at the bottom of the page.
showComments *bool
// Determines whether or not to show recommended pages at the bottom of the page.
showRecommendedPages *bool
// Url of the sitePage's thumbnail image
thumbnailWebUrl *string
// Title of the sitePage.
title *string
// Title area on the SharePoint page.
titleArea TitleAreaable
// Collection of webparts on the SharePoint page
webParts []WebPartable
}
// NewSitePage instantiates a new sitePage and sets the default values.
func NewSitePage() *SitePage {
m := &SitePage{
BaseItem: *NewBaseItem(),
}
odataTypeValue := "#microsoft.graph.sitePage"
m.SetOdataType(&odataTypeValue)
return m
}
// CreateSitePageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateSitePageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewSitePage(), nil
}
// GetCanvasLayout gets the canvasLayout property value. Indicates the layout of the content in a given SharePoint page, including horizontal sections and vertical section
func (m *SitePage) GetCanvasLayout() CanvasLayoutable {
return m.canvasLayout
}
// GetContentType gets the contentType property value. Inherited from baseItem.
func (m *SitePage) GetContentType() msmodel.ContentTypeInfoable {
return m.contentType
}
// GetFieldDeserializers the deserialization information for the current model
func (m *SitePage) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.BaseItem.GetFieldDeserializers()
res["canvasLayout"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateCanvasLayoutFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetCanvasLayout(val.(CanvasLayoutable))
}
return nil
}
res["contentType"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(msmodel.CreateContentTypeInfoFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetContentType(val.(msmodel.ContentTypeInfoable))
}
return nil
}
res["pageLayout"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParsePageLayoutType)
if err != nil {
return err
}
if val != nil {
m.SetPageLayout(val.(*PageLayoutType))
}
return nil
}
res["promotionKind"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParsePagePromotionType)
if err != nil {
return err
}
if val != nil {
m.SetPromotionKind(val.(*PagePromotionType))
}
return nil
}
res["publishingState"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreatePublicationFacetFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetPublishingState(val.(PublicationFacetable))
}
return nil
}
res["reactions"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateReactionsFacetFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetReactions(val.(ReactionsFacetable))
}
return nil
}
res["showComments"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetShowComments(val)
}
return nil
}
res["showRecommendedPages"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetShowRecommendedPages(val)
}
return nil
}
res["thumbnailWebUrl"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetThumbnailWebUrl(val)
}
return nil
}
res["title"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTitle(val)
}
return nil
}
res["titleArea"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateTitleAreaFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetTitleArea(val.(TitleAreaable))
}
return nil
}
res["webParts"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateWebPartFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]WebPartable, len(val))
for i, v := range val {
res[i] = v.(WebPartable)
}
m.SetWebParts(res)
}
return nil
}
return res
}
// GetPageLayout gets the pageLayout property value. The name of the page layout of the page. The possible values are: microsoftReserved, article, home, unknownFutureValue.
func (m *SitePage) GetPageLayout() *PageLayoutType {
return m.pageLayout
}
// GetPromotionKind gets the promotionKind property value. Indicates the promotion kind of the sitePage. The possible values are: microsoftReserved, page, newsPost, unknownFutureValue.
func (m *SitePage) GetPromotionKind() *PagePromotionType {
return m.promotionKind
}
// GetPublishingState gets the publishingState property value. The publishing status and the MM.mm version of the page.
func (m *SitePage) GetPublishingState() PublicationFacetable {
return m.publishingState
}
// GetReactions gets the reactions property value. Reactions information for the page.
func (m *SitePage) GetReactions() ReactionsFacetable {
return m.reactions
}
// GetShowComments gets the showComments property value. Determines whether or not to show comments at the bottom of the page.
func (m *SitePage) GetShowComments() *bool {
return m.showComments
}
// GetShowRecommendedPages gets the showRecommendedPages property value. Determines whether or not to show recommended pages at the bottom of the page.
func (m *SitePage) GetShowRecommendedPages() *bool {
return m.showRecommendedPages
}
// GetThumbnailWebUrl gets the thumbnailWebUrl property value. Url of the sitePage's thumbnail image
func (m *SitePage) GetThumbnailWebUrl() *string {
return m.thumbnailWebUrl
}
// GetTitle gets the title property value. Title of the sitePage.
func (m *SitePage) GetTitle() *string {
return m.title
}
// GetTitleArea gets the titleArea property value. Title area on the SharePoint page.
func (m *SitePage) GetTitleArea() TitleAreaable {
return m.titleArea
}
// GetWebParts gets the webParts property value. Collection of webparts on the SharePoint page
func (m *SitePage) GetWebParts() []WebPartable {
return m.webParts
}
// Serialize serializes information the current object
func (m *SitePage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.BaseItem.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteObjectValue("canvasLayout", m.GetCanvasLayout())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("contentType", m.GetContentType())
if err != nil {
return err
}
}
if m.GetPageLayout() != nil {
cast := (*m.GetPageLayout()).String()
err = writer.WriteStringValue("pageLayout", &cast)
if err != nil {
return err
}
}
if m.GetPromotionKind() != nil {
cast := (*m.GetPromotionKind()).String()
err = writer.WriteStringValue("promotionKind", &cast)
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("publishingState", m.GetPublishingState())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("reactions", m.GetReactions())
if err != nil {
return err
}
}
{
err = writer.WriteBoolValue("showComments", m.GetShowComments())
if err != nil {
return err
}
}
{
err = writer.WriteBoolValue("showRecommendedPages", m.GetShowRecommendedPages())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("thumbnailWebUrl", m.GetThumbnailWebUrl())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("title", m.GetTitle())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("titleArea", m.GetTitleArea())
if err != nil {
return err
}
}
if m.GetWebParts() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWebParts()))
for i, v := range m.GetWebParts() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("webParts", cast)
if err != nil {
return err
}
}
return nil
}
// SetCanvasLayout sets the canvasLayout property value. Indicates the layout of the content in a given SharePoint page, including horizontal sections and vertical section
func (m *SitePage) SetCanvasLayout(value CanvasLayoutable) {
m.canvasLayout = value
}
// SetContentType sets the contentType property value. Inherited from baseItem.
func (m *SitePage) SetContentType(value msmodel.ContentTypeInfoable) {
m.contentType = value
}
// SetPageLayout sets the pageLayout property value. The name of the page layout of the page. The possible values are: microsoftReserved, article, home, unknownFutureValue.
func (m *SitePage) SetPageLayout(value *PageLayoutType) {
m.pageLayout = value
}
// SetPromotionKind sets the promotionKind property value. Indicates the promotion kind of the sitePage. The possible values are: microsoftReserved, page, newsPost, unknownFutureValue.
func (m *SitePage) SetPromotionKind(value *PagePromotionType) {
m.promotionKind = value
}
// SetPublishingState sets the publishingState property value. The publishing status and the MM.mm version of the page.
func (m *SitePage) SetPublishingState(value PublicationFacetable) {
m.publishingState = value
}
// SetReactions sets the reactions property value. Reactions information for the page.
func (m *SitePage) SetReactions(value ReactionsFacetable) {
m.reactions = value
}
// SetShowComments sets the showComments property value. Determines whether or not to show comments at the bottom of the page.
func (m *SitePage) SetShowComments(value *bool) {
m.showComments = value
}
// SetShowRecommendedPages sets the showRecommendedPages property value. Determines whether or not to show recommended pages at the bottom of the page.
func (m *SitePage) SetShowRecommendedPages(value *bool) {
m.showRecommendedPages = value
}
// SetThumbnailWebUrl sets the thumbnailWebUrl property value. Url of the sitePage's thumbnail image
func (m *SitePage) SetThumbnailWebUrl(value *string) {
m.thumbnailWebUrl = value
}
// SetTitle sets the title property value. Title of the sitePage.
func (m *SitePage) SetTitle(value *string) {
m.title = value
}
// SetTitleArea sets the titleArea property value. Title area on the SharePoint page.
func (m *SitePage) SetTitleArea(value TitleAreaable) {
m.titleArea = value
}
// SetWebParts sets the webParts property value. Collection of webparts on the SharePoint page
func (m *SitePage) SetWebParts(value []WebPartable) {
m.webParts = value
}

View File

@ -0,0 +1,76 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// SitePageCollectionResponse provides operations to manage the pages property of the microsoft.graph.site entity.
type SitePageCollectionResponse struct {
msmodel.BaseCollectionPaginationCountResponse
// The value property
value []SitePageable
}
// NewSitePageCollectionResponse instantiates a new SitePageCollectionResponse and sets the default values.
func NewSitePageCollectionResponse() *SitePageCollectionResponse {
m := &SitePageCollectionResponse{
BaseCollectionPaginationCountResponse: *msmodel.NewBaseCollectionPaginationCountResponse(),
}
return m
}
// CreateSitePageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateSitePageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewSitePageCollectionResponse(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *SitePageCollectionResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateSitePageFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]SitePageable, len(val))
for i, v := range val {
res[i] = v.(SitePageable)
}
m.SetValue(res)
}
return nil
}
return res
}
// GetValue gets the value property value. The value property
func (m *SitePageCollectionResponse) GetValue() []SitePageable {
return m.value
}
// Serialize serializes information the current object
func (m *SitePageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.BaseCollectionPaginationCountResponse.Serialize(writer)
if err != nil {
return err
}
if m.GetValue() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue()))
for i, v := range m.GetValue() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("value", cast)
if err != nil {
return err
}
}
return nil
}
// SetValue sets the value property value. The value property
func (m *SitePageCollectionResponse) SetValue(value []SitePageable) {
m.value = value
}

View File

@ -0,0 +1,14 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// SitePageCollectionResponseable
type SitePageCollectionResponseable interface {
msmodel.BaseCollectionPaginationCountResponseable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetValue() []SitePageable
SetValue(value []SitePageable)
}

View File

@ -0,0 +1,36 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// SitePageable
type SitePageable interface {
msmodel.BaseItemable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetCanvasLayout() CanvasLayoutable
GetContentType() msmodel.ContentTypeInfoable
GetPageLayout() *PageLayoutType
GetPromotionKind() *PagePromotionType
GetPublishingState() PublicationFacetable
GetReactions() ReactionsFacetable
GetShowComments() *bool
GetShowRecommendedPages() *bool
GetThumbnailWebUrl() *string
GetTitle() *string
GetTitleArea() TitleAreaable
GetWebParts() []WebPartable
SetCanvasLayout(value CanvasLayoutable)
SetContentType(value msmodel.ContentTypeInfoable)
SetPageLayout(value *PageLayoutType)
SetPromotionKind(value *PagePromotionType)
SetPublishingState(value PublicationFacetable)
SetReactions(value ReactionsFacetable)
SetShowComments(value *bool)
SetShowRecommendedPages(value *bool)
SetThumbnailWebUrl(value *string)
SetTitle(value *string)
SetTitleArea(value TitleAreaable)
SetWebParts(value []WebPartable)
}

View File

@ -0,0 +1,52 @@
package models
import (
"errors"
)
// Provides operations to call the add method.
type SiteSecurityLevel int
const (
// User Defined, default value, no intent.
USERDEFINED_SITESECURITYLEVEL SiteSecurityLevel = iota
// Low.
LOW_SITESECURITYLEVEL
// Medium-low.
MEDIUMLOW_SITESECURITYLEVEL
// Medium.
MEDIUM_SITESECURITYLEVEL
// Medium-high.
MEDIUMHIGH_SITESECURITYLEVEL
// High.
HIGH_SITESECURITYLEVEL
)
func (i SiteSecurityLevel) String() string {
return []string{"userDefined", "low", "mediumLow", "medium", "mediumHigh", "high"}[i]
}
func ParseSiteSecurityLevel(v string) (interface{}, error) {
result := USERDEFINED_SITESECURITYLEVEL
switch v {
case "userDefined":
result = USERDEFINED_SITESECURITYLEVEL
case "low":
result = LOW_SITESECURITYLEVEL
case "mediumLow":
result = MEDIUMLOW_SITESECURITYLEVEL
case "medium":
result = MEDIUM_SITESECURITYLEVEL
case "mediumHigh":
result = MEDIUMHIGH_SITESECURITYLEVEL
case "high":
result = HIGH_SITESECURITYLEVEL
default:
return 0, errors.New("Unknown SiteSecurityLevel value: " + v)
}
return &result, nil
}
func SerializeSiteSecurityLevel(values []SiteSecurityLevel) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}

View File

@ -0,0 +1,123 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// SiteSettings
type SiteSettings struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]interface{}
// The language tag for the language used on this site.
languageTag *string
// The OdataType property
odataType *string
// Indicates the time offset for the time zone of the site from Coordinated Universal Time (UTC).
timeZone *string
}
// NewSiteSettings instantiates a new siteSettings and sets the default values.
func NewSiteSettings()(*SiteSettings) {
m := &SiteSettings{
}
m.SetAdditionalData(make(map[string]interface{}));
return m
}
// CreateSiteSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateSiteSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewSiteSettings(), nil
}
// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *SiteSettings) GetAdditionalData()(map[string]interface{}) {
return m.additionalData
}
// GetFieldDeserializers the deserialization information for the current model
func (m *SiteSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["languageTag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetLanguageTag(val)
}
return nil
}
res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOdataType(val)
}
return nil
}
res["timeZone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTimeZone(val)
}
return nil
}
return res
}
// GetLanguageTag gets the languageTag property value. The language tag for the language used on this site.
func (m *SiteSettings) GetLanguageTag()(*string) {
return m.languageTag
}
// GetOdataType gets the @odata.type property value. The OdataType property
func (m *SiteSettings) GetOdataType()(*string) {
return m.odataType
}
// GetTimeZone gets the timeZone property value. Indicates the time offset for the time zone of the site from Coordinated Universal Time (UTC).
func (m *SiteSettings) GetTimeZone()(*string) {
return m.timeZone
}
// Serialize serializes information the current object
func (m *SiteSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteStringValue("languageTag", m.GetLanguageTag())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("@odata.type", m.GetOdataType())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("timeZone", m.GetTimeZone())
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
return err
}
}
return nil
}
// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *SiteSettings) SetAdditionalData(value map[string]interface{})() {
m.additionalData = value
}
// SetLanguageTag sets the languageTag property value. The language tag for the language used on this site.
func (m *SiteSettings) SetLanguageTag(value *string)() {
m.languageTag = value
}
// SetOdataType sets the @odata.type property value. The OdataType property
func (m *SiteSettings) SetOdataType(value *string)() {
m.odataType = value
}
// SetTimeZone sets the timeZone property value. Indicates the time offset for the time zone of the site from Coordinated Universal Time (UTC).
func (m *SiteSettings) SetTimeZone(value *string)() {
m.timeZone = value
}

View File

@ -0,0 +1,17 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// SiteSettingsable
type SiteSettingsable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetLanguageTag()(*string)
GetOdataType()(*string)
GetTimeZone()(*string)
SetLanguageTag(value *string)()
SetOdataType(value *string)()
SetTimeZone(value *string)()
}

View File

@ -0,0 +1,88 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// StandardWebPart
type StandardWebPart struct {
WebPart
// Data of the webPart.
data WebPartDataable
// A Guid which indicates the type of the webParts
webPartType *string
}
// NewStandardWebPart instantiates a new StandardWebPart and sets the default values.
func NewStandardWebPart()(*StandardWebPart) {
m := &StandardWebPart{
WebPart: *NewWebPart(),
}
odataTypeValue := "#microsoft.graph.standardWebPart";
m.SetOdataType(&odataTypeValue);
return m
}
// CreateStandardWebPartFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateStandardWebPartFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewStandardWebPart(), nil
}
// GetData gets the data property value. Data of the webPart.
func (m *StandardWebPart) GetData()(WebPartDataable) {
return m.data
}
// GetFieldDeserializers the deserialization information for the current model
func (m *StandardWebPart) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.WebPart.GetFieldDeserializers()
res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateWebPartDataFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetData(val.(WebPartDataable))
}
return nil
}
res["webPartType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetWebPartType(val)
}
return nil
}
return res
}
// GetWebPartType gets the webPartType property value. A Guid which indicates the type of the webParts
func (m *StandardWebPart) GetWebPartType()(*string) {
return m.webPartType
}
// Serialize serializes information the current object
func (m *StandardWebPart) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.WebPart.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteObjectValue("data", m.GetData())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("webPartType", m.GetWebPartType())
if err != nil {
return err
}
}
return nil
}
// SetData sets the data property value. Data of the webPart.
func (m *StandardWebPart) SetData(value WebPartDataable)() {
m.data = value
}
// SetWebPartType sets the webPartType property value. A Guid which indicates the type of the webParts
func (m *StandardWebPart) SetWebPartType(value *string)() {
m.webPartType = value
}

View File

@ -0,0 +1,75 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// StandardWebPartCollectionResponse
type StandardWebPartCollectionResponse struct {
msmodel.BaseCollectionPaginationCountResponse
// The value property
value []StandardWebPartable
}
// NewStandardWebPartCollectionResponse instantiates a new StandardWebPartCollectionResponse and sets the default values.
func NewStandardWebPartCollectionResponse() *StandardWebPartCollectionResponse {
m := &StandardWebPartCollectionResponse{
BaseCollectionPaginationCountResponse: *msmodel.NewBaseCollectionPaginationCountResponse(),
}
return m
}
// CreateStandardWebPartCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateStandardWebPartCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewStandardWebPartCollectionResponse(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *StandardWebPartCollectionResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateStandardWebPartFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]StandardWebPartable, len(val))
for i, v := range val {
res[i] = v.(StandardWebPartable)
}
m.SetValue(res)
}
return nil
}
return res
}
// GetValue gets the value property value. The value property
func (m *StandardWebPartCollectionResponse) GetValue() []StandardWebPartable {
return m.value
}
// Serialize serializes information the current object
func (m *StandardWebPartCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.BaseCollectionPaginationCountResponse.Serialize(writer)
if err != nil {
return err
}
if m.GetValue() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue()))
for i, v := range m.GetValue() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("value", cast)
if err != nil {
return err
}
}
return nil
}
// SetValue sets the value property value. The value property
func (m *StandardWebPartCollectionResponse) SetValue(value []StandardWebPartable) {
m.value = value
}

View File

@ -0,0 +1,14 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// StandardWebPartCollectionResponseable
type StandardWebPartCollectionResponseable interface {
msmodel.BaseCollectionPaginationCountResponseable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetValue() []StandardWebPartable
SetValue(value []StandardWebPartable)
}

View File

@ -0,0 +1,15 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// StandardWebPartable
type StandardWebPartable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
WebPartable
GetData()(WebPartDataable)
GetWebPartType()(*string)
SetData(value WebPartDataable)()
SetWebPartType(value *string)()
}

View File

@ -0,0 +1,62 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// TextWebPart
type TextWebPart struct {
WebPart
// The HTML string in text web part.
innerHtml *string
}
// NewTextWebPart instantiates a new TextWebPart and sets the default values.
func NewTextWebPart()(*TextWebPart) {
m := &TextWebPart{
WebPart: *NewWebPart(),
}
odataTypeValue := "#microsoft.graph.textWebPart";
m.SetOdataType(&odataTypeValue);
return m
}
// CreateTextWebPartFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateTextWebPartFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewTextWebPart(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *TextWebPart) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.WebPart.GetFieldDeserializers()
res["innerHtml"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetInnerHtml(val)
}
return nil
}
return res
}
// GetInnerHtml gets the innerHtml property value. The HTML string in text web part.
func (m *TextWebPart) GetInnerHtml()(*string) {
return m.innerHtml
}
// Serialize serializes information the current object
func (m *TextWebPart) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.WebPart.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteStringValue("innerHtml", m.GetInnerHtml())
if err != nil {
return err
}
}
return nil
}
// SetInnerHtml sets the innerHtml property value. The HTML string in text web part.
func (m *TextWebPart) SetInnerHtml(value *string)() {
m.innerHtml = value
}

View File

@ -0,0 +1,75 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// TextWebPartCollectionResponse
type TextWebPartCollectionResponse struct {
msmodel.BaseCollectionPaginationCountResponse
// The value property
value []TextWebPartable
}
// NewTextWebPartCollectionResponse instantiates a new TextWebPartCollectionResponse and sets the default values.
func NewTextWebPartCollectionResponse() *TextWebPartCollectionResponse {
m := &TextWebPartCollectionResponse{
BaseCollectionPaginationCountResponse: *msmodel.NewBaseCollectionPaginationCountResponse(),
}
return m
}
// CreateTextWebPartCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateTextWebPartCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewTextWebPartCollectionResponse(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *TextWebPartCollectionResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateTextWebPartFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]TextWebPartable, len(val))
for i, v := range val {
res[i] = v.(TextWebPartable)
}
m.SetValue(res)
}
return nil
}
return res
}
// GetValue gets the value property value. The value property
func (m *TextWebPartCollectionResponse) GetValue() []TextWebPartable {
return m.value
}
// Serialize serializes information the current object
func (m *TextWebPartCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.BaseCollectionPaginationCountResponse.Serialize(writer)
if err != nil {
return err
}
if m.GetValue() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue()))
for i, v := range m.GetValue() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("value", cast)
if err != nil {
return err
}
}
return nil
}
// SetValue sets the value property value. The value property
func (m *TextWebPartCollectionResponse) SetValue(value []TextWebPartable) {
m.value = value
}

View File

@ -0,0 +1,14 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// TextWebPartCollectionResponseable
type TextWebPartCollectionResponseable interface {
msmodel.BaseCollectionPaginationCountResponseable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetValue() []TextWebPartable
SetValue(value []TextWebPartable)
}

View File

@ -0,0 +1,13 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// TextWebPartable
type TextWebPartable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
WebPartable
GetInnerHtml()(*string)
SetInnerHtml(value *string)()
}

View File

@ -0,0 +1,360 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// TitleArea
type TitleArea struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]interface{}
// Alternative text on the title area.
alternativeText *string
// Indicates whether the title area has a gradient effect enabled.
enableGradientEffect *bool
// URL of the image in the title area.
imageWebUrl *string
// Enumeration value that indicates the layout of the title area. The possible values are: imageAndTitle, plain, colorBlock, overlap, unknownFutureValue.
layout *TitleAreaLayoutType
// The OdataType property
odataType *string
// Contains collections of data that can be processed by server side services like search index and link fixup.
serverProcessedContent ServerProcessedContentable
// Indicates whether the author should be shown in title area.
showAuthor *bool
// Indicates whether the published date should be shown in title area.
showPublishedDate *bool
// Indicates whether the text block above title should be shown in title area.
showTextBlockAboveTitle *bool
// The text above title line.
textAboveTitle *string
// Enumeration value that indicates the text alignment of the title area. The possible values are: left, center, unknownFutureValue.
textAlignment *TitleAreaTextAlignmentType
}
// NewTitleArea instantiates a new titleArea and sets the default values.
func NewTitleArea() *TitleArea {
m := &TitleArea{}
m.SetAdditionalData(make(map[string]interface{}))
return m
}
// CreateTitleAreaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateTitleAreaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewTitleArea(), nil
}
// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *TitleArea) GetAdditionalData() map[string]interface{} {
return m.additionalData
}
// GetAlternativeText gets the alternativeText property value. Alternative text on the title area.
func (m *TitleArea) GetAlternativeText() *string {
return m.alternativeText
}
// GetEnableGradientEffect gets the enableGradientEffect property value. Indicates whether the title area has a gradient effect enabled.
func (m *TitleArea) GetEnableGradientEffect() *bool {
return m.enableGradientEffect
}
// GetFieldDeserializers the deserialization information for the current model
func (m *TitleArea) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error)
res["alternativeText"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetAlternativeText(val)
}
return nil
}
res["enableGradientEffect"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetEnableGradientEffect(val)
}
return nil
}
res["imageWebUrl"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetImageWebUrl(val)
}
return nil
}
res["layout"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseTitleAreaLayoutType)
if err != nil {
return err
}
if val != nil {
m.SetLayout(val.(*TitleAreaLayoutType))
}
return nil
}
res["@odata.type"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOdataType(val)
}
return nil
}
res["serverProcessedContent"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateServerProcessedContentFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetServerProcessedContent(val.(ServerProcessedContentable))
}
return nil
}
res["showAuthor"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetShowAuthor(val)
}
return nil
}
res["showPublishedDate"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetShowPublishedDate(val)
}
return nil
}
res["showTextBlockAboveTitle"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetShowTextBlockAboveTitle(val)
}
return nil
}
res["textAboveTitle"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTextAboveTitle(val)
}
return nil
}
res["textAlignment"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseTitleAreaTextAlignmentType)
if err != nil {
return err
}
if val != nil {
m.SetTextAlignment(val.(*TitleAreaTextAlignmentType))
}
return nil
}
return res
}
// GetImageWebUrl gets the imageWebUrl property value. URL of the image in the title area.
func (m *TitleArea) GetImageWebUrl() *string {
return m.imageWebUrl
}
// GetLayout gets the layout property value. Enumeration value that indicates the layout of the title area. The possible values are: imageAndTitle, plain, colorBlock, overlap, unknownFutureValue.
func (m *TitleArea) GetLayout() *TitleAreaLayoutType {
return m.layout
}
// GetOdataType gets the @odata.type property value. The OdataType property
func (m *TitleArea) GetOdataType() *string {
return m.odataType
}
// GetServerProcessedContent gets the serverProcessedContent property value. Contains collections of data that can be processed by server side services like search index and link fixup.
func (m *TitleArea) GetServerProcessedContent() ServerProcessedContentable {
return m.serverProcessedContent
}
// GetShowAuthor gets the showAuthor property value. Indicates whether the author should be shown in title area.
func (m *TitleArea) GetShowAuthor() *bool {
return m.showAuthor
}
// GetShowPublishedDate gets the showPublishedDate property value. Indicates whether the published date should be shown in title area.
func (m *TitleArea) GetShowPublishedDate() *bool {
return m.showPublishedDate
}
// GetShowTextBlockAboveTitle gets the showTextBlockAboveTitle property value. Indicates whether the text block above title should be shown in title area.
func (m *TitleArea) GetShowTextBlockAboveTitle() *bool {
return m.showTextBlockAboveTitle
}
// GetTextAboveTitle gets the textAboveTitle property value. The text above title line.
func (m *TitleArea) GetTextAboveTitle() *string {
return m.textAboveTitle
}
// GetTextAlignment gets the textAlignment property value. Enumeration value that indicates the text alignment of the title area. The possible values are: left, center, unknownFutureValue.
func (m *TitleArea) GetTextAlignment() *TitleAreaTextAlignmentType {
return m.textAlignment
}
// Serialize serializes information the current object
func (m *TitleArea) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
{
err := writer.WriteStringValue("alternativeText", m.GetAlternativeText())
if err != nil {
return err
}
}
{
err := writer.WriteBoolValue("enableGradientEffect", m.GetEnableGradientEffect())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("imageWebUrl", m.GetImageWebUrl())
if err != nil {
return err
}
}
if m.GetLayout() != nil {
cast := (*m.GetLayout()).String()
err := writer.WriteStringValue("layout", &cast)
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("@odata.type", m.GetOdataType())
if err != nil {
return err
}
}
{
err := writer.WriteObjectValue("serverProcessedContent", m.GetServerProcessedContent())
if err != nil {
return err
}
}
{
err := writer.WriteBoolValue("showAuthor", m.GetShowAuthor())
if err != nil {
return err
}
}
{
err := writer.WriteBoolValue("showPublishedDate", m.GetShowPublishedDate())
if err != nil {
return err
}
}
{
err := writer.WriteBoolValue("showTextBlockAboveTitle", m.GetShowTextBlockAboveTitle())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("textAboveTitle", m.GetTextAboveTitle())
if err != nil {
return err
}
}
if m.GetTextAlignment() != nil {
cast := (*m.GetTextAlignment()).String()
err := writer.WriteStringValue("textAlignment", &cast)
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
return err
}
}
return nil
}
// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *TitleArea) SetAdditionalData(value map[string]interface{}) {
m.additionalData = value
}
// SetAlternativeText sets the alternativeText property value. Alternative text on the title area.
func (m *TitleArea) SetAlternativeText(value *string) {
m.alternativeText = value
}
// SetEnableGradientEffect sets the enableGradientEffect property value. Indicates whether the title area has a gradient effect enabled.
func (m *TitleArea) SetEnableGradientEffect(value *bool) {
m.enableGradientEffect = value
}
// SetImageWebUrl sets the imageWebUrl property value. URL of the image in the title area.
func (m *TitleArea) SetImageWebUrl(value *string) {
m.imageWebUrl = value
}
// SetLayout sets the layout property value. Enumeration value that indicates the layout of the title area. The possible values are: imageAndTitle, plain, colorBlock, overlap, unknownFutureValue.
func (m *TitleArea) SetLayout(value *TitleAreaLayoutType) {
m.layout = value
}
// SetOdataType sets the @odata.type property value. The OdataType property
func (m *TitleArea) SetOdataType(value *string) {
m.odataType = value
}
// SetServerProcessedContent sets the serverProcessedContent property value. Contains collections of data that can be processed by server side services like search index and link fixup.
func (m *TitleArea) SetServerProcessedContent(value ServerProcessedContentable) {
m.serverProcessedContent = value
}
// SetShowAuthor sets the showAuthor property value. Indicates whether the author should be shown in title area.
func (m *TitleArea) SetShowAuthor(value *bool) {
m.showAuthor = value
}
// SetShowPublishedDate sets the showPublishedDate property value. Indicates whether the published date should be shown in title area.
func (m *TitleArea) SetShowPublishedDate(value *bool) {
m.showPublishedDate = value
}
// SetShowTextBlockAboveTitle sets the showTextBlockAboveTitle property value. Indicates whether the text block above title should be shown in title area.
func (m *TitleArea) SetShowTextBlockAboveTitle(value *bool) {
m.showTextBlockAboveTitle = value
}
// SetTextAboveTitle sets the textAboveTitle property value. The text above title line.
func (m *TitleArea) SetTextAboveTitle(value *string) {
m.textAboveTitle = value
}
// SetTextAlignment sets the textAlignment property value. Enumeration value that indicates the text alignment of the title area. The possible values are: left, center, unknownFutureValue.
func (m *TitleArea) SetTextAlignment(value *TitleAreaTextAlignmentType) {
m.textAlignment = value
}

View File

@ -0,0 +1,43 @@
package models
import (
"errors"
)
// Provides operations to call the remove method.
type TitleAreaLayoutType int
const (
IMAGEANDTITLE_TITLEAREALAYOUTTYPE TitleAreaLayoutType = iota
PLAIN_TITLEAREALAYOUTTYPE
COLORBLOCK_TITLEAREALAYOUTTYPE
OVERLAP_TITLEAREALAYOUTTYPE
UNKNOWNFUTUREVALUE_TITLEAREALAYOUTTYPE
)
func (i TitleAreaLayoutType) String() string {
return []string{"imageAndTitle", "plain", "colorBlock", "overlap", "unknownFutureValue"}[i]
}
func ParseTitleAreaLayoutType(v string) (interface{}, error) {
result := IMAGEANDTITLE_TITLEAREALAYOUTTYPE
switch v {
case "imageAndTitle":
result = IMAGEANDTITLE_TITLEAREALAYOUTTYPE
case "plain":
result = PLAIN_TITLEAREALAYOUTTYPE
case "colorBlock":
result = COLORBLOCK_TITLEAREALAYOUTTYPE
case "overlap":
result = OVERLAP_TITLEAREALAYOUTTYPE
case "unknownFutureValue":
result = UNKNOWNFUTUREVALUE_TITLEAREALAYOUTTYPE
default:
return 0, errors.New("Unknown TitleAreaLayoutType value: " + v)
}
return &result, nil
}
func SerializeTitleAreaLayoutType(values []TitleAreaLayoutType) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}

View File

@ -0,0 +1,37 @@
package models
import (
"errors"
)
// Provides operations to call the remove method.
type TitleAreaTextAlignmentType int
const (
LEFT_TITLEAREATEXTALIGNMENTTYPE TitleAreaTextAlignmentType = iota
CENTER_TITLEAREATEXTALIGNMENTTYPE
UNKNOWNFUTUREVALUE_TITLEAREATEXTALIGNMENTTYPE
)
func (i TitleAreaTextAlignmentType) String() string {
return []string{"left", "center", "unknownFutureValue"}[i]
}
func ParseTitleAreaTextAlignmentType(v string) (interface{}, error) {
result := LEFT_TITLEAREATEXTALIGNMENTTYPE
switch v {
case "left":
result = LEFT_TITLEAREATEXTALIGNMENTTYPE
case "center":
result = CENTER_TITLEAREATEXTALIGNMENTTYPE
case "unknownFutureValue":
result = UNKNOWNFUTUREVALUE_TITLEAREATEXTALIGNMENTTYPE
default:
return 0, errors.New("Unknown TitleAreaTextAlignmentType value: " + v)
}
return &result, nil
}
func SerializeTitleAreaTextAlignmentType(values []TitleAreaTextAlignmentType) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}

View File

@ -0,0 +1,33 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// TitleAreaable
type TitleAreaable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetAlternativeText() *string
GetEnableGradientEffect() *bool
GetImageWebUrl() *string
GetLayout() *TitleAreaLayoutType
GetOdataType() *string
GetServerProcessedContent() ServerProcessedContentable
GetShowAuthor() *bool
GetShowPublishedDate() *bool
GetShowTextBlockAboveTitle() *bool
GetTextAboveTitle() *string
GetTextAlignment() *TitleAreaTextAlignmentType
SetAlternativeText(value *string)
SetEnableGradientEffect(value *bool)
SetImageWebUrl(value *string)
SetLayout(value *TitleAreaLayoutType)
SetOdataType(value *string)
SetServerProcessedContent(value ServerProcessedContentable)
SetShowAuthor(value *bool)
SetShowPublishedDate(value *bool)
SetShowTextBlockAboveTitle(value *bool)
SetTextAboveTitle(value *string)
SetTextAlignment(value *TitleAreaTextAlignmentType)
}

View File

@ -0,0 +1,104 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// VerticalSection
type VerticalSection struct {
msmodel.Entity
// Enumeration value that indicates the emphasis of the section background. The possible values are: none, netural, soft, strong, unknownFutureValue.
emphasis *SectionEmphasisType
// The set of web parts in this section.
webparts []WebPartable
}
// NewVerticalSection instantiates a new verticalSection and sets the default values.
func NewVerticalSection() *VerticalSection {
m := &VerticalSection{
Entity: *msmodel.NewEntity(),
}
return m
}
// CreateVerticalSectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateVerticalSectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewVerticalSection(), nil
}
// GetEmphasis gets the emphasis property value. Enumeration value that indicates the emphasis of the section background. The possible values are: none, netural, soft, strong, unknownFutureValue.
func (m *VerticalSection) GetEmphasis() *SectionEmphasisType {
return m.emphasis
}
// GetFieldDeserializers the deserialization information for the current model
func (m *VerticalSection) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.Entity.GetFieldDeserializers()
res["emphasis"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseSectionEmphasisType)
if err != nil {
return err
}
if val != nil {
m.SetEmphasis(val.(*SectionEmphasisType))
}
return nil
}
res["webparts"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateWebPartFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]WebPartable, len(val))
for i, v := range val {
res[i] = v.(WebPartable)
}
m.SetWebparts(res)
}
return nil
}
return res
}
// GetWebparts gets the webparts property value. The set of web parts in this section.
func (m *VerticalSection) GetWebparts() []WebPartable {
return m.webparts
}
// Serialize serializes information the current object
func (m *VerticalSection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
if m.GetEmphasis() != nil {
cast := (*m.GetEmphasis()).String()
err = writer.WriteStringValue("emphasis", &cast)
if err != nil {
return err
}
}
if m.GetWebparts() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWebparts()))
for i, v := range m.GetWebparts() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("webparts", cast)
if err != nil {
return err
}
}
return nil
}
// SetEmphasis sets the emphasis property value. Enumeration value that indicates the emphasis of the section background. The possible values are: none, netural, soft, strong, unknownFutureValue.
func (m *VerticalSection) SetEmphasis(value *SectionEmphasisType) {
m.emphasis = value
}
// SetWebparts sets the webparts property value. The set of web parts in this section.
func (m *VerticalSection) SetWebparts(value []WebPartable) {
m.webparts = value
}

View File

@ -0,0 +1,16 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// VerticalSectionable
type VerticalSectionable interface {
msmodel.Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetEmphasis() *SectionEmphasisType
GetWebparts() []WebPartable
SetEmphasis(value *SectionEmphasisType)
SetWebparts(value []WebPartable)
}

View File

@ -0,0 +1,59 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// WebPart provides operations to call the remove method.
type WebPart struct {
msmodel.Entity
}
// NewWebPart instantiates a new webPart and sets the default values.
func NewWebPart() *WebPart {
m := &WebPart{
Entity: *msmodel.NewEntity(),
}
return m
}
// CreateWebPartFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateWebPartFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
if parseNode != nil {
mappingValueNode, err := parseNode.GetChildNode("@odata.type")
if err != nil {
return nil, err
}
if mappingValueNode != nil {
mappingValue, err := mappingValueNode.GetStringValue()
if err != nil {
return nil, err
}
if mappingValue != nil {
switch *mappingValue {
case "#microsoft.graph.standardWebPart":
return NewStandardWebPart(), nil
case "#microsoft.graph.textWebPart":
return NewTextWebPart(), nil
}
}
}
}
return NewWebPart(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *WebPart) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.Entity.GetFieldDeserializers()
return res
}
// Serialize serializes information the current object
func (m *WebPart) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
return nil
}

View File

@ -0,0 +1,75 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// WebPartCollectionResponse provides operations to manage the webParts property of the microsoft.graph.sitePage entity.
type WebPartCollectionResponse struct {
msmodel.BaseCollectionPaginationCountResponse
// The value property
value []WebPartable
}
// NewWebPartCollectionResponse instantiates a new WebPartCollectionResponse and sets the default values.
func NewWebPartCollectionResponse() *WebPartCollectionResponse {
m := &WebPartCollectionResponse{
BaseCollectionPaginationCountResponse: *msmodel.NewBaseCollectionPaginationCountResponse(),
}
return m
}
// CreateWebPartCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateWebPartCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewWebPartCollectionResponse(), nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *WebPartCollectionResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateWebPartFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]WebPartable, len(val))
for i, v := range val {
res[i] = v.(WebPartable)
}
m.SetValue(res)
}
return nil
}
return res
}
// GetValue gets the value property value. The value property
func (m *WebPartCollectionResponse) GetValue() []WebPartable {
return m.value
}
// Serialize serializes information the current object
func (m *WebPartCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.BaseCollectionPaginationCountResponse.Serialize(writer)
if err != nil {
return err
}
if m.GetValue() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue()))
for i, v := range m.GetValue() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("value", cast)
if err != nil {
return err
}
}
return nil
}
// SetValue sets the value property value. The value property
func (m *WebPartCollectionResponse) SetValue(value []WebPartable) {
m.value = value
}

View File

@ -0,0 +1,14 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// WebPartCollectionResponseable
type WebPartCollectionResponseable interface {
msmodel.BaseCollectionPaginationCountResponseable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetValue() []WebPartable
SetValue(value []WebPartable)
}

View File

@ -0,0 +1,251 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// WebPartData
type WebPartData struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]interface{}
// Audience information of the web part. By using this property, specific content will be prioritized to specific audiences.
audiences []string
// Data version of the web part. The value is defined by the web part developer. Different dataVersions usually refers to a different property structure.
dataVersion *string
// Description of the web part.
description *string
// The OdataType property
odataType *string
// Properties bag of the web part.
properties msmodel.Jsonable
// Contains collections of data that can be processed by server side services like search index and link fixup.
serverProcessedContent ServerProcessedContentable
// Title of the web part.
title *string
}
// NewWebPartData instantiates a new webPartData and sets the default values.
func NewWebPartData() *WebPartData {
m := &WebPartData{}
m.SetAdditionalData(make(map[string]interface{}))
return m
}
// CreateWebPartDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateWebPartDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewWebPartData(), nil
}
// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *WebPartData) GetAdditionalData() map[string]interface{} {
return m.additionalData
}
// GetAudiences gets the audiences property value. Audience information of the web part. By using this property, specific content will be prioritized to specific audiences.
func (m *WebPartData) GetAudiences() []string {
return m.audiences
}
// GetDataVersion gets the dataVersion property value. Data version of the web part. The value is defined by the web part developer. Different dataVersions usually refers to a different property structure.
func (m *WebPartData) GetDataVersion() *string {
return m.dataVersion
}
// GetDescription gets the description property value. Description of the web part.
func (m *WebPartData) GetDescription() *string {
return m.description
}
// GetFieldDeserializers the deserialization information for the current model
func (m *WebPartData) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error)
res["audiences"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfPrimitiveValues("string")
if err != nil {
return err
}
if val != nil {
res := make([]string, len(val))
for i, v := range val {
res[i] = *(v.(*string))
}
m.SetAudiences(res)
}
return nil
}
res["dataVersion"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetDataVersion(val)
}
return nil
}
res["description"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetDescription(val)
}
return nil
}
res["@odata.type"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOdataType(val)
}
return nil
}
res["properties"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(msmodel.CreateJsonFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetProperties(val.(msmodel.Jsonable))
}
return nil
}
res["serverProcessedContent"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateServerProcessedContentFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetServerProcessedContent(val.(ServerProcessedContentable))
}
return nil
}
res["title"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTitle(val)
}
return nil
}
return res
}
// GetOdataType gets the @odata.type property value. The OdataType property
func (m *WebPartData) GetOdataType() *string {
return m.odataType
}
// GetProperties gets the properties property value. Properties bag of the web part.
func (m *WebPartData) GetProperties() msmodel.Jsonable {
return m.properties
}
// GetServerProcessedContent gets the serverProcessedContent property value. Contains collections of data that can be processed by server side services like search index and link fixup.
func (m *WebPartData) GetServerProcessedContent() ServerProcessedContentable {
return m.serverProcessedContent
}
// GetTitle gets the title property value. Title of the web part.
func (m *WebPartData) GetTitle() *string {
return m.title
}
// Serialize serializes information the current object
func (m *WebPartData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
if m.GetAudiences() != nil {
err := writer.WriteCollectionOfStringValues("audiences", m.GetAudiences())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("dataVersion", m.GetDataVersion())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("description", m.GetDescription())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("@odata.type", m.GetOdataType())
if err != nil {
return err
}
}
{
err := writer.WriteObjectValue("properties", m.GetProperties())
if err != nil {
return err
}
}
{
err := writer.WriteObjectValue("serverProcessedContent", m.GetServerProcessedContent())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("title", m.GetTitle())
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
return err
}
}
return nil
}
// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *WebPartData) SetAdditionalData(value map[string]interface{}) {
m.additionalData = value
}
// SetAudiences sets the audiences property value. Audience information of the web part. By using this property, specific content will be prioritized to specific audiences.
func (m *WebPartData) SetAudiences(value []string) {
m.audiences = value
}
// SetDataVersion sets the dataVersion property value. Data version of the web part. The value is defined by the web part developer. Different dataVersions usually refers to a different property structure.
func (m *WebPartData) SetDataVersion(value *string) {
m.dataVersion = value
}
// SetDescription sets the description property value. Description of the web part.
func (m *WebPartData) SetDescription(value *string) {
m.description = value
}
// SetOdataType sets the @odata.type property value. The OdataType property
func (m *WebPartData) SetOdataType(value *string) {
m.odataType = value
}
// SetProperties sets the properties property value. Properties bag of the web part.
func (m *WebPartData) SetProperties(value msmodel.Jsonable) {
m.properties = value
}
// SetServerProcessedContent sets the serverProcessedContent property value. Contains collections of data that can be processed by server side services like search index and link fixup.
func (m *WebPartData) SetServerProcessedContent(value ServerProcessedContentable) {
m.serverProcessedContent = value
}
// SetTitle sets the title property value. Title of the web part.
func (m *WebPartData) SetTitle(value *string) {
m.title = value
}

View File

@ -0,0 +1,26 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// WebPartDataable
type WebPartDataable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetAudiences() []string
GetDataVersion() *string
GetDescription() *string
GetOdataType() *string
GetProperties() msmodel.Jsonable
GetServerProcessedContent() ServerProcessedContentable
GetTitle() *string
SetAudiences(value []string)
SetDataVersion(value *string)
SetDescription(value *string)
SetOdataType(value *string)
SetProperties(value msmodel.Jsonable)
SetServerProcessedContent(value ServerProcessedContentable)
SetTitle(value *string)
}

View File

@ -0,0 +1,175 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// WebPartPosition
type WebPartPosition struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]interface{}
// Indicates the identifier of the column where the web part is located.
columnId *float64
// Indicates the horizontal section where the web part is located.
horizontalSectionId *float64
// Indicates whether the web part is located in the vertical section.
isInVerticalSection *bool
// The OdataType property
odataType *string
// Index of the current web part. Represents the order of the web part in this column or section.
webPartIndex *float64
}
// NewWebPartPosition instantiates a new webPartPosition and sets the default values.
func NewWebPartPosition()(*WebPartPosition) {
m := &WebPartPosition{
}
m.SetAdditionalData(make(map[string]interface{}));
return m
}
// CreateWebPartPositionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateWebPartPositionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewWebPartPosition(), nil
}
// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *WebPartPosition) GetAdditionalData()(map[string]interface{}) {
return m.additionalData
}
// GetColumnId gets the columnId property value. Indicates the identifier of the column where the web part is located.
func (m *WebPartPosition) GetColumnId()(*float64) {
return m.columnId
}
// GetFieldDeserializers the deserialization information for the current model
func (m *WebPartPosition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["columnId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetFloat64Value()
if err != nil {
return err
}
if val != nil {
m.SetColumnId(val)
}
return nil
}
res["horizontalSectionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetFloat64Value()
if err != nil {
return err
}
if val != nil {
m.SetHorizontalSectionId(val)
}
return nil
}
res["isInVerticalSection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetIsInVerticalSection(val)
}
return nil
}
res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOdataType(val)
}
return nil
}
res["webPartIndex"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetFloat64Value()
if err != nil {
return err
}
if val != nil {
m.SetWebPartIndex(val)
}
return nil
}
return res
}
// GetHorizontalSectionId gets the horizontalSectionId property value. Indicates the horizontal section where the web part is located.
func (m *WebPartPosition) GetHorizontalSectionId()(*float64) {
return m.horizontalSectionId
}
// GetIsInVerticalSection gets the isInVerticalSection property value. Indicates whether the web part is located in the vertical section.
func (m *WebPartPosition) GetIsInVerticalSection()(*bool) {
return m.isInVerticalSection
}
// GetOdataType gets the @odata.type property value. The OdataType property
func (m *WebPartPosition) GetOdataType()(*string) {
return m.odataType
}
// GetWebPartIndex gets the webPartIndex property value. Index of the current web part. Represents the order of the web part in this column or section.
func (m *WebPartPosition) GetWebPartIndex()(*float64) {
return m.webPartIndex
}
// Serialize serializes information the current object
func (m *WebPartPosition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteFloat64Value("columnId", m.GetColumnId())
if err != nil {
return err
}
}
{
err := writer.WriteFloat64Value("horizontalSectionId", m.GetHorizontalSectionId())
if err != nil {
return err
}
}
{
err := writer.WriteBoolValue("isInVerticalSection", m.GetIsInVerticalSection())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("@odata.type", m.GetOdataType())
if err != nil {
return err
}
}
{
err := writer.WriteFloat64Value("webPartIndex", m.GetWebPartIndex())
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
return err
}
}
return nil
}
// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *WebPartPosition) SetAdditionalData(value map[string]interface{})() {
m.additionalData = value
}
// SetColumnId sets the columnId property value. Indicates the identifier of the column where the web part is located.
func (m *WebPartPosition) SetColumnId(value *float64)() {
m.columnId = value
}
// SetHorizontalSectionId sets the horizontalSectionId property value. Indicates the horizontal section where the web part is located.
func (m *WebPartPosition) SetHorizontalSectionId(value *float64)() {
m.horizontalSectionId = value
}
// SetIsInVerticalSection sets the isInVerticalSection property value. Indicates whether the web part is located in the vertical section.
func (m *WebPartPosition) SetIsInVerticalSection(value *bool)() {
m.isInVerticalSection = value
}
// SetOdataType sets the @odata.type property value. The OdataType property
func (m *WebPartPosition) SetOdataType(value *string)() {
m.odataType = value
}
// SetWebPartIndex sets the webPartIndex property value. Index of the current web part. Represents the order of the web part in this column or section.
func (m *WebPartPosition) SetWebPartIndex(value *float64)() {
m.webPartIndex = value
}

View File

@ -0,0 +1,21 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// WebPartPositionable
type WebPartPositionable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetColumnId()(*float64)
GetHorizontalSectionId()(*float64)
GetIsInVerticalSection()(*bool)
GetOdataType()(*string)
GetWebPartIndex()(*float64)
SetColumnId(value *float64)()
SetHorizontalSectionId(value *float64)()
SetIsInVerticalSection(value *bool)()
SetOdataType(value *string)()
SetWebPartIndex(value *float64)()
}

View File

@ -0,0 +1,12 @@
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
)
// WebPartable
type WebPartable interface {
msmodel.Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
}

View File

@ -0,0 +1,116 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
)
// CountRequestBuilder provides operations to count the resources in the collection.
type CountRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// CountRequestBuilderGetQueryParameters get the number of the resource
type CountRequestBuilderGetQueryParameters struct {
// Filter items by property values
Filter *string `uriparametername:"%24filter"`
// Search items by search phrases
Search *string `uriparametername:"%24search"`
}
// CountRequestBuilderGetRequestConfiguration configuration for the request such as headers,
// query parameters, and middleware options.
type CountRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *CountRequestBuilderGetQueryParameters
}
// NewCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
func NewCountRequestBuilderInternal(
pathParameters map[string]string,
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter,
) *CountRequestBuilder {
m := &CountRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/$count{?%24search,%24filter}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
func NewCountRequestBuilder(
rawURL string,
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter,
) *CountRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawURL
return NewCountRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateGetRequestInformation get the number of the resource
func (m *CountRequestBuilder) CreateGetRequestInformation(
ctx context.Context,
requestConfiguration *CountRequestBuilderGetRequestConfiguration,
) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "text/plain")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Get get the number of the resource
//
//nolint:lll
func (m *CountRequestBuilder) Get(ctx context.Context, requestConfiguration *CountRequestBuilderGetRequestConfiguration) (*int32, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(*int32), nil
}

View File

@ -0,0 +1,115 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
)
// ItemPagesCountRequestBuilder provides operations to count the resources in the collection.
type ItemPagesCountRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesCountRequestBuilderGetQueryParameters get the number of the resource
type ItemPagesCountRequestBuilderGetQueryParameters struct {
// Filter items by property values
Filter *string `uriparametername:"%24filter"`
// Search items by search phrases
Search *string `uriparametername:"%24search"`
}
// ItemPagesCountRequestBuilderGetRequestConfiguration configuration for the request
// such as headers, query parameters, and middleware options.
type ItemPagesCountRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesCountRequestBuilderGetQueryParameters
}
// NewItemPagesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
func NewItemPagesCountRequestBuilderInternal(
pathParameters map[string]string,
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter,
) *ItemPagesCountRequestBuilder {
m := &ItemPagesCountRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/$count{?%24search,%24filter}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
func NewItemPagesCountRequestBuilder(
rawURL string,
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter,
) *ItemPagesCountRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawURL
return NewItemPagesCountRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateGetRequestInformation get the number of the resource
//
//nolint:lll
func (m *ItemPagesCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesCountRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "text/plain")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Get get the number of the resource
//
//nolint:lll
func (m *ItemPagesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesCountRequestBuilderGetRequestConfiguration) (*int32, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(*int32), nil
}

View File

@ -0,0 +1,122 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
)
// ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilder provides
// operations to count the resources in the collection.
type ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilderGetQueryParameters get the number of the resource
type ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilderGetQueryParameters struct {
// Filter items by property values
Filter *string `uriparametername:"%24filter"`
// Search items by search phrases
Search *string `uriparametername:"%24search"`
}
// ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilderGetRequestConfiguration configuration for
// the request such as headers, query parameters, and middleware options.
type ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilderGetQueryParameters
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilderInternal instantiates a
// new CountRequestBuilder and sets the default values.
func NewItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilderInternal(
pathParameters map[string]string,
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter,
) *ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilder {
m := &ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilder{}
//nolint:lll
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/horizontalSections/$count{?%24search,%24filter}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilder instantiates a
// new CountRequestBuilder and sets the default values.
func NewItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilder(
rawURL string,
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter,
) *ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawURL
return NewItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateGetRequestInformation get the number of the resource
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilder) CreateGetRequestInformation(
ctx context.Context,
requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilderGetRequestConfiguration,
) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error,
) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "text/plain")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Get get the number of the resource
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilder) Get(
ctx context.Context,
requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilderGetRequestConfiguration,
) (*int32, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(*int32), nil
}

View File

@ -0,0 +1,260 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder
// provides operations to manage the horizontalSections property of the microsoft.graph.canvasLayout entity.
type ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderDeleteRequestConfiguration
// configuration for the request such as headers, query parameters, and middleware options.
type ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderDeleteRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderGetQueryParameters
// collection of horizontal sections on the SharePoint page.
type ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderGetQueryParameters struct {
// Expand related entities
Expand []string `uriparametername:"%24expand"`
// Select properties to be returned
Select []string `uriparametername:"%24select"`
}
// ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderGetRequestConfiguration
// configuration for the request such as headers, query parameters, and middleware options.
type ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderGetQueryParameters
}
// ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderPatchRequestConfiguration
// configuration for the request such as headers, query parameters, and middleware options.
type ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderPatchRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// Columns provides operations to manage the columns property of the microsoft.graph.horizontalSection entity.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder) Columns() *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder {
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderInternal(m.pathParameters, m.requestAdapter)
}
// ColumnsById provides operations to manage the columns property of the microsoft.graph.horizontalSection entity.
//
//nolint:revive
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder) ColumnsById(id string,
) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder {
urlTplParams := make(map[string]string)
for idx, item := range m.pathParameters {
urlTplParams[idx] = item
}
if id != "" {
urlTplParams["horizontalSectionColumn%2Did"] = id
}
//nolint:lll
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderInternal(urlTplParams, m.requestAdapter)
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderInternal
// instantiates a new HorizontalSectionItemRequestBuilder and sets the default values.
func NewItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderInternal(
pathParameters map[string]string,
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter,
) *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder {
m := &ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder{}
//nolint:lll
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/horizontalSections/{horizontalSection%2Did}{?%24select,%24expand}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder instantiates a
// new HorizontalSectionItemRequestBuilder and sets the default values.
func NewItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder(
rawURL string,
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter,
) *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawURL
return NewItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderInternal(
urlParams,
requestAdapter,
)
}
// CreateDeleteRequestInformation delete navigation property horizontalSections for sites
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder) CreateDeleteRequestInformation(
ctx context.Context,
requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderDeleteRequestConfiguration,
) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreateGetRequestInformation collection of horizontal sections on the SharePoint page.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder) CreateGetRequestInformation(
ctx context.Context,
requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderGetRequestConfiguration,
) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreatePatchRequestInformation update the navigation property horizontalSections in sites
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionable, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderPatchRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH
requestInfo.Headers.Add("Accept", "application/json")
err := requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
if err != nil {
return nil, err
}
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Delete delete navigation property horizontalSections for sites
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderDeleteRequestConfiguration) error {
requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration)
if err != nil {
return err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
err = m.requestAdapter.SendNoContent(ctx, requestInfo, errorMapping)
if err != nil {
return err
}
return nil
}
// Get collection of horizontal sections on the SharePoint page.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderGetRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionable, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateHorizontalSectionFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionable), nil
}
// Patch update the navigation property horizontalSections in sites
// nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder) Patch(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionable, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderPatchRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionable, error) {
requestInfo, err := m.CreatePatchRequestInformation(ctx, body, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateHorizontalSectionFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionable), nil
}

View File

@ -0,0 +1,117 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
)
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilder
// provides operations to count the resources in the collection.
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilderGetQueryParameters get the number of the resource
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilderGetQueryParameters struct {
// Filter items by property values
Filter *string `uriparametername:"%24filter"`
// Search items by search phrases
Search *string `uriparametername:"%24search"`
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilderGetQueryParameters
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
//
//nolint:lll
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilder {
m := &ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/horizontalSections/{horizontalSection%2Did}/columns/$count{?%24search,%24filter}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
//
//nolint:lll
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilder(rawURL string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawURL
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateGetRequestInformation get the number of the resource
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "text/plain")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Get get the number of the resource
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilderGetRequestConfiguration) (*int32, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(*int32), nil
}

View File

@ -0,0 +1,247 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder provides operations to manage the columns property of the microsoft.graph.horizontalSection entity.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderDeleteRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderGetQueryParameters the set of vertical columns in this section.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderGetQueryParameters struct {
// Expand related entities
Expand []string `uriparametername:"%24expand"`
// Select properties to be returned
Select []string `uriparametername:"%24select"`
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderGetQueryParameters
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderPatchRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderInternal instantiates a new HorizontalSectionColumnItemRequestBuilder and sets the default values.
//
//nolint:lll
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder {
m := &ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/horizontalSections/{horizontalSection%2Did}/columns/{horizontalSectionColumn%2Did}{?%24select,%24expand}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder instantiates a new HorizontalSectionColumnItemRequestBuilder and sets the default values.
//
//nolint:lll, revive
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateDeleteRequestInformation delete navigation property columns for sites
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder) CreateDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreateGetRequestInformation the set of vertical columns in this section.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreatePatchRequestInformation update the navigation property columns in sites
//
//nolint:lll,errcheck
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionColumnable, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderPatchRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH
requestInfo.Headers.Add("Accept", "application/json")
requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Delete delete navigation property columns for sites
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderDeleteRequestConfiguration) error {
requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration)
if err != nil {
return err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
err = m.requestAdapter.SendNoContent(ctx, requestInfo, errorMapping)
if err != nil {
return err
}
return nil
}
// Get the set of vertical columns in this section.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderGetRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionColumnable, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateHorizontalSectionColumnFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionColumnable), nil
}
// Patch update the navigation property columns in sites
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder) Patch(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionColumnable, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilderPatchRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionColumnable, error) {
requestInfo, err := m.CreatePatchRequestInformation(ctx, body, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateHorizontalSectionColumnFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionColumnable), nil
}
// Webparts provides operations to manage the webparts property of the microsoft.graph.horizontalSectionColumn entity.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder) Webparts() *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder {
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderInternal(m.pathParameters, m.requestAdapter)
}
// WebpartsById provides operations to manage the webparts property of the microsoft.graph.horizontalSectionColumn entity.
//
//nolint:lll,revive
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsHorizontalSectionColumnItemRequestBuilder) WebpartsById(id string) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder {
urlTplParams := make(map[string]string)
for idx, item := range m.pathParameters {
urlTplParams[idx] = item
}
if id != "" {
urlTplParams["webPart%2Did"] = id
}
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderInternal(urlTplParams, m.requestAdapter)
}

View File

@ -0,0 +1,111 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
)
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilder provides operations to count the resources in the collection.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilderGetQueryParameters get the number of the resource
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilderGetQueryParameters struct {
// Filter items by property values
Filter *string `uriparametername:"%24filter"`
// Search items by search phrases
Search *string `uriparametername:"%24search"`
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilderGetQueryParameters
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
//
//nolint:lll
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilder {
m := &ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/horizontalSections/{horizontalSection%2Did}/columns/{horizontalSectionColumn%2Did}/webparts/$count{?%24search,%24filter}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
//
//nolint:lll, revive
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateGetRequestInformation get the number of the resource
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "text/plain")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Get get the number of the resource
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilderGetRequestConfiguration) (*int32, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(*int32), nil
}

View File

@ -0,0 +1,96 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilder provides operations to call the getPositionOfWebPart method.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilderPostRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilderInternal instantiates a new GetPositionOfWebPartRequestBuilder and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilder {
m := &ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/horizontalSections/{horizontalSection%2Did}/columns/{horizontalSectionColumn%2Did}/webparts/{webPart%2Did}/microsoft.graph.getPositionOfWebPart"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilder instantiates a new GetPositionOfWebPartRequestBuilder and sets the default values.
//
//nolint:lll,revive,wsl
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilderInternal(urlParams, requestAdapter)
}
// CreatePostRequestInformation invoke action getPositionOfWebPart
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilder) CreatePostRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// nolint:lll,wsl
// Post invoke action getPositionOfWebPart
// [Find more info here]
//
// [Find more info here]: https://docs.microsoft.com/graph/api/webpart-getposition?view=graph-rest-1.0
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilderPostRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartPositionable, error) {
requestInfo, err := m.CreatePostRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateWebPartPositionFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartPositionable), nil
}

View File

@ -0,0 +1,180 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder provides operations to manage the webparts property of the microsoft.graph.horizontalSectionColumn entity.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderGetQueryParameters get the webPart resources from a sitePage. Sort by the order in which they appear on the page.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderGetQueryParameters struct {
// Include count of items
Count *bool `uriparametername:"%24count"`
// Expand related entities
Expand []string `uriparametername:"%24expand"`
// Filter items by property values
Filter *string `uriparametername:"%24filter"`
// Order items by property values
Orderby []string `uriparametername:"%24orderby"`
// Search items by search phrases
Search *string `uriparametername:"%24search"`
// Select properties to be returned
Select []string `uriparametername:"%24select"`
// Skip the first n items
Skip *int32 `uriparametername:"%24skip"`
// Show only the first n items
Top *int32 `uriparametername:"%24top"`
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderGetQueryParameters
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderPostRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderInternal instantiates a new WebpartsRequestBuilder and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder {
m := &ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/horizontalSections/{horizontalSection%2Did}/columns/{horizontalSectionColumn%2Did}/webparts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder instantiates a new WebpartsRequestBuilder and sets the default values.
//
//nolint:lll,revive,wsl
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderInternal(urlParams, requestAdapter)
}
// Count provides operations to count the resources in the collection.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder) Count() *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilder {
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsCountRequestBuilderInternal(m.pathParameters, m.requestAdapter)
}
// CreateGetRequestInformation get the webPart resources from a sitePage. Sort by the order in which they appear on the page.
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreatePostRequestInformation create new navigation property to webparts for sites
//
//nolint:lll,wsl,errcheck
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
requestInfo.Headers.Add("Accept", "application/json")
requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Get get the webPart resources from a sitePage. Sort by the order in which they appear on the page.
// [Find more info here]
//
// [Find more info here]: https://docs.microsoft.com/graph/api/webpart-list?view=graph-rest-1.0
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderGetRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartCollectionResponseable, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateWebPartCollectionResponseFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartCollectionResponseable), nil
}
// Post create new navigation property to webparts for sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilder) Post(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsRequestBuilderPostRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, error) {
requestInfo, err := m.CreatePostRequestInformation(ctx, body, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateWebPartFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable), nil
}

View File

@ -0,0 +1,209 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder provides operations to manage the webparts property of the microsoft.graph.horizontalSectionColumn entity.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderDeleteRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderGetQueryParameters the collection of WebParts in this column.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderGetQueryParameters struct {
// Expand related entities
Expand []string `uriparametername:"%24expand"`
// Select properties to be returned
Select []string `uriparametername:"%24select"`
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderGetQueryParameters
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderPatchRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderInternal instantiates a new WebPartItemRequestBuilder and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder {
m := &ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/horizontalSections/{horizontalSection%2Did}/columns/{horizontalSectionColumn%2Did}/webparts/{webPart%2Did}{?%24select,%24expand}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder instantiates a new WebPartItemRequestBuilder and sets the default values.
//
//nolint:lll,revive,wsl
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateDeleteRequestInformation delete navigation property webparts for sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder) CreateDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreateGetRequestInformation the collection of WebParts in this column.
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreatePatchRequestInformation update the navigation property webparts in sites
//
//nolint:lll,wsl,errcheck
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderPatchRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH
requestInfo.Headers.Add("Accept", "application/json")
requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Delete delete navigation property webparts for sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderDeleteRequestConfiguration) error {
requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration)
if err != nil {
return err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
err = m.requestAdapter.SendNoContent(ctx, requestInfo, errorMapping)
if err != nil {
return err
}
return nil
}
// Get the collection of WebParts in this column.
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderGetRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateWebPartFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable), nil
}
// GetPositionOfWebPart provides operations to call the getPositionOfWebPart method.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder) GetPositionOfWebPart() *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilder {
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsItemGetPositionOfWebPartRequestBuilderInternal(m.pathParameters, m.requestAdapter)
}
// Patch update the navigation property webparts in sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilder) Patch(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsItemWebpartsWebPartItemRequestBuilderPatchRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, error) {
requestInfo, err := m.CreatePatchRequestInformation(ctx, body, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateWebPartFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable), nil
}

View File

@ -0,0 +1,180 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder provides operations to manage the columns property of the microsoft.graph.horizontalSection entity.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderGetQueryParameters get a list of the horizontalSectionColumn objects and their properties. Sort by `id` in ascending order.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderGetQueryParameters struct {
// Include count of items
Count *bool `uriparametername:"%24count"`
// Expand related entities
Expand []string `uriparametername:"%24expand"`
// Filter items by property values
Filter *string `uriparametername:"%24filter"`
// Order items by property values
Orderby []string `uriparametername:"%24orderby"`
// Search items by search phrases
Search *string `uriparametername:"%24search"`
// Select properties to be returned
Select []string `uriparametername:"%24select"`
// Skip the first n items
Skip *int32 `uriparametername:"%24skip"`
// Show only the first n items
Top *int32 `uriparametername:"%24top"`
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderGetQueryParameters
}
// ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderPostRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderInternal instantiates a new ColumnsRequestBuilder and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder {
m := &ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/horizontalSections/{horizontalSection%2Did}/columns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder instantiates a new ColumnsRequestBuilder and sets the default values.
//
//nolint:lll,wsl,revive
func NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderInternal(urlParams, requestAdapter)
}
// Count provides operations to count the resources in the collection.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder) Count() *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilder {
return NewItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsCountRequestBuilderInternal(m.pathParameters, m.requestAdapter)
}
// CreateGetRequestInformation get a list of the horizontalSectionColumn objects and their properties. Sort by `id` in ascending order.
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreatePostRequestInformation create new navigation property to columns for sites
//
//nolint:lll,wsl,errcheck
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionColumnable, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
requestInfo.Headers.Add("Accept", "application/json")
requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Get get a list of the horizontalSectionColumn objects and their properties. Sort by `id` in ascending order.
// [Find more info here]
//
// [Find more info here]: https://docs.microsoft.com/graph/api/horizontalsectioncolumn-list?view=graph-rest-1.0
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderGetRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionColumnCollectionResponseable, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateHorizontalSectionColumnCollectionResponseFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionColumnCollectionResponseable), nil
}
// Post create new navigation property to columns for sites
//
//nolint:lll, wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilder) Post(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionColumnable, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsItemColumnsRequestBuilderPostRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionColumnable, error) {
requestInfo, err := m.CreatePostRequestInformation(ctx, body, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateHorizontalSectionColumnFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionColumnable), nil
}

View File

@ -0,0 +1,179 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder provides operations to manage the horizontalSections property of the microsoft.graph.canvasLayout entity.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderGetQueryParameters get a list of the horizontalSection objects and their properties. Sort by `id` in ascending order.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderGetQueryParameters struct {
// Include count of items
Count *bool `uriparametername:"%24count"`
// Expand related entities
Expand []string `uriparametername:"%24expand"`
// Filter items by property values
Filter *string `uriparametername:"%24filter"`
// Order items by property values
Orderby []string `uriparametername:"%24orderby"`
// Search items by search phrases
Search *string `uriparametername:"%24search"`
// Select properties to be returned
Select []string `uriparametername:"%24select"`
// Skip the first n items
Skip *int32 `uriparametername:"%24skip"`
// Show only the first n items
Top *int32 `uriparametername:"%24top"`
}
// ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderGetQueryParameters
}
// ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderPostRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderInternal instantiates a new HorizontalSectionsRequestBuilder and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder {
m := &ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/horizontalSections{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder instantiates a new HorizontalSectionsRequestBuilder and sets the default values.
//
//nolint:lll,wsl,revive
func NewItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderInternal(urlParams, requestAdapter)
}
// Count provides operations to count the resources in the collection.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder) Count() *ItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilder {
return NewItemPagesItemCanvasLayoutHorizontalSectionsCountRequestBuilderInternal(m.pathParameters, m.requestAdapter)
}
// CreateGetRequestInformation get a list of the horizontalSection objects and their properties. Sort by `id` in ascending order.
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreatePostRequestInformation create new navigation property to horizontalSections for sites
//
//nolint:lll,wsl,errcheck
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionable, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
requestInfo.Headers.Add("Accept", "application/json")
requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Get get a list of the horizontalSection objects and their properties. Sort by `id` in ascending order.
// [Find more info here]
//
// [Find more info here]: https://docs.microsoft.com/graph/api/horizontalsection-list?view=graph-rest-1.0
//
//nolint:lll, wsl
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderGetRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionCollectionResponseable, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateHorizontalSectionCollectionResponseFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionCollectionResponseable), nil
}
// nolint:lll,wsl
// Post create new navigation property to horizontalSections for sites
func (m *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder) Post(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionable, requestConfiguration *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderPostRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionable, error) {
requestInfo, err := m.CreatePostRequestInformation(ctx, body, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateHorizontalSectionFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.HorizontalSectionable), nil
}

View File

@ -0,0 +1,230 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemCanvasLayoutRequestBuilder provides operations to manage the canvasLayout property of the microsoft.graph.sitePage entity.
//
//nolint:lll
type ItemPagesItemCanvasLayoutRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutRequestBuilderDeleteRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// ItemPagesItemCanvasLayoutRequestBuilderGetQueryParameters indicates the layout of the content in a given SharePoint page, including horizontal sections and vertical section
//
//nolint:lll
type ItemPagesItemCanvasLayoutRequestBuilderGetQueryParameters struct {
// Expand related entities
Expand []string `uriparametername:"%24expand"`
// Select properties to be returned
Select []string `uriparametername:"%24select"`
}
// ItemPagesItemCanvasLayoutRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutRequestBuilderGetQueryParameters
}
// ItemPagesItemCanvasLayoutRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutRequestBuilderPatchRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemCanvasLayoutRequestBuilderInternal instantiates a new CanvasLayoutRequestBuilder and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemCanvasLayoutRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutRequestBuilder {
m := &ItemPagesItemCanvasLayoutRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout{?%24select,%24expand}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutRequestBuilder instantiates a new CanvasLayoutRequestBuilder and sets the default values.
//
//nolint:lll,revive,wsl
func NewItemPagesItemCanvasLayoutRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateDeleteRequestInformation delete navigation property canvasLayout for sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutRequestBuilder) CreateDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreateGetRequestInformation indicates the layout of the content in a given SharePoint page, including horizontal sections and vertical section
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreatePatchRequestInformation update the navigation property canvasLayout in sites
//
//nolint:lll,wsl,errcheck
func (m *ItemPagesItemCanvasLayoutRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CanvasLayoutable, requestConfiguration *ItemPagesItemCanvasLayoutRequestBuilderPatchRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH
requestInfo.Headers.Add("Accept", "application/json")
requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Delete delete navigation property canvasLayout for sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutRequestBuilderDeleteRequestConfiguration) error {
requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration)
if err != nil {
return err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
err = m.requestAdapter.SendNoContent(ctx, requestInfo, errorMapping)
if err != nil {
return err
}
return nil
}
// Get indicates the layout of the content in a given SharePoint page, including horizontal sections and vertical section
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutRequestBuilderGetRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CanvasLayoutable, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateCanvasLayoutFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CanvasLayoutable), nil
}
// HorizontalSections provides operations to manage the horizontalSections property of the microsoft.graph.canvasLayout entity.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutRequestBuilder) HorizontalSections() *ItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilder {
return NewItemPagesItemCanvasLayoutHorizontalSectionsRequestBuilderInternal(m.pathParameters, m.requestAdapter)
}
// HorizontalSectionsById provides operations to manage the horizontalSections property of the microsoft.graph.canvasLayout entity.
//
//nolint:lll,wsl,revive
func (m *ItemPagesItemCanvasLayoutRequestBuilder) HorizontalSectionsById(id string) *ItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilder {
urlTplParams := make(map[string]string)
for idx, item := range m.pathParameters {
urlTplParams[idx] = item
}
if id != "" {
urlTplParams["horizontalSection%2Did"] = id
}
return NewItemPagesItemCanvasLayoutHorizontalSectionsHorizontalSectionItemRequestBuilderInternal(urlTplParams, m.requestAdapter)
}
// Patch update the navigation property canvasLayout in sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutRequestBuilder) Patch(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CanvasLayoutable, requestConfiguration *ItemPagesItemCanvasLayoutRequestBuilderPatchRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CanvasLayoutable, error) {
requestInfo, err := m.CreatePatchRequestInformation(ctx, body, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateCanvasLayoutFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CanvasLayoutable), nil
}
// VerticalSection provides operations to manage the verticalSection property of the microsoft.graph.canvasLayout entity.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutRequestBuilder) VerticalSection() *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder {
return NewItemPagesItemCanvasLayoutVerticalSectionRequestBuilderInternal(m.pathParameters, m.requestAdapter)
}

View File

@ -0,0 +1,226 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder provides operations to manage the verticalSection property of the microsoft.graph.canvasLayout entity.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderDeleteRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderGetQueryParameters read the properties and relationships of a verticalSection object.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderGetQueryParameters struct {
// Expand related entities
Expand []string `uriparametername:"%24expand"`
// Select properties to be returned
Select []string `uriparametername:"%24select"`
}
// ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderGetQueryParameters
}
// ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderPatchRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemCanvasLayoutVerticalSectionRequestBuilderInternal instantiates a new VerticalSectionRequestBuilder and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemCanvasLayoutVerticalSectionRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder {
m := &ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/verticalSection{?%24select,%24expand}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutVerticalSectionRequestBuilder instantiates a new VerticalSectionRequestBuilder and sets the default values.
//
//nolint:lll,revive,wsl
func NewItemPagesItemCanvasLayoutVerticalSectionRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutVerticalSectionRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateDeleteRequestInformation delete navigation property verticalSection for sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder) CreateDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreateGetRequestInformation read the properties and relationships of a verticalSection object.
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreatePatchRequestInformation update the navigation property verticalSection in sites
//
//nolint:lll,wsl,errcheck
func (m *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.VerticalSectionable, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderPatchRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH
requestInfo.Headers.Add("Accept", "application/json")
requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Delete delete navigation property verticalSection for sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderDeleteRequestConfiguration) error {
requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration)
if err != nil {
return err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
err = m.requestAdapter.SendNoContent(ctx, requestInfo, errorMapping)
if err != nil {
return err
}
return nil
}
// Get read the properties and relationships of a verticalSection object.
// [Find more info here]
//
// [Find more info here]: https://docs.microsoft.com/graph/api/verticalsection-get?view=graph-rest-1.0
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderGetRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.VerticalSectionable, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateVerticalSectionFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.VerticalSectionable), nil
}
// Patch update the navigation property verticalSection in sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder) Patch(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.VerticalSectionable, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilderPatchRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.VerticalSectionable, error) {
requestInfo, err := m.CreatePatchRequestInformation(ctx, body, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateVerticalSectionFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.VerticalSectionable), nil
}
// Webparts provides operations to manage the webparts property of the microsoft.graph.verticalSection entity.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder) Webparts() *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder {
return NewItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderInternal(m.pathParameters, m.requestAdapter)
}
// WebpartsById provides operations to manage the webparts property of the microsoft.graph.verticalSection entity.
//
//nolint:lll,wsl,revive
func (m *ItemPagesItemCanvasLayoutVerticalSectionRequestBuilder) WebpartsById(id string) *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder {
urlTplParams := make(map[string]string)
for idx, item := range m.pathParameters {
urlTplParams[idx] = item
}
if id != "" {
urlTplParams["webPart%2Did"] = id
}
return NewItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderInternal(urlTplParams, m.requestAdapter)
}

View File

@ -0,0 +1,107 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
)
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilder provides operations to count the resources in the collection.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilderGetQueryParameters get the number of the resource
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilderGetQueryParameters struct {
// Filter items by property values
Filter *string `uriparametername:"%24filter"`
// Search items by search phrases
Search *string `uriparametername:"%24search"`
}
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilderGetQueryParameters
}
// NewItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilder {
m := &ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/verticalSection/webparts/$count{?%24search,%24filter}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
//
//nolint:lll,wsl,revive
func NewItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateGetRequestInformation get the number of the resource
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "text/plain")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Get get the number of the resource
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilderGetRequestConfiguration) (*int32, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(*int32), nil
}

View File

@ -0,0 +1,97 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilder provides operations to call the getPositionOfWebPart method.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilderPostRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilderInternal instantiates a new GetPositionOfWebPartRequestBuilder and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilder {
m := &ItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/verticalSection/webparts/{webPart%2Did}/microsoft.graph.getPositionOfWebPart"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilder instantiates a new GetPositionOfWebPartRequestBuilder and sets the default values.
//
//nolint:lll,wsl,revive
func NewItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilderInternal(urlParams, requestAdapter)
}
// CreatePostRequestInformation invoke action getPositionOfWebPart
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilder) CreatePostRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Post invoke action getPositionOfWebPart
// [Find more info here]
//
// [Find more info here]: https://docs.microsoft.com/graph/api/webpart-getposition?view=graph-rest-1.0
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilderPostRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartPositionable, error) {
requestInfo, err := m.CreatePostRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateWebPartPositionFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartPositionable), nil
}

View File

@ -0,0 +1,177 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder provides operations to manage the webparts property of the microsoft.graph.verticalSection entity.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderGetQueryParameters the set of web parts in this section.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderGetQueryParameters struct {
// Include count of items
Count *bool `uriparametername:"%24count"`
// Expand related entities
Expand []string `uriparametername:"%24expand"`
// Filter items by property values
Filter *string `uriparametername:"%24filter"`
// Order items by property values
Orderby []string `uriparametername:"%24orderby"`
// Search items by search phrases
Search *string `uriparametername:"%24search"`
// Select properties to be returned
Select []string `uriparametername:"%24select"`
// Skip the first n items
Skip *int32 `uriparametername:"%24skip"`
// Show only the first n items
Top *int32 `uriparametername:"%24top"`
}
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderGetQueryParameters
}
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderPostRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderInternal instantiates a new WebpartsRequestBuilder and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder {
m := &ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/verticalSection/webparts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder instantiates a new WebpartsRequestBuilder and sets the default values.
//
//nolint:lll,wsl,revive
func NewItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderInternal(urlParams, requestAdapter)
}
// Count provides operations to count the resources in the collection.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder) Count() *ItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilder {
return NewItemPagesItemCanvasLayoutVerticalSectionWebpartsCountRequestBuilderInternal(m.pathParameters, m.requestAdapter)
}
// CreateGetRequestInformation the set of web parts in this section.
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreatePostRequestInformation create new navigation property to webparts for sites
//
//nolint:lll,wsl,errcheck
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
requestInfo.Headers.Add("Accept", "application/json")
requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Get the set of web parts in this section.
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderGetRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartCollectionResponseable, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateWebPartCollectionResponseFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartCollectionResponseable), nil
}
// Post create new navigation property to webparts for sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilder) Post(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsRequestBuilderPostRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, error) {
requestInfo, err := m.CreatePostRequestInformation(ctx, body, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateWebPartFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable), nil
}

View File

@ -0,0 +1,209 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder provides operations to manage the webparts property of the microsoft.graph.verticalSection entity.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderDeleteRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderGetQueryParameters the set of web parts in this section.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderGetQueryParameters struct {
// Expand related entities
Expand []string `uriparametername:"%24expand"`
// Select properties to be returned
Select []string `uriparametername:"%24select"`
}
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderGetQueryParameters
}
// ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderPatchRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderInternal instantiates a new WebPartItemRequestBuilder and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder {
m := &ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/canvasLayout/verticalSection/webparts/{webPart%2Did}{?%24select,%24expand}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder instantiates a new WebPartItemRequestBuilder and sets the default values.
//
//nolint:lll,wsl,revive
func NewItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateDeleteRequestInformation delete navigation property webparts for sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder) CreateDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderDeleteRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreateGetRequestInformation the set of web parts in this section.
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// CreatePatchRequestInformation update the navigation property webparts in sites
//
//nolint:lll,wsl,errcheck
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder) CreatePatchRequestInformation(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderPatchRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH
requestInfo.Headers.Add("Accept", "application/json")
requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Delete delete navigation property webparts for sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderDeleteRequestConfiguration) error {
requestInfo, err := m.CreateDeleteRequestInformation(ctx, requestConfiguration)
if err != nil {
return err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
err = m.requestAdapter.SendNoContent(ctx, requestInfo, errorMapping)
if err != nil {
return err
}
return nil
}
// Get the set of web parts in this section.
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderGetRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateWebPartFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable), nil
}
// GetPositionOfWebPart provides operations to call the getPositionOfWebPart method.
//
//nolint:lll
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder) GetPositionOfWebPart() *ItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilder {
return NewItemPagesItemCanvasLayoutVerticalSectionWebpartsItemGetPositionOfWebPartRequestBuilderInternal(m.pathParameters, m.requestAdapter)
}
// Patch update the navigation property webparts in sites
//
//nolint:lll,wsl
func (m *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilder) Patch(ctx context.Context, body ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, requestConfiguration *ItemPagesItemCanvasLayoutVerticalSectionWebpartsWebPartItemRequestBuilderPatchRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, error) {
requestInfo, err := m.CreatePatchRequestInformation(ctx, body, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateWebPartFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable), nil
}

View File

@ -0,0 +1,182 @@
package sites
import i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
// ItemPagesItemGetWebPartsByPositionPostRequestBody provides operations to call the getWebPartsByPosition method.
//
//nolint:lll,revive
type ItemPagesItemGetWebPartsByPositionPostRequestBody struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]interface{}
// The columnId property
columnId *float64
// The horizontalSectionId property
horizontalSectionId *float64
// The isInVerticalSection property
isInVerticalSection *bool
// The webPartIndex property
webPartIndex *float64
}
// NewItemPagesItemGetWebPartsByPositionPostRequestBody instantiates a new ItemPagesItemGetWebPartsByPositionPostRequestBody and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemGetWebPartsByPositionPostRequestBody() *ItemPagesItemGetWebPartsByPositionPostRequestBody {
m := &ItemPagesItemGetWebPartsByPositionPostRequestBody{}
m.SetAdditionalData(make(map[string]interface{}))
return m
}
// CreateItemPagesItemGetWebPartsByPositionPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
//
//nolint:lll
func CreateItemPagesItemGetWebPartsByPositionPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewItemPagesItemGetWebPartsByPositionPostRequestBody(), nil
}
// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
//
//nolint:lll
func (m *ItemPagesItemGetWebPartsByPositionPostRequestBody) GetAdditionalData() map[string]interface{} {
return m.additionalData
}
// GetColumnId gets the columnId property value. The columnId property
//
//nolint:lll,revive
func (m *ItemPagesItemGetWebPartsByPositionPostRequestBody) GetColumnId() *float64 {
return m.columnId
}
// GetFieldDeserializers the deserialization information for the current model
//
//nolint:lll,wsl,revive
func (m *ItemPagesItemGetWebPartsByPositionPostRequestBody) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error)
res["columnId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetFloat64Value()
if err != nil {
return err
}
if val != nil {
m.SetColumnId(val)
}
return nil
}
res["horizontalSectionId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetFloat64Value()
if err != nil {
return err
}
if val != nil {
m.SetHorizontalSectionId(val)
}
return nil
}
res["isInVerticalSection"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetIsInVerticalSection(val)
}
return nil
}
res["webPartIndex"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetFloat64Value()
if err != nil {
return err
}
if val != nil {
m.SetWebPartIndex(val)
}
return nil
}
return res
}
// GetHorizontalSectionId gets the horizontalSectionId property value. The horizontalSectionId property
//
//nolint:lll,revive
func (m *ItemPagesItemGetWebPartsByPositionPostRequestBody) GetHorizontalSectionId() *float64 {
return m.horizontalSectionId
}
// GetIsInVerticalSection gets the isInVerticalSection property value. The isInVerticalSection property
func (m *ItemPagesItemGetWebPartsByPositionPostRequestBody) GetIsInVerticalSection() *bool {
return m.isInVerticalSection
}
// GetWebPartIndex gets the webPartIndex property value. The webPartIndex property
func (m *ItemPagesItemGetWebPartsByPositionPostRequestBody) GetWebPartIndex() *float64 {
return m.webPartIndex
}
// Serialize serializes information the current object
//
//nolint:lll,wsl
func (m *ItemPagesItemGetWebPartsByPositionPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
{
err := writer.WriteFloat64Value("columnId", m.GetColumnId())
if err != nil {
return err
}
}
{
err := writer.WriteFloat64Value("horizontalSectionId", m.GetHorizontalSectionId())
if err != nil {
return err
}
}
{
err := writer.WriteBoolValue("isInVerticalSection", m.GetIsInVerticalSection())
if err != nil {
return err
}
}
{
err := writer.WriteFloat64Value("webPartIndex", m.GetWebPartIndex())
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
return err
}
}
return nil
}
// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
//
//nolint:lll
func (m *ItemPagesItemGetWebPartsByPositionPostRequestBody) SetAdditionalData(value map[string]interface{}) {
m.additionalData = value
}
// SetColumnId sets the columnId property value. The columnId property
//
//nolint:lll,revive
func (m *ItemPagesItemGetWebPartsByPositionPostRequestBody) SetColumnId(value *float64) {
m.columnId = value
}
// SetHorizontalSectionId sets the horizontalSectionId property value. The horizontalSectionId property
//
//nolint:revive
func (m *ItemPagesItemGetWebPartsByPositionPostRequestBody) SetHorizontalSectionId(value *float64) {
m.horizontalSectionId = value
}
// SetIsInVerticalSection sets the isInVerticalSection property value. The isInVerticalSection property
func (m *ItemPagesItemGetWebPartsByPositionPostRequestBody) SetIsInVerticalSection(value *bool) {
m.isInVerticalSection = value
}
// SetWebPartIndex sets the webPartIndex property value. The webPartIndex property
func (m *ItemPagesItemGetWebPartsByPositionPostRequestBody) SetWebPartIndex(value *float64) {
m.webPartIndex = value
}

View File

@ -0,0 +1,17 @@
package sites
import i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
// ItemPagesItemGetWebPartsByPositionPostRequestBodyable
type ItemPagesItemGetWebPartsByPositionPostRequestBodyable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetColumnId() *float64
GetHorizontalSectionId() *float64
GetIsInVerticalSection() *bool
GetWebPartIndex() *float64
SetColumnId(value *float64)
SetHorizontalSectionId(value *float64)
SetIsInVerticalSection(value *bool)
SetWebPartIndex(value *float64)
}

View File

@ -0,0 +1,91 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
)
// ItemPagesItemGetWebPartsByPositionRequestBuilder provides operations to call the getWebPartsByPosition method.
type ItemPagesItemGetWebPartsByPositionRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemGetWebPartsByPositionRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemGetWebPartsByPositionRequestBuilderPostRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemGetWebPartsByPositionRequestBuilderInternal instantiates a new GetWebPartsByPositionRequestBuilder and sets the default values.
//
//nolint:lll,wsl
func NewItemPagesItemGetWebPartsByPositionRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemGetWebPartsByPositionRequestBuilder {
m := &ItemPagesItemGetWebPartsByPositionRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/microsoft.graph.getWebPartsByPosition"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemGetWebPartsByPositionRequestBuilder instantiates a new GetWebPartsByPositionRequestBuilder and sets the default values.
//
//nolint:lll,wsl,revive
func NewItemPagesItemGetWebPartsByPositionRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemGetWebPartsByPositionRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemGetWebPartsByPositionRequestBuilderInternal(urlParams, requestAdapter)
}
// CreatePostRequestInformation invoke action getWebPartsByPosition
//
//nolint:lll,wsl,errcheck
func (m *ItemPagesItemGetWebPartsByPositionRequestBuilder) CreatePostRequestInformation(ctx context.Context, body ItemPagesItemGetWebPartsByPositionPostRequestBodyable, requestConfiguration *ItemPagesItemGetWebPartsByPositionRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
requestInfo.Headers.Add("Accept", "application/json")
requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Post invoke action getWebPartsByPosition
//
//nolint:lll,wsl
func (m *ItemPagesItemGetWebPartsByPositionRequestBuilder) Post(ctx context.Context, body ItemPagesItemGetWebPartsByPositionPostRequestBodyable, requestConfiguration *ItemPagesItemGetWebPartsByPositionRequestBuilderPostRequestConfiguration) (ItemPagesItemGetWebPartsByPositionResponseable, error) {
requestInfo, err := m.CreatePostRequestInformation(ctx, body, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, CreateItemPagesItemGetWebPartsByPositionResponseFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ItemPagesItemGetWebPartsByPositionResponseable), nil
}

View File

@ -0,0 +1,89 @@
package sites
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemGetWebPartsByPositionResponse provides operations to call the getWebPartsByPosition method.
type ItemPagesItemGetWebPartsByPositionResponse struct {
msmodel.BaseCollectionPaginationCountResponse
// The value property
value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable
}
// NewItemPagesItemGetWebPartsByPositionResponse instantiates a new ItemPagesItemGetWebPartsByPositionResponse and sets the default values.
//
//nolint:wsl,lll
func NewItemPagesItemGetWebPartsByPositionResponse() *ItemPagesItemGetWebPartsByPositionResponse {
m := &ItemPagesItemGetWebPartsByPositionResponse{
BaseCollectionPaginationCountResponse: *msmodel.NewBaseCollectionPaginationCountResponse(),
}
return m
}
// CreateItemPagesItemGetWebPartsByPositionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
//
//nolint:lll
func CreateItemPagesItemGetWebPartsByPositionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewItemPagesItemGetWebPartsByPositionResponse(), nil
}
// GetFieldDeserializers the deserialization information for the current model
//
//nolint:lll,wsl
func (m *ItemPagesItemGetWebPartsByPositionResponse) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers()
res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateWebPartFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable, len(val))
for i, v := range val {
res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable)
}
m.SetValue(res)
}
return nil
}
return res
}
// GetValue gets the value property value. The value property
//
//nolint:lll
func (m *ItemPagesItemGetWebPartsByPositionResponse) GetValue() []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable {
return m.value
}
// Serialize serializes information the current object
//
//nolint:lll,wsl
func (m *ItemPagesItemGetWebPartsByPositionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error {
err := m.BaseCollectionPaginationCountResponse.Serialize(writer)
if err != nil {
return err
}
if m.GetValue() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue()))
for i, v := range m.GetValue() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("value", cast)
if err != nil {
return err
}
}
return nil
}
// SetValue sets the value property value. The value property
//
//nolint:lll
func (m *ItemPagesItemGetWebPartsByPositionResponse) SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable) {
m.value = value
}

View File

@ -0,0 +1,16 @@
package sites
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
msmodel "github.com/microsoftgraph/msgraph-sdk-go/models"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
)
// ItemPagesItemGetWebPartsByPositionResponseable
type ItemPagesItemGetWebPartsByPositionResponseable interface {
msmodel.BaseCollectionPaginationCountResponseable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetValue() []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable
SetValue(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartable)
}

View File

@ -0,0 +1,82 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
)
// ItemPagesItemPublishRequestBuilder provides operations to call the publish method.
type ItemPagesItemPublishRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// nolint:lll
// ItemPagesItemPublishRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
type ItemPagesItemPublishRequestBuilderPostRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// nolint:lll,wsl
// NewItemPagesItemPublishRequestBuilderInternal instantiates a new PublishRequestBuilder and sets the default values.
func NewItemPagesItemPublishRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemPublishRequestBuilder {
m := &ItemPagesItemPublishRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/microsoft.graph.publish"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemPublishRequestBuilder instantiates a new PublishRequestBuilder and sets the default values.
//
//nolint:lll,wsl,revive
func NewItemPagesItemPublishRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemPublishRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemPublishRequestBuilderInternal(urlParams, requestAdapter)
}
// //nolint:wsl,revive,lll
// CreatePostRequestInformation invoke action publish
func (m *ItemPagesItemPublishRequestBuilder) CreatePostRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemPublishRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// //nolint:wsl,revive,lll
// Post invoke action publish
func (m *ItemPagesItemPublishRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemPagesItemPublishRequestBuilderPostRequestConfiguration) error {
requestInfo, err := m.CreatePostRequestInformation(ctx, requestConfiguration)
if err != nil {
return err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
err = m.requestAdapter.SendNoContent(ctx, requestInfo, errorMapping)
if err != nil {
return err
}
return nil
}

View File

@ -0,0 +1,103 @@
package sites
import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
)
// ItemPagesItemWebPartsCountRequestBuilder provides operations to count the resources in the collection.
type ItemPagesItemWebPartsCountRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemWebPartsCountRequestBuilderGetQueryParameters get the number of the resource
type ItemPagesItemWebPartsCountRequestBuilderGetQueryParameters struct {
// Filter items by property values
Filter *string `uriparametername:"%24filter"`
// Search items by search phrases
Search *string `uriparametername:"%24search"`
}
// ItemPagesItemWebPartsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemWebPartsCountRequestBuilderGetRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
// Request query parameters
QueryParameters *ItemPagesItemWebPartsCountRequestBuilderGetQueryParameters
}
// NewItemPagesItemWebPartsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values.
//
//nolint:wsl,revive,lll
func NewItemPagesItemWebPartsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemWebPartsCountRequestBuilder {
m := &ItemPagesItemWebPartsCountRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/webParts/$count{?%24search,%24filter}"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemWebPartsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values.
//
//nolint:wsl,revive,lll
func NewItemPagesItemWebPartsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemWebPartsCountRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemWebPartsCountRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateGetRequestInformation get the number of the resource
//
//nolint:wsl,revive,lll
func (m *ItemPagesItemWebPartsCountRequestBuilder) CreateGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemWebPartsCountRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET
requestInfo.Headers.Add("Accept", "text/plain")
if requestConfiguration != nil {
if requestConfiguration.QueryParameters != nil {
requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters))
}
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Get get the number of the resource
//
//nolint:wsl,revive,lll
func (m *ItemPagesItemWebPartsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemWebPartsCountRequestBuilderGetRequestConfiguration) (*int32, error) {
requestInfo, err := m.CreateGetRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(*int32), nil
}

View File

@ -0,0 +1,96 @@
package sites
import (
"context"
ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0 "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
)
// ItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilder provides operations to call the getPositionOfWebPart method.
//
//nolint:lll
type ItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// ItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
//
//nolint:lll
type ItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilderPostRequestConfiguration struct {
// Request headers
Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilderInternal instantiates a new GetPositionOfWebPartRequestBuilder and sets the default values.
//
//nolint:wsl,revive,lll
func NewItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilder {
m := &ItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilder{}
m.urlTemplate = "{+baseurl}/sites/{site%2Did}/pages/{sitePage%2Did}/webParts/{webPart%2Did}/microsoft.graph.getPositionOfWebPart"
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams
m.requestAdapter = requestAdapter
return m
}
// NewItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilder instantiates a new GetPositionOfWebPartRequestBuilder and sets the default values.
//
//nolint:wsl,revive,lll
func NewItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilder {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilderInternal(urlParams, requestAdapter)
}
// CreatePostRequestInformation invoke action getPositionOfWebPart
//
//nolint:wsl,revive,lll
func (m *ItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilder) CreatePostRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilderPostRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
requestInfo.Headers.Add("Accept", "application/json")
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Post invoke action getPositionOfWebPart
// [Find more info here]
//
// [Find more info here]: https://docs.microsoft.com/graph/api/webpart-getposition?view=graph-rest-1.0
//
//nolint:wsl,revive,lll
func (m *ItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemPagesItemWebPartsItemGetPositionOfWebPartRequestBuilderPostRequestConfiguration) (ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartPositionable, error) {
requestInfo, err := m.CreatePostRequestInformation(ctx, requestConfiguration)
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{
"4XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
"5XX": i7ad325c11fbf3db4d761c429267362d8b24daa1eda0081f914ebc3cdc85181a0.CreateODataErrorFromDiscriminatorValue,
}
res, err := m.requestAdapter.Send(ctx, requestInfo, ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateWebPartPositionFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.WebPartPositionable), nil
}

Some files were not shown because too many files have changed in this diff Show More